Skip to content

Some Lua scripts use OnDestroy which is never called by anything #221

@Architector4

Description

@Architector4

Describe the bug
Some Lua scripts (Browncoats's Heatlance flamethrower and some Refinery breakables) define a function OnDestroy, which is not a function called by any core game code or script. However, Destroy is defined.

In case of Heatlance, this means that when it gets destroyed as it's being activated, the fire noise persists in the location it was at permanently for the rest of the game. It's quite a loud and annoying noise too.

I'm on the development branch, for reference.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Data/Browncoats.rte/Devices/Weapons/Heatlance/Heatlance.lua
  2. Put print("blah blah") into the OnDestroy function
  3. Spawn then utterly explode the Heatlance in the game
  4. See no prints in the console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions