prevent from prying blast doors (#16077)
This commit is contained in:
@@ -185,7 +185,7 @@ public sealed class DoorSystem : SharedDoorSystem
|
|||||||
var canEv = new BeforeDoorPryEvent(user, tool);
|
var canEv = new BeforeDoorPryEvent(user, tool);
|
||||||
RaiseLocalEvent(target, canEv, false);
|
RaiseLocalEvent(target, canEv, false);
|
||||||
|
|
||||||
if (canEv.Cancelled)
|
if (!door.CanPry || canEv.Cancelled)
|
||||||
// mark handled, as airlock component will cancel after generating a pop-up & you don't want to pry a tile
|
// mark handled, as airlock component will cancel after generating a pop-up & you don't want to pry a tile
|
||||||
// under a windoor.
|
// under a windoor.
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -262,13 +262,16 @@ public sealed class DoorComponent : Component
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
[DataField("canPry"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
public bool CanPry = true;
|
||||||
|
|
||||||
[DataField("pryingQuality", customTypeSerializer: typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
|
[DataField("pryingQuality", customTypeSerializer: typeof(PrototypeIdSerializer<ToolQualityPrototype>))]
|
||||||
public string PryingQuality = "Prying";
|
public string PryingQuality = "Prying";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default time that the door should take to pry open.
|
/// Default time that the door should take to pry open.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField("pryTime")]
|
[DataField("pryTime"), ViewVariables(VVAccess.ReadWrite)]
|
||||||
public float PryTime = 1.5f;
|
public float PryTime = 1.5f;
|
||||||
|
|
||||||
[DataField("changeAirtight")]
|
[DataField("changeAirtight")]
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
openTimeTwo: 0.4
|
openTimeTwo: 0.4
|
||||||
openingAnimationTime: 1.0
|
openingAnimationTime: 1.0
|
||||||
closingAnimationTime: 1.0
|
closingAnimationTime: 1.0
|
||||||
pryTime: -1
|
canPry: false
|
||||||
crushDamage:
|
crushDamage:
|
||||||
types:
|
types:
|
||||||
Blunt: 25 # yowch
|
Blunt: 25 # yowch
|
||||||
|
|||||||
Reference in New Issue
Block a user