Content changes required for physicsmap purge (#37878)

* PhysMap changes

* Fix call

* Avoid tilefriction resolve

yummy

* a
This commit is contained in:
metalgearsloth
2025-05-28 19:38:47 +10:00
committed by GitHub
parent 10dee14893
commit ea7350f3f1
41 changed files with 48 additions and 124 deletions

View File

@@ -1,5 +1,6 @@
using Content.Shared.Alert;
using Content.Shared.CCVar;
using Content.Shared.Friction;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Systems;

View File

@@ -2,6 +2,7 @@ using System.Numerics;
using System.Runtime.CompilerServices;
using Content.Server.Shuttles.Components;
using Content.Server.Shuttles.Systems;
using Content.Shared.Friction;
using Content.Shared.Movement.Components;
using Content.Shared.Movement.Systems;
using Content.Shared.Shuttles.Components;

View File

@@ -51,13 +51,14 @@ namespace Content.Shared.Friction
_gridQuery = GetEntityQuery<MapGridComponent>();
}
public override void UpdateBeforeMapSolve(bool prediction, PhysicsMapComponent mapComponent, float frameTime)
public override void UpdateBeforeSolve(bool prediction, float frameTime)
{
base.UpdateBeforeMapSolve(prediction, mapComponent, frameTime);
base.UpdateBeforeSolve(prediction, frameTime);
foreach (var body in mapComponent.AwakeBodies)
foreach (var ent in PhysicsSystem.AwakeBodies)
{
var uid = body.Owner;
var uid = ent.Owner;
var body = ent.Comp1;
// Only apply friction when it's not a mob (or the mob doesn't have control)
// We may want to instead only apply friction to dynamic entities and not mobs ever.
@@ -67,12 +68,7 @@ namespace Content.Shared.Friction
if (body.LinearVelocity.Equals(Vector2.Zero) && body.AngularVelocity.Equals(0f))
continue;
if (!_xformQuery.TryGetComponent(uid, out var xform))
{
Log.Error($"Unable to get transform for {ToPrettyString(uid)} in tilefrictioncontroller");
continue;
}
var xform = ent.Comp2;
float friction;
// If we're not touching the ground, don't use tileFriction.

View File

@@ -74,6 +74,7 @@ public abstract partial class SharedMoverController : VirtualController
public override void Initialize()
{
UpdatesBefore.Add(typeof(TileFrictionController));
base.Initialize();
MoverQuery = GetEntityQuery<InputMoverComponent>();
@@ -98,7 +99,6 @@ public abstract partial class SharedMoverController : VirtualController
Subs.CVar(_configManager, CCVars.MinFriction, value => _minDamping = value, true);
Subs.CVar(_configManager, CCVars.AirFriction, value => _airDamping = value, true);
Subs.CVar(_configManager, CCVars.OffgridFriction, value => _offGridDamping = value, true);
UpdatesBefore.Add(typeof(TileFrictionController));
}
public override void Shutdown()

View File

@@ -42,7 +42,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: MapGrid
@@ -2223,7 +2222,6 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
- proto: Airlock
entities:

View File

@@ -22,7 +22,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- chunks:
@@ -352,7 +351,6 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
- proto: AirCanister
entities:

View File

@@ -28,7 +28,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: MapGrid
@@ -2685,7 +2684,6 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
- proto: AirlockBrigGlassLocked
entities:

View File

@@ -25,9 +25,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: MapGrid

View File

@@ -17,7 +17,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: MapGrid
@@ -109,7 +108,6 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
- type: DecalGrid
chunkCollection:

View File

@@ -47,7 +47,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: MapGrid
@@ -2869,7 +2868,6 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
- proto: Airlock
entities:

View File

@@ -13,7 +13,6 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: MapGrid
@@ -76,6 +75,5 @@ entities:
- type: LoadedMap
- type: SpreaderGrid
- type: GridTree
- type: MovedGrids
- type: GridPathfinding
...

View File

@@ -22,9 +22,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: MapGrid

View File

@@ -148,9 +148,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: BasaltRandom

View File

@@ -245,9 +245,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: AirCanister

View File

@@ -153,9 +153,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: AirlockEngineeringLocked

View File

@@ -29,9 +29,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: MapLight

View File

@@ -22,9 +22,7 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: MapLight

View File

@@ -1630,9 +1630,7 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: FTLDestination
whitelist:
tags:

View File

@@ -1709,9 +1709,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: LoadedMap

View File

@@ -46,9 +46,7 @@ entities:
name: map 89
- type: Transform
- type: Map
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: SpawnPointLatejoin

View File

@@ -13,12 +13,10 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: Broadphase
- type: OccluderTree
- type: LoadedMap
- type: GridTree
- type: MovedGrids
- uid: 10
components:
- type: MetaData

View File

@@ -15,9 +15,7 @@ entities:
- type: MetaData
- type: Transform
- type: Map
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: LoadedMap

View File

@@ -80,9 +80,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: Parallax

View File

@@ -9561,9 +9561,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: Parallax

View File

@@ -75,9 +75,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 5691

View File

@@ -16360,9 +16360,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: AcousticGuitarInstrument

View File

@@ -11777,9 +11777,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: Parallax
@@ -106504,11 +106502,11 @@ entities:
After several simulations where Superconducting Magnetic Energy Storage units were drained from the main system from [italic]a variety[/italic] of user errors and other shenanigans, it has been determined that the Singularity should be put on its own power loop, disconnected from the main station. The upsides of this include but are not limited to:
[bold]1.[/bold] Limited external forces from the containments power.
[bold]1.[/bold] Limited external forces from the containments power.
[bold]2.[/bold] An "early warning" system, if you see JUST the PA room run out of power, you know there is an issue.
[bold]2.[/bold] An "early warning" system, if you see JUST the PA room run out of power, you know there is an issue.
[bold]3.[/bold] Due to being on its own small loop, its much easier to spot faults in the system.
[bold]3.[/bold] Due to being on its own small loop, its much easier to spot faults in the system.
[italic]While we have listed the upsides we also acknowledge the downside,[/italic] for it being on its own loop you will need an external force if the system "runs out of juice". Our recommendation for this is simply attaching a generator to said SMES and letting it get to full charge before continuing operations but as said from another of our technicians... "just attach it to the main grid for like, a hot moment, and kickstart the thing!"

View File

@@ -52,9 +52,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 2

View File

@@ -69,9 +69,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 13329

View File

@@ -97,9 +97,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: LoadedMap

View File

@@ -59,9 +59,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 2

View File

@@ -7621,9 +7621,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: AcousticGuitarInstrument

View File

@@ -75,9 +75,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 5350

View File

@@ -80,9 +80,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 2
@@ -38526,23 +38524,23 @@ entities:
[head=2][color=darkgrey][bold]Troubleshooting[/bold][/color][/head]
[bolditalic]Problem:
[bolditalic]Problem:
The dock doesnt respond when you approach.[/bolditalic]
The dock doesnt respond when you approach.[/bolditalic]
Solution: Its just being shy. Give it some encouragement by knocking lightly on the hull, or jostling the [color=darkorange][bolditalic]Aether Coil Modulator[/bolditalic][/color]. If no response, consult the [color=blue][bold]Technical Support AI[/bold][/color] (usually known as "Door Stuck").
[bolditalic]Problem:
[bolditalic]Problem:
The shuttle is stuck halfway through the docking process.[/bolditalic]
The shuttle is stuck halfway through the docking process.[/bolditalic]
Solution: This is an unfortunate but expected outcome. Reboot the dock, reattempt the process, and pray. Alternatively, try "tugging" the shuttle out, but be prepared for the consequences.
[bolditalic]Problem:
[bolditalic]Problem:
The dock has *disengaged itself* mid-operation.[/bolditalic]
The dock has *disengaged itself* mid-operation.[/bolditalic]
Solution: This is a feature of the [color=darkblue][bold]NanoTrasen Smart Dock Mk VII™[/bold][/color], called the [color=darkorange][bolditalic]Premature Release Safety Protocol™[/bolditalic][/color]. It's designed to keep you on your toes. Simply re-dock and hope it doesnt happen again (spoiler: it will).
@@ -38573,17 +38571,17 @@ entities:
[head=2][color=darkgrey][bold]FAQ: Frequently Avoided Questions[/bold][/color][/head]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
A: Nothing. Just accept the darkness. The dock has either entered [color=darkorange][bolditalic]Sleep Mode™[/bolditalic][/color], or something unspeakable is about to happen.
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
A: The dock is semi-sentient and enjoys toying with your mental state. We suggest playing along until it decides youre no longer amusing.
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
A: You'll know it's done when your shuttle stops shaking violently and the alarms stop blaring. Or when you black out—whichever comes first.
@@ -38632,23 +38630,23 @@ entities:
[head=2][color=darkgrey][bold]Troubleshooting[/bold][/color][/head]
[bolditalic]Problem:
[bolditalic]Problem:
The dock doesnt respond when you approach.[/bolditalic]
The dock doesnt respond when you approach.[/bolditalic]
Solution: Its just being shy. Give it some encouragement by knocking lightly on the hull, or jostling the [color=darkorange][bolditalic]Aether Coil Modulator[/bolditalic][/color]. If no response, consult the [color=blue][bold]Technical Support AI[/bold][/color] (usually known as "Door Stuck").
[bolditalic]Problem:
[bolditalic]Problem:
The shuttle is stuck halfway through the docking process.[/bolditalic]
The shuttle is stuck halfway through the docking process.[/bolditalic]
Solution: This is an unfortunate but expected outcome. Reboot the dock, reattempt the process, and pray. Alternatively, try "tugging" the shuttle out, but be prepared for the consequences.
[bolditalic]Problem:
[bolditalic]Problem:
The dock has *disengaged itself* mid-operation.[/bolditalic]
The dock has *disengaged itself* mid-operation.[/bolditalic]
Solution: This is a feature of the [color=darkblue][bold]NanoTrasen Smart Dock Mk VII™[/bold][/color], called the [color=darkorange][bolditalic]Premature Release Safety Protocol™[/bolditalic][/color]. It's designed to keep you on your toes. Simply re-dock and hope it doesnt happen again (spoiler: it will).
@@ -38679,17 +38677,17 @@ entities:
[head=2][color=darkgrey][bold]FAQ: Frequently Avoided Questions[/bold][/color][/head]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
A: Nothing. Just accept the darkness. The dock has either entered [color=darkorange][bolditalic]Sleep Mode™[/bolditalic][/color], or something unspeakable is about to happen.
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
A: The dock is semi-sentient and enjoys toying with your mental state. We suggest playing along until it decides youre no longer amusing.
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
A: You'll know it's done when your shuttle stops shaking violently and the alarms stop blaring. Or when you black out—whichever comes first.
@@ -38738,23 +38736,23 @@ entities:
[head=2][color=darkgrey][bold]Troubleshooting[/bold][/color][/head]
[bolditalic]Problem:
[bolditalic]Problem:
The dock doesnt respond when you approach.[/bolditalic]
The dock doesnt respond when you approach.[/bolditalic]
Solution: Its just being shy. Give it some encouragement by knocking lightly on the hull, or jostling the [color=darkorange][bolditalic]Aether Coil Modulator[/bolditalic][/color]. If no response, consult the [color=blue][bold]Technical Support AI[/bold][/color] (usually known as "Door Stuck").
[bolditalic]Problem:
[bolditalic]Problem:
The shuttle is stuck halfway through the docking process.[/bolditalic]
The shuttle is stuck halfway through the docking process.[/bolditalic]
Solution: This is an unfortunate but expected outcome. Reboot the dock, reattempt the process, and pray. Alternatively, try "tugging" the shuttle out, but be prepared for the consequences.
[bolditalic]Problem:
[bolditalic]Problem:
The dock has *disengaged itself* mid-operation.[/bolditalic]
The dock has *disengaged itself* mid-operation.[/bolditalic]
Solution: This is a feature of the [color=darkblue][bold]NanoTrasen Smart Dock Mk VII™[/bold][/color], called the [color=darkorange][bolditalic]Premature Release Safety Protocol™[/bolditalic][/color]. It's designed to keep you on your toes. Simply re-dock and hope it doesnt happen again (spoiler: it will).
@@ -38785,17 +38783,17 @@ entities:
[head=2][color=darkgrey][bold]FAQ: Frequently Avoided Questions[/bold][/color][/head]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
A: Nothing. Just accept the darkness. The dock has either entered [color=darkorange][bolditalic]Sleep Mode™[/bolditalic][/color], or something unspeakable is about to happen.
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
A: The dock is semi-sentient and enjoys toying with your mental state. We suggest playing along until it decides youre no longer amusing.
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
A: You'll know it's done when your shuttle stops shaking violently and the alarms stop blaring. Or when you black out—whichever comes first.
@@ -38846,23 +38844,23 @@ entities:
[head=2][color=darkgrey][bold]Troubleshooting[/bold][/color][/head]
[bolditalic]Problem:
[bolditalic]Problem:
The dock doesnt respond when you approach.[/bolditalic]
The dock doesnt respond when you approach.[/bolditalic]
Solution: Its just being shy. Give it some encouragement by knocking lightly on the hull, or jostling the [color=darkorange][bolditalic]Aether Coil Modulator[/bolditalic][/color]. If no response, consult the [color=blue][bold]Technical Support AI[/bold][/color] (usually known as "Door Stuck").
[bolditalic]Problem:
[bolditalic]Problem:
The shuttle is stuck halfway through the docking process.[/bolditalic]
The shuttle is stuck halfway through the docking process.[/bolditalic]
Solution: This is an unfortunate but expected outcome. Reboot the dock, reattempt the process, and pray. Alternatively, try "tugging" the shuttle out, but be prepared for the consequences.
[bolditalic]Problem:
[bolditalic]Problem:
The dock has *disengaged itself* mid-operation.[/bolditalic]
The dock has *disengaged itself* mid-operation.[/bolditalic]
Solution: This is a feature of the [color=darkblue][bold]NanoTrasen Smart Dock Mk VII™[/bold][/color], called the [color=darkorange][bolditalic]Premature Release Safety Protocol™[/bolditalic][/color]. It's designed to keep you on your toes. Simply re-dock and hope it doesnt happen again (spoiler: it will).
@@ -38893,17 +38891,17 @@ entities:
[head=2][color=darkgrey][bold]FAQ: Frequently Avoided Questions[/bold][/color][/head]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
[bolditalic]Q: What do I do if the docks lights go out suddenly?[/bolditalic]
A: Nothing. Just accept the darkness. The dock has either entered [color=darkorange][bolditalic]Sleep Mode™[/bolditalic][/color], or something unspeakable is about to happen.
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
[bolditalic]Q: Why does the dock occasionally whisper my name?[/bolditalic]
A: The dock is semi-sentient and enjoys toying with your mental state. We suggest playing along until it decides youre no longer amusing.
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
[bolditalic]Q: How do I know if the docking process is complete?[/bolditalic]
A: You'll know it's done when your shuttle stops shaking violently and the alarms stop blaring. Or when you black out—whichever comes first.

View File

@@ -55,9 +55,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 4812

View File

@@ -6620,9 +6620,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- proto: AccordionInstrument

View File

@@ -68,9 +68,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: Parallax

View File

@@ -44,9 +44,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 2

View File

@@ -47,9 +47,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- uid: 2

View File

@@ -3378,9 +3378,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: LoadedMap

View File

@@ -71,9 +71,7 @@ entities:
- type: Transform
- type: Map
mapPaused: True
- type: PhysicsMap
- type: GridTree
- type: MovedGrids
- type: Broadphase
- type: OccluderTree
- type: Parallax