Merge branch 'master' into 2021-12-03-remove-IEntity-komm-süsser-todd
# Conflicts: # Content.Client/Crayon/CrayonDecalVisualizer.cs # Content.Client/Tabletop/TabletopSystem.cs # Content.IntegrationTests/Tests/InventoryHelpersTest.cs # Content.Server/AI/EntitySystems/AiSystem.cs # Content.Server/AI/Utility/AiLogic/UtilityAI.cs # Content.Server/AME/AMENodeGroup.cs # Content.Server/Administration/AdminVerbSystem.cs # Content.Server/Body/Systems/RespiratorSystem.cs # Content.Server/Chemistry/Components/InjectorComponent.cs # Content.Server/Chemistry/TileReactions/CleanTileReaction.cs # Content.Server/Chemistry/TileReactions/SpillTileReaction.cs # Content.Server/Crayon/CrayonComponent.cs # Content.Server/Doors/Components/ServerDoorComponent.cs # Content.Server/Explosion/EntitySystems/TriggerSystem.cs # Content.Server/Fluids/Components/MopComponent.cs # Content.Server/Fluids/Components/SpillExtensions.cs # Content.Server/Fluids/EntitySystems/PuddleSystem.cs # Content.Server/Instruments/InstrumentSystem.cs # Content.Server/Nutrition/EntitySystems/DrinkSystem.cs # Content.Server/Nutrition/EntitySystems/FoodSystem.cs # Content.Server/PneumaticCannon/PneumaticCannonSystem.cs # Content.Server/Storage/Components/EntityStorageComponent.cs # Content.Server/Storage/Components/StorageFillComponent.cs # Content.Server/Stunnable/StunbatonSystem.cs # Content.Server/Throwing/ThrowHelper.cs # Content.Server/Weapon/Ranged/Barrels/BarrelSystem.cs # Content.Server/Weapon/Ranged/Barrels/Components/ServerBatteryBarrelComponent.cs # Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs # Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs # Content.Shared/Damage/Components/DamageableComponent.cs # Content.Shared/Damage/Systems/DamageableSystem.cs # Content.Shared/MobState/Components/MobStateComponent.cs # Content.Shared/Slippery/SharedSlipperySystem.cs
This commit is contained in:
@@ -294,6 +294,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
int heavyImpactRange = 0,
|
||||
int lightImpactRange = 0,
|
||||
int flashRange = 0,
|
||||
EntityUid? user = null,
|
||||
ExplosiveComponent? explosive = null,
|
||||
TransformComponent? transform = null)
|
||||
{
|
||||
@@ -306,7 +307,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
|
||||
if (explosive is { Exploding: false })
|
||||
{
|
||||
_triggers.Explode(entity, explosive);
|
||||
_triggers.Explode(entity, explosive, user);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -322,7 +323,7 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
|
||||
var epicenter = transform.Coordinates;
|
||||
|
||||
SpawnExplosion(epicenter, devastationRange, heavyImpactRange, lightImpactRange, flashRange);
|
||||
SpawnExplosion(epicenter, devastationRange, heavyImpactRange, lightImpactRange, flashRange, entity, user);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -331,7 +332,9 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
int devastationRange = 0,
|
||||
int heavyImpactRange = 0,
|
||||
int lightImpactRange = 0,
|
||||
int flashRange = 0)
|
||||
int flashRange = 0,
|
||||
EntityUid? entity = null,
|
||||
EntityUid? user = null)
|
||||
{
|
||||
var mapId = epicenter.GetMapId(EntityManager);
|
||||
if (mapId == MapId.Nullspace)
|
||||
@@ -339,8 +342,22 @@ namespace Content.Server.Explosion.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
_logSystem.Add(LogType.Damaged, LogImpact.High ,
|
||||
$"Spawned explosion at {epicenter} with range {devastationRange}/{heavyImpactRange}/{lightImpactRange}/{flashRange}");
|
||||
// logging
|
||||
var text = $"{epicenter} with range {devastationRange}/{heavyImpactRange}/{lightImpactRange}/{flashRange}";
|
||||
if (entity == null)
|
||||
{
|
||||
_logSystem.Add(LogType.Explosion, LogImpact.High, $"Explosion spawned at {text}");
|
||||
}
|
||||
else if (user == null)
|
||||
{
|
||||
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
||||
$"{entity.Value} exploded at {text}");
|
||||
}
|
||||
else
|
||||
{
|
||||
_logSystem.Add(LogType.Explosion, LogImpact.High,
|
||||
$"{entity.Value} caused {entity.Value} to explode at {text}");
|
||||
}
|
||||
|
||||
var maxRange = MathHelper.Max(devastationRange, heavyImpactRange, lightImpactRange, 0);
|
||||
var epicenterMapPos = epicenter.ToMapPos(EntityManager);
|
||||
|
||||
Reference in New Issue
Block a user