DoAfter fixes (#15127)
This commit is contained in:
@@ -233,6 +233,9 @@ namespace Content.Server.Construction
|
|||||||
BreakOnTargetMove = false,
|
BreakOnTargetMove = false,
|
||||||
BreakOnUserMove = true,
|
BreakOnUserMove = true,
|
||||||
NeedHand = false,
|
NeedHand = false,
|
||||||
|
// allow simultaneously starting several construction jobs using the same stack of materials.
|
||||||
|
CancelDuplicate = false,
|
||||||
|
BlockDuplicate = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (await _doAfterSystem.WaitDoAfter(doAfterArgs) == DoAfterStatus.Cancelled)
|
if (await _doAfterSystem.WaitDoAfter(doAfterArgs) == DoAfterStatus.Cancelled)
|
||||||
@@ -481,13 +484,13 @@ namespace Content.Server.Construction
|
|||||||
|
|
||||||
// We do this to be able to move the construction to its proper position in case it's anchored...
|
// We do this to be able to move the construction to its proper position in case it's anchored...
|
||||||
// Oh wow transform anchoring is amazing wow I love it!!!!
|
// Oh wow transform anchoring is amazing wow I love it!!!!
|
||||||
var wasAnchored = EntityManager.GetComponent<TransformComponent>(structure).Anchored;
|
// ikr
|
||||||
EntityManager.GetComponent<TransformComponent>(structure).Anchored = false;
|
var xform = Transform(structure);
|
||||||
|
var wasAnchored = xform.Anchored;
|
||||||
EntityManager.GetComponent<TransformComponent>(structure).Coordinates = ev.Location;
|
xform.Anchored = false;
|
||||||
EntityManager.GetComponent<TransformComponent>(structure).LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.Zero;
|
xform.Coordinates = ev.Location;
|
||||||
|
xform.LocalRotation = constructionPrototype.CanRotate ? ev.Angle : Angle.Zero;
|
||||||
EntityManager.GetComponent<TransformComponent>(structure).Anchored = wasAnchored;
|
xform.Anchored = wasAnchored;
|
||||||
|
|
||||||
RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack));
|
RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack));
|
||||||
_adminLogger.Add(LogType.Construction, LogImpact.Low, $"{ToPrettyString(user):player} has turned a {ev.PrototypeName} construction ghost into {ToPrettyString(structure)} at {Transform(structure).Coordinates}");
|
_adminLogger.Add(LogType.Construction, LogImpact.Low, $"{ToPrettyString(user):player} has turned a {ev.PrototypeName} construction ghost into {ToPrettyString(structure)} at {Transform(structure).Coordinates}");
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ namespace Content.Server.Power.EntitySystems
|
|||||||
|
|
||||||
private void OnToolFinished(EntityUid uid, ApcComponent component, ApcToolFinishedEvent args)
|
private void OnToolFinished(EntityUid uid, ApcComponent component, ApcToolFinishedEvent args)
|
||||||
{
|
{
|
||||||
if (!args.Cancelled)
|
if (args.Cancelled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
component.IsApcOpen = !component.IsApcOpen;
|
component.IsApcOpen = !component.IsApcOpen;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace Content.Server.Repairable
|
|||||||
delay *= component.SelfRepairPenalty;
|
delay *= component.SelfRepairPenalty;
|
||||||
|
|
||||||
// Can the tool actually repair this, does it have enough fuel?
|
// Can the tool actually repair this, does it have enough fuel?
|
||||||
args.Handled = !_toolSystem.UseTool(args.Used, args.User, uid, delay, component.QualityNeeded, new RepairFinishedEvent(), component.FuelCost);
|
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, delay, component.QualityNeeded, new RepairFinishedEvent(), component.FuelCost);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ public sealed partial class RevenantSystem
|
|||||||
var searchDoAfter = new DoAfterArgs(uid, revenant.SoulSearchDuration, new SoulEvent(), uid, target: target)
|
var searchDoAfter = new DoAfterArgs(uid, revenant.SoulSearchDuration, new SoulEvent(), uid, target: target)
|
||||||
{
|
{
|
||||||
BreakOnUserMove = true,
|
BreakOnUserMove = true,
|
||||||
|
BreakOnDamage = true,
|
||||||
DistanceThreshold = 2
|
DistanceThreshold = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,6 +143,7 @@ public sealed partial class RevenantSystem
|
|||||||
{
|
{
|
||||||
DistanceThreshold = 2,
|
DistanceThreshold = 2,
|
||||||
BreakOnUserMove = true,
|
BreakOnUserMove = true,
|
||||||
|
BreakOnDamage = true,
|
||||||
RequireCanInteract = false, // stuns itself
|
RequireCanInteract = false, // stuns itself
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user