(7df498c13) Fixed: Doors being weldable in the tutorial with no access to crowbar or info on how to open shut doors, thus causing the player to get stuck
This commit is contained in:
@@ -59,6 +59,8 @@ namespace Barotrauma.Items.Components
|
||||
get { return item.GetComponent<Repairable>()?.ShowRepairUIThreshold ?? 0.0f; }
|
||||
}
|
||||
|
||||
public bool CanBeWelded = true;
|
||||
|
||||
private float stuck;
|
||||
[Serialize(0.0f, false)]
|
||||
public float Stuck
|
||||
@@ -66,7 +68,7 @@ namespace Barotrauma.Items.Components
|
||||
get { return stuck; }
|
||||
set
|
||||
{
|
||||
if (isOpen || isBroken) return;
|
||||
if (isOpen || isBroken || !CanBeWelded) return;
|
||||
stuck = MathHelper.Clamp(value, 0.0f, 100.0f);
|
||||
if (stuck <= 0.0f) isStuck = false;
|
||||
if (stuck >= 100.0f) isStuck = true;
|
||||
|
||||
@@ -427,6 +427,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
if (target is Door door)
|
||||
{
|
||||
if (!door.CanBeWelded) continue;
|
||||
for (int i = 0; i < effect.propertyNames.Length; i++)
|
||||
{
|
||||
string propertyName = effect.propertyNames[i];
|
||||
|
||||
Reference in New Issue
Block a user