mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* Add shuttle interior drawing back
Just do it per-tile she'll be right, at least it's done with 1 draw call.
* Revamp shuttle console
* Bunch of cleanup work
* Lables sortito
* dok
* Pixel alignment and colours
* Fix a bunch of drawing bugs
* Shuttle map drawing
* Drawing fixes
* Map parallax working finally
* weh
* Commit all my stuff
* mic
* deez
* Update everything
* Xamlify everything
* uh
* Rudimentary blocker range
* My enemies have succeeded
* Bunch of changes to FTL
* Heaps of cleanup
* Fix FTL bugs
* FTL
* weewoo
* FTL fallback
* wew
* weh
* Basic FTL working
* FTL working
* FTL destination fixes
* a
* Exclusion zones
* Fix drawing / FTL
* Beacons working
* Coordinates drawing
* Fix unknown map names
* Dorks beginning
* State + docking cleanup start
* Basic dock drawing
* Bunch of drawing fixes
* Batching / color fixes
* Cleanup and beacons support
* weh
* weh
* Begin pings
* First draft at map objects
* Map fixup
* Faster drawing
* Fix perf + FTL
* Cached drawing
* Fix drawing
* Best I got
* strips
* Back to lists but with caching
* Final optimisation
* Fix dock bounds
* Docking work
* stinker
* kobolds
* Btns
* Docking vis working
* Fix docking pre-vis
* canasses
* Helldivers 2
* a
* Array life
* Fix
* Fix TODOs
* liltenhead feature club
* dorking
* Merge artifacts
* Last-minute touchup
(cherry picked from commit c5486873db)
94 lines
2.4 KiB
C#
94 lines
2.4 KiB
C#
using Content.Shared.Shuttles.Components;
|
|
using JetBrains.Annotations;
|
|
|
|
namespace Content.Shared.Shuttles.Systems;
|
|
|
|
public abstract partial class SharedShuttleSystem
|
|
{
|
|
/*
|
|
* Handles the label visibility on radar controls. This can be hiding the label or applying other effects.
|
|
*/
|
|
|
|
protected virtual void UpdateIFFInterfaces(EntityUid gridUid, IFFComponent component) {}
|
|
|
|
public Color GetIFFColor(EntityUid gridUid, bool self = false, IFFComponent? component = null)
|
|
{
|
|
if (self)
|
|
{
|
|
return IFFComponent.SelfColor;
|
|
}
|
|
|
|
if (!Resolve(gridUid, ref component, false))
|
|
{
|
|
return IFFComponent.IFFColor;
|
|
}
|
|
|
|
return component.Color;
|
|
}
|
|
|
|
public string? GetIFFLabel(EntityUid gridUid, bool self = false, IFFComponent? component = null)
|
|
{
|
|
if (!IFFComponent.ShowIFFDefault)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
var entName = MetaData(gridUid).EntityName;
|
|
|
|
if (self)
|
|
{
|
|
return entName;
|
|
}
|
|
|
|
if (Resolve(gridUid, ref component, false) && (component.Flags & (IFFFlags.HideLabel | IFFFlags.Hide)) != 0x0)
|
|
{
|
|
return null;
|
|
}
|
|
|
|
return string.IsNullOrEmpty(entName) ? Loc.GetString("shuttle-console-unknown") : entName;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Sets the color for this grid to appear as on radar.
|
|
/// </summary>
|
|
[PublicAPI]
|
|
public void SetIFFColor(EntityUid gridUid, Color color, IFFComponent? component = null)
|
|
{
|
|
component ??= EnsureComp<IFFComponent>(gridUid);
|
|
|
|
if (component.Color.Equals(color))
|
|
return;
|
|
|
|
component.Color = color;
|
|
Dirty(component);
|
|
UpdateIFFInterfaces(gridUid, component);
|
|
}
|
|
|
|
[PublicAPI]
|
|
public void AddIFFFlag(EntityUid gridUid, IFFFlags flags, IFFComponent? component = null)
|
|
{
|
|
component ??= EnsureComp<IFFComponent>(gridUid);
|
|
|
|
if ((component.Flags & flags) == flags)
|
|
return;
|
|
|
|
component.Flags |= flags;
|
|
Dirty(component);
|
|
UpdateIFFInterfaces(gridUid, component);
|
|
}
|
|
|
|
[PublicAPI]
|
|
public void RemoveIFFFlag(EntityUid gridUid, IFFFlags flags, IFFComponent? component = null)
|
|
{
|
|
if (!Resolve(gridUid, ref component, false))
|
|
return;
|
|
|
|
if ((component.Flags & flags) == 0x0)
|
|
return;
|
|
|
|
component.Flags &= ~flags;
|
|
Dirty(component);
|
|
UpdateIFFInterfaces(gridUid, component);
|
|
}
|
|
}
|