]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Further Allocation Tweaks (#36800)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Mon, 21 Apr 2025 10:32:14 +0000 (12:32 +0200)
committerGitHub <noreply@github.com>
Mon, 21 Apr 2025 10:32:14 +0000 (12:32 +0200)
* init

* fix lockboxes

Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs
Content.Shared/Cargo/Components/OverrideSellComponent.cs
Content.Shared/Cargo/Components/StationBankAccountComponent.cs

index aaa14d196f096a7ee150d7180721299b97497dc7..ce2642e1b673eae35dab48df47a07d3460380879 100644 (file)
@@ -342,8 +342,8 @@ public sealed partial class CargoSystem
             {
                 distribution = new Dictionary<ProtoId<CargoAccountPrototype>, double>
                 {
-                    { sellComponent.OverrideAccount, bankAccount.PrimaryCut },
-                    { bankAccount.PrimaryAccount, 1.0 - bankAccount.PrimaryCut },
+                    { sellComponent.OverrideAccount, sellComponent.OverrideCut },
+                    { bankAccount.PrimaryAccount, 1.0 - sellComponent.OverrideCut },
                 };
             }
             else
index 7d798c9ad104b187f1fb7f6d7731676cb0eba890..13e72486ecb50ebe4dcb065192c665509d9ff993 100644 (file)
@@ -14,4 +14,10 @@ public sealed partial class OverrideSellComponent : Component
     /// </summary>
     [DataField(required: true)]
     public ProtoId<CargoAccountPrototype> OverrideAccount;
+
+    /// <summary>
+    /// The cut that the OverrideAccount will get from the price. The rest is given to the primary station account.
+    /// </summary>
+    [DataField]
+    public float OverrideCut = 0.75f;
 }
index 701238926b0f34b695a44b901c448500b304cbf7..a52f5ee61c5997702b06a6739160004c11fe2917 100644 (file)
@@ -21,7 +21,7 @@ public sealed partial class StationBankAccountComponent : Component
     /// When giving funds to a particular account, the proportion of funds they should receive compared to remaining accounts.
     /// </summary>
     [DataField, AutoNetworkedField]
-    public double PrimaryCut = 0.75;
+    public double PrimaryCut = 0.50;
 
     /// <summary>
     /// A dictionary corresponding to the money held by each cargo account.
@@ -44,11 +44,11 @@ public sealed partial class StationBankAccountComponent : Component
     public Dictionary<ProtoId<CargoAccountPrototype>, double> RevenueDistribution = new()
     {
         { "Cargo",       0.00 },
-        { "Engineering", 0.25 },
-        { "Medical",     0.25 },
-        { "Science",     0.15 },
+        { "Engineering", 0.20 },
+        { "Medical",     0.20 },
+        { "Science",     0.20 },
         { "Security",    0.20 },
-        { "Service",     0.15 },
+        { "Service",     0.20 },
     };
 
     /// <summary>