Fixes cigarette animations and matches now have lit/unlit inhand sprites (#4480)

This commit is contained in:
Swept
2021-08-17 16:26:35 -07:00
committed by GitHub
parent 73849a5f52
commit ff44b83fd6
15 changed files with 267 additions and 201 deletions

View File

@@ -4,6 +4,7 @@ using Content.Shared.Interaction;
using Content.Shared.Smoking; using Content.Shared.Smoking;
using Content.Shared.Sound; using Content.Shared.Sound;
using Content.Shared.Temperature; using Content.Shared.Temperature;
using Content.Server.Items;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
@@ -55,6 +56,19 @@ namespace Content.Server.Light.Components
_pointLightComponent.Enabled = _currentState == SharedBurningStates.Lit; _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)) if (Owner.TryGetComponent(out AppearanceComponent? appearance))
{ {
appearance.SetData(SmokingVisuals.Smoking, _currentState); appearance.SetData(SmokingVisuals.Smoking, _currentState);

View File

@@ -2,7 +2,7 @@
id: Rollie id: Rollie
parent: BaseSmokeable parent: BaseSmokeable
name: blunt 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: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/blunt.rsi

View File

@@ -25,7 +25,7 @@
id: CigCartonRed id: CigCartonRed
parent: CigCartonGreen parent: CigCartonGreen
name: Dromedaryco carton name: Dromedaryco carton
description: "A carton containing 6 packets of Dromedarycos." description: A carton containing 6 packets of Dromedarycos.
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/red.rsi
@@ -42,7 +42,7 @@
id: CigCartonBlue id: CigCartonBlue
parent: CigCartonGreen parent: CigCartonGreen
name: AcmeCo carton name: AcmeCo carton
description: "A carton containing 6 packets of AcmeCo." description: A carton containing 6 packets of AcmeCo.
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/blue.rsi
@@ -59,7 +59,7 @@
id: CigCartonBlack id: CigCartonBlack
parent: CigCartonGreen parent: CigCartonGreen
name: Nomads carton name: Nomads carton
description: "A carton containing 6 packets of Nomads." description: A carton containing 6 packets of Nomads.
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/Cartons/black.rsi

View File

@@ -5,7 +5,7 @@
id: Cigarette id: Cigarette
parent: BaseSmokeable parent: BaseSmokeable
name: cigarette name: cigarette
description: "A roll of tobacco and nicotine." description: A roll of tobacco and nicotine.
components: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi
@@ -15,7 +15,6 @@
tags: tags:
- Cigarette - Cigarette
- type: Clothing - type: Clothing
netsync: false
sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi
Slots: [ mask ] Slots: [ mask ]
HeldPrefix: unlit HeldPrefix: unlit

View File

@@ -2,7 +2,7 @@
parent: BaseItem parent: BaseItem
name: pack of rolling paper name: pack of rolling paper
id: PackPaperRolling 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: components:
- type: Storage - type: Storage
whitelist: whitelist:
@@ -22,7 +22,7 @@
- type: entity - type: entity
id: PaperRolling id: PaperRolling
name: rolling paper 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 parent: BaseItem
components: components:
- type: Stack - type: Stack
@@ -42,7 +42,7 @@
- type: entity - type: entity
id: CigaretteFilter id: CigaretteFilter
name: cigarette filter 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 parent: BaseItem
components: components:
- type: Stack - type: Stack

View File

@@ -2,7 +2,7 @@
id: CigarCase id: CigarCase
parent: BaseItem parent: BaseItem
name: cigar case 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: components:
- type: Sprite - type: Sprite
netsync: false netsync: false

View File

@@ -26,7 +26,7 @@
id: CigarGold id: CigarGold
parent: Cigar parent: Cigar
name: premium Havanian 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: components:
- type: Sprite - type: Sprite
sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi

View File

@@ -12,7 +12,7 @@
name: match stick name: match stick
parent: BaseItem parent: BaseItem
id: Matchstick id: Matchstick
description: "A simple match stick, used for lighting fine smokables." description: A simple match stick, used for lighting fine smokables.
components: components:
- type: Sprite - type: Sprite
netsync: false netsync: false
@@ -20,8 +20,9 @@
layers: layers:
- state: match_unlit - state: match_unlit
- type: Item - type: Item
size: 1
sprite: Objects/Tools/matches.rsi sprite: Objects/Tools/matches.rsi
HeldPrefix: unlit
size: 1
- type: Matchstick - type: Matchstick
duration: 10 duration: 10
igniteSound: igniteSound:
@@ -41,7 +42,7 @@
name: match box name: match box
parent: SmallboxItem parent: SmallboxItem
id: Matchbox 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: components:
- type: Matchbox - type: Matchbox
- type: Sprite - type: Sprite

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

View File

@@ -36,12 +36,64 @@
"name": "matchbox_e" "name": "matchbox_e"
}, },
{ {
"name": "inhand-left", "name": "unlit-inhand-left",
"directions": "4" "directions": 4
}, },
{ {
"name": "inhand-right", "name": "unlit-inhand-right",
"directions": "4" "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
]
]
} }
] ]
} }

View File

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

View File

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B