diff --git a/Loenn/entities/flagTouchSwitch.lua b/Loenn/entities/flagTouchSwitch.lua index d9fba25..9b231b8 100644 --- a/Loenn/entities/flagTouchSwitch.lua +++ b/Loenn/entities/flagTouchSwitch.lua @@ -29,7 +29,16 @@ touchSwitch.placements = { } } -touchSwitch.fieldOrder = {"x", "y", "inactiveColor", "activeColor", "finishColor", "hitSound", "completeSoundFromSwitch", "completeSoundFromScene", "animationLength"} +function touchSwitch.fieldOrder(entity) + local fieldOrder = {"x", "y", "inactiveColor", "activeColor", "finishColor", "hitSound", "completeSoundFromSwitch", "completeSoundFromScene"} + + -- only include animationLength to fieldOrder if the field exists, otherwise it will appear as nil in the entity properties window + if entity.animationLength ~= nil then + table.insert(fieldOrder, "animationLength") + end + + return fieldOrder +end touchSwitch.fieldInformation = { inactiveColor = { diff --git a/everest.yaml b/everest.yaml index 3f2206e..49517d9 100644 --- a/everest.yaml +++ b/everest.yaml @@ -1,6 +1,6 @@ # The mod used to be known as "max480's Helping Hand", and wasn't renamed for compatibility reasons - Name: MaxHelpingHand - Version: 1.30.4 + Version: 1.30.5 DLL: bin/Release/net452/MaxHelpingHand.dll Dependencies: - Name: Everest