5,185 Commits over 1,492 Days - 0.14cph!
Update vendor conversation
Fix remaining rooms not updating when using rentallrooms
Add CanAffordApartment and CanAffordUpgrade conditions so we can get rid of hardcoded HasScrap sprinkled in conversations that are a pain to update when changing apartment prices
- change all the conditions in the conversation too
Fix remaining rooms left not being loaded on the client after network update
Update vendor conversation
Also interpolate the dialog options (so you can see how many of each room are left when selecting a room)
Switch ApartmentConversationSize -> ApartmentSize so conversations and apartment logic use the same enum
- this leaves the "Any" option of ApartmentSize only used for conversations but that seems better than the trap of needing to make sure both enums have the same values
Add "OwnsApartment" conversation condition so allow separate conversation options for upgrading from small -> penthouse and medium -> penthouse
- I think originally I was going to do this all in code but never hooked up different conditions
Update conversation with new phrases but it keeps deleting some of the failed speech nodes
Add the interpolation to the ApartmentVendor & SyncVar the ApartmentBuilding to it so it can apply prices to conversation
Add support for simple conversation interpolation
- only for apartment vendor to interpolate special values like {small_cost} (not the ability for the server to send generic values and interpolate with {0} yet)
Assign costs in apartments prefabs and lower to sane values (STILL PLACEHOLDER)
Scrap
- Basement = 100 purchase, 25 upkeep
- Standard = 200 purchase, 50 upkeep
- Penthouse = 400 purchase, 100 upkeep
Update apartment building manager to reference apartment room prefabs
Store the purchase cost inside the apartment prefab instead of in the building manager because it's confusing to configure the rent in the apartments but the purchase cost elsewhere
Fix upgrading apartments not taking scrap from the player
- automatically calculate the difference in cost based on the apartment chosen (rather than hardcoding upgrade costs)
Re-add teleporting players into their rooms instead of killing them after being offline for 20m in the safezone because it got stomped?
Change breakinseconds from 10s -> 30s
- fix convar being a ServerVar instead of a ReplicatedVar
- fix MenuOption not reading the replicated convar
update apartment_complex_monument/prototype
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
Add comment explaining why ManuallyCheckSafezone() was added years ago
Allow non-player damage through like normal safezones (thirst, hunger, fall, etc)
Allow players to be looted inside the 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