Files
ChronicleOfTheImmortalClan/src/renderer/game/engine/plugin-public.ts
T
thzxx c08f3c1f7f v0.1.31: 万物皆可 MOD——内容面七口 + kind 分类 + 数值松弛 + 测试 4006
【MOD 内容面总攻(七口新开:14 口全)】
- items/techniques:PACK 增量合入(extend 键级/mergeAdd 数组——内置不覆盖)
  ——新丹药武器有名字/新功法入藏书阁·掉落·拍卖
- buildings:新建筑(produceTable 表达式 DSL '4 * L' 白名单)——领地页可建可升、
  productionTick 自动消费、World/build/upgrade 走双源建筑表
- posts/aspirations/formations/traits:职事(11 效果型)/志向(5 型)/阵型(攻防系数)/
  性格(bonus 白名单集)——全部双源注册(registerXxx),卸载只摘自己的键

【MOD 类型(M5)】kind: content/data/rules 分类标签;【M6】ERA_DURA 聚合(eraDuraOf)
+ REGION_TIDE 聚合(regionTideOf)——默认零漂(金钟罩实证未红)

【测试 4006】85 套件(+1000:matrix-macro 100 + sprint-a/b/c 900 +
内容面覆盖矩阵后续)——全部语义真实;金钟罩 0.1.31 零漂(聚合默认表不变)

【验证】4006 全绿;build 通过
2026-08-23 20:53:22 +08:00

28 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 插件公共接口(第三方唯一入口面)。
* 第三方插件:`import type { CotycPlugin, PluginContext } from '.../plugin-public'`
*
* 能力范围:
* - register(phase, fn):在时轮相位注册月度钩子(clocks 红线:phase 固定,勿自创)
* - beforePhase/afterPhase(phase, fn)phase 前后锚点(0.1.24;卸载全摘)
* - onYearStart(fn):年首钩子
* - addNpcTemplate(def):注入世界生成模板(词库插件化)
* - addEventPool/removeEventPool:注入/移除事件池(池对 world.eventPools 全量聚合)
* - addCapability/removeCapability/enableCapability:能力卡(系统开关;受旺启停联动)
* - overridePack/resetPack:数据包覆写/回滚(pack() 单源)
* 纪律:插件内不得新增 w.rng.next() 消耗(会移动全局随机序列 → 金钟罩红);
* 必须消耗时必须声明并随 0.1.x 基线重算。
*/
export type { CotycPlugin, PluginHookGuard, PluginContext, PluginKind, PluginStatus, PluginChange } from './kernel/plugin'
/** 0.1.30 API 全清单(Context 方法快照):
* register / onYearStart / beforePhase / afterPhase / addCapability / removeCapability /
* enableCapability / overridePack / resetPack / addEventPool / removeEventPool /
* addNpcTemplate / addPillRecipe / addForgeRecipe / addWorldGenPool(part, source?) /
* addCalamity(name, {brief?,family?,effect?})
* 契约:install 时注册 → uninstall 自动回滚(池/帽/数据包/词库池按来源、灾因/配方精确摘除);
* source 字段对 MOD 插件溯源(exportModBundle 消费)。 */
export type { SystemHook } from './kernel/clock'
export type { SystemDef } from './runtime/capabilities'
export { registerPluginFactory } from './runtime/World'