Closed scaryguy334 closed 13 years ago
Maybe even vanity slots? (which is actually also considered as a armor slot, like the accessories, which I found when trying to place them into my various inventories) 0 - 10 head, body, legs, acc1,acc2,acc3,acc4,acc5 vanhead,vanbody,vanlegs.
I think the things are called bank (20 slots each if i remember so probably 0-19) bank1
inventory (however large the inventory is on a player
armour (goes from 0-10
So probably just turn all of them into "trash slots" temporarily if it is possible to make something happen to the player on quit. No clue if thats doable though =(
This was the trash slot code below? Except that the 'if' that preceeds that only applied to slot 10.
player[myPlayer].inventory[i].SetDefaults(0); player[myPlayer].inventory[i].name = ""; player[myPlayer].inventory[i].stack = 0; player[myPlayer].inventory[i].UpdateItem(0);
So probably just apply the same to the others.
player[myPlayer].armour
player[myPlayer].bank
player[myPlayer].bank2
So probably just turn all of them into "trash slots" temporarily if it is possible to make something happen to the player on quit. No clue if thats doable though =(
This was the trash slot code below? Except that the 'if' that preceeds that only applied to slot 10.
player[myPlayer].inventory[i].SetDefaults(0); player[myPlayer].inventory[i].name = ""; player[myPlayer].inventory[i].stack = 0; player[myPlayer].inventory[i].UpdateItem(0);
So probably just apply the same to the others.
player[myPlayer].armour
player[myPlayer].bank
player[myPlayer].bank2
This is actually a good idea that never occurred to me. Probably even drop the characters stats back to default too.
I'll look into this further. Possibly try to get it in for 1.8.
If it does get done i'd probably throw it down as a unlisted change
If it does get done i'd probably throw it down as a unlisted change, so people dont see it and try to backtrack to use older versions to do this.
Touche.
or a non direct way of saying hmmm... perhaps just 'improved inventory system" ;p
There does not seem to be a way to process code on logout, but there is a way to run code on game exit.
This warrants further investigation, not even so much for this feature.
On quit the current player inventory, armour slots, and safe1 and safe2 should be deleted.
This is to prevent people using buildaria to create a new character, stack their inventory with the overstacking items, then quit/save and then go onto join a multiplayer server with normal terraira/otherwise with the character.