Skip to content

Commit

Permalink
SalvageFix
Browse files Browse the repository at this point in the history
  • Loading branch information
dvir001 committed Apr 29, 2024
1 parent f009aa0 commit 5e86357
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Content.Server/Salvage/SalvageSystem.Expeditions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed partial class SalvageSystem
* Handles setup / teardown of salvage expeditions.
*/

private const int MissionLimit = 4;
private const int MissionLimit = 5;
[Dependency] private readonly StationSystem _stationSystem = default!;

private readonly JobQueue _salvageQueue = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Content.Shared.Salvage.Expeditions;

[Prototype("salvageFaction")]
public sealed partial class SalvageFactionPrototype : IPrototype
public sealed partial class SalvageFactionPrototype : IPrototype, ISalvageMod
{
[IdDataField] public string ID { get; } = default!;

Expand Down
14 changes: 6 additions & 8 deletions Content.Shared/Salvage/SharedSalvageSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ public int GetDifficulty(DifficultyRating rating)
switch (rating)
{
case DifficultyRating.Minimal:
return 1;
return 4;
case DifficultyRating.Minor:
return 2;
return 6;
case DifficultyRating.Moderate:
return 4;
case DifficultyRating.Hazardous:
return 8;
case DifficultyRating.Hazardous:
return 10;
case DifficultyRating.Extreme:
return 16;
return 12;
default:
throw new ArgumentOutOfRangeException(nameof(rating), rating, null);
}
Expand Down Expand Up @@ -100,12 +100,10 @@ public SalvageMission GetMission(SalvageMissionType config, DifficultyRating dif
// - Biome
// - Lighting
// - Atmos
var faction = GetMod<SalvageFactionPrototype>(rand, ref rating);
var biome = GetMod<SalvageBiomeMod>(rand, ref rating);
var air = GetBiomeMod<SalvageAirMod>(biome.ID, rand, ref rating);
var dungeon = GetBiomeMod<SalvageDungeonModPrototype>(biome.ID, rand, ref rating);
var factionProtos = _proto.EnumeratePrototypes<SalvageFactionPrototype>().ToList();
factionProtos.Sort((x, y) => string.Compare(x.ID, y.ID, StringComparison.Ordinal));
var faction = factionProtos[rand.Next(factionProtos.Count)];

var mods = new List<string>();

Expand Down
4 changes: 4 additions & 0 deletions Resources/Prototypes/Procedural/salvage_factions.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
- type: salvageFaction
id: Xenos
cost: 4
groups:
- entries:
- id: MobXeno
Expand Down Expand Up @@ -40,6 +41,7 @@

- type: salvageFaction
id: Carps
cost: 1
groups:
- entries:
- id: MobCarpDungeon
Expand Down Expand Up @@ -68,6 +70,7 @@
# Frontier
- type: salvageFaction
id: Syndicate
cost: 9
groups:
- entries:
- id: SpawnMobSyndicateNavalDeckhand
Expand Down Expand Up @@ -109,6 +112,7 @@

- type: salvageFaction
id: Cultists
cost: 7
groups:
- entries:
- id: SpawnMobBloodCultLeech
Expand Down
3 changes: 2 additions & 1 deletion Resources/Prototypes/Procedural/salvage_mods.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- type: salvageBiomeMod
id: Snow
biome: Snow
cost: 1 # Frontier

- type: salvageBiomeMod
id: Caves
Expand All @@ -25,7 +26,7 @@

- type: salvageBiomeMod
id: Shadow
cost: 2
# cost: 2 # Frontier
biome: Shadow

#- type: salvageBiomeMod
Expand Down

0 comments on commit 5e86357

Please sign in to comment.