old tiles YES (#1144)

This commit is contained in:
Ed
2025-04-07 01:34:45 +03:00
committed by GitHub
parent d81dbe4c20
commit e77645d9d6
19 changed files with 412 additions and 13 deletions

View File

@@ -3,6 +3,7 @@
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
*/
using System.Numerics;
using Content.Server.DoAfter;
using Content.Server.Popups;
using Content.Server.Stack;
@@ -15,6 +16,7 @@ using Content.Shared.UserInterface;
using Robust.Server.Audio;
using Robust.Server.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
namespace Content.Server._CP14.Workbench;
@@ -29,6 +31,7 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem
[Dependency] private readonly UserInterfaceSystem _userInterface = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly IRobustRandom _random = default!;
private EntityQuery<MetaDataComponent> _metaQuery;
private EntityQuery<StackComponent> _stackQuery;
@@ -100,7 +103,7 @@ public sealed partial class CP14WorkbenchSystem : SharedCP14WorkbenchSystem
//We teleport result to workbench AFTER craft.
foreach (var resultEntity in resultEntities)
{
_transform.SetCoordinates(resultEntity, Transform(ent).Coordinates);
_transform.SetCoordinates(resultEntity, Transform(ent).Coordinates.Offset(new Vector2(_random.NextFloat(-0.5f, 0.5f), _random.NextFloat(-0.5f, 0.5f))));
}
UpdateUIRecipes(ent, args.User);

View File

@@ -61,14 +61,6 @@
layers:
- state: stone
map: ["base"]
- type: FloorTile
placeTileSound:
collection: CP14Digging #TODO
params:
variation: 0.03
volume: 2
outputs:
- CP14FloorFoundation
- type: Appearance
- type: Stack
stackType: CP14Stone

View File

@@ -0,0 +1,171 @@
- type: entity
parent: BaseItem
id: CP14FloorTileBase
description: Makes the floor more pleasant for your feet. And your eyes.
abstract: true
categories: [ ForkFiltered ]
components:
- type: Sprite
sprite: _CP14/Objects/Tile/tile.rsi
- type: Item
sprite: _CP14/Objects/Tile/tile.rsi
size: Normal
- type: Stack
count: 1
- type: FloorTile
placeTileSound:
collection: CP14Digging #TODO
params:
variation: 0.03
volume: 2
- type: Damageable
damageContainer: Inorganic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 20
behaviors:
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
params:
volume: -8
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileFoundation
name: foundation floor tile
components:
- type: Sprite
state: foundation
- type: FloorTile
outputs:
- CP14FloorFoundation
- type: Stack
stackType: CP14FloorTileFoundation
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileMarbleBrick
name: marble brick
components:
- type: Sprite
state: marble
- type: FloorTile
outputs:
- CP14FloorMarble
- type: Stack
stackType: CP14FloorTileMarbleBrick
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileOakWoodplanks
name: oak woodplanks
components:
- type: Sprite
state: oak_woodplanks
- type: FloorTile
outputs:
- CP14FloorOakWoodPlanks
- type: Stack
stackType: CP14FloorTileOakWoodplanks
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileOakWoodplanksBig
name: oak big woodplanks
components:
- type: Sprite
state: oak_woodplanks_big
- type: FloorTile
outputs:
- CP14FloorOakWoodPlanksBig
- type: Stack
stackType: CP14FloorTileOakWoodplanksBig
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileOakWoodplanksCruciform
name: oak cruciform woodplanks
components:
- type: Sprite
state: oak_woodplanks_cruciform
- type: FloorTile
outputs:
- CP14FloorOakWoodPlanksCruciform
- type: Stack
stackType: CP14FloorTileOakWoodplanksCruciform
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileOakWoodplanksStairs
name: oak stairs woodplanks
components:
- type: Sprite
state: oak_woodplanks_stairways
- type: FloorTile
outputs:
- CP14FloorOakWoodPlanksStairways
- type: Stack
stackType: CP14FloorTileOakWoodplanksStairs
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileStonebricks
name: stonebrick
components:
- type: Sprite
state: stonebrick
- type: FloorTile
outputs:
- CP14FloorStonebricks
- type: Stack
stackType: CP14FloorTileStonebricks
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileStonebricksSmallCarved
name: small carved stonebricks
components:
- type: Sprite
state: stonebrick_small_carved
- type: FloorTile
outputs:
- CP14FloorStonebricksSmallCarved1
- type: Stack
stackType: CP14FloorTileStonebricksSmallCarved
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileStonebricksSmallCarved2
name: small carved stonebricks 2
components:
- type: Sprite
state: stonebrick_small_carved2
- type: FloorTile
outputs:
- CP14FloorStonebricksSmallCarved2
- type: Stack
stackType: CP14FloorTileStonebricksSmallCarved2
- type: entity
parent: CP14FloorTileBase
id: CP14FloorTileStonebricksSquareCarved
name: square carved stonebricks
components:
- type: Sprite
state: stonebrick_square_carved
- type: FloorTile
outputs:
- CP14FloorStonebricksSquareCarved
- type: Stack
stackType: CP14FloorTileStonebricksSquareCarved

View File

@@ -0,0 +1,109 @@
- type: CP14Recipe
id: CP14FloorTileFoundation
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileFoundation
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileMarbleBrick
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileMarbleBrick
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileStonebricks
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileStonebricks
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileStonebricksSmallCarved
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileStonebricksSmallCarved
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileStonebricksSmallCarved2
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileStonebricksSmallCarved2
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileStonebricksSquareCarved
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14Stone
count: 1
result: CP14FloorTileStonebricksSquareCarved
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileOakWoodplanks
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14WoodenPlanks
count: 1
result: CP14FloorTileOakWoodplanks
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileOakWoodplanksBig
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14WoodenPlanks
count: 1
result: CP14FloorTileOakWoodplanksBig
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileOakWoodplanksCruciform
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14WoodenPlanks
count: 1
result: CP14FloorTileOakWoodplanksCruciform
resultCount: 4
- type: CP14Recipe
id: CP14FloorTileOakWoodplanksStairs
tag: CP14RecipeWorkbench
craftTime: 1
requirements:
- !type:StackResource
stack: CP14WoodenPlanks
count: 1
result: CP14FloorTileOakWoodplanksStairs
resultCount: 4

View File

@@ -0,0 +1,69 @@
- type: stack
id: CP14FloorTileFoundation
name: foundation
spawn: CP14FloorTileFoundation
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: foundation }
maxCount: 30
- type: stack
id: CP14FloorTileMarbleBrick
name: marble brick
spawn: CP14FloorTileMarbleBrick
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: marble }
maxCount: 30
- type: stack
id: CP14FloorTileOakWoodplanks
name: oak woodplanks
spawn: CP14FloorTileOakWoodplanks
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: oak_woodplanks }
maxCount: 30
- type: stack
id: CP14FloorTileOakWoodplanksBig
name: oak big woodplanks
spawn: CP14FloorTileOakWoodplanksBig
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: oak_woodplanks_big }
maxCount: 30
- type: stack
id: CP14FloorTileOakWoodplanksCruciform
name: oak cruciform woodplanks
spawn: CP14FloorTileOakWoodplanksCruciform
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: oak_woodplanks_cruciform }
maxCount: 30
- type: stack
id: CP14FloorTileOakWoodplanksStairs
name: oak stairs woodplanks
spawn: CP14FloorTileOakWoodplanksStairs
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: oak_woodplanks_stairways }
maxCount: 30
- type: stack
id: CP14FloorTileStonebricks
name: stonebricks
spawn: CP14FloorTileStonebricks
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: stonebrick }
maxCount: 30
- type: stack
id: CP14FloorTileStonebricksSmallCarved
name: small carved stonebricks
spawn: CP14FloorTileStonebricksSmallCarved
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: stonebrick_small_carved }
maxCount: 30
- type: stack
id: CP14FloorTileStonebricksSmallCarved2
name: small carved stonebricks 2
spawn: CP14FloorTileStonebricksSmallCarved2
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: stonebrick_small_carved2 }
maxCount: 30
- type: stack
id: CP14FloorTileStonebricksSquareCarved
name: square carved stonebricks
spawn: CP14FloorTileStonebricksSquareCarved
icon: { sprite: _CP14/Objects/Tile/tile.rsi, state: stonebrick_square_carved }
maxCount: 30

