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

[Tweak] Shipyard & Salvage Update #934

Merged
merged 6 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
3,414 changes: 1,955 additions & 1,459 deletions Resources/Maps/Backmen/ForSale/barge.yml

Large diffs are not rendered by default.

1,075 changes: 748 additions & 327 deletions Resources/Maps/Backmen/ForSale/helix.yml

Large diffs are not rendered by default.

382 changes: 250 additions & 132 deletions Resources/Maps/Backmen/ForSale/ntcv-nomad.yml

Large diffs are not rendered by default.

487 changes: 323 additions & 164 deletions Resources/Maps/Backmen/ForSale/ntsv-tote.yml

Large diffs are not rendered by default.

703 changes: 486 additions & 217 deletions Resources/Maps/Backmen/ForSale/ntv-pulse.yml

Large diffs are not rendered by default.

387 changes: 294 additions & 93 deletions Resources/Maps/Backmen/ForSale/prospecter.yml

Large diffs are not rendered by default.

452 changes: 408 additions & 44 deletions Resources/Maps/Backmen/ForSale/pts.yml

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Resources/Prototypes/Catalog/Fills/Lockers/heads.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
- id: CargoBountyComputerCircuitboard
- id: CargoRequestComputerCircuitboard
- id: CargoSaleComputerCircuitboard
- id: CargoShuttleComputerCircuitboard
#- id: CargoShuttleComputerCircuitboard # backmen: salvage
- id: ShipyardComputerCircuitboard
Comment on lines +10 to +11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Warning: Incomplete migration from cargo shuttle to shipyard system

The replacement in the QM's locker is part of a larger migration, but there are inconsistencies:

  • The ShipyardComputerCircuitboard is defined in Resources/Prototypes/_Backmen/Entities/Objects/Devices/Circuitboards/computer.yml, but the old cargo shuttle components are still present in many locations
  • Migration entries exist in Resources/migration.yml for both the computer and circuit board, but many references to the old system remain:
    • Multiple map files still use ComputerCargoShuttle
    • Cargo shuttle components and interfaces are still defined in computers.yml
    • Theft objectives still reference the cargo shuttle circuit board
🔗 Analysis chain

LGTM: Shipyard console circuit board replacement aligns with PR objectives

The replacement of CargoShuttleComputerCircuitboard with ShipyardComputerCircuitboard in the Quartermaster's locker correctly implements the PR's goal of transitioning to shipyard consoles for shuttle purchases.

Let's verify the shipyard console implementation:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify shipyard console implementation and references

# Check if ShipyardComputerCircuitboard is properly defined
rg -l "ShipyardComputerCircuitboard" Resources/Prototypes/Entities/Objects/Devices/Circuitboards/

# Verify if CargoShuttleComputerCircuitboard is fully replaced
rg -l "CargoShuttleComputerCircuitboard" Resources/Prototypes/

Length of output: 360


Script:

#!/bin/bash
# Let's check the content of these files to understand the implementation

# Check computers.yml for CargoShuttle computer definition
echo "=== computers.yml ==="
rg -A 5 "CargoShuttle" Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml

# Check computer.yml for circuit board definitions
echo -e "\n=== computer.yml ==="
rg -A 5 "CargoShuttle|ShipyardComputer" Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml

# Check if there are any other references to cargo shuttle or shipyard
echo -e "\n=== Other References ==="
rg "CargoShuttle|ShipyardComputer" --type yaml

Length of output: 7849

- id: CargoShuttleConsoleCircuitboard
- id: SalvageMagnetMachineCircuitboard
- id: CigPackGreen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
parent: BaseComputerCircuitboard
id: CargoShuttleComputerCircuitboard
name: cargo shuttle computer board
categories: [ HideSpawnMenu ] # backmen: salvage
description: A computer printed circuit board for a cargo shuttle computer.
components:
- type: Sprite
Expand Down
5 changes: 0 additions & 5 deletions Resources/Prototypes/Entities/Stations/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@
- /Maps/Ruins/syndicate_dropship.yml
- /Maps/Ruins/whiteship_ancient.yml
- /Maps/Ruins/whiteship_bluespacejumper.yml
# Corvax-start
mining: !type:GridSpawnGroup
paths:
- /Maps/Shuttles/corvax_mining.yml
# Corvax-Mapping-End

