Tiles rework (#131)

* tile restruct

* filter tiles

* Update ContentTileDefinition.cs

* oopsie

* Update migration.yml

* Update cave-arena.yml

* floors fix
This commit is contained in:
Ed
2024-05-04 16:35:59 +03:00
committed by GitHub
parent ba009f34fa
commit 72b8fcf99c
29 changed files with 254 additions and 349 deletions

View File

@@ -1,3 +1,16 @@
cp-tiles-planet-grass = grass
cp-tiles-planet-stone = stone
cp-tiles-planet-dirt = dirt
# Base
cp14-tiles-base = rock strata
# Natural
cp14-tiles-grass = meadow grass
cp14-tiles-dirt = soil
# Produced
cp14-tiles-foundation = foundation
cp14-tiles-woodplanks = wood plank floor
cp14-tiles-woodplanks-big = large wood plank floor
cp14-tiles-stonebricks = stone brick floor
cp14-tiles-stonebricks-small-carved1 = carved brick floor
cp14-tiles-stonebricks-small-carved2 = carved brick floor
cp14-tiles-stonebricks-square-carved = carved brick floor

View File

@@ -1,3 +1,16 @@
cp-tiles-planet-grass = травяной покров
cp-tiles-planet-stone = камень
cp-tiles-planet-dirt = земля
# Base
cp14-tiles-base = каменная толща
# Natural
cp14-tiles-grass = луговая трава
cp14-tiles-dirt = почва
# Produced
cp14-tiles-foundation = фундамент
cp14-tiles-woodplanks = пол из деревянных досок
cp14-tiles-woodplanks-big = пол из больших деревянных досок
cp14-tiles-stonebricks = каменный кирпичынй пол
cp14-tiles-stonebricks-small-carved1 = пол из резного кирпича
cp14-tiles-stonebricks-small-carved2 = пол из резного кирпича
cp14-tiles-stonebricks-square-carved = пол из резного кирпича

View File

@@ -3,8 +3,8 @@ meta:
postmapinit: false
tilemap:
0: Space
1: CP14FloorPlanetDirt
3: CP14FloorPlanetStone
1: CP14FloorDirt
3: CP14FloorBase
entities:
- proto: ""
entities:

View File

@@ -1,157 +0,0 @@
- type: entity
id: CP14FloorBase
abstract: true
parent: BaseStructure
components:
- type: PlacementReplacement
key: CP14floor
- type: Sprite
drawdepth: FloorTiles
- type: Physics
- type: Transform
anchored: true
noRot: true
- type: BlockWeather
- type: Damageable
damageContainer: Inorganic
- type: Tag
tags:
- HideContextMenu
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 10
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.45,0.45,0.45"
density: 60
mask:
- MachineMask
layer:
- MidImpassable
- LowImpassable
hard: false
- type: entity
id: CP14FloorWood
parent:
- CP14FloorBase
- CP14BaseWooden
name: wooden floor
description: simple, flammable boards.
components:
- type: Sprite
sprite: _CP14/Structures/Floors/wood.rsi
layers:
- state: wood_1
map: ["random"]
- type: RandomSprite
available:
- random:
wood_1: ""
wood_2: ""
wood_3: ""
wood_4: ""
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepFloor
params:
volume: 8
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 10
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
- trigger:
!type:DamageTrigger
damage: 15
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
- !type:SpawnEntitiesBehavior
spawn:
MaterialWoodPlank:
min: 0
max: 1
- type: FireVisuals
sprite: _CP14/Effects/fire.rsi
normalState: full
- type: Construction
graph: CP14Floor
node: CP14FloorWood
- type: entity
parent: CP14FloorWood
id: CP14FloorWoodBig
components:
- type: Sprite
sprite: _CP14/Structures/Floors/wood_big.rsi
layers:
- state: wood_big_1
map: ["random"]
- type: RandomSprite
available:
- random:
wood_big_1: ""
wood_big_2: ""
wood_big_3: ""
wood_big_4: ""
- type: Construction
graph: CP14Floor
node: CP14FloorWoodBig
- type: entity
parent: CP14FloorBase
id: CP14FloorBricks
components:
- type: Sprite
sprite: _CP14/Structures/Floors/bricks.rsi
layers:
- state: bricks
- type: entity
parent: CP14FloorBase
id: CP14FloorBricksCarvedSmall1
components:
- type: Sprite
sprite: _CP14/Structures/Floors/bricks.rsi
layers:
- state: small_carved_bricks1
- type: entity
parent: CP14FloorBase
id: CP14FloorBricksCarvedSmall2
components:
- type: Sprite
sprite: _CP14/Structures/Floors/bricks.rsi
layers:
- state: small_carved_bricks2
- type: entity
parent: CP14FloorBase
id: CP14FloorBricksCarvedSquare
components:
- type: Sprite
sprite: _CP14/Structures/Floors/bricks.rsi
layers:
- state: square_carved_bricks

View File

@@ -1,24 +0,0 @@
- type: constructionGraph
id: CP14Floor
start: start
graph:
- node: start
actions:
- !type:DestroyEntity {}
edges:
- to: CP14FloorWood
steps:
- material: WoodPlank
amount: 2
doAfter: 1
- to: CP14FloorWoodBig
steps:
- material: WoodPlank
amount: 2
doAfter: 1
- node: CP14FloorWood
entity: CP14FloorWood
- node: CP14FloorWoodBig
entity: CP14FloorWoodBig

View File

@@ -1,31 +0,0 @@
- type: construction
crystallPunkAllowed: true
name: Wooden floor
description: Made of the most common planks. Simple and effective!
id: CP14FloorWood
graph: CP14Floor
startNode: start
targetNode: CP14FloorWood
category: construction-category-floor
icon:
sprite: _CP14/Structures/Floors/wood.rsi
state: wood_1
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: true
- type: construction
crystallPunkAllowed: true
name: Wooden big floor
description: Made of the most common planks. Simple and effective!
id: CP14FloorWoodBig
graph: CP14Floor
startNode: start
targetNode: CP14FloorWoodBig
category: construction-category-floor
icon:
sprite: _CP14/Structures/Floors/wood_big.rsi
state: wood_big_1
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: true

View File

@@ -0,0 +1,39 @@
# Tile structure:
# Base indedstructable stone tile
# - Dirt
# - Grass variants
# - Gravel
# - Sand
# - other natural tiles
# - Fundament
# - Wood planks
# - Stonebricks
# - other produced tiles
- type: tile
id: CP14FloorBase
name: cp14-tiles-base
sprite: /Textures/_CP14/Tiles/cave.png
variants: 14
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
baseTurf: CP14FloorBase #Recursivle indestructible
isSubfloor: true
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
indestructible: true

View File

@@ -1,62 +1,6 @@
- type: tile
id: CP14FloorPlanetGrass
name: cp-tiles-planet-grass
sprite: /Textures/Tiles/Planet/Grass/grass.png
variants: 4
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
edgeSpritePriority: 1
edgeSprites:
SouthEast: /Textures/Tiles/Planet/Grass/single_edge.png
NorthEast: /Textures/Tiles/Planet/Grass/single_edge.png
NorthWest: /Textures/Tiles/Planet/Grass/single_edge.png
SouthWest: /Textures/Tiles/Planet/Grass/single_edge.png
South: /Textures/Tiles/Planet/Grass/double_edge.png
East: /Textures/Tiles/Planet/Grass/double_edge.png
North: /Textures/Tiles/Planet/Grass/double_edge.png
West: /Textures/Tiles/Planet/Grass/double_edge.png
baseTurf: CPFloorPlanetDirt
isSubfloor: true
footstepSounds:
collection: FootstepGrass
heatCapacity: 10000
weather: true
indestructible: true
- type: tile
id: CP14FloorPlanetStone
name: cp-tiles-planet-stone
sprite: /Textures/_CP14/Tiles/cave.png
variants: 14
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
- 1.0
baseTurf: FloorPlanetGrass
isSubfloor: true
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
indestructible: true
- type: tile
id: CP14FloorPlanetDirt
name: cp-tiles-planet-dirt
id: CP14FloorDirt
name: cp14-tiles-dirt
sprite: /Textures/_CP14/Tiles/cavedrought.png
variants: 16
placementVariants:
@@ -76,10 +20,36 @@
- 1.0
- 1.0
- 1.0
baseTurf: FloorPlanetGrass
baseTurf: CP14FloorBase
isSubfloor: true
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
indestructible: true
- type: tile
id: CP14FloorGrass
name: cp14-tiles-grass
sprite: /Textures/Tiles/Planet/Grass/grass.png
variants: 4
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
edgeSpritePriority: 1
edgeSprites:
SouthEast: /Textures/Tiles/Planet/Grass/single_edge.png
NorthEast: /Textures/Tiles/Planet/Grass/single_edge.png
NorthWest: /Textures/Tiles/Planet/Grass/single_edge.png
SouthWest: /Textures/Tiles/Planet/Grass/single_edge.png
South: /Textures/Tiles/Planet/Grass/double_edge.png
East: /Textures/Tiles/Planet/Grass/double_edge.png
North: /Textures/Tiles/Planet/Grass/double_edge.png
West: /Textures/Tiles/Planet/Grass/double_edge.png
baseTurf: CP14FloorPlanetDirt
isSubfloor: true
footstepSounds:
collection: FootstepGrass
heatCapacity: 10000
weather: true

View File

@@ -0,0 +1,106 @@
- type: tile
id: CP14FloorFoundation
name: cp14-tiles-foundation
sprite: /Textures/_CP14/Tiles/foundation.png
variants: 4
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
baseTurf: CP14FloorBase
isSubfloor: true
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorWoodPlanks
name: cp14-tiles-woodplanks
sprite: /Textures/_CP14/Tiles/woodplanks.png
variants: 4
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
baseTurf: CP14FloorFoundation
isSubfloor: false
footstepSounds:
collection: FootstepWood
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorWoodPlanksBig
name: cp14-tiles-woodplanks-big
sprite: /Textures/_CP14/Tiles/woodplanks_big.png
variants: 4
placementVariants:
- 1.0
- 1.0
- 1.0
- 1.0
baseTurf: CP14FloorFoundation
isSubfloor: false
footstepSounds:
collection: FootstepWood
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorStonebricks
name: cp14-tiles-stonebricks
sprite: /Textures/_CP14/Tiles/stonebricks.png
variants: 1
placementVariants:
- 1.0
baseTurf: CP14Floorfundament
isSubfloor: false
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorStonebricksSmallCarved1
name: cp14-tiles-stonebricks-small-carved1
sprite: /Textures/_CP14/Tiles/stonebricks_small_carved_1.png
variants: 1
placementVariants:
- 1.0
baseTurf: CP14FloorFoundation
isSubfloor: false
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorStonebricksSmallCarved2
name: cp14-tiles-stonebricks-small-carved2
sprite: /Textures/_CP14/Tiles/stonebricks_small_carved_2.png
variants: 1
placementVariants:
- 1.0
baseTurf: CP14FloorFoundation
isSubfloor: false
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: false
- type: tile
id: CP14FloorStonebricksSquareCarved
name: cp14-tiles-stonebricks-square-carved
sprite: /Textures/_CP14/Tiles/stonebricks_square_carved.png
variants: 1
placementVariants:
- 1.0
baseTurf: CP14FloorFoundation
isSubfloor: false
footstepSounds:
collection: FootstepAsteroid
heatCapacity: 10000
weather: false

View File

@@ -1,23 +0,0 @@
{
"version": 1,
"license": "CC0-1.0",
"copyright": "Created by Jaraten for CrystallPunk14",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "bricks"
},
{
"name": "small_carved_bricks1"
},
{
"name": "small_carved_bricks2"
},
{
"name": "square_carved_bricks"
}
]
}

