forked from SpaceStation14-Shenanigans/Monolith
Compare commits
3 Commits
main
...
exploithell
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ccbc0cc63 | |||
| 15e23ea8bf | |||
| 709c6d583d |
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user