Refactors smoking to ECS, smoking actually makes you inhale reagents. (#4678)

This commit is contained in:
Vera Aguilera Puerto
2021-09-26 15:19:00 +02:00
committed by GitHub
parent 0767bd3777
commit f913d8361d
19 changed files with 284 additions and 150 deletions

View File

@@ -299,7 +299,7 @@
- CigPack
components:
- Seed
- Smoking
- Smokable
- type: ItemMapper
mapLayers:
hatchet:

View File

@@ -1,6 +1,6 @@
- type: entity
id: Rollie
parent: BaseSmokeable
parent: BaseCigar
name: blunt
description: A roll of dried plant matter wrapped in thin paper.
components:
@@ -19,3 +19,10 @@
- type: Construction
graph: smokeableRollie
node: rollie
- type: SolutionContainerManager
solutions:
smokable:
maxVol: 20
reagents:
- ReagentId: THC
Quantity: 10

View File

@@ -3,7 +3,7 @@
- type: entity
id: Cigarette
parent: BaseSmokeable
parent: BaseCigar
name: cigarette
description: A roll of tobacco and nicotine.
components:

View File

@@ -3,12 +3,10 @@
- type: entity
id: Cigar
parent: BaseSmokeable
parent: BaseCigar
name: cigar
description: "A brown roll of tobacco and... well, you're not quite sure."
components:
- type: Smoking
duration: 70
- type: Sprite
sprite: Objects/Consumable/Smokeables/Cigars/cigar.rsi
netsync: false

View File

@@ -1,11 +1,29 @@
- type: entity
description: "If you want to get cancer, might as well do it in style."
id: BaseSmokeable
id: BaseSmokable
parent: BaseItem
abstract: true
components:
- type: Smoking
duration: 50
- type: Smokable
- type: Sprite
netsync: false
- type: Appearance
visuals:
- type: BurnStateVisualizer
# Base for all cigars and cigarettes.
- type: entity
parent: BaseSmokable
id: BaseCigar
abstract: true
components:
- type: Cigar
- type: InjectableSolution
solution: smokable
- type: SolutionContainerManager
solutions:
smokable:
maxVol: 20
reagents:
- ReagentId: Nicotine
Quantity: 10

View File

@@ -1,17 +0,0 @@
- type: entity
id: SmokingPipe
parent: BaseSmokeable
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