Commit Graph

58 Commits

Author SHA1 Message Date
Janet Blackquill
d1d939a898 rebase 2025-11-21 00:32:28 -05:00
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
Princess Cheeseballs
3a9bcf1a83 Damageable/Destructible Benchmarks (#41064)
* the fard

* oomba

* The woke swarm...

* Review

* review

* Apply suggestions from code review

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-10-27 02:46:27 +00:00
Leon Friedrich
f2d4317258 Clean up some parts of ExplosionSystem (#40485)
* Clean up some parts of ExplosionSystem

* Update Content.Shared/Damage/DamageSpecifier.cs

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

* Review

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-09-28 16:23:40 +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
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
Fildrance
d38042a0c0 3mo xeno archeology (first phase) (#33370)
* DAG Adjacency Matrix & Tests

* Fix sandbox type errors

* First pass on procgen

* Procgen adjustments

* Networking

* Cruft and god and beauty and analysis console

* convert to data types that dont make me want to kill myself

* starting work on console UI

* drawing nodes n shit

* damn that ui FUCKS

* XAT

* Add a bunch of basic triggers

* Fix trigger gen

* Add node info into the analysis console UI

* Add node unlocking

* more trigger cuz thats pretty cool

* final triggers + incorporate gnostic faith

* some ui changes, mostly

* Fix orphaned procgen segments

* its not random dipshit

* yeah... this one will make pjb happy....

* we call it a day for the UI

* imagine... shared power code...

* extraction WIP but we gotta sidequest momentarily

* oh hey would you look at that its the actual functionality

* distrotrased

* Small departure for randomness.

* ok yep yep indeed that is an effect very cool.

* thanos snap oldcode

* fuck it we ball

* feat: node scanner now displays triggered nodes. Removed unused old artifact systems and related code (most of it). xml-doc and minor fixups.

* refactor: most of preparations, cleanup and groundwork. also segment-related tests

* feature: all basic effects returning

* feat: finished effects lits, created weight lists for struct and handheld artifacts, fixed throw trigger and music ApplyComponent artifact effects not working

* feat: prevent non-first-time-predicted calls in shared artifact effect systems

* fix: remove gun effect from artifact effects - as it interferes with 'activate artefact' action

* fix: foam reagent selection, neat ApplyComponents art effect scenarios, handheld art is RadiationReceiver again

* fix: moved spawn/ pry&throw effect systems back to server part of code - entity duplication bugs were not quite fun

* refactor: fix protos

* refactor: fix linter

* fix: fix old artifact component names in yml

* fix: no more throwing error on artifact spawn with empty XAEFoamComponent.Reagents

* fix: removed old component usage in maps

* fix: remove more deleted components from map

* fix: ContainerContainer is now part of initial artifact entity, it won't be affecting UninitializedSaveTest

* refactor: fix tests, add loc description to toolshed commands

* Changed node scanner to tell the whole story about current artifact state

* refactor: remove excessive get of EntityCoordinates in XAE systems, removed Value access in NodeScannerDisplay

* fix: turned off TriggerInteraction, removed XAESpawn usage and system, EmpSystem now can use EntityCoordinates,

* fix: moved SharedXenoArtifactSystem.CancelUnlockingOnGraphStructureChange into RebuildXenoArtifactMetaData to lessen code coupling

* fix: XenoArtifactEffectJunkSpawn moved invalid rolls declaration

* refactor: set default value for XenoArtifactComponent.EffectsTable for tests

* fix: now explosions XAE can be activated for effect

* refactor: added some usedelay so artifactuse would'nt be spammed

* refactor: artifact-related hints improvements

* fix: artifact no longer spawns fauna into itself

* refactor: xml-doc and minor refactoring

* refactor: xml-doc for Xeno Artifact systems, renaming of questionable XAT systems

* map for playtest, TODO REVERT THIS

* fix: magboots trigger art from a mile

* refactor: bind artifact animation to unlocking state

* feat: radiation dmg now have reference to source (and artifacts won't irradiate themselves)

* fix: random artifact node durability now is rolled for max and not current value

* refactor: gas effects are more rare, hand-held artifact effects are filtered properly now, rad dmg trigger now requires only 20 dmg for activation

* feat: animations and sound effects for artifact force-use and failed finish of unlocking phase

* use only 1 file with art use animation

* refactor: minor artifact dmg triggers tuning

* feat: now nodes that CAN be unlocked are displayed with specific color in console.

* feat: now unlocking stage time is dynamic and it depends on amount of triggers player activated correctly. Failed one stops incrementing

* feat: now non-active unlocked nodes return more points if durability was not wasted

* feat: now puddle/foam effects change description of node

* fix: fix test failure

* refactor: renamed phasing effect, fixed failing test for elkridge

* minor balance changes

* refactor: split rare materials into separate effects

* feat: unlocked nodes without successor wont listen to unlocks, node unlock is not activating node

* fix: removed OnIrradiatedEvent duplicate c-tor

* revert changes of reach for playtest

* revert last row empty line removal on reach.yml

* fix: fix PVS bug, born from attempt to relay event to art nodes that were not synced yet to the client

* fix: fix elkridge for tests (again)

* refactor: xml-doc, more stuff predicted, allocation optimization in XAE/XAT systems

* refactor: naming

* refactor: extract variable refactor for XAEApplyComponentsSystem.OnActivated insides

* fix: duplicate xeno artifact unlocking sound fixed

* feat: CreatePuddle xeno artifact effect now can have min and max borders for chamicals to be drafted, minor XAECreatePuddleSystem refactor

* feat: networking for shared XAE components + xml-doc leftovers

* refactor: more xml-doc, fix XAEApplyComponentsComponent.Components not being serializable but trying to be

* refactor: xml-docs and XAEThrowThingsAroundSystem now uses circle and not box for prying tiles

* refactor: xml-docs, minor refactors

* revert XenoArtifactCommand.ArtifactPrototype being PrototId

* refactor: simplify the way ExtractionResearchLabel works

---------

Co-authored-by: EmoGarbage404 <retron404@gmail.com>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-04-15 10:34:53 +10:00
chromiumboy
dfd3e36a0a Sentry turrets - Part 4: The sentry turret and its primary systems (#35123)
* Initial commit

* Removed mention of StationAiTurretComponent (for now)

* Prep for moving out of draft

* Fixing merge conflict

* Re-added new net frequencies to AI turrets

* Removed turret control content

* Removed unintended change

* Final tweaks

* Fixed incorrect file name

* Improvement to fire mode handling

* Addressed review comments

* Updated how turret wire panel auto-closing is handled

* Ranged NPCs no longer waste shots on stunned targets

* Fixed bug in tracking broken state

* Addressed review comments

* Bug fix

* Removed unnecessary event call
2025-03-29 12:55:58 -05:00
SlamBamActionman
85a6ac90ba Add stamina and mob damage playtest modifiers (#35599)
* Add stamina and mob damage playtest modifiers

* Fix typo

* Add FTL

* Review fixes

* Update Content.Shared/Mobs/Systems/MobStateSystem.Subscribers.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-03-21 00:01:35 +01:00
SlamBamActionman
3200ba88a5 Add ability for +VVEDIT users to scale damage/healing in the game (#35255)
* Initial commit

* Add universal modifier for all damage/heals, make guidebooks work.

* help text
2025-02-18 08:28:42 +01:00
ActiveMammmoth
9fad86342f Wizard Staff of Animation (#34649) 2025-02-12 23:46:02 -05:00
DrSmugleaf
436344c36d Make it possible to hide full health bars below a total damage threshold (#28127)
* Make it possible to hide full health bars below a total damage threshold

* Fix not setting state
2024-05-25 17:07:27 -04:00
Pieter-Jan Briers
68ce53ae17 Random spontaneous cleanup PR (#25131)
* Use new Subs.CVar helper

Removes manual config OnValueChanged calls, removes need to remember to manually unsubscribe.

This both reduces boilerplate and fixes many issues where subscriptions weren't removed on entity system shutdown.

* Fix a bunch of warnings

* More warning fixes

* Use new DateTime serializer to get rid of ISerializationHooks in changelog code.

* Get rid of some more ISerializationHooks for enums

* And a little more

* Apply suggestions from code review

Co-authored-by: 0x6273 <0x40@keemail.me>

---------

Co-authored-by: 0x6273 <0x40@keemail.me>
2024-02-13 16:48:39 -05:00
deltanedas
f25773ffec explosion minor rework + fix (#21718) 2023-11-20 04:44:42 +11:00
Slava0135
bfd509e7af fix (#21612) 2023-11-12 21:02:39 +03:00
Leon Friedrich
364c9b7f0a DamageableSystem cleanup & performance improvements (#20820) 2023-10-09 03:27:41 +11:00
Nemanja
4d677f0685 1v1 me first to 31 no powerups [Deathmatch Gamemode] (#19467)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2023-08-30 18:06:15 -07:00
PixelTK
9fef38ab60 Projectile and damage events now include the origin (#19322) 2023-08-27 12:28:59 -04:00
Slava0135
53db6bc265 Examine throwable damage (#18580) 2023-08-07 19:09:35 +10:00
metalgearsloth
90110183be Fix a bunch of logger warnings (#17691) 2023-06-27 23:56:52 +10:00
Leon Friedrich
4f8ea0c19b Fix damage visuals not resetting in some cases (#17399) 2023-06-19 03:22:41 +10:00
Slava0135
082d204173 Fix shield modifiers (#17071)
* use uid instead of .Owner

* a bit of refactoring

* block damage reimplemented
2023-06-04 20:23:54 -06:00
Nemanja
0604c93d50 Defibrillator (#15922)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-05-03 10:10:19 +10:00
Kara
48cefca4e4 Godmode refactor (#14651) 2023-03-23 14:57:15 -04:00
metalgearsloth
49c7c0f9a7 Remove stamina + damageable .Owner (#14602)
* Remove stamina + damageable .Owner

* More
2023-03-12 09:19:05 -04:00
Jezithyr
eeb5b17b34 Mobstate Refactor (#13389)
Refactors mobstate and moves mob health thresholds to their own component

Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-01-13 16:57:10 -08:00
Leon Friedrich
52272e19cd Fix damage mispredict (#13304)
Fixes https://github.com/space-wizards/space-station-14/issues/13147
2023-01-03 17:43:35 +11:00
Rane
9e917d44fe [3 lines] fix damage origin (#12195) 2022-10-30 18:39:38 +11:00
Paul Ritter
79854e59a4 adds a source uid to most damage & mobstate events (#11559)
Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
2022-10-08 12:15:27 +02:00
metalgearsloth
600c0e3255 Fix a few warnings (#11576) 2022-10-04 14:24:19 +11:00
Visne
356a6b8d2e Event-ify Rejuvenate (#11145) 2022-09-15 03:30:56 +10:00
rolfero
4b23521af5 Melee special examine (#11168)
Co-authored-by: CommieFlowers <rasmus.cedergren@hotmail.com>
2022-09-10 23:39:36 -07:00
metalgearsloth
2f07270744 Add examines for damage values (#11090)
* Add examines for damage values

Even immersive sims still give you values.

We should also do this for armour so people don't have to yml dive and so the general public actually know the balance of things.

* Slightly better

* Cleanup
2022-09-08 18:08:14 -05:00
metalgearsloth
a2a5df1990 Damage masks (#9402) 2022-07-06 17:58:14 +10:00
EmoGarbage404
2697bbf8c7 Polymorphs and Transformation (#8185) 2022-05-18 14:05:22 +10:00
wrexbe
bc68ac96dd Cleanup the namespaces (#8132) 2022-05-13 17:59:03 +10:00
Alex Evgrashin
4aa45dc695 Remove IRadiationAct (#7757)
* Move radiation collector to ECS

* Damagable system

* Remove IRadiationAct

* Add small helper field

* Update Content.Server/Radiation/Systems/RadiationSystem.cs

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>

* Delete comment

* Fixed total rads

Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
2022-04-28 22:36:25 +10:00
EmoGarbage404
db56d5ef60 Zombies!!! (#7509)
* wip

* heal on bite

* more fixes and additions

* don't crash

* Update medicine.yml

* zombie claw item and damage resist

* ignoredcomponents.cs

* Add zombie claw, fix infection, add immunities

* fix

* razzle dazzle

* yaml fix

* Update Content.Server/Disease/DiseaseZombieSystem.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Update Content.Server/Disease/DiseaseZombieSystem.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Update Content.Server/Disease/DiseaseZombieSystem.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* Update Content.Server/Disease/DiseaseZombieSystem.cs

Co-authored-by: Moony <moonheart08@users.noreply.github.com>

* sdasadsadsadasd

* Generalize DiseaseProgression.cs

* final final final final final final cope seethe

* Update medicine.yml

* Update Content.Server/Disease/Components/DiseaseZombieComponent.cs

Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>

* Update BloodstreamSystem.cs

* Update Content.Server/Disease/Components/DiseaseZombieComponent.cs

Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>

* Update Content.Server/Disease/DiseaseZombieSystem.cs

Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>

* fixing until i die

* folder + zombietransfer fix

* smol fixe

* the smallest of fixes

* aaaa

* Infection timer buff

Co-authored-by: Moony <moonheart08@users.noreply.github.com>
Co-authored-by: mirrorcult <lunarautomaton6@gmail.com>
2022-04-18 17:30:22 -05:00
Leon Friedrich
56168e592e Explosion refactor (#5230)
* Explosions

* fix yaml typo

and prevent silly UI inputs

* oop

* Use modified contains() checks

And remove IEnumerable

* Buff nuke, nerf meteors

* optimize the entity lookup stuff a bit

* fix tile (0,0) error

forgot to do an initial Enumerator.MoveNext(), so the first tile was always the "null" tile.

* remove celebration

* byte -> int

* remove diag edge tile dict

* fix one bug

but there is another

* fix the other bug

turns out dividing a ushort leads to rounding errors.  Why TF is the grid tile size even a ushort in the first place.

* improve edge map

* fix minor bug

If the initial-explosion tile had an airtight entity on it, the tile was processed twice.

* some reviews (transform queries, eye.mapid, and tilesizes in overlays)

* Apply suggestions from code review

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

* is map paused

* GetAllTiles ignores space by default

* WriteLine -> WriteError

* First -> FirstOrDefault()

* default prototype const string

* entity query

* misc review changes

* grid edge max distance

* fix fire texture defn

bad use of type serializer and ioc-resolves

* Remove ExplosionLaunched

And allow nukes to throw items towards the outer part of an explosion

* no hot-reload disclaimer

* replace prototype id string with int index

* optimise damage a tiiiiny bit.

* entity queries

* comments

* misc mirror comments

* cvars

* admin logs

* move intensity-per-state to prototype

* update tile event to ECS event

* git mv

* Tweak rpg & minibomb

also fix merge bug

* you don't exist anymore go away

* Fix build

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-03-31 21:39:26 -05:00
metalgearsloth
2f9f626ea9 Minor damage opt (#7322) 2022-03-29 00:26:39 +11:00
mirrorcult
ec4d4688c7 Seal/abstract/virtual everything (#6739) 2022-02-16 18:23:23 +11:00
Leon Friedrich
0da74b1bfb misc optimization (#6436) 2022-02-02 22:40:22 -07:00
Leon Friedrich
d40bcc9168 Fix some mispredict reconciliation issues. (#6319)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-01-31 03:34:48 +11:00
Leon Friedrich
013edcc545 Prevent inventory events from being relayed to pockets (#6074)
Co-authored-by: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
2022-01-10 15:37:20 +11:00
Vera Aguilera Puerto
3f79e3754f Merge branch 'master' into 2021-12-03-remove-IEntity-komm-süsser-todd
# Conflicts:
#	Content.Client/Crayon/CrayonDecalVisualizer.cs
#	Content.Client/Tabletop/TabletopSystem.cs
#	Content.IntegrationTests/Tests/InventoryHelpersTest.cs
#	Content.Server/AI/EntitySystems/AiSystem.cs
#	Content.Server/AI/Utility/AiLogic/UtilityAI.cs
#	Content.Server/AME/AMENodeGroup.cs
#	Content.Server/Administration/AdminVerbSystem.cs
#	Content.Server/Body/Systems/RespiratorSystem.cs
#	Content.Server/Chemistry/Components/InjectorComponent.cs
#	Content.Server/Chemistry/TileReactions/CleanTileReaction.cs
#	Content.Server/Chemistry/TileReactions/SpillTileReaction.cs
#	Content.Server/Crayon/CrayonComponent.cs
#	Content.Server/Doors/Components/ServerDoorComponent.cs
#	Content.Server/Explosion/EntitySystems/TriggerSystem.cs
#	Content.Server/Fluids/Components/MopComponent.cs
#	Content.Server/Fluids/Components/SpillExtensions.cs
#	Content.Server/Fluids/EntitySystems/PuddleSystem.cs
#	Content.Server/Instruments/InstrumentSystem.cs
#	Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
#	Content.Server/Nutrition/EntitySystems/FoodSystem.cs
#	Content.Server/PneumaticCannon/PneumaticCannonSystem.cs
#	Content.Server/Storage/Components/EntityStorageComponent.cs
#	Content.Server/Storage/Components/StorageFillComponent.cs
#	Content.Server/Stunnable/StunbatonSystem.cs
#	Content.Server/Throwing/ThrowHelper.cs
#	Content.Server/Weapon/Ranged/Barrels/BarrelSystem.cs
#	Content.Server/Weapon/Ranged/Barrels/Components/ServerBatteryBarrelComponent.cs
#	Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs
#	Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
#	Content.Shared/Damage/Components/DamageableComponent.cs
#	Content.Shared/Damage/Systems/DamageableSystem.cs
#	Content.Shared/MobState/Components/MobStateComponent.cs
#	Content.Shared/Slippery/SharedSlipperySystem.cs
2021-12-07 17:48:49 +01:00
metalgearsloth
8af335097f More (IComponent) shenanigans and also some contaminated IoCManager.Resolve<IEntityManager>() very long yes calls 2021-12-07 22:22:34 +11:00
DrSmugleaf
af4eb3c7cd Fix more errors, client and server now build 2021-12-06 14:00:39 +01:00
Leon Friedrich
ae65418c52 Remove radiation & explosion damage logs. Add better explosion-trigger logs (#5689) 2021-12-05 13:34:32 +11:00
Vera Aguilera Puerto
f386b57148 Inline OwnerUid 2021-12-03 16:30:34 +01:00
Pieter-Jan Briers
64861ff034 Add Content.Shared.Database (#5588) 2021-11-28 14:56:53 +01:00