Merge remote-tracking branch 'upstream/stable' into ed-30-04-2025-upstream-sync

# Conflicts:
#	Content.Client/Parallax/ParallaxControl.cs
#	Content.Client/UserInterface/Systems/Storage/Controls/ItemGridPiece.cs
#	Content.IntegrationTests/Tests/PostMapInitTest.cs
#	Content.Server/Chat/Managers/ChatManager.cs
#	Content.Server/Fluids/EntitySystems/PuddleSystem.Evaporation.cs
#	Content.Server/Labels/Label/LabelSystem.cs
#	Content.Shared/Actions/SharedActionsSystem.cs
#	Content.Shared/Fluids/Components/EvaporationComponent.cs
#	Content.Shared/Labels/EntitySystems/SharedLabelSystem.cs
#	README.md
#	Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml
#	Resources/Prototypes/Maps/Pools/deathmatch.yml
#	Resources/Prototypes/Maps/arenas.yml
This commit is contained in:
Ed
2025-04-30 20:31:50 +03:00
2053 changed files with 113995 additions and 38376 deletions

View File

@@ -56,11 +56,15 @@ namespace Content.Server.Atmos.EntitySystems
_physics.SetBodyStatus(uid, body, BodyStatus.OnGround);
}
if (TryComp<FixturesComponent>(uid, out var fixtures))
if (TryComp<FixturesComponent>(uid, out var fixtures)
&& TryComp<MovedByPressureComponent>(uid, out var component))
{
foreach (var (id, fixture) in fixtures.Fixtures)
{
_physics.AddCollisionMask(uid, id, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
if (component.TableLayerRemoved.Contains(id))
{
_physics.AddCollisionMask(uid, id, fixture, (int)CollisionGroup.TableLayer, manager: fixtures);
}
}
}
}
@@ -80,9 +84,13 @@ namespace Content.Server.Atmos.EntitySystems
foreach (var (id, fixture) in fixtures.Fixtures)
{
_physics.RemoveCollisionMask(uid, id, fixture, (int) CollisionGroup.TableLayer, manager: fixtures);
// Mark fixtures that have TableLayer removed
if ((fixture.CollisionMask & (int)CollisionGroup.TableLayer) != 0)
{
component.TableLayerRemoved.Add(id);
_physics.RemoveCollisionMask(uid, id, fixture, (int)CollisionGroup.TableLayer, manager: fixtures);
}
}
// TODO: Make them dynamic type? Ehh but they still want movement so uhh make it non-predicted like weightless?
// idk it's hard.

View File

@@ -24,6 +24,7 @@ using Content.Shared.Timing;
using Content.Shared.Toggleable;
using Content.Shared.Weapons.Melee.Events;
using Content.Shared.FixedPoint;
using Content.Shared.Hands;
using Robust.Server.Audio;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Events;
@@ -74,6 +75,7 @@ namespace Content.Server.Atmos.EntitySystems
SubscribeLocalEvent<FlammableComponent, TileFireEvent>(OnTileFire);
SubscribeLocalEvent<FlammableComponent, RejuvenateEvent>(OnRejuvenate);
SubscribeLocalEvent<FlammableComponent, ResistFireAlertEvent>(OnResistFireAlert);
Subs.SubscribeWithRelay<FlammableComponent, ExtinguishEvent>(OnExtinguishEvent);
SubscribeLocalEvent<IgniteOnCollideComponent, StartCollideEvent>(IgniteOnCollide);
SubscribeLocalEvent<IgniteOnCollideComponent, LandEvent>(OnIgniteLand);
@@ -85,6 +87,14 @@ namespace Content.Server.Atmos.EntitySystems
SubscribeLocalEvent<IgniteOnHeatDamageComponent, DamageChangedEvent>(OnDamageChanged);
}
private void OnExtinguishEvent(Entity<FlammableComponent> ent, ref ExtinguishEvent args)
{
// You know I'm really not sure if having AdjustFireStacks *after* Extinguish,
// but I'm just moving this code, not questioning it.
Extinguish(ent, ent.Comp);
AdjustFireStacks(ent, args.FireStacksAdjustment, ent.Comp);
}
private void OnMeleeHit(EntityUid uid, IgniteOnMeleeHitComponent component, MeleeHitEvent args)
{
foreach (var entity in args.HitEntities)
@@ -330,6 +340,9 @@ namespace Content.Server.Atmos.EntitySystems
_ignitionSourceSystem.SetIgnited(uid, false);
var extinguished = new ExtinguishedEvent();
RaiseLocalEvent(uid, ref extinguished);
UpdateAppearance(uid, flammable);
}
@@ -351,6 +364,9 @@ namespace Content.Server.Atmos.EntitySystems
else
_adminLogger.Add(LogType.Flammable, $"{ToPrettyString(uid):target} set on fire by {ToPrettyString(ignitionSource):actor}");
flammable.OnFire = true;
var extinguished = new IgnitedEvent();
RaiseLocalEvent(uid, ref extinguished);
}
UpdateAppearance(uid, flammable);

View File

@@ -16,6 +16,7 @@ using Robust.Shared;
using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Player;
using Robust.Shared.Threading;
using Robust.Shared.Timing;
@@ -60,12 +61,16 @@ namespace Content.Server.Atmos.EntitySystems
private float _updateInterval;
private int _thresholds;
private EntityQuery<MapGridComponent> _gridQuery;
private EntityQuery<GasTileOverlayComponent> _query;
public override void Initialize()
{
base.Initialize();
_query = GetEntityQuery<GasTileOverlayComponent>();
_gridQuery = GetEntityQuery<MapGridComponent>();
_updateJob = new UpdatePlayerJob()
{
EntManager = EntityManager,
@@ -76,6 +81,7 @@ namespace Content.Server.Atmos.EntitySystems
MapManager = _mapManager,
ChunkViewerPool = _chunkViewerPool,
LastSentChunks = _lastSentChunks,
GridQuery = _gridQuery,
};
_playerManager.PlayerStatusChanged += OnPlayerStatusChanged;
@@ -85,7 +91,6 @@ namespace Content.Server.Atmos.EntitySystems
SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
SubscribeLocalEvent<GasTileOverlayComponent, ComponentStartup>(OnStartup);
_query = GetEntityQuery<GasTileOverlayComponent>();
}
private void OnStartup(EntityUid uid, GasTileOverlayComponent component, ComponentStartup args)
@@ -375,6 +380,8 @@ namespace Content.Server.Atmos.EntitySystems
public Dictionary<ICommonSession, Dictionary<NetEntity, HashSet<Vector2i>>> LastSentChunks;
public List<ICommonSession> Sessions;
public EntityQuery<MapGridComponent> GridQuery;
public void Execute(int index)
{
var playerSession = Sessions[index];
@@ -391,7 +398,7 @@ namespace Content.Server.Atmos.EntitySystems
previouslySent.Remove(netGrid);
// If grid was deleted then don't worry about sending it to the client.
if (!EntManager.TryGetEntity(netGrid, out var gridId) || !MapManager.IsGrid(gridId.Value))
if (!EntManager.TryGetEntity(netGrid, out var gridId) || GridQuery.HasComp(gridId.Value))
ev.RemovedChunks[netGrid] = oldIndices;
else
{