Alchemy furnace integration (#1489)

* furnace integration + fix gates

* fix

* d
This commit is contained in:
Red
2025-06-29 13:38:05 +03:00
committed by GitHub
parent 42841d93d7
commit af0a502dab
22 changed files with 65 additions and 41 deletions

View File

@@ -14,7 +14,7 @@ public sealed partial class CP14SpellThrowFromUser : CP14SpellEffect
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
if (args.Target is null)
if (args.Target is null || args.User is null)
return;
var targetEntity = args.Target.Value;
@@ -22,12 +22,6 @@ public sealed partial class CP14SpellThrowFromUser : CP14SpellEffect
var throwing = entManager.System<ThrowingSystem>();
var xform = entManager.System<SharedTransformSystem>();
if (!entManager.TryGetComponent<TransformComponent>(args.User, out var userTransform))
return;
if (!entManager.TryGetComponent<TransformComponent>(targetEntity, out var targetTransform))
return;
var worldPos = xform.GetWorldPosition(args.User.Value);
var foo = Vector2.Normalize(xform.GetWorldPosition(args.Target.Value) - worldPos);

View File

@@ -103,7 +103,7 @@
sprite: _CP14/Structures/Fence/iron_big.rsi
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -112,7 +112,7 @@
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
CP14ScrapIron:

View File

@@ -54,7 +54,7 @@
sprite: _CP14/Structures/Fence/iron_window.rsi
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -63,7 +63,7 @@
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
CP14ScrapIron:

View File

@@ -89,7 +89,7 @@
state: icons
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
@@ -101,12 +101,12 @@
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
CP14IronBar1:
CP14ScrapIron:
min: 1
max: 3
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: CP14WoodenCabinet
node: CP14WoodenCabinet
graph: CP14IronCabinet
node: CP14IronCabinet

View File

@@ -65,20 +65,20 @@
hideCaution: true
- type: entity
id: CP14AlchemyFurnace
name: alchemy furnace
id: CP14Furnace
name: furnace
parent: CP14BaseFireplace
description: A furnace fueled by wood, coal, or any other burning material. Handy for heating your alchemical potions.
description: A furnace fueled by wood, coal, or any other burning material. Handy for heating your food or drinks.
components:
- type: Sprite
sprite: _CP14/Structures/Specific/Alchemy/alchemy_furnace.rsi
sprite: _CP14/Structures/Furniture/furnace.rsi
layers:
- state: base
- state: fuel1
visible: false
map: ["fuel"]
- type: Damageable
damageContainer: Inorganic
damageContainer: StructuralInorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
@@ -88,6 +88,14 @@
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:SpawnEntitiesBehavior
spawn:
CP14ScrapIron:
min: 1
max: 3
- type: GenericVisualizer
visuals:
enum.FireplaceFuelVisuals.Status:
@@ -96,7 +104,7 @@
Medium: { visible: true, state: fuel1 }
Full: { visible: true, state: fuel2 }
- type: FireVisuals
sprite: _CP14/Structures/Specific/Alchemy/alchemy_furnace.rsi
sprite: _CP14/Structures/Furniture/furnace.rsi
normalState: burning
- type: Climbable
- type: Anchorable
@@ -130,14 +138,16 @@
whitelist:
tags:
- CP14FireplaceFuel
- type: Construction
graph: CP14Furnace
node: CP14Furnace
- type: entity
parent: CP14AlchemyFurnace
id: CP14AlchemyFurnaceDebug
parent: CP14Furnace
id: CP14FurnaceDebug
suffix: Ignited, Infinity
categories: [ DoNotMap ]
components:
- type: CP14AutoIgnite
- type: CP14Fireplace
fuelDrainingPerUpdate: 0
fuelDrainingPerUpdate: 0

View File

@@ -10,6 +10,7 @@
steps:
- stackGroup: WoodenPlanks
amount: 3
doAfter: 2
- node: CP14WoodenCabinet
entity: CP14WoodenCabinet
@@ -25,5 +26,6 @@
steps:
- material: CP14IronBar
amount: 3
doAfter: 2
- node: CP14IronCabinet
entity: CP14IronCabinet

View File

@@ -0,0 +1,15 @@
- type: constructionGraph
id: CP14Furnace
start: start
graph:
- node: start
edges:
- to: CP14Furnace
completed:
- !type:SnapToGrid
steps:
- material: CP14IronBar
amount: 3
doAfter: 2
- node: CP14Furnace
entity: CP14Furnace

View File

@@ -61,9 +61,6 @@
- node: start
edges:
- to: CP14FenceGateBigWooden
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: CP14WoodenPlanks
amount: 4
@@ -89,9 +86,6 @@
- node: start
edges:
- to: CP14FenceGateBigWoodenBirch
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: CP14BirchWoodenPlanks
amount: 4

View File

@@ -61,9 +61,6 @@
- node: start
edges:
- to: CP14FenceGateWooden
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: CP14WoodenPlanks
amount: 2
@@ -89,9 +86,6 @@
- node: start
edges:
- to: CP14FenceGateWoodenBirch
completed:
- !type:SnapToGrid
southRotation: true
steps:
- material: CP14BirchWoodenPlanks
amount: 2

View File

@@ -185,3 +185,16 @@
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
crystallPunkAllowed: true
id: CP14Furnace
graph: CP14Furnace
startNode: start
targetNode: CP14Furnace
category: construction-category-furniture
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked

View File

@@ -58,7 +58,7 @@
<Box>
<GuideEntityEmbed Entity="CP14Cauldron"/>
<GuideEntityEmbed Entity="CP14BaseVat"/>
<GuideEntityEmbed Entity="CP14AlchemyFurnace"/>
<GuideEntityEmbed Entity="CP14Furnace"/>
</Box>
<Box>

View File

@@ -49,7 +49,7 @@
</Box>
<Box>
<GuideEntityEmbed Entity="CP14AlchemyFurnace"/>
<GuideEntityEmbed Entity="CP14Furnace"/>
<GuideEntityEmbed Entity="CP14WorkbenchCooking"/>
<GuideEntityEmbed Entity="CP14Workbench"/>
</Box>

View File

@@ -58,7 +58,7 @@
<Box>
<GuideEntityEmbed Entity="CP14Cauldron"/>
<GuideEntityEmbed Entity="CP14BaseVat"/>
<GuideEntityEmbed Entity="CP14AlchemyFurnace"/>
<GuideEntityEmbed Entity="CP14Furnace"/>
</Box>
<Box>

View File

@@ -49,7 +49,7 @@
</Box>
<Box>
<GuideEntityEmbed Entity="CP14AlchemyFurnace"/>
<GuideEntityEmbed Entity="CP14Furnace"/>
<GuideEntityEmbed Entity="CP14WorkbenchCooking"/>
<GuideEntityEmbed Entity="CP14Workbench"/>
</Box>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View File

@@ -361,6 +361,8 @@ CP14SpellscrollSignalLightYellow: null
#2025-28-06
CP14SpellScrollMagicSplitting: null
CP14AlchemyFurnaceDebug: CP14FurnaceDebug
CP14AlchemyFurnace: CP14Furnace
# <---> CrystallEdge migration zone end