Update content vectors to numerics (#17759)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
@@ -640,7 +641,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
|
||||
component.NukieOutpost = outpostGrids[0];
|
||||
|
||||
// Listen I just don't want it to overlap.
|
||||
if (!_map.TryLoad(mapId, shuttlePath.ToString(), out var grids, new MapLoadOptions {Offset = Vector2.One*1000f}) || !grids.Any())
|
||||
if (!_map.TryLoad(mapId, shuttlePath.ToString(), out var grids, new MapLoadOptions {Offset = Vector2.One * 1000f}) || !grids.Any())
|
||||
{
|
||||
Logger.ErrorS("nukies", $"Error loading grid {shuttlePath} for nukies!");
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Administration.Commands;
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.Chat.Managers;
|
||||
@@ -160,9 +161,12 @@ public sealed class PiratesRuleSystem : GameRuleSystem<PiratesRuleComponent>
|
||||
aabb.Union(aabbs[i]);
|
||||
}
|
||||
|
||||
// (Not commented?)
|
||||
var a = MathF.Max(aabb.Height / 2f, aabb.Width / 2f) * 2.5f;
|
||||
|
||||
var gridId = _map.LoadGrid(GameTicker.DefaultMap, map, new MapLoadOptions
|
||||
{
|
||||
Offset = aabb.Center + MathF.Max(aabb.Height / 2f, aabb.Width / 2f) * 2.5f
|
||||
Offset = aabb.Center + new Vector2(a, a),
|
||||
});
|
||||
|
||||
if (!gridId.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user