Ship S1 fixes: refuse the retired embedded hull, one body per hull, closed validator gaps
Load reads the raw ship authoring payload and refuses a non-nil retired key 1 (the pre-S1 embedded hull) naming the old shape, so a stale hull is no longer silently ignored; ship_cc.py refuses the same file on read and therefore on every save. A hull naming both a Unity prefab and a visual is refused by one predicate (ShipAuthoringStore.RequireOneBody), called by Validate and by Compose over every hull in the derived catalog, shipped ones included; a whitespace-only Prefab is unset. This replaces the mod-ship-only "cannot name a Unity prefab" check. The validator also refuses non-finite or negative hardpoint Armor and FiringArc, an undefined HardpointType or ItemRotation, and an anchor Role outside the eight the schema documents. Load wraps MessagePack decode failures with the file path. Python replace_layout refuses non-boolean layout and hardpoint-footprint cells. Tests: exact Visual key comparison, HullData.Visual at key 32, a save refreshing stored_at, plus one case per new refusal. HullData.Visual is now [Inspectable] like Prefab (Unity editor only; not compiled here). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d1648800ab
commit
f470c1b775
9 changed files with 316 additions and 10 deletions
|
|
@ -532,7 +532,7 @@ public class HullData : EquippableItemData
|
|||
|
||||
// The hull's visual: a ShipAuthoring record holding its model package, or unset for a Unity-prefab hull. A hull
|
||||
// names exactly one of Prefab and Visual. Keys 30 and 31 are EquippableItemData's, so 32 is the next free key.
|
||||
[JsonProperty("visual"), Key(32)]
|
||||
[Inspectable, JsonProperty("visual"), Key(32)]
|
||||
public CultRecordRef<ShipAuthoring> Visual;
|
||||
|
||||
[IgnoreMember]
|
||||
|
|
|
|||
Loading…
Reference in a new issue