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

@@ -0,0 +1,7 @@
using Content.Shared._CP14.Temperature;
namespace Content.Client._CP14.Temperature;
public sealed partial class CP14ClientFireSpreadSystem : CP14SharedFireSpreadSystem
{
}

View File

@@ -1,4 +1,3 @@
using Content.Server._CP14.Temperature;
using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components;
using Content.Server.IgnitionSource;
@@ -6,6 +5,7 @@ using Content.Server.Stunnable;
using Content.Server.Temperature.Components;
using Content.Server.Temperature.Systems;
using Content.Server.Damage.Components;
using Content.Shared._CP14.Temperature;
using Content.Shared.ActionBlocker;
using Content.Shared.Alert;
using Content.Shared.Atmos;
@@ -144,15 +144,16 @@ namespace Content.Server.Atmos.EntitySystems
{
if (args.Handled)
return;
var isHotEvent = new IsHotEvent();
RaiseLocalEvent(args.Used, isHotEvent);
if (!isHotEvent.IsHot)
return;
/* //CP14 disabling igniting via direact interact. Only from DelayedIgnitionSource
Ignite(uid, args.Used, flammable, args.User);
args.Handled = true;
*/
}
private void OnExtinguishActivateInWorld(EntityUid uid, ExtinguishOnInteractComponent component, ActivateInWorldEvent args)
@@ -263,6 +264,13 @@ namespace Content.Server.Atmos.EntitySystems
public void UpdateAppearance(EntityUid uid, FlammableComponent? flammable = null, AppearanceComponent? appearance = null)
{
//CrystallEdge bonfire moment
if (!Resolve(uid, ref flammable))
return;
var ev = new OnFireChangedEvent(flammable.OnFire);
RaiseLocalEvent(uid, ref ev);
//CrystallEdge bonfire moment end
if (!Resolve(uid, ref flammable, ref appearance))
return;
@@ -316,12 +324,6 @@ namespace Content.Server.Atmos.EntitySystems
_ignitionSourceSystem.SetIgnited(uid, false);
//CrystallEdge bonfire moment
var ev = new OnFireChangedEvent(flammable.OnFire);
RaiseLocalEvent(uid, ref ev);
//CrystallEdge bonfire moment end
UpdateAppearance(uid, flammable);
}
@@ -343,11 +345,6 @@ namespace Content.Server.Atmos.EntitySystems
else
_adminLogger.Add(LogType.Flammable, $"{ToPrettyString(uid):target} set on fire by {ToPrettyString(ignitionSource):actor}");
flammable.OnFire = true;
//CrystallEdge fireplace moment
var ev = new OnFireChangedEvent(flammable.OnFire);
RaiseLocalEvent(uid, ref ev);
//CrystallEdge fireplace moment end
}
UpdateAppearance(uid, flammable);

View File

@@ -1,6 +1,7 @@
using Content.Server._CP14.Temperature;
using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared._CP14.Temperature;
using Content.Shared.Audio;
using Content.Shared.Mobs;
using Content.Shared.Power;

View File

@@ -1,6 +0,0 @@
namespace Content.Server._CP14.Temperature;
[RegisterComponent, Access(typeof(CP14FireSpreadSystem))]
public sealed partial class CP14DespawnOnExtinguishComponent : Component
{
}

View File

