Black Box deprecated

by mexmer

Spawn one or more black boxes upon death containing all your stuff. Spawn one or more black craft boxes upon death containing craft queue

7 years ago
0.13 - 0.14
9

i Some thoughts on optimizing the code

8 years ago

This mod is so much better than my own DeathChest mod.. I didn't even think about saving the crafting queue and I couldn't decide on how to handle inventories bigger than the chest itself. It never occurred to me that I could spawn multiple chests (I was thinking of making different sized chest depending on how many items the player had in their inventory).

Anyway, I tested your mod and it's working great but I found some stuff in the code that might (or rather should) give an error (A simple typo):
chestinventory ~= nill
nill should not be defined at all (since LUA's null value is named nil), wierd that it doesn't react to an undefined variable.

Also, you repeat a lot of code. The code to find a non-colliding position and spawning a new chest is repeated several times in the code, why not make it a function instead?

8 years ago

yeah, good point. might do some optimization later.

i posted this on mod portal primarily so my friends can download that, and i don't need to send them new version trough skype everytime i make changes.

8 years ago

Funny, I posted mine for the exact same reason =D