Jump to content

Errors in DLC0003\scripts\prefabs\TarLamp.lua


Giano

Recommended Posts

Hello everyone!

i found this annoying bug regarding the sync of toggle on/ toggle off of the Tar Lamp in Hamlet compatible worlds. I found an old post about it:

I noticed that Hamlet ships with a modified TarLamp.lua that replaces some calls to component.machine:TurnOn/TurnOff with the local turnon/turnoff which effectively bypasses the components.equippable.toggledon setting.

The end result is that in Hamlet Compatible shipwreck worlds or Hamlet worlds where we get a tar lamp the lamp's machine state and toggle state can get out of sync when picking it up.

To reproduce:
Start a world that is Hamlet compatible. Give yourself a tar lamp. Set it on the ground and then turn it off and pick it up again and it will be on but the action text will still say "Turn On" and right clicking the lamp will go through the turning on functions and the machine state will be re-synced with the equip state.

References:
DLC0002\scripts\prefabs\TarLamp.lua:20
inst.components.machine:TurnOn()
DLC0002\scripts\prefabs\TarLamp.lua:24
inst.components.machine:TurnOff()
DLC0003\scripts\prefabs\TarLamp.lua:20
inst.turnon(inst)
DLC0003\scripts\prefabs\TarLamp.lua:24
inst.turnoff(inst)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...