Slots.add: Changed to return lastAdded or undefined, which are different as a broken MS fails to load will set mLastAddedItem to nullptr
When loading from game data, The WMC source stack could be different from the stack currently being loaded
The source stack is tracked by num_food, which is not updated when mLastAddedItem is nullptr, causing the same food data to be loaded for the next food
Also, fixed a bug where removing things cause broken Master Sword to be removed.
Note: The game use the master sword recharge timer to determine if MS is broken. This flag is currently not supported in the simulator, so MS durability is used. This means when transfering MS between saves, the durability will be inaccurate. The workaround is to use the write command to manually fix the durability
Slots.add
: Changed to returnlastAdded
orundefined
, which are different as a broken MS fails to load will set mLastAddedItem to nullptrAlso, fixed a bug where removing things cause broken Master Sword to be removed.
Note: The game use the master sword recharge timer to determine if MS is broken. This flag is currently not supported in the simulator, so MS durability is used. This means when transfering MS between saves, the durability will be inaccurate. The workaround is to use the
write
command to manually fix the durability