ModernUO/Projects/UOContent/Engines/Spawners/Commands
Kamron Batman 30d1542868 refactor(spawners): import via typed polymorphic deserialization with cleanup
- Add ImportLocation/ImportMap read-only accessors to BaseSpawner.Json.cs
  exposing _jsonLocation/_jsonMap for the importer post-STJ-deserialization.
- Rewrite ImportJsonSpawners to deserialize List<BaseSpawner> directly via
  SpawnerJsonSerializer.Options (polymorphic on $type), eliminating
  DynamicJson + AssemblyHandler.FindTypeByName + CreateInstance<ISpawner>.
- Enforce cleanup contract: every deserialized spawner (registered in World
  at Map.Internal by STJ) is either MoveToWorld'd or Delete()'d — map==null/
  Internal guard Deletes, inner catch Deletes on placement failure.
- Add internal ImportFile seam for testability (from=null safe; only used in
  JsonException path which valid files never hit).
- Add ImportCleanupTests: valid placement, no-map orphan rejected, duplicate
  location replaced — all with rigorous finally cleanup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-25 11:04:01 -07:00
..
EditSpawnerCommand.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
ExportSpawnersCommand.cs refactor(spawners): export via typed SpawnerJsonSerializer 2026-06-25 10:55:21 -07:00
ImportSpawnersCommand.cs refactor(spawners): import via typed polymorphic deserialization with cleanup 2026-06-25 11:04:01 -07:00
RespawnCommand.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00
ShowSpawnerBordersCommand.cs feat: Adds new decay system and SkipSerialization (#2311) 2026-01-08 11:43:51 -08:00
SpawnPropsCommand.cs fix: Bumps deps. Updates copyrights (#2353) 2026-03-05 19:36:54 -08:00