Puddle code hotfix 2 (#37046)
This commit is contained in:
parent
154ff2f44c
commit
5d3b6b0307
|
|
@ -0,0 +1,30 @@
|
|||
using Content.Server.Fluids.EntitySystems;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Chemistry.TileReactions
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public sealed partial class SpillIfPuddlePresentTileReaction : ITileReaction
|
||||
{
|
||||
public FixedPoint2 TileReact(TileRef tile,
|
||||
ReagentPrototype reagent,
|
||||
FixedPoint2 reactVolume,
|
||||
IEntityManager entityManager,
|
||||
List<ReagentData>? data)
|
||||
{
|
||||
var spillSystem = entityManager.System<PuddleSystem>();
|
||||
if (!spillSystem.TryGetPuddle(tile, out _))
|
||||
return FixedPoint2.Zero;
|
||||
|
||||
return spillSystem.TrySpillAt(tile, new Solution(reagent.ID, reactVolume, data), out _, sound: false, tileReact: false)
|
||||
? reactVolume
|
||||
: FixedPoint2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
using Content.Server.Fluids.EntitySystems;
|
||||
using Content.Shared.Chemistry.Components;
|
||||
using Content.Shared.Chemistry.Reaction;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.FixedPoint;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.Chemistry.TileReactions
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public sealed partial class SpillTileReaction : ITileReaction
|
||||
{
|
||||
public FixedPoint2 TileReact(TileRef tile,
|
||||
ReagentPrototype reagent,
|
||||
FixedPoint2 reactVolume,
|
||||
IEntityManager entityManager,
|
||||
List<ReagentData>? data)
|
||||
{
|
||||
var spillSystem = entityManager.System<PuddleSystem>();
|
||||
|
||||
return spillSystem.TrySpillAt(tile, new Solution(reagent.ID, reactVolume, data), out _, sound: false, tileReact: false)
|
||||
? reactVolume
|
||||
: FixedPoint2.Zero;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
amount: 1
|
||||
tileReactions:
|
||||
- !type:ExtinguishTileReaction { }
|
||||
- !type:SpillIfPuddlePresentTileReaction { }
|
||||
|
||||
- type: reagent
|
||||
id: BaseSoda
|
||||
|
|
|
|||
|
|
@ -180,6 +180,8 @@
|
|||
recognizable: true
|
||||
physicalDesc: reagent-physical-desc-sticky
|
||||
viscosity: 0.55 #Start using syrup to attach your remote recievers to your microwaves!
|
||||
tileReactions:
|
||||
- !type:SpillTileReaction
|
||||
metabolisms:
|
||||
Food:
|
||||
# 12 diona blood for 1 unit of syrup, this stuff better be worthwhile.
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@
|
|||
recognizable: true
|
||||
physicalDesc: reagent-physical-desc-viscous
|
||||
viscosity: 0.25
|
||||
tileReactions:
|
||||
- !type:SpillTileReaction
|
||||
metabolisms:
|
||||
Food:
|
||||
# Delicious!
|
||||
|
|
@ -87,6 +89,8 @@
|
|||
recognizable: true
|
||||
physicalDesc: reagent-physical-desc-sticky
|
||||
viscosity: 0.10
|
||||
tileReactions:
|
||||
- !type:SpillTileReaction
|
||||
metabolisms:
|
||||
Food:
|
||||
# Sweet!
|
||||
|
|
|
|||
|
|
@ -77,6 +77,8 @@
|
|||
recognizable: true
|
||||
boilingPoint: 290.0 # Glycerin
|
||||
meltingPoint: 18.2
|
||||
tileReactions:
|
||||
- !type:SpillTileReaction
|
||||
friction: 0.0
|
||||
|
||||
- type: reagent
|
||||
|
|
@ -88,6 +90,8 @@
|
|||
color: "#ffffff"
|
||||
boilingPoint: 250.0
|
||||
meltingPoint: 380.0
|
||||
tileReactions:
|
||||
- !type:SpillTileReaction
|
||||
viscosity: 0.5
|
||||
reactiveEffects:
|
||||
Acidic:
|
||||
|
|
|
|||
Loading…
Reference in New Issue