Skip to content

Commit

Permalink
Merge pull request #611 from fospas/revert_Advanced_Prying
Browse files Browse the repository at this point in the history
revert advanced prying
  • Loading branch information
CrimeMoot authored Nov 22, 2024
2 parents 6dd1217 + 2a9e55f commit fa4a153
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 39 deletions.
11 changes: 0 additions & 11 deletions Content.IntegrationTests/Tests/DoAfter/DoAfterCancellationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ public async Task CancelTilePry()
await SetTile(Floor);
await InteractUsing(Pry, awaitDoAfters: false);

// BACKMEN EDIT START
if (!ActiveDoAfters.Any())
{
await AssertTile(Plating);
return;
}
// BACKMEN EDIT END

await CancelDoAfters();
await AssertTile(Floor);

Expand All @@ -89,9 +81,6 @@ public async Task CancelRepeatedTilePry()
await InteractUsing(Pry, awaitDoAfters: false);
await RunTicks(1);

if (!ActiveDoAfters.Any()) // BACKMEN EDIT
return;

Assert.That(ActiveDoAfters.Count(), Is.EqualTo(1));
await AssertTile(Floor);

Expand Down
1 change: 0 additions & 1 deletion Content.Shared/Prying/Components/PryingComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public record struct GetPryTimeModifierEvent
public readonly EntityUid User;
public float PryTimeModifier = 1.0f;
public float BaseTime = 5.0f;
public float Neglect = 5f; // BACKMEN EDIT

public GetPryTimeModifierEvent(EntityUid user)
{
Expand Down
9 changes: 2 additions & 7 deletions Content.Shared/Prying/Systems/PryingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,7 @@ private bool StartPry(EntityUid target, EntityUid user, EntityUid? tool, float t
RaiseLocalEvent(target, ref modEv);

// BACKMEN EDIT START
var time = modEv.BaseTime * modEv.PryTimeModifier / toolModifier;

if (time <= modEv.Neglect)
time = 0;

var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(time), new DoorPryDoAfterEvent(), target, target, tool) // WD EDIT END
var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool)
{
BreakOnDamage = true,
BreakOnMove = true,
Expand Down Expand Up @@ -176,7 +171,7 @@ private void OnDoAfter(EntityUid uid, DoorComponent door, DoorPryDoAfterEvent ar
}


if (args.Used != null && comp != null && door.State is not DoorState.Closing and not DoorState.Opening) // BACKMEN EDIT
if (args.Used != null && comp != null)
{
_audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public sealed partial class ToolTileCompatibleComponent : Component
/// The time it takes to modify the tile.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Delay = TimeSpan.FromSeconds(0); // BACKMEN EDIT
public TimeSpan Delay = TimeSpan.FromSeconds(1);

/// <summary>
/// Whether or not the tile being modified must be unobstructed
Expand Down
7 changes: 1 addition & 6 deletions Resources/Locale/en-US/tools/tool-qualities.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,4 @@ tool-quality-rolling-name = Rolling
tool-quality-rolling-tool-name = Rolling Pin
tool-quality-digging-name = Digging
tool-quality-digging-tool-name = Shovel
# White Dream
tool-quality-advanced-prying-name = Advanced Prying
tool-quality-advanced-prying-tool-name = Axe
# White Dream
tool-quality-digging-tool-name = Shovel
2 changes: 0 additions & 2 deletions Resources/Locale/ru-RU/backmen/tools/tool-qualities.ftl

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
- type: Tool
qualities:
- Prying
- AdvancedPrying # White Dream
- type: ToolTileCompatible
- type: Prying
- type: UseDelay
Expand Down
3 changes: 0 additions & 3 deletions Resources/Prototypes/Tiles/plating.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
sprite: /Textures/Tiles/plating.png
baseTurf: Lattice
isSubfloor: true
deconstructTools: [ AdvancedPrying ] # White Dream
footstepSounds:
collection: FootstepPlating
friction: 0.3
Expand All @@ -21,7 +20,6 @@
- 1.0
baseTurf: Lattice
isSubfloor: true
deconstructTools: [ AdvancedPrying ] # White Dream
footstepSounds:
collection: FootstepPlating
friction: 0.3
Expand All @@ -33,7 +31,6 @@
sprite: /Textures/Tiles/plating_burnt.png
baseTurf: Lattice
isSubfloor: true
deconstructTools: [ AdvancedPrying ] # White Dream
footstepSounds:
collection: FootstepPlating
friction: 0.3
Expand Down
7 changes: 0 additions & 7 deletions Resources/Prototypes/_Backmen/tool_qualities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@
toolName: tool-quality-none-tool-name
spawn: KitchenKnife
icon: { sprite: Objects/Weapons/Melee/kitchen_knife.rsi, state: icon }

- type: tool
id: AdvancedPrying
name: tool-quality-advanced-prying-name
toolName: tool-quality-advanced-prying-tool-name
spawn: FireAxe
icon: { sprite: Objects/Weapons/Melee/fireaxe.rsi, state: icon }

0 comments on commit fa4a153

Please sign in to comment.