Commit Graph

99 Commits

Author SHA1 Message Date
WarMechanic
93ece39fc2 Cherry-Pick "EMP Grenade Actually Sabotages Power" From Wizden (#516)
<!-- Please read these guidelines before opening your PR:
https://docs.spacestation14.io/en/getting-started/pr-guideline -->
<!-- The text between the arrows are comments - they will not be visible
on your PR. -->

## About the PR
<!-- What did you change in this PR? -->
EMP has been changed to target APC-powered-devices (most electrical
devices) as well as batteries to disable them. This means EMP can
interfere with autolathes, airlocks, atmos devices, substations and
SMES. The power draw of a single EMP grenade now cuts out a substation,
and the disabling effect prevents further recharge until it subsides.

EMP duration now also stacks, which creates a novel way to quietly black
out the station by attacking engineering SMES with 3 EMP grenades (6tc
EMP bundle) to black out the station for 3 minutes.

Edit, here's a detailed changelog of the PR,
Functionality:
- EMP disable has been generalised to kill and prevent further function
of every device/battery by interrupting recharge
- As a result of the above, some hard coded interactions have been
culled
- EMP disable duration now stacks with multiple EMP blasts
- EMP is now capable of draining from gravity generators
- The Charger system has been slightly reworked to facilitate
communication between batteries and chargers

Results:
- EMP grenade can disable basically every powered machine, most notably
doors
- EMP grenade has had its power drain upped to 2.7MW, which is slightly
more than a substation and 1/3 a SMES
- EMP grenade can now instantly kill substations
- EMP grenade can now instantly kill gravity generators
- 3 EMP grenades (6tc) can be used to kill SMES and disable recharge for
3 minutes with no evidence on the power monitor.

## Why / Balance
<!-- Why was it changed? Link any discussions or issues here. Please
discuss how this would affect game balance. -->
EMP at 2tc has a relatively low value-proposition when compared to C4
which is also 2tc. While EMP can probably black out one (or two if
you're lucky) APCs and can be used as a defensive option against
Stun/Lasers. C4 can be used to cut wires, substations, SMES, generators,
doors, reinforced walls, people and the list probably continues.

New EMP can be used to soft-bomb station power in an explosion that
isn't globally alarming (salv boom). Targeting the captain's office
directly may let you crowbar in and steal the locker but it leaves
ephemeral evidence in the form of everything electrical shimmering blue.
Opting to bomb substations blacks out a wider area, providing several
degrees of separation from your target. That is to say, new EMP grenade
favours map knowledge and rewards better stealth.

## Technical details
<!-- If this is a code change, summarize at high level how your new code
works. This makes it easier to review. -->
- `C.S/.../EmpSystem.cs` uses TryComp to turn on/off charging for
`C.S/Power/Components/PowerNetworkBatteryComponent`
- `C.S/Power/EntitySystems/PowerReceiverSystem.cs` listens to
`EmpPulseEvent` to turn off. Requests to turn back on are additionally
intercepted by `EmpSystem.cs` and cancelled.
- `C.S/.../GravityGeneratorSystem.cs` listens to `EmpPulseEvent` and
converts energy consumption to a normalised charge
- `C.S/Power/EntitySystems/ApcSystem.cs` no longer toggles its breaker,
but still listens to `EmpPulseEvent` for updating visuals.
- `C.S/Power/EntitySystems/ChargerSystem.cs` was refactored to add a
`ChargingComponent` flag to power cells instead of `ActiveCharger` on
itself. Battery and Charger communicate through this flag. Listens to
`EmpPulseEvent` for updating its state machine. New
`ChargerUpdateStatusEvent` allows batteries to update the charger's
status.
- `C.S/Power/EntitySystems/BatterySystem.cs` can now be disabled, and
checks for disabling before updating its charge. Raises
`ChargerUpdateStatusEvent` when hearing `EmpDisabledRemoved` to tell its
charger to start charging again.
- `C.S/Power/PowerWireAction.cs` checks for `EmpDisabledComponent`
before turning power back on.
- `C.S/SurveillanceCamera/Systems/SurveillanceCameraSystem.cs` and
`C.S/VendingMachines/VendingMachineSystem.cs` had redundant
`EmpPulseEvent` listeners culled.
- `Resources/Prototypes/Entities/Objects/Weapons/Throwable/grenades.yml`
buffed EMP grenade.

## Media
<!-- 
PRs which make ingame changes (adding clothing, items, new features,
etc) are required to have media attached that showcase the changes.
Small fixes/refactors are exempt.
Any media may be used in SS14 progress reports, with clear credit given.

If you're unsure whether your PR will require media, ask a maintainer.

Check the box below to confirm that you have in fact seen this (put an X
in the brackets, like [X]):
-->
https://www.youtube.com/embed/rSVph6OIg1s?si=8o4bx9Vx16B6usuu - outdated
video demonstrating changes on a wizden map
https://www.youtube.com/embed/B3iPhLcfs-0?si=trB1HY2ccjMf96Bj -
electrical anomaly crit with updated emp

- [x] I have added screenshots/videos to this PR showcasing its changes
ingame, **or** this PR does not require an ingame showcase

**Changelog**
<!--
Make players aware of new features and changes that could affect how
they play the game by adding a Changelog entry. Please read the
Changelog guidelines located at:
https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog
-->

🆑
- tweak: EMP Grenades can now disable basically any electrical device,
and stack in disable duration.

---------

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
Co-authored-by: VMSolidus <evilexecutive@gmail.com>
2024-08-06 16:47:49 -04:00
beck-thompson
ef6dcab044 Things that can't go in disposals now don't "Miss" (#26716)
* Moved is canInsert check to before miss check

* Update Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-07-11 21:21:05 -07:00
brainfood1183
eca325ce16 Toilet Upgrade (needs review) (#22133)
* Toilet Draft

* fixes

* toilets now have secret stash to place items in cistern.

* fixes

* plungers now unblock toilets.

* fix sprite

* new sprites and fix

* fixes

* improve seat sprites.

* fix

* removed visualisersystem changed to genericvisualizers

* flush sound for toilets and copyright for toilet sprites.

* fix atrributions

* fixes

* fix datafield flushtime

* sprite improvements

* fixes

* multiple changes

* fix

* fix

* fixes remove vv

* moved stash related functions to secret stash system from toilet.

* fix

* fix

* changes for recent review.

* fix

* fix
2024-07-11 20:43:35 -07:00
Pieter-Jan Briers
e7a3b82a8d Use new ComponentPauseGenerator (#25183)
Also includes some (non critical) changes to the solution file to re-organize the Roslyn components.

(cherry picked from commit e00f74505c62310bd15aeaba8d6530f648397074)
2024-03-07 00:57:05 +01:00
Pieter-Jan Briers
8cdd3d1cb7 Fix disposals bins not automatically flushing after an object is inserted (#25233)
Fix disposals bins not automatically flushing after an object is inserted.

Because of Spaghetti Code™️, AfterInsert() in DisposalUnitSystem still handles insertion itself. Except in all cases except drag/drop insert, the object is already inserted so this check fails and the remaining logic doesn't happen anymore. Fixed now.

(cherry picked from commit 571d4f735888343ca3ba90eaea0908257095cdb9)
2024-02-18 23:13:35 +01:00
TemporalOroboros
aebae6fab7 Content ecs containers (#22484)
(cherry picked from commit 7a77d6d5dd73a34be238fdebc284da5bc2917c67)
2024-01-22 18:47:55 +01:00
zero
dacd620ca7 Add sounds when inserting/missing into a disposal (#22077) 2023-12-02 20:35:40 +01:00
Leon Friedrich
99f9583a3e Adds a new AtmosphereSystem.GetTileMixture() override (#21804) 2023-12-02 20:26:02 +01:00
Leon Friedrich
1465c02a77 Move ActorComponent to shared (#21293) 2023-10-31 19:12:44 +01:00
I.K
22dc5f9a3e Make forcing others into disposals take longer and more apparent (#20687) 2023-10-08 19:53:53 +02:00
metalgearsloth
c9648da984 Content update for NetEntities (#18935) 2023-09-27 21:59:12 +02:00
metalgearsloth
4d1c3ae66a Revert "Remove IContainer and move functions to the container system.… (#19975) 2023-09-10 21:46:36 +10:00
Leon Friedrich
b45e53603d Remove IContainer and move functions to the container system. (#19834) 2023-09-10 12:16:37 +10:00
deltanedas
4b5228e10d disposal emag fix and refactoring (#19790)
Co-authored-by: deltanedas <@deltanedas:kde.org>
2023-09-05 00:11:34 +10:00
faint
0b9b4f6532 Fix dumping into disposals (#19736) 2023-09-02 00:02:35 -04:00
metalgearsloth
b08967b752 Remove disposals compref (#19558)
This one was relatively painless.
2023-08-30 19:08:23 -06:00
Slava0135
e6159d8581 Damage other on hit player feedback (#18539) 2023-08-02 19:30:04 +10:00
metalgearsloth
3eb93988e5 Disposals refactor (#17803) 2023-07-06 13:39:34 +10:00
TemporalOroboros
9849737e5a Cleans up warnings in disposals (#17419) 2023-06-22 00:31:19 +10:00
metalgearsloth
ae01618874 Revert "Revert "Replace ResourcePath with ResPath (#15308)" (#155… (#15566) 2023-04-20 20:16:01 +10:00
metalgearsloth
acf79a8209 Revert "Replace ResourcePath with ResPath (#15308)" (#15551) 2023-04-20 11:43:54 +10:00
Ygg01
71f358a027 Replace ResourcePath with ResPath (#15308) 2023-04-19 23:39:17 +10:00
DrSmugleaf
b947856431 Remove hands component reference (#15197) 2023-04-07 11:21:12 -07:00
Leon Friedrich
19277a2276 More DoAfter Changes (#14609)
* DoAfters

* Compact Clone()

* Fix mice and cuffables

* Try generalize attempt events

* moves climbabledoafter event to shared, fixes issue with climbable target

* Fix merge (cuffing)

* Make all events netserializable

* handful of doafter events moved

* moves the rest of the events to their respective shared folders

* Changes all mentions of server doafter to shared

* stop stripping cancellation

* fix merge errors

* draw paused doafters

* handle unpausing

* missing netserializable ref

* removes break on stun reference

* removes cuffing state reference

* Fix tools

* Fix door prying.

* Fix construction

* Fix dumping

* Fix wielding assert

* fix rev

* Fix test

* more test fixes

---------

Co-authored-by: keronshb <keronshb@live.com>
2023-04-02 21:13:48 -04:00
deltanedas
52af530d61 emag disposal units to disable pressure requirement (#14630) 2023-03-23 10:55:49 -04:00
Leon Friedrich
2f88173730 DoAfter and other bugfixes (#14669) 2023-03-15 13:05:53 +11:00
metalgearsloth
44fb8a9e2d Fix rsi sprite access for verbs (#14284) 2023-02-26 18:48:57 +11:00
keronshb
9ebb452a3c DoAfter Refactor (#13225)
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-02-25 01:01:25 +01:00
metalgearsloth
c8f89eca60 ECS dragdrop (#12973)
* ECS dragdrop

No more excuses.

* AAAAAAAAAAAAAA

* kry

* events

* aaaaaaaaaa

* HUH

* Fix stripping

* aaaaaa

* spoike

* asease

* fix table vaulting

* ded

* rebiew

* aaaaaaaaaaaaa

* drag

* aeaeae

* weh
2023-02-13 13:29:34 +00:00
eoineoineoin
be94048932 Convert DisposalUnitVisualizer to VisualizerSystem (#13637) 2023-02-03 18:26:50 -04:00
Rane
80d4dc430d Generic power switch component (#11999) 2023-01-20 08:05:54 -08:00
Chief-Engineer
0907989e94 Add DisposalUnit logs (#13309) 2023-01-03 22:45:35 -08:00
Leon Friedrich
881a2b2ece PopupSystem public methods rejig (#12830) 2022-12-19 08:41:47 +11:00
metalgearsloth
6c76061887 Content changes for mapgrid kill (#12567) 2022-11-22 13:12:04 +11:00
metalgearsloth
c0abea8047 Content side for removing IMap / IMapGrid comps (#12357) 2022-11-04 10:12:25 +11:00
Leon Friedrich
1e97d6defb Fix disposal unit termination (#12266) 2022-10-28 16:59:01 -05:00
Leon Friedrich
c0b657ca18 Remove InteractedWithEvent and friends. (#11939) 2022-10-26 12:15:48 +11:00
metalgearsloth
0b38589728 Raise power events by ref and not broadcast (#11923)
Also some other minor stuff.
2022-10-14 23:08:15 -05:00
Morb
a210373972 Localize disposal unit state (#11725) 2022-10-07 01:53:36 +11:00
Mervill
47e1e991b5 Change where the "missed" popup comes from when throwing things into the disposal unit. (#11609) 2022-09-29 12:50:31 -07:00
Mervill
03484d831a User feedback for when you miss throwing something in disposals (#11426)
* user feedback for when you miss throwing something in disposals

* Update missed message

Co-authored-by: theashtronaut <112137107+theashtronaut@users.noreply.github.com>

* Update Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs

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

* missing nullable check

Co-authored-by: theashtronaut <112137107+theashtronaut@users.noreply.github.com>
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-09-26 14:42:49 -05:00
metalgearsloth
78a4ab6eb2 Update for collision events by-ref (#10933) 2022-09-14 17:26:26 +10:00
metalgearsloth
8415f08560 Update disposals code standards (#11076)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-09-10 23:50:59 -07:00
Leon Friedrich
93584f21db Add entity prototype save test (#10274) 2022-08-17 10:47:58 +10:00
Leon Friedrich
24b21c80f2 Remove duplicate disposal unit verb (#10607)
* Remove duplicate verb

* also fix missing loc string
2022-08-14 20:58:58 -07:00
Julian Giebel
b2436c22a7 Adds disposal mailing units (again) (#7630) 2022-08-13 22:57:25 -07:00
Visne
58769634c7 Fix a bunch of compiler warnings (#10518) 2022-08-13 22:28:34 -07:00
Leon Friedrich
cfec035b9d Fix disposal entry (#10230) 2022-08-02 08:35:34 +10:00
wrexbe
b5de805083 Mouse disposal nullable patch (#10185) 2022-07-30 21:23:46 -07:00
Lucas
8000d31a62 No handed mobs now cant insert other mobs on disposal (#9993)
* fix mouse now cant insert other mobs on disposal, but still can jump inside

* Apply suggestions from code review

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

* using popupSystem depedency and better fluent use

* change where the message You don't have hands are

* Caution popup

Co-authored-by: zero <ribeirolucasdev@gmail.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2022-07-30 21:17:30 -07:00