07 Jun, 2006, Aidan wrote in the 1st comment:
Votes: 0
The locker code I promised has been uploaded to the repository and should be available as soon as it's approved.

–Aidan
08 Jun, 2006, Conner wrote in the 2nd comment:
Votes: 0
Looks like it's been approved, and even downloaded twice already. :)
08 Jun, 2006, Aidan wrote in the 3rd comment:
Votes: 0
Yep yep, I looked late last night and it was up. I hope it's mildly useful to everyone. I probably should update my comments in the code a bit more though. :)
08 Jun, 2006, Skol wrote in the 4th comment:
Votes: 0
I was just browsing the code, I didn't see any OLC for making an item a locker. Was it intended as a 'set' or 'flag'? (IE flag obj box locker etc).

Essentially, I didn't see any way to attach it (not that I couldn't hammer it out, I was just curious if it was missing part).
08 Jun, 2006, Aidan wrote in the 5th comment:
Votes: 0
You dont. You make a room flag called ROOM_LOCKER and flag the room. It'll then save every item in the room to file and re-load them when the game reboots, provided it's not on a reset.
08 Jun, 2006, Hades_Kane wrote in the 6th comment:
Votes: 0
Oh, that's pretty neat… I might look into installing this. It would be a GREAT addition to player houses as that would really be one thing that would be worth buying them for alone.

I think perhaps a locker item type might would a bit better in limiting the amount of items a person can save through a reboot/crash etc, unless this code does it somewhere and I'm missing it. Maybe I'll look into modifying it into an object if someone else doesn't beat me to it. Even still, I'm probably not experienced enough to figure that out yet, though :p
08 Jun, 2006, Aidan wrote in the 7th comment:
Votes: 0
My original version of this had a count. It would be really easy to add in.

bool saveObj = TRUE;

run obj loop
count++;

if(count > MAX_ALLOWED_SAVED)
saveObj = FALSE;

if(saveObj)
fwrite_locker_obj(LockerFile);

-Aidan
09 Jun, 2006, Midboss wrote in the 8th comment:
Votes: 0
Yeah, I can't imagine it'd take anyone long to get that working right. Though, I would add a check for your locker size in do_quit, to warn a player before logging out if they have an item that won't be saved.

Wait, this is for rooms, isn't it? Either way, I'd have a warning. Personally, my MUD will probably wind up with an account system that stores one 'inventory' for all of your characters, but lets each individual character carry a maximum of 32 items on their person. Something like Dragon Quest/Dragon Warrior.
09 Jun, 2006, Skol wrote in the 9th comment:
Votes: 0
You dont. You make a room flag called ROOM_LOCKER and flag the room. It'll then save every item in the room to file and re-load them when the game reboots, provided it's not on a reset.

Ahh, I see that now, hadn't looked for that. Most locker codes I "d seen were of the container variety. Very interesting!

Maybe an addendum to the file, a 'help locker' type thing? I know people putting it in could write one up, but it might save a few 'genius' questions like mine earlier heheh. ;)
09 Jun, 2006, Aidan wrote in the 10th comment:
Votes: 0
Actually that's a great idea Skol. What I'll do is write up a quick spliff on that stuff and put in the options for limiting items allowed to be saved in a room, etc, etc, etc with directions on how to change it. :)

-Aidan
09 Jun, 2006, Hades_Kane wrote in the 11th comment:
Votes: 0
That'd be great. Will you update us on when you've done that?
09 Jun, 2006, Aidan wrote in the 12th comment:
Votes: 0
Yep yep :)
09 Jun, 2006, Aidan wrote in the 13th comment:
Votes: 0
New locker code has been uploaded. Hope it's a bit easier to understand. I didn't compile it, so it should work, but there may be a few typo's in the code. Easily fixed, but I'm using a custom version of the code on my own game.

-Aidan
09 Jun, 2006, Hades_Kane wrote in the 14th comment:
Votes: 0
Thanks :)

Much appreciated.
09 Jun, 2006, Aidan wrote in the 15th comment:
Votes: 0
Yeppers, I hope it's a bit easier than the previous version. I had to handle the object looping a different way though.
0.0/15