Skip to content

Commit

Permalink
Fixed max spawn number being excluded in the number range.
Browse files Browse the repository at this point in the history
  • Loading branch information
snaketech-tu committed Feb 14, 2024
1 parent acb5055 commit 265875a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions LCLandmineOutside/LCUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public static string GetNumberlessPlanetName(SelectableLevel selectableLevel)
return string.Empty;
}
}

public static bool IsVanillaMoon(string moonName)
{
return Enum.TryParse(typeof(VanillaMoon), moonName, true, out _);
Expand Down
2 changes: 1 addition & 1 deletion LCLandmineOutside/Patches/RoundManagerPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private static void CalculateHazardSpawn(RoundManager __instance, HazardCalculat
// This is where the ship actually lands.
Transform shipLandingTransform = shipSpawnPathPoints.Last();

int actualSpawnRate = hazardCalculationContainer.Random.Next(hazardCalculationContainer.MinSpawnRate, hazardCalculationContainer.MaxSpawnRate);
int actualSpawnRate = hazardCalculationContainer.Random.Next(hazardCalculationContainer.MinSpawnRate, hazardCalculationContainer.MaxSpawnRate + 1);
Plugin.GetLogger().LogDebug("Actual spawn rate: " + actualSpawnRate);

List<Vector3> safetyPositions = new(2);
Expand Down
2 changes: 1 addition & 1 deletion LCLandmineOutside/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ namespace LCHazardsOutside
public class Plugin : BaseUnityPlugin {
private const string modGUID = "snake.tech.LCHazardsOutside";
private const string modName = "LCHazardsOutside";
private const string modVersion = "1.1.1.0";
private const string modVersion = "1.1.2.0";

private readonly Harmony harmony = new(modGUID);

Expand Down
6 changes: 5 additions & 1 deletion LCLandmineOutside/Thunderstore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
v1.1.2
======
- Fixed max number being excluded causing no turrets to spawn by default. This closes [issue #1](https://github.com/snaketech-tu/LCHazardsOutside/issues/1).

v1.1.1
======
- Cleared up some confusion about moon name format in the config.
- Fixed issue where moon names were expected to be lowercased otherwise they would not be recognized.
- Further improved modded moon support.
- Decreased turret safety area sizes a bit.

v1.1.0
======
Expand Down Expand Up @@ -30,5 +35,4 @@ v1.0.1

v1.0.0
======

- Initial release.
2 changes: 1 addition & 1 deletion LCLandmineOutside/Thunderstore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Details
- Min/Max spawn rates per hazard.
- Min/Max spawn rates per moon per hazard.
- Global "No Extra Hazard Spawn" chance from 0-100%.
- Modded moons are supported. Keep in mind that hazard spawn points might be a bit chaotic due to different layer usages.
- Modded moons are supported. Keep in mind that hazard spawn points might be unpredictable due to modders layering their moons differently than the base game.
- Modded hazards are supported (if added to the game correctly). Successfully tested with Evaisa's teleport traps from [LethalThings](https://thunderstore.io/c/lethal-company/p/Evaisa/LethalThings/).
- "Safe" zones for turret spawns to avoid game breaking (because that's no fun).
- Fire exits should be relatively safe, although this may change in the future.
Expand Down
2 changes: 1 addition & 1 deletion LCLandmineOutside/Thunderstore/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "HazardsOutside",
"version_number": "1.1.1",
"version_number": "1.1.2",
"website_url": "https://github.com/snaketech-tu/LCHazardsOutside",
"description": "[v49] This mod allows hazards such as landmines, turrets and even modded ones to also spawn outside! Spawn rates can be configured for each hazard.",
"dependencies": [
Expand Down
Binary file removed LCLandmineOutside/Thunderstore/plugins.zip
Binary file not shown.
Binary file not shown.

0 comments on commit 265875a

Please sign in to comment.