Fire update (#602)

* fire spread fixes and optimization

* fix liquid drops nefty and suffix

* some sharedization

* melee fire extinguish

* clean up fireSpread system

* caution popup

* cuffable zombies

* fix zombie AI

* lighter

* torch integration attempt

* fix torch igniting

* yml tweaks

* bonus flammable damage
This commit is contained in:
Ed
2024-11-21 22:01:14 +03:00
committed by GitHub
parent 4fcfab972d
commit 96fc06a443
48 changed files with 554 additions and 100 deletions

View File

@@ -59,6 +59,7 @@
- id: CP14Rope
- id: CP14Nail10
- id: CP14EnergyCrystalSmall
- id: CP14Lighter
- id: CP14BaseSharpeningStone
- !type:NestedSelector
tableId: CP14RandomVials

View File

@@ -76,7 +76,7 @@
- state: inhand-right
shader: unshaded
- type: TimedDespawn
lifetime: 60 # 1 min
lifetime: 120 # 2 min
- type: Sprite
sprite: _CP14/Objects/Misc/artificial_flame.rsi
layers:
@@ -84,6 +84,8 @@
shader: unshaded
- type: PointLight
color: "#eea911"
energy: 0.5
radius: 2.5
- type: Fixtures
fixtures:
fix1:
@@ -138,9 +140,8 @@
variation: 0.250
volume: -12
cPAnimationLength: 0.15
- type: IgnitionSource
temperature: 400
ignited: true
- type: CP14DelayedIgnitionSource
enabled: true
- type: entity
parent: CP14BaseSpellScrollFire

View File

@@ -33,7 +33,7 @@
- CP14MagicEnergyCrystalSlot
itemIconStyle: BigAction
interactOnMiss: false
canTargetSelf: false
canTargetSelf: true
sound: !type:SoundPathSpecifier
path: /Audio/Magic/rumble.ogg
icon:

View File

@@ -46,9 +46,12 @@
- type: entity
id: CP14LiquidDropWater
parent: BaseItem
parent:
- BaseItem
- ItemHeftyBase
name: floating liquid drop
description: A clot of liquid held in the shape of a ball by magic
suffix: Water
categories: [ ForkFiltered ]
components:
- type: Item

View File

@@ -54,6 +54,7 @@
id: CP14LiquidDropBeer
parent: CP14LiquidDropWater
categories: [ ForkFiltered ]
suffix: Beer
components:
- type: SolutionContainerManager
solutions:

View File

@@ -7,7 +7,7 @@
components:
- type: HTN
rootTask:
task: SimpleHostileCompound
task: CP14ZombieCompound
blackboard:
NavClimb: !type:Bool
true
@@ -23,7 +23,7 @@
suffix: Zombie. Easy
categories: [ HideSpawnMenu ]
components:
- type: Loadout
- type: Loadout
prototypes: [ CP14MobUndeadEasy1 ]
- type: entity

View File

@@ -223,6 +223,8 @@
- type: CP14DemiplaneStabilizer
requireAlive: true
- type: CanEnterCryostorage
- type: CP14IgnitionModifier
ignitionTimeModifier: 2.5
- type: entity

View File

@@ -41,6 +41,14 @@
- map: [ "head" ]
- map: [ "pocket1" ]
- map: [ "pocket2" ]
- map: ["enum.HumanoidVisualLayers.Handcuffs"]
color: "#ffffff"
sprite: Objects/Misc/handcuffs.rsi
state: body-overlay-2
visible: false
- type: Cuffable
- type: Hands
- type: ComplexInteraction
- type: Icon
sprite: _CP14/Mobs/Species/Zombie/parts.rsi
state: full
@@ -121,6 +129,8 @@
- type: Climbing
- type: ReplacementAccent
accent: zombie
- type: FireVisuals
alternateState: Standing #TODO - custom visuals
- type: UserInterface
interfaces:
enum.StrippingUiKey.Key:

View File

@@ -8,7 +8,6 @@
- type: Drink
solution: bucket
ignoreEmpty: true
- type: Clickable
- type: Sprite
sprite: _CP14/Objects/Tools/wooden_bucket.rsi
layers:

View File

@@ -0,0 +1,15 @@
- type: entity
parent: BaseItem
id: CP14Lighter
name: flint and steel
description: "Setting things on fire. Absolutely, 100% not from minecraft." # TODO: remove minecraft sprite and desc
categories: [ ForkFiltered ]
components:
- type: Item
size: Tiny
- type: Sprite
sprite: _CP14/Objects/Tools/flint.rsi
state: icon
- type: CP14DelayedIgnitionSource
enabled: true
# TODO: Damageable, Ignite attempt self damage, Ignite prob

View File

@@ -0,0 +1,79 @@
- type: entity
id: CP14Torch
parent: BaseItem
name: torch
description: At its core, a stick burning on one side. Used to light up the area.
categories: [ ForkFiltered ]
components:
- type: Sprite
sprite: _CP14/Objects/Tools/torch.rsi
layers:
- state: torch-unlit
map: ["fuel"]
- type: Item
size: Small
- type: CP14FlammableAmbientSound
- type: AmbientSound
enabled: false
volume: -5
range: 5
sound:
path: /Audio/Ambience/Objects/fireplace.ogg
- type: Appearance
- type: Reactive
groups:
Flammable: [ Touch ]
Extinguish: [ Touch ]
- type: Flammable
fireSpread: false
canResistFire: false
alwaysCombustible: true
canExtinguish: true
firestacksOnIgnite: 0.5
damage:
types:
Heat: 0
- type: CP14Fireplace
maxFuelLimit: 200
fuel: 200
- type: FireVisuals
sprite: _CP14/Objects/Tools/torch.rsi
normalState: lit-overlay
- type: ToggleableLightVisuals
spriteLayer: null
inhandVisuals:
left:
- state: lit-inhand-left
shader: unshaded
right:
- state: lit-inhand-right
shader: unshaded
- type: GenericVisualizer
visuals:
enum.FireplaceFuelVisuals.Status:
fuel:
Empty: { state: torch-spent }
Medium: { state: torch-unlit }
Full: { state: torch-unlit }
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: CP14DelayedIgnitionSource
- type: CP14IgnitionModifier
hideCaution: true
- type: MeleeWeapon
attackRate: 1.5
wideAnimationRotation: 225
wideAnimation: CP14WeaponArcSlash
damage:
types:
Blunt: 4
- type: CP14FlammableBonusDamage

View File

@@ -92,6 +92,9 @@
collection: CP14GrassGathering
- type: TriggerOnCollide
fixtureID: fix1
- type: CP14IgnitionModifier
ignitionTimeModifier: 0.75
hideCaution: true
- type: entity
id: CP14RandomBushOffsetSpawner

View File

@@ -37,13 +37,6 @@
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: CP14FlammableAmbientSound
- type: AmbientSound
enabled: false
@@ -81,6 +74,8 @@
- type: Construction
graph: CP14WallmountTorch
node: CP14WallmountTorch
- type: CP14IgnitionModifier
hideCaution: true
- type: entity
id: CP14WallmountTorchAlwaysPowered

View File

@@ -53,13 +53,16 @@
maxItemSize: Normal
grid:
- 0,0,2,2
blacklist:
cP14Ignorelist:
components:
- IgnitionSource
- CP14DelayedIgnitionSource
- type: UserInterface
interfaces:
enum.StorageUiKey.Key:
type: StorageBoundUserInterface
- type: CP14IgnitionModifier
hideCaution: true
- type: entity
id: CP14AlchemyFurnace

View File

@@ -6,6 +6,7 @@
placement:
mode: SnapgridCenter
components:
- type: Clickable
- type: Sprite
drawdepth: Effects
snapCardinals: true
@@ -75,9 +76,11 @@
damage:
types:
Heat: 0
- type: Damageable
- type: CP14Fireplace
fuel: 15
#- type: CP14AutoIgnite
- type: CP14AutoIgnite
- type: CP14ActiveFireSpreading
- type: TimedDespawn
lifetime: 60
- type: CP14FireSpread

View File

@@ -304,6 +304,7 @@
- CP14BaseDagger
- CP14BaseSickle
- CP14BasePickaxe
- CP14Lighter
- type: loadout
id: CP14MagicHealingStaff
@@ -388,6 +389,12 @@
back:
- CP14BasePickaxe
- type: loadout
id: CP14Lighter
storage:
back:
- CP14Lighter
# Spells
- type: loadoutGroup

View File

@@ -0,0 +1,40 @@
- type: htnCompound
id: CP14MeleeWeaponlessCombatCompound
branches:
- tasks:
- !type:HTNPrimitiveTask
operator: !type:UtilityOperator
proto: NearbyMeleeTargets
- !type:HTNCompoundTask
task: CP14BeforeMeleeAttackTargetWeaponlessCompound
- type: htnCompound
id: CP14BeforeMeleeAttackTargetWeaponlessCompound
branches:
- preconditions:
- !type:BuckledPrecondition
isBuckled: true
tasks:
- !type:HTNPrimitiveTask
operator: !type:UnbuckleOperator
shutdownState: TaskFinished
- preconditions:
- !type:PulledPrecondition
isPulled: true
tasks:
- !type:HTNPrimitiveTask
operator: !type:UnPullOperator
shutdownState: TaskFinished
- preconditions:
- !type:InContainerPrecondition
isInContainer: true
tasks:
- !type:HTNCompoundTask
task: EscapeCompound
# Melee combat (unarmed or otherwise)
- tasks:
- !type:HTNCompoundTask
task: MeleeAttackTargetCompound

View File

@@ -0,0 +1,9 @@
- type: htnCompound
id: CP14ZombieCompound
branches:
- tasks:
- !type:HTNCompoundTask
task: CP14MeleeWeaponlessCombatCompound
- tasks:
- !type:HTNCompoundTask
task: IdleCompound