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
This commit is contained in:
committed by
Pieter-Jan Briers
parent
0cc980b26a
commit
963bb28f0f
@@ -6,4 +6,10 @@
|
||||
- type: reagent
|
||||
id: chem.H2O
|
||||
name: Water
|
||||
desc: A tasty colorless liquid.
|
||||
desc: A tasty colorless liquid.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ice
|
||||
name: Ice
|
||||
desc: Frozen water.
|
||||
color: "#bed8e6"
|
||||
29
Resources/Prototypes/Reagents/drinks.yml
Normal file
29
Resources/Prototypes/Reagents/drinks.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
- type: reagent
|
||||
id: chem.Whiskey
|
||||
name: Whiskey
|
||||
desc: An alcoholic beverage made from fermented grain mash
|
||||
|
||||
- type: reagent
|
||||
id: chem.Ale
|
||||
name: Ale
|
||||
desc: A type of beer brewed using a warm fermentation method, resulting in a sweet, full-bodied and fruity taste.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Wine
|
||||
name: Wine
|
||||
desc: An alcoholic drink made from fermented grapes
|
||||
|
||||
- type: reagent
|
||||
id: chem.Cola
|
||||
name: Cola
|
||||
desc: A sweet, carbonated soft drink. Caffeine free.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Coffee
|
||||
name: Coffee
|
||||
desc: A drink made from brewed coffee beans. Contains a moderate amount of caffeine.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Tea
|
||||
name: Tea
|
||||
desc: A made by boiling leaves of the tea tree, Camellia sinensis.
|
||||
@@ -13,4 +13,37 @@
|
||||
name: Sulfur
|
||||
desc: A yellow, crystalline solid.
|
||||
color: "#FFFACD"
|
||||
|
||||
|
||||
- type: reagent
|
||||
id: chem.C
|
||||
name: Carbon
|
||||
desc: A black, crystalline solid.
|
||||
color: "#22282b"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Al
|
||||
name: Aluminum
|
||||
desc: A silvery-white, soft, non-magnetic, and ductile metal.
|
||||
color: "#848789"
|
||||
|
||||
- type: reagent
|
||||
id: chem.Cu
|
||||
name: Copper
|
||||
desc: A soft, malleable, and ductile metal with very high thermal and electrical conductivity.
|
||||
color: "#b05b3c"
|
||||
|
||||
- type: reagent
|
||||
id: chem.N2
|
||||
name: Nitrogen
|
||||
desc: A colorless, odorless unreactive gas. Highly stable.
|
||||
|
||||
- type: reagent
|
||||
id: chem.Fe
|
||||
name: Iron
|
||||
desc: A silvery-grey metal which forms iron oxides (rust) with contact with air. Commonly alloyed with other elements to create alloys such as steel.
|
||||
color: "#434b4d"
|
||||
|
||||
- type: reagent
|
||||
id: chem.F2
|
||||
name: Fluorine
|
||||
desc: A highly toxic pale yellow gas. Extremely reactive.
|
||||
Reference in New Issue
Block a user