]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
consistent use of ExaminableSolution
authoriaada <iaada@users.noreply.github.com>
Tue, 29 Jul 2025 19:02:02 +0000 (14:02 -0500)
committeriaada <iaada@users.noreply.github.com>
Tue, 29 Jul 2025 19:02:02 +0000 (14:02 -0500)
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks-cartons.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_base.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_glass.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_bottles_plastic.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_cups.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_flasks.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_fun.yml
Resources/Prototypes/Entities/Objects/Consumable/Drinks/drinks_special.yml

index 434e4c3f77702a24d37fc0450b768061a274d7dd..5abc7d0ef4c81d89ef1501268bd5535ac97ab58b 100644 (file)
@@ -1,7 +1,7 @@
 - type: entity
   abstract: true
   parent: [ DrinkBase, DrinkBaseMaterialCardboard, DrinkBaseOpenable, DrinkVisualsOpenable ]
-  id: DrinkCartonBaseLargeFull
+  id: DrinkCartonBaseLargeFull # todo rename DrinkCartonBaseFull to match bottles
   suffix: Full
   components:
   - type: Openable
@@ -22,7 +22,7 @@
 - type: entity
   abstract: true
   parent: DrinkCartonBaseLargeFull
-  id: DrinkCartonBaseFull
+  id: DrinkCartonBaseFull # todo rename DrinkCartonSmallBaseFull to match bottles
   components:
   - type: SolutionContainerManager
     solutions:
index 76a50ab5255c6ff1994bb5fac1ac648f68e7e61d..9856338fb19c915384daa22a96571606bcd84961 100644 (file)
     fillBaseName: fill-
     inHandsMaxFillLevels: 3
     inHandsFillBaseName: -fill-
+  - type: ExaminableSolution # If you can see the fill levels, you can see the unit count
+    solution: drink
 
 # Layered visualizer for an entity with fill levels
 - type: entity
     fillBaseName: fill-
     inHandsMaxFillLevels: 3
     inHandsFillBaseName: -fill-
+  - type: ExaminableSolution # If you can see the fill levels, you can see the unit count
+    solution: drink
 
 # Visualizer for an openable entity with fill levels, already filled
 - type: entity
index 7d597ab8c72cf2a16284c7d3fe93b764f3c2df36..b1d29188a4574a6ef8b44dfe4ab98cb4257ba52d 100644 (file)
@@ -29,8 +29,6 @@
   - type: Tag
     tags:
     - DrinkBottle
-  - type: ExaminableSolution
-    solution: drink
 
 - type: entity
   abstract: true
@@ -84,7 +82,7 @@
   - type: Sprite
     sprite: Objects/Consumable/Drinks/alco-bottle.rsi
     layers:
-      - state: icon_blue
+      - state: icon_blue # todo add "icon_empty" state
         map: ["enum.OpenableVisuals.Layer"]
       - state: fill-6
         map: ["enum.SolutionContainerLayers.Fill"]
   - type: Sprite
     sprite: Objects/Consumable/Drinks/grenadinebottle.rsi
     layers:
-    - state: icon
+    - state: icon_empty
       map: ["enum.OpenableVisuals.Layer"]
     - state: fill-6
       map: ["enum.SolutionContainerLayers.Fill"]
   - type: Sprite
     sprite: Objects/Consumable/Drinks/alco-bottle.rsi
     layers:
-      - state: icon_green
+      - state: icon_green # todo icon_empty
         map: ["enum.OpenableVisuals.Layer"]
       - state: fill-6
         map: ["enum.SolutionContainerLayers.Fill"]
 
 - type: entity
   parent: [DrinkVisualsAllFilled, DrinkBottleGlassBaseFull]
-  id: DrinkBeerGrowler # Needs to be renamed DrinkBeerBottleFull
+  id: DrinkBeerGrowler # todo Needs to be renamed DrinkBeerBottleFullGrowler
   name: beer growler  # beer it is. coffee. beer? coff-ee? be-er? c-o... b-e
   description: An alcoholic beverage made from malted grains, hops, yeast, and water. XL growler bottle.
   components:
index f55325df85f91572e545e88373cb0bfd4b67fdf4..1a12f11e348ce231f34b5bc5d3f9d514fd7b798b 100644 (file)
@@ -17,7 +17,6 @@
       drink:
         maxVol: 100
   - type: Sprite
-    state: icon
     sprite: Objects/Consumable/Drinks/generic_jug.rsi # fallback to generic plastic jug
   - type: TrashOnSolutionEmpty
     solution: drink
