Add a safe operator to ensure timed events can't crash a save with deleted forever events
MR Description
- This MR adds a safe operator to a line of the set_self_switch to ensure a crash can't happen for some reasons (timed_events, event-making errors)
Before testing
- Make sure to test this using the virtual time. Or else, you'll have to wait a lot and I don't think anyone wants to wait too much :b
Tests to realize
-
Create an event which contains a trigger_event_in(5, "A")
command, and then adelete_this_event_forever
command, then play it ingame: the event should be deleted, and after the number of minutes ingame forwarded to the trigger_event_in, the game shouldn't crash at all.