mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +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)
49 lines
1.7 KiB
C#
49 lines
1.7 KiB
C#
using Content.Client.Resources;
|
|
using Content.Client.Shuttles.UI;
|
|
using Content.Shared.Shuttles.Components;
|
|
using Content.Shared.Shuttles.UI.MapObjects;
|
|
using Robust.Client.Graphics;
|
|
using Robust.Client.ResourceManagement;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Physics.Components;
|
|
|
|
namespace Content.Client.Shuttles.Systems;
|
|
|
|
public sealed partial class ShuttleSystem
|
|
{
|
|
[Dependency] private readonly IResourceCache _resource = default!;
|
|
|
|
/// <summary>
|
|
/// Gets the parallax to use for the specified map or uses the fallback if not available.
|
|
/// </summary>
|
|
public Texture GetTexture(Entity<ShuttleMapParallaxComponent?> entity)
|
|
{
|
|
if (!Resolve(entity, ref entity.Comp, false))
|
|
{
|
|
return _resource.GetTexture(ShuttleMapParallaxComponent.FallbackTexture);
|
|
}
|
|
|
|
return _resource.GetTexture(entity.Comp.TexturePath);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the map coordinates of a map object.
|
|
/// </summary>
|
|
public MapCoordinates GetMapCoordinates(IMapObject mapObj)
|
|
{
|
|
switch (mapObj)
|
|
{
|
|
case ShuttleBeaconObject beacon:
|
|
return GetCoordinates(beacon.Coordinates).ToMap(EntityManager, XformSystem);
|
|
case ShuttleExclusionObject exclusion:
|
|
return GetCoordinates(exclusion.Coordinates).ToMap(EntityManager, XformSystem);
|
|
case GridMapObject grid:
|
|
var gridXform = Transform(grid.Entity);
|
|
Entity<PhysicsComponent?, TransformComponent?> gridEnt = (grid.Entity, null, gridXform);
|
|
return new MapCoordinates(Maps.GetGridPosition(gridEnt), gridXform.MapID);
|
|
default:
|
|
throw new ArgumentOutOfRangeException();
|
|
}
|
|
}
|
|
}
|