Merge remote-tracking branch 'refs/remotes/upstream/master' into ed-13-05-2024-upstream

# Conflicts:
#	Content.Shared/Lock/LockSystem.cs
#	Resources/Prototypes/Maps/oasis.yml
This commit is contained in:
Ed
2024-05-13 18:32:59 +03:00
624 changed files with 43352 additions and 25174 deletions

View File

@@ -13,6 +13,7 @@ using Content.Shared.Atmos.Components;
using Content.Shared.Damage;
using Content.Shared.Database;
using Content.Shared.Interaction;
using Content.Shared.Inventory;
using Content.Shared.Physics;
using Content.Shared.Popups;
using Content.Shared.Projectiles;
@@ -42,12 +43,14 @@ namespace Content.Server.Atmos.EntitySystems
[Dependency] private readonly AlertsSystem _alertsSystem = default!;
[Dependency] private readonly FixtureSystem _fixture = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly UseDelaySystem _useDelay = default!;
[Dependency] private readonly AudioSystem _audio = default!;
[Dependency] private readonly IRobustRandom _random = default!;
private EntityQuery<InventoryComponent> _inventoryQuery;
private EntityQuery<PhysicsComponent> _physicsQuery;
// This should probably be moved to the component, requires a rewrite, all fires tick at the same time
@@ -61,6 +64,7 @@ namespace Content.Server.Atmos.EntitySystems
{
UpdatesAfter.Add(typeof(AtmosphereSystem));
_inventoryQuery = GetEntityQuery<InventoryComponent>();
_physicsQuery = GetEntityQuery<PhysicsComponent>();
SubscribeLocalEvent<FlammableComponent, MapInitEvent>(OnMapInit);
@@ -444,13 +448,20 @@ namespace Content.Server.Atmos.EntitySystems
continue;
}
EnsureComp<IgnitionSourceComponent>(uid);
_ignitionSourceSystem.SetIgnited(uid);
var source = EnsureComp<IgnitionSourceComponent>(uid);
_ignitionSourceSystem.SetIgnited((uid, source));
if (TryComp(uid, out TemperatureComponent? temp))
_temperatureSystem.ChangeHeat(uid, 12500 * flammable.FireStacks, false, temp);
_damageableSystem.TryChangeDamage(uid, flammable.Damage * flammable.FireStacks, interruptsDoAfters: false);
var ev = new GetFireProtectionEvent();
// let the thing on fire handle it
RaiseLocalEvent(uid, ref ev);
// and whatever it's wearing
if (_inventoryQuery.TryComp(uid, out var inv))
_inventory.RelayEvent((uid, inv), ref ev);
_damageableSystem.TryChangeDamage(uid, flammable.Damage * flammable.FireStacks * ev.Multiplier, interruptsDoAfters: false);
AdjustFireStacks(uid, flammable.FirestackFade * (flammable.Resisting ? 10f : 1f), flammable);
}