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>
This commit is contained in:
Peter Wedder
2020-11-26 14:53:42 +02:00
committed by GitHub
parent 4b77f27e77
commit 32d8cc0c1e
20 changed files with 1347 additions and 42 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,35 @@
- type: entity
id: KitchenReagentGrinder
name: reagent grinder
suffix: grinder/juicer
placement:
mode: SnapgridCenter
components:
- type: SnapGrid
offset: Center
- type: ReagentGrinder
- type: UserInterface
interfaces:
- key: enum.ReagentGrinderUiKey.Key
type: ReagentGrinderBoundUserInterface
- type: Appearance
visuals:
- type: ReagentGrinderVisualizer
- type: Clickable
- type: InteractionOutline
- type: PowerReceiver
- type: LoopingSound
- type: Physics
shapes:
- !type:PhysShapeAabb
bounds: "-0.35,-0.08,0.25,0.15"
layer:
- Opaque
- Impassable
- MobImpassable
- VaultImpassable
- type: Sprite
netsync: false
sprite: Constructible/Power/juicer.rsi
state: juicer0
drawdepth: Items

View File

@@ -27,6 +27,7 @@
Quantity: 5
- type: Produce
seed: wheat
- type: Grindable
- type: entity
name: sugarcane
@@ -46,6 +47,7 @@
Quantity: 5
- type: Produce
seed: sugarcane
- type: Grindable
- type: entity
name: tower-cap log
@@ -79,6 +81,12 @@
sprite: Objects/Specific/Hydroponics/banana.rsi
- type: Produce
seed: banana
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.BananaJuice
Quantity: 10
- type: entity
name: carrot
@@ -96,6 +104,12 @@
sprite: Objects/Specific/Hydroponics/carrot.rsi
- type: Produce
seed: carrots
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.CarrotJuice
Quantity: 10
- type: entity
name: lemon
@@ -113,6 +127,12 @@
sprite: Objects/Specific/Hydroponics/lemon.rsi
- type: Produce
seed: lemon
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.LimeJuice
Quantity: 10
- type: entity
name: potato
@@ -130,6 +150,12 @@
sprite: Objects/Specific/Hydroponics/potato.rsi
- type: Produce
seed: potato
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.PotatoJuice
Quantity: 10
- type: entity
name: tomato
@@ -147,6 +173,12 @@
sprite: Objects/Specific/Hydroponics/tomato.rsi
- type: Produce
seed: tomato
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.TomatoJuice
Quantity: 10
- type: entity
name: eggplant
@@ -164,6 +196,7 @@
sprite: Objects/Specific/Hydroponics/eggplant.rsi
- type: Produce
seed: eggplant
- type: Grindable
- type: entity
name: apple
@@ -181,6 +214,12 @@
sprite: Objects/Specific/Hydroponics/apple.rsi
- type: Produce
seed: apple
- type: Grindable
- type: Juiceable
result:
reagents:
- ReagentId: chem.AppleJuice
Quantity: 10
- type: entity
name: ear of corn
@@ -199,6 +238,7 @@
sprite: Objects/Specific/Hydroponics/corn.rsi
- type: Produce
seed: corn
- type: Grindable
- type: entity
name: chanterelle cluster
@@ -216,3 +256,4 @@
sprite: Objects/Specific/Hydroponics/chanterelle.rsi
- type: Produce
seed: chanterelle
- type: Grindable

View File

@@ -165,11 +165,17 @@
- type: entity
parent: DrinkGlassBase
id: DrinkBerryjJice
id: DrinkBerryJuice
name: berry juice
description: A delicious blend of several different kinds of berries.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.BerryJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/berryjuice.rsi
@@ -252,6 +258,12 @@
description: Has a uniquely sweet flavour of concentrated carrots.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.CarrotJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/carrotjuice.rsi
@@ -564,6 +576,12 @@
description: The sweet-sour juice of limes.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.LimeJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_green.rsi
@@ -575,9 +593,31 @@
description: Liquid extract of the orange tree fruit, produced by squeezing or reaming oranges.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.OrangeJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_orange.rsi
- type: entity
parent: DrinkGlassBase
id: DrinkGlassYellow
name: lemon juice
description: Used to make lemonade, soft drinks, and cocktails.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.LemonJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_yellow.rsi
- type: entity
parent: DrinkGlassBase
@@ -586,6 +626,12 @@
description: Juice made from tomatoes, usually used as a beverage, either plain or in cocktails
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.TomatoJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_red.rsi
@@ -605,18 +651,6 @@
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_white.rsi
- type: entity
parent: DrinkGlassBase
id: DrinkGlassYellow
name: lemon juice
description: ''
components:
- type: Drink
- type: Sprite
sprite: Objects/Consumable/Drinks/glass_yellow.rsi
- type: entity
parent: DrinkGlassBase
id: DrinkGoldschlagerGlass
@@ -635,6 +669,12 @@
description: The juice is often sold in stores or fermented and made into wine, brandy, or vinegar.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.GrapeJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/grapejuice.rsi
@@ -903,6 +943,12 @@
description: Used to make lemonade, soft drinks, and cocktails.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.LemonJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/lemonjuice.rsi
@@ -914,6 +960,14 @@
description: A tangy substance made of lime and lemon.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.LemonJuice
Quantity: 10
- ReagentId: chem.LimeJuice
Quantity: 10
- type: Sprite
sprite: Objects/Consumable/Drinks/lemonlime.rsi
@@ -925,6 +979,12 @@
description: The sweet-sour juice of limes.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.LimeJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/limejuice.rsi
@@ -1100,6 +1160,12 @@
description: Liquid extract of the orange tree fruit, produced by squeezing or reaming oranges.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.OrangeJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/orangejuice.rsi
@@ -1122,6 +1188,12 @@
description: A tasty juice blended from various kinds of very deadly and toxic berries.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.PoisonBerryJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/poisonberryjuice.rsi
@@ -1521,9 +1593,15 @@
parent: DrinkGlassBase
id: DrinkTomatoJuice
name: tomato juice
description: Juice made from tomatoes, usually used as a beverage, either plain or in cocktails
description: Juice made from tomatoes, usually used as a beverage, either plain or in cocktails.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.TomatoJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/tomatojuice.rsi
@@ -1612,6 +1690,12 @@
description: Delicious juice made from watermelon.
components:
- type: Drink
- type: SolutionContainer
maxVol: 20
contents:
reagents:
- ReagentId: chem.WatermelonJuice
Quantity: 20
- type: Sprite
sprite: Objects/Consumable/Drinks/watermelon.rsi

