Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NFSD Access Overhaul #1459

Merged
merged 13 commits into from
Jul 7, 2024
Prev Previous commit
Next Next commit
fixing mirge issue
that VS so politly decided to fuck up and then hide the fact that the code would not compile by compiling old code like the little shit that it is.  thank god i dont have to be proffessional with my code comments here like i do at work because i ant shit talk VS or Git when i am working so i shall unleach all my rage in this commnet for the 2 of them (git and VS) for being dicks and wasting everybody's time
neuPanda committed Jul 6, 2024
commit 10c0a4544beae2c49ce3ab94334133c079ffd190
22 changes: 13 additions & 9 deletions Content.Server/Shipyard/Systems/ShipyardSystem.Consoles.cs
Original file line number Diff line number Diff line change
@@ -453,8 +453,6 @@ private void OnItemSlotChanged(EntityUid uid, ShipyardConsoleComponent component
// kind of cursed. We need to update the UI when an Id is entered, but the UI needs to know the player characters bank account.
if (!TryComp<ActivatableUIComponent>(uid, out var uiComp) || uiComp.Key == null)
return;
if (uiComp.CurrentSingleUser is not { Valid: true } player)
return;

var uiUsers = _ui.GetActors(uid, uiComp.Key);

@@ -466,7 +464,7 @@ private void OnItemSlotChanged(EntityUid uid, ShipyardConsoleComponent component
if (!TryComp<BankAccountComponent>(player, out var bank))
continue;

var targetId = component.TargetIdSlot.ContainerSlot?.ContainedEntity;
var targetId = component.TargetIdSlot.ContainerSlot?.ContainedEntity;

if (TryComp<ShuttleDeedComponent>(targetId, out var deed))
{
@@ -477,16 +475,22 @@ private void OnItemSlotChanged(EntityUid uid, ShipyardConsoleComponent component
}
}

int sellValue = 0;
if (deed?.ShuttleUid != null)
sellValue = (int) _pricing.AppraiseGrid((EntityUid) (deed?.ShuttleUid!));
int sellValue = 0;
if (deed?.ShuttleUid != null)
sellValue = (int) _pricing.AppraiseGrid((EntityUid) (deed?.ShuttleUid!));

sellValue -= CalculateSalesTax(component, sellValue);

var fullName = deed != null ? GetFullName(deed) : null;
RefreshState(uid, bank.Balance, true, fullName, sellValue, targetId,
(ShipyardConsoleUiKey) uiComp.Key);
var fullName = deed != null ? GetFullName(deed) : null;
RefreshState(uid,
bank.Balance,
true,
fullName,
sellValue,
targetId,
(ShipyardConsoleUiKey) uiComp.Key);

}
}

/// <summary>