Commit Graph

10 Commits

Author SHA1 Message Date
Perry Fraser e3e6867491 fix: clear health bar/icon overlay damage containers on update (#39288)
* fix: clear health overlay damage containers on update

* linqn't

* import

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2026-04-04 16:57:24 +02:00
Hannah Giovanna Dawson bd98b9212b Update DamageableSystem to modern standards (#39417)
* Update DamageableSystem to modern standards

* DamageContainerId -> DamageContainerID with lint flag

* Replace strings with protoids

* Make CVar subscription declarations all consistently whitespaced

* ChangeDamage -> TryChangeDamage, cope with C# jank

* Revert event signature changes

* Restore a comment

* Re-add two queries

* Init the queries

* Use appearanceQuery in DamageChanged

* Use damageableQuery in TryChangeDamage

* Use damageableQuery in SetDamageModifierSetId

* Final cleanup, fix sandboxing

* Rectify ExplosionSystem:::ProcessEntity's call to TryChangeDamage

* Re-organize DamageableSystem

* first big fuck you breaking change.

* THATS A LOT OF DAMAGE!!!

* Fix test fails

* test fixes 2

* push it

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-12-29 11:39:33 -06:00
Pieter-Jan Briers b7f297f612 Fix usages of TryIndex() (#39124)
* Fix usages of TryIndex()

Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)

This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)

This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.

Fixes #39115

Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.

* fix tests

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-12-29 11:39:03 -06:00
Sir Warock 51a3862c6b
Remove Alive Icon (#1252) (#4317)
* Remove Alive Icon (#1252)

<!-- Guidelines:
https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- NOTE: All code submitted to this repository is ALWAYS licensed
under the AGPL-3.0-or-later license.
The REUSE Specification headers or separate .license files indicate a
secondary license (e.g., MPL or MIT) solely to facilitate
integration for projects that do not use the AGPL license. This
secondary license does not replace the fact that AGPL-3.0-or-later
remains the primary and binding license.
Uncomment and modify the following line if you wish to change the
license from the default of AGPL.-->
<!--- LICENSE: AGPL -->
<!-- What did you change? -->
I removed the alive Icon from the Medical HUD.
<!-- Discuss how this would affect game balance or explain why it was
changed. Link any relevant discussions or issues. -->
It blocked vision on speech bubbles and is entirely unnecessary.
Is the entity moving? Probably alive.
Does it not have a dead or critical icon? Probably alive.
We don't need an Icon that blocks the speech bubble to tell us this.
<!-- Summary of code changes for easier review. -->
Added a boolean to not give the icon if an entity is alvie.
Removed the Mob.Alive state from the icon finder table thing.
<!-- Attach media if the PR makes ingame changes (clothing, items,
features, etc).
Small fixes/refactors are exempt. Media may be used in SS14 progress
reports with credit. -->
<img width="89" height="95" alt="grafik"
src="https://github.com/user-attachments/assets/ef9308be-276b-440b-95d4-fddcaece32b9"
/>

<!-- Confirm the following by placing an X in the brackets [X]: -->
- [X] I have read and am following the [Pull Request and Changelog
Guidelines](https://docs.spacestation14.com/en/general-development/codebase-info/pull-request-guidelines.html).
- [X] I have added media to this PR or it does not require an ingame
showcase.
- [X] I can confirm this PR contains no AI-generated content, and did
not use any AI-generated content.
<!-- You should understand that not following the above may get your PR
closed at maintainer’s discretion -->

<!-- List any breaking changes, including namespaces, public
class/method/field changes, prototype renames; and provide instructions
for fixing them.
This will be posted in #codebase-changes. -->

**Changelog**
<!-- Add a Changelog entry to make players aware of new features or
changes that could affect gameplay.
Make sure to read the guidelines and take this Changelog template out of
the comment block in order for it to show up.
Changelog must have a 🆑 symbol, so the bot recognizes the changes and
adds them to the game's changelog. -->

🆑
- remove: Removed the alive Icon - You can finally see if someone is
typing an answer.

---------

Co-authored-by: TheDen-Bot <186991657+TheDen-Bot@users.noreply.github.com>

* Fixes

* Actually correct Comment

---------

Co-authored-by: TheDen-Bot <186991657+TheDen-Bot@users.noreply.github.com>
2025-09-08 21:48:34 +02:00
Milon 90c51a59a0 make RefreshOverlay default to the player session (#32354) 2025-02-14 16:09:48 +00:00
Pieter-Jan Briers 4aecc673ae Borg type switching. (#32586)
* Borg type switching.

This allows borgs (new spawn or constructed) to select their chassis type on creation, like in SS13. This removes the need for the many different chassis types, and means round-start borgs can actually play the game immediately instead of waiting for science to unlock everything.

New borgs have an additional action that allows them to select their type. This opens a nice window with basic information about the borgs and a select button. Once a type has been selected it is permanent for that borg chassis.

These borg types also immediately start the borg with specific modules, so they do not need to be printed. Additional modules can still be inserted for upgrades, though this is now less critical. The built-in modules cannot be removed, but are shown in the UI.

The modules that each borg type starts with:

* Generic: tools
* Engineering: advanced tools, construction, RCD, cable
* Salvage: Grappling gun, appraisal, mining
* Janitor: cleaning, light replacer
* Medical: treatment
* Service: music, service, clowning

Specialized borgs have 3 additional module slots available on top of the ones listed above, generic borgs have 5.

Borg types are specified in a new BorgTypePrototype. These prototypes specify all information about the borg type. It is assigned to the borg entity through a mix of client side, server, and shared code. Some of the involved components were made networked, others are just ensured they're set on both sides of the wire.

The most gnarly change is the inventory template prototype, which needs to change purely to modify the borg hat offset. I managed to bodge this in with an API that *probably* won't explode for specifically for this use case, but it's still not the most clean of API designs.

Parts for specific borg chassis have been removed (so much deleted YAML) and specialized borg modules that are in the base set of a type have been removed from the exosuit fab as there's no point to printing those.

The ability to "downgrade" a borg so it can select a new chassis, like in SS13, is something that would be nice, but was not high enough priority for me to block the feature on. I did keep it in mind with some of the code, so it may be possible in the future.

There is no fancy animation when selecting borg types like in SS13, because I didn't think it was high priority, and it would add a lot of complex code.

* Fix sandbox failure due to collection expression.

* Module tweak

Fix salvage borg modules still having research/lathe recipes

Engie borg has regular tool module, not advanced.

* Fix inventory system breakage

* Fix migrations

Some things were missing

* Guidebook rewordings & review

* MinWidth on confirm selection button
2024-11-15 19:35:37 +00:00
slarticodefast f6a850476c Add tooltips to the agent ID job icons and improve status icon prototypes (#28575)
* add tooltips to agentid job icons

* forgot to stage this

* make StatusIconPrototype abstract

* minor visual improvements

* cleanup

* use currentculture to sort job names

* review
2024-08-09 19:17:05 +01:00
AJCM-git 426896a432
Cleans up StatusIconSystem and fixing some bugs (#28270) 2024-06-08 19:59:10 +02:00
DoutorWhite 2db74bd7c5
Improves Medical Hud interface and functionality (#26027)
* Improvements to the medical hud interface

* Adds an icon for SSD players

* Indentation fix

* Update sprites, changes direction and adds new status icon.

* Adds decomposing icon

* Code cleaning

* Changes Crit Icon sprite

* Simplifies the decision structure

* Changes copyright line

* Changes Critical Icon sprite

* Makes the Critical Icon border darker

* Changes sprites to /tg/ station

* Updates copyright

* Makes Dead Icon animation slight faster

* Code cleaning

* Remove some unused imports

* Code cleaning and rename icon

* Minor code cleaning

(cherry picked from commit 8d40bc36a93d3d5c6d3ece6c662ac9747f7837ae)
2024-03-23 23:56:19 +01:00
PrPleGoo eec22b4b9d
Add health bar overlays for eye equipment (#21980)
* PR 1

* fix an error with health bar overlay (#1292)

* Revert "Revert "Replace `ResourcePath` with `ResPath` (#15308)" (#155… (#15566)

* [1612] change ShowHealthBarsComponent's DamageContainer field to a list (#1662)

* fix build

* no crit entities from not updating

* cleanup

* namespace

* undu irrelevant changes

* undo icon change

* make health bar 1 px taller and icon 1 px shorter

* fix medibot

* fix comment

* don't show health bar ratio when in crit

* fix build

* put the crit bar back

* don't render healthbars for mobs that are in containers

* draw more boxes without the background sprite

* fine status icon for all bio mobs

* add wacky mandatory things

* attempt 2

* whoops wrong file

* cool, this works too

* move null check to top

* only 1 init

* security huds

* remove shader

* fix build after cleanup

* slight cleanup

* little more cleanup

* Remove clothing grant component system

* security HUD now shows a job icon on entities with a body

* remove sec stuff and do similar changes to split off PR + remove unused comp

* process comments

* don't return

* update to ComponentAddedOverlaySystemBase

* no cache

* colors and not rendering out of sight

* touch ups

* fix build & cleanup

* undo

* remove shader from icons

* process comments

* documentation

* fix licence

* validate prototype id

* just use args

* rename method and append in method

* type

* just fucken delete the command

* space

* undo

* remove

* don't use LocalPlayer

* re-add showhealthbars command, but working

* rename icon lists and conform health icon code to the others

* space

* undo

* update command

* oops

---------

Co-authored-by: Rane <60792108+Elijahrane@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

(cherry picked from commit eed663e8b4d91ee772ccb54fc8a55e4c4afdcd64)
2024-01-26 21:39:17 +01:00