Mini bomb changes (#7454)

This commit is contained in:
Leon Friedrich
2022-04-09 09:07:02 +12:00
committed by GitHub
parent 8d885d7425
commit 53f5a283ca
4 changed files with 63 additions and 29 deletions

View File

@@ -122,6 +122,7 @@ public sealed partial class ExplosionSystem : EntitySystem
explosive.MaxIntensity,
explosive.TileBreakScale,
explosive.MaxTileBreak,
explosive.CanCreateVacuum,
user);
if (delete)
@@ -190,13 +191,14 @@ public sealed partial class ExplosionSystem : EntitySystem
float maxTileIntensity,
float tileBreakScale = 1f,
int maxTileBreak = int.MaxValue,
bool canCreateVacuum = true,
EntityUid? user = null,
bool addLog = false)
{
var pos = Transform(uid).MapPosition;
QueueExplosion(pos, typeId, totalIntensity, slope, maxTileIntensity, tileBreakScale, maxTileBreak, addLog: false);
QueueExplosion(pos, typeId, totalIntensity, slope, maxTileIntensity, tileBreakScale, maxTileBreak, canCreateVacuum, addLog: false);
if (!addLog)
return;
@@ -219,6 +221,7 @@ public sealed partial class ExplosionSystem : EntitySystem
float maxTileIntensity,
float tileBreakScale = 1f,
int maxTileBreak = int.MaxValue,
bool canCreateVacuum = true,
bool addLog = false)
{
if (totalIntensity <= 0 || slope <= 0)
@@ -234,7 +237,7 @@ public sealed partial class ExplosionSystem : EntitySystem
_logsSystem.Add(LogType.Explosion, LogImpact.High, $"Explosion spawned at {epicenter:coordinates} with intensity {totalIntensity} slope {slope}");
_explosionQueue.Enqueue(() => SpawnExplosion(epicenter, type, totalIntensity,
slope, maxTileIntensity, tileBreakScale, maxTileBreak));
slope, maxTileIntensity, tileBreakScale, maxTileBreak, canCreateVacuum));
}
/// <summary>
@@ -248,7 +251,8 @@ public sealed partial class ExplosionSystem : EntitySystem
float slope,
float maxTileIntensity,
float tileBreakScale,
int maxTileBreak)
int maxTileBreak,
bool canCreateVacuum)
{
if (!_mapManager.MapExists(epicenter.MapId))
return null;
@@ -283,6 +287,7 @@ public sealed partial class ExplosionSystem : EntitySystem
area,
tileBreakScale,
maxTileBreak,
canCreateVacuum,
EntityManager,
_mapManager);
}