Further Allocation Tweaks (#36800)

* init

* fix lockboxes
This commit is contained in:
ScarKy0
2025-04-21 12:32:14 +02:00
committed by GitHub
parent df5e6a2b5c
commit 467fe23795
3 changed files with 13 additions and 7 deletions

View 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

View 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;
}

View 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>