@@ -2,7 +2,11 @@ using System.Linq;
using System.Numerics;
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.DoAfter;
using Content.Shared._CP14.Temperature;
using Content.Shared.Interaction;
using Content.Shared.Maps;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Prototypes;
@@ -11,7 +15,7 @@ using Robust.Shared.Timing;
namespace Content.Server._CP14.Temperature;
public sealed partial class CP14FireSpreadSystem : EntitySystem
public sealed partial class CP14FireSpreadSystem : CP14SharedFireSpreadSystem
{
[Dependency] private readonly FlammableSystem _flammable = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
@@ -20,29 +24,39 @@ public sealed partial class CP14FireSpreadSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
[Dependency] private readonly TileSystem _tile = default!;
[Dependency] private readonly ITileDefinitionManager _tiledef = default!;
[Dependency] private readonly ITileDefinitionManager _tileDef = default!;
private EntProtoId _fireProto = "CP14Fire";
private readonly EntProtoId _fireProto = "CP14Fire";
private readonly HashSet<Entity<CP14FireSpreadComponent>> _spreadEnts = new();
public override void Initialize()
{
SubscribeLocalEvent<CP14FireSpreadComponent, OnFireChangedEvent>(OnCompInit);
SubscribeLocalEvent<CP14DespawnOnExtinguishComponent, OnFireChangedEvent>(OnFireChanged);
base.Initialize();
SubscribeLocalEvent<FlammableComponent, CP14IgnitionDoAfter>(OnFlammableIgnited);
SubscribeLocalEvent<CP14FlammableBonusDamageComponent, MeleeHitEvent>(OnFlammableMeleeHit);
}
private void OnFireChanged(Entity<CP14DespawnOnExtinguishComponent> ent, ref OnFireChangedEvent args)
private void OnFlammableMeleeHit(Entity<CP14FlammableBonusDamageComponent> ent, ref MeleeHitEvent args)
{
if (!args.OnFire)
QueueDel(ent);
}
private void OnCompInit(Entity<CP14FireSpreadComponent> ent, ref OnFireChangedEvent args)
{
if (!args.OnFire)
if (!TryComp<FlammableComponent>(ent, out var flammable))
return;
var cooldown = _random.NextFloat(ent.Comp.SpreadCooldownMin, ent.Comp.SpreadCooldownMax);
ent.Comp.NextSpreadTime = _gameTiming.CurTime + TimeSpan.FromSeconds(cooldown);
if (!flammable.OnFire)
return;
args.BonusDamage += ent.Comp.DamagePerStack * flammable.FireStacks;
}
private void OnFlammableIgnited(Entity<FlammableComponent> ent, ref CP14IgnitionDoAfter args)
{
if (args.Cancelled || args.Handled)
return;
_flammable.AdjustFireStacks(ent, ent.Comp.FirestacksOnIgnite, ent.Comp, true);
args.Handled = true;
}
public override void Update(float frameTime)
@@ -76,9 +90,10 @@ public sealed partial class CP14FireSpreadSystem : EntitySystem
private void UpdateFireSpread()
{
List<Entity<CP14FireSpreadComponent>> spreadUids = new();
var query = EntityQueryEnumerator<CP14FireSpreadComponent, FlammableComponent, TransformComponent>();
while (query.MoveNext(out var uid, out var spread, out var flammable, out var xform))
_spreadEnts.Clear();
var query = EntityQueryEnumerator<CP14ActiveFireSpreadingComponent, CP14FireSpreadComponent, FlammableComponent, TransformComponent>();
while (query.MoveNext(out var uid, out _, out var spread, out var flammable, out var xform))
{
if (!flammable.OnFire)
continue;
@@ -92,61 +107,57 @@ public sealed partial class CP14FireSpreadSystem : EntitySystem
var cooldown = _random.NextFloat(spread.SpreadCooldownMin, spread.SpreadCooldownMax);
spread.NextSpreadTime = _gameTiming.CurTime + TimeSpan.FromSeconds(cooldown);
spreadUids.Add(new Entity<CP14FireSpreadComponent>(uid, spread));
_spreadEnts.Add(new Entity<CP14FireSpreadComponent>(uid, spread));
}
foreach (var uid in spreadUids)
foreach (var uid in _spreadEnts)
{
IgniteEntities(uid, uid.Comp);
IgniteTiles(uid, uid.Comp);
IgniteEntities(uid);
IgniteTiles(uid);
}
}
private void IgniteEntities(EntityUid uid, CP14FireSpreadComponent spread)
private void IgniteEntities(Entity<CP14FireSpreadComponent> spread)
{
var targets = _lookup.GetEntitiesInRange<FlammableComponent>(_transform.GetMapCoordinates(uid),
spread.Radius,
var targets = _lookup.GetEntitiesInRange<FlammableComponent>(_transform.GetMapCoordinates(spread),
spread.Comp.Radius,
LookupFlags.Uncontained);
foreach (var target in targets)
{
if (!_random.Prob(spread.Prob))
if (!_random.Prob(spread.Comp.Prob))
continue;
_flammable.Ignite(target, uid);
_flammable.Ignite(target, spread);
}
}
private void IgniteTiles(EntityUid uid, CP14FireSpreadComponent spread)
private void IgniteTiles(Entity<CP14FireSpreadComponent> spread)
{
var xform = Transform(uid);
if (!TryComp<MapGridComponent>(xform.GridUid, out var grid))
return;
var xform = Transform(spread);
// Ignore items inside containers
if (!HasComp<MapGridComponent>(xform.ParentUid))
if (!TryComp<MapGridComponent>(xform.ParentUid, out var grid))
return;
var localPos = xform.Coordinates.Position;
var tileRefs = _mapSystem.GetLocalTilesIntersecting(grid.Owner,
var tileRefs = _mapSystem.GetLocalTilesIntersecting(xform.ParentUid,
grid,
new Box2(
localPos + new Vector2(-spread.Radius, -spread.Radius),
localPos + new Vector2(spread.Radius, spread.Radius)))
localPos + new Vector2(-spread.Comp.Radius, -spread.Comp.Radius),
localPos + new Vector2(spread.Comp.Radius, spread.Comp.Radius)))
.ToList();
foreach (var tileref in tileRefs)
foreach (var tileRef in tileRefs)
{
if (!_random.Prob(spread.ProbTile))
if (!_random.Prob(spread.Comp.ProbTile))
continue;
var tile = tileref.Tile.GetContentTileDefinition();
var tile = tileRef.Tile.GetContentTileDefinition();
if (tile.BurnedTile is null)
continue;
Spawn(_fireProto, _mapSystem.ToCenterCoordinates(tileref, grid));
_tile.ReplaceTile(tileref, (ContentTileDefinition)_tiledef[tile.BurnedTile]);
Spawn(_fireProto, _mapSystem.ToCenterCoordinates(tileRef, grid));
_tile.ReplaceTile(tileRef, (ContentTileDefinition)_tileDef[tile.BurnedTile]);
}
}
}

