CaravelGames / drod

The official public repository of Deadly Rooms of Death and DROD RPG
http://caravelgames.com
56 stars 17 forks source link

RPG: Fix bad save of empty default script #589

Closed Hypexion closed 4 months ago

Hypexion commented 5 months ago

When an empty default script is serialized, both values saved to ExtraVars are skipped if the script is empty. This causes a problem when all commands are removed from a default script, as the change will not be saved.

To avoid this problem, we can always save the script size, and unset the packed command buffer if no commands are in the script when saving.