You are viewing a potentially older version of this package. View all versions.
Solon-DestroyedMoons-1.0.8 icon

DestroyedMoons

Moons hit by a FacilityMeltdown nuclear explosion become permanently unvisitable for that save file.

Date uploaded 11 hours ago
Version 1.0.8
Download link Solon-DestroyedMoons-1.0.8.zip
Downloads 12
Dependency string Solon-DestroyedMoons-1.0.8

This mod requires the following mods to function

BepInEx-BepInExPack-5.4.2100 icon
BepInEx-BepInExPack

BepInEx pack for Mono Unity games. Preconfigured and ready to use.

Preferred version: 5.4.2100
loaforc-FacilityMeltdown-2.7.5 icon
loaforc-FacilityMeltdown

Maybe taking the apparatus out isn't such a great idea...

Preferred version: 2.7.5

README

DestroyedMoons

Author: Solo00n

An addon for FacilityMeltdown. When a moon is destroyed by a nuclear meltdown, that moon becomes permanently unvisitable for the current save file. You can no longer route there through the terminal or the ship lever. The block survives between sessions and is stored inside the save itself, so deleting the save also clears it.

Features

  • Permanently blocks a moon for the current save after a FacilityMeltdown nuclear explosion.
  • Stops routing to a destroyed moon from both the terminal and the ship lever.
  • Strikes a line through destroyed moon names in the terminal moons list.
  • Buy back a destroyed moon for credits, with a dedicated section on the terminal HELP page.
  • Automatically clears the list once every routable moon is destroyed, so you are never stranded.
  • Works with vanilla and modded moons.

Multiplayer

The host is authoritative. Only the host detects a meltdown, records the destroyed moon and saves it, then syncs the list to every client so their terminals and levers also refuse the route. Buyback is decided on the host and synced to everyone.

Requirements

  • BepInEx
  • FacilityMeltdown (by loaforc)

Terminal commands

  • moonstatus — list the destroyed moons.
  • buyback — show the buyback list and price.
  • buyback [moon name] — restore a destroyed moon for 500 credits (configurable).

Configuration

Section Setting Default What it does
General Enabled true Master on/off switch.
General AutoResetWhenAllBlocked true Clear the list once every routable moon is destroyed.
General BlockOnMeltdownStart true Block the moon the moment a meltdown starts.
Buyback EnableMoonBuyback true Allow paying to restore a destroyed moon.
Buyback MoonBuybackPrice 500 Credit cost to restore one moon.
Visuals StrikethroughBlockedMoons true Strike through destroyed moon names in the terminal.
Lists ManualBlacklist (empty) Moons that are always blocked.
Lists Whitelist (empty) Moons that are never blocked.
Compatibility FilterRandomMoonFXPool true Remove destroyed moons from the RandomMoonFX random pool.
Maintenance ResetBlockedListOnNextLoad false One-shot clear of the stored list.

Compatibility

  • FacilityMeltdown (required) — provides the meltdown and explosion that trigger the block.
  • RandomMoonFX (optional) — destroyed moons are excluded from the random lever pool, with a built-in anti-hang guard.
  • Meltdown_Chance (optional) — blocking only happens when a meltdown really occurs.
  • LethalLevelLoader (optional) — vanilla and custom moons supported.

Credits

  • Solo00n — author.
  • Built with BepInEx and HarmonyX.

Русский

Аддон для FacilityMeltdown. Когда луну уничтожает ядерный взрыв, она навсегда становится недоступной в текущем сохранении — на неё нельзя прилететь ни через терминал, ни через рычаг. Блокировка сохраняется между сессиями и хранится внутри самого сейва, поэтому удаление сейва её очищает.

