Skip to content

Commit

Permalink
Evil Ships
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 committed Apr 21, 2024
1 parent 71ea871 commit 38e3455
Show file tree
Hide file tree
Showing 14 changed files with 1,502 additions and 1,405 deletions.
12 changes: 6 additions & 6 deletions Content.Server/Shipyard/Systems/ShipyardSystem.Consoles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ private void OnPurchaseMessage(EntityUid uid, ShipyardConsoleComponent component
if (TryComp<ShuttleDeedComponent>(targetId, out var deed))
sellValue = (int) _pricing.AppraiseGrid((EntityUid) (deed?.ShuttleUid!));

if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) args.UiKey)
if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) args.UiKey || ShipyardConsoleUiKey.Syndicate == (ShipyardConsoleUiKey) args.UiKey) // Unhardcode this please
{
var tax = (int) (sellValue * 0.30f);
sellValue -= tax;
channel = component.BlackMarketShipyardChannel;
channel = component.ShipyardChannel;

SendPurchaseMessage(uid, player, name, component.SecurityShipyardChannel, true);
}
Expand Down Expand Up @@ -334,7 +334,7 @@ public void OnSellMessage(EntityUid uid, ShipyardConsoleComponent component, Shi
if (ShipyardConsoleUiKey.Security == (ShipyardConsoleUiKey) args.UiKey)
channel = component.SecurityShipyardChannel;

if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) args.UiKey)
if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) args.UiKey || ShipyardConsoleUiKey.Syndicate == (ShipyardConsoleUiKey) args.UiKey) // Unhardcode this please
{
var tax = (int) (bill * 0.30f);
var query = EntityQueryEnumerator<StationBankAccountComponent>();
Expand All @@ -345,7 +345,7 @@ public void OnSellMessage(EntityUid uid, ShipyardConsoleComponent component, Shi
}

bill -= tax;
channel = component.BlackMarketShipyardChannel;
channel = component.ShipyardChannel;

SendSellMessage(uid, deed.ShuttleOwner!, GetFullName(deed), component.SecurityShipyardChannel, player, true);
}
Expand Down Expand Up @@ -389,7 +389,7 @@ private void OnConsoleUIOpened(EntityUid uid, ShipyardConsoleComponent component
if (deed?.ShuttleUid != null)
sellValue = (int) _pricing.AppraiseGrid((EntityUid) (deed?.ShuttleUid!));

if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) uiComp.Key)
if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) args.UiKey || ShipyardConsoleUiKey.Syndicate == (ShipyardConsoleUiKey) args.UiKey) // Unhardcode this please
{
var tax = (int) (sellValue * 0.30f);
sellValue -= tax;
Expand Down Expand Up @@ -477,7 +477,7 @@ private void OnItemSlotChanged(EntityUid uid, ShipyardConsoleComponent component
if (deed?.ShuttleUid != null)
sellValue = (int) _pricing.AppraiseGrid((EntityUid) (deed?.ShuttleUid!));

if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) uiComp.Key)
if (ShipyardConsoleUiKey.BlackMarket == (ShipyardConsoleUiKey) uiComp.Key || ShipyardConsoleUiKey.Syndicate == (ShipyardConsoleUiKey) uiComp.Key) // Unhardcode this please
{
var tax = (int) (sellValue * 0.30f);
sellValue -= tax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ public sealed partial class ShipyardConsoleComponent : Component

[DataField("securityShipyardChannel")]
public string SecurityShipyardChannel = "Nfsd";

[DataField("blackMarketShipyardChannel")]
public string BlackMarketShipyardChannel = "Syndicate";
}
4 changes: 4 additions & 0 deletions Content.Shared/Shipyard/SharedShipyardSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public enum ShipyardConsoleUiKey : byte
{
Shipyard,
Security,
Nfsd,
Syndicate,
BlackMarket,
Expedition,
Scrap,
Expand All @@ -29,6 +31,8 @@ public abstract class SharedShipyardSystem : EntitySystem
{
{ShipyardConsoleUiKey.Shipyard, "Civilian"},
{ShipyardConsoleUiKey.Security, "Security"},
{ShipyardConsoleUiKey.Nfsd, "Nfsd"},
{ShipyardConsoleUiKey.Syndicate, "Syndicate"},
{ShipyardConsoleUiKey.BlackMarket, "BlackMarket"},
{ShipyardConsoleUiKey.Expedition, "Expedition"},
{ShipyardConsoleUiKey.Scrap, "Scrap"},
Expand Down
42 changes: 27 additions & 15 deletions Resources/Maps/_NF/POI/lpbravo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,11 @@ entities:
parent: 1
- proto: BannerSyndicate
entities:
- uid: 446
components:
- type: Transform
pos: 1.5,-2.5
parent: 1
- uid: 502
components:
- type: Transform
Expand Down Expand Up @@ -1432,6 +1437,8 @@ entities:
- type: Transform
pos: -4.5,-5.5
parent: 1
- type: SpamEmitSound
enabled: False
- proto: BoxFolderBlack
entities:
- uid: 327
Expand Down Expand Up @@ -2547,6 +2554,23 @@ entities:
rot: 3.141592653589793 rad
pos: -0.5,2.5
parent: 1
- proto: ComputerShipyardSyndicate
entities:
- uid: 447
components:
- type: Transform
pos: -1.5,0.5
parent: 1
- type: ContainerContainer
containers:
ShipyardConsole-targetId: !type:ContainerSlot
showEnts: False
occludes: True
ent: null
board: !type:Container
showEnts: False
occludes: True
ents: []
- proto: ComputerSolarControl
entities:
- uid: 204
Expand Down Expand Up @@ -3491,6 +3515,8 @@ entities:
rot: 1.5707963267948966 rad
pos: -3.5,-5.5
parent: 1
- type: SpamEmitSound
enabled: False
- proto: SpawnMobCatSyndy
entities:
- uid: 652
Expand Down Expand Up @@ -3644,20 +3670,6 @@ entities:
- type: Transform
pos: -2.3828456,2.660123
parent: 1
- proto: VendingMachineCoffee
entities:
- uid: 447
components:
- type: Transform
pos: 1.5,-2.5
parent: 1
- proto: VendingMachineDonut
entities:
- uid: 446
components:
- type: Transform
pos: 0.5,-2.5
parent: 1
- proto: VendingMachineSyndieContraband
entities:
- uid: 516
Expand All @@ -3670,7 +3682,7 @@ entities:
- uid: 187
components:
- type: Transform
pos: -1.5,0.5
pos: 0.5,-2.5
parent: 1
- proto: WallPlastitanium
entities:
Expand Down
Loading

0 comments on commit 38e3455

Please sign in to comment.