@@ -37,7 +36,6 @@
       drink:
         maxVol: 30
   - type: Sprite
-    state: icon
     sprite: Objects/Consumable/Drinks/waterbottle.rsi # fallback
   - type: FitsInDispenser
     solution: drink
index 4e1069d33bc2fdb42a95b69b5ee0416b28c5c6ef..e445abb88cbdaeddc26795873c7456a553eb58da 100644 (file)
@@ -22,7 +22,7 @@
 # A mug is a type of cup.[2]
 - type: entity
   abstract: true
-  parent: [DrinkBaseCup, DrinkBaseMaterialPorcelain] # Should use DrinkVisualsFill, but sprites have no in-hand
+  parent: [DrinkBaseCup, DrinkBaseMaterialPorcelain] # todo Should use DrinkVisualsFill, but inheritors have no in-hand and state names are wrong
   id: DrinkBaseMug
   name: mug
   description: A mug.
@@ -38,6 +38,8 @@
   - type: SolutionContainerVisuals
     maxFillLevels: 3
     fillBaseName: icon-
+  - type: ExaminableSolution # If you can see the fill levels, you can see the unit count
+    solution: drink
 
 ## Misc Cups
 
@@ -58,9 +60,6 @@
   name: teacup
   description: A plain white porcelain teacup.
   components:
-  - type: Icon
-    sprite: Objects/Consumable/Drinks/teacup.rsi
-    state: icon-vend-tea
   - type: Sprite
     sprite: Objects/Consumable/Drinks/teacup.rsi
     layers:
     - state: icon-4
       map: ["enum.SolutionContainerLayers.Fill"]
       visible: false
-  - type: Appearance
   - type: SolutionContainerVisuals
     maxFillLevels: 4
 
 - type: entity
-  parent: [ DrinkBaseCup, DrinkBaseMaterialGlass ]
+  parent: [ DrinkBaseCup, DrinkBaseMaterialGlass, DrinkVisualsFillOverlay ]
   id: DrinkGlassCoupeShaped
   name: coupe glass
   description: A classic thin neck coupe glass, the icon of fragile labels on crates around the galaxy.
   - type: Sprite
     sprite: Objects/Consumable/Drinks/glass_coupe_shape.rsi
     layers:
-    - state: icon
+    - state: icon # todo add "icon_empty" state to match DrinkVisualsFillOverlay
       map: [ "enum.SolutionContainerLayers.Base" ]
     - state: fill1
       map: [ "enum.SolutionContainerLayers.Fill" ]
       visible: false
     - state: icon-front
       map: [ "enum.SolutionContainerLayers.Overlay" ]
-  - type: Appearance
   - type: SolutionContainerVisuals
-    maxFillLevels: 5
-    fillBaseName: fill
+    fillBaseName: fill # todo rename to "fill-" to match DrinkVisualsFillOverlay
     inHandsMaxFillLevels: 1
-    inHandsFillBaseName: -fill-
-  - type: ExaminableSolution
-    solution: drink
 
 - type: entity
-  parent: [DrinkBaseCup, DrinkBaseMaterialCardboard]
+  parent: [DrinkBaseCup, DrinkBaseMaterialCardboard] # TODO should use DrinkVisualsFill but state names are wrong and no inhand
   id: DrinkWaterCup
   name: water cup
   description: A paper water cup.
     - DrinkCup
     - WhitelistChameleon
   - type: Appearance
+  - type: ExaminableSolution # If you can see the fill levels, you can see the unit count
+    solution: drink
   - type: TrashOnSolutionEmpty
     solution: drink
   - type: Clothing
         state: icon-4
   - type: SolutionContainerVisuals
     maxFillLevels: 4
-    fillBaseName: icon-
   - type: TrashOnSolutionEmpty
     solution: drink
 
         state: icon-4
   - type: SolutionContainerVisuals
     maxFillLevels: 4
-    fillBaseName: icon-
   - type: TrashOnSolutionEmpty
     solution: drink
 
         reagents:
         - ReagentId: Tea
           Quantity: 20
+  - type: Icon
+    sprite: Objects/Consumable/Drinks/teacup.rsi
+    state: icon-vend-tea
   - type: TrashOnSolutionEmpty
     solution: drink
 
           Quantity: 20
   - type: Sprite
     sprite: Objects/Consumable/Drinks/lean.rsi
-    state: icon
   - type: Item
     sprite: Objects/Consumable/Drinks/lean.rsi
   - type: TrashOnSolutionEmpty
index a41d67fac32d18c0cefebfee04de78e73bf3e29a..e40ef2188e1947b3141e3315adccbc19dcb7ac45 100644 (file)
@@ -1,6 +1,6 @@
 - type: entity
   abstract: true
