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.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);

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

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": "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
]
]
}
]
}

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