Chameleon controller implant (Clothing fast switch) (#33887)
* 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>
This commit is contained in:
@@ -179,4 +179,34 @@ public abstract class SharedStationSpawningSystem : EntitySystem
|
||||
RaiseLocalEvent(entity, ref ev);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets all the gear for a given slot when passed a loadout.
|
||||
/// </summary>
|
||||
/// <param name="loadout">The loadout to look through.</param>
|
||||
/// <param name="slot">The slot that you want the clothing for.</param>
|
||||
/// <returns>
|
||||
/// If there is a value for the given slot, it will return the proto id for that slot.
|
||||
/// If nothing was found, will return null
|
||||
/// </returns>
|
||||
public string? GetGearForSlot(RoleLoadout? loadout, string slot)
|
||||
{
|
||||
if (loadout == null)
|
||||
return null;
|
||||
|
||||
foreach (var group in loadout.SelectedLoadouts)
|
||||
{
|
||||
foreach (var items in group.Value)
|
||||
{
|
||||
if (!PrototypeManager.TryIndex(items.Prototype, out var loadoutPrototype))
|
||||
return null;
|
||||
|
||||
var gear = ((IEquipmentLoadout) loadoutPrototype).GetGear(slot);
|
||||
if (gear != string.Empty)
|
||||
return gear;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user