branchrust_reboot/main/buildingerrors_improvementscancel
46 Commits over 31 Days - 0.06cph!
Fixed RPC error when assigning a bag to a disconnected player who has already reached their bag limit
When showing the not enough ressources UI, hide any ongoing error toast and vice versa to avoid overlapping
errortoasts_debug is now saved to ClientInfo so we can get it server side when logging construction debug from the server
Reverted my last change about the sleeping bag error
Check if the player sending the RPC has streamer mode enabled and edit any player name if yes
Fixed player names being leaked by the Blocked by player {0} errors when in streamer mode
Phrase tweak:
from: You cannot assign {0} a bag, they have reached their bag limit!
to: You cannot assign a bag to this player, they have reached their bag limit!
So we don't leak player name to clients in streamer mode (this error is server side, can't know if the client use streamer mode before sending)
Let server send game tip on top of any screens to clients, added back the overlay parameter to the showtip command
Server can send construction errors debug logs to client, will show up both in chat and logs if errortoasts_debug is true
Moved the error handling logic out from BasePlayer to GameTip
Fixed upgrade blocked errors not detecting sleeping players client-side, the server will send the toast to the player now
Fixed server side errors not being translated by the client when received
GameTIp error refactoring
Pulled the overlay parameter out of the command and added GameTip.SetAsOverlay instead
Removed ShowErrorToast, we now use ShowToast(GameTip.Styles.Error, ...)
Updated all occurences
Added an error when trying to upgrade a recently damage block: "Recently damaged, upgradable in {0} seconds"
When deploying on a door, check if the current target has a socket before rejecting (fixes door controller not deployable on door since 101954)
"Blocked by ore" when placing on ores
"Blocked by debris" when placing on debris
Renamed HAB repair dummy item name to display "Blocked by Hot Air Balloon" error messages
Fixed various NRE when deploying items on non-entity world prefabs
Show "Blocked by tree" when blocked by a tree
Better rotation and demolish blocked errors
Grade upgrade message order
When trying to upgrade a blocked building block, close the pie menu and pop a toast with the reason
Disabled pie menu options can now run an action when clicked
Client-side "Can't deploy on door!" check so the deploy guide doesn't turn blue on doors
Minor toast error fixes
"Skin not owned" error when trying to skin a block with a skin you don't own
Should not happen in normal situations but I was tired of being confused by this in the editor
Replaced "Too close from another building" error message for "Too close to X"
Briefly highlight the block in question when showing the error message
https://files.facepunch.com/Flavien/WvU4h1yNwGLGDinf.mp4
Better fail message when trying to place a high wall while moving
Added the name of the entity blocking a building block upgrade
Localized the other missing strings in the hammer pie menu
Show "Blocked by X" when blocked by a building block
Failed SphereCheck and AreaCheck will now show "Not stable enough" by default instead of "Not enough space"
BuildingProximity error messages localized
Updated "Placing through walls" error for "Line of sight blocked"
NPC localization compile fix
Updated helis dummy repair item names so we can display accurate building errors
Added new "Blocked by X" building errors for players, horses, modular cars and scientist npcs
Localized NPC names
Adjusted AreaCheck and SphereCheck socket mods default messages
Added detailed fail messages and/or re-order priorities on a few item prefabs
- Tool cupboard
- Water pump
- Drone
- Fish trap
- Floor spikes
- Gravestones
- All seeds
Added a setting for errror toasts to be displayed on top of everything, so they can be seen when the in inventory and other menus
Set a few of them to show on top
More error messages localized and toasted: legacy deployer, vending machines, spraycan, inventory
Vehicle locked/unlocked messages localized and toasted
Player inventory, storage containers and player belt fail messages localized and toasted
Minor socket mods fail messages tweaks
Localized and toasted repair failed errors
Refactored and renamed a bunch of stuff so we can use these toasts for any type of gameplay errors (building, item movement, etc)
Localized server side building errors
Moved them out from the chat to the new toast UI
Added the name of the entity blocking placement in the case of a prevent building volume "Cannot build in this area" -> "Blocked by X"
Added a new message for deployable that need to be placed on water
Localized the rest of the building error messages
Refactored socket mods error messages, added new messages and localized the hardcoded ones
Initial work on better building error messages
- Created a new toast type for building errors, more responsive and quicker to hide
- Moved them from the chat to UI toasts (added a new convar)
- Moved the building error code into its own file