Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

require()d Lua files aren't reloaded on F2, nor on restarting the activity #582

@MyNameIsTrez

Description

@MyNameIsTrez

Describe the bug
My global script that require()s another Lua file of mine isn't reloaded when F2 is pressed, nor even when you restart the entire activity from the scenario screen. But the global script itself reloads just fine, it's just anything that it require()s isn't reloaded. It's very annoying, since I need to restart the entire game to test any changes to my ui.lua library.

To Reproduce
Steps to reproduce the behavior:

  1. Download example_ui.rte.zip and drop it into the Mods/ folder, on the latest Development branch
  2. Open Wave Defense, and observe how adding print("foo") to the top of main.lua is being printed every time you press F2, or restart the activity. If you try to do this with ui.lua on the other hand, it doesn't take effect until you restart the entire game! (The menu is opened and the buttons are drawn by pressing the M key, btw.)

Expected behavior
For F2 and restarting the scenario to properly reload all scripts.

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