View File

@@ -1,23 +0,0 @@
{
"version": 1,
"license": "CC0-1.0",
"copyright": "Space Station 14",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "wood_1"
},
{
"name": "wood_2"
},
{
"name": "wood_3"
},
{
"name": "wood_4"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,23 +0,0 @@
{
"version": 1,
"license": "CC0-1.0",
"copyright": "Space Station 14",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "wood_big_1"
},
{
"name": "wood_big_2"
},
{
"name": "wood_big_3"
},
{
"name": "wood_big_4"
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

View File

@@ -0,0 +1,32 @@
# Attempted to keep the files in alphabetical order so its easier to audit.
# Finding individual authors is an unfeasible task. If you can reference the author please do so.
- files: ["cave.png"]
license: "CC-BY-SA-3.0"
copyright: "Space Station 14, recolored by TheShuEd"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"
- files: ["cavedrought.png"]
license: "CC-BY-SA-3.0"
copyright: "Space Station 14, recolored by TheShuEd"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"
- files: ["foundation.png"]
license: "CC-BY-SA-3.0"
copyright: "by TheShuEd"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"
- files: ["stonebricks.png", "stonebricks_small_carved_1.png", "stonebricks_small_carved_2.png", "stonebricks_square_carved.png"]
license: "CC-BY-SA-3.0"
copyright: "Created by Jaraten for CrystallPunk14"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"
- files: ["woodplanks.png"]
license: "CC-BY-SA-3.0"
copyright: "Space Station 14, recolored by TheShuEd"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"
- files: ["woodplanks_big.png"]
license: "CC-BY-SA-3.0"
copyright: "Space Station 14, recolored by TheShuEd"
source: "https://github.com/crystallpunk-14/crystall-punk-14/"

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 640 B

View File

@@ -1,3 +1,16 @@
# <---> CrystallPunk migration zone
# 2024-05-04
CP14FloorWood: null
CP14FloorWoodBig: null
CP14FloorBricks: null
CP14FloorBricksCarvedSmall1: null
CP14FloorBricksCarvedSmall2: null
CP14FloorBricksCarvedSquare: null
# <---> CrystallPunk migration zone end
# This is a basic dictionary that maps old entity prototype ids to new ids. This only works for entity prototypes, and
# is intended to allow maps to load without having to manually edit them. An empty or "null" string results in the
# entity getting deleted.