diff --git a/Content.Server/Light/Components/MatchstickComponent.cs b/Content.Server/Light/Components/MatchstickComponent.cs index 864ed2ae1a..871ea640ea 100644 --- a/Content.Server/Light/Components/MatchstickComponent.cs +++ b/Content.Server/Light/Components/MatchstickComponent.cs @@ -4,6 +4,7 @@ using Content.Shared.Interaction; using Content.Shared.Smoking; using Content.Shared.Sound; using Content.Shared.Temperature; +using Content.Server.Items; using Robust.Server.GameObjects; using Robust.Shared.Audio; using Robust.Shared.GameObjects; @@ -55,6 +56,19 @@ namespace Content.Server.Light.Components _pointLightComponent.Enabled = _currentState == SharedBurningStates.Lit; } + if (Owner.TryGetComponent(out ItemComponent? item)) + { + switch (_currentState) + { + case SharedBurningStates.Lit: + item.EquippedPrefix = "lit"; + break; + default: + item.EquippedPrefix = "unlit"; + break; + } + } + if (Owner.TryGetComponent(out AppearanceComponent? appearance)) { appearance.SetData(SmokingVisuals.Smoking, _currentState); diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/blunts.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/blunts.yml index 8e4ae7c7b6..5974b5cfea 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/blunts.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/blunts.yml @@ -2,20 +2,20 @@ id: Rollie parent: BaseSmokeable name: blunt - description: "A roll of dried plant matter wrapped in thin paper." + description: A roll of dried plant matter wrapped in thin paper. components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi - netsync: false - state: unlit-icon - - type: Tag - tags: - - Cigarette - - type: Clothing - sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi - Slots: [ mask ] - HeldPrefix: unlit - size: 1 - - type: Construction - graph: smokeableRollie - node: rollie + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi + netsync: false + state: unlit-icon + - type: Tag + tags: + - Cigarette + - type: Clothing + sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi + Slots: [ mask ] + HeldPrefix: unlit + size: 1 + - type: Construction + graph: smokeableRollie + node: rollie diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml index 5a848833b5..c7eadb2fe5 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cartons.yml @@ -4,70 +4,70 @@ name: Spessman's Smokes carton description: "A carton containing 6 packets of Spessman's Smokes." components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi - layers: - - state: closed - - type: Storage - capacity: 36 - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi - - type: StorageFill - contents: - - id: CigPackGreen - amount: 6 - - type: Appearance - visuals: - - type: BagOpenCloseVisualizer - openIcon: open + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi + layers: + - state: closed + - type: Storage + capacity: 36 + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/green.rsi + - type: StorageFill + contents: + - id: CigPackGreen + amount: 6 + - type: Appearance + visuals: + - type: BagOpenCloseVisualizer + openIcon: open - type: entity id: CigCartonRed parent: CigCartonGreen name: Dromedaryco carton - description: "A carton containing 6 packets of Dromedarycos." + description: A carton containing 6 packets of Dromedarycos. components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi - layers: - - state: closed - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi - - type: StorageFill - contents: - - id: CigPackRed - amount: 6 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi + layers: + - state: closed + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi + - type: StorageFill + contents: + - id: CigPackRed + amount: 6 - type: entity id: CigCartonBlue parent: CigCartonGreen name: AcmeCo carton - description: "A carton containing 6 packets of AcmeCo." + description: A carton containing 6 packets of AcmeCo. components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi - layers: - - state: closed - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi - - type: StorageFill - contents: - - id: CigPackBlue - amount: 6 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi + layers: + - state: closed + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi + - type: StorageFill + contents: + - id: CigPackBlue + amount: 6 - type: entity id: CigCartonBlack parent: CigCartonGreen name: Nomads carton - description: "A carton containing 6 packets of Nomads." + description: A carton containing 6 packets of Nomads. components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi - layers: - - state: closed - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi - - type: StorageFill - contents: - - id: CigPackBlack - amount: 6 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi + layers: + - state: closed + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi + - type: StorageFill + contents: + - id: CigPackBlack + amount: 6 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml index a2b473e0de..d11ac4330c 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/cigarette.yml @@ -5,21 +5,20 @@ id: Cigarette parent: BaseSmokeable name: cigarette - description: "A roll of tobacco and nicotine." + description: A roll of tobacco and nicotine. components: - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi - netsync: false - state: unlit-icon - - type: Tag - tags: - - Cigarette - - type: Clothing - netsync: false - sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi - Slots: [ mask ] - HeldPrefix: unlit - size: 1 - - type: Construction - graph: smokeableCigarette - node: cigarette + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi + netsync: false + state: unlit-icon + - type: Tag + tags: + - Cigarette + - type: Clothing + sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi + Slots: [ mask ] + HeldPrefix: unlit + size: 1 + - type: Construction + graph: smokeableCigarette + node: cigarette diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml index 7308ac01ce..fe21860de1 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/rolling_paper.yml @@ -2,7 +2,7 @@ parent: BaseItem name: pack of rolling paper id: PackPaperRolling - description: "A pack of thin pieces of paper used to make fine smokeables." + description: A pack of thin pieces of paper used to make fine smokeables. components: - type: Storage whitelist: @@ -22,35 +22,35 @@ - type: entity id: PaperRolling name: rolling paper - description: "A thin piece of paper used to make fine smokeables." + description: A thin piece of paper used to make fine smokeables. parent: BaseItem components: - - type: Stack - stackType: PaperRolling - max: 5 - count: 1 - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi - state: cigpaper - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi - size: 2 - - type: Tag - tags: - - RollingPaper + - type: Stack + stackType: PaperRolling + max: 5 + count: 1 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi + state: cigpaper + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi + size: 2 + - type: Tag + tags: + - RollingPaper - type: entity id: CigaretteFilter name: cigarette filter - description: "A strip of firm paper used as a filter for handmade cigarettes." + description: A strip of firm paper used as a filter for handmade cigarettes. parent: BaseItem components: - - type: Stack - stackType: CigaretteFilter - max: 5 - count: 1 - - type: Sprite - sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi - state: cigfilter - - type: Item - sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi + - type: Stack + stackType: CigaretteFilter + max: 5 + count: 1 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi + state: cigfilter + - type: Item + sprite: Objects/Consumable/Smokeables/Cigarettes/paper.rsi diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml index daff231cac..b5edd2e6ab 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml @@ -2,39 +2,39 @@ id: CigarCase parent: BaseItem name: cigar case - description: "A case for holding your cigars when you are not smoking them." + description: A case for holding your cigars when you are not smoking them. components: - - type: Sprite - netsync: false - sprite: Objects/Consumable/Smokeables/Cigars/case.rsi - layers: - - state: closed - - type: Storage - capacity: 8 - - type: Item - sprite: Objects/Consumable/Smokeables/Cigars/case.rsi - size: 8 - - type: StorageFill - contents: - - id: Cigar - amount: 8 - - type: StorageCounter - countTag: Cigar - - type: Appearance - visuals: - - type: BagOpenCloseVisualizer - openIcon: open - - type: StackVisualizer - composite: true - stackLayers: - - cigar1 - - cigar2 - - cigar3 - - cigar4 - - cigar5 - - cigar6 - - cigar7 - - cigar8 + - type: Sprite + netsync: false + sprite: Objects/Consumable/Smokeables/Cigars/case.rsi + layers: + - state: closed + - type: Storage + capacity: 8 + - type: Item + sprite: Objects/Consumable/Smokeables/Cigars/case.rsi + size: 8 + - type: StorageFill + contents: + - id: Cigar + amount: 8 + - type: StorageCounter + countTag: Cigar + - type: Appearance + visuals: + - type: BagOpenCloseVisualizer + openIcon: open + - type: StackVisualizer + composite: true + stackLayers: + - cigar1 + - cigar2 + - cigar3 + - cigar4 + - cigar5 + - cigar6 + - cigar7 + - cigar8 - type: entity id: CigarGoldCase @@ -42,7 +42,7 @@ name: premium cigar case description: "A case of premium Havanian cigars. You'll only see heads with these." components: - - type: StorageFill - contents: - - id: CigarGold - amount: 8 + - type: StorageFill + contents: + - id: CigarGold + amount: 8 diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml index b68e35f32c..1d23670ab7 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml @@ -26,7 +26,7 @@ id: CigarGold parent: Cigar name: premium Havanian cigar - description: "A cigar fit for only the best of the best." + description: A cigar fit for only the best of the best. components: - type: Sprite sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base.yml index 6e57950d40..81ac98606d 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/base.yml @@ -4,8 +4,8 @@ parent: BaseItem abstract: true components: - - type: Smoking - duration: 50 - - type: Appearance - visuals: - - type: BurnStateVisualizer + - type: Smoking + duration: 50 + - type: Appearance + visuals: + - type: BurnStateVisualizer diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/pipes.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/pipes.yml index e19351dfa4..6898a293a9 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/pipes.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/pipes.yml @@ -4,14 +4,14 @@ name: smoking pipe description: "A pipe, for smoking. Probably made of meershaum or something." components: - - type: Smoking - duration: 70 - - type: Sprite - sprite: Objects/Consumable/Smokeables/Pipes/pipe.rsi - netsync: false - state: unlit-icon - - type: Clothing - sprite: Objects/Consumable/Smokeables/Pipes/pipe.rsi - Slots: [ mask ] - HeldPrefix: unlit - size: 1 + - type: Smoking + duration: 70 + - type: Sprite + sprite: Objects/Consumable/Smokeables/Pipes/pipe.rsi + netsync: false + state: unlit-icon + - type: Clothing + sprite: Objects/Consumable/Smokeables/Pipes/pipe.rsi + Slots: [ mask ] + HeldPrefix: unlit + size: 1 diff --git a/Resources/Prototypes/Entities/Objects/Tools/matches.yml b/Resources/Prototypes/Entities/Objects/Tools/matches.yml index b87e081f3e..a07d27fc00 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/matches.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/matches.yml @@ -3,52 +3,53 @@ parent: BaseItem abstract: true components: - - type: Storage - capacity: 10 - - type: Item - size: 6 + - type: Storage + capacity: 10 + - type: Item + size: 6 - type: entity name: match stick parent: BaseItem id: Matchstick - description: "A simple match stick, used for lighting fine smokables." + description: A simple match stick, used for lighting fine smokables. components: - - type: Sprite - netsync: false - sprite: Objects/Tools/matches.rsi - layers: - - state: match_unlit - - type: Item - size: 1 - sprite: Objects/Tools/matches.rsi - - type: Matchstick - duration: 10 - igniteSound: - path: /Audio/Items/match_strike.ogg - - type: PointLight - enabled: false - radius: 1.1 - color: darkorange - - type: Appearance - visuals: - - type: BurnStateVisualizer - unlitIcon: match_unlit - litIcon: match_lit - burntIcon: match_burnt + - type: Sprite + netsync: false + sprite: Objects/Tools/matches.rsi + layers: + - state: match_unlit + - type: Item + sprite: Objects/Tools/matches.rsi + HeldPrefix: unlit + size: 1 + - type: Matchstick + duration: 10 + igniteSound: + path: /Audio/Items/match_strike.ogg + - type: PointLight + enabled: false + radius: 1.1 + color: darkorange + - type: Appearance + visuals: + - type: BurnStateVisualizer + unlitIcon: match_unlit + litIcon: match_lit + burntIcon: match_burnt - type: entity name: match box parent: SmallboxItem id: Matchbox - description: "A small box of Almost But Not Quite Plasma Premium Matches." + description: A small box of Almost But Not Quite Plasma Premium Matches. components: - - type: Matchbox - - type: Sprite - sprite: Objects/Tools/matches.rsi - layers: - - state: matchbox - - type: StorageFill - contents: - - id: Matchstick - amount: 6 + - type: Matchbox + - type: Sprite + sprite: Objects/Tools/matches.rsi + layers: + - state: matchbox + - type: StorageFill + contents: + - id: Matchstick + amount: 6 diff --git a/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-left.png b/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-left.png new file mode 100644 index 0000000000..ff3ed45885 Binary files /dev/null and b/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-right.png b/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-right.png new file mode 100644 index 0000000000..4c5f14d040 Binary files /dev/null and b/Resources/Textures/Objects/Tools/matches.rsi/lit-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/matches.rsi/meta.json b/Resources/Textures/Objects/Tools/matches.rsi/meta.json index c6ad839b21..4ceb4f63cc 100644 --- a/Resources/Textures/Objects/Tools/matches.rsi/meta.json +++ b/Resources/Textures/Objects/Tools/matches.rsi/meta.json @@ -36,12 +36,64 @@ "name": "matchbox_e" }, { - "name": "inhand-left", - "directions": "4" + "name": "unlit-inhand-left", + "directions": 4 }, { - "name": "inhand-right", - "directions": "4" + "name": "unlit-inhand-right", + "directions": 4 + }, + { + "name": "lit-inhand-left", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "lit-inhand-right", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ] + ] } ] } diff --git a/Resources/Textures/Objects/Tools/matches.rsi/inhand-left.png b/Resources/Textures/Objects/Tools/matches.rsi/unlit-inhand-left.png similarity index 100% rename from Resources/Textures/Objects/Tools/matches.rsi/inhand-left.png rename to Resources/Textures/Objects/Tools/matches.rsi/unlit-inhand-left.png diff --git a/Resources/Textures/Objects/Tools/matches.rsi/inhand-right.png b/Resources/Textures/Objects/Tools/matches.rsi/unlit-inhand-right.png similarity index 100% rename from Resources/Textures/Objects/Tools/matches.rsi/inhand-right.png rename to Resources/Textures/Objects/Tools/matches.rsi/unlit-inhand-right.png