Crane barrel (#672)

* crane barrel

* fix

* sprite resize, file rename

---------

Co-authored-by: Ed <96445749+TheShuEd@users.noreply.github.com>
This commit is contained in:
Nim
2024-12-16 10:43:29 +02:00
committed by GitHub
parent 862df73ff2
commit a248c176ae
15 changed files with 205 additions and 16 deletions

View File

@@ -1,7 +1,27 @@
- type: entity
id: CP14BarrelSolution
abstract: true
components:
- type: InteractionOutline
- type: Appearance
- type: DrainableSolution
solution: barrel
- type: MixableSolution
solution: barrel
- type: RefillableSolution
solution: barrel
- type: DrawableSolution
solution: barrel
- type: DumpableSolution
solution: barrel
- type: Drink
solution: barrel
- type: entity
id: CP14BaseBarrel
parent:
- BaseStructureDynamic
- CP14BarrelSolution
- CP14BaseFlammable
name: wooden barrel
suffix: Empty
@@ -24,7 +44,7 @@
False: {visible: true}
- type: Sprite
drawdepth: Mobs
sprite: _CP14/Structures/Furniture/barrel.rsi
sprite: _CP14/Structures/Furniture/Barrels/barrel.rsi
noRot: true
layers:
- state: barrel_open
@@ -35,7 +55,6 @@
map: ["enum.OpenableVisuals.Layer"]
- type: Transform
noRot: true
- type: InteractionOutline
- type: Physics
- type: Construction
graph: CP14BaseBarrel
@@ -87,7 +106,6 @@
collection: WoodDestroy
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Appearance
- type: SolutionContainerManager
solutions:
barrel:
@@ -95,20 +113,8 @@
- type: SolutionContainerVisuals
maxFillLevels: 5
fillBaseName: liq
- type: DrainableSolution
solution: barrel
- type: ExaminableSolution
solution: barrel
- type: MixableSolution
solution: barrel
- type: RefillableSolution
solution: barrel
- type: DrawableSolution
solution: barrel
- type: DumpableSolution
solution: barrel
- type: Drink
solution: barrel
- type: entity
id: CP14BarrelWater

View File

@@ -0,0 +1,153 @@
- type: entity
id: CP14CraneBarrel
parent: [BaseStructure, CP14BarrelSolution, CP14BaseFlammable]
name: wooden crane barrel
description: Large lying barrel with tap, for storing valuable liquids.
suffix: Empty
categories: [ ForkFiltered ]
components:
- type: Sprite
drawdepth: Mobs
sprite: _CP14/Structures/Furniture/Barrels/crane_barrel.rsi
layers:
- state: barrel
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Wood
- type: Transform
- type: Anchorable
delay: 3
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 80
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 5
behaviors:
- !type:SolutionExplosionBehavior
solution: barrel
- trigger:
!type:DamageTypeTrigger
damageType: Piercing
damage: 5
behaviors:
- !type:SolutionExplosionBehavior
solution: barrel
- trigger:
!type:DamageTrigger
damage: 25
behaviors:
- !type:SpillBehavior
solution: barrel
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
- !type:DoActsBehavior
acts: ["Destruction"]
- type: SolutionContainerManager
solutions:
barrel:
maxVol: 500
- type: entity
parent: CP14CraneBarrel
id: CP14CraneBarrelBeer
suffix: Beer
categories: [ ForkFiltered ]
components:
- type: SolutionContainerManager
solutions:
barrel:
reagents:
- ReagentId: Beer
Quantity: 500
- type: entity
id: CP14CraneBarrelSmall
parent: [BaseStructureDynamic, CP14BarrelSolution, CP14BaseFlammable]
name: wooden small crane barrel
description: A small lying barrel with a tap to quickly pour liquid into mugs.
suffix: Empty
categories: [ ForkFiltered ]
placement:
mode: SnapgridCenter
components:
- type: Sprite
drawdepth: Mobs
sprite: _CP14/Structures/Furniture/Barrels/crane_barrel_small.rsi
layers:
- state: barrel
- type: Transform
anchored: true
noRot: true
- type: Pullable
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
density: 200
mask:
- TabletopMachineMask
layer:
- TabletopMachineLayer
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 5
behaviors:
- !type:SolutionExplosionBehavior
solution: barrel
- trigger:
!type:DamageTypeTrigger
damageType: Piercing
damage: 5
behaviors:
- !type:SolutionExplosionBehavior
solution: barrel
- trigger:
!type:DamageTrigger
damage: 15
behaviors:
- !type:SpillBehavior
solution: barrel
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
- !type:DoActsBehavior
acts: ["Destruction"]
- type: SolutionContainerManager
solutions:
barrel:
maxVol: 50
- type: entity
parent: CP14CraneBarrelSmall
id: CP14CraneBarrelSmallBeer
suffix: Beer
categories: [ ForkFiltered ]
components:
- type: SolutionContainerManager
solutions:
barrel:
reagents:
- ReagentId: Beer
Quantity: 50

View File

@@ -26,7 +26,7 @@
targetNode: CP14BaseBarrel
category: construction-category-furniture
icon:
sprite: _CP14/Structures/Furniture/barrel.rsi
sprite: _CP14/Structures/Furniture/Barrels/barrel.rsi
state: barrel
objectType: Structure
placementMode: PlaceFree

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@@ -0,0 +1,15 @@
{
"version": 1,
"license": "CLA",
"copyright": "created by vladimir.s",
"size": {
"x": 48,
"y": 48
},
"states": [
{
"name": "barrel",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,15 @@
{
"version": 1,
"license": "CLA",
"copyright": "created by vladimir.s",
"size": {
"x": 32,
"y": 48
},
"states": [
{
"name": "barrel",
"directions": 4
}
]
}