File diff suppressed because it is too large Load Diff

View File

@@ -182,7 +182,7 @@
- type: reagent
id: chem.Tea
name: tea
desc: A made by boiling leaves of the tea tree, Camellia sinensis.
desc: A drink made by boiling leaves of the tea tree, Camellia sinensis.
physicalDesc: aromatic
color: "#8a5a3a"
metabolism:
@@ -253,3 +253,152 @@
metabolism:
- !type:DefaultDrink
rate: 1
#Juices
- type: reagent
id: chem.AppleJuice
name: apple juice
desc: It's a little piece of Eden.
physicalDesc: crisp
color: "#FDAD01"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.BerryJuice
name: berry juice
desc: A delicious blend of several different kinds of berries.
physicalDesc: sweet
color: "#660099"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.BananaJuice
name: banana juice
desc: The raw essence of a banana. HONK.
physicalDesc: crisp
color: "#FFE777"
metabolism:
- !type:DefaultDrink
rate: 1
#TODO: port on_mob_life: restore eyesight
#if(..())
#return 1
# M.eye_blurry = max(M.eye_blurry - 1 , 0)
# M.eye_blind = max(M.eye_blind - 1 , 0)
# switch(data)
# if(21 to INFINITY)
# if(prob(data - 10))
# M.disabilities &= ~NEARSIGHTED
# data++
- type: reagent
id: chem.CarrotJuice
name: carrot juice
desc: It's like a carrot, but less crunchy.
physicalDesc: crisp
color: "#FF8820"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.LimeJuice
name: lime juice
desc: The sweet-sour juice of limes.
physicalDesc: citric
color: "#99bb43"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.LemonJuice
name: lemon juice
desc: This juice is VERY sour.
physicalDesc: citric
color: "#fff690"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.GrapeJuice
name: grape juice
desc: Freshly squeezed juice from red grapes. Quite sweet.
physicalDesc: crisp
color: "#512284"
metabolism:
- !type:DefaultDrink
rate: 1
# /datum/reagent/drink/orangejuice/on_mob_life(var/mob/living/M)
# if(..())
# return 1
# if(M.getToxLoss() && prob(20))
# M.adjustToxLoss(-REM)
- type: reagent
id: chem.OrangeJuice
name: orange juice
desc: Both delicious AND rich in Vitamin C. What more do you need?
physicalDesc: citric
color: "#E78108"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.TomatoJuice
name: tomato juice
desc: Tomatoes made into juice. What a waste of good tomatoes, huh?
physicalDesc: saucey
color: "#731008"
metabolism:
- !type:DefaultDrink
rate: 1
# /datum/reagent/drink/poisonberryjuice/on_mob_life(var/mob/living/M)
# if(..())
# return 1
# M.adjustToxLoss(1)
- type: reagent
id: chem.PoisonBerryJuice
name: poison berry juice
desc: A surprisingly tasty juice blended from various kinds of very deadly and toxic berries.
physicalDesc: aromatic #maybe should be 'sickly'?
color: "#6600CC"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.WatermelonJuice
name: water melon juice
desc: The delicious juice of a watermelon.
physicalDesc: sweet
color: "#EF3520"
metabolism:
- !type:DefaultDrink
rate: 1
- type: reagent
id: chem.PotatoJuice
name: potato juice
desc: Juice of the potato. Bleh.
physicalDesc: starchy
color: "#302000"
metabolism:
- !type:DefaultDrink
rate: 1

Binary file not shown.

After

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

View File

@@ -0,0 +1 @@
{"license": "CC-BY-SA 3.0", "copyright": "https://github.com/tgstation/tgstation/commit/59f2a4e10e5ba36033c9734ddebfbbdc6157472d","version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "juicer0", "directions": 1, "delays": [[1.0]]}, {"name": "juicer1", "directions": 1, "delays": [[1.0]]}]}