Commit graph

3 commits

Author SHA1 Message Date
Kamron Batman
861c7e5f4d refactor(factions): migrate Faction/Town from RunUO Parse(string) to ISpanParsable<T>
Faction and Town were never converted from RunUO's bare static Parse(string) to
IParsable/ISpanParsable, so they had only a 1-arg Parse(string) that returned null on
no-match. That made them unreachable through Server.Types' IParsable path (they fell to
Convert.ChangeType and failed) and, worse, would have let [set assign null silently on a
bad name. Both now implement ISpanParsable<T> (string + span Parse/TryParse, throw-on-
failure contract), matching Race/Poison. No external callers depended on the old
null-returning Parse.

Also documents the convention in dev-docs/runuo-migration-docs/01-foundation-changes.md
(new section 15 + checklist item): ModernUO expects any RunUO static Parse(string) to be
converted to IParsable<T>/ISpanParsable<T>. Server.Types still binds a legacy Parse(string)
by reflection as a safety net. Full suite 535/535.
2026-07-20 09:29:22 -07:00
Kamron Batman
af35c25ca2
docs: Updates CLAUDE dev-docs/skills for serialization (#2372) 2026-03-15 01:05:03 -07:00
Kamron Batman
4f9bc1d9f6
feat: Adds AI skills to migrate from RunUO (#2366)
## Summary

Adds comprehensive RunUO → ModernUO migration documentation and Claude AI skills to help shard owners and script authors convert RunUO 2.7 code to ModernUO.

- **10 migration skills** (`dev-docs/claude-skills/migrate-from-runuo/`) — system-by-system conversion guides (foundation, serialization, timers, gumps, packets, property lists, commands/events, persistence, items/mobiles, systems/engines)
- **12 reference docs** (`dev-docs/runuo-migration-docs/`) — deep-reference with before/after examples, API mapping tables, edge cases, and gotchas
- **Updated existing skills** — `modernuo-timers`, `modernuo-serialization`, and `modernuo-threading` now document that `Serialize()` runs on background threads and timers are not thread-safe
- **Updated `CLAUDE.md`** — added migration skill lookup table

### Key migration patterns covered
- Manual `Serialize()`/`Deserialize()` → source-generated `[SerializableField]`
- `Packet` class hierarchy → static `SpanWriter`/`SpanReader` methods
- `Timer` subclasses → `TimerExecutionToken` fire-and-forget
- `Gump` → `StaticGump<T>`/`DynamicGump` with builders
- `EventSink.WorldSave` → `GenericPersistence`
- `ObjectPropertyList` → `IPropertyList` with string hole rules
- Universal changes: naming (`m_` → `_`), `[Constructable]` → `[Constructible]`, logging, spatial queries
2026-03-13 00:33:45 -07:00