-  parent: [DrinkBase, DrinkBaseMaterialStrongMetal, DrinkBaseOpenable]
+  parent: [DrinkBase, DrinkBaseMaterialStrongMetal, DrinkBaseOpenable, DrinkVisualsOpenable]
   id: FlaskBase
   components:
   - type: SolutionContainerManager
@@ -8,7 +8,6 @@
       drink:
         maxVol: 30
   - type: Sprite
-    state: icon
     sprite: Objects/Consumable/Drinks/flask.rsi
   - type: FitsInDispenser
     solution: drink
 # Flasks
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: [DrinkBase, DrinkBaseMaterialStrongMetal]
+  id: DrinkFlaskOld
+  name: old flask
+  description: A decrepit old flask, its lid seems to be missing.
+  components:
+  - type: SolutionContainerManager
+    solutions:
+      drink:
+        maxVol: 30
+  - type: Sprite
+    sprite: Objects/Consumable/Drinks/flask_old.rsi
+  - type: FitsInDispenser
+    solution: drink
+
+- type: entity
+  parent: FlaskBase
   id: DrinkShinyFlask
   name: shiny flask
   description: A shiny metal flask. It appears to have a Greek symbol inscribed on it.
@@ -31,7 +45,7 @@
     sprite: Objects/Consumable/Drinks/shinyflask.rsi
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkMREFlask
   suffix: Full
   name: MRE flask
@@ -49,7 +63,7 @@
     solution: drink
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkDetFlask
   name: inspector's flask
   description: A metal flask with a leather band and golden badge belonging to the inspector.
@@ -58,7 +72,7 @@
     sprite: Objects/Consumable/Drinks/detflask.rsi
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkHosFlask
   name: hos's flask
   description: A metal flask, fit for a hard working HoS.
@@ -67,7 +81,7 @@
     sprite: Objects/Consumable/Drinks/hosflask.rsi
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkFlask
   name: captain's flask
   description: A metal flask belonging to the captain.
@@ -76,7 +90,7 @@
     sprite: Objects/Consumable/Drinks/flask.rsi
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkFlaskBar
   name: bar flask
   description: A metal flask often given out by the bartender on loan. Don't forget to return it!
 
 - type: entity
   parent: FlaskBase
-  id: DrinkFlaskOld
-  name: old flask
-  description: A decrepit old flask, its lid seems to be missing.
-  components:
-  - type: Sprite
-    sprite: Objects/Consumable/Drinks/flask_old.rsi
-  - type: Openable # annoying hack
-    opened: true
-    closeable: false
-
-- type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
   id: DrinkLithiumFlask
   name: lithium flask
   description: A flask with a Lithium Atom symbol on it.
     sprite: Objects/Consumable/Drinks/lithiumflask.rsi
 
 - type: entity
-  parent: [FlaskBase, DrinkVisualsOpenable]
+  parent: FlaskBase
   id: DrinkVacuumFlask
   name: vacuum flask
   description: Keeping your drinks at the perfect temperature since 1892.
index 4875f22e8b36278499e213dbd114d1d27a825782..180030d78acd298a8e19c39b7e72971dc6c4894a 100644 (file)
@@ -1,5 +1,5 @@
 - type: entity
-  parent: [ DrinkBase, DrinkBaseMaterialPlastic, DrinkBaseOpenable, DrinkVisualsOpenable ] # Should use DrinkVisualAll, but sprite has no inhand
+  parent: [ DrinkBase, DrinkBaseMaterialPlastic, DrinkBaseOpenable, DrinkVisualsOpenable ] # todo Should use DrinkVisualAll, but sprite has no inhand
   id: DrinkSpaceGlue
   name: space glue tube
   description: High performance glue intended for maintenance of extremely complex mechanical equipment. DON'T DRINK!
index 806d75765d9d637342a407b71b3323069c665738..cb5d71665d70fa8bee665f0c5c20969b00fcef9f 100644 (file)
@@ -24,8 +24,6 @@
     maxFillLevels: 2
     fillBaseName: fill # TODO rename to "fill-" to match "DrinkVisualsFillOverlay"
     inHandsMaxFillLevels: 1
-  - type: ExaminableSolution
-    solution: drink
   - type: FitsInDispenser
     solution: drink
   - type: Tag
   - type: SolutionContainerManager
     solutions:
       drink:
-        maxVol: 20 # 20 might be too much
+        maxVol: 20 # might be too much
   - type: Item
     size: Tiny
   - type: SolutionTransfer