This commit is contained in:
Leon Friedrich
2022-01-30 13:49:56 +13:00
committed by GitHub
parent 6fb492aae7
commit c465715273
37 changed files with 1400 additions and 1429 deletions

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic;
using Content.Server.Doors.Components;
using Content.Shared.Construction;
using Content.Shared.Doors.Components;
using Content.Shared.Examine;
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
@@ -19,10 +19,10 @@ namespace Content.Server.Construction.Conditions
public bool Condition(EntityUid uid, IEntityManager entityManager)
{
if (!entityManager.TryGetComponent(uid, out ServerDoorComponent? doorComponent))
if (!entityManager.TryGetComponent(uid, out DoorComponent? doorComponent))
return false;
return doorComponent.IsWeldedShut == Welded;
return doorComponent.State == DoorState.Welded;
}
public bool DoExamine(ExaminedEvent args)
@@ -31,9 +31,10 @@ namespace Content.Server.Construction.Conditions
var entMan = IoCManager.Resolve<IEntityManager>();
if (!entMan.TryGetComponent(entity, out ServerDoorComponent? door)) return false;
if (!entMan.TryGetComponent(entity, out DoorComponent? door)) return false;
if (door.IsWeldedShut != Welded)
var isWelded = door.State == DoorState.Welded;
if (isWelded != Welded)
{
if (Welded == true)
args.PushMarkup(Loc.GetString("construction-examine-condition-door-weld", ("entityName", entMan.GetComponent<MetaDataComponent>(entity).EntityName)) + "\n");