- type: entity
id: BaseStationCentcomm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,7 @@
- type: entity
id: ComputerCargoShuttle
parent: BaseComputerAiAccess
categories: [ HideSpawnMenu ] # backmen: salvage
name: cargo shuttle computer
description: Used to order the shuttle.
components:
Expand Down
1 change: 0 additions & 1 deletion Resources/Prototypes/Research/civilianservices.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
- SynthesizerInstrument
- DawInstrumentMachineCircuitboard
- MassMediaCircuitboard
- ShipyardCircuitboard
- JukeboxCircuitBoard

- type: technology
Expand Down
1 change: 1 addition & 0 deletions Resources/Prototypes/Research/industrial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- MineralScannerEmpty
- OreProcessorIndustrialMachineCircuitboard
- ClothingMaskWeldingGas
- ShipyardCircuitboard # backmen: salvage

- type: technology
id: SpaceScanning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
id: Prospecter
name: NT-7 Prospecter
description: A small mining vessel designed to assist salvage operations.
price: 19000
price: 15000
category: Small
group: Civilian
shuttlePath: /Maps/Backmen/ForSale/prospecter.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
interfaces:
enum.ShipyardConsoleUiKey.Shipyard:
type: ShipyardConsoleBoundUserInterface
enum.WiresUiKey.Key:
type: WiresBoundUserInterface
- type: Computer
board: ShipyardComputerCircuitboard
- type: StationAiWhitelist
Expand Down
6 changes: 6 additions & 0 deletions Resources/migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -652,3 +652,9 @@ TorsoBorgJanitor: TorsoBorg
PresentRandomAsh: PresentRandomCoal
# 2024-11-19
CrateCrewMonitoringBoards: CrateCrewMonitoring

# 2024-11-23 backmen
# Computer that by idea let's you call cargo shuttle is replaced
# with console that let's you buy any shuttle.
ComputerCargoShuttle: ComputerShipyard
CargoShuttleComputerCircuitboard: ShipyardComputerCircuitboard
Comment on lines +659 to +660
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate migration entry.

The migration entry for ComputerCargoShuttle: ComputerShipyard appears twice in the file:

  1. First occurrence on line 658 (in comment)
  2. Second occurrence on line 659-660

This duplication could cause confusion during maintenance.

Remove the duplicate entry and keep only one instance:

# Computer that by idea let's you call cargo shuttle is replaced
# with console that let's you buy any shuttle.
-ComputerCargoShuttle: ComputerShipyard
CargoShuttleComputerCircuitboard: ShipyardComputerCircuitboard

Also applies to: 658-658

Comment on lines +656 to +660
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Migration requires additional prototype updates

Several prototype files still reference the old cargo shuttle computer and circuit board IDs that are being migrated:

  • Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml: Contains old computer name and board references
  • Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml: Contains old circuit board ID, name and description
  • Resources/Maps/centcomm.yml and Resources/Maps/Backmen/backmen_hive.yml: Reference old circuit board prototype
  • Resources/Prototypes/Objectives/stealTargetGroups.yml: Contains steal objectives for old cargo shuttle components

The migration file only handles the ID mapping but doesn't update the related prototype definitions. These need to be updated to maintain consistency with the new shipyard computer system.

🔗 Analysis chain

LGTM! Verify the migration's impact on gameplay.

The migration of cargo shuttle computer to shipyard console aligns with the PR objectives to enhance salvage operations. The change makes sense as it centralizes shuttle-related functionality.

Let's verify the impact of this migration:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining references to the old cargo shuttle computer
# that might need updating

# Check for any remaining references to the old computer
rg -i "cargo.*shuttle.*computer|cargo.*computer.*shuttle" --type yaml

# Check for any remaining references to the old circuit board
rg -i "cargo.*shuttle.*circuit|cargo.*circuit.*shuttle" --type yaml

Length of output: 2792

Loading