View File

@@ -26,6 +26,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileFoundation
- type: tile
editorHidden: false
@@ -59,6 +61,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileStonebricks
- type: tile
editorHidden: false
@@ -92,6 +96,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileStonebricks
- type: tile
editorHidden: false
@@ -117,6 +123,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileStonebricksSmallCarved
- type: tile
editorHidden: false
@@ -142,6 +150,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileStonebricksSmallCarved2
- type: tile
editorHidden: false
@@ -167,6 +177,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileStonebricksSquareCarved
- type: tile
editorHidden: false
@@ -190,6 +202,8 @@
collection: FootstepAsteroid
heatCapacity: 10000
weather: true
deconstructTools: [ Prying ]
itemDrop: CP14FloorTileMarbleBrick
- type: tile
editorHidden: false

View File

@@ -528,7 +528,7 @@
baseTurf: CP14FloorFoundation
isSubfloor: false
deconstructTools: [ Prying ]
itemDrop: CP14WoodenPlanks1
itemDrop: CP14FloorTileOakWoodplanks
footstepSounds:
collection: FootstepWood
heatCapacity: 10000
@@ -559,7 +559,7 @@
baseTurf: CP14FloorFoundation
isSubfloor: false
deconstructTools: [ Prying ]
itemDrop: CP14WoodenPlanks1
itemDrop: CP14FloorTileOakWoodplanksBig
footstepSounds:
collection: FootstepWood
heatCapacity: 10000
@@ -590,7 +590,7 @@
baseTurf: CP14FloorFoundation
isSubfloor: false
deconstructTools: [ Prying ]
itemDrop: CP14WoodenPlanks1
itemDrop: CP14FloorTileOakWoodplanksCruciform
footstepSounds:
collection: FootstepWood
heatCapacity: 10000
@@ -621,7 +621,7 @@
baseTurf: CP14FloorFoundation
isSubfloor: false
deconstructTools: [ Prying ]
itemDrop: CP14WoodenPlanks1
itemDrop: CP14FloorTileOakWoodplanksStairs
footstepSounds:
collection: FootstepWood
heatCapacity: 10000

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

View File

@@ -0,0 +1,41 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "foundation"
},
{
"name": "marble"
},
{
"name": "oak_woodplanks"
},
{
"name": "oak_woodplanks_big"
},
{
"name": "oak_woodplanks_cruciform"
},
{
"name": "oak_woodplanks_stairways"
},
{
"name": "stonebrick"
},
{
"name": "stonebrick_small_carved"
},
{
"name": "stonebrick_small_carved2"
},
{
"name": "stonebrick_square_carved"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B