Merge remote-tracking branch 'upstream/stable' into ed-12-05-2025-upstream
# Conflicts: # .github/CODEOWNERS # Content.Client/Construction/UI/ConstructionMenuPresenter.cs # Content.Shared/Construction/Prototypes/ConstructionPrototype.cs # Content.Shared/Damage/Systems/SharedStaminaSystem.cs # Content.Shared/Lock/LockSystem.cs # Resources/Prototypes/Entities/Mobs/Customization/Markings/human_hair.yml # Resources/Prototypes/Entities/Objects/Specific/chemistry.yml # Resources/Prototypes/Procedural/vgroid.yml
This commit is contained in:
@@ -42,7 +42,7 @@ public sealed class LockSystem : EntitySystem
|
||||
base.Initialize();
|
||||
|
||||
SubscribeLocalEvent<LockComponent, ComponentStartup>(OnStartup);
|
||||
SubscribeLocalEvent<LockComponent, ActivateInWorldEvent>(OnActivated);
|
||||
SubscribeLocalEvent<LockComponent, ActivateInWorldEvent>(OnActivated, before: [typeof(ActivatableUISystem)]);
|
||||
SubscribeLocalEvent<LockComponent, StorageOpenAttemptEvent>(OnStorageOpenAttempt);
|
||||
SubscribeLocalEvent<LockComponent, ExaminedEvent>(OnExamined);
|
||||
SubscribeLocalEvent<LockComponent, GetVerbsEvent<AlternativeVerb>>(AddToggleLockVerb);
|
||||
@@ -75,24 +75,14 @@ public sealed class LockSystem : EntitySystem
|
||||
// Only attempt an unlock by default on Activate
|
||||
//if (lockComp.Locked && lockComp.UnlockOnClick)
|
||||
//{
|
||||
// TryUnlock(uid, args.User, lockComp);
|
||||
// args.Handled = true;
|
||||
// args.Handled = TryUnlock(uid, args.User, lockComp);
|
||||
//}
|
||||
//else if (!lockComp.Locked && lockComp.LockOnClick)
|
||||
//{
|
||||
// TryLock(uid, args.User, lockComp);
|
||||
// args.Handled = true;
|
||||
// args.Handled = TryLock(uid, args.User, lockComp);
|
||||
//}
|
||||
|
||||
//CrystallEdge LockSystem Adapt End
|
||||
}
|
||||
private void OnBeforeDoorOpened(EntityUid uid, LockComponent component, BeforeDoorOpenedEvent args)
|
||||
{
|
||||
if (!component.Locked)
|
||||
return;
|
||||
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnStorageOpenAttempt(EntityUid uid, LockComponent component, ref StorageOpenAttemptEvent args)
|
||||
{
|
||||
@@ -418,7 +408,11 @@ public sealed class LockSystem : EntitySystem
|
||||
{
|
||||
args.Cancel();
|
||||
if (lockComp.Locked)
|
||||
{
|
||||
_sharedPopupSystem.PopupClient(Loc.GetString("entity-storage-component-locked-message"), uid, args.User);
|
||||
}
|
||||
|
||||
_audio.PlayPredicted(component.AccessDeniedSound, uid, args.User);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user