diff options
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r-- | advtrains/init.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 587dd12..482c33d 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -277,6 +277,15 @@ advtrains.avt_save = function(remove_players_from_wagons) end end + for id, wdata in pairs(advtrains.wagons) do + local _,proto = advtrains.get_wagon_prototype(wdata) + if proto.has_inventory then + local inv=minetest.get_inventory({type="detached", name="advtrains_wgn_"..id}) + wdata.ser_inv=advtrains.serialize_inventory(inv) + end + -- TODO apply save-keys here too + end + --versions: -- 1 - Initial new save format. local save_tbl={ |