Aghost tweaks (#12373)
This commit is contained in:
@@ -245,7 +245,12 @@ namespace Content.Server.Strip
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var doAfterArgs = new DoAfterEventArgs(user, component.HandStripDelay, CancellationToken.None, component.Owner)
|
var userEv = new BeforeStripEvent(component.HandStripDelay);
|
||||||
|
RaiseLocalEvent(user, userEv);
|
||||||
|
var ev = new BeforeGettingStrippedEvent(userEv.Time, userEv.Stealth);
|
||||||
|
RaiseLocalEvent(component.Owner, ev);
|
||||||
|
|
||||||
|
var doAfterArgs = new DoAfterEventArgs(user, ev.Time, CancellationToken.None, component.Owner)
|
||||||
{
|
{
|
||||||
ExtraCheck = Check,
|
ExtraCheck = Check,
|
||||||
BreakOnStun = true,
|
BreakOnStun = true,
|
||||||
@@ -292,9 +297,9 @@ namespace Content.Server.Strip
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_inventorySystem.CanUnequip(user, component.Owner, slot, out _))
|
if (!_inventorySystem.CanUnequip(user, component.Owner, slot, out var reason))
|
||||||
{
|
{
|
||||||
user.PopupMessageCursor(Loc.GetString("strippable-component-cannot-unequip-message", ("owner", component.Owner)));
|
user.PopupMessageCursor(reason);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -376,7 +381,6 @@ namespace Content.Server.Strip
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var userEv = new BeforeStripEvent(component.HandStripDelay);
|
var userEv = new BeforeStripEvent(component.HandStripDelay);
|
||||||
RaiseLocalEvent(user, userEv);
|
RaiseLocalEvent(user, userEv);
|
||||||
var ev = new BeforeGettingStrippedEvent(userEv.Time, userEv.Stealth);
|
var ev = new BeforeGettingStrippedEvent(userEv.Time, userEv.Stealth);
|
||||||
|
|||||||
@@ -240,8 +240,8 @@ public abstract partial class InventorySystem
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Is the actor currently stripping the target? Here we could check if the actor has the stripping UI open, but
|
// Is the actor currently stripping the target? Here we could check if the actor has the stripping UI open, but
|
||||||
// that requires server/client specific code. so lets just check if they **could** open the stripping UI.
|
// that requires server/client specific code.
|
||||||
// Note that this doesn't check that the item is equipped by the target, as this is done elsewhere.
|
// Uhhh TODO, fix this. This doesn't even fucking check if the target item is IN the targets inventory.
|
||||||
return actor != target &&
|
return actor != target &&
|
||||||
HasComp<SharedStrippableComponent>(target) &&
|
HasComp<SharedStrippableComponent>(target) &&
|
||||||
HasComp<SharedStrippingComponent>(actor) &&
|
HasComp<SharedStrippingComponent>(actor) &&
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
namespace Content.Shared.Strip.Components;
|
namespace Content.Shared.Strip.Components;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Give this to an entity when you want to increase their stripping times
|
/// Give this to an entity when you want to decrease stripping times
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[RegisterComponent]
|
[RegisterComponent]
|
||||||
public sealed class ThievingComponent : Component
|
public sealed class ThievingComponent : Component
|
||||||
@@ -10,8 +10,8 @@ public sealed class ThievingComponent : Component
|
|||||||
/// How much the strip time should be shortened by
|
/// How much the strip time should be shortened by
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
[DataField("stealTime")]
|
[DataField("stripTimeReduction")]
|
||||||
public float StealTime = 0.5f;
|
public float StripTimeReduction = 0.5f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Should it notify the user if they're stripping a pocket?
|
/// Should it notify the user if they're stripping a pocket?
|
||||||
|
|||||||
@@ -17,6 +17,6 @@ public sealed class ThievingSystem : EntitySystem
|
|||||||
private void OnBeforeStrip(EntityUid uid, ThievingComponent component, BeforeStripEvent args)
|
private void OnBeforeStrip(EntityUid uid, ThievingComponent component, BeforeStripEvent args)
|
||||||
{
|
{
|
||||||
args.Stealth |= component.Stealthy;
|
args.Stealth |= component.Stealthy;
|
||||||
args.Additive -= component.StealTime;
|
args.Additive -= component.StripTimeReduction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@
|
|||||||
fiberMaterial: fibers-nanomachines
|
fiberMaterial: fibers-nanomachines
|
||||||
- type: FingerprintMask
|
- type: FingerprintMask
|
||||||
- type: Thieving
|
- type: Thieving
|
||||||
stealTime: 1
|
stripTimeReduction: 1
|
||||||
stealthy: true
|
stealthy: true
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
@@ -251,7 +251,7 @@
|
|||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/Hands/Gloves/Color/black.rsi
|
sprite: Clothing/Hands/Gloves/Color/black.rsi
|
||||||
- type: Thieving
|
- type: Thieving
|
||||||
stealTime: 1.5
|
stripTimeReduction: 1.5
|
||||||
stealthy: true
|
stealthy: true
|
||||||
- type: Fiber
|
- type: Fiber
|
||||||
fiberMaterial: fibers-synthetic
|
fiberMaterial: fibers-synthetic
|
||||||
|
|||||||
@@ -101,3 +101,7 @@
|
|||||||
receiveFrequencyId: SuitSensor
|
receiveFrequencyId: SuitSensor
|
||||||
- type: WirelessNetworkConnection
|
- type: WirelessNetworkConnection
|
||||||
range: 500
|
range: 500
|
||||||
|
- type: Thieving
|
||||||
|
stripTimeReduction: 9999
|
||||||
|
stealthy: true
|
||||||
|
- type: Stripping
|
||||||
|
|||||||
Reference in New Issue
Block a user