Skip to content

Commit

Permalink
Revert "Merge branch 'master' of https://github.com/VMSolidus/Einstei…
Browse files Browse the repository at this point in the history
…n-Engines"

This reverts commit 872b301, reversing
changes made to 15fc457.
  • Loading branch information
VMSolidus committed May 29, 2024
1 parent 872b301 commit 8b3070f
Show file tree
Hide file tree
Showing 375 changed files with 561 additions and 1,474 deletions.
8 changes: 1 addition & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"recommendations": [
"ms-dotnettools.csharp",
"editorconfig.editorconfig",
"aaron-bond.better-comments",
"tamasfe.even-better-toml",
"slava0135.robust-yaml",
"slevesque.shader",
"macabeus.vscode-fluent",
"redhat.vscode-yaml"
"editorconfig.editorconfig"
]
}
5 changes: 2 additions & 3 deletions Content.Client/CardboardBox/CardboardBoxSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Numerics;
using System.Numerics;
using Content.Shared.CardboardBox;
using Content.Shared.CardboardBox.Components;
using Content.Shared.Examine;
Expand All @@ -11,7 +11,6 @@ public sealed class CardboardBoxSystem : SharedCardboardBoxSystem
{
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;

public override void Initialize()
{
Expand Down Expand Up @@ -56,7 +55,7 @@ private void OnBoxEffect(PlayBoxEffectMessage msg)
foreach (var mob in mobMoverEntities)
{
var mapPos = _transform.GetMapCoordinates(mob);
if (!_examine.InRangeUnOccluded(sourcePos, mapPos, box.Distance, null))
if (!ExamineSystemShared.InRangeUnOccluded(sourcePos, mapPos, box.Distance, null))
continue;

var ent = Spawn(box.Effect, mapPos);
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void PopulateProducts()
if (search.Length == 0 && _category == null ||
search.Length != 0 && prototype.Name.ToLowerInvariant().Contains(search) ||
search.Length != 0 && prototype.Description.ToLowerInvariant().Contains(search) ||
search.Length == 0 && _category != null && Loc.GetString(prototype.Category).Equals(_category))
search.Length == 0 && _category != null && prototype.Category.Equals(_category))
{
var button = new CargoProductRow
{
Expand Down Expand Up @@ -122,7 +122,7 @@ public void PopulateCategories()

foreach (var prototype in ProductPrototypes)
{
if (!_categoryStrings.Contains(Loc.GetString(prototype.Category)))
if (!_categoryStrings.Contains(prototype.Category))
{
_categoryStrings.Add(Loc.GetString(prototype.Category));
}
Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public sealed class ConstructionSystem : SharedConstructionSystem
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;

private readonly Dictionary<int, EntityUid> _ghosts = new();
Expand Down Expand Up @@ -196,7 +195,7 @@ public bool TrySpawnGhost(
return false;

// This InRangeUnobstructed should probably be replaced with "is there something blocking us in that tile?"
var predicate = GetPredicate(prototype.CanBuildInImpassable, loc.ToMap(EntityManager, _transformSystem));
var predicate = GetPredicate(prototype.CanBuildInImpassable, loc.ToMap(EntityManager));
if (!_interactionSystem.InRangeUnobstructed(user, loc, 20f, predicate: predicate))
return false;

Expand Down
2 changes: 1 addition & 1 deletion Content.Client/ContextMenu/UI/EntityMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private bool HandleOpenEntityMenu(in PointerInputCmdHandler.PointerInputCmdArgs
if (_combatMode.IsInCombatMode(args.Session?.AttachedEntity))
return false;

var coords = args.Coordinates.ToMap(_entityManager, _xform);
var coords = args.Coordinates.ToMap(_entityManager);

if (_verbSystem.TryGetEntityMenuEntities(coords, out var entities))
OpenRootMenu(entities);
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Gameplay/GameplayStateBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private bool HandleInspect(ICommonSession? session, EntityCoordinates coords, En

public IEnumerable<EntityUid> GetClickableEntities(EntityCoordinates coordinates)
{
return GetClickableEntities(coordinates.ToMap(_entityManager, _entitySystemManager.GetEntitySystem<SharedTransformSystem>()));
return GetClickableEntities(coordinates.ToMap(_entityManager));
}

public IEnumerable<EntityUid> GetClickableEntities(MapCoordinates coordinates)
Expand Down
10 changes: 3 additions & 7 deletions Content.Client/NPC/PathfindingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public sealed class PathfindingSystem : SharedPathfindingSystem
[Dependency] private readonly IResourceCache _cache = default!;
[Dependency] private readonly NPCSteeringSystem _steering = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;

public PathfindingDebugMode Modes
{
Expand All @@ -40,7 +39,7 @@ public PathfindingDebugMode Modes
}
else if (!overlayManager.HasOverlay<PathfindingOverlay>())
{
overlayManager.AddOverlay(new PathfindingOverlay(EntityManager, _eyeManager, _inputManager, _mapManager, _cache, this, _mapSystem, _transformSystem));
overlayManager.AddOverlay(new PathfindingOverlay(EntityManager, _eyeManager, _inputManager, _mapManager, _cache, this, _mapSystem));
}

if ((value & PathfindingDebugMode.Steering) != 0x0)
Expand Down Expand Up @@ -141,7 +140,6 @@ public sealed class PathfindingOverlay : Overlay
private readonly IMapManager _mapManager;
private readonly PathfindingSystem _system;
private readonly MapSystem _mapSystem;
private readonly SharedTransformSystem _transformSystem;

public override OverlaySpace Space => OverlaySpace.ScreenSpace | OverlaySpace.WorldSpace;

Expand All @@ -155,16 +153,14 @@ public PathfindingOverlay(
IMapManager mapManager,
IResourceCache cache,
PathfindingSystem system,
MapSystem mapSystem,
SharedTransformSystem transformSystem)
MapSystem mapSystem)
{
_entManager = entManager;
_eyeManager = eyeManager;
_inputManager = inputManager;
_mapManager = mapManager;
_system = system;
_mapSystem = mapSystem;
_transformSystem = transformSystem;
_font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10);
}

Expand Down Expand Up @@ -484,7 +480,7 @@ private void DrawWorld(OverlayDrawArgs args, DrawingHandleWorld worldHandle)
if (neighborPoly.NetEntity != poly.GraphUid)
{
color = Color.Green;
var neighborMap = _entManager.GetCoordinates(neighborPoly).ToMap(_entManager, _transformSystem);
var neighborMap = _entManager.GetCoordinates(neighborPoly).ToMap(_entManager);

if (neighborMap.MapId != args.MapId)
continue;
Expand Down
11 changes: 3 additions & 8 deletions Content.Client/Popups/PopupOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public sealed class PopupOverlay : Overlay
private readonly IUserInterfaceManager _uiManager;
private readonly PopupSystem _popup;
private readonly PopupUIController _controller;
private readonly ExamineSystemShared _examine;
private readonly SharedTransformSystem _transform;

private readonly ShaderInstance _shader;

public override OverlaySpace Space => OverlaySpace.ScreenSpace;
Expand All @@ -34,16 +33,12 @@ public PopupOverlay(
IPrototypeManager protoManager,
IUserInterfaceManager uiManager,
PopupUIController controller,
ExamineSystemShared examine,
SharedTransformSystem transform,
PopupSystem popup)
{
_configManager = configManager;
_entManager = entManager;
_playerMgr = playerMgr;
_uiManager = uiManager;
_examine = examine;
_transform = transform;
_popup = popup;
_controller = controller;

Expand Down Expand Up @@ -78,15 +73,15 @@ private void DrawWorld(DrawingHandleScreen worldHandle, OverlayDrawArgs args, fl

foreach (var popup in _popup.WorldLabels)
{
var mapPos = popup.InitialPos.ToMap(_entManager, _transform);
var mapPos = popup.InitialPos.ToMap(_entManager);

if (mapPos.MapId != args.MapId)
continue;

var distance = (mapPos.Position - args.WorldBounds.Center).Length();

// Should handle fade here too wyci.
if (!args.WorldBounds.Contains(mapPos.Position) || !_examine.InRangeUnOccluded(viewPos, mapPos, distance,
if (!args.WorldBounds.Contains(mapPos.Position) || !ExamineSystemShared.InRangeUnOccluded(viewPos, mapPos, distance,
e => e == popup.InitialPos.EntityId || e == ourEntity, entMan: _entManager))
continue;

Expand Down
5 changes: 0 additions & 5 deletions Content.Client/Popups/PopupSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Linq;
using Content.Shared.Examine;
using Content.Shared.GameTicking;
using Content.Shared.Popups;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -27,8 +26,6 @@ public sealed class PopupSystem : SharedPopupSystem
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
[Dependency] private readonly ExamineSystemShared _examine = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;

public IReadOnlyList<WorldPopupLabel> WorldLabels => _aliveWorldLabels;
public IReadOnlyList<CursorPopupLabel> CursorLabels => _aliveCursorLabels;
Expand All @@ -54,8 +51,6 @@ public override void Initialize()
_prototype,
_uiManager,
_uiManager.GetUIController<PopupUIController>(),
_examine,
_transform,
this));
}

Expand Down
5 changes: 1 addition & 4 deletions Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,7 @@ private void RadiationQuery(IEye? currentEye)

private bool PulseQualifies(EntityUid pulseEntity, MapCoordinates currentEyeLoc)
{
var transformComponent = _entityManager.GetComponent<TransformComponent>(pulseEntity);
var transformSystem = _entityManager.System<SharedTransformSystem>();
return transformComponent.MapID == currentEyeLoc.MapId
&& transformComponent.Coordinates.InRange(_entityManager, transformSystem, EntityCoordinates.FromMap(transformComponent.ParentUid, currentEyeLoc, transformSystem, _entityManager), MaxDist);
return _entityManager.GetComponent<TransformComponent>(pulseEntity).MapID == currentEyeLoc.MapId && _entityManager.GetComponent<TransformComponent>(pulseEntity).Coordinates.InRange(_entityManager, EntityCoordinates.FromMap(_entityManager, _entityManager.GetComponent<TransformComponent>(pulseEntity).ParentUid, currentEyeLoc), MaxDist);
}

private sealed record RadiationShaderInstance(MapCoordinates CurrentMapCoords, float Range, TimeSpan Start, float Duration)
Expand Down
3 changes: 1 addition & 2 deletions Content.Client/Sandbox/SandboxSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public sealed class SandboxSystem : SharedSandboxSystem
[Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly IPlacementManager _placement = default!;
[Dependency] private readonly ContentEyeSystem _contentEye = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;

private bool _sandboxEnabled;
public bool SandboxAllowed { get; private set; }
Expand Down Expand Up @@ -109,7 +108,7 @@ public bool Copy(ICommonSession? session, EntityCoordinates coords, EntityUid ui
}

// Try copy tile.
if (!_map.TryFindGridAt(coords.ToMap(EntityManager, _transform), out _, out var grid) || !grid.TryGetTileRef(coords, out var tileRef))
if (!_map.TryFindGridAt(coords.ToMap(EntityManager), out _, out var grid) || !grid.TryGetTileRef(coords, out var tileRef))
return false;

if (_placement.Eraser)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ private void UpdateQueuedSpeechBubbles(FrameEventArgs delta)

var otherPos = EntityManager.GetComponent<TransformComponent>(ent).MapPosition;

if (occluded && !_examine.InRangeUnOccluded(
if (occluded && !ExamineSystemShared.InRangeUnOccluded(
playerPos,
otherPos, 0f,
(ent, player), predicate))
Expand Down
8 changes: 4 additions & 4 deletions Content.Client/Verbs/VerbSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace Content.Client.Verbs
public sealed class VerbSystem : SharedVerbSystem
{
[Dependency] private readonly PopupSystem _popupSystem = default!;
[Dependency] private readonly ExamineSystem _examine = default!;
[Dependency] private readonly ExamineSystem _examineSystem = default!;
[Dependency] private readonly TagSystem _tagSystem = default!;
[Dependency] private readonly IStateManager _stateManager = default!;
[Dependency] private readonly EntityLookupSystem _entityLookup = default!;
Expand Down Expand Up @@ -77,7 +77,7 @@ public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true
bool Predicate(EntityUid e) => e == player || entitiesUnderMouse.Contains(e);

// first check the general location.
if (!_examine.CanExamine(player.Value, targetPos, Predicate))
if (!_examineSystem.CanExamine(player.Value, targetPos, Predicate))
return false;

TryComp(player.Value, out ExaminerComponent? examiner);
Expand All @@ -86,7 +86,7 @@ public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true
entities = new();
foreach (var ent in _entityLookup.GetEntitiesInRange(targetPos, EntityMenuLookupSize))
{
if (_examine.CanExamine(player.Value, targetPos, Predicate, ent, examiner))
if (_examineSystem.CanExamine(player.Value, targetPos, Predicate, ent, examiner))
entities.Add(ent);
}
}
Expand Down Expand Up @@ -147,7 +147,7 @@ public bool TryGetEntityMenuEntities(MapCoordinates targetPos, [NotNullWhen(true
{
var entity = entities[i];

if (!_examine.InRangeUnOccluded(
if (!ExamineSystemShared.InRangeUnOccluded(
playerPos,
xformQuery.GetComponent(entity).MapPosition,
ExamineSystemShared.ExamineRange,
Expand Down
103 changes: 0 additions & 103 deletions Content.IntegrationTests/Tests/Wires/WireLayoutTest.cs

This file was deleted.

Loading

0 comments on commit 8b3070f

Please sign in to comment.