View File

@@ -9,12 +9,3 @@ namespace Content.Server._CP14.Temperature;
public sealed partial class CP14FlammableAmbientSoundComponent : Component
{
}
/// <summary>
/// Raised whenever an FlammableComponen OnFire is Changed
/// </summary>
[ByRefEvent]
public readonly record struct OnFireChangedEvent(bool OnFire)
{
public readonly bool OnFire = OnFire;
}

View File

@@ -1,15 +1,10 @@
using Content.Server.Atmos.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Popups;
using Content.Server.Stack;
using Content.Shared._CP14.Temperature;
using Content.Shared.Interaction;
using Content.Shared.Stacks;
using Content.Shared.Throwing;
using Robust.Server.Audio;
using Robust.Server.Containers;
using Robust.Server.GameObjects;
using Robust.Shared.Physics.Events;
using Robust.Shared.Timing;
namespace Content.Server._CP14.Temperature.Fireplace;

View File

@@ -0,0 +1,6 @@
namespace Content.Shared._CP14.Temperature;
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14ActiveFireSpreadingComponent : Component
{
}

View File

@@ -0,0 +1,16 @@
using Robust.Shared.GameStates;
namespace Content.Shared._CP14.Temperature;
/// <summary>
/// Allows you to fire entities through interacting with them after a delay.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14DelayedIgnitionSourceComponent : Component
{
[DataField, AutoNetworkedField]
public bool Enabled;
[DataField]
public TimeSpan Delay = TimeSpan.FromSeconds(3f);
}

View File

@@ -0,0 +1,6 @@
namespace Content.Shared._CP14.Temperature;
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14DespawnOnExtinguishComponent : Component
{
}

View File

