diff --git a/Content.Client/_Citadel/Contracts/ContractInfoControl.xaml.cs b/Content.Client/_Citadel/Contracts/ContractInfoControl.xaml.cs index 5f7f2ffefd..88549b40c1 100644 --- a/Content.Client/_Citadel/Contracts/ContractInfoControl.xaml.cs +++ b/Content.Client/_Citadel/Contracts/ContractInfoControl.xaml.cs @@ -172,8 +172,15 @@ public void Update(ContractUiState state) throw new ArgumentOutOfRangeException(); } + if (state.NoStartReason is { } reason) + { + msg.PushNewline(); + msg.AddMessage(reason); + } + ContractState.SetMessage(msg); + Description.SetMessage(descMsg); if (state.Status is ContractStatus.Breached or ContractStatus.Finalized or ContractStatus.Cancelled) diff --git a/Content.Server/_Citadel/Contracts/Components/ContractComponent.cs b/Content.Server/_Citadel/Contracts/Components/ContractComponent.cs index 467daf2563..2fb9cec04f 100644 --- a/Content.Server/_Citadel/Contracts/Components/ContractComponent.cs +++ b/Content.Server/_Citadel/Contracts/Components/ContractComponent.cs @@ -25,4 +25,7 @@ public sealed partial class ContractComponent : Component /// [ViewVariables] public List SubContractors = new(); + + [DataField("autostart")] + public bool AutoStart = false; } diff --git a/Content.Server/_Citadel/Contracts/Components/ContractGroupsComponent.cs b/Content.Server/_Citadel/Contracts/Components/ContractGroupsComponent.cs new file mode 100644 index 0000000000..7e0ea80d47 --- /dev/null +++ b/Content.Server/_Citadel/Contracts/Components/ContractGroupsComponent.cs @@ -0,0 +1,11 @@ +namespace Content.Server._Citadel.Contracts.Components; + +/// +/// This is used for contract groups. simpl. +/// +[RegisterComponent] +public sealed partial class ContractGroupsComponent : Component +{ + [DataField("groups")] + public HashSet Groups = new(); +} diff --git a/Content.Server/_Citadel/Contracts/Components/FinalizeContractsCriteriaComponent.cs b/Content.Server/_Citadel/Contracts/Components/FinalizeContractsCriteriaComponent.cs new file mode 100644 index 0000000000..eeeaa3593a --- /dev/null +++ b/Content.Server/_Citadel/Contracts/Components/FinalizeContractsCriteriaComponent.cs @@ -0,0 +1,13 @@ +namespace Content.Server._Citadel.Contracts.Components; + +/// +/// This is used for contracts that are advanced by finalizing other contracts. +/// +[RegisterComponent] +public sealed partial class FinalizeContractsCriteriaComponent : Component +{ + [DataField("toClear")] + public int ContractsToClear; + + public int ContractsCleared; +} diff --git a/Content.Server/_Citadel/Contracts/Components/SubcontractingComponent.cs b/Content.Server/_Citadel/Contracts/Components/SubcontractingComponent.cs deleted file mode 100644 index a9cc284b9b..0000000000 --- a/Content.Server/_Citadel/Contracts/Components/SubcontractingComponent.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace Content.Server._Citadel.Contracts.Components; - -/// -/// This is used for contracts that may have subcontracts, including controlling the selection of new contracts. -/// -[RegisterComponent] -public sealed partial class SubcontractingComponent : Component -{ - [DataField("categories", required: true)] - public List Categories = default!; - - public List ActiveSubcontracts = new(); -} diff --git a/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaManualSystem.cs b/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaManualSystem.cs index dd68b42688..93b124b68d 100644 --- a/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaManualSystem.cs +++ b/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaManualSystem.cs @@ -1,4 +1,5 @@ -using Content.Server._Citadel.Contracts.Criteria.Components; +using Content.Server._Citadel.Contracts.Components; +using Content.Server._Citadel.Contracts.Criteria.Components; using Content.Shared._Citadel.Contracts.BUI; using Robust.Shared.Utility; @@ -17,6 +18,9 @@ public override void Initialize() private void OnGetDisplayInfo(EntityUid uid, CriteriaManualComponent component, ref CriteriaGetDisplayInfo args) { - args.Info = new CriteriaDisplayData(FormattedMessage.FromMarkup(component.Description)); + var desc = FormattedMessage.FromMarkup(component.Description); + if (Comp(uid).Satisfied) + desc.AddText(" [COMPLETE]"); + args.Info = new CriteriaDisplayData(desc); } } diff --git a/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaNoDeathsSystem.cs b/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaNoDeathsSystem.cs index d98015d802..db0fb64793 100644 --- a/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaNoDeathsSystem.cs +++ b/Content.Server/_Citadel/Contracts/Criteria/Systems/CriteriaNoDeathsSystem.cs @@ -23,7 +23,10 @@ public override void Initialize() private void OnGetDisplayInfo(EntityUid uid, CriteriaNoDeathsComponent component, ref CriteriaGetDisplayInfo args) { - args.Info = new CriteriaDisplayData(FormattedMessage.FromMarkup(component.Description)); + var desc = FormattedMessage.FromMarkup(component.Description); + if (Comp(uid).Satisfied) + desc.AddText(" [COMPLETE]"); + args.Info = new CriteriaDisplayData(desc); } private void OnStartTicking(EntityUid uid, CriteriaNoDeathsComponent component, CriteriaStartTickingEvent args) diff --git a/Content.Server/_Citadel/Contracts/Events.cs b/Content.Server/_Citadel/Contracts/Events.cs index bb5417e4ba..e15137f3c8 100644 --- a/Content.Server/_Citadel/Contracts/Events.cs +++ b/Content.Server/_Citadel/Contracts/Events.cs @@ -22,7 +22,7 @@ public record struct ContractTryStatusChange(ContractStatus Old, ContractStatus /// /// Contract /// false -public readonly record struct ContractStatusChangedEvent(ContractStatus Old, ContractStatus New); +public readonly record struct ContractStatusChangedEvent(EntityUid Contract, ContractStatus Old, ContractStatus New); /// /// An event fired when a contract is ready for setup. diff --git a/Content.Server/_Citadel/Contracts/Systems/ContractCriteriaSystem.cs b/Content.Server/_Citadel/Contracts/Systems/ContractCriteriaSystem.cs index 84c6acc1f8..1cf3e50a0d 100644 --- a/Content.Server/_Citadel/Contracts/Systems/ContractCriteriaSystem.cs +++ b/Content.Server/_Citadel/Contracts/Systems/ContractCriteriaSystem.cs @@ -106,13 +106,13 @@ private void OnContractStatusChanged(EntityUid contractUid, ContractCriteriaCont switch (args) { // Contract initiated, set up the criteria. - case (ContractStatus.Uninitialized, ContractStatus.Initiating): + case (_, ContractStatus.Uninitialized, ContractStatus.Initiating): { OnContractInitiating(contractUid, criteriaControlComponent); break; } // Contract active, set up criteria checking. - case (ContractStatus.Initiating, ContractStatus.Active): + case (_, ContractStatus.Initiating, ContractStatus.Active): { OnContractActive(contractUid, criteriaControlComponent); break; diff --git a/Content.Server/_Citadel/Contracts/Systems/ContractManagementSystem.cs b/Content.Server/_Citadel/Contracts/Systems/ContractManagementSystem.cs index f42df1043d..5932383336 100644 --- a/Content.Server/_Citadel/Contracts/Systems/ContractManagementSystem.cs +++ b/Content.Server/_Citadel/Contracts/Systems/ContractManagementSystem.cs @@ -1,15 +1,6 @@ -using System.Diagnostics.CodeAnalysis; -using System.Linq; -using Content.Server._Citadel.Contracts.Components; -using Content.Server._Citadel.Contracts.Prototypes; -using Content.Server.Administration; -using Content.Server.Mind.Components; +using Content.Server._Citadel.Contracts.Components; using Content.Shared._Citadel.Contracts; -using Content.Shared.Administration; -using Robust.Server.Player; -using Robust.Shared.Console; using Robust.Shared.Map; -using Robust.Shared.Prototypes; using Robust.Shared.Utility; namespace Content.Server._Citadel.Contracts.Systems; @@ -17,16 +8,8 @@ namespace Content.Server._Citadel.Contracts.Systems; /// /// This handles managing contracts and processing their completion state. /// -public sealed partial class ContractManagementSystem : EntitySystem +public sealed class ContractManagementSystem : EntitySystem { - [Dependency] private readonly IConsoleHost _consoleHost = default!; - [Dependency] private readonly IComponentFactory _componentFactory = default!; - [Dependency] private readonly ILogManager _log = default!; - [Dependency] private readonly IPlayerManager _player = default!; - [Dependency] private readonly IPrototypeManager _proto = default!; - - [Dependency] private readonly ContractCriteriaSystem _contractCriteria = default!; - /// public override void Initialize() { @@ -65,7 +48,7 @@ public EntityUid CreateUnboundContract(string contractProto) var contract = Comp(contractEnt); contract.Status = ContractStatus.Initiating; - RaiseLocalEvent(contractEnt, new ContractStatusChangedEvent(ContractStatus.Uninitialized, ContractStatus.Initiating)); + RaiseLocalEvent(contractEnt, new ContractStatusChangedEvent(contractEnt, ContractStatus.Uninitialized, ContractStatus.Initiating), broadcast: true); return contractEnt; } @@ -76,6 +59,11 @@ public void BindContract(EntityUid contractEnt, Mind.Mind contractor) if (contract.OwningContractor is null) { contract.OwningContractor = contractor; + if (contract.AutoStart && contract.Status is ContractStatus.Initiating) + { + if (!TryChangeContractState(contractEnt, contract, ContractStatus.Active)) + TryChangeContractState(contractEnt, contract, ContractStatus.Cancelled); + } } else { @@ -90,6 +78,7 @@ public EntityUid CreateBoundContract(string contractProto, Mind.Mind owner) var contractEnt = CreateUnboundContract(contractProto); BindContract(contractEnt, owner); + return contractEnt; } @@ -118,7 +107,7 @@ private bool TryChangeContractState(EntityUid contractUid, ContractComponent con return false; contractComponent.Status = newStatus; - RaiseLocalEvent(contractUid, new ContractStatusChangedEvent(oldStatus, newStatus)); + RaiseLocalEvent(contractUid, new ContractStatusChangedEvent(contractUid, oldStatus, newStatus), broadcast: true); return true; } diff --git a/Content.Server/_Citadel/Contracts/Systems/DefaultContractSpawningSystem.cs b/Content.Server/_Citadel/Contracts/Systems/DefaultContractSpawningSystem.cs new file mode 100644 index 0000000000..82d264cecc --- /dev/null +++ b/Content.Server/_Citadel/Contracts/Systems/DefaultContractSpawningSystem.cs @@ -0,0 +1,29 @@ +using Content.Server._Citadel.Contracts.Components; +using Content.Shared._Citadel.Contracts; + +namespace Content.Server._Citadel.Contracts.Systems; + +// SHITCODESHITCODESHITCODESHITCODESHITCODE +// Whoever touches this next, REPLACE IT. +public sealed class DefaultContractSpawningSystem : EntitySystem +{ + [Dependency] private readonly ContractManagementSystem _contract = default!; + + public Dictionary Contracts = new () + { + {"CitadelMiningVesselContract", EntityUid.Invalid}, + {"CitadelPlasmaMiningContract", EntityUid.Invalid}, + }; + + public override void Update(float frameTime) + { + foreach (var (contract, ent) in Contracts) + { + if (Deleted(ent) || + Comp(ent).Status is not ContractStatus.Initiating and not ContractStatus.Uninitialized) + { + Contracts[contract] = _contract.CreateUnboundContract(contract); + } + } + } +} diff --git a/Content.Server/_Citadel/Contracts/Systems/FinalizeContractsCriteriaSystem.cs b/Content.Server/_Citadel/Contracts/Systems/FinalizeContractsCriteriaSystem.cs new file mode 100644 index 0000000000..ba518600dc --- /dev/null +++ b/Content.Server/_Citadel/Contracts/Systems/FinalizeContractsCriteriaSystem.cs @@ -0,0 +1,54 @@ +using System.Linq; +using Content.Server._Citadel.Contracts.Components; +using Content.Shared._Citadel.Contracts; +using Content.Shared._Citadel.Contracts.BUI; +using Robust.Shared.Utility; + +namespace Content.Server._Citadel.Contracts.Systems; + +/// +/// This handles... +/// +public sealed class FinalizeContractsCriteriaSystem : EntitySystem +{ + [Dependency] private readonly ContractCriteriaSystem _criteria = default!; + + + /// + public override void Initialize() + { + SubscribeLocalEvent(Handler); + SubscribeLocalEvent(OnGetDisplayInfo); + } + + private void OnGetDisplayInfo(EntityUid uid, FinalizeContractsCriteriaComponent component, ref CriteriaGetDisplayInfo args) + { + var desc = FormattedMessage.FromMarkup($"Complete {component.ContractsToClear} contracts successfully while this one is active."); + if (Comp(uid).Satisfied) + desc.AddText(" [COMPLETE]"); + args.Info = new CriteriaDisplayData(desc); + } + + private void Handler(ContractStatusChangedEvent ev) + { + var contractComp = Comp(ev.Contract); + + if (ev.New != ContractStatus.Finalized) + return; + + foreach (var contractor in contractComp.SubContractors.Append(contractComp.OwningContractor)) + { + var contracts = contractor!.Contracts.SelectMany(x => Comp(x).Criteria.Values) + .SelectMany(x => x) + .Where(HasComp); + + foreach (var contract in contracts) + { + var finalize = Comp(contract); + finalize.ContractsCleared++; + if (finalize.ContractsCleared >= finalize.ContractsToClear) + _criteria.SetCriteriaStatus(contract, true, Comp(contract)); + } + } + } +} diff --git a/Content.Server/_Citadel/MiningContracts/Criteria/Systems/CriteriaMaterialStorageHasMaterialsSystem.cs b/Content.Server/_Citadel/MiningContracts/Criteria/Systems/CriteriaMaterialStorageHasMaterialsSystem.cs index c502c55ec5..8087fbcfc3 100644 --- a/Content.Server/_Citadel/MiningContracts/Criteria/Systems/CriteriaMaterialStorageHasMaterialsSystem.cs +++ b/Content.Server/_Citadel/MiningContracts/Criteria/Systems/CriteriaMaterialStorageHasMaterialsSystem.cs @@ -3,6 +3,7 @@ using Content.Server._Citadel.Contracts.Systems; using Content.Server._Citadel.MiningContracts.Criteria.Components; using Content.Server._Citadel.VesselContracts.Components; +using Content.Server._Citadel.VesselContracts.Systems; using Content.Server.Materials; using Content.Server.Station.Components; using Content.Server.Station.Systems; @@ -21,6 +22,7 @@ public sealed class CriteriaMaterialStorageHasMaterialsSystem : EntitySystem [Dependency] private readonly ContractCriteriaSystem _criteria = default!; [Dependency] private readonly StationSystem _station = default!; [Dependency] private readonly MaterialStorageSystem _material = default!; + [Dependency] private readonly ContractVesselManagementSystem _contractVessel = default!; [Dependency] private readonly IRobustRandom _random = default!; /// @@ -38,11 +40,16 @@ private void OnComponentStartup(EntityUid uid, CriteriaMaterialStorageHasMateria private void OnGetDisplayInfo(EntityUid uid, CriteriaMaterialStorageHasMaterialsComponent component, ref CriteriaGetDisplayInfo args) { - args.Info = new CriteriaDisplayData(FormattedMessage.FromMarkup( + var desc = FormattedMessage.FromMarkup( Loc.GetString("criteria-material-storage-has-materials-component-display-description", ("material", component.Material), ("amount", component.Amount)) - )); + ); + + if (Comp(uid).Satisfied) + desc.AddText(" [COMPLETE]"); + + args.Info = new CriteriaDisplayData(desc); } private void OnStartTicking(EntityUid uid, CriteriaMaterialStorageHasMaterialsComponent component, CriteriaStartTickingEvent args) @@ -58,11 +65,17 @@ public override void Update(float frameTime) while (q.MoveNext(out var uid, out var cc, out var criteria)) { - var vessel = vesselContractQuery.GetComponent(cc.OwningContract); + if (Comp(cc.OwningContract).OwningContractor is not {} owningContractor) + continue; - if (criteria.Ticking is false || criteria.Satisfied || vessel.Vessel is null) + if (_contractVessel.LocateUserVesselContract(owningContractor) is not + { } vesselUid) continue; + var vessel = vesselContractQuery.GetComponent(vesselUid); + + if (criteria.Ticking is false || criteria.Satisfied || vessel.Vessel is null) + continue; var gridMaybe = _station.GetLargestGrid(Comp(vessel.Vessel!.Value)); diff --git a/Content.Server/_Citadel/PDAContracts/Systems/ContractsCartridgeSystem.cs b/Content.Server/_Citadel/PDAContracts/Systems/ContractsCartridgeSystem.cs index 655321b8e5..5672e59523 100644 --- a/Content.Server/_Citadel/PDAContracts/Systems/ContractsCartridgeSystem.cs +++ b/Content.Server/_Citadel/PDAContracts/Systems/ContractsCartridgeSystem.cs @@ -2,6 +2,7 @@ using Content.Server._Citadel.Contracts.Components; using Content.Server._Citadel.Contracts.Systems; using Content.Server._Citadel.PDAContracts.Components; +using Content.Server._Citadel.VesselContracts.Components; using Content.Server.CartridgeLoader; using Content.Server.Players; using Content.Shared._Citadel.Contracts; @@ -63,6 +64,8 @@ private void OnMessage(EntityUid uid, ContractsCartridgeComponent component, Car default: throw new ArgumentOutOfRangeException(); } + + UpdateUiState(uid, args.LoaderUid, player, component); } private void OnUiReady(EntityUid uid, ContractsCartridgeComponent component, CartridgeUiReadyEvent args) @@ -73,12 +76,29 @@ private void OnUiReady(EntityUid uid, ContractsCartridgeComponent component, Car public ContractListUiState GenerateState(EntityUid cart, IPlayerSession user) { var mind = user.GetMind()!; - var conQuery = EntityQueryEnumerator(); + var conQuery = EntityQueryEnumerator(); var contractStates = new Dictionary(); - while (conQuery.MoveNext(out var contract, out var contractComp, out var criteriaComp)) + var lookingFor = new HashSet(); + + var noVessel = false; + + if (mind.Contracts.Any(HasComp)) + { + noVessel = true; + var vesselContract = mind.Contracts.Where(HasComp).First(); + if (TryComp(vesselContract, out var groups)) + { + lookingFor.UnionWith(groups.Groups.Where(x => x != "Vessel")); + } + } + + while (conQuery.MoveNext(out var contract, out var contractComp, out var criteriaComp, out var contractGroups)) { + if (!contractGroups.Groups.IsSupersetOf(lookingFor)) + continue; + var status = ContractUiState.ContractUserStatus.OpenToJoin; var subCons = contractComp.SubContractors; if (contractComp.OwningContractor is null) @@ -94,13 +114,22 @@ public ContractListUiState GenerateState(EntityUid cart, IPlayerSession user) status = ContractUiState.ContractUserStatus.Owner; } + if (noVessel && contractGroups.Groups.Contains("Vessel") && + status is not ContractUiState.ContractUserStatus.Owner + and not ContractUiState.ContractUserStatus.Subcontractor) + continue; + if (contractComp.Status is ContractStatus.Finalized or ContractStatus.Breached && status == ContractUiState.ContractUserStatus.OpenToJoin) continue; var ownerName = contractComp.OwningContractor?.CharacterName ?? "[INACTIVE]"; var subContractorNames = contractComp.SubContractors.Select(x => x.CharacterName!).ToList(); + var contractDesc = FormattedMessage.FromUnformatted(Description(contract)); + var ev = new GetContractDescription(new ContractDisplayData(contractDesc)); + RaiseLocalEvent(contract, ref ev); + var state = new ContractUiState(status, Name(contract), ownerName, subContractorNames, - new ContractDisplayData(FormattedMessage.FromUnformatted(Description(contract))), contractComp.Status); + ev.Data, contractComp.Status); if (!_contracts.CouldChangeStatusTo(contract, ContractStatus.Active, out var failMsg)) { @@ -147,3 +176,6 @@ private void UpdateUiState(EntityUid uid, EntityUid loaderUid, IPlayerSession se _cartridgeLoaderSystem?.UpdateCartridgeUiState(loaderUid, new ContractCartridgeUiState(innerState)); } } + +[ByRefEvent] +public record struct GetContractDescription(ContractDisplayData Data); diff --git a/Content.Server/_Citadel/Thalers/PersonalBankSystem.cs b/Content.Server/_Citadel/Thalers/PersonalBankSystem.cs index 7b9a6c726c..77aa3ab2b4 100644 --- a/Content.Server/_Citadel/Thalers/PersonalBankSystem.cs +++ b/Content.Server/_Citadel/Thalers/PersonalBankSystem.cs @@ -1,8 +1,10 @@ -using System.Diagnostics.CodeAnalysis; +using System.Collections; +using System.Diagnostics.CodeAnalysis; using System.Linq; using Content.Server._Citadel.Contracts; using Content.Server._Citadel.Contracts.Components; using Content.Server._Citadel.Contracts.Prototypes; +using Content.Server._Citadel.PDAContracts.Systems; using Content.Server.Chat.Managers; using Content.Server.Chat.Systems; using Content.Server.Mind.Components; @@ -11,6 +13,7 @@ using Content.Shared.Chat; using Content.Shared.FixedPoint; using JetBrains.Annotations; +using Robust.Shared.Toolshed; namespace Content.Server._Citadel.Thalers; @@ -28,6 +31,14 @@ public override void Initialize() SubscribeLocalEvent(OnAwardCash); // maybe give this it's own system, it's not relevant to banks. SubscribeLocalEvent(OnContractTryStatusChange); + SubscribeLocalEvent(OnGetDescription); + } + + private void OnGetDescription(EntityUid uid, ContractStartFeeComponent component, ref GetContractDescription args) + { + var msg = args.Data.Description; + msg.PushNewline(); + msg.AddText($"This contract costs {component.Cost} Thalers for the main signer to start."); } private void OnContractTryStatusChange(EntityUid uid, ContractStartFeeComponent component, ref ContractTryStatusChange args) @@ -108,12 +119,18 @@ public bool TryAdjustBalance(EntityUid user, FixedPoint2 amount) } [Access(typeof(PersonalBankSystem), typeof(Mind.Mind))] -public sealed class BankAccount +public sealed class BankAccount : IToolshedPrettyPrint { // TODO(Lunar): FixedPoint2 can't represent more than ~20mil or so. Maybe need a new thing if we expect people to get stupid rich. // but having someone's balance overflow into the negatives is FUNNY!!! [ViewVariables(VVAccess.ReadWrite)] public FixedPoint2 Thalers = 2500; + + public string PrettyPrint(ToolshedManager toolshed, out IEnumerable? more, bool moreUsed = false, int? maxOutput = null) + { + more = null; + return $"BankAccount {{ Thalers: {Thalers} }}"; + } } [PublicAPI] diff --git a/Content.Server/_Citadel/Thalers/Toolshed/BankCommand.cs b/Content.Server/_Citadel/Thalers/Toolshed/BankCommand.cs new file mode 100644 index 0000000000..fd2274d23e --- /dev/null +++ b/Content.Server/_Citadel/Thalers/Toolshed/BankCommand.cs @@ -0,0 +1,37 @@ +using Content.Shared.FixedPoint; +using Robust.Shared.Toolshed; +using Robust.Shared.Toolshed.Syntax; + +namespace Content.Server._Citadel.Thalers.Toolshed; + +[ToolshedCommand] +public sealed class BankCommand : ToolshedCommand +{ + private PersonalBankSystem? _bank; + + [CommandImplementation("getthalers")] + public FixedPoint2 GetThalers([PipedArgument] EntityUid user) + { + _bank ??= GetSys(); + + if (_bank.TryGetBalance(user, out var balance)) + return balance.Value; + + return FixedPoint2.Zero; + } + + [CommandImplementation("adjust")] + public EntityUid Adjust( + [CommandInvocationContext] IInvocationContext ctx, + [PipedArgument] EntityUid user, + [CommandArgument] ValueRef adjustment + ) + { + _bank ??= GetSys(); + + var by = adjustment.Evaluate(ctx); + _bank.TryAdjustBalance(user, by); + + return user; + } +} diff --git a/Content.Server/_Citadel/VesselContracts/Components/ContractSimpleVesselProviderComponent.cs b/Content.Server/_Citadel/VesselContracts/Components/ContractSimpleVesselProviderComponent.cs index 81123411b8..2fb91d9ba5 100644 --- a/Content.Server/_Citadel/VesselContracts/Components/ContractSimpleVesselProviderComponent.cs +++ b/Content.Server/_Citadel/VesselContracts/Components/ContractSimpleVesselProviderComponent.cs @@ -10,7 +10,7 @@ namespace Content.Server._Citadel.VesselContracts.Components; public sealed partial class ContractSimpleVesselProviderComponent : Component { [DataField("vesselMap")] - public string VesselMap = "/Maps/Shuttles/mining.yml"; + public string VesselMap = "/Maps/_citadel/mining_vessel_small.yml"; [DataField("vesselConfig", required: true)] public StationConfig VesselConfig = default!; diff --git a/Content.Server/_Citadel/VesselContracts/Systems/ContractVesselManagementSystem.cs b/Content.Server/_Citadel/VesselContracts/Systems/ContractVesselManagementSystem.cs index 035ed90777..e15cb63848 100644 --- a/Content.Server/_Citadel/VesselContracts/Systems/ContractVesselManagementSystem.cs +++ b/Content.Server/_Citadel/VesselContracts/Systems/ContractVesselManagementSystem.cs @@ -3,6 +3,7 @@ using Content.Server._Citadel.Contracts.Components; using Content.Server._Citadel.VesselContracts.Components; using Content.Server.Chat.Systems; +using Content.Server.Mind.Components; using Content.Server.Shuttles.Components; using Content.Server.Shuttles.Systems; using Content.Server.Station.Components; @@ -41,7 +42,7 @@ private void OnVesselContractShutdown(EntityUid uid, VesselContractComponent com private void OnContractStatusChanged(EntityUid uid, ContractSimpleVesselRemoverComponent component, ContractStatusChangedEvent args) { - if (args is {Old: ContractStatus.Active, New: ContractStatus.Breached or ContractStatus.Finalized}) + if (args is {Old: ContractStatus.Active, New: ContractStatus.Breached or ContractStatus.Finalized or ContractStatus.Cancelled}) { component.Active = true; } @@ -57,6 +58,26 @@ public void ContractVesselAnnouncement(EntityUid contract, string message) _chat.DispatchStationAnnouncement(vessel.Vessel!.Value, message, sender: "Oversight"); } + public EntityUid? LocateUserVesselContract(EntityUid user) + { + if (!TryComp(user, out var mindContainer)) + return null; + + if (mindContainer.Mind is not { } mind) + return null; + + return LocateUserVesselContract(mind); + } + + public EntityUid? LocateUserVesselContract(Mind.Mind mind) + { + var contract = mind.Contracts.Where(HasComp).FirstOrDefault(); + if (contract == EntityUid.Invalid) + return null; + + return contract; + } + private void OnContractStatusChanged(EntityUid uid, ContractSimpleVesselProviderComponent component, ContractStatusChangedEvent args) { switch (args) diff --git a/Content.Shared/_Citadel/Contracts/BUI/ContractComputerUiState.cs b/Content.Shared/_Citadel/Contracts/BUI/ContractComputerUiState.cs index ab2d21f644..46d840da1f 100644 --- a/Content.Shared/_Citadel/Contracts/BUI/ContractComputerUiState.cs +++ b/Content.Shared/_Citadel/Contracts/BUI/ContractComputerUiState.cs @@ -81,6 +81,8 @@ public enum ContractAction Cancel, Leave, Start, - Hail + Hail, + // Explicitly does nothing except update the UI. + Refresh } } diff --git a/Resources/Maps/_Citadel/mining_vessel_small.yml b/Resources/Maps/_Citadel/mining_vessel_small.yml new file mode 100644 index 0000000000..fce85f576d --- /dev/null +++ b/Resources/Maps/_Citadel/mining_vessel_small.yml @@ -0,0 +1,1470 @@ +meta: + format: 5 + postmapinit: false +tilemap: + 0: Space + 75: FloorSteel + 87: FloorTechMaint + 103: Lattice + 104: Plating +entities: +- proto: "" + entities: + - uid: 4 + components: + - type: MetaData + - type: Transform + - type: Map + - type: PhysicsMap + - type: GridTree + - type: MovedGrids + - type: Broadphase + - type: OccluderTree + - uid: 181 + components: + - name: NT-Reclaimer + type: MetaData + - pos: 2.2710133,-2.4148211 + parent: 4 + type: Transform + - chunks: + -1,0: + ind: -1,0 + tiles: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAAGgAAABoAAAAaAAAAFcAAABXAAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGgAAABoAAAAVwAAAEsAAAN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AAAAAAAAAAAAAAAAAAAAAAAABoAAAASwAAAksAAANLAAACSwAAA0sAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaAAAAEsAAANLAAACSwAAAEsAAANLAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZwAAAGgAAABLAAACSwAAAUsAAANLAAABSwAAAA== + type: MapGrid + - type: Broadphase + - bodyStatus: InAir + angularDamping: 0.05 + linearDamping: 0.05 + fixedRotation: False + bodyType: Dynamic + type: Physics + - fixtures: {} + type: Fixtures + - type: SalvageShuttle + - gravityShakeSound: !type:SoundPathSpecifier + path: /Audio/Effects/alert.ogg + type: Gravity + - chunkCollection: + version: 2 + nodes: + - node: + angle: -1.5707963267948966 rad + color: '#FFFFFFFF' + id: Arrows + decals: + 6: -5,-3 + - node: + color: '#FFFFFFFF' + id: Arrows + decals: + 5: -3,1 + - node: + angle: 1.5707963267948966 rad + color: '#FFFFFFFF' + id: Arrows + decals: + 7: -1,-3 + - node: + color: '#FFFFFFFF' + id: ArrowsGreyscale + decals: + 203: -3,-5 + - node: + color: '#FFFFFFFF' + id: Bot + decals: + 201: -5,-5 + 202: -1,-5 + - node: + color: '#A4610696' + id: CheckerNWSE + decals: + 16: -3,2 + 17: -3,3 + 18: -3,4 + - node: + color: '#FFFFFFFF' + id: Delivery + decals: + 4: -4,-1 + - node: + cleanable: True + color: '#FFFFFFFF' + id: Dirt + decals: + 51: -3,-6 + 52: -4,-6 + 53: -2,1 + 54: -6,2 + 55: -6,1 + 56: -4,2 + 57: -5,2 + 58: -1,1 + 59: 0,2 + 60: -2,3 + - node: + cleanable: True + color: '#FFFFFFFF' + id: DirtHeavy + decals: + 21: -4,-3 + 22: -2,2 + 23: -3,4 + 24: -4,5 + - node: + cleanable: True + color: '#FFFFFFFF' + id: DirtLight + decals: + 30: -4,1 + 31: -3,2 + 32: -3,3 + 33: -2,4 + 34: -3,5 + 35: -2,-1 + 36: -3,-2 + 37: -2,-3 + 38: -3,-3 + 39: -3,-4 + 40: -2,-5 + 41: -1,-4 + 42: -1,-3 + 43: -3,-5 + 44: -4,-4 + 45: -5,-5 + 46: -5,-4 + 47: -5,-3 + 48: -5,-2 + 49: -4,-2 + 50: -1,-2 + - node: + cleanable: True + color: '#FFFFFFFF' + id: DirtMedium + decals: + 25: -2,-4 + 26: -4,-5 + 27: -2,-2 + 28: -3,-1 + 29: -3,1 + - node: + color: '#A4610696' + id: QuarterTileOverlayGreyscale + decals: + 10: -5,-2 + 11: -5,-1 + 20: -3,1 + - node: + color: '#A4610696' + id: QuarterTileOverlayGreyscale180 + decals: + 14: -1,-5 + 15: -1,-4 + 19: -3,5 + - node: + color: '#A4610696' + id: QuarterTileOverlayGreyscale270 + decals: + 8: -5,-5 + 9: -5,-4 + - node: + color: '#A4610696' + id: QuarterTileOverlayGreyscale90 + decals: + 12: -1,-1 + 13: -1,-2 + - node: + color: '#FFFFFFFF' + id: WarnCornerSmallGreyscaleSE + decals: + 200: -5,-5 + - node: + color: '#FFFFFFFF' + id: WarnCornerSmallGreyscaleSW + decals: + 199: -1,-5 + - node: + color: '#FFFFFFFF' + id: WarnEndN + decals: + 2: -6,2 + 3: 0,2 + - node: + color: '#FFFFFFFF' + id: WarnEndS + decals: + 0: 0,1 + 1: -6,1 + - node: + color: '#FFFFFFFF' + id: WarnLineGreyscaleS + decals: + 196: -2,-5 + 197: -3,-5 + 198: -4,-5 + - node: + angle: -4.71238898038469 rad + color: '#00000034' + id: footprint + decals: + 138: -0.76830435,-4.312702 + 139: -1.1120543,-3.9220772 + 140: -1.2370543,-4.406452 + 141: -1.7526793,-4.109577 + 142: -1.7526793,-4.500202 + 143: -0.75267935,-2.5314522 + 144: -1.3308043,-2.1720772 + 145: -1.3933043,-2.6564522 + - node: + cleanable: True + angle: -3.141592653589793 rad + color: '#00000034' + id: footprint + decals: + 122: -2.8151793,1.7528267 + 123: -3.2995543,2.2528267 + 124: -2.8308043,2.3622017 + 125: -2.2995543,2.7372017 + 126: -2.3933043,1.1278267 + 127: -2.1276793,-1.5909233 + 128: -2.4089293,-1.9971733 + 129: -1.9245543,-2.6690483 + 130: -2.3620543,-3.0909233 + 131: -1.8776793,-3.6846733 + 132: -2.2683043,-4.0284233 + - node: + angle: -1.5707963267948966 rad + color: '#00000034' + id: footprint + decals: + 146: -1.2839293,-3.3127022 + 147: -0.94017935,-3.5627022 + 148: -5.2526793,-2.4064522 + 149: -4.8620543,-2.2814522 + 150: -4.2526793,-2.6720772 + 151: -4.0026793,-2.3595772 + - node: + cleanable: True + angle: -1.5707963267948966 rad + color: '#00000034' + id: footprint + decals: + 133: -5.1901793,-3.6720772 + 134: -4.7683043,-3.3752022 + 135: -4.2683043,-3.7970772 + 136: -4.0026793,-3.5002022 + 137: -3.4089293,-3.8908272 + - node: + angle: -1.5707963267948966 rad + color: '#0000004A' + id: footprint + decals: + 152: -5.1901793,-3.430749 + 153: -4.8464293,-3.602624 + 154: -4.4245543,-3.258874 + 155: -3.9558043,-3.586999 + 156: -3.5808043,-3.180749 + 157: -5.3776793,-4.086999 + 158: -4.5808043,-3.711999 + - node: + color: '#0000004A' + id: footprint + decals: + 159: -2.6433043,-2.883874 + 160: -2.3776793,-2.508874 + 161: -2.8933043,-1.8994989 + 162: -2.3933043,-1.5869989 + 163: -2.7683043,-0.89949894 + 164: -2.2370543,-0.71199894 + - node: + cleanable: True + angle: -4.71238898038469 rad + color: '#00000050' + id: footprint + decals: + 76: 0.44651008,1.0549397 + 77: -0.13161492,0.82056475 + 78: -0.49098992,1.0393147 + 79: -1.2097399,0.99243975 + 80: -1.6472399,1.2893147 + 81: -1.8659899,0.96118975 + 82: -2.89724,1.1486897 + 83: -4.1628647,1.2111897 + 84: -4.5378647,1.4455647 + 85: -4.6003647,1.1643147 + 86: -5.3659897,1.5705647 + 87: -5.4128647,1.1330647 + 88: -6.0066147,1.5705647 + 89: -6.0066147,1.1643147 + 90: -6.5534897,1.4611897 + 91: -6.7253647,1.1330647 + - node: + cleanable: True + angle: -1.5707963267948966 rad + color: '#00000050' + id: footprint + decals: + 69: -1.8659899,1.6955647 + 70: -1.5847399,1.2893147 + 71: -0.9753649,1.5861897 + 72: -0.28786492,1.2893147 + 73: 0.08713508,1.6643147 + 74: 0.5402601,1.4455647 + 75: 0.6652601,1.8518147 + - node: + cleanable: True + color: '#00000050' + id: footprint + decals: + 61: -2.61599,-0.929533 + 62: -2.86599,-0.648283 + 63: -3.11599,2.4611897 + 64: -2.787865,3.2268147 + 65: -2.86599,2.8205647 + 66: -3.11599,3.0393147 + 67: -3.08474,3.5393147 + 68: -2.67849,4.1486897 + 116: -3.162865,1.6799397 + 117: -2.39724,2.1643147 + 118: -2.037865,2.3674397 + 119: -2.39724,2.9768147 + 120: -3.17849,3.8205647 + 121: -3.569115,2.5705647 + - node: + cleanable: True + angle: 1.5707963267948966 rad + color: '#00000050' + id: footprint + decals: + 110: -1.7566149,0.91431475 + 111: -2.225365,1.7580647 + 112: -1.8503649,2.0861897 + 113: -1.5222399,2.1330647 + 114: -1.0847399,1.3049397 + 115: -2.569115,1.6955647 + - node: + cleanable: True + angle: 4.71238898038469 rad + color: '#00000050' + id: footprint + decals: + 92: -6.7878647,2.0080647 + 93: -6.5222397,1.8049397 + 94: -6.0847397,2.0861897 + 95: -5.7722397,1.6643147 + 96: -5.4753647,2.0080647 + 97: -4.9909897,1.6799397 + 98: -4.5691147,2.0080647 + 99: -4.1941147,1.7424397 + 100: -3.86599,1.9455647 + 101: -6.5534897,0.69556475 + 102: -5.6003647,0.99243975 + 103: -5.1472397,0.72681475 + 104: -4.6784897,1.0705647 + 105: -4.4597397,0.89868975 + 106: -4.1941147,1.2268147 + 107: -3.70974,1.0080647 + 108: -3.975365,0.75806475 + 109: -3.694115,1.4143147 + - node: + cleanable: True + color: '#0000001F' + id: splatter + decals: + 165: -3.6745543,-4.4900737 + 166: -3.9714293,-4.5369487 + 167: -3.4714293,-5.0681987 + 168: -4.2370543,-4.9744487 + 169: -1.5495543,-1.4431987 + 170: -1.7058043,-1.2713237 + 171: -1.2058043,-1.3650737 + 172: -1.0339293,-1.9119487 + - node: + cleanable: True + color: '#A461060F' + id: splatter + decals: + 173: -1.4245543,-4.7713237 + 174: -1.7526793,-4.3650737 + 175: -4.0808043,-1.8806987 + 176: -4.3464293,-1.9119487 + 177: -3.5183043,-2.8338237 + 178: -4.8620543,-4.0994487 + 179: -4.4714293,-4.7869487 + 180: -3.9245543,-5.9275737 + 181: -3.4558043,-6.0838237 + 182: -2.6433043,1.3849263 + 183: -2.1589293,1.6661763 + 184: -2.4558043,1.8224263 + 185: -2.4089293,1.1193013 + - node: + cleanable: True + color: '#D381C909' + id: splatter + decals: + 186: -2.5808043,-4.6931987 + - node: + cleanable: True + color: '#EFB34109' + id: splatter + decals: + 187: -4.6901793,-1.6619487 + 188: -3.7370543,-1.4275737 + 189: -3.2995543,-1.4588237 + 190: -3.5651793,-0.8494487 + 191: -3.5339293,4.1436462 + 192: -3.3464293,3.6905212 + 193: -4.0495543,3.1123965 + 194: -3.9870543,3.6592712 + 195: -2.3151793,4.6123962 + type: DecalGrid + - version: 2 + data: + tiles: + -2,-1: + 0: 52428 + 1: 8192 + -1,-3: + 0: 65504 + -1,-1: + 0: 65535 + -1,-2: + 0: 65535 + -2,1: + 0: 52428 + -1,0: + 0: 65535 + -1,1: + 0: 65535 + -1,2: + 0: 61183 + -1,3: + 0: 52974 + 0,-3: + 0: 65520 + 0,-2: + 0: 65535 + 0,-1: + 0: 65535 + 1,-3: + 0: 13072 + 1,-2: + 0: 13107 + 1,-1: + 0: 21811 + 0,1: + 0: 65535 + 0,2: + 0: 65535 + 0,3: + 0: 65535 + 0,0: + 0: 65535 + 1,3: + 0: 273 + 1,0: + 0: 30583 + 1,1: + 0: 30039 + 1,2: + 0: 4403 + 0,4: + 0: 127 + -1,4: + 0: 140 + -2,0: + 0: 52428 + 1: 8738 + -2,2: + 0: 140 + -2,-2: + 0: 32768 + 1: 19656 + uniqueMixes: + - volume: 2500 + temperature: 293.15 + moles: + - 21.824879 + - 82.10312 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - volume: 2500 + temperature: 293.15 + moles: + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + - 0 + chunkSize: 4 + type: GridAtmosphere + - type: OccluderTree + - type: Shuttle + - type: RadiationGridResistance + - type: SpreaderGrid + - shakeTimes: 10 + type: GravityShake + - type: GasTileOverlay + - type: GridPathfinding +- proto: AirlockExternal + entities: + - uid: 30 + components: + - rot: -1.5707963267948966 rad + pos: -4.5,2.5 + parent: 181 + type: Transform + - uid: 34 + components: + - rot: -1.5707963267948966 rad + pos: -0.5,2.5 + parent: 181 + type: Transform + - uid: 54 + components: + - rot: -1.5707963267948966 rad + pos: -0.5,1.5 + parent: 181 + type: Transform + - uid: 121 + components: + - rot: -1.5707963267948966 rad + pos: -4.5,1.5 + parent: 181 + type: Transform +- proto: AirlockShuttle + entities: + - uid: 14 + components: + - rot: -1.5707963267948966 rad + pos: -6.5,1.5 + parent: 181 + type: Transform + - uid: 29 + components: + - rot: -1.5707963267948966 rad + pos: -6.5,2.5 + parent: 181 + type: Transform + - uid: 36 + components: + - rot: 1.5707963267948966 rad + pos: 1.5,2.5 + parent: 181 + type: Transform + - uid: 49 + components: + - rot: 1.5707963267948966 rad + pos: 1.5,1.5 + parent: 181 + type: Transform +- proto: APCBasic + entities: + - uid: 7 + components: + - rot: 3.141592653589793 rad + pos: -0.5,-5.5 + parent: 181 + type: Transform + - uid: 68 + components: + - rot: 1.5707963267948966 rad + pos: -4.5,3.5 + parent: 181 + type: Transform +- proto: BlastDoorExterior1 + entities: + - uid: 37 + components: + - pos: -5.5,-2.5 + parent: 181 + type: Transform + - links: + - 100 + type: DeviceLinkSink + - uid: 47 + components: + - pos: -5.5,-3.5 + parent: 181 + type: Transform + - links: + - 100 + type: DeviceLinkSink + - uid: 69 + components: + - pos: -5.5,-1.5 + parent: 181 + type: Transform + - links: + - 100 + type: DeviceLinkSink +- proto: BlastDoorExterior2 + entities: + - uid: 46 + components: + - pos: 0.5,-3.5 + parent: 181 + type: Transform + - links: + - 105 + type: DeviceLinkSink + - uid: 94 + components: + - pos: 0.5,-1.5 + parent: 181 + type: Transform + - links: + - 105 + type: DeviceLinkSink + - uid: 95 + components: + - pos: 0.5,-2.5 + parent: 181 + type: Transform + - links: + - 105 + type: DeviceLinkSink +- proto: CableApcExtension + entities: + - uid: 1 + components: + - pos: -3.5,-6.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 3 + components: + - pos: -0.5,-4.5 + parent: 181 + type: Transform + - uid: 15 + components: + - pos: -4.5,3.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 21 + components: + - pos: -3.5,3.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 28 + components: + - pos: -2.5,3.5 + parent: 181 + type: Transform + - uid: 32 + components: + - pos: -3.5,-3.5 + parent: 181 + type: Transform + - uid: 38 + components: + - pos: -4.5,-1.5 + parent: 181 + type: Transform + - uid: 41 + components: + - pos: -0.5,-3.5 + parent: 181 + type: Transform + - uid: 42 + components: + - pos: -1.5,-2.5 + parent: 181 + type: Transform + - uid: 43 + components: + - pos: -3.5,-2.5 + parent: 181 + type: Transform + - uid: 44 + components: + - pos: -0.5,-1.5 + parent: 181 + type: Transform + - uid: 45 + components: + - pos: -2.5,-2.5 + parent: 181 + type: Transform + - uid: 51 + components: + - pos: -3.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 53 + components: + - pos: -4.5,-2.5 + parent: 181 + type: Transform + - uid: 61 + components: + - pos: -0.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 62 + components: + - pos: -2.5,4.5 + parent: 181 + type: Transform + - uid: 63 + components: + - pos: -2.5,2.5 + parent: 181 + type: Transform + - uid: 64 + components: + - pos: -2.5,1.5 + parent: 181 + type: Transform + - uid: 65 + components: + - pos: -2.5,5.5 + parent: 181 + type: Transform + - uid: 66 + components: + - pos: -1.5,2.5 + parent: 181 + type: Transform + - uid: 82 + components: + - pos: -0.5,2.5 + parent: 181 + type: Transform + - uid: 83 + components: + - pos: -4.5,1.5 + parent: 181 + type: Transform + - uid: 84 + components: + - pos: -3.5,1.5 + parent: 181 + type: Transform + - uid: 132 + components: + - pos: 0.5,2.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 144 + components: + - pos: -5.5,1.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 165 + components: + - pos: -0.5,-2.5 + parent: 181 + type: Transform + - uid: 168 + components: + - pos: -3.5,-4.5 + parent: 181 + type: Transform +- proto: CableHV + entities: + - uid: 6 + components: + - pos: -3.5,-6.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 58 + components: + - pos: -1.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 59 + components: + - pos: -1.5,-6.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 74 + components: + - pos: -3.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 75 + components: + - pos: -2.5,-6.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 76 + components: + - pos: -4.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound +- proto: CableMV + entities: + - uid: 8 + components: + - pos: -0.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 9 + components: + - pos: -2.5,-3.5 + parent: 181 + type: Transform + - uid: 10 + components: + - pos: -2.5,2.5 + parent: 181 + type: Transform + - uid: 11 + components: + - pos: -2.5,3.5 + parent: 181 + type: Transform + - uid: 12 + components: + - pos: -2.5,-0.5 + parent: 181 + type: Transform + - uid: 16 + components: + - pos: -2.5,-1.5 + parent: 181 + type: Transform + - uid: 17 + components: + - pos: -2.5,-2.5 + parent: 181 + type: Transform + - uid: 18 + components: + - pos: -4.5,3.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 19 + components: + - pos: -2.5,0.5 + parent: 181 + type: Transform + - uid: 20 + components: + - pos: -3.5,3.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 31 + components: + - pos: -2.5,1.5 + parent: 181 + type: Transform + - uid: 60 + components: + - pos: -2.5,-4.5 + parent: 181 + type: Transform + - uid: 70 + components: + - pos: -4.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 71 + components: + - pos: -3.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 72 + components: + - pos: -2.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound + - uid: 73 + components: + - pos: -1.5,-5.5 + parent: 181 + type: Transform + - enabled: True + type: AmbientSound +- proto: CableTerminal + entities: + - uid: 77 + components: + - rot: -1.5707963267948966 rad + pos: -1.5,-6.5 + parent: 181 + type: Transform +- proto: Catwalk + entities: + - uid: 48 + components: + - pos: -2.5,-5.5 + parent: 181 + type: Transform +- proto: Chair + entities: + - uid: 55 + components: + - rot: 3.141592653589793 rad + pos: -2.5,5.5 + parent: 181 + type: Transform +- proto: ComputerCargoOrders + entities: + - uid: 153 + components: + - rot: 1.5707963267948966 rad + pos: -3.5,5.5 + parent: 181 + type: Transform +- proto: ComputerShuttle + entities: + - uid: 156 + components: + - pos: -2.5,6.5 + parent: 181 + type: Transform +- proto: GasPort + entities: + - uid: 25 + components: + - rot: 1.5707963267948966 rad + pos: -4.5,-4.5 + parent: 181 + type: Transform +- proto: GasVentPump + entities: + - uid: 26 + components: + - rot: -1.5707963267948966 rad + pos: -3.5,-4.5 + parent: 181 + type: Transform + - enabled: False + type: AmbientSound +- proto: GeneratorBasic + entities: + - uid: 40 + components: + - pos: -1.5,-5.5 + parent: 181 + type: Transform +- proto: GeneratorBasic15kW + entities: + - uid: 67 + components: + - pos: -1.5,-6.5 + parent: 181 + type: Transform +- proto: Girder + entities: + - uid: 2 + components: + - pos: -3.5,0.5 + parent: 181 + type: Transform +- proto: GravityGeneratorMini + entities: + - uid: 39 + components: + - pos: -3.5,-6.5 + parent: 181 + type: Transform +- proto: Grille + entities: + - uid: 33 + components: + - pos: -2.5,-7.5 + parent: 181 + type: Transform + - uid: 50 + components: + - pos: -1.5,-7.5 + parent: 181 + type: Transform + - uid: 56 + components: + - pos: -3.5,6.5 + parent: 181 + type: Transform + - uid: 57 + components: + - pos: -0.5,5.5 + parent: 181 + type: Transform + - uid: 135 + components: + - pos: -4.5,5.5 + parent: 181 + type: Transform + - uid: 136 + components: + - pos: -2.5,7.5 + parent: 181 + type: Transform + - uid: 139 + components: + - pos: -4.5,6.5 + parent: 181 + type: Transform + - uid: 151 + components: + - pos: -1.5,6.5 + parent: 181 + type: Transform + - uid: 152 + components: + - pos: -3.5,7.5 + parent: 181 + type: Transform + - uid: 155 + components: + - pos: -0.5,6.5 + parent: 181 + type: Transform +- proto: Gyroscope + entities: + - uid: 169 + components: + - pos: -0.5,-0.5 + parent: 181 + type: Transform +- proto: LockerSalvageSpecialistFilledHardsuit + entities: + - uid: 127 + components: + - pos: -3.5,3.5 + parent: 181 + type: Transform + - uid: 128 + components: + - pos: -1.5,3.5 + parent: 181 + type: Transform + - uid: 129 + components: + - pos: -1.5,-4.5 + parent: 181 + type: Transform +- proto: OreProcessor + entities: + - uid: 125 + components: + - pos: -3.5,4.5 + parent: 181 + type: Transform +- proto: PersonalAI + entities: + - uid: 167 + components: + - flags: SessionSpecific + type: MetaData + - pos: -1.4453101,4.467156 + parent: 181 + type: Transform +- proto: PoweredSmallLight + entities: + - uid: 138 + components: + - pos: -5.5,2.5 + parent: 181 + type: Transform + - powerLoad: 0 + type: ApcPowerReceiver + - uid: 140 + components: + - rot: 3.141592653589793 rad + pos: 0.5,1.5 + parent: 181 + type: Transform + - powerLoad: 0 + type: ApcPowerReceiver + - uid: 141 + components: + - rot: 1.5707963267948966 rad + pos: -3.5,4.5 + parent: 181 + type: Transform + - powerLoad: 0 + type: ApcPowerReceiver + - uid: 142 + components: + - pos: -0.5,-0.5 + parent: 181 + type: Transform + - powerLoad: 0 + type: ApcPowerReceiver + - uid: 143 + components: + - rot: 3.141592653589793 rad + pos: -4.5,-4.5 + parent: 181 + type: Transform + - powerLoad: 0 + type: ApcPowerReceiver +- proto: Rack + entities: + - uid: 27 + components: + - pos: -1.5,4.5 + parent: 181 + type: Transform + - uid: 52 + components: + - pos: -0.5,-4.5 + parent: 181 + type: Transform +- proto: RandomPosterAny + entities: + - uid: 13 + components: + - pos: -4.5,0.5 + parent: 181 + type: Transform + - uid: 22 + components: + - pos: -0.5,3.5 + parent: 181 + type: Transform + - uid: 23 + components: + - pos: -4.5,-6.5 + parent: 181 + type: Transform +- proto: SignalButtonExt1 + entities: + - uid: 100 + components: + - pos: -5.5,-0.5 + parent: 181 + type: Transform + - linkedPorts: + 69: + - Pressed: Toggle + 37: + - Pressed: Toggle + 47: + - Pressed: Toggle + type: DeviceLinkSource +- proto: SignalButtonExt2 + entities: + - uid: 105 + components: + - pos: 0.5,-0.5 + parent: 181 + type: Transform + - linkedPorts: + 94: + - Pressed: Toggle + 95: + - Pressed: Toggle + 46: + - Pressed: Toggle + type: DeviceLinkSource +- proto: SMESBasic + entities: + - uid: 24 + components: + - pos: -2.5,-6.5 + parent: 181 + type: Transform +- proto: SubstationWallBasic + entities: + - uid: 5 + components: + - rot: 1.5707963267948966 rad + pos: -4.5,-5.5 + parent: 181 + type: Transform +- proto: Table + entities: + - uid: 154 + components: + - pos: -1.5,5.5 + parent: 181 + type: Transform +- proto: Thruster + entities: + - uid: 35 + components: + - pos: 0.5,4.5 + parent: 181 + type: Transform + - uid: 115 + components: + - rot: -1.5707963267948966 rad + pos: 1.5,-0.5 + parent: 181 + type: Transform + - uid: 119 + components: + - rot: 3.141592653589793 rad + pos: -5.5,-6.5 + parent: 181 + type: Transform + - uid: 120 + components: + - rot: 1.5707963267948966 rad + pos: -6.5,-0.5 + parent: 181 + type: Transform +- proto: VendingMachineSalvage + entities: + - uid: 126 + components: + - flags: SessionSpecific + type: MetaData + - pos: -4.5,-0.5 + parent: 181 + type: Transform +- proto: WallSolid + entities: + - uid: 85 + components: + - pos: -4.5,-6.5 + parent: 181 + type: Transform + - uid: 87 + components: + - pos: -4.5,3.5 + parent: 181 + type: Transform + - uid: 89 + components: + - pos: 0.5,0.5 + parent: 181 + type: Transform + - uid: 90 + components: + - pos: -5.5,-5.5 + parent: 181 + type: Transform + - uid: 91 + components: + - pos: 1.5,3.5 + parent: 181 + type: Transform + - uid: 97 + components: + - pos: -0.5,-5.5 + parent: 181 + type: Transform + - uid: 99 + components: + - pos: 0.5,-4.5 + parent: 181 + type: Transform + - uid: 103 + components: + - pos: -6.5,3.5 + parent: 181 + type: Transform + - uid: 104 + components: + - pos: -0.5,3.5 + parent: 181 + type: Transform + - uid: 106 + components: + - pos: 0.5,-5.5 + parent: 181 + type: Transform + - uid: 107 + components: + - pos: -4.5,4.5 + parent: 181 + type: Transform + - uid: 108 + components: + - pos: -0.5,-6.5 + parent: 181 + type: Transform + - uid: 109 + components: + - pos: -0.5,-7.5 + parent: 181 + type: Transform + - uid: 110 + components: + - pos: -5.5,-4.5 + parent: 181 + type: Transform + - uid: 111 + components: + - pos: -5.5,3.5 + parent: 181 + type: Transform + - uid: 112 + components: + - pos: -4.5,0.5 + parent: 181 + type: Transform + - uid: 114 + components: + - pos: -5.5,0.5 + parent: 181 + type: Transform + - uid: 116 + components: + - pos: -4.5,-7.5 + parent: 181 + type: Transform + - uid: 117 + components: + - pos: 0.5,3.5 + parent: 181 + type: Transform + - uid: 118 + components: + - pos: -5.5,-0.5 + parent: 181 + type: Transform + - uid: 122 + components: + - pos: 0.5,-0.5 + parent: 181 + type: Transform + - uid: 123 + components: + - pos: 1.5,0.5 + parent: 181 + type: Transform + - uid: 124 + components: + - pos: -6.5,0.5 + parent: 181 + type: Transform +- proto: WallSolidRust + entities: + - uid: 113 + components: + - pos: -0.5,0.5 + parent: 181 + type: Transform + - uid: 145 + components: + - pos: -0.5,4.5 + parent: 181 + type: Transform + - uid: 147 + components: + - pos: -4.5,-5.5 + parent: 181 + type: Transform +- proto: Window + entities: + - uid: 78 + components: + - pos: -2.5,7.5 + parent: 181 + type: Transform + - uid: 79 + components: + - pos: -1.5,-7.5 + parent: 181 + type: Transform + - uid: 80 + components: + - pos: -3.5,7.5 + parent: 181 + type: Transform + - uid: 81 + components: + - pos: -3.5,6.5 + parent: 181 + type: Transform + - uid: 86 + components: + - pos: -1.5,6.5 + parent: 181 + type: Transform + - uid: 88 + components: + - pos: -0.5,5.5 + parent: 181 + type: Transform + - uid: 92 + components: + - pos: -1.5,7.5 + parent: 181 + type: Transform + - uid: 93 + components: + - pos: -0.5,6.5 + parent: 181 + type: Transform + - uid: 96 + components: + - pos: -3.5,-7.5 + parent: 181 + type: Transform + - uid: 98 + components: + - pos: -2.5,-7.5 + parent: 181 + type: Transform + - uid: 101 + components: + - pos: -4.5,6.5 + parent: 181 + type: Transform + - uid: 102 + components: + - pos: -4.5,5.5 + parent: 181 + type: Transform +... diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml index 144ef91c89..eaa8822815 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml @@ -43,8 +43,8 @@ stateBaseClosed: mining stateDoorOpen: mining_open stateDoorClosed: mining_door - - type: AccessReader - access: [["Salvage"]] + #- type: AccessReader + # access: [["Salvage"]] # Command - type: entity diff --git a/Resources/Prototypes/_Citadel/Contracts/Criteria/simple.yml b/Resources/Prototypes/_Citadel/Contracts/Criteria/simple.yml index 56205007bc..6a102e3e8e 100644 --- a/Resources/Prototypes/_Citadel/Contracts/Criteria/simple.yml +++ b/Resources/Prototypes/_Citadel/Contracts/Criteria/simple.yml @@ -18,3 +18,14 @@ - type: ContractCriteria - type: CriteriaManual desc: Bother a game admin to fill this out if it's not within a few minutes. + +- type: entity + id: CitadelCriteriaClear3 + parent: CitadelBaseContractCriteria + name: Admin Approval Criteria + description: A criteria that is satisfied when an admin manually approves it. + noSpawn: true + components: + - type: ContractCriteria + - type: FinalizeContractsCriteria + toClear: 3 diff --git a/Resources/Prototypes/_Citadel/Contracts/base.yml b/Resources/Prototypes/_Citadel/Contracts/base.yml index c4fb1fcc92..4b3d0b0b71 100644 --- a/Resources/Prototypes/_Citadel/Contracts/base.yml +++ b/Resources/Prototypes/_Citadel/Contracts/base.yml @@ -9,6 +9,7 @@ - type: Contract - type: ContractCriteriaControl criteria: {} + - type: ContractGroups - type: entity id: CitadelTestingContract @@ -17,6 +18,8 @@ description: A contract that simply requires nobody dies and admin approval. noSpawn: true components: + - type: ContractGroups + groups: [ "Debug" ] - type: ContractCriteriaControl criteria: Finalizing: diff --git a/Resources/Prototypes/_Citadel/Contracts/mining.yml b/Resources/Prototypes/_Citadel/Contracts/mining.yml index c5aad996fc..1d76d2c874 100644 --- a/Resources/Prototypes/_Citadel/Contracts/mining.yml +++ b/Resources/Prototypes/_Citadel/Contracts/mining.yml @@ -1,7 +1,7 @@ - type: entity id: CitadelTestingMiningContract parent: CitadelBaseContract - name: Plasma Acquisition Order + name: Plasma Acquisition Order With Vessel description: A contract that requires nobody dies, and an easy minimum income. This combines a vessel contract and gig. noSpawn: true components: @@ -24,3 +24,57 @@ - type: VesselContract - type: ContractStartFee cost: 1000 + - type: ContractGroups + groups: [ "Debug", "Mining", "Vessel" ] + +- type: entity + id: CitadelMiningVesselContract + parent: CitadelBaseContract + name: Mining Vessel + description: > + A deposit-loaned vessel meant to be used for a predetermined amount of time. + Once purchased, the option to take on mining related contracts becomes available. + Upon completion, the deposit will be returned and the vessel will automatically return to base when all personnel have exited. + noSpawn: true + components: + - type: Contract + autostart: true + - type: ContractSimpleVesselProvider + vesselConfig: + stationProto: CitadelStandardNanotrasenVessel + components: + - type: Transform + - type: ContractCriteriaControl + criteria: + Finalizing: + - CitadelCriteriaClear3 + criteriaEffects: + Finalizing: + - !type:CriteriaGroupAwardCash + amount: 1000 + - type: ContractSimpleVesselRemover + - type: VesselContract + - type: ContractStartFee + cost: 1000 + - type: ContractGroups + groups: [ "Mining", "Vessel" ] + +- type: entity + id: CitadelPlasmaMiningContract + parent: CitadelBaseContract + name: Plasma Acquisition Order + description: Procure the specified amount of plasma for a payout, using your available vessel. + noSpawn: true + components: + - type: ContractCriteriaControl + criteria: + Finalizing: + - CitadelCriteriaPlasmaMining + Breaching: + - CitadelCriteriaNoDeaths + criteriaEffects: + Finalizing: + - !type:CriteriaGroupAwardCash + amount: 200 + - type: ContractGroups + groups: [ "Mining" ]