diff --git a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs index 9ab756020d..83277aa8cd 100644 --- a/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs +++ b/Content.Server/_CP14/Workbench/CP14WorkbenchSystem.cs @@ -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 _metaQuery; private EntityQuery _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); diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml b/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml index 3890f04533..6aae4178ce 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Materials/simple.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/_CP14/Entities/Objects/Misc/tiles.yml new file mode 100644 index 0000000000..0515728149 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Misc/tiles.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Workbench/misc.yml similarity index 100% rename from Resources/Prototypes/_CP14/Recipes/Workbench/workbench.yml rename to Resources/Prototypes/_CP14/Recipes/Workbench/Workbench/misc.yml diff --git a/Resources/Prototypes/_CP14/Recipes/Workbench/Workbench/tile.yml b/Resources/Prototypes/_CP14/Recipes/Workbench/Workbench/tile.yml new file mode 100644 index 0000000000..ec21f927c4 --- /dev/null +++ b/Resources/Prototypes/_CP14/Recipes/Workbench/Workbench/tile.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Stacks/floor_tile_stacks.yml b/Resources/Prototypes/_CP14/Stacks/floor_tile_stacks.yml new file mode 100644 index 0000000000..55d98612a4 --- /dev/null +++ b/Resources/Prototypes/_CP14/Stacks/floor_tile_stacks.yml @@ -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 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Tiles/produced.yml b/Resources/Prototypes/_CP14/Tiles/produced.yml index 24d0711ab7..b0753b1840 100644 --- a/Resources/Prototypes/_CP14/Tiles/produced.yml +++ b/Resources/Prototypes/_CP14/Tiles/produced.yml @@ -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 diff --git a/Resources/Prototypes/_CP14/Tiles/woodplanks.yml b/Resources/Prototypes/_CP14/Tiles/woodplanks.yml index 99065cddf6..9a87c98832 100644 --- a/Resources/Prototypes/_CP14/Tiles/woodplanks.yml +++ b/Resources/Prototypes/_CP14/Tiles/woodplanks.yml @@ -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 diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/foundation.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/foundation.png new file mode 100644 index 0000000000..d70befa842 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/foundation.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/marble.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/marble.png new file mode 100644 index 0000000000..6f45377cc5 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/marble.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/meta.json b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/meta.json new file mode 100644 index 0000000000..1fef4aff31 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/meta.json @@ -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" + } + ] +} diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks.png new file mode 100644 index 0000000000..a816ab36d5 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_big.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_big.png new file mode 100644 index 0000000000..7a18a33ac4 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_big.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_cruciform.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_cruciform.png new file mode 100644 index 0000000000..8487b93325 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_cruciform.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_stairways.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_stairways.png new file mode 100644 index 0000000000..ea7e78188d Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/oak_woodplanks_stairways.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick.png new file mode 100644 index 0000000000..2613d89f1f Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved.png new file mode 100644 index 0000000000..bb87392788 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved2.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved2.png new file mode 100644 index 0000000000..a548502bf1 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_small_carved2.png differ diff --git a/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_square_carved.png b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_square_carved.png new file mode 100644 index 0000000000..dc6c75dfbf Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Tile/tile.rsi/stonebrick_square_carved.png differ