Open patrickcarlohickman opened 9 years ago
Actually there is a way to handle items which can no longer be built. You set enabled property to false. This way game creates class but doesn't put on market dialog. So 'for now' best way to handle changes on catalog is to create completely a new item and set old one's enabled property to false. But in general I agree that game code needs some improvements including this part.
Great we'll do that for now. :)
On Wed, Mar 25, 2015 at 8:56 AM, umutnacak notifications@github.com wrote:
Actually there is a way to handle items which can no longer be built. You set enabled property to false. This way game creates class but doesn't put on market dialog. So 'for now' best way to handle changes on catalog is to create completely a new item and set old one's enabled property to false. But in general I agree that game code needs some improvements including this part.
— Reply to this email directly or view it on GitHub https://github.com/darian311/VillageMakeover/issues/17#issuecomment-86012855 .
Darian Hickman | (310) 439-8573 | http://www.linkedin.com/in/darianhickman
The first time I played I built a "Sweing Room". The typo for this item has been fixed, so now the "Sweing Room" doesn't exist anymore, but the object with that name is still stored in my state. This is leading to a failure in
API.firstReloadState()
->ClientHelpers.addObject()
->new ige.newClassInstance("Sweing Room");
, which is keeping the game state from fully initializing.While this was caused by a bugfix, in the future you may have temporary promotional items which come and go, or an update that completely wipes out an old item. A completely invalid item should fail gracefully, but, if there isn't already, there should be a way to handle items that are valid on the game board, but which can no longer be built.