index.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. export { createEngine } from "./engine.js";
  2. export type { Engine, EngineOptions, EngineContentSourceOptions, EngineBundleSourceOptions } from "./engine.js";
  3. export { seedRandom, randomSeed } from "./random.js";
  4. export type { RandomSource, RandomState } from "./random.js";
  5. export { ContentLoader, ContentRegistry, normalize, validate } from "./content/index.js";
  6. export type { LoadItemResult, LoadReport } from "./content/index.js";
  7. export { contentBundleSchema, assetEntrySchema, assetIndexEntrySchema, bundledModSchema, assetByteSize, assetFileExtension, BUNDLE_FORMAT, BUNDLE_VERSION } from "./content/index.js";
  8. export type { ContentBundle, AssetEntry, AssetIndexEntry, BundledMod } from "./content/index.js";
  9. export { World, WorldEventBus } from "./world/index.js";
  10. export type { Entity, EntityQuery, WorldEventHandler, WorldEventAnyHandler } from "./world/index.js";
  11. export { SystemsHost, TimeSystem, InventorySystem, PlantingSystem, plotIdFor, GrowthSystem, EconomySystem, STARTING_GOLD, SaveSystem, TriggerSystem, DialogueSystem, ACTIVE_DIALOGUE_ENTITY_ID, WeatherSystem, WEATHER_ENTITY_ID, PlacementSystem, MovementSystem, UNWALKABLE_TILES, IntentSystem, CraftingSystem } from "./systems/index.js";
  12. export type {
  13. System,
  14. SystemInitCtx,
  15. TimeState,
  16. InventoryEvent,
  17. PlotEntity,
  18. CropGrowEvent,
  19. TransactionEvent,
  20. BuyResult,
  21. SellResult,
  22. PriceResult,
  23. SaveMigration,
  24. TriggerEvalCtx,
  25. TriggerFireResult,
  26. TriggerMatchResult,
  27. DialogueState,
  28. DialogueStartCtx,
  29. DialogueEntity,
  30. DialogueStartEvent,
  31. DialogueEndEvent,
  32. DialogueChoiceOption,
  33. WeatherState,
  34. WeatherRng,
  35. WeatherChangeEvent,
  36. WeatherEntity,
  37. BuildingPlacement,
  38. PlacementChangeEvent,
  39. NpcEntity,
  40. NpcMoveEvent,
  41. IntentAction,
  42. IntentResult,
  43. IntentTile,
  44. PlayerIntentEvent,
  45. AnimalEntity,
  46. AnimalGrowEvent,
  47. AnimalProduceEvent,
  48. AnimalFedEvent,
  49. EvalContext,
  50. BehaviorRuntimeCtx,
  51. CraftSuccessEvent,
  52. CraftResult,
  53. } from "./systems/index.js";
  54. export { findPath, isWalkableTile, findMapEntity } from "./systems/index.js";
  55. export type { TilePoint, MapEntity, WalkableMap } from "./systems/index.js";
  56. export { HookRegistry, ModLoader, HOOK_NAMES, isHookName, entryFileOf, readModEntry, inspectModEntry } from "./mods/index.js";
  57. export type { HookContext, HookFn, HookName, ModManifest, ModSource, ModStatus } from "./mods/index.js";
  58. export {
  59. contentSchemas,
  60. contentDirNames,
  61. isContentKind,
  62. mapSchema,
  63. mapLayerSchema,
  64. timeSchema,
  65. timeSeasonSchema,
  66. itemSchema,
  67. itemKindSchema,
  68. cropSchema,
  69. cropStageSchema,
  70. cropDropSchema,
  71. shopSchema,
  72. shopBuyLineSchema,
  73. shopSellLineSchema,
  74. triggerSchema,
  75. conditionExprSchema,
  76. actionSchema,
  77. stateMachineSchema,
  78. scheduleEntrySchema,
  79. stateDefSchema,
  80. stateTransitionSchema,
  81. machineEntityId,
  82. dialogueSchema,
  83. dialogueNodeSchema,
  84. dialogueChoiceSchema,
  85. weatherSchema,
  86. weatherSeasonSchema,
  87. weatherEntrySchema,
  88. weatherDefaultSchema,
  89. buildingSchema,
  90. buildingFootprintSchema,
  91. buildingBuildableSchema,
  92. animalSchema,
  93. animalStageSchema,
  94. animalProduceSchema,
  95. spriteSchema,
  96. spriteFrameSchema,
  97. spriteLayerSchema,
  98. spriteRectLayerSchema,
  99. spriteCircleLayerSchema,
  100. spriteImageLayerSchema,
  101. soundSchema,
  102. soundSynthSchema,
  103. interactSchema,
  104. INTERACT_ACTIONS,
  105. DEFAULT_INTERACT_ORDER,
  106. particleSchema,
  107. particleRangeSchema,
  108. shaderSchema,
  109. animationSchema,
  110. animationStateSchema,
  111. animationTransitionSchema,
  112. sceneSchema,
  113. sceneEntitySchema,
  114. sceneBuildingEntitySchema,
  115. sceneNpcEntitySchema,
  116. sceneAnimalEntitySchema,
  117. recipeSchema,
  118. SAVE_FORMAT,
  119. CURRENT_SAVE_VERSION,
  120. worldSnapshotSchema,
  121. } from "./schema/index.js";
  122. export type {
  123. ContentKind,
  124. ContentDef,
  125. MapDef,
  126. MapLayer,
  127. TimeDef,
  128. TimeSeason,
  129. ItemDef,
  130. ItemKind,
  131. CropDef,
  132. CropStage,
  133. CropDrop,
  134. ShopDef,
  135. ShopBuyLine,
  136. ShopSellLine,
  137. TriggerDef,
  138. ConditionExpr,
  139. TriggerAction,
  140. StateMachineDef,
  141. StateDef,
  142. StateTransition,
  143. ScheduleEntry,
  144. ScheduleAt,
  145. MachineEntity,
  146. MachineStatus,
  147. MachineTransitionResult,
  148. StateChangeEvent,
  149. DialogueDef,
  150. DialogueNode,
  151. DialogueChoice,
  152. WeatherDef,
  153. WeatherSeason,
  154. WeatherEntry,
  155. WeatherDefault,
  156. BuildingDef,
  157. BuildingFootprint,
  158. BuildingBuildable,
  159. AnimalDef,
  160. AnimalStage,
  161. AnimalProduce,
  162. SpriteDef,
  163. SpriteFrame,
  164. SpriteLayer,
  165. SoundDef,
  166. SoundSynth,
  167. InteractDef,
  168. InteractAction,
  169. ParticleDef,
  170. ParticleRange,
  171. ShaderDef,
  172. ShaderFilterKind,
  173. AnimationDef,
  174. AnimationState,
  175. AnimationTransition,
  176. SceneDef,
  177. SceneEntity,
  178. SceneBuildingEntity,
  179. SceneNpcEntity,
  180. SceneAnimalEntity,
  181. RecipeDef,
  182. WorldSnapshot,
  183. } from "./schema/index.js";
  184. export { createMcpGatewayHandle } from "./mcp/gateway.js";
  185. export type { McpGatewayHandle, McpNamespace } from "./mcp/gateway.js";