@wildshard/shard-format 0.47.1 → 0.47.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildshard/shard-format",
|
|
3
|
-
"version": "0.47.
|
|
3
|
+
"version": "0.47.2",
|
|
4
4
|
"description": "The raw shardfile format: the spec, the validator and a validate CLI. The public, versioned contract every other repo builds on.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -21,8 +21,9 @@ export function clientOwnershipRules(source: Shardfile, sections: ReadonlyMap<st
|
|
|
21
21
|
|| !source.questNpcs?.some(row => !('kind' in row) && row.npc.id === quest.rows.npc)) errors.push('Data page requires its original declared quest and NPC');
|
|
22
22
|
if (held?.kind !== 'held.melee' || source.items.loadout.primary !== held.item || source.items.loadout.secondary !== null
|
|
23
23
|
|| source.items.loadout.tools.length > 0 || !source.items.rows.some(row => row.kind === 'weapon' && row.id === held.item)) errors.push('Data page requires its one admitted held primary');
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// ONE-FORMAT OF19b0/OF19c0: declared spawns, their species and encounters run beside the plan's keeper (the engine
|
|
25
|
+
// refuses a body both own); declared crowds do not
|
|
26
|
+
if (source.crowds.length > 0) errors.push('Data page native roster cannot also install declared crowds');
|
|
26
27
|
for (const name of ['world/scenes', 'world/targets', 'actors/species-programs', 'sim/runtime-plan', 'sim/scripts', 'look/painted'])
|
|
27
28
|
if (!sections.has(name)) errors.push(`Data page requires ${name}`);
|
|
28
29
|
const channels = new Set(source.clientChannels?.map(row => row.id));
|
|
@@ -38,7 +39,9 @@ export function clientOwnershipRules(source: Shardfile, sections: ReadonlyMap<st
|
|
|
38
39
|
const expected = owner === undefined ? [] : [owner];
|
|
39
40
|
if (bosses.length !== expected.length || bosses.some(row => row.actor !== owner?.actor || (row.kind === 'boss.held') !== (owner.profile.pattern === 'held')))
|
|
40
41
|
errors.push('Data page requires its actual native encounter pattern');
|
|
42
|
+
// A declared spawn is a body the quest may name too
|
|
41
43
|
const actors = new Set(nativeRuntimeActorIds(plan));
|
|
44
|
+
for (const spawn of source.creatures.spawns) { actors.add(spawn.id); }
|
|
42
45
|
if (source.questHost?.actors.ids.some(id => !actors.has(id))) errors.push('Data page quest requires actual native actors');
|
|
43
46
|
}
|
|
44
47
|
return errors;
|