Make Saltern driveable (#4257)
* Broadphase refactor (content) * Shuttle jank * Fixes * Testing jank * Features and things * Balance stuffsies * AHHHHHHHHHHHHHHHH * Mass and stuff working * Fix drops * Another balance pass * Balance AGEN * Add in stuff for rotating shuttles for debugging * Nothing to see here * Testbed stuffsies * Fix some tests * Fixen test * Try fixing map * Shuttle movement balance pass * lasaggne * Basic Helmsman console working * Slight docking cleanup * Helmsman requires power * Basic shuttle test * Stuff * Fix computations * Add shuttle console to saltern * Rename helmsman to shuttleconsole * Final stretch * More tweaks * Fix piloting prediction for now.
This commit is contained in:
@@ -3,6 +3,7 @@ using Content.Shared.Physics;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Maths;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Broadphase;
|
||||
|
||||
namespace Content.Shared.Spawning
|
||||
@@ -15,9 +16,9 @@ namespace Content.Shared.Spawning
|
||||
EntityCoordinates coordinates,
|
||||
CollisionGroup collisionLayer,
|
||||
in Box2? box = null,
|
||||
SharedBroadPhaseSystem? physicsManager = null)
|
||||
SharedBroadphaseSystem? physicsManager = null)
|
||||
{
|
||||
physicsManager ??= EntitySystem.Get<SharedBroadPhaseSystem>();
|
||||
physicsManager ??= EntitySystem.Get<SharedBroadphaseSystem>();
|
||||
var mapCoordinates = coordinates.ToMap(entityManager);
|
||||
|
||||
return entityManager.SpawnIfUnobstructed(prototypeName, mapCoordinates, collisionLayer, box, physicsManager);
|
||||
@@ -29,10 +30,10 @@ namespace Content.Shared.Spawning
|
||||
MapCoordinates coordinates,
|
||||
CollisionGroup collisionLayer,
|
||||
in Box2? box = null,
|
||||
SharedBroadPhaseSystem? collision = null)
|
||||
SharedBroadphaseSystem? collision = null)
|
||||
{
|
||||
var boxOrDefault = box.GetValueOrDefault(Box2.UnitCentered);
|
||||
collision ??= EntitySystem.Get<SharedBroadPhaseSystem>();
|
||||
collision ??= EntitySystem.Get<SharedBroadphaseSystem>();
|
||||
|
||||
foreach (var body in collision.GetCollidingEntities(coordinates.MapId, in boxOrDefault))
|
||||
{
|
||||
@@ -60,7 +61,7 @@ namespace Content.Shared.Spawning
|
||||
CollisionGroup collisionLayer,
|
||||
[NotNullWhen(true)] out IEntity? entity,
|
||||
Box2? box = null,
|
||||
SharedBroadPhaseSystem? physicsManager = null)
|
||||
SharedBroadphaseSystem? physicsManager = null)
|
||||
{
|
||||
entity = entityManager.SpawnIfUnobstructed(prototypeName, coordinates, collisionLayer, box, physicsManager);
|
||||
|
||||
@@ -74,7 +75,7 @@ namespace Content.Shared.Spawning
|
||||
CollisionGroup collisionLayer,
|
||||
[NotNullWhen(true)] out IEntity? entity,
|
||||
in Box2? box = null,
|
||||
SharedBroadPhaseSystem? physicsManager = null)
|
||||
SharedBroadphaseSystem? physicsManager = null)
|
||||
{
|
||||
entity = entityManager.SpawnIfUnobstructed(prototypeName, coordinates, collisionLayer, box, physicsManager);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user