No sprite was saved and loaded for containers, so I added that functionality. This only applies to containers created during gameplay, for example when moveable furniture or a mob is destroyed and loot is created. In order to do this, I had to pass more then the position into construct_self, so now construct_self takes a dictionary of the item that was first saved and then loaded.
Then there were some issues with setting the sprite after a load. It checked if the container was added to the scene tree. But when the container was loaded, the chunk would add it to the levelmanager instead of the scene root. I changed it so that chunk adds containers to the scene root now.
Fixes #189
No sprite was saved and loaded for containers, so I added that functionality. This only applies to containers created during gameplay, for example when moveable furniture or a mob is destroyed and loot is created. In order to do this, I had to pass more then the position into construct_self, so now construct_self takes a dictionary of the item that was first saved and then loaded.
Then there were some issues with setting the sprite after a load. It checked if the container was added to the scene tree. But when the container was loaded, the chunk would add it to the levelmanager instead of the scene root. I changed it so that chunk adds containers to the scene root now.