Fixes and stuff (#229)
* - add: Add rites description. * - fix: Fix fuel tank explosion. * - tweak: Jug can attack now. * - tweak: Less material size. * - fix: Translation fix. * - tweak: Dead people are collideable. * - tweak: Less small mobs damage. * - add: You can now shoot yourself. * - add: Mood effect for felinids. * Revert "- fix: Fix fuel tank explosion." This reverts commit 72d9d6d2c5a3e579c50e8fa63a58e6d989dbe9e9. * - fix: Keyhole fixes. * - tweak: Doors now cost less material. * - fix: Change loc.
This commit is contained in:
33
Content.Server/_White/Construction/DoorUnlocked.cs
Normal file
33
Content.Server/_White/Construction/DoorUnlocked.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using Content.Shared._White.Keyhole.Components;
|
||||
using Content.Shared.Construction;
|
||||
using Content.Shared.Examine;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Content.Server._White.Construction;
|
||||
|
||||
[UsedImplicitly, DataDefinition]
|
||||
public sealed partial class DoorUnlocked : IGraphCondition
|
||||
{
|
||||
public bool Condition(EntityUid uid, IEntityManager entityManager)
|
||||
{
|
||||
return !entityManager.TryGetComponent(uid, out KeyholeComponent? keyhole) || !keyhole.Locked;
|
||||
}
|
||||
|
||||
public bool DoExamine(ExaminedEvent args)
|
||||
{
|
||||
if (Condition(args.Examined, IoCManager.Resolve<IEntityManager>()))
|
||||
return false;
|
||||
|
||||
args.PushMarkup(Loc.GetString("construction-examine-condition-door-locked"));
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public IEnumerable<ConstructionGuideEntry> GenerateGuideEntry()
|
||||
{
|
||||
yield return new ConstructionGuideEntry
|
||||
{
|
||||
Localization = "construction-examine-condition-door-locked"
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user