Spray bottles with visible reagent contents (#42155)
* Spray bottles with visible reagent contents * Fixed cargo catalog to correctly reference the new spray bottle rsi * Fixed indentation on rsi meta files * Updated copyright in spray_bottle.rsi meta * Update Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml Co-authored-by: āda <ss.adasts@gmail.com> * Updated to follow yml convention, modified to inherit from DrinkBase and renamed fill textures * Fixed solution names * Updated solution name in BorgMegaSprayBottle * de-hardcode solution name * less breaking --------- Co-authored-by: āda <ss.adasts@gmail.com> Co-authored-by: iaada <iaada@users.noreply.github.com>
@@ -88,7 +88,7 @@ public sealed class SpraySystem : SharedSpraySystem
|
||||
|
||||
public override void Spray(Entity<SprayComponent> entity, MapCoordinates mapcoord, EntityUid? user = null)
|
||||
{
|
||||
if (!_solutionContainer.TryGetSolution(entity.Owner, SprayComponent.SolutionName, out var soln, out var solution))
|
||||
if (!_solutionContainer.TryGetSolution(entity.Owner, entity.Comp.Solution, out var soln, out var solution))
|
||||
return;
|
||||
|
||||
var ev = new SprayAttemptEvent(user);
|
||||
|
||||
@@ -9,24 +9,25 @@ namespace Content.Shared.Fluids.Components;
|
||||
[Access(typeof(SharedSpraySystem))]
|
||||
public sealed partial class SprayComponent : Component
|
||||
{
|
||||
public const string SolutionName = "spray";
|
||||
[DataField]
|
||||
public string Solution = "spray";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public FixedPoint2 TransferAmount = 10;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public float SprayDistance = 3.5f;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public float SprayVelocity = 3.5f;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public EntProtoId SprayedPrototype = "Vapor";
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public int VaporAmount = 1;
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField]
|
||||
[DataField]
|
||||
public float VaporSpread = 90f;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
- type: cargoProduct
|
||||
id: ServiceJanitorial
|
||||
icon:
|
||||
sprite: Objects/Specific/Janitorial/janitorial.rsi
|
||||
sprite: Objects/Specific/Janitorial/spray_bottle.rsi
|
||||
state: cleaner
|
||||
product: CrateServiceJanitorialSupplies
|
||||
cost: 560
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
- type: entity
|
||||
name: Plant-B-Gone
|
||||
parent: SprayBottleBase
|
||||
id: PlantBGoneSpray
|
||||
parent: SprayBottle
|
||||
description: Kills those pesky weeds!
|
||||
name: Plant-B-Gone
|
||||
suffix: "Filled"
|
||||
description: Kills those pesky weeds!
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
@@ -13,38 +13,32 @@
|
||||
state: plantbgone
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 100
|
||||
reagents:
|
||||
- ReagentId: PlantBGone
|
||||
Quantity: 100
|
||||
- type: DrainableSolution
|
||||
solution: spray
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/sprays.rsi
|
||||
heldPrefix: plantbgone
|
||||
|
||||
- type: entity
|
||||
name: weed spray
|
||||
parent: SprayBottleBase
|
||||
id: WeedSpray
|
||||
parent: SprayBottle
|
||||
description: It's a toxic mixture, in spray form, to kill small weeds.
|
||||
name: weed spray
|
||||
suffix: "Filled"
|
||||
description: It's a toxic mixture, in spray form, to kill small weeds.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/sprays.rsi
|
||||
state: weedspray
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 50
|
||||
reagents:
|
||||
- ReagentId: WeedKiller
|
||||
Quantity: 50
|
||||
- type: DrainableSolution
|
||||
solution: spray
|
||||
- type: Spillable
|
||||
solution: spray
|
||||
- type: Tag
|
||||
tags:
|
||||
- Spray
|
||||
@@ -54,22 +48,20 @@
|
||||
sprite: Objects/Tools/Hydroponics/sprays.rsi
|
||||
|
||||
- type: entity
|
||||
name: pest spray
|
||||
id: PestSpray
|
||||
parent: WeedSpray
|
||||
description: It's some pest eliminator spray! Do not inhale!
|
||||
id: PestSpray
|
||||
name: pest spray
|
||||
suffix: "Filled"
|
||||
description: It's some pest eliminator spray! Do not inhale!
|
||||
components:
|
||||
- type: Sprite
|
||||
state: pestspray
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 50
|
||||
reagents:
|
||||
- ReagentId: PestKiller
|
||||
Quantity: 50
|
||||
- type: DrainableSolution
|
||||
solution: spray
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/sprays.rsi
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
- type: entity
|
||||
name: spray bottle
|
||||
id: SprayBottle
|
||||
parent: BaseItem
|
||||
suffix: Empty
|
||||
description: A spray bottle with an unscrewable top.
|
||||
abstract: true
|
||||
parent: [ DrinkBaseMaterialPlastic, DrinkBase ]
|
||||
id: SprayBottleBase
|
||||
components:
|
||||
- type: Edible
|
||||
edible: Drink
|
||||
solution: spray
|
||||
destroyOnEmpty: false
|
||||
utensil: None
|
||||
solution: drink
|
||||
transferAmount: 10
|
||||
useSound:
|
||||
path: /Audio/Effects/spray3.ogg
|
||||
@@ -20,47 +16,62 @@
|
||||
- Spray
|
||||
- Trash
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Janitorial/janitorial.rsi
|
||||
sprite: Objects/Specific/Janitorial/spray_bottle.rsi
|
||||
state: cleaner
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Janitorial/janitorial.rsi
|
||||
sprite: Objects/Specific/Janitorial/spray_bottle.rsi
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 100
|
||||
- type: RefillableSolution
|
||||
solution: spray
|
||||
- type: DrainableSolution
|
||||
solution: spray
|
||||
- type: SolutionTransfer
|
||||
canChangeTransferAmount: true
|
||||
- type: SolutionItemStatus
|
||||
solution: spray
|
||||
- type: UseDelay
|
||||
- type: Spray
|
||||
solution: drink
|
||||
transferAmount: 10
|
||||
sprayVelocity: 2
|
||||
spraySound:
|
||||
path: /Audio/Effects/spray2.ogg
|
||||
- type: TrashOnSolutionEmpty
|
||||
solution: spray
|
||||
- type: ExaminableSolution
|
||||
solution: spray
|
||||
exactVolume: true
|
||||
solution: drink
|
||||
|
||||
- type: entity
|
||||
parent: [ SprayBottleBase, DrinkVisualsFill ]
|
||||
id: SprayBottle
|
||||
name: spray bottle
|
||||
suffix: Empty
|
||||
description: A spray bottle with an unscrewable top.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Janitorial/spray_bottle.rsi
|
||||
layers:
|
||||
- state: cleaner
|
||||
- state: cleaner-fill-1
|
||||
map: ["enum.SolutionContainerLayers.Fill"]
|
||||
visible: false
|
||||
- type: SolutionContainerVisuals
|
||||
fillBaseName: cleaner-fill-
|
||||
inHandsMaxFillLevels: 4
|
||||
|
||||
- type: entity
|
||||
name: mega spray bottle
|
||||
id: MegaSprayBottle
|
||||
parent: SprayBottle
|
||||
id: MegaSprayBottle
|
||||
name: mega spray bottle
|
||||
suffix: Empty
|
||||
description: A huge spray bottle, capable of unrivaled janitorial power.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Janitorial/janitorial.rsi
|
||||
state: cleaner_large
|
||||
sprite: Objects/Specific/Janitorial/spray_bottle.rsi
|
||||
layers:
|
||||
- state: cleaner_large
|
||||
- state: cleaner_large-fill-1
|
||||
map: ["enum.SolutionContainerLayers.Fill"]
|
||||
visible: false
|
||||
- type: SolutionContainerVisuals
|
||||
maxFillLevels: 7
|
||||
fillBaseName: cleaner_large-fill-
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 250
|
||||
- type: Spray
|
||||
transferAmount: 15
|
||||
@@ -71,31 +82,31 @@
|
||||
path: /Audio/Effects/spray2.ogg
|
||||
|
||||
- type: entity
|
||||
name: spray bottle
|
||||
id: SprayBottleWater
|
||||
suffix: Filled
|
||||
parent: SprayBottle
|
||||
id: SprayBottleWater
|
||||
name: spray bottle
|
||||
suffix: Filled
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Spray
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 100
|
||||
reagents:
|
||||
- ReagentId: Water
|
||||
Quantity: 100
|
||||
|
||||
- type: entity
|
||||
description: BLAM!-brand non-foaming space cleaner!
|
||||
id: SprayBottleSpaceCleaner
|
||||
parent: SprayBottle
|
||||
id: SprayBottleSpaceCleaner
|
||||
suffix: Space Cleaner
|
||||
description: BLAM!-brand non-foaming space cleaner!
|
||||
components:
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 100
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
@@ -109,12 +120,12 @@
|
||||
- type: entity
|
||||
parent: MegaSprayBottle
|
||||
id: MegaSprayBottleSpaceCleaner
|
||||
description: BLAM!-brand non-foaming space cleaner, now in a bigger package for those huge blood puddles!
|
||||
suffix: Space Cleaner
|
||||
description: BLAM!-brand non-foaming space cleaner, now in a bigger package for those huge blood puddles!
|
||||
components:
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 250
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
@@ -131,7 +142,7 @@
|
||||
components:
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 200
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
@@ -146,7 +157,7 @@
|
||||
components:
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
spray:
|
||||
drink:
|
||||
maxVol: 250
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
@@ -154,7 +165,7 @@
|
||||
- type: SolutionTransfer
|
||||
canSend: false # No giving away infinite space cleaner!
|
||||
- type: SolutionRegeneration
|
||||
solution: spray
|
||||
solution: drink
|
||||
generated:
|
||||
reagents:
|
||||
- ReagentId: SpaceCleaner
|
||||
@@ -163,8 +174,8 @@
|
||||
# Vapor
|
||||
- type: entity
|
||||
id: Vapor
|
||||
name: "vapor"
|
||||
categories: [ HideSpawnMenu ]
|
||||
name: "vapor"
|
||||
components:
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
@@ -198,8 +209,8 @@
|
||||
- type: VaporVisuals
|
||||
|
||||
- type: entity
|
||||
id: BigVapor
|
||||
parent: Vapor
|
||||
id: BigVapor
|
||||
categories: [ HideSpawnMenu ]
|
||||
components:
|
||||
- type: Sprite
|
||||
|
||||
|
Before Width: | Height: | Size: 411 B |
|
Before Width: | Height: | Size: 436 B |
|
Before Width: | Height: | Size: 339 B |
|
Before Width: | Height: | Size: 342 B |
@@ -1,79 +1,65 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/f8f4aeda930fcd0805ca4cc76d9bc9412a5b3428, mopbucket_shark_* by Psychpsyo, mopbucket_carpplush adapted by Psychpsyo from tgstation carpplush at commit https://github.com/tgstation/tgstation/commit/e1142f20f5e4661cb6845cfcf2dd69f864d67432, mopbucket_cube is monkey cube taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi and modified by Hrosts, Holocarp and Magicarp mopbucket sprites by TiniestShark (github)",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "cleaner"
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/f8f4aeda930fcd0805ca4cc76d9bc9412a5b3428, mopbucket_shark_* by Psychpsyo, mopbucket_carpplush adapted by Psychpsyo from tgstation carpplush at commit https://github.com/tgstation/tgstation/commit/e1142f20f5e4661cb6845cfcf2dd69f864d67432, mopbucket_cube is monkey cube taken from cev-eris at https://github.com/discordia-space/CEV-Eris/raw/9c980cb9bc84d07b1c210c5447798af525185f80/icons/obj/food.dmi and modified by Hrosts, Holocarp and Magicarp mopbucket sprites by TiniestShark (github)",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-1"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-2"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-3"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_blue"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_pink"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_grey"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_carpplush"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_magicarpplush"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_holocarpplush",
|
||||
"delays": [
|
||||
[
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_cube"
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "equipped-BELT",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
"states": [
|
||||
{
|
||||
"name": "mopbucket"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-1"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-2"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_water-3"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_blue"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_pink"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_shark_grey"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_carpplush"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_magicarpplush"
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_holocarpplush",
|
||||
"delays": [
|
||||
[
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1,
|
||||
0.1
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mopbucket_cube"
|
||||
},
|
||||
{
|
||||
"name": "equipped-BELT",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 178 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 151 B |
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 193 B |
|
After Width: | Height: | Size: 210 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 226 B |
|
After Width: | Height: | Size: 384 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 130 B |
|
After Width: | Height: | Size: 148 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 235 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 136 B |
|
After Width: | Height: | Size: 159 B |
|
After Width: | Height: | Size: 171 B |
|
After Width: | Height: | Size: 233 B |
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "cleaner, cleaner_large and in-hand sprites are from tgstation at commit https://github.com/tgstation/tgstation/commit/f8f4aeda930fcd0805ca4cc76d9bc9412a5b3428 and modified by chaisftw (GitHub), Fill levels created by chaisftw (GitHub) by modifying cleaner, cleaner_large and in-hand sprites",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "cleaner"
|
||||
},
|
||||
{
|
||||
"name": "cleaner-fill-1"
|
||||
},
|
||||
{
|
||||
"name": "cleaner-fill-2"
|
||||
},
|
||||
{
|
||||
"name": "cleaner-fill-3"
|
||||
},
|
||||
{
|
||||
"name": "cleaner-fill-4"
|
||||
},
|
||||
{
|
||||
"name": "cleaner-fill-5"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-1"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-2"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-3"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-4"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-5"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-6"
|
||||
},
|
||||
{
|
||||
"name": "cleaner_large-fill-7"
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left-fill-1",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left-fill-2",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left-fill-3",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-left-fill-4",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right-fill-1",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right-fill-2",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right-fill-3",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right-fill-4",
|
||||
"directions": 4
|
||||
}
|
||||
]
|
||||
}
|
||||