@@ -7,8 +7,8 @@ using ..Ahorn, Maple
7
7
shakeTime:: Number = 0.5 , moveTime:: Number = 1.8 , moveSpeed:: Number = 60.0 , moveEased:: Bool = true , allowReturn:: Bool = false , moveSound:: String = " event:/game/general/touchswitch_gate_open" , finishedSound:: String = " event:/game/general/touchswitch_gate_finish" ,
8
8
smoke:: Bool = true , surfaceIndex:: Int16 = convert (Int16, 8 ), particles:: Bool = true , speedMode:: Bool = false ) =
9
9
Entity (" MaxHelpingHand/FlagSwitchGate" , x= x1, y= y1, nodes= Tuple{Int, Int}[(x2, y2)], width= width, height= height, sprite= sprite, persistent= persistent, flag= flag, icon= icon,
10
- inactiveColor= inactiveColor, activeColor= activeColor, finishColor= finishColor, shakeTime= shakeTime, moveTime= moveTime, moveEased= moveEased, allowReturn= allowReturn, moveSound= moveSound, finishedSound= finishedSound,
11
- smoke= smoke, surfaceIndex= surfaceIndex, particles= particles)
10
+ inactiveColor= inactiveColor, activeColor= activeColor, finishColor= finishColor, shakeTime= shakeTime, moveTime= moveTime, moveSpeed = moveSpeed, moveEased= moveEased, allowReturn= allowReturn, moveSound= moveSound, finishedSound= finishedSound,
11
+ smoke= smoke, surfaceIndex= surfaceIndex, particles= particles, speedMode = speedMode )
12
12
13
13
function gateFinalizer (entity)
14
14
x, y = Ahorn. position (entity)
@@ -35,6 +35,14 @@ const placements = Ahorn.PlacementDict(
35
35
36
36
Ahorn. editingOrder (entity:: FlagSwitchGate ) = String[" x" , " y" , " width" , " height" , " flag" , " inactiveColor" , " activeColor" , " finishColor" , " hitSound" , " moveSound" , " finishedSound" , " shakeTime" , " moveTime" , " moveSpeed" , " icon" , " sprite" , " surfaceIndex" , " allowReturn" , " moveEased" , " persistent" , " particles" , " smoke" , " speedMode" ]
37
37
38
+ function Ahorn. editingIgnored (entity:: FlagSwitchGate , multiple:: Bool = false )
39
+ if get (entity. data, " speedMode" , false )
40
+ return String[" moveTime" , " moveEased" ]
41
+ else
42
+ return String[" moveSpeed" ]
43
+ end
44
+ end
45
+
38
46
Ahorn. editingOptions (entity:: FlagSwitchGate ) = Dict {String, Any} (
39
47
" sprite" => textures,
40
48
" icon" => bundledIcons,
0 commit comments