Refactor stacks to use prototypes (#3387)
* Refactor stacks to use prototypes * Fix not assigned warning * Add names to stacks * Make machine baords and material constructions use the name as well * Remove defaulting stacks to prototype id * Fix tests Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
parent: BaseItem
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.PaperRolling
|
||||
stackType: PaperRolling
|
||||
max: 5
|
||||
count: 1
|
||||
- type: Sprite
|
||||
@@ -39,7 +39,7 @@
|
||||
parent: BaseItem
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.CigaretteFilter
|
||||
stackType: CigaretteFilter
|
||||
max: 5
|
||||
count: 1
|
||||
- type: Sprite
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: steel
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Metal
|
||||
stackType: Steel
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: metal
|
||||
@@ -37,7 +37,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Metal
|
||||
stackType: Steel
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -51,7 +51,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: glass
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Glass
|
||||
stackType: Glass
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: glass
|
||||
@@ -66,7 +66,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Glass
|
||||
stackType: Glass
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -80,7 +80,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: rglass
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.ReinforcedGlass
|
||||
stackType: ReinforcedGlass
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: rglass
|
||||
@@ -95,7 +95,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
StackType: enum.StackType.ReinforcedGlass
|
||||
stackType: ReinforcedGlass
|
||||
count: 1
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: plasteel
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Plasteel
|
||||
stackType: Plasteel
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: plasteel
|
||||
@@ -125,7 +125,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Plasteel
|
||||
stackType: Plasteel
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -139,7 +139,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: gold
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Gold
|
||||
stackType: Gold
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/materials.rsi
|
||||
state: goldbar_30
|
||||
@@ -162,6 +162,7 @@
|
||||
sprite: Objects/Materials/materials.rsi
|
||||
state: goldbar_10
|
||||
- type: Stack
|
||||
stackType: GoldStack1
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -184,7 +185,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: plasma
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Plasma
|
||||
stackType: Plasma
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: plasma
|
||||
@@ -199,6 +200,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stackType: PlasmaStack1
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -212,7 +214,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: wood
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Wood
|
||||
stackType: Wood
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/materials.rsi
|
||||
state: wood
|
||||
@@ -227,6 +229,7 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stackType: WoodPlank1
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -240,7 +243,7 @@
|
||||
- key: enum.MaterialKeys.Stack
|
||||
mat: plastic
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Plastic
|
||||
stackType: Plastic
|
||||
- type: Sprite
|
||||
sprite: Objects/Materials/sheets.rsi
|
||||
state: plastic
|
||||
@@ -255,4 +258,5 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stackType: PlasticSheet1
|
||||
count: 1
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
graph: metalRod
|
||||
node: MetalRod
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.MetalRod
|
||||
stackType: MetalRod
|
||||
count: 50
|
||||
max: 50
|
||||
- type: FloorTile
|
||||
@@ -30,6 +30,6 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.MetalRod
|
||||
stackType: MetalRod
|
||||
count: 1
|
||||
max: 50
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
suffix: Full
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.Cable
|
||||
stackType: Cable
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/cables.rsi
|
||||
netsync: false
|
||||
@@ -27,7 +27,7 @@
|
||||
suffix: Full
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.HVCable
|
||||
stackType: HVCable
|
||||
- type: Sprite
|
||||
state: coilhv-30
|
||||
- type: Item
|
||||
@@ -50,10 +50,11 @@
|
||||
suffix: 1
|
||||
components:
|
||||
- type: Sprite
|
||||
state: coilhv-10
|
||||
state: coilhv-10
|
||||
- type: Item
|
||||
size: 3
|
||||
- type: Stack
|
||||
stackType: HVWireStack1
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -89,6 +90,7 @@
|
||||
- type: Item
|
||||
size: 3
|
||||
- type: Stack
|
||||
stackType: ApcExtensionCableStack1
|
||||
count: 1
|
||||
|
||||
- type: entity
|
||||
@@ -98,7 +100,7 @@
|
||||
suffix: Full
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.MVCable
|
||||
stackType: MVCable
|
||||
- type: Sprite
|
||||
state: coilmv-30
|
||||
- type: Item
|
||||
@@ -125,4 +127,5 @@
|
||||
- type: Item
|
||||
size: 3
|
||||
- type: Stack
|
||||
stackType: MVWireStack1
|
||||
count: 1
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
description: "Dried cannabis leaves, ready to be ground."
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.LeavesCannabisDried
|
||||
stackType: LeavesCannabisDried
|
||||
max: 5
|
||||
count: 1
|
||||
- type: SolutionContainer
|
||||
@@ -295,7 +295,7 @@
|
||||
description: "Ground cannabis, ready to take you on a trip."
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.GroundCannabis
|
||||
stackType: GroundCannabis
|
||||
max: 5
|
||||
count: 1
|
||||
- type: SolutionContainer
|
||||
@@ -329,7 +329,7 @@
|
||||
description: "Dried tobacco leaves, ready to be ground."
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.LeavesTobaccoDried
|
||||
stackType: LeavesTobaccoDried
|
||||
max: 5
|
||||
count: 1
|
||||
- type: SolutionContainer
|
||||
@@ -348,7 +348,7 @@
|
||||
description: "Ground tobacco, perfect for hand-rolled cigarettes."
|
||||
components:
|
||||
- type: Stack
|
||||
stacktype: enum.StackType.GroundTobacco
|
||||
stackType: GroundTobacco
|
||||
max: 5
|
||||
count: 1
|
||||
- type: SolutionContainer
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
parent: BaseItem
|
||||
abstract: true
|
||||
components:
|
||||
- type: Stack
|
||||
- type: Item
|
||||
- type: Healing
|
||||
|
||||
@@ -48,9 +47,9 @@
|
||||
heal:
|
||||
Heat: 10
|
||||
- type: Stack
|
||||
stackType: Ointment
|
||||
max: 5
|
||||
count: 5
|
||||
stacktype: enum.StackType.Ointment
|
||||
|
||||
- type: entity
|
||||
name: bruise pack
|
||||
@@ -65,9 +64,9 @@
|
||||
heal:
|
||||
Blunt: 10
|
||||
- type: Stack
|
||||
stackType: Brutepack
|
||||
max: 5
|
||||
count: 5
|
||||
stacktype: enum.StackType.Brutepack
|
||||
|
||||
- type: entity
|
||||
name: roll of gauze
|
||||
@@ -82,6 +81,6 @@
|
||||
# heal:
|
||||
# Blunt: 10
|
||||
- type: Stack
|
||||
stackType: Gauze
|
||||
max: 5
|
||||
count: 5
|
||||
stacktype: enum.StackType.Gauze
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
- plating
|
||||
- floor_steel
|
||||
- type: Stack
|
||||
stacktype: FloorTileSteel
|
||||
stackType: FloorTileSteel
|
||||
count: 1
|
||||
max: 8
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
- plating
|
||||
- floor_wood
|
||||
- type: Stack
|
||||
stacktype: FloorTileWood
|
||||
stackType: FloorTileWood
|
||||
count: 1
|
||||
max: 8
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
- plating
|
||||
- floor_white
|
||||
- type: Stack
|
||||
stacktype: FloorTileWhite
|
||||
stackType: FloorTileWhite
|
||||
count: 1
|
||||
max: 8
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
- plating
|
||||
- floor_dark
|
||||
- type: Stack
|
||||
stacktype: FloorTileDark
|
||||
stackType: FloorTileDark
|
||||
count: 1
|
||||
max: 8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user