tonihele / OpenKeeper

Dungeon Keeper II remake
GNU General Public License v3.0
434 stars 41 forks source link

Implement the room tooltips #335

Open tonihele opened 5 years ago

tonihele commented 5 years ago

Implement the room tooltips. These were also lost with the new design. I don't have the exact design specs for this. At some point I was toying with the idea that map tiles & rooms could be entities in the entity system. This would make them similar to other objects to handle. Also this would allow the room controllers to put these variables needed by the tooltips to their components (such as capacities, usages...). These are very helpful to to player and for devs.

tonihele commented 1 month ago

Note that i.e. HeroGateThreeByOneConstructor NPEs in the current design. The view map creator doesn't have any knowledge about Things. These are things the server knows, we should relay this information in room entities.

java.lang.NullPointerException: Cannot invoke "toniarts.openkeeper.tools.convert.map.Thing$Room$Direction.ordinal()" because the return value of "toniarts.openkeeper.common.RoomInstance.getDirection()" is null
    at toniarts.openkeeper.view.map.construction.HeroGateThreeByOneConstructor.constructFloor(HeroGateThreeByOneConstructor.java:58)
    at toniarts.openkeeper.view.map.construction.RoomConstructor.construct(RoomConstructor.java:55)
    at toniarts.openkeeper.view.map.MapViewController.handleRoom(MapViewController.java:820)
    at toniarts.openkeeper.view.map.MapViewController.handleRoom(MapViewController.java:569)
    at toniarts.openkeeper.view.map.MapViewController.handleTile(MapViewController.java:478)
    at toniarts.openkeeper.view.map.MapViewController.updateTiles(MapViewController.java:237)
    at toniarts.openkeeper.view.PlayerMapViewState$MapTileContainer.updateObjects(PlayerMapViewState.java:296)
    at com.simsilica.es.EntityContainer.update(EntityContainer.java:211)
    at toniarts.openkeeper.view.PlayerMapViewState.update(PlayerMapViewState.java:172)
    at com.jme3.app.state.AppStateManager.update(AppStateManager.java:371)
    at com.jme3.app.SimpleApplication.update(SimpleApplication.java:258)
    at com.jme3.system.lwjgl.LwjglWindow.runLoop(LwjglWindow.java:628)
    at com.jme3.system.lwjgl.LwjglWindow.run(LwjglWindow.java:717)
    at java.base/java.lang.Thread.run(Thread.java:1583)