anonymize salvage wrecks (#31087)

* anonymize salvage wrecks

* display wreck size
This commit is contained in:
Nemanja
2024-08-17 01:09:21 -04:00
committed by GitHub
parent 1e7fb2f4d8
commit 8440fb6acb
4 changed files with 72 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
using System.Linq; using System.Linq;
using Content.Client.Message;
using Content.Shared.Salvage; using Content.Shared.Salvage;
using Content.Shared.Salvage.Magnet; using Content.Shared.Salvage.Magnet;
using Robust.Client.UserInterface; using Robust.Client.UserInterface;
@@ -99,7 +100,31 @@ public sealed class SalvageMagnetBoundUserInterface : BoundUserInterface
break; break;
case SalvageOffering salvage: case SalvageOffering salvage:
option.Title = Loc.GetString($"salvage-map-proto-{salvage.SalvageMap.ID}"); option.Title = Loc.GetString($"salvage-map-wreck");
var salvContainer = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
HorizontalExpand = true,
};
var sizeLabel = new Label
{
Text = Loc.GetString("salvage-map-wreck-desc-size"),
HorizontalAlignment = Control.HAlignment.Left,
};
var sizeValueLabel = new RichTextLabel
{
HorizontalAlignment = Control.HAlignment.Right,
HorizontalExpand = true,
};
sizeValueLabel.SetMarkup(Loc.GetString(salvage.SalvageMap.SizeString));
salvContainer.AddChild(sizeLabel);
salvContainer.AddChild(sizeValueLabel);
option.AddContent(salvContainer);
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();

View File

@@ -12,4 +12,10 @@ public sealed partial class SalvageMapPrototype : IPrototype
/// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml` /// Relative directory path to the given map, i.e. `Maps/Salvage/template.yml`
/// </summary> /// </summary>
[DataField(required: true)] public ResPath MapPath; [DataField(required: true)] public ResPath MapPath;
/// <summary>
/// String that describes the size of the map.
/// </summary>
[DataField(required: true)]
public LocId SizeString;
} }

View File

@@ -38,39 +38,8 @@ dungeon-config-proto-SpindlyAsteroid = Asteroid spiral
dungeon-config-proto-SwissCheeseAsteroid = Asteroid fragments dungeon-config-proto-SwissCheeseAsteroid = Asteroid fragments
# Wrecks # Wrecks
salvage-map-proto-Small1 = Engineering Storage salvage-map-wreck = Salvage wreck
salvage-map-proto-Small2 = Gaming Nook salvage-map-wreck-desc-size = Size:
salvage-map-proto-Small3 = Laundromat salvage-map-wreck-size-small = [color=lime]Small[/color]
salvage-map-proto-Small4 = Bar Salvage salvage-map-wreck-size-medium = [color=cornflowerblue]Medium[/color]
salvage-map-proto-SmallShip1 = Pill salvage-map-wreck-size-large = [color=orchid]Large[/color]
salvage-map-proto-SmallAISurveyDrone = AI Survey Drone
salvage-map-proto-SmallCargo = Mining Pod
salvage-map-proto-SmallChapel = Chapel
salvage-map-proto-SmallChef = Restaurant
salvage-map-proto-SmallParty = Birthday Party
salvage-map-proto-SmallSyndicate = Ruined Syndicate Ship
salvage-map-proto-SmallTesla = Tesla Containment
salvage-map-proto-SmallA1 = Asteroid Plasmafire
salvage-map-proto-Medium1 = Plasma-Trapped Cache
salvage-map-proto-MediumVault1 = Vault
salvage-map-proto-MediumOrchestra = Silent Orchestra
salvage-map-proto-MediumLibraryWreck = Abandoned Library
salvage-map-proto-MediumCargoWreck = Cargo Department Wreck
salvage-map-proto-MediumPirateWreck = Pirate Barge Fragment
salvage-map-proto-MediumHaulingShuttleWreck = Ruined Hauling Ship
salvage-map-proto-TickColony = Space Tick colony
salvage-map-proto-CargoDock = Asteroid Cargo Dock
salvage-map-proto-SpaceWaffleHome = Waffle Home
salvage-map-proto-MediumShuttleWreck = Ruined Emergency Shuttle
salvage-map-proto-MediumPetHospital = Pet and Bear Hospital
salvage-map-proto-MediumCrashedShuttle = Crashed Shuttle
salvage-map-proto-Meatball = Meatball
salvage-map-proto-VeganMeatball = Vegan Meatball
salvage-map-proto-StationStation = Station station
salvage-map-proto-AsteroidBase = Asteroid Base
salvage-map-proto-RuinCargoBase = Ruined Cargo Storage
salvage-map-proto-SecurityChunk = Security Department Chunk
salvage-map-proto-EngineeringChunk = Engineering Department Chunk
salvage-map-proto-OutpostArm = Overrun Outpost Arm

