Critical bugfixes (#1291)

* fix modifier duplication

* fix scrap melting
This commit is contained in:
Red
2025-05-21 00:30:16 +03:00
committed by GitHub
parent 726a078b95
commit 1d093c3919
6 changed files with 8 additions and 6 deletions

View File

@@ -236,7 +236,7 @@ public sealed partial class CP14StationDemiplaneMapSystem : CP14SharedStationDem
new Vector2(specialPos.X, specialPos.Y),
false,
locationConfig: special.Location,
modifiers: special.Modifiers
modifiers: [..special.Modifiers]
);
grid[specialPos] = specialNode;
specialPositions.Add(specialPos);

View File

@@ -29,5 +29,5 @@ public sealed partial class CP14SpecialDemiplanePrototype : IPrototype
/// Modifiers that will be automatically added to the demiplane when it is generated.
/// </summary>
[DataField]
public List<ProtoId<CP14DemiplaneModifierPrototype>>? Modifiers = new();
public List<ProtoId<CP14DemiplaneModifierPrototype>> Modifiers = new();
}

View File

@@ -75,12 +75,14 @@ public sealed partial class MaterialResource : CP14WorkbenchCraftRequirement
if (mat.Key != Material)
continue;
if (requiredCount <= 0)
return;
if (stack is null)
{
var value = (int)MathF.Min(requiredCount, mat.Value);
requiredCount -= value;
entManager.DeleteEntity(placedEntity);
continue;
}
else
{

View File

@@ -1,7 +1,7 @@
- type: cp14DemiplaneLocation
id: T1IceCaves
levels:
min: 3
min: 2
max: 7
icon:
sprite: _CP14/Interface/Misc/demiplane_locations.rsi

View File

@@ -1,7 +1,7 @@
- type: cp14DemiplaneLocation
id: T1MagmaCaves
levels:
min: 7
min: 4
max: 10
icon:
sprite: _CP14/Interface/Misc/demiplane_locations.rsi

View File

@@ -1,7 +1,7 @@
- type: cp14DemiplaneModifier
id: ArtifactRoom
levels:
min: 1
min: 3
max: 10
generationWeight: 2
categories: