diff --git a/Content.Server/Nyanotrasen/Digging/DiggingSystem.cs b/Content.Server/Nyanotrasen/Digging/DiggingSystem.cs deleted file mode 100644 index 8d2e951cfcc..00000000000 --- a/Content.Server/Nyanotrasen/Digging/DiggingSystem.cs +++ /dev/null @@ -1,102 +0,0 @@ -using Content.Shared.Interaction; -using Content.Shared.Maps; -using Content.Shared.Nyanotrasen.Digging; -using Content.Shared.Physics; -using Content.Shared.Tools.Components; -using Content.Shared.Tools.Systems; -using Robust.Shared.Map; -using Robust.Shared.Map.Components; - -namespace Content.Server.Digging; - -public sealed class DiggingSystem : EntitySystem -{ - [Dependency] private readonly TileSystem _tiles = default!; - [Dependency] private readonly SharedMapSystem _maps = default!; - [Dependency] private readonly SharedToolSystem _tools = default!; - [Dependency] private readonly TurfSystem _turfs = default!; - [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!; - [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnDiggingAfterInteract); - SubscribeLocalEvent(OnEarthDigComplete); - } - - - private void OnEarthDigComplete(EntityUid shovel, EarthDiggingComponent comp, EarthDiggingDoAfterEvent args) - { - var coordinates = GetCoordinates(args.Coordinates); - if (!TryComp(shovel, out var _)) - return; - - var gridUid = coordinates.GetGridUid(EntityManager); - if (gridUid == null) - return; - - var grid = Comp(gridUid.Value); - var tile = _maps.GetTileRef(gridUid.Value, grid, coordinates); - - if (_tileDefManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef - || !tileDef.CanShovel - || string.IsNullOrEmpty(tileDef.BaseTurf) - || _turfs.IsTileBlocked(tile, CollisionGroup.MobMask)) - { - return; - } - - _tiles.DigTile(tile); - } - - private void OnDiggingAfterInteract(EntityUid uid, EarthDiggingComponent component, - AfterInteractEvent args) - { - if (args.Handled || !args.CanReach || args.Target != null) - return; - - if (TryDig(args.User, uid, component, args.ClickLocation)) - args.Handled = true; - } - - private bool TryDig(EntityUid user, EntityUid shovel, EarthDiggingComponent component, - EntityCoordinates clickLocation) - { - ToolComponent? tool = null; - if (component.ToolComponentNeeded && !TryComp(shovel, out tool)) - return false; - - var mapUid = clickLocation.GetGridUid(EntityManager); - if (mapUid == null || !TryComp(mapUid, out MapGridComponent? mapGrid)) - return false; - - var tile = _maps.GetTileRef(mapUid.Value, mapGrid, clickLocation); - - var coordinates = _maps.GridTileToLocal(mapUid.Value, mapGrid, tile.GridIndices); - - if (!_interactionSystem.InRangeUnobstructed(user, coordinates, popup: false)) - return false; - - if (_tileDefManager[tile.Tile.TypeId] is not ContentTileDefinition tileDef - || !tileDef.CanShovel - || string.IsNullOrEmpty(tileDef.BaseTurf) - || _tileDefManager[tileDef.BaseTurf] is not ContentTileDefinition - || _turfs.IsTileBlocked(tile, CollisionGroup.MobMask)) - { - return false; - } - - var ev = new EarthDiggingDoAfterEvent(GetNetCoordinates(clickLocation)); - return _tools.UseTool( - shovel, - user, - target: shovel, - doAfterDelay: component.Delay, - toolQualitiesNeeded: new[] { component.QualityNeeded }, - doAfterEv: ev, - toolComponent: tool - ); - } -} diff --git a/Content.Shared/Maps/ContentTileDefinition.cs b/Content.Shared/Maps/ContentTileDefinition.cs index 32f5db0e821..839d920df94 100644 --- a/Content.Shared/Maps/ContentTileDefinition.cs +++ b/Content.Shared/Maps/ContentTileDefinition.cs @@ -45,10 +45,6 @@ namespace Content.Shared.Maps [DataField] public PrototypeFlags DeconstructTools { get; set; } = new(); - // Delta V - [DataField("canShovel")] public bool CanShovel { get; private set; } - //Delta V - /// /// Legacy AF but nice to have. /// diff --git a/Content.Shared/Maps/TileSystem.cs b/Content.Shared/Maps/TileSystem.cs index 3f7852cfe60..d87b3ca50d5 100644 --- a/Content.Shared/Maps/TileSystem.cs +++ b/Content.Shared/Maps/TileSystem.cs @@ -104,22 +104,7 @@ public sealed class TileSystem : EntitySystem return DeconstructTile(tileRef); } - // Delta V - public bool DigTile(TileRef tileRef) - { - var tile = tileRef.Tile; - if (tile.IsEmpty) - return false; - - var tileDef = (ContentTileDefinition) _tileDefinitionManager[tile.TypeId]; - - if (!tileDef.CanShovel) - return false; - - return DeconstructTile(tileRef); - } - // Delta V public bool ReplaceTile(TileRef tileref, ContentTileDefinition replacementTile) { if (!TryComp(tileref.GridUid, out var grid)) diff --git a/Content.Shared/Nyanotrasen/Digging/DiggingEvents.cs b/Content.Shared/Nyanotrasen/Digging/DiggingEvents.cs deleted file mode 100644 index 89565da4c86..00000000000 --- a/Content.Shared/Nyanotrasen/Digging/DiggingEvents.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Content.Shared.DoAfter; -using Robust.Shared.Map; -using Robust.Shared.Serialization; - -namespace Content.Shared.Nyanotrasen.Digging; - - -[Serializable, NetSerializable] -public sealed partial class EarthDiggingDoAfterEvent : DoAfterEvent -{ - public NetCoordinates Coordinates { get; set; } - - private EarthDiggingDoAfterEvent(){} - - public EarthDiggingDoAfterEvent(NetCoordinates coordinates) - { - Coordinates = coordinates; - } - public override DoAfterEvent Clone() - { - return this; - } -} - -[Serializable, NetSerializable] -public sealed class EarthDiggingCancelledEvent : EntityEventArgs -{ - public NetEntity Shovel; -} diff --git a/Content.Shared/Nyanotrasen/Digging/EarthDiggingComponent.cs b/Content.Shared/Nyanotrasen/Digging/EarthDiggingComponent.cs deleted file mode 100644 index 65b6a1b6bf3..00000000000 --- a/Content.Shared/Nyanotrasen/Digging/EarthDiggingComponent.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Threading; -using Content.Shared.Tools; -using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; - -namespace Content.Shared.Nyanotrasen.Digging; - -[RegisterComponent] -public sealed partial class EarthDiggingComponent : Component -{ - [ViewVariables] - [DataField("toolComponentNeeded")] - public bool ToolComponentNeeded = true; - - [ViewVariables] - [DataField("qualityNeeded", customTypeSerializer:typeof(PrototypeIdSerializer))] - public string QualityNeeded = "Digging"; - - [ViewVariables] - [DataField("delay")] - public float Delay = 2f; - -} diff --git a/Resources/Audio/Nyanotrasen/Items/attributions.yml b/Resources/Audio/Nyanotrasen/Items/attributions.yml deleted file mode 100644 index 294cfe38bc4..00000000000 --- a/Resources/Audio/Nyanotrasen/Items/attributions.yml +++ /dev/null @@ -1,4 +0,0 @@ -- files: ["shovel_dig.ogg"] - license: "CC-BY-3.0" - copyright: "https://freesound.org/people/cameronmusic/" - source: "https://freesound.org/people/cameronmusic/sounds/138411/" diff --git a/Resources/Audio/Nyanotrasen/Items/shovel_dig.ogg b/Resources/Audio/Nyanotrasen/Items/shovel_dig.ogg deleted file mode 100644 index 16cf42eb9ad..00000000000 Binary files a/Resources/Audio/Nyanotrasen/Items/shovel_dig.ogg and /dev/null differ diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index 8680a08c18e..433f269a7ab 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -562,13 +562,6 @@ Wood: 50 - type: StaticPrice price: 25 - # Delta V: Adds tool quality for digging - - type: Tool - qualities: - - Digging - useSound: - path: /Audio/Nyanotrasen/Items/shovel_dig.ogg - - type: EarthDigging - type: Shovel - type: entity diff --git a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Misc/tiles.yml b/Resources/Prototypes/Nyanotrasen/Entities/Objects/Misc/tiles.yml deleted file mode 100644 index 0ab386f96dd..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Entities/Objects/Misc/tiles.yml +++ /dev/null @@ -1,63 +0,0 @@ -- type: entity - name: dark grass tile - parent: FloorTileItemBase - id: FloorTileItemGrassDark - components: - - type: Sprite - sprite: /Textures/Nyanotrasen/Objects/Tiles/tiles.rsi - state: grassdark - - type: Item - heldPrefix: grassdark - - type: FloorTile - outputs: - - FloorGrassDark - - type: Stack - stackType: FloorTileGrassDark - -- type: entity - name: light grass tile - parent: FloorTileItemBase - id: FloorTileItemGrassLight - components: - - type: Sprite - sprite: /Textures/Nyanotrasen/Objects/Tiles/tiles.rsi - state: grasslight - - type: Item - heldPrefix: grasslight - - type: FloorTile - outputs: - - FloorGrassLight - - type: Stack - stackType: FloorTileGrassLight - -- type: entity - name: dirt tile - parent: FloorTileItemBase - id: FloorTileItemDirt - components: - - type: Sprite - sprite: /Textures/Nyanotrasen/Objects/Tiles/tiles.rsi - state: dirt - - type: Item - heldPrefix: dirt - - type: FloorTile - outputs: - - FloorDirt - - type: Stack - stackType: FloorTileDirt - -- type: entity - name: bedrock tile - parent: FloorTileItemBase - id: FloorTileItemBedrock - components: - - type: Sprite - sprite: /Textures/Nyanotrasen/Objects/Tiles/tiles.rsi - state: bedrock - - type: Item - heldPrefix: bedrock - - type: FloorTile - outputs: - - FloorBedrock - - type: Stack - stackType: FloorTileBedrock diff --git a/Resources/Prototypes/Nyanotrasen/Stacks/floor_tile_stacks.yml b/Resources/Prototypes/Nyanotrasen/Stacks/floor_tile_stacks.yml deleted file mode 100644 index d472b3054b9..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Stacks/floor_tile_stacks.yml +++ /dev/null @@ -1,23 +0,0 @@ -- type: stack - id: FloorTileGrassDark - name: dark grass floor tile - spawn: FloorTileItemGrassDark - maxCount: 30 - -- type: stack - id: FloorTileGrassLight - name: light grass floor tile - spawn: FloorTileItemGrassLight - maxCount: 30 - -- type: stack - id: FloorTileDirt - name: dirt floor tile - spawn: FloorTileItemDirt - maxCount: 30 - -- type: stack - id: FloorTileBedrock - name: bedrock floor tile - spawn: FloorTileItemBedrock - maxCount: 30 diff --git a/Resources/Prototypes/Nyanotrasen/Tiles/floors.yml b/Resources/Prototypes/Nyanotrasen/Tiles/floors.yml deleted file mode 100644 index d537e0bdb3e..00000000000 --- a/Resources/Prototypes/Nyanotrasen/Tiles/floors.yml +++ /dev/null @@ -1,20 +0,0 @@ -- type: tile - id: FloorBedrock - name: tiles-bedrock-floor - sprite: /Textures/Nyanotrasen/Tiles/bedrock.png - variants: 4 - placementVariants: - - 1.0 - - 1.0 - - 1.0 - - 1.0 - baseTurf: Space - isSubfloor: true - #canCrowbar: true # Come back - # Maybe if there's ever some way to combine grids or prevent overly simple spacing. - # canShovel: true - footstepSounds: - collection: FootstepAsteroid - itemDrop: FloorTileItemBedrock # Delta V - heatCapacity: 10000 - weather: true diff --git a/Resources/Prototypes/Nyanotrasen/tool_qualities.yml b/Resources/Prototypes/Nyanotrasen/tool_qualities.yml deleted file mode 100644 index 6780b2ee210..00000000000 --- a/Resources/Prototypes/Nyanotrasen/tool_qualities.yml +++ /dev/null @@ -1,6 +0,0 @@ -- type: tool - id: Digging - name: tool-quality-digging-name - toolName: tool-quality-digging-tool-name - spawn: Shovel - icon: { sprite: Objects/Tools/shovel.rsi, state: icon } diff --git a/Resources/Prototypes/Tiles/floors.yml b/Resources/Prototypes/Tiles/floors.yml index 59fa88be2b2..b38b7b08155 100644 --- a/Resources/Prototypes/Tiles/floors.yml +++ b/Resources/Prototypes/Tiles/floors.yml @@ -201,7 +201,7 @@ collection: FootstepHull itemDrop: FloorTileItemBrassFilled heatCapacity: 10000 - + - type: tile id: FloorBrassReebe name: tiles-brass-floor-reebe @@ -1446,7 +1446,6 @@ sprite: /Textures/Tiles/grass.png baseTurf: FloorDirt isSubfloor: true - canShovel: true #DV footstepSounds: collection: FootstepGrass itemDrop: FloorTileItemGrass @@ -1459,7 +1458,6 @@ sprite: /Textures/Tiles/grassjungle.png baseTurf: FloorDirt isSubfloor: true - canShovel: true # Delta V footstepSounds: collection: FootstepGrass itemDrop: FloorTileItemGrassJungle @@ -1478,10 +1476,8 @@ - 1.0 baseTurf: FloorDirt isSubfloor: true - canShovel: true # Delta V footstepSounds: collection: FootstepGrass - itemDrop: FloorTileItemGrassDark # Delta V heatCapacity: 10000 weather: true @@ -1497,10 +1493,8 @@ - 1.0 baseTurf: FloorDirt isSubfloor: true - canShovel: true # Delta V footstepSounds: collection: FootstepGrass - itemDrop: FloorTileItemGrassLight heatCapacity: 10000 weather: true @@ -1516,12 +1510,10 @@ - 1.0 baseTurf: Plating isSubfloor: true - canShovel: true # Delta V footstepSounds: collection: FootstepAsteroid - itemDrop: FloorTileItemDirt # Delta V heatCapacity: 10000 - weather: True + weather: true # Asteroid @@ -1940,4 +1932,4 @@ barestepSounds: collection: BarestepWood itemDrop: FloorTileItemWoodLarge - heatCapacity: 10000 \ No newline at end of file + heatCapacity: 10000 diff --git a/Resources/Prototypes/Tiles/planet.yml b/Resources/Prototypes/Tiles/planet.yml index 18f61f2cdd2..f8f092650ef 100644 --- a/Resources/Prototypes/Tiles/planet.yml +++ b/Resources/Prototypes/Tiles/planet.yml @@ -118,7 +118,6 @@ West: /Textures/Tiles/Planet/Snow/snow_double_edge_west.png isSubfloor: true itemDrop: FloorTileItemSnow # Delta V - canShovel: true # Delta V footstepSounds: collection: FootstepSnow heatCapacity: 10000 diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-left.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-left.png deleted file mode 100644 index 0f35af1aa89..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-left.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-right.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-right.png deleted file mode 100644 index 65690ea25ee..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock-inhand-right.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock.png deleted file mode 100644 index f2c93199ca8..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/bedrock.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-left.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-left.png deleted file mode 100644 index 08e74e1f79d..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-left.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-right.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-right.png deleted file mode 100644 index e912f56fb26..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt-inhand-right.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt.png deleted file mode 100644 index 1d5851bd1e3..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/dirt.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-left.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-left.png deleted file mode 100644 index 89c8980e0e4..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-left.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-right.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-right.png deleted file mode 100644 index 1b5858effda..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark-inhand-right.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark.png deleted file mode 100644 index 6ebcb916e4c..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassdark.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-left.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-left.png deleted file mode 100644 index 396b8bff785..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-left.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-right.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-right.png deleted file mode 100644 index 201e0c149e1..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grassjungle-inhand-right.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-left.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-left.png deleted file mode 100644 index 9254700015f..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-left.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-right.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-right.png deleted file mode 100644 index f119a7f9a5a..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight-inhand-right.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight.png b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight.png deleted file mode 100644 index d318e8b91a6..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/grasslight.png and /dev/null differ diff --git a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/meta.json b/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/meta.json deleted file mode 100644 index c83cdb81ec0..00000000000 --- a/Resources/Textures/Nyanotrasen/Objects/Tiles/tiles.rsi/meta.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "version": 1, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c6e3401f2e7e1e55c57060cdf956a98ef1fefc24, additional copyrights see tiles folder.", - "size": { - "x": 32, - "y": 32 - }, - "states": [ - { - "name": "grassdark" - }, - { - "name": "grasslight" - }, - { - "name": "dirt" - }, - { - "name": "bedrock" - }, - { - "name": "grassjungle-inhand-left", - "directions": 4 - }, - { - "name": "grassjungle-inhand-right", - "directions": 4 - }, - { - "name": "grassdark-inhand-left", - "directions": 4 - }, - { - "name": "grassdark-inhand-right", - "directions": 4 - }, - { - "name": "grasslight-inhand-left", - "directions": 4 - }, - { - "name": "grasslight-inhand-right", - "directions": 4 - }, - { - "name": "dirt-inhand-left", - "directions": 4 - }, - { - "name": "dirt-inhand-right", - "directions": 4 - }, - { - "name": "bedrock-inhand-left", - "directions": 4 - }, - { - "name": "bedrock-inhand-right", - "directions": 4 - } - ] -} diff --git a/Resources/Textures/Nyanotrasen/Tiles/bedrock.png b/Resources/Textures/Nyanotrasen/Tiles/bedrock.png deleted file mode 100644 index 9292305dfb9..00000000000 Binary files a/Resources/Textures/Nyanotrasen/Tiles/bedrock.png and /dev/null differ