Skip to content

Commit 8793afa

Browse files
committed
Modifications made according to review feedback
Changed the inconsistent use of tabs in Ahorn plugin (now it's all 4 spaces). Removed the unused variables. Moved the GetFlagName code into the FlagName property.
1 parent 5a0827a commit 8793afa

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

Ahorn/entities/lightningDashSwitch.jl

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@ module SpringCollabLightningDashSwitch
33
using ..Ahorn, Maple
44

55
sides = String[
6-
"left",
7-
"right",
8-
"up",
9-
"down"
6+
"left",
7+
"right",
8+
"up",
9+
"down"
1010
]
1111

1212
textures = String[
13-
"default",
14-
"mirror"
13+
"default",
14+
"mirror"
1515
]
1616

1717
@mapdef Entity "SpringCollab2020/LightningDashSwitch" LDashSwitch(x::Integer, y::Integer, side::String="up", persistent::Bool=false, sprite::String="default")
1818

1919
const placements = Ahorn.PlacementDict(
20-
"Lightning Dash Switch ($(uppercasefirst(side))) (Spring Collab 2020)" => Ahorn.EntityPlacement(
20+
"Lightning Dash Switch ($(uppercasefirst(side))) (Spring Collab 2020)" => Ahorn.EntityPlacement(
2121
LDashSwitch,
2222
"rectangle",
23-
Dict{String, Any}(
24-
"side" => side
25-
)
26-
) for side in sides
23+
Dict{String, Any}(
24+
"side" => side
25+
)
26+
) for side in sides
2727
)
2828

2929
Ahorn.editingOptions(entity::LDashSwitch) = Dict{String, Any}(
30-
"side" => sides
30+
"side" => sides
3131
)
3232

3333
function Ahorn.selection(entity::LDashSwitch)
@@ -40,7 +40,7 @@ function Ahorn.selection(entity::LDashSwitch)
4040
return Ahorn.Rectangle(x - 2, y, 10, 16)
4141
elseif side == "down"
4242
return Ahorn.Rectangle(x, y, 16, 12)
43-
elseif side == "up"
43+
elseif side == "up"
4444
return Ahorn.Rectangle(x, y - 4, 16, 12)
4545
end
4646
end

Entities/LightningDashSwitch.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,18 +110,10 @@ public DashCollisionResults OnDashed(Player player, Vector2 direction) {
110110

111111
private string FlagName {
112112
get {
113-
return GetFlagName(id);
113+
return " LDashSwitch_" + id.Key;
114114
}
115115
}
116116

117-
public static string GetFlagName(EntityID id) {
118-
return " LDashSwitch_" + id.Key;
119-
}
120-
121-
public static ParticleType P_PressA;
122-
public static ParticleType P_PressB;
123-
public static ParticleType P_PressAMirror;
124-
public static ParticleType P_PressBMirror;
125117
private Sides side;
126118
private Vector2 pressedTarget;
127119
private bool pressed;
@@ -132,7 +124,6 @@ public static string GetFlagName(EntityID id) {
132124
private EntityID id;
133125
private bool mirrorMode;
134126
private bool playerWasOn;
135-
private bool allGates;
136127
private Sprite sprite;
137128
public enum Sides {
138129
Up,

0 commit comments

Comments
 (0)