Puddle drinking (#16373)
This commit is contained in:
@@ -21,6 +21,7 @@ namespace Content.Server.Nutrition.Components
|
|||||||
internal bool DefaultToOpened;
|
internal bool DefaultToOpened;
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
[DataField("transferAmount")]
|
||||||
public FixedPoint2 TransferAmount { get; [UsedImplicitly] private set; } = FixedPoint2.New(5);
|
public FixedPoint2 TransferAmount { get; [UsedImplicitly] private set; } = FixedPoint2.New(5);
|
||||||
|
|
||||||
[ViewVariables(VVAccess.ReadWrite)]
|
[ViewVariables(VVAccess.ReadWrite)]
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
|||||||
if (component.Pressurized &&
|
if (component.Pressurized &&
|
||||||
!component.Opened &&
|
!component.Opened &&
|
||||||
_random.Prob(0.25f) &&
|
_random.Prob(0.25f) &&
|
||||||
_solutionContainerSystem.TryGetDrainableSolution(uid, out var interactions))
|
_solutionContainerSystem.TryGetSolution(uid, component.SolutionName, out var interactions))
|
||||||
{
|
{
|
||||||
component.Opened = true;
|
component.Opened = true;
|
||||||
UpdateAppearance(component);
|
UpdateAppearance(component);
|
||||||
@@ -229,7 +229,7 @@ namespace Content.Server.Nutrition.EntitySystems
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_solutionContainerSystem.TryGetDrainableSolution(item, out var drinkSolution) ||
|
if (!_solutionContainerSystem.TryGetSolution(item, drink.SolutionName, out var drinkSolution) ||
|
||||||
drinkSolution.Volume <= 0)
|
drinkSolution.Volume <= 0)
|
||||||
{
|
{
|
||||||
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-is-empty",
|
_popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-is-empty",
|
||||||
|
|||||||
@@ -116,3 +116,8 @@
|
|||||||
puddle:
|
puddle:
|
||||||
!type:SpreaderNode
|
!type:SpreaderNode
|
||||||
nodeGroupID: Spreader
|
nodeGroupID: Spreader
|
||||||
|
- type: Drink
|
||||||
|
isOpen: true
|
||||||
|
delay: 3
|
||||||
|
transferAmount: 1
|
||||||
|
solution: puddle
|
||||||
|
|||||||
Reference in New Issue
Block a user