Fix salvage magnet asteroids not spawning in ore. (#5973)

Co-authored-by: Jessica Harvey <itsjessagain23@gmail.com>
This commit is contained in:
jessiscah23 2026-07-08 18:24:45 -07:00 committed by GitHub
parent 30cfa646e4
commit bcc50db33b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 44 additions and 45 deletions

View File

@ -85,41 +85,40 @@ public sealed class SalvageMagnetBoundUserInterface : BoundUserInterface
{
case AsteroidOffering asteroid:
option.Title = Loc.GetString($"dungeon-config-proto-{asteroid.Id}");
break; // DeltaV: Skip ores since they aren't used with custom generation
// var layerKeys = asteroid.MarkerLayers.Keys.ToList();
// layerKeys.Sort();
//
// foreach (var resource in layerKeys)
// {
// var count = asteroid.MarkerLayers[resource];
//
// var container = new BoxContainer
// {
// Orientation = BoxContainer.LayoutOrientation.Horizontal,
// HorizontalExpand = true,
// };
//
// var resourceLabel = new Label
// {
// Text = Loc.GetString("salvage-magnet-resources",
// ("resource", resource)),
// HorizontalAlignment = Control.HAlignment.Left,
// };
//
// var countLabel = new Label
// {
// Text = Loc.GetString("salvage-magnet-resources-count", ("count", count)),
// HorizontalAlignment = Control.HAlignment.Right,
// HorizontalExpand = true,
// };
//
// container.AddChild(resourceLabel);
// container.AddChild(countLabel);
//
// option.AddContent(container);
// }
//
// break;
var layerKeys = asteroid.MarkerLayers.Keys.ToList();
layerKeys.Sort();
foreach (var resource in layerKeys)
{
var count = asteroid.MarkerLayers[resource];
var container = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Horizontal,
HorizontalExpand = true,
};
var resourceLabel = new Label
{
Text = Loc.GetString("salvage-magnet-resources",
("resource", resource)),
HorizontalAlignment = Control.HAlignment.Left,
};
var countLabel = new Label
{
Text = Loc.GetString("salvage-magnet-resources-count", ("count", count)),
HorizontalAlignment = Control.HAlignment.Right,
HorizontalExpand = true,
};
container.AddChild(resourceLabel);
container.AddChild(countLabel);
option.AddContent(container);
}
break;
case DebrisOffering debris:
option.Title = Loc.GetString($"salvage-magnet-debris-{debris.Id}");
break;

View File

@ -14,7 +14,7 @@
- type: oreDunGen
id: OreIron
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockTin
count: 5
minGroupSize: 5
@ -22,7 +22,7 @@
- type: oreDunGen
id: OreQuartz
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockQuartz
count: 5
minGroupSize: 5
@ -30,7 +30,7 @@
- type: oreDunGen
id: OreCoal
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockCoal
count: 3
minGroupSize: 5
@ -38,7 +38,7 @@
- type: oreDunGen
id: OreSalt
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockSalt
count: 3
minGroupSize: 5
@ -46,7 +46,7 @@
- type: oreDunGen
id: OreGold
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockGold
count: 4
minGroupSize: 5
@ -54,7 +54,7 @@
- type: oreDunGen
id: OreSilver
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockSilver
count: 4
minGroupSize: 5
@ -62,7 +62,7 @@
- type: oreDunGen
id: OrePlasma
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockPlasma
count: 4
minGroupSize: 5
@ -70,7 +70,7 @@
- type: oreDunGen
id: OreUranium
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockUranium
count: 4
minGroupSize: 5
@ -78,7 +78,7 @@
- type: oreDunGen
id: OreBananium
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockBananium
count: 6
minGroupSize: 3
@ -86,7 +86,7 @@
- type: oreDunGen
id: OreArtifactFragment
replacement: AsteroidRock
replacement: AsteroidAltRock #Delta V - Changed from AsteroidRock to AsteroidAltRock to work with our Mining Rock Spawner.
entity: AsteroidRockArtifactFragment
count: 5
minGroupSize: 1