Skip to content

Commit dddea46

Browse files
committed
Fixed feedback on Ahorn plugin
1 parent fa0c30d commit dddea46

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

Ahorn/entities/flagSwitchGate.jl

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

55
@pardef FlagSwitchGate(x1::Integer, y1::Integer, x2::Integer=x1+16, y2::Integer=y1, width::Integer=Maple.defaultBlockWidth, height::Integer=Maple.defaultBlockHeight,
6-
sprite::String="block", persistent::Bool=false, flag::String="flag_touch_switch", icon::String="vanilla", inactiveColor::String="5FCDE4", activeColor::String="FFFFFF", finishColor="F141DF") =
6+
sprite::String="block", persistent::Bool=false, flag::String="flag_touch_switch", icon::String="vanilla", inactiveColor::String="5FCDE4", activeColor::String="FFFFFF", finishColor::String="F141DF") =
77
Entity("SpringCollab2020/FlagSwitchGate", x=x1, y=y1, nodes=Tuple{Int, Int}[(x2, y2)], width=width, height=height, sprite=sprite, persistent=persistent, flag=flag, icon=icon,
88
inactiveColor=inactiveColor, activeColor=activeColor, finishColor=finishColor)
99

@@ -52,10 +52,10 @@ end
5252

5353
function renderGateSwitch(ctx::Ahorn.Cairo.CairoContext, entity::FlagSwitchGate, x::Number, y::Number, width::Number, height::Number, sprite::String)
5454
icon = get(entity.data, "icon", "vanilla")
55-
55+
5656
iconResource = "objects/switchgate/icon00"
5757
if icon != "vanilla"
58-
iconResource = "objects/SpringCollab2020/flagSwitchGate/$(icon)/icon00"
58+
iconResource = "objects/SpringCollab2020/flagSwitchGate/$(icon)/icon00"
5959
end
6060

6161
iconSprite = Ahorn.getSprite(iconResource, "Gameplay")

Ahorn/entities/flagTouchSwitch.jl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
using ..Ahorn, Maple
44

55
@mapdef Entity "SpringCollab2020/FlagTouchSwitch" FlagTouchSwitch(x::Integer, y::Integer,
6-
flag::String="flag_touch_switch", icon::String="vanilla", persistent::Bool=false, inactiveColor::String="5FCDE4", activeColor::String="FFFFFF", finishColor="F141DF")
6+
flag::String="flag_touch_switch", icon::String="vanilla", persistent::Bool=false, inactiveColor::String="5FCDE4", activeColor::String="FFFFFF", finishColor::String="F141DF")
77

88
const bundledIcons = String["vanilla", "tall", "triangle", "circle"]
99

1010
const placements = Ahorn.PlacementDict(
11-
"Flag Touch Switch (Spring Collab 2020)" => Ahorn.EntityPlacement(
12-
FlagTouchSwitch
13-
)
11+
"Flag Touch Switch (Spring Collab 2020)" => Ahorn.EntityPlacement(
12+
FlagTouchSwitch
13+
)
1414
)
1515

1616
Ahorn.editingOptions(entity::FlagTouchSwitch) = Dict{String,Any}(
17-
"icon" => bundledIcons
17+
"icon" => bundledIcons
1818
)
1919

2020
function Ahorn.selection(entity::FlagTouchSwitch)
@@ -26,12 +26,12 @@ end
2626
function Ahorn.render(ctx::Ahorn.Cairo.CairoContext, entity::FlagTouchSwitch, room::Maple.Room)
2727
Ahorn.drawSprite(ctx, "objects/touchswitch/container.png", 0, 0)
2828

29-
icon = get(entity.data, "icon", "vanilla")
30-
31-
iconPath = "objects/touchswitch/icon00.png"
32-
if icon != "vanilla"
33-
iconPath = "objects/SpringCollab2020/flagTouchSwitch/$(icon)/icon00.png"
34-
end
29+
icon = get(entity.data, "icon", "vanilla")
30+
31+
iconPath = "objects/touchswitch/icon00.png"
32+
if icon != "vanilla"
33+
iconPath = "objects/SpringCollab2020/flagTouchSwitch/$(icon)/icon00.png"
34+
end
3535

3636
Ahorn.drawSprite(ctx, iconPath, 0, 0)
3737
end

0 commit comments

Comments
 (0)