malf killer 9000 (robotics console) (#24855)

* create devicenet frequencies

* create borg transponder and give it to all nt borgs

* add robotics console

* actually implement battery charge display + some fix

* tab

* real explosion

* little safer

* disable destroy button clientside too when on cooldown

* m

* how do i do this when i review things...

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* webedit ops

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

* ui updates

* oracle java

* do a thing

* update ui when a borg times out

* maybe fix test

* add IsLocked to LockSystem

* make destroying gib the chassis again, so emagging isnt sus

* use locking

* require using alt click to unlock so normal click is open ui

* the

* use LogType.Action

* take this L

* pocket lint?

* sharer

* pro ops

* robor pushmarkup

* m

* update and make it not use prototype anymore

* frame0

* update yaml

* untroll

* bad

* h

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
This commit is contained in:
deltanedas
2024-05-09 06:36:07 +00:00
committed by GitHub
parent 24ab5c0982
commit b33730db22
21 changed files with 891 additions and 4 deletions

View File

@@ -58,12 +58,12 @@ public sealed class LockSystem : EntitySystem
return;
// Only attempt an unlock by default on Activate
if (lockComp.Locked)
if (lockComp.Locked && lockComp.UnlockOnClick)
{
TryUnlock(uid, args.User, lockComp);
args.Handled = true;
}
else if (lockComp.LockOnClick)
else if (!lockComp.Locked && lockComp.LockOnClick)
{
TryLock(uid, args.User, lockComp);
args.Handled = true;
@@ -201,6 +201,18 @@ public sealed class LockSystem : EntitySystem
return true;
}
/// <summary>
/// Returns true if the entity is locked.
/// Entities with no lock component are considered unlocked.
/// </summary>
public bool IsLocked(Entity<LockComponent?> ent)
{
if (!Resolve(ent, ref ent.Comp, false))
return false;
return ent.Comp.Locked;
}
/// <summary>
/// Raises an event for other components to check whether or not
/// the entity can be locked in its current state.