hotfix lube crash
stackoverflowing
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Content.Server.Chemistry.TileReactions
|
|||||||
if (reactVolume < 5) return FixedPoint2.Zero;
|
if (reactVolume < 5) return FixedPoint2.Zero;
|
||||||
|
|
||||||
// TODO Make this not puddle smear.
|
// TODO Make this not puddle smear.
|
||||||
var puddle = tile.SpillAt(new Solution(reagent.ID, reactVolume), "PuddleSmear", _overflow, false);
|
var puddle = tile.SpillAt(new Solution(reagent.ID, reactVolume), "PuddleSmear", _overflow, false, true);
|
||||||
|
|
||||||
if (puddle != null)
|
if (puddle != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ namespace Content.Server.Fluids.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PuddleComponent? SpillAt(this TileRef tileRef, Solution solution, string prototype,
|
public static PuddleComponent? SpillAt(this TileRef tileRef, Solution solution, string prototype,
|
||||||
bool overflow = true, bool sound = true)
|
bool overflow = true, bool sound = true, bool noTileReact = false)
|
||||||
{
|
{
|
||||||
if (solution.TotalVolume <= 0) return null;
|
if (solution.TotalVolume <= 0) return null;
|
||||||
|
|
||||||
@@ -139,11 +139,14 @@ namespace Content.Server.Fluids.Components
|
|||||||
var gridId = tileRef.GridIndex;
|
var gridId = tileRef.GridIndex;
|
||||||
if (!mapManager.TryGetGrid(gridId, out var mapGrid)) return null; // Let's not spill to invalid grids.
|
if (!mapManager.TryGetGrid(gridId, out var mapGrid)) return null; // Let's not spill to invalid grids.
|
||||||
|
|
||||||
// First, do all tile reactions
|
if (!noTileReact)
|
||||||
foreach (var reagent in solution.Contents.ToArray())
|
|
||||||
{
|
{
|
||||||
var proto = prototypeManager.Index<ReagentPrototype>(reagent.ReagentId);
|
// First, do all tile reactions
|
||||||
proto.ReactionTile(tileRef, reagent.Quantity);
|
foreach (var reagent in solution.Contents.ToArray())
|
||||||
|
{
|
||||||
|
var proto = prototypeManager.Index<ReagentPrototype>(reagent.ReagentId);
|
||||||
|
proto.ReactionTile(tileRef, reagent.Quantity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tile reactions used up everything.
|
// Tile reactions used up everything.
|
||||||
|
|||||||
Reference in New Issue
Block a user