]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Puddle drinking (#16373)
authorKara <lunarautomaton6@gmail.com>
Sat, 13 May 2023 01:32:57 +0000 (18:32 -0700)
committerGitHub <noreply@github.com>
Sat, 13 May 2023 01:32:57 +0000 (11:32 +1000)
Content.Server/Nutrition/Components/DrinkComponent.cs
Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
Resources/Prototypes/Entities/Effects/puddle.yml

index 7bc1913fe2ce1601accfd12c7809735516b37b1f..664e6484743ee17fe0a6ed5b6691db144da5c49b 100644 (file)
@@ -21,6 +21,7 @@ namespace Content.Server.Nutrition.Components
         internal bool DefaultToOpened;
 
         [ViewVariables(VVAccess.ReadWrite)]
+        [DataField("transferAmount")]
         public FixedPoint2 TransferAmount { get; [UsedImplicitly] private set; } = FixedPoint2.New(5);
 
         [ViewVariables(VVAccess.ReadWrite)]
index 71fb0a2fcf40487c5a6688ef556edb1d4fee7f53..d0459261709809ec1839858baf7ce37c544561bf 100644 (file)
@@ -155,7 +155,7 @@ namespace Content.Server.Nutrition.EntitySystems
             if (component.Pressurized &&
                 !component.Opened &&
                 _random.Prob(0.25f) &&
-                _solutionContainerSystem.TryGetDrainableSolution(uid, out var interactions))
+                _solutionContainerSystem.TryGetSolution(uid, component.SolutionName, out var interactions))
             {
                 component.Opened = true;
                 UpdateAppearance(component);
@@ -229,7 +229,7 @@ namespace Content.Server.Nutrition.EntitySystems
                 return true;
             }
 
-            if (!_solutionContainerSystem.TryGetDrainableSolution(item, out var drinkSolution) ||
+            if (!_solutionContainerSystem.TryGetSolution(item, drink.SolutionName, out var drinkSolution) ||
                 drinkSolution.Volume <= 0)
             {
                 _popupSystem.PopupEntity(Loc.GetString("drink-component-try-use-drink-is-empty",
index cecfb2f941cecc8619cec01a983a60dd8eb1779e..ebdbdbf0460d2dced584720c986fce965d2455d5 100644 (file)
         puddle:
           !type:SpreaderNode
           nodeGroupID: Spreader
+    - type: Drink
+      isOpen: true
+      delay: 3
+      transferAmount: 1
+      solution: puddle