Commit Graph

86 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
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
metalgearsloth
fd52f698c7 Predict PoweredLights (#36541)
* Move PoweredLight to shared

* Predict the rest of the owl

* reacher

* compinit & anim

* Fix names

* Revert this?

* Fix these

* chicken drummies

* deita

* Fix

* review

* fix

* fixes

* fix PVS weirdness

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
2025-08-11 23:06:28 +02:00
slarticodefast
2c40a950f7 Trigger Refactor (#39034) 2025-08-03 21:20:37 +02:00
Princess Cheeseballs
e85bc1bb8c Stunnable New Status and Cleanup (#38618)
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-07-21 19:22:11 +02:00
Tayrtahn
c565b44965 Replace ValidatePrototypeId uses with ProtoId or EntProtoId (#38814)
* The easy ones

* For certain values of easy

* Easy test

* Hair

* Fix sandbox violations

* Sort usings
2025-07-07 21:57:05 +02:00
B_Kirill
7ea3120a07 Cleanup warnings: CS0414 (#38793)
Cleanup
2025-07-06 12:28:29 +02:00
TemporalOroboros
d4876be6f0 Kills TurfHelpers (#37939)
* Create TurfSystem equivalent for and obsolete TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.GetTileRef

* Fix EntitySystem uses of TurfHelpers.TryGetTileRef

* Fix construction condition uses of TurfHelpers.GetTileRef

* Fix last use of TurfHelpers.IsBlockedTurf

* Create TurfSystem equivalent to and obsolete TurfHelpers.GetContentTileDefinition

* Fix uses of TurfHelpers.GetContentTileDefinition(TileRef)

* Fix uses of TurfHelpers.GetContentTileDefinition(Tile)

* Create TurfSystem equivalent to and obsolete TurfHelpers.IsSpace

* Fix EntitySystem uses of TurfHelpers.IsSpace(Tile)

* Fix EntitySystem uses of TurfHelpers.IsSpace(TileRef)

* Fix remaining uses of TurfHelpers.IsSpace

* Fix uses of TurfHelpers.GetEntitiesInTile

* Delete TurfHelpers.cs

* Add GetEntitiesInTile lookup methods

* Convert some GetEntitiesInTile methods to LookupSystem extension methods

* Use new GetEntitiesInTile methods

* Recycle spiderweb hashset

* Recycle floor tile hashset
2025-06-21 11:23:19 -04: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
slarticodefast
a9720f2149 Fix powered lights electrocuting you despite having insulated gloves V2 (#36686)
fix light insulation
2025-04-18 22:26:47 +10:00
J
af9526197a Extracts magic strings from Tag calls (#36305)
* Extracts magic strings from Tag calls

When #36281 gets merged, the `TagSystem` methods will all give warnings. Let's fix those warnings before they even happen!

* Adds missing libraries

* Remove not yet implemented TagSystem changes

* Fix tag spelling error

Genuinely surprised there was only 1!

* Styling and proper type changes

* Styling

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>

---------

Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
2025-04-04 20:20:19 -04:00
slarticodefast
3758715bdc electrification hud 2024-11-22 00:43:02 +01:00
Fildrance
4bcf3c3c0e Station AI ability to electricute doors (#32012)
* Boom! Emergency access!

* Emergency access sound

* locale

* Updated sounds

* bleh

* Door electrify base

* feat: popups on attempt to activate AI action when wires cut

* refactor: use SharedApcPowerReceiverComponent to check if AI can interact with door

* refactor: added icon and sound for door overcharge

* meta.json should use tabs not spaces

* refactor: extracted sounds for airlock overcharge to static field in system

* refactor: cleanup, ScarKy0 mentions for resources

* refactor: removed unused textures

* feat: now notification is displayed when AI attempting to interact with door which have wire cut

* StationAiWhitelistComponent is properly gating  BUI OnMessageAttempt, SharedPowerReceiverSystem.IsPowered is now used to check if device powered

* refactor: use PlayLocal to play electrify sound only for AI player

* refactor: SetBoltsDown now uses TrySetBoltDown, checks for power.

* bolts now check for power using SharedPowerReceiverSystem

* electrify localization and louder electrify sounds

* extracted ShowDeviceNotRespondingPopup, reverted airlocks not opening/closing when ai wire was cut

* refactor: cleanup

* New sprites and fixes

* Copyright

* even more sprite changes

* refactore: cleanup, rename overcharge => electrify

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-09-27 17:22:17 +10:00
Leon Friedrich
54337911d3 Only auto-enable internals when necessary (#28248)
* Only auto-enable internals when necessary

* Add toxic gas check

* Rename Any -> AnyPositive
2024-05-31 12:28:11 +10:00
Ed
5659edd207 Chances of triggering effects (#27056)
* electrocution

* slippery

* flashibg

* Update SlipperyComponent.cs

* Update SlipperySystem.cs
2024-04-18 10:08:42 +10:00
Nemanja
aba16198f6 Go back to constant electrocution damage based on voltage (#26455)
Makes electrocution damage based on the voltage of the wire and bring down the damage to a sane level. It's no longer primarily based on the power being received.

LV Cable -> 10 damage
MV Cable -> 20 damage
HV Cable -> 30 damage

Having a primarily power-based damage system causes there to be massive fluctuations in damage based on things outside of a regular player's control, like the station power output. This removes a lot of player agency and turns grilles into a risky gamble where they can either do no damage or instantly fry the player due to simply being hooked up to the engine.

While this may be a more accurate simulation in some regards, the reality of the gameplay is that it's often just frustrating, resulting in constant death traps as players brushing against electrified grilles and punching wires take absurd amounts of damage. By making them flat rates, it's possible to actually balance the damage output.
2024-03-28 12:44:44 -08:00
metalgearsloth
c584f6444a Pulling rework v2 (#24936)
* Pulling rework

Fixing up the FOUR systems managing pulling, all the shitcode, and also making it nicer ingame.

* More pulling cleanup

* stats

* More cleanup

* First draft

* More pulling

* weh

* Fix puller

* Pulling working

* Fix merge

* Dunked

* Self-merge time

* Fix hotkey

* Fix container changes

* oop

* Fix multi-pulling

* Move alerts cleanup.

* pulling fixes
2024-03-19 14:30:56 +11:00
Varen
1a4b96c2fc Rebalances electrocution damage to a log scale (#24829) 2024-02-05 10:47:52 -08:00
Jezithyr
c15b0691ec Emergency revert for pulling (#24923)
Revert "Pulling rework (#20906)"

This reverts commit 0d8254b2a2.
2024-02-03 10:32:30 -08:00
metalgearsloth
0d8254b2a2 Pulling rework (#20906)
* Pulling rework

Fixing up the FOUR systems managing pulling, all the shitcode, and also making it nicer ingame.

* More pulling cleanup

* stats

* More cleanup

* First draft

* More pulling

* weh

* Fix puller

* Pulling working

* Fix merge

* Dunked

* Self-merge time
2024-02-03 14:36:09 +11:00
Varen
cdfff3c4bd Fixes Electrocutions to use available power, not consumed power (#24554)
-Electrocutions now happen using how much power there is rather than how much is being used.
2024-02-01 12:54:24 +01:00
metalgearsloth
1f3a29c092 Entitylookup method renames (#23519) 2024-01-14 19:10:38 +11:00
Tomás Alves
f689398504 Fixes Electrocuting grabbed targets while insulated (#22087) 2023-12-02 15:02:17 -05:00
metalgearsloth
269c93245d Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:34 +11:00
metalgearsloth
5b8f3c48c4 Revert "Update submodule to 175.0.0 (#21318)" (#21319) 2023-10-29 15:29:30 +11:00
metalgearsloth
9b1b3e03ed Content audio (#20862) 2023-10-29 14:58:23 +11:00
Leon Friedrich
4e7bdc6658 Fix electrocution resolve error log (#21179) 2023-10-24 17:22:05 +11:00
TemporalOroboros
414701dd3b Swaps HV/MV/LV scaling to supply power scaling (#20880) 2023-10-18 14:04:47 -07:00
Leon Friedrich
364c9b7f0a DamageableSystem cleanup & performance improvements (#20820) 2023-10-09 03:27:41 +11:00
Kacper Urbańczyk
4313a6ee66 Fix electrocution displaying real name of disguised players (#20603) 2023-09-29 08:01:19 -07:00
DrSmugleaf
a44fa86b68 Update trivial components to use auto comp states (#20539) 2023-09-28 16:20:29 -07:00
deltanedas
24810d916b ninja 2 electric boogaloo (#15534)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-10 16:20:27 +10:00
Visne
b88c2cbb49 Remove usages of obsolete MetaDataComponent setters (#19582) 2023-08-28 19:20:31 +10:00
Vordenburg
7582474f1a Lint more const string prototypes (#18922) 2023-08-13 20:26:59 -04:00
chromiumboy
636819f4e3 Hacking protections for airlocks (#18894)
* Adds the ability to better protect to the internal wiring of airlocks
- Achieved by opening the maintenance panel, adding either steel or plasteel to the airlock, then welding the plate in place
- To access the wiring, the plating must be cut with a welder and then pried out with a crowbar

* Code revisions
- Cleaned up the code
- Cutting the security grille can now shock you
- Atmospherics and Security dept airlocks start with a medium level of protection (a welded steel plate)
- Command dept airlocks start with a high level of protection (a welded plasteel plate and electrified security grille)

* Code revision
- Accounted for a potentially null string

* Update Content.Server/Construction/Completions/AttemptElectrocute.cs

Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com>

* Update ChangeWiresPanelSecurityLevel.cs

Adjusted scope

* Update Content.Shared/Wires/SharedWiresSystem.cs

Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com>

* Update Content.Shared/Wires/SharedWiresSystem.cs

Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com>

* Update ChangeWiresPanelSecurityLevel.cs

Removed get / setter and added [ValidatePrototypeId] attribute

* Update ChangeWiresPanelSecurityLevel.cs

Set security level to "Level0" as the default

* Update airlock.yml

Removed 'super max' level of security

* Update WiresPanelSecurityLevelPrototype.cs

* Update WiresSystem.cs

Added check for WiresAccessible to OnInteractUsing

* Update AttemptElectrocute.cs

File scoped namespace

* Update ChangeWiresPanelSecurityLevel.cs

File scoped namespace

* Update AirlockSystem.cs

File scoped namespace

* Update SharedWiresSystem.cs

Removed boiler plate 'OnGetState' and 'OnHandleState'

* Update WiresPanelComponent.cs

Implemented AutoGenerateComponentState

* Removed unnecessary usage references

* use TryCloseAll when wires not accessible

* minor changes to AttemmptElectrocute

* lets try all 7 levels

* fix indent in airlock graph

* fix indent 2

---------

Co-authored-by: Slava0135 <40753025+Slava0135@users.noreply.github.com>
Co-authored-by: Slava0135 <super.novalskiy_0135@inbox.ru>
2023-08-10 11:33:03 +03:00
metalgearsloth
5d3503222c Cleanup some lookup stuff (#18738) 2023-08-06 15:11:43 +10:00
Errant
c6d2fe6d03 Attacking a powered light now shocks an unarmed attacker (#18340) 2023-07-27 17:37:09 +10:00
faint
2f85b5ea3c Little NodeContainer ECS (#17702) 2023-06-28 21:28:38 +10:00
Nemanja
37d3056809 Events all over melee (#16997) 2023-06-07 13:26:45 -07:00
Pieter-Jan Briers
042d3437e3 Make electrocutions look nicer on the power monitor. (#16965) 2023-06-03 12:13:30 -07:00
Nemanja
dd044f4a91 Make melee damage not go through MeleeHitEvent.cs (#16881)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2023-05-28 17:03:25 +10:00
Leon Friedrich
2bd5fb3736 Remove obsolete Fixture.Body references (#16259) 2023-05-09 17:21:26 +10:00
Slava0135
4ade6f60ff Electrified grille sparks effect (#15178)
* use file namespace

* shorter systems name

* replace SoundSystem with AudioSystem

* refactor update function

* refactor

* refactor 2

* remove setters

* uh oh

* remove getters

* active checks

* refactor 3

* better way

* update state

* have to remove this for now

* move electrified component to shared

* forgot this

* fix airlocks

* add effect

* Revert "move electrified component to shared"

This reverts commit 6457e8fc9c3b674a705a61034831ce6f084e2b01.

* Revert "forgot this"

This reverts commit ed361cee2d5b8b958830ba0af07fcc2627eb7845.

* functioning effects

* use animation by Aleksh

* make effect part of grille

* optimisation?

* remove timing

* file name

* only activate when touched

* refactor electrocution comp too

* make it 1 sec

* formatting

* replace all entity query with enumerator

* queue del
2023-04-29 16:05:10 -04:00
keronshb
ac87effca0 [Revert] Reverts Ninja (#15516)
* Revert "[Antag] add space ninja as midround antag (#14069)"

This reverts commit c1cda0dbf8.

* Revert "[Fix] move ninja objectives into NinjaRole (#15490)"

This reverts commit 251f429fb3.
2023-04-19 01:43:09 -06:00
deltanedas
c1cda0dbf8 [Antag] add space ninja as midround antag (#14069)
* start of space ninja midround antag

* suit has powercell, can be upgraded only (not replaced with equal or worse battery)

* add doorjacking to ninja gloves, power cell, doorjack objective (broken), tweaks

* 💀

* add basic suit power display that uses stamina rsi

* add draining apc/sub/smes - no wires yet

* add research downloading

* ninja starts implanted, move some stuff to yaml

* add Automated field to OnUseTimerTrigger

* implement spider charge and objective

* fix client crash when taking suit off, some refactor

* add survive condition and tweak locale

* add comms console icon for objective

* add calling in a threat - currently revenant and dragon

* combine all glove abilities

* locale

* spark sounds when draining, refactoring

* toggle is actually toggle now

* prevent crash if disabling stealth with outline

* add antag ctrl for ninja, hopefully show greentext

* fix greentext and some other things

* disabling gloves if taken off or suit taken off

* basic energy katana, change ninja loadout

* recallable katana, refactoring

* start of dash - not done yet

* katana dashing ability

* merge upstream + compiling, make AutomatedTimer its own component

* docs and stuff

* partial refactor of glove abilities, still need to move handling

* make dooremaggedevent by ref

* move bunch of stuff to shared - broken

* clean ninja antag verb

* doc

* mark rule config fields as required

* fix client crash

* wip systems refactor

* big refactor of systems

* fuck

* make TryDoElectrocution callable from shared

* finish refactoring?

* no guns

* start with internals on

* clean up glove abilities, add range check

* create soap, in place of ninja throwing stars

* add emp suit ability

* able to eat chefs stolen food in space

* stuff, tell client when un/cloaked but there is bug with gloves

* fix prediction breaking gloves on client

* ninja soap despawns after a minute

* ninja spawns outside the station now, with gps + station coords to navigate

* add cooldown to stun ability

* cant use glove abilities in combat mode

* require empty hand to use glove abilities

* use ghost role spawner

* Update Content.Server/Ninja/Systems/NinjaSuitSystem.cs

Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>

* some review changes

* show powercell charge on examine

* new is needed

* address some reviews

* ninja starts with jetpack, i hope

* partial feedback

* uhh

* pro

* remove pirate from threats list

* use doafter refactor

* pro i gave skeleton jetpack

* some stuff

* use auto gen state

* mr handy

* use EntityQueryEnumerator

* cleanup

* spider charge target anti-troll

* mmmmmm

---------

Co-authored-by: deltanedas <deltanedas@laptop>
Co-authored-by: deltanedas <user@zenith>
Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: keronshb <54602815+keronshb@users.noreply.github.com>
2023-04-17 01:33:27 -06:00
Dawid Bla
c6de63c535 Stop toys from electrocuting on attack (#15318) 2023-04-11 17:11:55 -07:00
Visne
c6d3e4f3bd Fix warnings and code cleanup/fixes (#13570) 2023-01-19 13:56:45 +11:00
Leon Friedrich
881a2b2ece PopupSystem public methods rejig (#12830) 2022-12-19 08:41:47 +11:00
Chief-Engineer
343e695524 Fix electrocution logs (#13037) 2022-12-15 19:30:47 +01:00
Leon Friedrich
6fa2391e42 Replaces anchored lookup flag with static (#13036) 2022-12-15 15:29:46 +11:00