View File

@@ -5,141 +5,175 @@
- type: salvageMap - type: salvageMap
id: Small1 id: Small1
mapPath: /Maps/Salvage/small-1.yml mapPath: /Maps/Salvage/small-1.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: Small2 id: Small2
mapPath: /Maps/Salvage/small-2.yml mapPath: /Maps/Salvage/small-2.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallShip1 id: SmallShip1
mapPath: /Maps/Salvage/small-ship-1.yml mapPath: /Maps/Salvage/small-ship-1.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: Small3 id: Small3
mapPath: /Maps/Salvage/small-3.yml mapPath: /Maps/Salvage/small-3.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallAISurveyDrone id: SmallAISurveyDrone
mapPath: /Maps/Salvage/small-ai-survey-drone.yml mapPath: /Maps/Salvage/small-ai-survey-drone.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: Small4 id: Small4
mapPath: /Maps/Salvage/small-4.yml mapPath: /Maps/Salvage/small-4.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallCargo id: SmallCargo
mapPath: /Maps/Salvage/small-cargo.yml mapPath: /Maps/Salvage/small-cargo.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallChapel id: SmallChapel
mapPath: /Maps/Salvage/small-chapel.yml mapPath: /Maps/Salvage/small-chapel.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallChef id: SmallChef
mapPath: /Maps/Salvage/small-chef.yml mapPath: /Maps/Salvage/small-chef.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallParty id: SmallParty
mapPath: /Maps/Salvage/small-party.yml mapPath: /Maps/Salvage/small-party.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallSyndicate id: SmallSyndicate
mapPath: /Maps/Salvage/small-syndicate.yml mapPath: /Maps/Salvage/small-syndicate.yml
sizeString: salvage-map-wreck-size-small
- type: salvageMap - type: salvageMap
id: SmallTesla id: SmallTesla
mapPath: /Maps/Salvage/small-tesla.yml mapPath: /Maps/Salvage/small-tesla.yml
sizeString: salvage-map-wreck-size-small
# Small - Asteroids # Small - Asteroids
- type: salvageMap - type: salvageMap
id: SmallA1 id: SmallA1
mapPath: /Maps/Salvage/small-a-1.yml mapPath: /Maps/Salvage/small-a-1.yml
sizeString: salvage-map-wreck-size-small
# "Medium"-class maps - Max size square: 15x15, indicated size: 7.5 # "Medium"-class maps - Max size square: 15x15, indicated size: 7.5
- type: salvageMap - type: salvageMap
id: Medium1 id: Medium1
mapPath: /Maps/Salvage/medium-1.yml mapPath: /Maps/Salvage/medium-1.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumVault1 id: MediumVault1
mapPath: /Maps/Salvage/medium-vault-1.yml mapPath: /Maps/Salvage/medium-vault-1.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumOrchestra id: MediumOrchestra
mapPath: /Maps/Salvage/medium-silent-orchestra.yml mapPath: /Maps/Salvage/medium-silent-orchestra.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumLibraryWreck id: MediumLibraryWreck
mapPath: /Maps/Salvage/medium-library.yml mapPath: /Maps/Salvage/medium-library.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumCargoWreck id: MediumCargoWreck
mapPath: /Maps/Salvage/cargo-1.yml mapPath: /Maps/Salvage/cargo-1.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumPirateWreck id: MediumPirateWreck
mapPath: /Maps/Salvage/medium-pirate.yml mapPath: /Maps/Salvage/medium-pirate.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: TickColony id: TickColony
mapPath: /Maps/Salvage/tick-colony.yml mapPath: /Maps/Salvage/tick-colony.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: CargoDock id: CargoDock
mapPath: /Maps/Salvage/medium-dock.yml mapPath: /Maps/Salvage/medium-dock.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: SpaceWaffleHome id: SpaceWaffleHome
sizeString: salvage-map-wreck-size-medium
mapPath: /Maps/Salvage/wh-salvage.yml mapPath: /Maps/Salvage/wh-salvage.yml
- type: salvageMap - type: salvageMap
id: MediumShuttleWreck id: MediumShuttleWreck
mapPath: /Maps/Salvage/medium-ruined-emergency-shuttle.yml mapPath: /Maps/Salvage/medium-ruined-emergency-shuttle.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumPetHospital id: MediumPetHospital
mapPath: /Maps/Salvage/medium-pet-hospital.yml mapPath: /Maps/Salvage/medium-pet-hospital.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumCrashedShuttle id: MediumCrashedShuttle
mapPath: /Maps/Salvage/medium-crashed-shuttle.yml mapPath: /Maps/Salvage/medium-crashed-shuttle.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: Meatball id: Meatball
mapPath: /Maps/Salvage/meatball.yml mapPath: /Maps/Salvage/meatball.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: VeganMeatball id: VeganMeatball
mapPath: /Maps/Salvage/vegan-meatball.yml mapPath: /Maps/Salvage/vegan-meatball.yml
sizeString: salvage-map-wreck-size-medium
- type: salvageMap - type: salvageMap
id: MediumHaulingShuttleWreck id: MediumHaulingShuttleWreck
mapPath: /Maps/Salvage/hauling-shuttle.yml mapPath: /Maps/Salvage/hauling-shuttle.yml
sizeString: salvage-map-wreck-size-medium
# """Large""" maps # """Large""" maps
- type: salvageMap - type: salvageMap
id: StationStation id: StationStation
mapPath: /Maps/Salvage/stationstation.yml mapPath: /Maps/Salvage/stationstation.yml
sizeString: salvage-map-wreck-size-large
- type: salvageMap - type: salvageMap
id: AsteroidBase id: AsteroidBase
mapPath: /Maps/Salvage/asteroid-base.yml mapPath: /Maps/Salvage/asteroid-base.yml
sizeString: salvage-map-wreck-size-large
- type: salvageMap - type: salvageMap
id: RuinCargoBase id: RuinCargoBase
mapPath: /Maps/Salvage/ruin-cargo-salvage.yml mapPath: /Maps/Salvage/ruin-cargo-salvage.yml
sizeString: salvage-map-wreck-size-large
- type: salvageMap - type: salvageMap
id: SecurityChunk id: SecurityChunk
mapPath: /Maps/Salvage/security-chunk.yml mapPath: /Maps/Salvage/security-chunk.yml
sizeString: salvage-map-wreck-size-large
- type: salvageMap - type: salvageMap
id: EngineeringChunk id: EngineeringChunk
mapPath: /Maps/Salvage/engineering-chunk.yml mapPath: /Maps/Salvage/engineering-chunk.yml
sizeString: salvage-map-wreck-size-large
- type: salvageMap - type: salvageMap
id: OutpostArm id: OutpostArm
mapPath: /Maps/Salvage/outpost-arm.yml mapPath: /Maps/Salvage/outpost-arm.yml
sizeString: salvage-map-wreck-size-large