Возможности

  • Навсегда блокирует луну в текущем сохранении после ядерного взрыва FacilityMeltdown.
  • Запрещает маршрут на уничтоженную луну через терминал и через рычаг корабля.
  • Перечёркивает названия уничтоженных лун в списке лун в терминале.
  • Выкуп уничтоженной луны за кредиты, с отдельным разделом на странице HELP в терминале.
  • Автоматически очищает список, когда уничтожены все доступные луны.
  • Поддерживает ванильные и модовые луны.

Мультиплеер

Решение принимает хост. Только хост определяет meltdown, записывает уничтоженную луну и сохраняет её, а затем рассылает список всем клиентам, чтобы их терминалы и рычаги тоже отказывали в маршруте. Выкуп решается на хосте и синхронизируется со всеми.

Зависимости

  • BepInEx
  • FacilityMeltdown (от loaforc)

Команды терминала

  • moonstatus — показать список уничтоженных лун.
  • buyback — показать список для выкупа и цену.
  • buyback [название] — восстановить уничтоженную луну за 500 кредитов (настраивается).

Changelog

1.0.8

  • Fixed stale blocked lists surviving across save deletion. The save data is now the single source of truth, and deleting a save clears its destroyed-moon list.

1.0.7

  • Fixed a freeze when pulling the ship lever with many destroyed moons. Added an anti-hang guard, a routing safety net, and a config toggle to disable the random-pool filtering if needed.

1.0.6

  • Performance and stability hardening; cached checks and safer strikethrough.

1.0.5

  • Added crash safety so the moon pool can never be fully emptied, and the moon buyback system.

1.0.4

  • Auto-reset the list when every moon is destroyed.

1.0.3

  • Kept only the moonstatus command; more robust strikethrough in the moons list.

1.0.2

  • Fixed the save list not loading; added reliable meltdown-start detection and terminal strikethrough.

1.0.1

  • Fixed the meltdown auto-detection crash and dependency detection.

1.0.0

  • Initial release.

CHANGELOG

Changelog

1.0.8

  • Fixed stale/incorrect blocked lists surviving across save deletion. The ES3 data (stored inside the save file) is now the single source of truth on load; the JSON mirror in BepInEx/config is no longer read back as a fallback (that could "resurrect" an old list into a freshly recreated save slot). The mirror stays for inspection/export only.
  • Clears our data when a save is deleted — hooked ES3.DeleteFile, so deleting a save removes the corresponding blocked list (JSON mirror + in-memory). ES3 data goes with the deleted save file.
  • On loading a fresh save (no ES3 data), any orphaned JSON mirror for that slot is cleaned up.
  • The one-shot ResetBlockedListOnNextLoad now also deletes the JSON mirror.

