Commit Graph

38 Commits

Author SHA1 Message Date
DrSmugleaf
fcd52fa90c Add ActionBlockerExtensions 2020-12-20 04:26:21 +01:00
Paul Ritter
d80ec927bb Removes some unused fields (#2603)
* removes some unused fields

* thats an oopsie

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2020-11-27 21:10:08 +11:00
derek
84230a47ad Eject verbs for chem and id console (#2098)
* chemmaster eject beaker

* reagentdispencer eject beaker

* idcardconsole eject ID

* implementing InteractUsing for IDCardConsole

* typos
2020-09-16 23:57:14 +02:00
DTanxxx
4d50666ee4 Make more Fields VV and more editable (#2051)
* Make more Fields VV and more editable

* Applied feedback

Co-authored-by: David Tan <>
2020-09-13 14:04:00 +02:00
nuke
753a627c75 Add text coloring for inspected solution containers, code cleanup (#2010)
* Initial commit

* remove helper

* fixes

* small fix
2020-09-10 00:32:31 +02:00
Exp
5120627ca2 Makes more fields VV (#2026)
* Some more VV

* Fixed build & some more gun vvs

* Added VendingMachine Inventory & Items
2020-09-08 13:30:22 +02:00
DrSmugleaf
de9dfefd61 Replace resolve dependency with attribute in components (#1995)
* Replace resolve dependency with attribute in components

* Add changes that went missing in translation
2020-09-02 01:30:03 +02:00
DrSmugleaf
8f9ed2f562 Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods (#1965)
* Replace usages of ISharedNotifyManager and IServerNotifyManager with extension methods

* Remove redundant code
2020-09-01 12:34:53 +02:00
DrSmugleaf
520e523d30 Refactor UserInterface properties to use a helper (#1896) 2020-08-24 20:47:17 +02:00
DrSmugleaf
a4a25a9975 Remove localization manager dependencies from components (#1864)
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-08-23 12:53:09 +02:00
DrSmugleaf
b9196d0a10 Add a test that puts all components on an entity and checks for no exceptions (#1815)
* Add test that puts all components on an entity and checks for no exceptions

Also fix all the exceptions that happened because of this

* Add comments to the test

* Fix nullable errors

* Fix more nullable errors

* More nullable error fixes

* Unignore basic actor component

* Fix more nullable errors

* NULLABLE ERROR

* Add string interpolation

* Merge if checks

* Remove redundant pragma warning disable 649

* Address reviews

* Remove null wrappers around TryGetComponent

* Merge conflict fixes

* APC battery component error fix

* Fix power test

* Fix atmos mapgrid usages
2020-08-22 22:29:20 +02:00
Víctor Aguilera Puerto
d9ae942759 Make InteractUsing async, make tools use DoAfter. (#1772)
* Make IInteractUsing async, make tools use DoAfter.

* Disable warning 1998 in Content.Server

* Update Content.Server/GameObjects/Components/AnchorableComponent.cs
2020-08-18 14:39:08 +02:00
DrSmugleaf
4a8ed41e3a Fix namespaces and optimize imports (#1651)
* Fix namespaces and optimize imports

* Cleanup fixes

* Merge conflict fixes

* Merge conflict fixes

* Merge conflict fixes
2020-08-13 14:40:27 +02:00
Exp
aaffd7e198 Chem Master & Dispenser Power Fixes (#1622)
* -ChemDispenser & Master can now open the UI without power
-Both can also eject beaker without power

* -Disables button if not powered
-Disables clear & eject buttons if no beaker

* Fix server freeze
2020-08-10 16:30:56 +02:00
DrSmugleaf
4b4e83d2bf Add changing the amount of hands on the GUI depending on your body parts (#1406)
* Multiple hands in gui first pass

* Remove IHandsComponent interface

* Create hand class and more hand textures

* Refactor ServerHandsComponent to use a single list of hands

* Seal SharedHand

* Fix picked up items not showing on top of the hand buttons

* Remove HandsGui buttons and panels dictionaries

* Fix items in hands rendering

* Fix wrong hand container comparison

* Fix not updating the location of duplicate hands

* Change ClientHandsComponent to use a SortedList instead of a dictionary

* More merge conflict fixes

* Change SortedList to List

* Fix hand button order

* Add item tooltip for more than 2 hands and updating when removing hands

* Add add hand and remove hand command

* Merge conflict fixes

* Remove nullable reference type from ContainerSlot

* Fix texture errors

* Fix error when reaching 0 hands

* Fix error when swapping hands with no hands

* Merged remove hand methods

* Fix item panel texture errors

* Merge conflict fixes

* Fix addhand and removehand command descriptions

* Add properly displaying tooltips for 2 hands

* Make hand indexes and locations consistent across the client and server

* Add dropping held entity if a hand is removed

* Change hand location to be calculated by index

* Made different hand gui updates more consistent

* Remove human body yml testing changes

* Sanitize addhand and removehand commands

* Merge conflict fixes

* Remove testing changes

* Revert body system changes

* Add missing imports

* Remove obsolete hands parameter in yml files

* Fix broken import

* Fix startup error and adding and removing hands on the same tick

* Make hand container id use an uint

In case someone gets more than 2 billion hands

* Rename hand component files

* Make hands state use an array
2020-07-25 15:11:16 +02:00
Acruid
ea94f4a182 Moved interaction interfaces from Server to Shared. 2020-07-18 22:51:56 -07:00
DrSmugleaf
8f685f0541 Merge branch 'master' into buckle-locker-fix-1262 2020-07-07 20:36:43 +02:00
AJCM-git
ae41d03ec6 Re-organizing the Resources folder. Part 1. (#1234)
* First commit

* Lockers

* Lockers electric boogaloo

* Crates and Lockers

* Almost finishing the Textures folder

* Updating texture paths. Reminder to fix:
* Lockers
* Windows
* Vending Machines
* APC
* Catwalks
* Bedsheets and Cloaks
* Status effects

* dont know what happened here

* Commit before merge

* re-organizing

* Lockers broken

* Commit before merge

* Submodule

* renaming

* Fixing most issues

* forgot these ones

* Updating submodule

* typo

* Fixing some paths

* fixing some paths

* updating submodule

* (hopefully) fixing the submodule
2020-07-07 19:19:00 +02:00
DrSmugleaf
b850ac2437 Merge branch 'master' into buckle-locker-fix-1262 2020-07-07 00:20:07 +02:00
chairbender
b35333d366 Click Drag Functionality + Refactor Interaction Interfaces (#1125)
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: ComicIronic <comicironic@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-07-06 23:27:03 +02:00
DrSmugleaf
81647d696e Disable interactions for entities in storage 2020-07-03 23:57:19 +02:00
py01
23cc6b1d4e Power Rework (#863)
Co-authored-by: py01 <pyronetics01@gmail.com>
2020-06-28 17:23:26 +02:00
Pieter-Jan Briers
da45a52325 WiP movement prediction. 2020-06-24 02:21:20 +02:00
Memory
21c41f28ed Refactor all references to AudioSystem functions now that the old ones are obsolete. (#1081)
Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
2020-06-07 15:55:15 +02:00
FL-OZ
53900b79e9 Rename SoundComponent and refactor its wrong usages. (#1036)
* Rename `SoundComponent` and refactor its wrong usages.

* Replace verbose IoC grabs with EntitySysetm.Get

* unused depend

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
2020-05-31 19:40:36 +02:00
Clyybber
1ad9a10050 Fix #274 (#927) 2020-05-23 17:23:25 +02:00
chairbender
6a4d78cfac Add interaction checks to all interactions (#923) 2020-05-23 11:27:31 +02:00
PrPleGoo
7d72e672fd Merge branch 'master' into DecimalReagents 2020-04-12 14:37:36 +02:00
Injazz
d400f77129 Chemistry revamp and bartending features
-Ability to mix drinks to create cocktails with shiny icons
-New Chemistry System which can relay chemistry events to corresponding components
-moved some solution logic from Shared to Server
-fixed some weird stuff with DrinkComponent
2020-04-08 15:53:15 +05:00
PrPleGoo
db83789d05 Merge remote-tracking branch 'upstream/master' into DecimalReagents 2020-04-05 11:37:03 +02:00
PrPleGoo
4e0242d47c Replace decimal with ReagentUnit 2020-04-05 11:36:12 +02:00
JiimBob
d645b1470e Added power checks
Added power checks to:
Reagent Dispenser
Medical Scanner
Lathes
Research Console
Vending Machines

Added power device component to:
chem dispenser prototype
medical scanner prototype

Fixes for #706
2020-03-21 15:37:22 -04:00
PrPleGoo
539214b1ad Some more int -> decimal conversions. Changed the use of the Solution constructor. 2020-03-21 16:22:35 +01:00
moneyl
493b80095d Chem dispenser attempts to eject into hands (#576)
Previously the chem dispenser eject button placed the container on top of the dispenser. Now it will attempt to place it in your active hand, then your secondary hand. If both hands are full then it'll place it on top of the dispenser like before.
2020-01-29 19:15:35 +01:00
moneyl
542428df32 Fixes the player being able to use the chem dispenser when they'… (#480)
* Fixes the player being able to use the chem dispenser when they're dead

Adds a check to `ReagentDispenserComponent.OnUiReceiveMessage()` that checks if the players `SpeciesComponent` has a damage state that prevents them from interacting with the chem dispenser.

* Switch to use ActionBlockSystem instead of checking SpeciesComponent directly
2019-11-29 17:04:36 +01:00
Pieter-Jan Briers
6630e454c6 Clean up reagent dispenser and make it slightly better. 2019-10-20 01:30:38 +02:00
moneyl
427836fec9 Add basic chemical reactions (#376)
* Add basic chemical reaction system

What it adds:
- Reactions defined in yaml with an arbitrary amount of reactants (can be catalysts), products, and effects.

What it doesn't add:
- Temperature dependent reactions
- Metabolism or other medical/health effects

* Add many common SS13 chemicals and reactions

Added many of the common SS13 medicines and other chemicals, and their chemical reactions. Note that many of them are lacking their effects since we don't have medical yet.

* Add ExplosiveReactionEffect

Shows how IReactionEffect can be implemented to have effects that occur with a reaction by adding ExplosionReactionEffect and the potassium + water explosion reaction.

* Move ReactionSystem logic into SolutionComponent

No need for this to be a system currently so the behavior for reaction checking has been moved into SolutionComponent. Now it only checks for reactions when a reagent or solution is added to a solution. Also fixed a bug with SolutionValidReaction incorrectly returning true.

* Move explosion logic out of ExplosiveComponent

Allows you to create explosions without needing to add an ExplosiveComponent to an entity first.

* Add SolutionComponent.SolutionChanged event. Trigger dispenser ui updates with it.

This removes the need for SolutionComponent having a reference to the dispenser it's in. Instead the dispenser subscribes to the event and updates it's UI whenever the event is triggered.

* Add forgotten checks

`SolutionComponent.TryAddReagent` and `SolutionComponent.TryAddSolution` now check to see if `skipReactionCheck` is false before checking for a chemical reaction to avoid unnecessarily checking themselves for a reaction again when `SolutionComponent.PerformReaction` calls either of them.

* Change SolutionComponent.SolutionChanged to an Action

The arguments for event handler have no use here, and any class that can access SolutionChanged can access the SolutionComponent so it can just be an Action with no arguments instead.
2019-10-11 22:57:16 +02:00
moneyl
963bb28f0f Reagent dispensers (#360)
* Expose more private values of Solution and SolutionComponent

Expose SolutionComponent.ContainedSolution and Solution.Contents. Both needed by ReagentDispenserComponent.

* Implement IExamine for SolutionComponent

Allows players to see the contents of a solution by examining the entity which contains it.

* Implement ReagentDispenserComponent

Adds ReagentDispenserComponent. A component which can add or remove reagents from a solution container. It's written in a general way so that it can be used for things such as the Chemical dispensers in chemistry, but also the booze and soda dispensers in the bar. 

The chemicals it may dispense are defined in yaml, similar to the way that vending machines define which entities they can dispense, by defining a reagent pack.

* Add chemical dispenser and equipment

Adds the chemical dispenser, beaker, large beaker, dropper, and a few more chemicals.

* Add booze and soda dispensers.

Adds the booze and soda dispensers, and a few chemicals for them to dispense. There's no drink mixing or drunkenness yet.

* Update engine submodule.

* Remove unneeded and commented out code

Had a few WIP notes and debug code bits I forgot to remove beforehand.

* Make SolutionComponent._containedSolution and it's values private again

- Remove `SolutionComponent.ContainedSolution` property, replace with specific access functions to maintain safety.
- Make Solution.Contents return a `ReadOnlyCollection` instead of `_contents` to prevent uncontrolled access to the Solution values.
- Add `SolutionComponent.RemoveAllSolution()`

* Update Content.Shared/Chemistry/Solution.cs

Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.

Co-Authored-By: Remie Richards <remierichards@gmail.com>

* Update Content.Shared/GameObjects/Components/Chemistry/SolutionComponent.cs

Commits a suggestion from RemieRichards to match the coding style of the rest of the codebase. Using `IReadOnlyList` instead of `IReadOnlyCollection`.

Co-Authored-By: Remie Richards <remierichards@gmail.com>

* Add import for IReadOnlyList to Shared/SolutionComponent.cs

* Add documentation

* Improve localization

Improve use of ILocalizationManager.

* Resolve ReagentDispenserWindow._localizationManager before using it

Forgot to do this in the last commit, resulting in a crash. Oops.

* Add SolutionCaps.FitsInDispenser. Use in ReagentDispenserComponent.

Used to limit large containers like buckets or mop buckets from being placed in a dispenser. Both have large capacities (500) and weren't designed to hold certain chemicals like a beaker is, so for now they can be blocked from being put in a dispenser by giving them that flag.

* Add colors to new reagents

* Update engine submodule
2019-10-05 15:10:05 +02:00