Commit Graph

491 Commits

Author SHA1 Message Date
DrSmugleaf
b62cc84e8c Add destructible component threshold triggers (#3080)
* WIP changes

* Fix tests, merge conflict and trigger once behavior

* Update yml

* Change test strings to be consts

* Fix total damage types and classes triggers

* Simplify damage trigger logic, move state to Threshold

* Update outdated code and docs

* Change the name of IBehavior back to IThresholdBehavior

* Change human gibbing to trigger at 400 brute damage

* Change gibbing from brute to blunt damage

* Fix one (1) typo

* Add damage class trigger test

* Add missing nullable enable to thresholds
2021-02-05 13:41:05 +01:00
Pieter-Jan Briers
29918b2810 Fix suspicion round end timer, actually show it. 2021-02-04 04:16:36 +01:00
Remie Richards
d45835e863 Janitor trashbag upgrade + FANCY ANIMATIONS (#3058)
* Janitor trashbag upgrade + FANCY ANIMATIONS

* Review, Bug fixes and Sounds
- Fixed hand-pickup animation playing if the entity originated from inside a container (e.g. bag on the ground) or from inside ourselves (e.g. something in our own inventory)

* Fix/Change. Just log if AnimateEntityPickup is called with an entity that has no SpriteComponent.

* More explicit log message. Error log.

* Merge. Fix.
2021-02-03 23:07:13 +01:00
Radrark
937e261867 Add Smoke and Foam chemical reaction effects. (#2913)
* Adds smoke reaction effect

* smoke tweaks

* address reviews

* Smoke fix

* Refactor smoke and add foam

* Fix stuff

* Remove thing

* Little things

* Address some comments

* Address more things

* More addressing

* License stuff

* Address refactor request

* Small things

* Add nullability

* Update Content.Server/GameObjects/EntitySystems/SolutionAreaEffectSystem.cs

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
2021-02-03 15:26:46 +01:00
metalgearsloth
684ec60be6 Pausing content (#3061)
* Change EntityQuery to not retrieve paused by default

* GetAllComponents

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-02-04 00:20:48 +11:00
Pieter-Jan Briers
c40ac26ced A big hecking chemistry-related refactor. (#3055)
* A big hecking chemistry-related refactor.

Changed SolutionContainerCaps. It now describes "stock" behavior for interacting with solutions that is pre-implemented by SolutionContainerComponent. As such things like syringes do not check it anymore (on themselves) to see "can we remove reagent from ourselves". That's assumed by it... being a syringe.

SolutionContainerCaps now has different flags more accurately describing possible reagent interaction behaviors.

ISolutionInteractionsComponent is the interface that describes the common behaviors like "what happens when injected with a syringe". This is implemented by SolutionContainerComponent but could be implemented by other classes. One notable example that drove me to making this interface was the /vg/station circuit imprinter which splits reagent poured in into its two reservoir beakers. Having this interface allows us to do this "proxying" behavior hack-free. (the hacks in /vg/ code were somewhat dirty...).

PourableComponent has been replaced SolutionTransferComponent. It now describes both give-and-take behavior for the common reagent containers. This is in line with /vg/'s /obj/item/weapon/reagent_containers architecture. "Taking" in this context is ONLY from reagent tanks like fuel tanks.

Oh, should I mention that fuel tanks and such have a proper component now? They do.

Because of this behavioral change, reagent tanks DO NOT have Pourable anymore. Removing from reagent tanks is now in the hands of the item used on them. Welders and fire extinguishers now have code for removing from them. This sounds bad at first but remember that all have quite unique behavior related to this: Welders cause explosions if lit and can ONLY be fueled at fuel tanks. Extinguishers can be filled at any tank, etc... The code for this is also simpler due to ISolutionInteractionsComponent now so...

IAfterInteract now works like IInteractUsing with the Priority levels and "return true to block further handlers" behavior. This was necessary to make extinguishers prioritize taking from tanks over spraying.

Explicitly coded interactions like welders refueling also means they refuse instantly to full now, which they didn't before. And it plays the sound. Etc...

Probably more stuff I'm forgetting.

* Review improvements.
2021-02-04 00:05:31 +11:00
collinlunn
a5492bc943 More power nullability (#3070) 2021-02-02 12:20:24 +01:00
Acruid
8b5d66050a Console Unify API Changes (#3059)
* Remove unused IChatCommand.

* Lots of refactoring into a shared context.

* Removed ICommonSession from server concmd Execute.

* Added argStr parameter to concmd execute.

* The execute function of client concmds now returns void, use the new shell.RemoteExecuteCommand function to forward commands.

* Finally move shells and commands into shared.

* Console commands can now be registered directly without a class in a shared context.

* Engine API Changes.

* Repair rebase damage.

* Update Submodule.
2021-02-01 16:49:43 -08:00
20kdc
e53ae365a3 Get rid of the OverlayEffectsComponent stuff (#3010)
* Get rid of the OverlayEffectsComponent stuff because it just ended up creating workarounds for it's bugs, without removing any functionality

* Flashes and Flashbangs use the same code now (the Flashable path because it's better)
2021-01-24 19:17:45 +11:00
Pieter-Jan Briers
6635054cac Attacks now re-orients players like interactions so. 2021-01-23 17:50:48 +01:00
metalgearsloth
6a41194bc9 Fix buckle drops. (#3023)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-20 00:16:41 +11:00
Letter N
c30dc030c5 Adds false alarm and updates events code (#2577)
* oops accedentaly ports how ss13 deals with event randomness. Also renames FakeEvent to FalseAlarm!

* thing

* greytide but it's implemented badly

* fixes&changies, also greytide!

* rng actualy exists now

* resync

* Naming Schemes

* Startup not init

* areas are dead

* very cool vsudio

* this does not exist, wtf

* Cleanup

* Nullables, fixables, and timings

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-18 21:14:53 +11:00
py01
138cdaba5b Enable nullable in ReactionPrototype & ReagentPrototype (#3005)
* Enable nullable in ReactionPrototype & ReagentPrototype

* Remove unecessary sets

* Fix updates branch

* Review fixes

Co-authored-by: py01 <pyronetics01@gmail.com>
2021-01-15 16:40:10 +11:00
py01
4c80082555 Reaction sound re-added (#2990)
* Reaction sound re-added

* Moves reaction sound file to reaction prototype

Co-authored-by: py01 <pyronetics01@gmail.com>
2021-01-14 18:06:23 +11:00
Vera Aguilera Puerto
6a19dd9f02 You can no longer move a PC entity unless it has a PlayerInputMover (#2987) 2021-01-14 14:24:43 +11:00
metalgearsloth
acb3c72d99 Drag changes (#2487)
* Drag changes

* Higlights only show near cursor
* Don't highlight un-droppable entities
* Fixes invalid highlights issue

* Also the scanner

* 2 months fix

* Address reviews

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-11 22:14:01 +11:00
Pieter-Jan Briers
96b21ffd1d Fix nullable errors with AfterInteract in UtensilComponent. 2021-01-11 09:36:21 +01:00
Pieter-Jan Briers
99727e8bc3 Fix AfterInteract not being awaited correctly in InteractionSystem 2021-01-11 09:30:18 +01:00
ShadowCommander
2249081443 Fix traitor identification overlay (#2978) 2021-01-11 00:50:04 +01:00
metalgearsloth
d403a7fab4 Fix NPC shutdown crash (#2971)
Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-10 15:24:03 +01:00
Vera Aguilera Puerto
d81a5faac4 Adds disarm action (#2950)
* Adds disarming

* Disarm acts

* yaml

* much better icon for disarm

* Apply Remie's suggestions, improve code!
2021-01-09 20:31:34 +01:00
Radrark
670d277963 Refactors the CargoOrderDataManager into the CargoConsoleSystem (#2858)
* Update submodule

* Refactor CargoOrderDataManager into CargoConsoleSystem

* Fix OnRemove event

Co-authored-by: Radrark <null>
2021-01-08 21:11:09 -08:00
Metal Gear Sloth
e84e387972 Fix force-running station events 2021-01-09 09:58:42 +11:00
py01
2b195fccb9 Chemical reaction refactor (#2936)
* Moves ContainsReagent from SolutionContainer to Solution

GetMajorReagentId from SOlutionContainer to Solution

Makes capability checks use HasFlag

Moves Solution Color calculation from SolutionContainer to Solution

Replaces SolutionContainerCaps.NoExamine with CanExamine

Misc SolutionContainer.Capabilities yaml cleanup

* Moves IReactionEffect from server to shared

* Moves ReactionPrototype from server to shared

* Moves SolutionValidReaction from SolutionContainer to ChemicalReactionSystem

* Moves PerformReaction from SolutionContainer to ChemicalReactionSystem

* Moves CheckForReaction from SolutionContainer to ChemicalReactionSystem

* Removes unused SolutionContainer methods

* Removes now-unused GetMajorReagentId from SOlutionContainer

* ChemicalReactionSystem comments

* Replaces usage of SolutionContainer.ContainsReagent and replaces it with SolutionContainer.Solution.ContainsReagent

* ChemicalReactionSystem ProcessReactions

* Moves ExplosionReactionEffect to shared, comments out server code, TODO: figure out how to let ReactionEffects in shared do server stuff

* Fixes SolutionContainer.CheckForReaction infinite recursion

* Moves IReactionEffect and ExplosionReactionEffect back to server

* Moves ChemicalReactionSystem and ReactionPrototype back to server

* Uncomments out Explosion code

* namespace fixes

* Moves ReactionPrototype and IReactionEffect from Server to Shared

* Moves ChemicalReactionSystem from Server to Shared

* ChemicalReaction code partial rewrite

* Moves CanReact and PerformReaction to Solution

* Revert "Moves CanReact and PerformReaction to Solution"

This reverts commit bab791c3ebd0ff39d22f2610e27ca04f0d46d6b8.

* Moves ChemistrySystem from Server to Shared

* diff fix

* TODO warning

Co-authored-by: py01 <pyronetics01@gmail.com>
2021-01-07 17:31:43 +11:00
metalgearsloth
482106e827 Optimise handheld lights (#2927)
* Optimise handheld lights

* Woops also these

* Might as well do shutdown too

* Also these

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2021-01-06 12:50:49 +01:00
Vera Aguilera Puerto
cf38e17b7e Shuttle called/recalled announcements and sounds. 2021-01-01 16:34:54 +01:00
Daniel Castro Razo
633ae5bc90 Fixes Emergency Lights not charging (#2873)
* Fixes Emergency Lights not charging

* Removed extra imports
2021-01-01 14:26:42 +01:00
Radrark
b4506b4d08 Makes ghosts able to point through walls. (#2821)
Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
2020-12-24 14:33:07 +01:00
Pieter-Jan Briers
2e6ab15a2a Clean up station events synchronization code.
AAAAAAAAAAAAAAAAAAAAAAAAAAA
2020-12-23 17:08:34 +01:00
DrSmugleaf
764465f60c Separate destructible component threshold into behaviors (#2818)
* WIP changes, add behaviors

* Fix behavior typing, namespace and test

* NO SPACES
2020-12-23 13:34:57 +01:00
DrSmugleaf
21dbd50128 Fix build 2020-12-20 04:36:08 +01:00
DrSmugleaf
0172613a7d Remove wireless surgery (#2785)
* Remove wireless surgery

* Change surgery window title to Surgery

* Remove todo

* Check only tools with a window open
2020-12-20 04:31:39 +01:00
DrSmugleaf
fcd52fa90c Add ActionBlockerExtensions 2020-12-20 04:26:21 +01:00
DrSmugleaf
d7e489f2b8 Fix EntityTest SpawnTest 2020-12-19 17:11:08 +01:00
Morshu32
19bd739b0d PreventCollision with strap component while buckled to it (#2694)
* AvoidCollision if collided entity is the one that the character is buckled to

* Attempt to PreventCollision after the player is unbuckled but still colliding with StrapComponent

* Moved PreventCollide to the Shared script.

* Add WakeBody to keep updating the physics collision while being on a collidable strap component.

* Addressed some of metalgearsloth's suggestions:
- Made EntityBuckledTo,IsOnStrapEntityThisFrame and DontCollide not virtual
-Made EntityBuckledTo nullable
-Don't call update on Paused BuckleComponents
-Removed EntityBuckledTo variable declaration in BuckleComponent because it's not needed anymore
-Call TryUnbuckle if (!IsOnStrapEntityThisFrame && DontCollide) to set BuckledTo entity to null.

* Formatting

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

* Formatting

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

* Formatting again :P

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

* Formatting

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

* Formatting

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

* Renamed variable EntityBuckledTo to LastEntityBuckledTo

* As per DrSmugLeaf suggestion: Added [ComponentDependency] to the Body variable.

Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
2020-12-18 20:12:53 +01:00
DmitriyRubetskoy
9c26e0c5ba Async Interface IAfterInteract() (#2735)
* Async Interface

* Update Content.Server/GameObjects/Components/Fluids/MopComponent.cs

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>

* Changed the glassbeaker

* Update Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>

* Update Content.Shared/Interfaces/GameObjects/Components/Interaction/IAfterInteract.cs

Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>

* Interaction system fix

* Removed I from the interface

* Changed all implementations of the interface I could find

* all public void implementation fixed

* All built, no errors should remain

* Update Resources/Prototypes/Entities/Objects/Specific/chemistry.yml

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

* Update Content.Server/GameObjects/Components/Portal/TeleporterComponent.cs

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

* Update Content.Server/GameObjects/Components/ActionBlocking/HandcuffComponent.cs

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

* Commit based off Sloth's commentary

* Removed the Rag file from the PR

* Reverted sloth's commentary changes on the publcity of the function

* Injector component properly implemented interface

* Update Content.Server/GameObjects/Components/Fluids/MopComponent.cs

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

* Update Content.Server/GameObjects/Components/Fluids/SprayComponent.cs

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

Co-authored-by: BlueberryShortcake <rubetskoy234@mail.ru>
Co-authored-by: Paul Ritter <ritter.paul1@googlemail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2020-12-17 18:45:04 +11:00
chairbender
7a3c281f60 Actions System + UI (#2710)
Co-authored-by: Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-12-13 23:28:20 +01:00
20kdc
58af9003e7 Canisters [ Continuation of clement-or #2544 ] (#2628)
* Added atmos sprites from CEV-Eris

* Moved canister sprites to appropriate dir

* Removed unnecessary sprites, edited canisters prototype

* Created Gas Canister UI and release pressure buttons

* Changed GasMixture's pressure calculation (convert liters to cube meters)

* Added relabeling Canisters

* Reverted changes on GasMixture

* Changed my name in the credits

* Added valve opening on canisters

* Change canister visual state when connected to a port

* Added nullable to SharedGasCanisterComponent

* Replaced nullable contexts

* Changed again nullable annotation context

* Moved name in the credits to correct alphabetical order

* Canisters: Fix the most blatant issues with this PR (the added project interdependencies for no reason whatsoever)

* Canisters: Stop crashes when canisters leave atmosphere

* Canisters: Gas released into no atmosphere gets transferred "into space" (deleted)

* Atmos: Nullability annotations on TileAtmosphere, explaination of the states of TileAtmosphere.Air

* Canisters: If in an airblocked tile, do NOT release gas

* Scrubbers: Fix typo leading to them not connecting properly.

* Revert manual changes to credits file (sorry!) (1/2)

This reverts commit 94f3b0e5df8d9c2fa189866a17a231920f99bdaf.

* Revert manual changes to credits file (sorry!) (2/2)

This reverts commit 1986fb094dfaa44060f08d280f36b755258d17a6.

* Canisters: Apply @Zumorica 's reviews

* Canisters: Add missing localization as suggested by PJB

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

* Canisters: Pressure lights!

* Canisters: Light is now unshaded.

* Canisters: Now using IActivate

* Gas canisters (& air canister), now with their numbers properly calibrated (hopefully)

* Canisters: Refactor how their layers are added to be more like ApcVisualizer

* Canisters: Clean up of the tile invalidation/air release logic

* Canisters: Some gas canister window improvements

* Canisters: Clean up release pressure change button label code

Co-authored-by: Clement-O <topy72.mine@gmail.com>
Co-authored-by: Clément <clement.orlandini@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-12-08 20:45:24 +01:00
metalgearsloth
fe93f2ac30 Fix thrown throwing (#2723)
Technically some stuff could be dependent upon the entity regardless if it's deleted but this is how ICollideBehavior does it (not by my design) so I figured we'd make it consistent.

If someone really needs the functionality even if it's deleted then they can refactor it.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
2020-12-08 12:21:12 +01:00
DrSmugleaf
2dc05b2275 Add UsedImplicitly to visualizers and entity systems (#2592) 2020-12-08 11:56:10 +01:00
DrSmugleaf
02bca4c0d8 Damage rework (#2525)
* Make damage work through messages and events, make destructible not inherit ruinable or reference damageable

* Copy sound logic to destructible component for now

* Fix typo

* Fix prototype error

* Remove breakable component damageable reference

* Remove breakable construction reference

* Remove ruinable component

* Move thresholds to individual components and away from damageable

* Add threshold property to damageable component code

* Add thresholds to destructible component, add states to damageable, remove damage container, fix up mob states

* Being alive isn't normal

* Fix not reading the id

* Merge fixes

* YAML fixes

* Grammar moment

* Remove unnecessary dependency

* Update thresholds doc

* Change naming of thresholds to states in MobStateComponent

* Being alive is once again normal

* Make DamageState a byte

* Bring out classes structs and enums from DestructibleComponent

* Add test for destructible thresholds

* Merge fixes

* More merge fixes and fix rejuvenate test

* Remove IMobState.IsConscious

* More merge fixes someone please god review this shit already

* Fix rejuvenate test

* Update outdated destructible in YAML

* Fix repeatedly entering the current state

* Fix repeatedly entering the current state, add Threshold.TriggersOnce and expand test

* Update saltern
2020-12-07 14:52:55 +01:00
DrSmugleaf
639cc86d91 Nanotransen > Nanotrasen
As decreed by PJB
https://discord.com/channels/310555209753690112/675078881425752124/784878237850402826
2020-12-05 21:48:11 +01:00
DrSmugleaf
de0975c228 Add InvalidateTileAir Transform extension method (#2687)
* Add InvalidateTileAir Transform extension method

* Add extension method for EntityCoordinates as well
2020-12-04 12:21:57 +01:00
DrSmugleaf
87f9a6e167 Reorganize commands into the Commands folder (#2679)
* Reorganize commands into the Commands folder

* RIDER
2020-12-03 13:40:47 +11:00
20kdc
bb22da6827 Atmos Debug Overlay expansion (#2626)
* Atmos Debug Overlay: Add a way of showing blocked directions

* Atmos Debug Overlay: Adjustable modes client-side

* Atmos Debug Overlay: Fix atvrange help text

* Atmos Debug Overlay: More flexible and clear gas ID specification
2020-11-28 14:45:52 +01:00
Víctor Aguilera Puerto
cec722e19e CVars for MIDI instrument limits (#2632)
* CVars for MIDI instruments limits!

* Localize this

* Cache CVars in instrument systems

* better naming

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-27 17:12:45 +01:00
Víctor Aguilera Puerto
6bb1e9fa5d CVars for atmos (#2633)
* Monstermos is a word!

* Atmos CVars

* Cache CVars in AtmosphereSystem.

Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-27 16:49:12 +01:00
DrSmugleaf
5c0cf1b1a0 Use 'new' expression in places where the type is evident for content (#2590)
* Content.Client

* Content.Benchmarks

* Content.IntegrationTests

* Content.Server

* Content.Server.Database

* Content.Shared

* Content.Tests

* Merge fixes

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2020-11-27 21:00:49 +11:00
20kdc
060d4566c4 Make RoundEndSystem properly reset & CommunicationsConsoleComponent less crashy (#2629) 2020-11-26 18:07:46 +01:00
Peter Wedder
32d8cc0c1e Rerun of "Add Reagent Grinder/Juicer" (#2570)
* commit skeleton reagent grinder component

* add reagentgrinder bounduserinterface, add suffix to grinder yml, add reagentgrinder sprites

* implement much more of the grinder ui functionality

* get more use out of hasbeaker bool

* complete wiring up most of the chamber/beaker UI controls

* remove whitelist prototype id. add grindable tag component

* add juiceable component

* rename boolparam to be clearer

* more juice

* add some juice reagents and apply them to their drink prototypes

* re add glassyellow

* implement juicing and results

* add time delay to grindjuice

* add reagent grinder visualizer, add reagent grinder sounds, fix some yaml errors too

* interface has clear indication of currennt operation, and busy status

* add ReagentGrinder to Client ignnored components

* Update Content.Client/GameObjects/Components/Kitchen/ReagentGrinderBoundUserInterface.cs

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

* Update Content.Client/GameObjects/Components/Kitchen/ReagentGrinderBoundUserInterface.cs

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

* Update Content.Shared/Kitchen/SharedReagentGrinderComponent.cs

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

* implemennt  sloth changes

* fix isbusy

* Disable grind/juice buttons if there's nothing to grind or juice, also some misc fixes

* unsubscribe from messages on remove + fix xmlcomment

* fix bounding box

* Add these to dictionary

* Add these to client ignore

* Whitespace and unneeded import fixes

* tommy's toes

* Where'd these newlines come from

* power

* improve bounding box

* Check power better & show contents when beaker is ejected

* check power here

* Disable eject buttons when running

* improve comments

* readwrite for viewvars on work time and capacity

* Address most of Sloth's reviews

* Make this cleaner

* add grindablecomponent to motherfucking everything

* Fix reviews

* some more null suppressions

* remove unused random field

Co-authored-by: scuffedjays <yetanotherscuffed@gmail.com>
Co-authored-by: namespace-Memory <66768086+namespace-Memory@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2020-11-26 23:53:42 +11:00