8,451 Commits over 2,131 Days - 0.17cph!
Changing carryable picking up to allow for the carrier to take action when pickup occurs. Might change this around a bit more.
Fixed errors being thrown when camera tried to detatch on quit
Had an issue where if you reconnected to a game, you weren't holding anything. Turned out this is what happens on reconnect:
1. OnEntitySpawnMessage. HeldItem entity comes through on its own
2. It's created
3. Deserialize called.
4. SetParent called, but parent is null since it's coming on its own.
5. OnClientInitialize called
6. OnEntitySpawnMessage. HeldItem entity comes through as a child of the user
7. Warning shown that it already exists
8. Deserialize called.
9. SetParent called. *Parent is now set.* We can now call SetItemHolder any time
10. OnClientInitialize _skipped automatically_ in NetworkEntity as it's already been called
To fix I added moved the backup SetItemHolder call in Deserialize to OnPostDeserialize, which is called after SetParent.
Bugfix for NRE on helditems with no item + testmap_smaller edit
A bunch of cleanup/refactoring, and player label colour tints now work correctly
Fixed gang emblems not showing up as well
Increase label distance from 12 to 20
20 was a bit much. Decrease again to 15. +bugfix
Added "fast countdowns" option in the WiseGuysTools window, to speed up testing
Drop carried item on disconnect. Fixes glitching on reconnect.
fastCountdowns mode skips the welcome screen as well
Couple of bug fixes from testing
Had to change label colors to Color32
Starting to look at refactoring interactables.
Building manager now only loads buildings that the map actually uses. Improves loading times around a minimum of 25% (testmap_small, which needs most building types anyway), and removes the need for the loadBuildingDefinitions Tools flag (which was used to make maps with no buildings load faster).
Remove an old time printout
New testmap_smallest. Loads super fast, still has gang buildings but no jail.
Can't select other items anymore while holding a carryable
Update UI immediately on pickup/drop
Simplified, more open gang buildings. Had to rebuild building IDs, hence the extra "changes"
Just starting a branch where I might check out the bugs with loading building definitions as needed. Problem is the building definition, when it loads, often creates stuff that it then later decides to call Destroy on. But Destroy takes one frame. So if you load definitions as needed instead of on startup, the extra stuff is still there when the actual building is spawned and you get extra meshes like bonus floors. Need to either delay things somehow, or make sure all the destroys also set the parent to null to kick stuff out of the heirarchy, or set some sort of invalidating flag.
Revert building manager change as there were bugs, since loading building definitions needed to wait a frame to work properly. Started a branch to maybe look into it.
Revert building manager change as there were bugs, since loading building definitions needed to wait a frame to work properly. Started a branch to maybe look into it.
Changed how IsBusy works with input.
A marker can now be placed in the building editor that determines where the gang safe goes. If there is no marker, the safe will try to find some space on the first floor as before.
Fix error on quit in editor
AI edit, now looks properly for allies.
Fixes, and dropping a carryable now automatically selects whatever's in your current belt slot as well
Adding held interactions.
Testing a new method of item dropping.
Started doing a gang thing but probably going to do it a different way. Committing some half-finished stuff just in case I need it.
Gang icons show on the map, instead of the old pixel art ones. Also removed a whole lot of unused gang stuff - the create gang screen, the emblem editor, the multiple gang buildings and signs (they were all actually the same building/sign anyway). Gangs are now defined in ScriptableObjects with pre-defined icons etc. Less data needs to be serialized since none of it's custom per game.
Can now properly use and hold-use interactables
Some early work on a scoreboard screen