forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize tile prying to any tool quality (space-wizards#24432)
* Generalize tile prying to any tool quality * ballin
- Loading branch information
1 parent
8635337
commit 90a3f92
Showing
22 changed files
with
267 additions
and
389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 0 additions & 17 deletions
17
Content.Server/Tools/Components/LatticeCuttingComponent.cs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
44 changes: 44 additions & 0 deletions
44
Content.Shared/Tools/Components/ToolTileCompatibleComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Content.Shared.DoAfter; | ||
using Content.Shared.Tools.Systems; | ||
using Robust.Shared.GameStates; | ||
using Robust.Shared.Map; | ||
using Robust.Shared.Serialization; | ||
|
||
namespace Content.Shared.Tools.Components; | ||
|
||
/// <summary> | ||
/// This is used for entities with <see cref="ToolComponent"/> that are additionally | ||
/// able to modify tiles. | ||
/// </summary> | ||
[RegisterComponent, NetworkedComponent] | ||
[Access(typeof(SharedToolSystem))] | ||
public sealed partial class ToolTileCompatibleComponent : Component | ||
{ | ||
/// <summary> | ||
/// The time it takes to modify the tile. | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
public TimeSpan Delay = TimeSpan.FromSeconds(1); | ||
|
||
/// <summary> | ||
/// Whether or not the tile being modified must be unobstructed | ||
/// </summary> | ||
[DataField, ViewVariables(VVAccess.ReadWrite)] | ||
public bool RequiresUnobstructed = true; | ||
} | ||
|
||
[Serializable, NetSerializable] | ||
public sealed partial class TileToolDoAfterEvent : DoAfterEvent | ||
{ | ||
public NetCoordinates Coordinates; | ||
|
||
public TileToolDoAfterEvent(NetCoordinates coordinates) | ||
{ | ||
Coordinates = coordinates; | ||
} | ||
|
||
public override DoAfterEvent Clone() | ||
{ | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.