The tilemapcreator script keeps growing in size, and it's getting hard to manage. This PR splits the tilemapcreator script into a bunch of scripts with specific roles regarding handling the tilemap menu and it's functionnalities. There was some renaming and a lot of doc added as well. It should not change anything regarding the present functionnalities of the menu.
The tilemap creator script (renamed to tilemap menu) is divided into the following scripts :
Construction hologram : class representing a construction hologram and storing data about it.
ConstructionHologram manager : Class for managing ghost objects, that will be used for building or deleting by TileMapCreator. It handles creating construction holograms, replacing, adding or deleting tile objects and items upon placement, and placing the holograms in cool shapes like lines and squares.
TileMap menu : This scripts orchestrate a bunch of other scripts related to making the menu work.
TileMapMenuSaveAndLoadTabs : Handle the UI and logic related to saving and loading maps in the tilemap menu.
TileMapMenuBuildingTabs : Handle the UI and displaying everything related to the tilemap menu building part.
TileMapMenuSaveAndLoadTabs is pretty empty currently but not for long !
PR checklist
[x] The game builds properly without errors.
[x] No unrelated changes are present.
[x] No "trash" files are committed.
[x] Relevant code is documented.
[ ] Update the related GitBook document, or create a new one if needed.
Pictures/Videos)
Testing
Networking checklist
[x] Works from host in host mode.
[x] Works from server in server mode.
[x] Works on server in client mode.
[x] Works and is syncronized across different clients.
[x] Is persistent.
Changes
I had to fix a bunch of stuff related to asset databases because of a few merges. It's throwing an exception regarding item id (with no gameplay consequences) , I got a fix for that but it's already in "add toolbelt PR". Sorry the PR is a bit messy but can't do more, I've no idea how the body part assets were working before, as they were somehow referenced by two addressable groups which should not be possible. As discussed in #1349 , solution is to have a unique asset database for game objects.
Summary
The tilemapcreator script keeps growing in size, and it's getting hard to manage. This PR splits the tilemapcreator script into a bunch of scripts with specific roles regarding handling the tilemap menu and it's functionnalities. There was some renaming and a lot of doc added as well. It should not change anything regarding the present functionnalities of the menu.
The tilemap creator script (renamed to tilemap menu) is divided into the following scripts :
TileMapMenuSaveAndLoadTabs is pretty empty currently but not for long !
PR checklist
Pictures/Videos)
Testing
Networking checklist
Changes
I had to fix a bunch of stuff related to asset databases because of a few merges. It's throwing an exception regarding item id (with no gameplay consequences) , I got a fix for that but it's already in "add toolbelt PR". Sorry the PR is a bit messy but can't do more, I've no idea how the body part assets were working before, as they were somehow referenced by two addressable groups which should not be possible. As discussed in #1349 , solution is to have a unique asset database for game objects.
Related issues/PRs
TODO