5,163 Commits over 1,492 Days - 0.14cph!
merge from prototype -> apartment_complex_monument
Fix the second safezone check inside Hurt() blocking damage when inside apartment room
- the check that prevents players inside a safezone damaging players outside a safezone
- this should be handled inside the first safezone damage check
Make the safezone checks in OnAttacked() only run on the server in CLIENT + SERVER mode (as it's confusing when it runs on client entity but coincidentally does nothing)
Fix players being marked as hostile the second they leave their apartment room because the timer for holding their weapon was counting up inside the room
Fix TriggerSafeZoneOverride not being partial
Add `clearhostile` command to reset your hostile timer
- refactor `MarkHostileFor()` by adding `SetHostileDuration()` so I can clear hostile time instead of only adding onto hostile time
Allow players to hold their weapon inside their apartment room
Fix vitals showing both safezone & combatzone after changing CombatZone to a flag
Don't show "you must put away your weapon" when inside your room
Make it impossible to be marked hostile when inside your apartment room (combat, shooting, whatever)
Also allow looting the bodybag corpses too inside the rooms
Allow looting player corpses inside apartment rooms too
Allow combat damage explicitly between two people inside the same room / hostile trigger
Change approach to allowing combat inside the safezone
- still consider them inside a safezone regardless where they are in the apartment monument
- only whitelist actions we care about + filtering to be safer than fully disabling safezone serverside completely
merge from prototype -> apartment_complex_monument
Get rid of autoclosing when owner opens their door, I thought it would be better but it's so annoying
- you will remember to close your doors behind you once you live in the apartments for a bit
Switch to having combat zone driven by a player flag instead
- was akward having the server metabolism driving the safezone flag but the client using the hostile zone triggers
- wasn't syncing properly when leaving the hostile area and entering safezone again because the server would wait up to 2 seconds to tell you were in a safezone again so you wouldn't see safezone or combatzone vital
Fix hostile zone trigger not being a trigger
Show "Combat Zone" vital instead of "Safe Zone" when inside your room so it's clear you can take damage
Fix NRE when selecting the security guard conversation option
- either by updating phrases or by changing the code, unsure which
Move security guard room from the damaged wing -> basement apartments (so it's easier to find)
merge from prototype -> apartment_complex_monument
Override safezone behavior with the new TriggerSafeZoneOverride, returning "not in a safezone" if they are inside a safezone trigger & non-safezone trigger at the same time
Add TriggerSafezoneOverride to all the apartment prefabs
Create SafeZoneOverride trigger
- allows damage inside a set area in a safezone
Fix "rent due" vitals after merge
update apartment_complex_monument/prototype
merge from main -> apartment_complex_monument
merge from main -> apartment_complex_monument
Add `checkoutallrooms` to allow you to undo the `rentallrooms` command
Autoclose apartment doors when owners open & close them too
update apartment_complex_monument/prototype
Fix elevator floor numbers also only being sent to clients but not persisted across server restarts
Change elevator icons from Lobby -> Floor 0 and Basement -> Floor -1 (US vs EU I think)
Add icons for floor 0 & floor -1
merge from prototype -> apartment_complex_monument
Remove notepad panel from apartment key (leftover from door key) and set apartment key to prefer hotbar
Add code support for items to prefer hotbar even if they aren't equippable or consumables (so the apartment key can prioritize hotbar for now)
Fix master key not working after server restart
- actually caused by the apartment door -> room reference not being loaded after server save (was only loaded on client)
Don't grey out the floor you are currently one once the elevators close, as this requires you to go down & up if you don't get out of the elevator within 10s
merge from prototype -> apartment_complex_monument
Tweak apartment vendor conversation
- update phrases
- fix fail to purchase apartment dialogs not hooked up
Clear furniture inside apartment inside PreProcess so it's can't double add furniture spawns in future if preprocess is ran before builds
Fix apartment furniture not spawning in the correct position when renting a room after server restart
- caused by calculating localPosition manually instead of using transform.TransformPoint() which takes into account rotation of the apartment room
Fix apartment room not sending network update when being rented causing static furniture to not show