Hide or spawn items depending on game state of player
We should provide functionality for…
-
hiding items on the map if owned_max is reached -
spawning items only if the player has a specified attribute set. This should be defined by a dictionary names spawn_player_attributes in the item implementation in the game
Implementation details:
Make isonmap (in GameObject) a property method instead of a column. Make it return True in GameObject, and override it in Item. In Item, make it…
- return False if the item is held by a player,
- return False if owned_max is reached for the current player,
- return True otherwise
Do not forget to add the new isonmap to include_methods of the API endpoint.
This is for the first task item; the second one needs to be drafted.