@@ -1,10 +1,10 @@
namespace Content.Server._CP14.Temperature;
namespace Content.Shared._CP14.Temperature;
/// <summary>
/// A component that allows fire to spread to nearby objects. The basic mechanics of a spreading fire
/// </summary>
[RegisterComponent, Access(typeof(CP14FireSpreadSystem))]
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14FireSpreadComponent : Component
{
/// <summary>
@@ -17,25 +17,25 @@ public sealed partial class CP14FireSpreadComponent : Component
/// chance of spreading to neighboring properties
/// </summary>
[DataField]
public float Prob = 0.3f;
public float Prob = 0.1f;
/// <summary>
/// chance of tile spreading to neighboring properties
/// </summary>
[DataField]
public float ProbTile = 0.2f;
public float ProbTile = 0.1f;
/// <summary>
/// how often objects will try to set the neighbors on fire. In Seconds
/// </summary>
[DataField]
public float SpreadCooldownMin = 4f;
public float SpreadCooldownMin = 5f;
/// <summary>
/// how often objects will try to set the neighbors on fire. In Seconds
/// </summary>
[DataField]
public float SpreadCooldownMax = 14f;
public float SpreadCooldownMax = 10f;
/// <summary>
/// the time of the next fire spread

View File

@@ -0,0 +1,19 @@
using Content.Shared.Damage;
namespace Content.Shared._CP14.Temperature;
/// <summary>
/// Add bonus damage to melee attacks per flammable stack
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14FlammableBonusDamageComponent : Component
{
[DataField]
public DamageSpecifier DamagePerStack = new()
{
DamageDict = new()
{
{"Heat", 0.3},
}
};
}

View File

@@ -0,0 +1,14 @@
namespace Content.Shared._CP14.Temperature;
/// <summary>
/// Modifies the burning of this essence.
/// </summary>
[RegisterComponent, Access(typeof(CP14SharedFireSpreadSystem))]
public sealed partial class CP14IgnitionModifierComponent : Component
{
[DataField]
public float IgnitionTimeModifier = 1f;
[DataField]
public bool HideCaution = false;
}

View File

@@ -0,0 +1,112 @@
using Content.Shared.DoAfter;
using Content.Shared.IdentityManagement;
using Content.Shared.Interaction;
using Content.Shared.Popups;
using Content.Shared.Weapons.Melee.Events;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
namespace Content.Shared._CP14.Temperature;
public abstract partial class CP14SharedFireSpreadSystem : EntitySystem
{
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<CP14FireSpreadComponent, OnFireChangedEvent>(OnFireChangedSpread);
SubscribeLocalEvent<CP14DespawnOnExtinguishComponent, OnFireChangedEvent>(OnFireChangedDespawn);
SubscribeLocalEvent<CP14DelayedIgnitionSourceComponent, OnFireChangedEvent>(OnIgnitionSourceFireChanged);
SubscribeLocalEvent<CP14DelayedIgnitionSourceComponent, AfterInteractEvent>(OnDelayedIgniteAttempt);
}
private void OnFireChangedDespawn(Entity<CP14DespawnOnExtinguishComponent> ent, ref OnFireChangedEvent args)
{
if (!args.OnFire)
QueueDel(ent);
}
private void OnFireChangedSpread(Entity<CP14FireSpreadComponent> ent, ref OnFireChangedEvent args)
{
if (args.OnFire)
{
EnsureComp<CP14ActiveFireSpreadingComponent>(ent);
}
else
{
if (HasComp<CP14ActiveFireSpreadingComponent>(ent))
RemCompDeferred<CP14ActiveFireSpreadingComponent>(ent);
}
ent.Comp.NextSpreadTime = _gameTiming.CurTime + TimeSpan.FromSeconds(ent.Comp.SpreadCooldownMax);
}
private void OnDelayedIgniteAttempt(Entity<CP14DelayedIgnitionSourceComponent> ent, ref AfterInteractEvent args)
{
if (!args.CanReach || args.Handled || args.Target == null)
return;
if (!ent.Comp.Enabled)
return;
var time = ent.Comp.Delay;
var caution = true;
if (TryComp<CP14IgnitionModifierComponent>(args.Target, out var modifier))
{
time *= modifier.IgnitionTimeModifier;
caution = !modifier.HideCaution;
}
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager,
args.User,
time,
new CP14IgnitionDoAfter(),
args.Target,
args.Target,
args.Used)
{
BreakOnDamage = true,
BreakOnMove = true,
BreakOnDropItem = true,
BreakOnHandChange = true,
BlockDuplicate = true,
CancelDuplicate = true
});
var selfMessage = Loc.GetString("cp14-attempt-ignite-caution-self",
("target", MetaData(args.Target.Value).EntityName));
var otherMessage = Loc.GetString("cp14-attempt-ignite-caution",
("name", Identity.Entity(args.User, EntityManager)),
("target", Identity.Entity(args.Target.Value, EntityManager)));
_popup.PopupPredicted(selfMessage,
otherMessage,
args.User,
args.User,
caution ? PopupType.MediumCaution : PopupType.Small);
}
private void OnIgnitionSourceFireChanged(Entity<CP14DelayedIgnitionSourceComponent> ent, ref OnFireChangedEvent args)
{
ent.Comp.Enabled = args.OnFire;
Dirty(ent);
}
}
/// <summary>
/// Raised whenever an FlammableComponent OnFire is Changed
/// </summary>
[ByRefEvent]
public readonly record struct OnFireChangedEvent(bool OnFire)
{
public readonly bool OnFire = OnFire;
}
[Serializable, NetSerializable]
public sealed partial class CP14IgnitionDoAfter : SimpleDoAfterEvent
{
}

View File

@@ -0,0 +1,2 @@
cp14-attempt-ignite-caution-self = You start setting {$target} on fire!
cp14-attempt-ignite-caution = {$name} is starting to set {$target} on fire!

View File

@@ -0,0 +1,2 @@
cp14-attempt-ignite-caution-self = Вы начинаете поджигать {$target}!
cp14-attempt-ignite-caution = {$name} начинает поджигать {$target}!

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by TheShuEd (Discord)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

View File

@@ -0,0 +1,96 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CLA",
"copyright": "Created by Prazat",
"states": [
{
"name": "icon"
},
{
"name": "lit-overlay",
"delays": [
[
0.2,
0.2,
0.2
]
]
},
{
"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
]
]
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "torch-spent"
},
{
"name": "torch-unlit"
},
{
"name": "unlit-inhand-left"
},
{
"name": "unlit-inhand-right"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 624 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

View File

@@ -149,7 +149,7 @@ CP14KeyBankSafe6: CP14KeyBankSafe
#2024-19-11
CP14ClothingRingManaGift: CP14ManaOperationGlove
CP14ClothingRingIceDagger: CP14ManaOperationGlove
CP14ClothingRingFlameCreation: null
CP14ClothingRingFlameCreation: CP14Lighter
CP14ClothingRingShadowGrab: null
CP14ClothingRingEarthWall: null
CP14ClothingRingSphereOfLight: null