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,7 +2,7 @@
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

View File

@@ -25,7 +25,7 @@
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
@@ -42,7 +42,7 @@
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
@@ -59,7 +59,7 @@
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

View File

@@ -5,7 +5,7 @@
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
@@ -15,7 +15,6 @@
tags:
- Cigarette
- type: Clothing
netsync: false
sprite: Objects/Consumable/Smokeables/Cigarettes/cigarette.rsi
Slots: [ mask ]
HeldPrefix: unlit

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,7 +22,7 @@
- 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
@@ -42,7 +42,7 @@
- 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

View File

@@ -2,7 +2,7 @@
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

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

@@ -12,7 +12,7 @@
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
@@ -20,8 +20,9 @@
layers:
- state: match_unlit
- type: Item
size: 1
sprite: Objects/Tools/matches.rsi
HeldPrefix: unlit
size: 1
- type: Matchstick
duration: 10
igniteSound:
@@ -41,7 +42,7 @@
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

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