Skip to content

Commit

Permalink
fixes master woooo
Browse files Browse the repository at this point in the history
  • Loading branch information
deathride58 committed Dec 6, 2023
1 parent 042b261 commit 0ea63b1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed partial class ContractCriteriaControlComponent : Component
/// Additional criteria effects, on top of the ones the groups already have.
/// </summary>
[DataField("criteriaEffects")]
public Dictionary<string, List<CriteriaGroupEffectEvent>> CriteriaEffects = default!;
public Dictionary<string, List<CriteriaGroupEffectEvent>> CriteriaEffects = new();

/// <summary>
/// The actual criteria entities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public sealed class CriteriaMaterialStorageHasMaterialsSystem : EntitySystem
[Dependency] private readonly MaterialStorageSystem _material = default!;
[Dependency] private readonly ContractVesselManagementSystem _contractVessel = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;

/// <inheritdoc/>
public override void Initialize()
Expand Down Expand Up @@ -66,7 +67,10 @@ public override void Update(float frameTime)

while (q.MoveNext(out var uid, out var cc, out var criteria))
{
if (Comp<ContractComponent>(cc.OwningContract).OwningContractor is not {} owningContractor)
if (!_entityManager.TryGetComponent<ContractComponent>(cc.OwningContract, out var owningContractComponent))
continue;

if (owningContractComponent.OwningContractor is not {} owningContractor)
continue;

if (_contractVessel.LocateUserVesselContract(new Entity<MindComponent>(owningContractor.Owner, owningContractor)) is not
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public override void Initialize()

private void OnVesselContractShutdown(EntityUid uid, VesselContractComponent component, ComponentShutdown args)
{
if (component.Vessel == null)
return;
_station.DeleteStation(component.Vessel!.Value);
}

Expand Down
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_citadel/cartridges.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
contracts-program-name = Contracts
2 changes: 1 addition & 1 deletion Resources/Prototypes/_Citadel/PDA/cartridges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- type: UIFragment
ui: !type:ContractsCartridgeUi
- type: Cartridge
programName: Contracts
programName: contracts-program-name
icon:
sprite: Objects/Misc/books.rsi
state: book6
Expand Down

0 comments on commit 0ea63b1

Please sign in to comment.