* Add the chameleon controller implant * address the issues (Git please dont kill me) * Address the review and fix some merge conflicts! * Cleanup * Add use delay * Silly mistakes * Making a PR at 2 am: Gone wrong * Predict use delay and disable the buttons until you can choose another * First phase custom clothing * Better system, now relays to agent id and mindshield. Chameleon loadouts are a lot better to work with as well * Address the review! No more evil goto * Slams way is better I should have read more closely xD * Some of the jobs * Add to Cargo, CentComm, Service, Passenger, Ninja, Cluwne, Wizard + Minor changes to existing; Add chameleon to bandanas, medals, jugsuits and HUDs * Add everything else * Fix test * Job name * This looks better * Add department organization * Minor cleanup * Added some mindshields * Remove redudent comment and change funcion name to be clearer * Fix cluwne outfit * fix merge conflicts --------- Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
29 lines
774 B
C#
29 lines
774 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Implants;
|
|
|
|
public abstract partial class SharedChameleonControllerSystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedUserInterfaceSystem _uiSystem = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<ChameleonControllerOpenMenuEvent>(OpenUI);
|
|
}
|
|
|
|
private void OpenUI(ChameleonControllerOpenMenuEvent ev)
|
|
{
|
|
var implant = ev.Action.Comp.Container;
|
|
|
|
if (!HasComp<ChameleonControllerImplantComponent>(implant))
|
|
return;
|
|
|
|
if (!_uiSystem.HasUi(implant.Value, ChameleonControllerKey.Key))
|
|
return;
|
|
|
|
_uiSystem.OpenUi(implant.Value, ChameleonControllerKey.Key, ev.Performer);
|
|
}
|
|
}
|