Skip to content

Commit

Permalink
Prevent animationLength from appearing as nil if it wasn't present be…
Browse files Browse the repository at this point in the history
…fore
  • Loading branch information
maddie480 committed Jun 29, 2024
1 parent 8cc8680 commit 5bae10d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion Loenn/entities/flagTouchSwitch.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion everest.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 5bae10d

Please sign in to comment.