On Sat, Mar 09, 2013 at 03:09:54AM +1300, Ralph Versteegen wrote: > On 8 March 2013 09:46, <[email protected]> wrote: > > james > > 2013-03-07 12:46:26 -0800 (Thu, 07 Mar 2013) > > 363 > > Fix broken shop stock limits. > > resetgame was defaulting stock to -1 "infinite" instead of 0 "unloaded" > > Also changed the default for a missing stock node in the RSAV file > > (Warning: this means that for any existing savegames, > > a shop that has aquired an item when you sold it a copy because > > it had "Selltype: Acquire" will have that item's stock reset to defaults) > > --- > > U wip/moresubs.bas > > U wip/savegame.rbas > > Ah ha. So this has been broken since Zenzizenzic then. > > This is the first time I've ever looked into how shop stock works. I > never knew about the load-on-first-use scheme. So it allows adding new > items to shops without breaking saves. Maybe I can do even better than > that for live-previewing. > > But I don't seem to totally understand this bug. Since all of stock() > defaulted to -1/infinite, doesn't that mean that stock amount was > never loaded from .STF, and all items in all shops should have > infinite stock? But stock did sometimes work (for example the shop in > testgame.rpg).
As far as I could tell, the situation where shop stock limits worked correctly was only when you loaded from a save-game created before the bug existed. Were you testing testgame.rpg with a loaded save? > You forgot to mention the fix in whatsnew. Oh, yeah, I better. I had not realized how old this bug was, and was thinking it was a post-alectormancy nightly problem. --- James _______________________________________________ Ohrrpgce mailing list [email protected] http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
