WIZKIT inventory overflow (trunk only)
Wizard mode's $WIZKIT can specify an unlimited number of items to add to starting inventory and they'd be put there without regard to the number of slots in use, potentially resulting in an arbitrary number of '#' slot items. Cap at 52 slots, same as when picking up, and put any excess items at the hero's feet. It's slightly tricky because the level hasn't been created yet at the time the wizkit gets processed.
This commit is contained in:
@@ -524,14 +524,12 @@ newgame()
|
||||
|
||||
mklev();
|
||||
u_on_upstairs();
|
||||
#ifdef WIZARD
|
||||
if (wizard) obj_delivery(FALSE); /* finish wizkit */
|
||||
#endif
|
||||
vision_reset(); /* set up internals for level (after mklev) */
|
||||
check_special_room(FALSE);
|
||||
|
||||
|
||||
/* Move the monster from under you or else
|
||||
* makedog() will fail when it calls makemon().
|
||||
* - ucsfcgl!kneller
|
||||
*/
|
||||
if(MON_AT(u.ux, u.uy)) mnexto(m_at(u.ux, u.uy));
|
||||
(void) makedog();
|
||||
docrt();
|
||||
|
||||
Reference in New Issue
Block a user