Commit Graph

141 Commits

Author SHA1 Message Date
Hannah Giovanna Dawson
cdbe92d37d 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-10-27 19:53:04 +00:00
psykana
4b24d2959e Internals: prioritize gas tanks over jetpacks (#35068)
* Internals: prioritize gas tanks over jetpacks

* Use HasComp
2025-10-26 15:36:36 +00:00
āda
48e2b2d263 Delete FoodComponent, migrate prototypes to EdibleComponent (#41070)
* yml

* yml fixes

* cs

* document regression

* comment

* organs fix

* diona consistency

* push

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-10-24 18:32:14 +00:00
Fildrance
22fe5185a3 refactor: new overload for SharedRandomExtensions.HashCodeCombine (#40990)
* refactor: new overload for SharedRandomExtensions.HashCodeCombine

* Update Content.Shared/Random/Helpers/SharedRandomExtensions.cs

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-19 21:29:31 +00:00
Princess Cheeseballs
4059c29ebc Entity effects ECS refactor (#40580)
* LOCKED THE FUCK IN

* Forgot this little fella

* Crying

* All entity effects ported, needs cleanup still

* Commit

* HEHEHEHAW

* Shelve for now

* fixe

* Big

* First big chunk of changes

* Big if true

* Commit

* IT BUILDS!!!

* Fix LINTER fails

* Cleanup

* Scale working, cut down on some evil code

* Delete old Entity Effects

* Accidentally breaking shit by fixing bugs

* Fix a bunch of effects not working

* Fix reagent thresholds

* Update damage

* Wait don't change the gas metabolisms A

* Cleanup

* more fixes

* Eh

* Misc fixes and jank

* Remove two things, add bullshit, change condition to inverted

* Remove unused "Shared" system structure

* Namespace fix

* merge conflicts/cleanup

* More fixes

* Guidebook text begins

* Shelve

* Push

* More shit to push

* Fix

* Fix merg conflicts

* BLOOD FOR THE BLOOD GOD!!!

* Mild cleanup and lists

* Fix localization and comments

* Shuffle localization around a bit.

* All done?

* Nearly everything

* Is this the end?

* Whoops forgot to remove that TODO

* Get rid of some warnings for good measure...

* It's done

* Should make those virtual in case we want to override them tbqh...

* Update Content.Shared/EntityEffects/Effects/Botany/PlantAttributes/PlantDestroySeeds.cs

Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com>

* Fix test fails real

* Add to codeowners

* Documentation to everything

* Forgot to push whoops

* Standardize Condition names

* Fix up metabolism a little as a treat

* review

* add IsServer checks

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: Pok <113675512+Pok27@users.noreply.github.com>
2025-10-12 21:23:42 +00:00
thetuerk
bb3fa43f1f Predict LungSystem (#40729)
* Initial edits of files
Untested yet. I would like to make sure all is accounted for before moving the files.

* trying my best

* Revert "trying my best"

This reverts commit 9aeece466df0169adec97e3947b061b54fd9b388.

* Revert "Initial edits of files"

This reverts commit 45c6e2343844b5fcafadbf2e5115fb2f241086a1.

* an actual meal

* Added networking to LungComponent.cs

* removed duplicate using

* moving GasRagents to SharedAtmosphereSystem.cs
2025-10-09 10:26:21 +00:00
Kyle Tyo
1d827754c9 Move BrainSystem and necessary components to Shared (#40499)
* yowza

* Update Content.Shared/Body/Systems/BrainSystem.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Ghost/GhostOnMoveComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update BrainSystem.cs

* Update Content.Shared/Body/Systems/BrainSystem.cs

* Update Content.Shared/Body/Systems/BrainSystem.cs

* Update Content.Shared/Body/Systems/BrainSystem.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-07 13:10:21 +00:00
Pieter-Jan Briers
0c97520276 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-09-09 18:17:56 +02:00
Princess Cheeseballs
d488ca96b2 Alerts Cleanup and API (#39544)
* alert cleanup and API

* I expect update loops to be at the top.

* Address review

* Address review x 2

* Merg my PR

* Fix

* Update Content.Shared/Alert/AlertsSystem.cs

webedit

Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com>

* FIX THAT TEST FAIL!!!!

* Me when I forget to actually give you alerts

* Hammedborgar

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: Perry Fraser <perryprog@users.noreply.github.com>
2025-09-05 12:45:48 +03:00
TheFlyingSentry
3d0573e7c8 Added Hemophilia Trait (#38224)
Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-21 03:02:54 +02:00
Princess Cheeseballs
6b73d320b9 [NEW STATUS SYSTEM] Drunkenness, Stuttering, Slurred Speech, and Bloodloss (#38678)
* The only commit that matters

* I had to stop playing with my cat to push this change

* Yaml removal

* Proper drunk status effect and remove shitcode

* Review changes

* whoops

* Whoops x2

* Update master fix merge conflicts

* Fix merge conflicts

* Dunk Component kill

* MORE RELAYS

* Holy fucking breaking changes

* Ough

* 46 file diff

* Fix bad commits

* Erm what the test fail?

* Fix those last two

* Merge conflicts

* Me when I fix the merge conflicts

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
2025-08-18 16:26:29 -04:00
slarticodefast
22e3d533d3 Catchable items, playable basketball (#37702)
* catching

* fix

* improve

* fix linter

* cleanup

* fix prediction

* do the same here

* fix comment
2025-07-06 09:54:20 -07:00
Nemanja
ab201b6e82 Stasis bed cleanup and bugfixes. (#38762)
* Stasis bed sent to shed

* Code Review

* Code Review 2
2025-07-06 02:59:31 +02:00
slarticodefast
b36aedde6b Cleanup warning in StomachSystem (#38748)
you did not see this
2025-07-04 18:19:31 -04:00
Tayrtahn
f09bade8e7 Validate remaining ProtoId strings (#38747)
Validate remaining ProtoId strings
2025-07-04 22:55:45 +02:00
slarticodefast
38232d2255 Predict healing and bloodstream (#38690)
* initial commit

* reapply 38126

* fix rootable

* someone missed an important minus sign here

* try this

* fix

* fix

* reenable crit hits

* cleanup

* fix status time dirtying

* fix

* camelCase
2025-07-02 19:20:31 -04:00
Tayrtahn
699e6de1fe Fix StomachSystem PVS error (#38268)
Fix StomachSystem PVS error
2025-06-11 23:39:25 +02:00
DrSmugleaf
7f9b2a0434 Fix eating and drinking verbs showing up after a short delay and making your verb UI bounce (#38164)
* Fix eating and drinking verbs showing up after a short delay and making your verb UI bounce

* Usings fix

* Usings fix

* Usings fix

* Usings fix

* CVar fix

* Predicted ppups

* Openable predicted popup

* Fix audio prediction
2025-06-09 10:36:04 -04:00
Ciarán Walsh
d83f393fa4 Use distinct action labels for toggling internals on and off. (#36073)
* Use distinct action labels for toggling internals on and off.

* Implement specific actions for enabling/disabling internals

Avoids potential confusing race conditions where two people might perform the "Toggle Internals On" action an the same person,
which would have jsut toggled twice.

* If no gas tank, will give popup

---------

Co-authored-by: beck-thompson <beck314159@hotmail.com>
2025-06-02 13:09:45 +02:00
metalgearsloth
bd69fc612a Predicted internals (#33800)
* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
2025-05-02 18:22:29 +10:00
Leon Friedrich
e4f3d19094 Make MappingDataNode use string keys (#36111)
* MappingDataNode string keys

* a

* poke
2025-04-18 19:28:22 +10:00
Tayrtahn
86aa82f2b6 Cleanup: Remove redundant prototype name specifications (#35793)
* Remove redundant prototype name specifications

* These can stay
2025-03-19 19:30:31 +01:00
Tayrtahn
6f925dd610 Fix prototypes so they pass analyzer checks (#35435) 2025-02-24 15:21:59 +11:00
slarticodefast
bb2981400c replace all uses of TryGetContainingContainer with non-obsolete overload (#30583)
* replace all uses of TryGetContainerContainer with non-obsolete overload

* rerun
2024-08-04 15:38:53 +10:00
Mervill
af75258601 Remove obsolete code from Food, Drink and Respirator systems. (#30560)
* Remove obsolete code from Food, Drink and Respirator systems

* remove obsolete comment
2024-08-02 17:30:45 +10:00
Plykiya
2a7883b92e Update vomit organ smite to not use Component.owner (#29926)
* Update vomit organ smite to not use Component.owner

* is this what you want...?

* am I winning, dad?

* update the comment

* we love entity<t>

---------

Co-authored-by: plykiya <plykiya@protonmail.com>
2024-07-25 05:24:40 -07:00
Leon Friedrich
6235fa1ac6 Content changes for entity categories PR (#27232)
* Content changes for entity categories PR

* Poke tests

* Why are tests suddenly working?
2024-06-02 14:08:15 +10:00
ShadowCommander
8938e1d8b2 Replace AttachToGridOrMap with DropNextTo (#27950) 2024-05-12 10:30:17 -04:00
KrasnoshchekovPavel
3fcbbc0732 Added localization of groups and types: damage, metabolism (#27368)
* Added localization of groups and types: damage, metabolism (displayed in the guide book). The text for the health analyzer, weapon damage inspection is now taken from damage prototypes

* fix damage tests

* fix damage test yml

* fix damage test prototypes

* Update Content.Shared/Damage/Prototypes/DamageGroupPrototype.cs

* Update Content.Shared/Damage/Prototypes/DamageTypePrototype.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-04-28 14:48:19 +10:00
0x6273
37b8d78dac Body code cleanup (#24946)
* Fix test

* Kill float accumulators

* Use entity proxy methods

* DataField auto name generation where possible

* Kill comp properties

* Clean up server comps

* Make events record structs

* Clean up shared body code

* Clean up server body code

* Rename organ events to be same names as in med refactor
2024-03-27 17:48:37 -07:00
Jezithyr
be29a054de Death acidifier fix (#25251) 2024-02-14 17:37:56 -08:00
Jezithyr
541d8f8715 Gibbing refactor (Per-part gibbing and giblet throwing!) (#24989)
* Moving Gibbing rework out from medrefactor into it's own PR

* Re-enabled warning for missing gibbable on TryGibEntity

* Implemented better logic for gibbing failover and better logging

* Allowing audio params and drop scattering customization per component. Created UnGibbable organ base types and made brains ungibbable.
Removed delete brain from gibBody function. Artifact crusher does not destroy brains anymore. It only destroyed brains before not other organs which was wierd.

* Update Content.Shared/Body/Systems/SharedBodySystem.Body.cs

Fixing space for multiplication

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

* Added event raised when attempting to gib contained entities to allow modification of allowed and excluded container ids

* removing audioParams var from component (sound specifier includes it)

* Fixing signature

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-02-10 15:37:06 -08:00
metalgearsloth
10b7ec5d29 Slight organ loss change (#24475)
Both should be sufficient to avoid the bandaid bug but this one is more accurate.
2024-01-24 18:06:49 -07:00
metalgearsloth
016e535dea Maybe fix dead bug (#24445) 2024-01-23 18:42:55 -08:00
TemporalOroboros
7a77d6d5dd Content ecs containers (#22484) 2023-12-28 01:30:03 -04:00
Leon Friedrich
0734a876f9 Try fix organ networking (#23034) 2023-12-28 09:48:10 +11:00
metalgearsloth
1cea5240c0 Revert "Shuffle body container subs slightly (#21084)" (#22339)
This reverts commit eb49ad11ba.
2023-12-11 05:06:56 -07:00
metalgearsloth
eb49ad11ba Shuffle body container subs slightly (#21084) 2023-12-11 21:35:24 +11:00
DrSmugleaf
2d58d19b07 Make all prototype types partial (#21374) 2023-11-01 19:56:23 -07:00
Doru991
b419dbb3eb Make gibbing drop items again (#21047)
LGTM, Just a warning that this will probably get overriden when medical refactor gets merged since it refactors gibbing.
2023-10-18 14:15:17 -07:00
DrSmugleaf
5934c6728f Replace all T : Component constraints with T : IComponent (#21073) 2023-10-17 19:42:47 -07:00
Nemanja
6ec02db63f Make MMIs work again (#20844) 2023-10-08 21:49:20 -07:00
Jezithyr
34d4e9803a Fix for [20593] (#20663) 2023-10-01 13:33:18 -07:00
DrSmugleaf
2f11a749f6 Remove cloneData parameter from AutoNetworkedField (#20596) 2023-09-30 15:14:16 +10:00
metalgearsloth
290c2fd502 Organ fixes (#20488) 2023-09-29 08:01:47 -07:00
DrSmugleaf
a44fa86b68 Update trivial components to use auto comp states (#20539) 2023-09-28 16:20:29 -07:00
Psychpsyo
34aea7d9ed Fix BodySystem and Gibbing (#20460)
* Fix gibbing & body system

Makes it so that bodies no longer have two sets of torso organs and that gibbed bodies get spread around on the floor again.

* Actually fix the double torso problem

* rootSlot in cameFrom

* Remove SetCoordinates inside GibBody()

* Don't use entity.RandomOffset() in GibBody()

* Gibbing now uses _random.NextVector2()
2023-09-24 23:53:04 -07:00
Jezithyr
31b2c9f830 Refactoring body system to use containers and general body cleanup (#20202)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-09-21 17:23:02 +10:00
metalgearsloth
5a0fc68be2 Content update for NetEntities (#18935) 2023-09-11 09:42:41 +10:00
metalgearsloth
4d1c3ae66a Revert "Remove IContainer and move functions to the container system.… (#19975) 2023-09-10 21:46:36 +10:00