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);
[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>
- type: cargoProduct
id: ServiceJanitorial
icon:
- sprite: Objects/Specific/Janitorial/janitorial.rsi
+ sprite: Objects/Specific/Janitorial/spray_bottle.rsi
state: cleaner
product: CrateServiceJanitorialSupplies
cost: 560
- 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:
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
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
- 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
- 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
path: /Audio/Effects/spray2.ogg
- type: entity
- name: spray bottle
+ parent: SprayBottle
id: SprayBottleWater
+ name: spray bottle
suffix: Filled
- parent: SprayBottle
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
- 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
components:
- type: SolutionContainerManager
solutions:
- spray:
+ drink:
maxVol: 200
reagents:
- ReagentId: SpaceCleaner
components:
- type: SolutionContainerManager
solutions:
- spray:
+ drink:
maxVol: 250
reagents:
- ReagentId: SpaceCleaner
- type: SolutionTransfer
canSend: false # No giving away infinite space cleaner!
- type: SolutionRegeneration
- solution: spray
+ solution: drink
generated:
reagents:
- ReagentId: SpaceCleaner
# Vapor
- type: entity
id: Vapor
- name: "vapor"
categories: [ HideSpawnMenu ]
+ name: "vapor"
components:
- type: SolutionContainerManager
solutions:
- type: VaporVisuals
- type: entity
- id: BigVapor
parent: Vapor
+ id: BigVapor
categories: [ HideSpawnMenu ]
components:
- type: Sprite
{
- "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
+ }
+ ]
}
--- /dev/null
+{
+ "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
+ }
+ ]
+}