branchrust_reboot/main/high_wall_upkeepcancel
16 Commits over 0 Days - Infinitycph!
Fix high walls that are connected to a building block without a TC not updating when the building block is destroyed
- update during decay if the TC is destroyed or doesn't match their existing building
- this could have happened with other deployables like shotgun traps but didn't really because it was only 1.5m range, not 16m range
Add "drawnearbybuildings <duration> <radius>" to show what building decay entities belong to
Add "forcedecaytick" to force every decay entity on the server to run it's decay tick (to see if walls will reconnect to a building when decay is ran)
Add ability to manually run decay ticks and bypass the "once per 10m limit"
Prevent divide by zero if the CraftAmount of a high wall blueprint is zero (don't think it's possible but best to be safe)
Fix compile error by making high_wall_upkeep replicated (even though I don't think it needs to be all the code using it can run on the client)
Fix sqrDistance still being calculated for high walls despite not being used
Switch high walls to look for oldest building block (like building priv works) instead of closest block
Move the hardcoded "16m radius" for GetNearestBuildingBlock() and the high wall specific "GetNearbyBuildingBlock" into a shared constant
merge from main -> high_wall_upkeep
Add upkeep component to the legacy & ice high walls
Move the upkeep multiplier selector (building percentage vs high wall convar) upwards into BuildingPrivlidge.Upkeep.cs
- fixes deltaTime being overwritten by the convar instead of swapping the convar <-> "20% upkeep" shown in TC
merge from main -> high_wall_upkeep
Add the upkeep component to both high walls and gates
thumb_up
17
thumb_down
14
Add support for the "Upkeep" component to tick a bool if it's a high wall
- will then use the convar for it's multiplier instead of the base's upkeep multiplier (based on size)
Add `high_wall_upkeep` convar to control what the upkeep of high walls will be
- set to static value because high wall upkeep would be too low near single TCs and too high near big bases
Refactor BuildCost() so it returns a struct that contains the cost & how many items are produced each craft
- allows us to divide the upkeep for high walls by 3x because we craft 3x per craft