1.0.7

  • Fixes a freeze/crash when pulling the ship lever with many destroyed moons. With enough moons blocked, RandomMoonFX could be left with no selectable moon and spin in a re-roll loop (game freeze) or throw on an empty pool. Added:
    • A re-roll-storm guard: if RandomMoonFX hammers our filter far more than any real moon count (i.e. it's stuck), we stop blocking and briefly allow routing so its selection always terminates.
    • A safety-net finalizer on RandomMoonFX's routing methods that swallows any exception instead of letting it crash the game.
    • New config Compatibility/FilterRandomMoonFXPool (default on) to fully disable the random-pool filtering if ever needed — destroyed moons stay blocked by the terminal/level-change guard.

1.0.6

  • Performance/stability hardening. The routing / RandomMoonFX "all-blocked" fail-safe check is now cached (recomputed only when the blocked list, config lists or moon count change) instead of scanning every moon and re-parsing config on each call — removes per-call allocation/GC pressure.
  • Parsed whitelist/blacklist are cached too.
  • Strikethrough now skips any text that already contains a <s> tag, eliminating any possibility of compounding/nesting rich-text tags.

1.0.5

  • Crash safety: our filters can never leave zero moons available. When every routable (non-Company) moon is blocked, blocking is ignored for ROUTING purposes, so RandomMoonFX's random pool can never be emptied by us (an empty pool could crash on selection). Combined with the existing auto-reset, you can always fly somewhere.
  • Every game-facing patch is now wrapped in try/catch (RandomMoonFX filter, terminal routing, level-change guard, strikethrough, commands) so an internal error degrades gracefully instead of crashing the game.
  • New: Moon buyback. Pay to restore a destroyed moon from the terminal.
    • Config Buyback/EnableMoonBuyback (on) and Buyback/MoonBuybackPrice (default 500).
    • A MOON BUYBACK section is appended to the terminal HELP page once any moon has been destroyed.
    • Commands: BUYBACK (list + prices) and BUYBACK [moon name] (purchase). Credits are charged via the game's own credit sync; restoring is host-authoritative and synced to clients.

1.0.4

  • Auto-reset when everything is destroyed. Once every routable (non-Company) moon has been blocked, the destroyed-moon list clears itself automatically so the moons become available again and you are never left with nowhere to go. Toggle with General/AutoResetWhenAllBlocked. The Company building (Gordion) is excluded from the count since it can't melt down.

1.0.3

  • Removed the destroymoon and restoremoons terminal commands. Only moonstatus remains (lists destroyed moons, now with proper names like "20 Adamance").
  • Strikethrough in the terminal is now more robust: matches the moon name case-insensitively and tries both the full name ("20 Adamance") and the numberless name ("Adamance"), so it reliably strikes exploded moons in the >MOONS list regardless of how the list is formatted.

1.0.2

  • Fixed the save-list lifecycle patches never applying. They used method-level Harmony attributes with no class-level [HarmonyPatch], which HarmonyX's PatchAll skips — so the destroyed-moon list was never loaded on game start (a moon blocked in one session was not restored in the next) and multiplayer sync never registered. Split into properly attributed classes with diagnostic logging (StartOfRound.Start — IsHost=...).
  • Meltdown detection now also hooks the meltdown START (MeltdownHandler.StartMeltdownClientRpc), not just the final fireball. A started FacilityMeltdown always explodes, so this reliably catches meltdowns even when the crew leaves before the blast. Configurable via General/BlockOnMeltdownStart.
  • Detonation handler now logs unconditionally (Meltdown signal received. moon=..., IsHost=...), de-dupes, and ensure-loads the list before blocking so it can never overwrite saved data.
  • New: destroyed moons are struck through in the terminal (e.g. the >MOONS list) via a strikethrough line. Toggle with Visuals/StrikethroughBlockedMoons.

1.0.1

  • Fixed a crash in the FacilityMeltdown detonation auto-detector that aborted mod init when an uninstalled soft-dependency (e.g. me.loaforc.diomedes) was referenced by a scanned method. Method scanning is now fully crash-proof and each integration is isolated.
  • Meltdown detection now targets the real explosion directly: FacilityMeltdown.MeltdownSequence.Behaviours.FacilityExplosionHandler.Awake (verified against FacilityMeltdown 2.7.5), with the public MeltdownAPI as a fallback.
  • RandomMoonFX integration now Harmony-patches RandomMoonFX.Utils.IsMoonBlacklisted / IsMoonValid (verified against 1.4.3) instead of poking a field, so destroyed moons are reliably excluded from the random lever pool.
  • Soft-dependency presence checks are now case-insensitive (fixes RandomMoonFX zigzag.randommoonfx and Meltdown_Chance den.meltdownchance not being detected).

1.0.0

  • Initial release.
  • Permanently blocks a moon (per save file) after a FacilityMeltdown detonation.
  • Terminal and lever routing both blocked; authoritative check on the host.
  • RandomMoonFX blacklist integration.
  • Meltdown_Chance-safe (only blocks on real detonations).
  • Vanilla + LethalLevelLoader moon support.
  • Multiplayer host-authoritative sync via Netcode named messages.
  • Persistent storage in the game save (ES3) with a JSON mirror.
  • Diagnostic terminal commands: moonstatus, destroymoon, restoremoons.