Compare commits

...

3 Commits

Author SHA1 Message Date
Redrover1760 9ccbc0cc63 ree 2026-03-22 23:36:13 -04:00
Redrover1760 15e23ea8bf sanity 2026-03-22 23:22:55 -04:00
Redrover1760 709c6d583d exploit 1 2026-03-22 22:29:47 -04:00
3 changed files with 16 additions and 4 deletions
@@ -2084,8 +2084,7 @@ namespace Content.Client.Lobby.UI
private void RandomizeEverything()
{
var oldBank = Profile?.BankBalance ?? HumanoidCharacterProfile.DefaultBalance; // Frontier
Profile = HumanoidCharacterProfile.Random().WithBankBalance(oldBank); // Frontier: add WithBankBalance(oldBank)
Profile = HumanoidCharacterProfile.Random().HandleRandomizedBankBalance(Profile); // Mono: add WithBankBalance(Profile)
SetProfile(Profile, CharacterSlot);
SetDirty();
}
@@ -2129,7 +2128,7 @@ namespace Content.Client.Lobby.UI
{
var profile = _entManager.System<HumanoidAppearanceSystem>().FromStream(file, _playerManager.LocalSession!);
var oldProfile = Profile;
profile = profile.WithBankBalance(oldProfile.BankBalance); // Frontier: no free money (enforce import, don't care about import)
profile = profile.HandleRandomizedBankBalance(oldProfile); // Frontier: no free money (enforce import, don't care about import) Mono: Now uses profile.
SetProfile(profile, CharacterSlot);
IsDirty = !profile.MemberwiseEquals(oldProfile);
@@ -69,6 +69,10 @@ public sealed partial class MarketSystem
return;
var cartBalance = MarketDataExtensions.GetMarketValue(consoleComponent.CartDataList, marketMod);
if (cartBalance <= 0) // Mono - Sanity check
return;
if (playerBank.Balance < cartBalance)
return;
@@ -308,7 +308,7 @@ namespace Content.Shared.Preferences
return new(this) { Gender = gender };
}
// Frontier: this is probably an issue and should be removed.
// Frontier: this is probably an issue and should be removed. (correct)
public HumanoidCharacterProfile WithBankBalance(int bankBalance)
{
return new(this) { BankBalance = bankBalance };
@@ -838,6 +838,15 @@ namespace Content.Shared.Preferences
return loadout;
}
// Mono: Used for clientside calls for modifying bank balance (Danger)
public HumanoidCharacterProfile HandleRandomizedBankBalance(HumanoidCharacterProfile? profile)
{
return new(this) { BankBalance = profile?.BankBalance ?? DefaultBalance };
}
// End Mono
public HumanoidCharacterProfile Clone()
{
return new HumanoidCharacterProfile(this);