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

Computer Boards Fixup #2259

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Content.IntegrationTests/Tests/MachineBoardTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Content.Server.Construction.Components;
using Content.Shared.Construction.Components;
Expand Down Expand Up @@ -57,7 +57,7 @@ await server.WaitAssertion(() =>
Assert.Multiple(() =>
{
Assert.That(protoMan.TryIndex<EntityPrototype>(mId, out var mProto),
$"Machine board {p.ID}'s corresponding machine has an invalid prototype."); // Frontier
$"Machine board {p.ID}'s corresponding machine has an invalid prototype.");
Assert.That(mProto.TryGetComponent<MachineComponent>(out var mComp, compFact),
$"Machine board {p.ID}'s corresponding machine {mId} does not have MachineComponent");
Assert.That(mComp.Board, Is.EqualTo(p.ID),
Expand Down Expand Up @@ -93,6 +93,11 @@ await server.WaitAssertion(() =>
continue;
var cId = cbc.Prototype;

// Frontier: we accept null as board prototypes, but this will fail the assertions.
if (cId == "Null")
continue;
// End Frontier

Assert.Multiple(() =>
{
Assert.That(cId, Is.Not.Null, $"Computer board \"{p.ID}\" does not have a corresponding computer.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,19 +444,6 @@
- type: ComputerTabletopBoard # Frontier
prototype: ComputerTabletopIFFSyndicate # Frontier

- type: entity
parent: BaseComputerCircuitboard
id: ShipyardComputerCircuitboard
name: shipyard computer board
description: A computer printed circuit board for a shipyard computer.
components:
- type: Sprite
state: cpu_supply
- type: ComputerBoard
prototype: ComputerShipyard
- type: ComputerTabletopBoard # Frontier
prototype: ComputerTabletopShipyard # Frontier

- type: entity
parent: BaseComputerCircuitboard
id: ComputerMassMediaCircuitboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,17 @@
# - type: ComputerBoard
# prototype: ComputerAdvancedRadar
# - type: ComputerTabletopBoard # Frontier
# prototype: ComputerTabletopAdvancedRadar # Frontier
# prototype: ComputerTabletopAdvancedRadar # Frontier

# - type: entity
# parent: BaseComputerCircuitboard
# id: ShipyardComputerCircuitboard
# name: shipyard computer board
# description: A computer printed circuit board for a shipyard computer.
# components:
# - type: Sprite
# state: cpu_supply
# - type: ComputerBoard
# prototype: ComputerShipyard
# - type: ComputerTabletopBoard # Frontier
# prototype: ComputerTabletopShipyard # Frontier
Loading