Candles & Candelabras (#1585)

* Refactor food holder visual update logic

Simplified UpdateVisuals method in CP14ClientCookingSystem by consolidating parameters and using component fields directly. Also ensured FoodData field is dirtied after updating visuals in CP14SharedCookingSystem to trigger proper synchronization.

* add sprites

* candles redo

* candles and candelabras

* mapping
This commit is contained in:
Red
2025-07-27 18:54:22 +03:00
committed by GitHub
parent 5c0eb97571
commit fc30c36576
13 changed files with 307 additions and 557 deletions

View File

@@ -4,8 +4,8 @@ meta:
engineVersion: 264.0.0
forkId: ""
forkVersion: ""
time: 07/17/2025 14:19:23
entityCount: 14827
time: 07/27/2025 15:35:46
entityCount: 14840
maps:
- 1
grids:
@@ -37792,13 +37792,129 @@ entities:
- type: Transform
pos: -17.264824,5.8419228
parent: 1
- proto: CP14CandleGreen
- proto: CP14Candelabra
entities:
- uid: 4598
components:
- type: Transform
pos: 5.3142414,13.013713
parent: 1
- uid: 9690
components:
- type: Transform
pos: -2.6830807,12.822558
parent: 1
- uid: 9691
components:
- type: Transform
pos: 9.56452,13.80245
parent: 1
- uid: 9692
components:
- type: Transform
pos: 16.045486,0.87002456
parent: 1
- proto: CP14CandelabraIgnited
entities:
- uid: 8758
components:
- type: Transform
pos: -14.652183,-20.246315
parent: 1
- uid: 9684
components:
- type: Transform
pos: -7.6333275,-23.65467
parent: 1
- uid: 9685
components:
- type: Transform
pos: -6.4670506,-17.461117
parent: 1
- uid: 9687
components:
- type: Transform
pos: 17.511665,-15.392809
parent: 1
- proto: CP14Candle
entities:
- uid: 7165
components:
- type: Transform
pos: -24.611235,9.864569
parent: 1
- uid: 9693
components:
- type: Transform
pos: 8.733924,1.7367586
parent: 1
- uid: 9694
components:
- type: Transform
pos: 8.385236,2.2652442
parent: 1
- uid: 9695
components:
- type: Transform
pos: 8.036548,1.8941797
parent: 1
- proto: CP14CandleIgnited
entities:
- uid: 7134
components:
- type: Transform
pos: -4.8100815,-22.125435
parent: 1
- uid: 9678
components:
- type: Transform
pos: -15.791612,-17.261002
parent: 1
- uid: 9679
components:
- type: Transform
pos: -4.157698,-23.193651
parent: 1
- uid: 9680
components:
- type: Transform
pos: -14.464349,-16.080341
parent: 1
- uid: 9681
components:
- type: Transform
pos: -14.858027,-17.148558
parent: 1
- uid: 9682
components:
- type: Transform
pos: -4.3939056,-23.373562
parent: 1
- uid: 9683
components:
- type: Transform
pos: -10.186622,-23.238628
parent: 1
- uid: 9686
components:
- type: Transform
pos: -5.268656,-14.371141
parent: 1
- uid: 9688
components:
- type: Transform
pos: 16.195648,-16.292358
parent: 1
- uid: 9689
components:
- type: Transform
pos: 16.341873,-16.371069
parent: 1
- uid: 9696
components:
- type: Transform
pos: 35.824474,0.78094435
parent: 1
- proto: CP14CarpetBlue
entities:
- uid: 7176
@@ -39116,6 +39232,13 @@ entities:
- type: Transform
pos: -17.41455,-27.582659
parent: 1
- proto: CP14ClothingBackLeatherSatchel
entities:
- uid: 7478
components:
- type: Transform
pos: -74.87262,-71.99824
parent: 1
- proto: CP14ClothingBeltQuiver
entities:
- uid: 7438
@@ -39178,13 +39301,6 @@ entities:
parent: 7467
- type: Physics
canCollide: False
- proto: CP14ClothingSatchelLeather
entities:
- uid: 7478
components:
- type: Transform
pos: -74.87262,-71.99824
parent: 1
- proto: CP14CopperCoin1
entities:
- uid: 7482
@@ -45822,13 +45938,6 @@ entities:
- type: Transform
pos: -17.282326,-21.007586
parent: 1
- proto: CP14FoodPieApple
entities:
- uid: 8758
components:
- type: Transform
pos: -17.327341,-20.09679
parent: 1
- proto: CP14FoodPotatoHot
entities:
- uid: 7230
@@ -66704,14 +66813,6 @@ entities:
parent: 1
- type: Fixtures
fixtures: {}
- uid: 4598
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: 37.5,4.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 4723
components:
- type: Transform
@@ -66719,14 +66820,6 @@ entities:
parent: 1
- type: Fixtures
fixtures: {}
- uid: 7134
components:
- type: Transform
rot: -1.5707963267948966 rad
pos: 18.5,-15.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 7226
components:
- type: Transform
@@ -66816,14 +66909,6 @@ entities:
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11886
components:
- type: Transform
rot: -1.5707963267948966 rad
pos: -1.5,-20.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11891
components:
- type: Transform
@@ -66855,45 +66940,6 @@ entities:
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11900
components:
- type: Transform
rot: -1.5707963267948966 rad
pos: -1.5,-17.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11901
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: -6.5,-17.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11903
components:
- type: Transform
rot: 3.141592653589793 rad
pos: -3.5,-23.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11904
components:
- type: Transform
pos: -15.5,-14.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11905
components:
- type: Transform
rot: 1.5707963267948966 rad
pos: -17.5,-22.5
parent: 1
- type: Fixtures
fixtures: {}
- uid: 11906
components:
- type: Transform

View File

@@ -66,20 +66,7 @@
- id: CP14FluteInstrument
- id: CP14LyraInstrument
- id: CP14LuteInstrument
- !type:GroupSelector
children:
- id: CP14Candle
- id: CP14CandleRed
- id: CP14CandleBlue
- id: CP14CandleBlack
- id: CP14CandleGreen
- id: CP14CandlePurple
- id: CP14CandleSmall
- id: CP14CandleRedSmall
- id: CP14CandleBlueSmall
- id: CP14CandleBlackSmall
- id: CP14CandleGreenSmall
- id: CP14CandlePurpleSmall
- !type:GroupSelector
children:
- id: CP14CrystalLampBlueEmpty

View File

@@ -1,21 +1,12 @@
- type: entity
name: candle
parent: BaseItem
id: CP14Candle
description: A thin wick threaded through fat.
abstract: true
id: CP14CandleBase
categories: [ ForkFiltered ]
components:
- type: Tag
tags:
- Candle
- type: Sprite
noRot: true
sprite: Objects/Misc/candles.rsi
layers:
- state: candle-big
color: "#decb8e"
- type: Item
size: Small
- type: Appearance
- type: Reactive
groups:
@@ -37,465 +28,122 @@
canResistFire: false
alwaysCombustible: true
canExtinguish: true
firestacksOnIgnite: 3.0
firestackFade: -0.01
firestacksOnIgnite: 15.0
firestackFade: -0
damage:
types:
Heat: 0.1
Heat: 0
- type: StaticPrice
price: 3
- type: entity
id: CP14Candle
parent: CP14CandleBase
name: candle
description: A thin wick threaded through fat.
components:
- type: Sprite
noRot: true
drawdepth: Mobs
sprite: _CP14/Objects/Misc/candles.rsi
layers:
- state: small1
map: ["random"]
- type: RandomSprite
available:
- random:
small1: ""
small2: ""
small3: ""
- type: Item
size: Small
- type: FireVisuals
sprite: Objects/Misc/candles.rsi
normalState: fire-big
- type: ToggleableLightVisuals
spriteLayer: null
inhandVisuals:
left:
- state: inhand-left-flame
shader: unshaded
right:
- state: inhand-right-flame
shader: unshaded
sprite: _CP14/Objects/Misc/candles.rsi
normalState: small_fire
#- type: ToggleableLightVisuals #TODO inhands
# spriteLayer: null
# inhandVisuals:
# left:
# - state: inhand-left-flame
# shader: unshaded
# right:
# - state: inhand-right-flame
# shader: unshaded
- type: Damageable
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
damage: 20
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Flammable
firestacksOnIgnite: 2
- type: entity
name: red candle
parent: CP14Candle
id: CP14CandleRed
id: CP14CandleIgnited
suffix: Ignited
components:
- type: Sprite
layers:
- state: candle-big
color: "#a12349"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#a12349"
- state: inhand-left-flame
right:
- state: inhand-right
color: "#a12349"
- type: StaticPrice
price: 3
- type: CP14AutoIgnite
startStack: 2
#Candelabra
- type: entity
name: blue candle
parent: CP14Candle
id: CP14CandleBlue
components:
- type: Sprite
layers:
- state: candle-big
color: "#425d7d"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#425d7d"
right:
- state: inhand-right
color: "#425d7d"
- type: entity
name: black candle
parent: CP14Candle
id: CP14CandleBlack
components:
- type: Sprite
layers:
- state: candle-big
color: "#1b1724"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#1b1724"
right:
- state: inhand-right
color: "#1b1724"
- type: entity
name: green candle
parent: CP14Candle
id: CP14CandleGreen
components:
- type: Sprite
layers:
- state: candle-big
color: "#5d997e"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#5d997e"
right:
- state: inhand-right
color: "#5d997e"
- type: entity
name: purple candle
parent: CP14Candle
id: CP14CandlePurple
components:
- type: Sprite
layers:
- state: candle-big
color: "#984aa1"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#984aa1"
right:
- state: inhand-right
color: "#984aa1"
- type: entity
name: small candle
parent: CP14Candle
id: CP14CandleSmall
components:
- type: Item
size: Tiny
- type: Sprite
layers:
- state: candle-small
color: "#e2ca90"
- type: FireVisuals
normalState: fire-small
- type: Flammable
firestacksOnIgnite: 2.0
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 60
behaviors:
- !type:SpawnEntitiesBehavior
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
name: small red candle
parent: CP14CandleSmall
id: CP14CandleRedSmall
components:
- type: Sprite
layers:
- state: candle-small
color: "#a12349"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#a12349"
right:
- state: inhand-right
color: "#a12349"
- type: entity
name: small blue candle
parent: CP14CandleSmall
id: CP14CandleBlueSmall
components:
- type: Sprite
layers:
- state: candle-small
color: "#425d7d"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#425d7d"
right:
- state: inhand-right
color: "#425d7d"
- type: entity
name: small black candle
parent: CP14CandleSmall
id: CP14CandleBlackSmall
components:
- type: Sprite
layers:
- state: candle-small
color: "#1b1724"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#1b1724"
right:
- state: inhand-right
color: "#1b1724"
- type: entity
name: small green candle
parent: CP14CandleSmall
id: CP14CandleGreenSmall
components:
- type: Sprite
layers:
- state: candle-small
color: "#5d997e"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#5d997e"
right:
- state: inhand-right
color: "#5d997e"
- type: entity
name: small purple candle
parent: CP14CandleSmall
id: CP14CandlePurpleSmall
components:
- type: Sprite
layers:
- state: candle-small
color: "#984aa1"
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#984aa1"
right:
- state: inhand-right
color: "#984aa1"
#Purely decorative candles for mappers. Do not have any functionality.
- type: entity
parent: BaseItem
id: CP14CandleInfinite
name: magic candle
description: A magically created candle that never goes out, the flame seems cold and dead, but still burning.
suffix: Decorative
id: CP14Candelabra
parent: CP14CandleBase
name: candelabra
description: several candles, beautifully placed on a metal support
categories: [ ForkFiltered ]
components:
- type: CP14DelayedIgnitionSource
- type: CP14IgnitionModifier
hideCaution: true
- type: Sprite
noRot: true
sprite: Objects/Misc/candles.rsi
offset: 0,0.2
sprite: _CP14/Objects/Misc/candelabra.rsi
layers:
- state: candle-big
color: "#decb8e"
- state: fire-big
shader: unshaded
- type: PointLight
color: "#e39c40"
radius: 2.5
power: 10
- state: triple
- type: Item
size: Normal
- type: FireVisuals
sprite: _CP14/Objects/Misc/candelabra.rsi
normalState: triple_fire
- type: Damageable
damageModifierSet: CP14Metallic
#- type: ToggleableLightVisuals #TODO inhands
# spriteLayer: null
# inhandVisuals:
# left:
# - state: inhand-left-flame
# shader: unshaded
# right:
# - state: inhand-right-flame
# shader: unshaded
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 50
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:SpawnEntitiesBehavior
spawn:
CP14ScrapIron:
min: 1
max: 1
- type: PhysicalComposition
materialComposition:
CP14Iron: 10 # 1 iron bar
- type: Flammable
firestacksOnIgnite: 4
- type: entity
name: magic red candle
parent: CP14CandleInfinite
id: CP14CandleRedInfinite
parent: CP14Candelabra
id: CP14CandelabraIgnited
suffix: Ignited
components:
- type: Sprite
layers:
- state: candle-big
color: "#a12349"
- state: fire-big
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#a12349"
right:
- state: inhand-right
color: "#a12349"
- type: entity
name: magic blue candle
parent: CP14CandleInfinite
id: CP14CandleBlueInfinite
components:
- type: Sprite
layers:
- state: candle-big
color: "#425d7d"
- state: fire-big
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#425d7d"
right:
- state: inhand-right
color: "#425d7d"
- type: entity
name: magic black candle
parent: CP14CandleInfinite
id: CP14CandleBlackInfinite
components:
- type: Sprite
layers:
- state: candle-big
color: "#1b1724"
- state: fire-big
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#1b1724"
right:
- state: inhand-right
color: "#1b1724"
- type: entity
name: magic green candle
parent: CP14CandleInfinite
id: CP14CandleGreenInfinite
components:
- type: Sprite
layers:
- state: candle-big
color: "#5d997e"
- state: fire-big
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#5d997e"
right:
- state: inhand-right
color: "#5d997e"
- type: entity
name: magic purple candle
parent: CP14CandleInfinite
id: CP14CandlePurpleInfinite
components:
- type: Sprite
layers:
- state: candle-big
color: "#984aa1"
- state: fire-big
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#984aa1"
right:
- state: inhand-right
color: "#984aa1"
- type: entity
name: small magic red candle
parent: CP14CandleInfinite
id: CP14CandleRedSmallInfinite
components:
- type: Sprite
layers:
- state: candle-small
color: "#a12349"
- state: fire-small
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#a12349"
right:
- state: inhand-right
color: "#a12349"
- type: entity
name: small magic blue candle
parent: CP14CandleInfinite
id: CP14CandleBlueSmallInfinite
components:
- type: Sprite
layers:
- state: candle-small
color: "#425d7d"
- state: fire-small
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#425d7d"
right:
- state: inhand-right
color: "#425d7d"
- type: entity
name: small magic black candle
parent: CP14CandleInfinite
id: CP14CandleBlackSmallInfinite
components:
- type: Sprite
layers:
- state: candle-small
color: "#1b1724"
- state: fire-small
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#1b1724"
right:
- state: inhand-right
color: "#1b1724"
- type: entity
name: small magic green candle
parent: CP14CandleInfinite
id: CP14CandleGreenSmallInfinite
components:
- type: Sprite
layers:
- state: candle-small
color: "#5d997e"
- state: fire-small
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#5d997e"
right:
- state: inhand-right
color: "#5d997e"
- type: entity
name: small magic purple candle
parent: CP14CandleInfinite
id: CP14CandlePurpleSmallInfinite
components:
- type: Sprite
layers:
- state: candle-small
color: "#984aa1"
- state: fire-small
shader: unshaded
- type: Item
inhandVisuals:
left:
- state: inhand-left
color: "#984aa1"
right:
- state: inhand-right
color: "#984aa1"
- type: CP14AutoIgnite
startStack: 4

View File

@@ -6,8 +6,8 @@
faction: HomeDecor
uiPosition: 0
icon:
sprite: Objects/Misc/candles.rsi
state: candle-big
sprite: _CP14/Objects/Misc/candles.rsi
state: small1
service: !type:CP14BuyItemsService
product: CP14Candle
@@ -122,26 +122,15 @@
# Rep 1
- type: cp14TradingPosition
id: CP14CandleRed
id: CP14Candelabra
faction: HomeDecor
reputationLevel: 1
uiPosition: 0
icon:
sprite: Objects/Misc/candles.rsi
state: candle-big
sprite: _CP14/Objects/Misc/candelabra.rsi
state: triple
service: !type:CP14BuyItemsService
product: CP14CandleRed
- type: cp14TradingPosition
id: CP14CandleBlack
faction: HomeDecor
reputationLevel: 1
uiPosition: 1
icon:
sprite: Objects/Misc/candles.rsi
state: candle-big
service: !type:CP14BuyItemsService
product: CP14CandleBlack
product: CP14Candelabra
- type: cp14TradingPosition
id: CP14KeyIronBlank

View File

@@ -0,0 +1,25 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by vladimir.s",
"size": {
"x": 32,
"y": 40
},
"states": [
{
"name": "triple"
},
{
"name": "triple_fire",
"delays": [
[
0.2,
0.2,
0.2,
0.2
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -0,0 +1,31 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by vladimir.s",
"size": {
"x": 20,
"y": 20
},
"states": [
{
"name": "small1"
},
{
"name": "small2"
},
{
"name": "small3"
},
{
"name": "small_fire",
"delays": [
[
0.2,
0.2,
0.2,
0.2
]
]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -399,6 +399,30 @@ CP14LongLeatherBoots: CP14ClothingShoesLongLeatherBoots
#2025-07-27
CP14DemiplanEnterRoomMarker: null
CP14CandleRed: CP14Candle
CP14CandleBlue: CP14Candle
CP14CandleBlack: CP14Candle
CP14CandleGreen: CP14Candle
CP14CandlePurple: CP14Candle
CP14CandleSmall: CP14Candle
CP14CandleRedSmall: CP14Candle
CP14CandleBlueSmall: CP14Candle
CP14CandleBlackSmall: CP14Candle
CP14CandleGreenSmall: CP14Candle
CP14CandlePurpleSmall: CP14Candle
CP14CandleInfinite: CP14CandleIgnited
CP14CandleRedInfinite: CP14CandleIgnited
CP14CandleBlueInfinite: CP14CandleIgnited
CP14CandleBlackInfinite: CP14CandleIgnited
CP14CandleGreenInfinite: CP14CandleIgnited
CP14CandlePurpleInfinite: CP14CandleIgnited
CP14CandleRedSmallInfinite: CP14CandleIgnited
CP14CandleBlueSmallInfinite: CP14CandleIgnited
CP14CandleBlackSmallInfinite: CP14CandleIgnited
CP14CandleGreenSmallInfinite: CP14CandleIgnited
CP14CandlePurpleSmallInfinite: CP14CandleIgnited
# <---> CrystallEdge migration zone end