@nice2dev/game-engine 1.3.13 → 1.3.14
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/CHANGELOG.md +4 -0
- package/package.json +2 -2
- package/dist/types/accessibility/index.d.ts +0 -1
- package/dist/types/ai/index.d.ts +0 -1
- package/dist/types/animation/index.d.ts +0 -1
- package/dist/types/audio/HRTFAudio.d.ts +0 -180
- package/dist/types/audio/index.d.ts +0 -2
- package/dist/types/community/Community.d.ts +0 -112
- package/dist/types/community/index.d.ts +0 -1
- package/dist/types/core/TypeSafety.d.ts +0 -190
- package/dist/types/core/index.d.ts +0 -7
- package/dist/types/devtools/AssetStore.d.ts +0 -133
- package/dist/types/devtools/index.d.ts +0 -3
- package/dist/types/dialogue/index.d.ts +0 -2
- package/dist/types/docs/APIPlayground.d.ts +0 -26
- package/dist/types/docs/Cookbook.d.ts +0 -18
- package/dist/types/docs/Guides.d.ts +0 -18
- package/dist/types/docs/index.d.ts +0 -4
- package/dist/types/ecs/ECSOptimized.d.ts +0 -131
- package/dist/types/ecs/index.d.ts +0 -2
- package/dist/types/editor/NiceAnimationTimeline.d.ts +0 -114
- package/dist/types/editor/NiceLevelEditor.d.ts +0 -232
- package/dist/types/editor/NiceMaterialEditor.d.ts +0 -105
- package/dist/types/editor/NiceNodeGraph.d.ts +0 -87
- package/dist/types/editor/NiceParticleEditor.d.ts +0 -127
- package/dist/types/editor/behavior-tree/BTDebugPanel.d.ts +0 -102
- package/dist/types/editor/behavior-tree/BTEditorCanvas.d.ts +0 -79
- package/dist/types/editor/behavior-tree/BTEditorNode.d.ts +0 -58
- package/dist/types/editor/behavior-tree/BTEditorToolbar.d.ts +0 -75
- package/dist/types/editor/behavior-tree/BTNodePalette.d.ts +0 -72
- package/dist/types/editor/behavior-tree/BTPropertyPanel.d.ts +0 -66
- package/dist/types/editor/behavior-tree/BehaviorTreeEditor.d.ts +0 -186
- package/dist/types/editor/behavior-tree/index.d.ts +0 -14
- package/dist/types/editor/behavior-tree/serialization.d.ts +0 -30
- package/dist/types/editor/behavior-tree/types.d.ts +0 -299
- package/dist/types/editor/index.d.ts +0 -20
- package/dist/types/editor/state-machine/SMEditorCanvas.d.ts +0 -61
- package/dist/types/editor/state-machine/StateMachineEditor.d.ts +0 -139
- package/dist/types/editor/state-machine/index.d.ts +0 -11
- package/dist/types/editor/state-machine/serialization.d.ts +0 -23
- package/dist/types/editor/state-machine/types.d.ts +0 -241
- package/dist/types/engine/index.d.ts +0 -2
- package/dist/types/enterprise/index.d.ts +0 -1
- package/dist/types/epic/index.d.ts +0 -10
- package/dist/types/i18n/index.d.ts +0 -2
- package/dist/types/input/index.d.ts +0 -3
- package/dist/types/kids/index.d.ts +0 -2
- package/dist/types/legendary/index.d.ts +0 -57
- package/dist/types/monetization/index.d.ts +0 -1
- package/dist/types/multiplayer/NiceNetcode.d.ts +0 -434
- package/dist/types/multiplayer/index.d.ts +0 -5
- package/dist/types/network/index.d.ts +0 -2
- package/dist/types/pathfinding/index.d.ts +0 -1
- package/dist/types/performance/AssetCompression.d.ts +0 -137
- package/dist/types/performance/WASMModules.d.ts +0 -65
- package/dist/types/performance/WebGPUCompute.d.ts +0 -71
- package/dist/types/performance/index.d.ts +0 -1
- package/dist/types/physics/RapierIntegration.d.ts +0 -404
- package/dist/types/physics/index.d.ts +0 -2
- package/dist/types/plugins/index.d.ts +0 -2
- package/dist/types/procedural/index.d.ts +0 -2
- package/dist/types/release/index.d.ts +0 -1
- package/dist/types/rendering/WebGPUv2.d.ts +0 -173
- package/dist/types/rendering/index.d.ts +0 -3
- package/dist/types/runtime3d/index.d.ts +0 -2
- package/dist/types/scene/index.d.ts +0 -2
- package/dist/types/scripting/WasmCompiler.d.ts +0 -182
- package/dist/types/scripting/index.d.ts +0 -19
- package/dist/types/social/index.d.ts +0 -1
- package/dist/types/systems/NiceAI.d.ts +0 -637
- package/dist/types/systems/NiceAbility.d.ts +0 -225
- package/dist/types/systems/NiceAccessibility.d.ts +0 -230
- package/dist/types/systems/NiceAchievement.d.ts +0 -153
- package/dist/types/systems/NiceAchievementUI.d.ts +0 -196
- package/dist/types/systems/NiceAchievements.d.ts +0 -230
- package/dist/types/systems/NiceAction.d.ts +0 -81
- package/dist/types/systems/NiceAlchemy.d.ts +0 -195
- package/dist/types/systems/NiceAnalytics.d.ts +0 -493
- package/dist/types/systems/NiceAnimation.d.ts +0 -350
- package/dist/types/systems/NiceArena.d.ts +0 -215
- package/dist/types/systems/NiceAssetLoader.d.ts +0 -136
- package/dist/types/systems/NiceAuction.d.ts +0 -157
- package/dist/types/systems/NiceAudio.d.ts +0 -224
- package/dist/types/systems/NiceAugment.d.ts +0 -187
- package/dist/types/systems/NiceAura.d.ts +0 -193
- package/dist/types/systems/NiceBank.d.ts +0 -158
- package/dist/types/systems/NiceBattlePass.d.ts +0 -150
- package/dist/types/systems/NiceBehavior.d.ts +0 -160
- package/dist/types/systems/NiceBinding.d.ts +0 -96
- package/dist/types/systems/NiceBlacksmith.d.ts +0 -221
- package/dist/types/systems/NiceBuff.d.ts +0 -177
- package/dist/types/systems/NiceBuilding.d.ts +0 -207
- package/dist/types/systems/NiceBullet.d.ts +0 -167
- package/dist/types/systems/NiceCamera.d.ts +0 -252
- package/dist/types/systems/NiceCard.d.ts +0 -171
- package/dist/types/systems/NiceChat.d.ts +0 -148
- package/dist/types/systems/NiceCheat.d.ts +0 -375
- package/dist/types/systems/NiceClimbing.d.ts +0 -186
- package/dist/types/systems/NiceCloud.d.ts +0 -422
- package/dist/types/systems/NiceCollision.d.ts +0 -238
- package/dist/types/systems/NiceCombo.d.ts +0 -131
- package/dist/types/systems/NiceCommand.d.ts +0 -112
- package/dist/types/systems/NiceCompanion.d.ts +0 -182
- package/dist/types/systems/NiceController.d.ts +0 -144
- package/dist/types/systems/NiceCooking.d.ts +0 -193
- package/dist/types/systems/NiceCoroutine.d.ts +0 -101
- package/dist/types/systems/NiceCrafting.d.ts +0 -228
- package/dist/types/systems/NiceCutscene.d.ts +0 -437
- package/dist/types/systems/NiceDaily.d.ts +0 -133
- package/dist/types/systems/NiceDamage.d.ts +0 -271
- package/dist/types/systems/NiceDayNight.d.ts +0 -126
- package/dist/types/systems/NiceDebug.d.ts +0 -255
- package/dist/types/systems/NiceDestructible.d.ts +0 -150
- package/dist/types/systems/NiceDialogue.d.ts +0 -629
- package/dist/types/systems/NiceDungeon.d.ts +0 -202
- package/dist/types/systems/NiceECS.d.ts +0 -151
- package/dist/types/systems/NiceEnchant.d.ts +0 -148
- package/dist/types/systems/NiceEntityPool.d.ts +0 -127
- package/dist/types/systems/NiceEquipment.d.ts +0 -137
- package/dist/types/systems/NiceEvent.d.ts +0 -202
- package/dist/types/systems/NiceEventBus.d.ts +0 -164
- package/dist/types/systems/NiceFaction.d.ts +0 -173
- package/dist/types/systems/NiceFarming.d.ts +0 -163
- package/dist/types/systems/NiceFishing.d.ts +0 -196
- package/dist/types/systems/NiceFlocking.d.ts +0 -156
- package/dist/types/systems/NiceFog.d.ts +0 -137
- package/dist/types/systems/NiceFormation.d.ts +0 -140
- package/dist/types/systems/NiceGacha.d.ts +0 -134
- package/dist/types/systems/NiceGambling.d.ts +0 -175
- package/dist/types/systems/NiceGem.d.ts +0 -165
- package/dist/types/systems/NiceGesture.d.ts +0 -502
- package/dist/types/systems/NiceGrappling.d.ts +0 -154
- package/dist/types/systems/NiceGrid.d.ts +0 -142
- package/dist/types/systems/NiceGuild.d.ts +0 -162
- package/dist/types/systems/NiceHaptics.d.ts +0 -112
- package/dist/types/systems/NiceHousing.d.ts +0 -197
- package/dist/types/systems/NiceInput.d.ts +0 -280
- package/dist/types/systems/NiceInventory.d.ts +0 -534
- package/dist/types/systems/NiceLOD.d.ts +0 -144
- package/dist/types/systems/NiceLeaderboard.d.ts +0 -191
- package/dist/types/systems/NiceLevel.d.ts +0 -304
- package/dist/types/systems/NiceLighting.d.ts +0 -214
- package/dist/types/systems/NiceLocalization.d.ts +0 -148
- package/dist/types/systems/NiceLocomotion.d.ts +0 -398
- package/dist/types/systems/NiceLogger.d.ts +0 -117
- package/dist/types/systems/NiceLoot.d.ts +0 -176
- package/dist/types/systems/NiceMail.d.ts +0 -164
- package/dist/types/systems/NiceMap.d.ts +0 -234
- package/dist/types/systems/NiceMarriage.d.ts +0 -150
- package/dist/types/systems/NiceMastery.d.ts +0 -171
- package/dist/types/systems/NiceMatch.d.ts +0 -196
- package/dist/types/systems/NiceMatch3.d.ts +0 -118
- package/dist/types/systems/NiceMessageBus.d.ts +0 -115
- package/dist/types/systems/NiceMinimap.d.ts +0 -258
- package/dist/types/systems/NiceMining.d.ts +0 -175
- package/dist/types/systems/NiceModding.d.ts +0 -452
- package/dist/types/systems/NiceMount.d.ts +0 -152
- package/dist/types/systems/NiceNavigation.d.ts +0 -307
- package/dist/types/systems/NiceNetwork.d.ts +0 -568
- package/dist/types/systems/NiceNotification.d.ts +0 -438
- package/dist/types/systems/NiceObjective.d.ts +0 -395
- package/dist/types/systems/NiceParticle.d.ts +0 -639
- package/dist/types/systems/NiceParty.d.ts +0 -168
- package/dist/types/systems/NicePerformance.d.ts +0 -144
- package/dist/types/systems/NicePet.d.ts +0 -167
- package/dist/types/systems/NicePhotoMode.d.ts +0 -270
- package/dist/types/systems/NicePhysics.d.ts +0 -326
- package/dist/types/systems/NicePlatformer.d.ts +0 -158
- package/dist/types/systems/NicePool.d.ts +0 -128
- package/dist/types/systems/NicePortal.d.ts +0 -178
- package/dist/types/systems/NicePostProcess.d.ts +0 -254
- package/dist/types/systems/NiceProcedural.d.ts +0 -202
- package/dist/types/systems/NiceProfile.d.ts +0 -223
- package/dist/types/systems/NiceProjectile.d.ts +0 -157
- package/dist/types/systems/NicePvP.d.ts +0 -199
- package/dist/types/systems/NiceQTE.d.ts +0 -160
- package/dist/types/systems/NiceQuest.d.ts +0 -620
- package/dist/types/systems/NiceRaid.d.ts +0 -215
- package/dist/types/systems/NiceRanking.d.ts +0 -399
- package/dist/types/systems/NiceReplay.d.ts +0 -180
- package/dist/types/systems/NiceReputation.d.ts +0 -151
- package/dist/types/systems/NiceResource.d.ts +0 -200
- package/dist/types/systems/NiceRhythm.d.ts +0 -148
- package/dist/types/systems/NiceRoguelike.d.ts +0 -276
- package/dist/types/systems/NiceRune.d.ts +0 -202
- package/dist/types/systems/NiceSaveSystem.d.ts +0 -194
- package/dist/types/systems/NiceSceneManager.d.ts +0 -112
- package/dist/types/systems/NiceScore.d.ts +0 -186
- package/dist/types/systems/NiceScreenFX.d.ts +0 -235
- package/dist/types/systems/NiceScreenshot.d.ts +0 -443
- package/dist/types/systems/NiceScribe.d.ts +0 -239
- package/dist/types/systems/NiceSeason.d.ts +0 -176
- package/dist/types/systems/NiceSerialization.d.ts +0 -89
- package/dist/types/systems/NiceServiceLocator.d.ts +0 -94
- package/dist/types/systems/NiceShop.d.ts +0 -528
- package/dist/types/systems/NiceSignal.d.ts +0 -112
- package/dist/types/systems/NiceSkillTree.d.ts +0 -237
- package/dist/types/systems/NiceSocial.d.ts +0 -580
- package/dist/types/systems/NiceSpawner.d.ts +0 -237
- package/dist/types/systems/NiceSpell.d.ts +0 -216
- package/dist/types/systems/NiceState.d.ts +0 -224
- package/dist/types/systems/NiceStateMachine.d.ts +0 -108
- package/dist/types/systems/NiceStatus.d.ts +0 -116
- package/dist/types/systems/NiceStealth.d.ts +0 -204
- package/dist/types/systems/NiceSteam.d.ts +0 -255
- package/dist/types/systems/NiceStreaming.d.ts +0 -173
- package/dist/types/systems/NiceSwimming.d.ts +0 -166
- package/dist/types/systems/NiceTalent.d.ts +0 -154
- package/dist/types/systems/NiceTarget.d.ts +0 -121
- package/dist/types/systems/NiceTerrain.d.ts +0 -143
- package/dist/types/systems/NiceTilemap.d.ts +0 -218
- package/dist/types/systems/NiceTimer.d.ts +0 -153
- package/dist/types/systems/NiceTournament.d.ts +0 -190
- package/dist/types/systems/NiceTrading.d.ts +0 -238
- package/dist/types/systems/NiceTransmog.d.ts +0 -142
- package/dist/types/systems/NiceTutorial.d.ts +0 -248
- package/dist/types/systems/NiceTween.d.ts +0 -164
- package/dist/types/systems/NiceUI.d.ts +0 -364
- package/dist/types/systems/NiceVFX.d.ts +0 -333
- package/dist/types/systems/NiceVehicle.d.ts +0 -176
- package/dist/types/systems/NiceVoice.d.ts +0 -502
- package/dist/types/systems/NiceWater.d.ts +0 -162
- package/dist/types/systems/NiceWave.d.ts +0 -174
- package/dist/types/systems/NiceWaypoint.d.ts +0 -165
- package/dist/types/systems/NiceWeather.d.ts +0 -225
- package/dist/types/systems/NiceXR.d.ts +0 -187
- package/dist/types/systems/index.d.ts +0 -182
- package/dist/types/templates/index.d.ts +0 -2
- package/dist/types/tilemap/index.d.ts +0 -1
- package/dist/types/tutorials/TutorialEditor.d.ts +0 -43
- package/dist/types/tutorials/VoiceNarration.d.ts +0 -75
- package/dist/types/tutorials/content/Tutorials_T04.d.ts +0 -3
- package/dist/types/tutorials/content/UITutorials.d.ts +0 -14
- package/dist/types/tutorials/content/index.d.ts +0 -5
- package/dist/types/tutorials/index.d.ts +0 -6
- package/dist/types/ui/index.d.ts +0 -2
- package/dist/types/visual-scripting/VisualScriptDebugger.d.ts +0 -145
- package/dist/types/visual-scripting/VisualScriptExecutor.d.ts +0 -100
- package/dist/types/visual-scripting/VisualScriptGraph.d.ts +0 -173
- package/dist/types/visual-scripting/VisualScriptNode.d.ts +0 -157
- package/dist/types/visual-scripting/index.d.ts +0 -6
- package/dist/types/visual-scripting/nodes/ActionNodes.d.ts +0 -152
- package/dist/types/visual-scripting/nodes/EventNodes.d.ts +0 -95
- package/dist/types/visual-scripting/nodes/FlowControlNodes.d.ts +0 -134
- package/dist/types/visual-scripting/nodes/LogicNodes.d.ts +0 -122
- package/dist/types/visual-scripting/nodes/MathNodes.d.ts +0 -170
- package/dist/types/visual-scripting/nodes/UtilityNodes.d.ts +0 -131
- package/dist/types/visual-scripting/nodes/VariableNodes.d.ts +0 -107
- package/dist/types/visual-scripting/nodes/index.d.ts +0 -21
- package/dist/types/visual-scripting/nodes/registerNodes.d.ts +0 -29
- package/dist/types/visual-scripting/types.d.ts +0 -402
- package/dist/types/xr/WebXRLayers.d.ts +0 -319
- package/dist/types/xr/index.d.ts +0 -2
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NiceModding - Mod Support System
|
|
3
|
-
*
|
|
4
|
-
* Comprehensive modding system for supporting user-created content,
|
|
5
|
-
* mod loading, sandbox environments, and mod management.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - Mod loading and registration
|
|
9
|
-
* - Mod dependencies
|
|
10
|
-
* - Mod versioning
|
|
11
|
-
* - Sandbox execution
|
|
12
|
-
* - Asset override system
|
|
13
|
-
* - Hook/event system
|
|
14
|
-
* - Mod configuration
|
|
15
|
-
* - Mod workshop integration
|
|
16
|
-
* - Conflict detection
|
|
17
|
-
* - Load order management
|
|
18
|
-
* - Mod profiles
|
|
19
|
-
* - Hot reloading (dev mode)
|
|
20
|
-
*
|
|
21
|
-
* @packageDocumentation
|
|
22
|
-
*/
|
|
23
|
-
import { EventEmitter } from 'events';
|
|
24
|
-
/** Unique mod ID */
|
|
25
|
-
export type ModId = string;
|
|
26
|
-
/** Unique hook ID */
|
|
27
|
-
export type HookId = string;
|
|
28
|
-
/** Unique asset ID */
|
|
29
|
-
export type AssetId = string;
|
|
30
|
-
/** Unique profile ID */
|
|
31
|
-
export type ProfileId = string;
|
|
32
|
-
/** Mod state */
|
|
33
|
-
export type ModState = 'unloaded' | 'loading' | 'loaded' | 'initializing' | 'active' | 'error' | 'disabled';
|
|
34
|
-
/** Hook priority */
|
|
35
|
-
export type HookPriority = 'first' | 'high' | 'normal' | 'low' | 'last';
|
|
36
|
-
/** Mod category */
|
|
37
|
-
export type ModCategory = 'gameplay' | 'content' | 'graphics' | 'audio' | 'ui' | 'utility' | 'total_conversion' | 'other';
|
|
38
|
-
/** Permission type */
|
|
39
|
-
export type ModPermission = 'filesystem' | 'network' | 'native' | 'save_data' | 'achievements' | 'ui_override' | 'core_override';
|
|
40
|
-
/** Mod manifest */
|
|
41
|
-
export interface ModManifest {
|
|
42
|
-
id: ModId;
|
|
43
|
-
name: string;
|
|
44
|
-
version: string;
|
|
45
|
-
description: string;
|
|
46
|
-
author: string;
|
|
47
|
-
authorUrl?: string;
|
|
48
|
-
homepage?: string;
|
|
49
|
-
repository?: string;
|
|
50
|
-
license?: string;
|
|
51
|
-
category: ModCategory;
|
|
52
|
-
tags: string[];
|
|
53
|
-
gameVersion: string;
|
|
54
|
-
minGameVersion?: string;
|
|
55
|
-
maxGameVersion?: string;
|
|
56
|
-
dependencies: ModDependency[];
|
|
57
|
-
conflicts: ModId[];
|
|
58
|
-
loadBefore?: ModId[];
|
|
59
|
-
loadAfter?: ModId[];
|
|
60
|
-
permissions: ModPermission[];
|
|
61
|
-
entryPoint: string;
|
|
62
|
-
assets?: ModAsset[];
|
|
63
|
-
config?: ModConfigSchema;
|
|
64
|
-
screenshots?: string[];
|
|
65
|
-
changelog?: string;
|
|
66
|
-
}
|
|
67
|
-
/** Mod dependency */
|
|
68
|
-
export interface ModDependency {
|
|
69
|
-
modId: ModId;
|
|
70
|
-
version?: string;
|
|
71
|
-
minVersion?: string;
|
|
72
|
-
maxVersion?: string;
|
|
73
|
-
optional?: boolean;
|
|
74
|
-
}
|
|
75
|
-
/** Mod asset definition */
|
|
76
|
-
export interface ModAsset {
|
|
77
|
-
id: AssetId;
|
|
78
|
-
type: 'texture' | 'audio' | 'model' | 'data' | 'script' | 'shader';
|
|
79
|
-
path: string;
|
|
80
|
-
overrides?: string;
|
|
81
|
-
priority?: number;
|
|
82
|
-
}
|
|
83
|
-
/** Mod configuration schema */
|
|
84
|
-
export interface ModConfigSchema {
|
|
85
|
-
fields: ModConfigField[];
|
|
86
|
-
defaults?: Record<string, unknown>;
|
|
87
|
-
}
|
|
88
|
-
/** Mod configuration field */
|
|
89
|
-
export interface ModConfigField {
|
|
90
|
-
key: string;
|
|
91
|
-
type: 'string' | 'number' | 'boolean' | 'select' | 'color' | 'keybind';
|
|
92
|
-
label: string;
|
|
93
|
-
description?: string;
|
|
94
|
-
default?: unknown;
|
|
95
|
-
options?: Array<{
|
|
96
|
-
value: unknown;
|
|
97
|
-
label: string;
|
|
98
|
-
}>;
|
|
99
|
-
min?: number;
|
|
100
|
-
max?: number;
|
|
101
|
-
step?: number;
|
|
102
|
-
category?: string;
|
|
103
|
-
}
|
|
104
|
-
/** Loaded mod instance */
|
|
105
|
-
export interface ModInstance {
|
|
106
|
-
manifest: ModManifest;
|
|
107
|
-
state: ModState;
|
|
108
|
-
loadedAt?: number;
|
|
109
|
-
activatedAt?: number;
|
|
110
|
-
error?: string;
|
|
111
|
-
config: Record<string, unknown>;
|
|
112
|
-
exports?: ModExports;
|
|
113
|
-
loadOrder: number;
|
|
114
|
-
hash?: string;
|
|
115
|
-
}
|
|
116
|
-
/** Mod exports (API provided by mod) */
|
|
117
|
-
export interface ModExports {
|
|
118
|
-
onLoad?: () => void | Promise<void>;
|
|
119
|
-
onUnload?: () => void | Promise<void>;
|
|
120
|
-
onActivate?: () => void | Promise<void>;
|
|
121
|
-
onDeactivate?: () => void | Promise<void>;
|
|
122
|
-
onConfigChange?: (key: string, value: unknown) => void;
|
|
123
|
-
api?: Record<string, unknown>;
|
|
124
|
-
[key: string]: unknown;
|
|
125
|
-
}
|
|
126
|
-
/** Mod hook registration */
|
|
127
|
-
export interface ModHook {
|
|
128
|
-
id: HookId;
|
|
129
|
-
modId: ModId;
|
|
130
|
-
hookName: string;
|
|
131
|
-
callback: HookCallback;
|
|
132
|
-
priority: HookPriority;
|
|
133
|
-
enabled: boolean;
|
|
134
|
-
}
|
|
135
|
-
/** Hook callback function */
|
|
136
|
-
export type HookCallback = (context: HookContext) => HookResult | Promise<HookResult>;
|
|
137
|
-
/** Hook context */
|
|
138
|
-
export interface HookContext {
|
|
139
|
-
hookName: string;
|
|
140
|
-
args: unknown[];
|
|
141
|
-
modId?: ModId;
|
|
142
|
-
result?: unknown;
|
|
143
|
-
cancelled?: boolean;
|
|
144
|
-
metadata?: Record<string, unknown>;
|
|
145
|
-
}
|
|
146
|
-
/** Hook result */
|
|
147
|
-
export interface HookResult {
|
|
148
|
-
result?: unknown;
|
|
149
|
-
cancel?: boolean;
|
|
150
|
-
modify?: unknown;
|
|
151
|
-
}
|
|
152
|
-
/** Asset override */
|
|
153
|
-
export interface AssetOverride {
|
|
154
|
-
originalPath: string;
|
|
155
|
-
modPath: string;
|
|
156
|
-
modId: ModId;
|
|
157
|
-
priority: number;
|
|
158
|
-
type: ModAsset['type'];
|
|
159
|
-
}
|
|
160
|
-
/** Mod profile */
|
|
161
|
-
export interface ModProfile {
|
|
162
|
-
id: ProfileId;
|
|
163
|
-
name: string;
|
|
164
|
-
description?: string;
|
|
165
|
-
enabledMods: ModId[];
|
|
166
|
-
modConfigs: Record<ModId, Record<string, unknown>>;
|
|
167
|
-
loadOrder: ModId[];
|
|
168
|
-
createdAt: number;
|
|
169
|
-
updatedAt: number;
|
|
170
|
-
isActive: boolean;
|
|
171
|
-
}
|
|
172
|
-
/** Mod conflict */
|
|
173
|
-
export interface ModConflict {
|
|
174
|
-
modA: ModId;
|
|
175
|
-
modB: ModId;
|
|
176
|
-
type: 'explicit' | 'asset' | 'hook' | 'dependency';
|
|
177
|
-
description: string;
|
|
178
|
-
severity: 'error' | 'warning' | 'info';
|
|
179
|
-
}
|
|
180
|
-
/** Mod load result */
|
|
181
|
-
export interface ModLoadResult {
|
|
182
|
-
success: boolean;
|
|
183
|
-
modId: ModId;
|
|
184
|
-
error?: string;
|
|
185
|
-
warnings?: string[];
|
|
186
|
-
loadTime?: number;
|
|
187
|
-
}
|
|
188
|
-
/** Workshop item */
|
|
189
|
-
export interface WorkshopItem {
|
|
190
|
-
id: string;
|
|
191
|
-
modId: ModId;
|
|
192
|
-
name: string;
|
|
193
|
-
description: string;
|
|
194
|
-
author: string;
|
|
195
|
-
version: string;
|
|
196
|
-
downloads: number;
|
|
197
|
-
rating: number;
|
|
198
|
-
ratingCount: number;
|
|
199
|
-
thumbnailUrl?: string;
|
|
200
|
-
tags: string[];
|
|
201
|
-
createdAt: number;
|
|
202
|
-
updatedAt: number;
|
|
203
|
-
size: number;
|
|
204
|
-
isInstalled: boolean;
|
|
205
|
-
isSubscribed: boolean;
|
|
206
|
-
}
|
|
207
|
-
/** Mod statistics */
|
|
208
|
-
export interface ModStatistics {
|
|
209
|
-
totalMods: number;
|
|
210
|
-
activeMods: number;
|
|
211
|
-
disabledMods: number;
|
|
212
|
-
errorMods: number;
|
|
213
|
-
totalHooks: number;
|
|
214
|
-
totalAssetOverrides: number;
|
|
215
|
-
loadTime: number;
|
|
216
|
-
}
|
|
217
|
-
/** Mod event types */
|
|
218
|
-
export type ModEventType = 'mod_registered' | 'mod_unregistered' | 'mod_loading' | 'mod_loaded' | 'mod_error' | 'mod_activated' | 'mod_deactivated' | 'mod_config_changed' | 'hook_registered' | 'hook_called' | 'asset_override_added' | 'profile_changed' | 'conflict_detected' | 'load_order_changed';
|
|
219
|
-
/** Mod event data */
|
|
220
|
-
export interface ModEvent {
|
|
221
|
-
type: ModEventType;
|
|
222
|
-
timestamp: number;
|
|
223
|
-
modId?: ModId;
|
|
224
|
-
hookId?: HookId;
|
|
225
|
-
profileId?: ProfileId;
|
|
226
|
-
data?: unknown;
|
|
227
|
-
error?: string;
|
|
228
|
-
}
|
|
229
|
-
/** Mod event callback */
|
|
230
|
-
export type ModEventCallback = (event: ModEvent) => void;
|
|
231
|
-
/** Modding system configuration */
|
|
232
|
-
export interface ModdingConfig {
|
|
233
|
-
modsDirectory: string;
|
|
234
|
-
enableSandbox: boolean;
|
|
235
|
-
enableHotReload: boolean;
|
|
236
|
-
maxModLoadTime: number;
|
|
237
|
-
maxHookExecutionTime: number;
|
|
238
|
-
allowedPermissions: ModPermission[];
|
|
239
|
-
autoLoadEnabled: boolean;
|
|
240
|
-
saveConfigOnChange: boolean;
|
|
241
|
-
validateManifests: boolean;
|
|
242
|
-
cacheAssets: boolean;
|
|
243
|
-
parallelLoading: boolean;
|
|
244
|
-
maxParallelLoads: number;
|
|
245
|
-
}
|
|
246
|
-
/** Default configuration */
|
|
247
|
-
export declare const DEFAULT_MODDING_CONFIG: ModdingConfig;
|
|
248
|
-
/**
|
|
249
|
-
* Mod support and management system
|
|
250
|
-
*/
|
|
251
|
-
export declare class NiceModding extends EventEmitter {
|
|
252
|
-
private config;
|
|
253
|
-
private mods;
|
|
254
|
-
private hooks;
|
|
255
|
-
private assetOverrides;
|
|
256
|
-
private profiles;
|
|
257
|
-
private activeProfile?;
|
|
258
|
-
private loadOrder;
|
|
259
|
-
private conflicts;
|
|
260
|
-
private modApi;
|
|
261
|
-
private hookIdCounter;
|
|
262
|
-
constructor(config?: Partial<ModdingConfig>);
|
|
263
|
-
/**
|
|
264
|
-
* Emit mod event
|
|
265
|
-
*/
|
|
266
|
-
private emitEvent;
|
|
267
|
-
/**
|
|
268
|
-
* Generate unique hook ID
|
|
269
|
-
*/
|
|
270
|
-
private generateHookId;
|
|
271
|
-
/**
|
|
272
|
-
* Register mod from manifest
|
|
273
|
-
*/
|
|
274
|
-
registerMod(manifest: ModManifest): boolean;
|
|
275
|
-
/**
|
|
276
|
-
* Validate mod manifest
|
|
277
|
-
*/
|
|
278
|
-
private validateManifest;
|
|
279
|
-
/**
|
|
280
|
-
* Check mod permissions
|
|
281
|
-
*/
|
|
282
|
-
private checkPermissions;
|
|
283
|
-
/**
|
|
284
|
-
* Unregister mod
|
|
285
|
-
*/
|
|
286
|
-
unregisterMod(modId: ModId): Promise<boolean>;
|
|
287
|
-
/**
|
|
288
|
-
* Load mod
|
|
289
|
-
*/
|
|
290
|
-
loadMod(modId: ModId): Promise<ModLoadResult>;
|
|
291
|
-
/**
|
|
292
|
-
* Load mod module (simulation)
|
|
293
|
-
*/
|
|
294
|
-
private loadModModule;
|
|
295
|
-
/**
|
|
296
|
-
* Load mod dependencies
|
|
297
|
-
*/
|
|
298
|
-
private loadDependencies;
|
|
299
|
-
/**
|
|
300
|
-
* Check version compatibility
|
|
301
|
-
*/
|
|
302
|
-
private isVersionCompatible;
|
|
303
|
-
/**
|
|
304
|
-
* Unload mod
|
|
305
|
-
*/
|
|
306
|
-
unloadMod(modId: ModId): Promise<boolean>;
|
|
307
|
-
/**
|
|
308
|
-
* Activate mod
|
|
309
|
-
*/
|
|
310
|
-
activateMod(modId: ModId): Promise<boolean>;
|
|
311
|
-
/**
|
|
312
|
-
* Deactivate mod
|
|
313
|
-
*/
|
|
314
|
-
deactivateMod(modId: ModId): Promise<boolean>;
|
|
315
|
-
/**
|
|
316
|
-
* Get mod instance
|
|
317
|
-
*/
|
|
318
|
-
getMod(modId: ModId): ModInstance | undefined;
|
|
319
|
-
/**
|
|
320
|
-
* Get all mods
|
|
321
|
-
*/
|
|
322
|
-
getAllMods(): ModInstance[];
|
|
323
|
-
/**
|
|
324
|
-
* Get active mods
|
|
325
|
-
*/
|
|
326
|
-
getActiveMods(): ModInstance[];
|
|
327
|
-
/**
|
|
328
|
-
* Get mods by category
|
|
329
|
-
*/
|
|
330
|
-
getModsByCategory(category: ModCategory): ModInstance[];
|
|
331
|
-
/**
|
|
332
|
-
* Register hook
|
|
333
|
-
*/
|
|
334
|
-
registerHook(modId: ModId, hookName: string, callback: HookCallback, priority?: HookPriority): HookId | undefined;
|
|
335
|
-
/**
|
|
336
|
-
* Sort hooks by priority
|
|
337
|
-
*/
|
|
338
|
-
private sortHooks;
|
|
339
|
-
/**
|
|
340
|
-
* Unregister hook
|
|
341
|
-
*/
|
|
342
|
-
unregisterHook(hookId: HookId): boolean;
|
|
343
|
-
/**
|
|
344
|
-
* Remove all hooks for a mod
|
|
345
|
-
*/
|
|
346
|
-
private removeModHooks;
|
|
347
|
-
/**
|
|
348
|
-
* Call hook
|
|
349
|
-
*/
|
|
350
|
-
callHook(hookName: string, ...args: unknown[]): Promise<HookContext>;
|
|
351
|
-
/**
|
|
352
|
-
* Check if hook exists
|
|
353
|
-
*/
|
|
354
|
-
hasHook(hookName: string): boolean;
|
|
355
|
-
/**
|
|
356
|
-
* Register asset override
|
|
357
|
-
*/
|
|
358
|
-
private registerAssetOverride;
|
|
359
|
-
/**
|
|
360
|
-
* Remove mod asset overrides
|
|
361
|
-
*/
|
|
362
|
-
private removeModAssetOverrides;
|
|
363
|
-
/**
|
|
364
|
-
* Resolve asset path
|
|
365
|
-
*/
|
|
366
|
-
resolveAssetPath(originalPath: string): string;
|
|
367
|
-
/**
|
|
368
|
-
* Get asset overrides for path
|
|
369
|
-
*/
|
|
370
|
-
getAssetOverrides(originalPath: string): AssetOverride[];
|
|
371
|
-
/**
|
|
372
|
-
* Get mod config
|
|
373
|
-
*/
|
|
374
|
-
getModConfig(modId: ModId): Record<string, unknown> | undefined;
|
|
375
|
-
/**
|
|
376
|
-
* Set mod config value
|
|
377
|
-
*/
|
|
378
|
-
setModConfigValue(modId: ModId, key: string, value: unknown): boolean;
|
|
379
|
-
/**
|
|
380
|
-
* Reset mod config to defaults
|
|
381
|
-
*/
|
|
382
|
-
resetModConfig(modId: ModId): boolean;
|
|
383
|
-
/**
|
|
384
|
-
* Get load order
|
|
385
|
-
*/
|
|
386
|
-
getLoadOrder(): ModId[];
|
|
387
|
-
/**
|
|
388
|
-
* Set load order
|
|
389
|
-
*/
|
|
390
|
-
setLoadOrder(order: ModId[]): boolean;
|
|
391
|
-
/**
|
|
392
|
-
* Move mod in load order
|
|
393
|
-
*/
|
|
394
|
-
moveModInLoadOrder(modId: ModId, direction: 'up' | 'down'): boolean;
|
|
395
|
-
/**
|
|
396
|
-
* Detect conflicts for mod
|
|
397
|
-
*/
|
|
398
|
-
private detectConflicts;
|
|
399
|
-
/**
|
|
400
|
-
* Get conflicts
|
|
401
|
-
*/
|
|
402
|
-
getConflicts(): ModConflict[];
|
|
403
|
-
/**
|
|
404
|
-
* Get conflicts for mod
|
|
405
|
-
*/
|
|
406
|
-
getModConflicts(modId: ModId): ModConflict[];
|
|
407
|
-
/**
|
|
408
|
-
* Create profile
|
|
409
|
-
*/
|
|
410
|
-
createProfile(id: ProfileId, name: string, description?: string): ModProfile;
|
|
411
|
-
/**
|
|
412
|
-
* Delete profile
|
|
413
|
-
*/
|
|
414
|
-
deleteProfile(profileId: ProfileId): boolean;
|
|
415
|
-
/**
|
|
416
|
-
* Get profile
|
|
417
|
-
*/
|
|
418
|
-
getProfile(profileId: ProfileId): ModProfile | undefined;
|
|
419
|
-
/**
|
|
420
|
-
* Get all profiles
|
|
421
|
-
*/
|
|
422
|
-
getAllProfiles(): ModProfile[];
|
|
423
|
-
/**
|
|
424
|
-
* Set active profile
|
|
425
|
-
*/
|
|
426
|
-
setActiveProfile(profileId: ProfileId): Promise<boolean>;
|
|
427
|
-
/**
|
|
428
|
-
* Save current state to active profile
|
|
429
|
-
*/
|
|
430
|
-
saveToProfile(): boolean;
|
|
431
|
-
/**
|
|
432
|
-
* Get mod API
|
|
433
|
-
*/
|
|
434
|
-
getModApi(modId: ModId): Record<string, unknown> | undefined;
|
|
435
|
-
/**
|
|
436
|
-
* Call mod API method
|
|
437
|
-
*/
|
|
438
|
-
callModApi(modId: ModId, method: string, ...args: unknown[]): Promise<unknown>;
|
|
439
|
-
/**
|
|
440
|
-
* Get modding statistics
|
|
441
|
-
*/
|
|
442
|
-
getStatistics(): ModStatistics;
|
|
443
|
-
/**
|
|
444
|
-
* Destroy modding system
|
|
445
|
-
*/
|
|
446
|
-
destroy(): Promise<void>;
|
|
447
|
-
}
|
|
448
|
-
/**
|
|
449
|
-
* Create modding system instance
|
|
450
|
-
*/
|
|
451
|
-
export declare function createModdingSystem(config?: Partial<ModdingConfig>): NiceModding;
|
|
452
|
-
export default NiceModding;
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events';
|
|
2
|
-
export type MountId = string;
|
|
3
|
-
export type RiderId = string;
|
|
4
|
-
export type MountTypeId = string;
|
|
5
|
-
export interface Vector3 {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
z: number;
|
|
9
|
-
}
|
|
10
|
-
export type MountCategory = 'ground' | 'flying' | 'aquatic' | 'amphibious' | 'all-terrain';
|
|
11
|
-
export interface MountType {
|
|
12
|
-
id: MountTypeId;
|
|
13
|
-
name: string;
|
|
14
|
-
description?: string;
|
|
15
|
-
category: MountCategory;
|
|
16
|
-
baseSpeed: number;
|
|
17
|
-
sprintMultiplier: number;
|
|
18
|
-
acceleration: number;
|
|
19
|
-
turnRate: number;
|
|
20
|
-
seats: number;
|
|
21
|
-
size: 'small' | 'medium' | 'large' | 'huge';
|
|
22
|
-
stamina: number;
|
|
23
|
-
staminaRegenRate: number;
|
|
24
|
-
abilities: MountAbilityId[];
|
|
25
|
-
equipmentSlots?: MountEquipmentSlot[];
|
|
26
|
-
flightCeiling?: number;
|
|
27
|
-
diveDepth?: number;
|
|
28
|
-
canJump?: boolean;
|
|
29
|
-
jumpHeight?: number;
|
|
30
|
-
canSwim?: boolean;
|
|
31
|
-
swimSpeed?: number;
|
|
32
|
-
canFly?: boolean;
|
|
33
|
-
flySpeed?: number;
|
|
34
|
-
riderAnimations: {
|
|
35
|
-
idle: string;
|
|
36
|
-
walk: string;
|
|
37
|
-
run: string;
|
|
38
|
-
sprint?: string;
|
|
39
|
-
jump?: string;
|
|
40
|
-
fly?: string;
|
|
41
|
-
swim?: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export type MountEquipmentSlot = 'saddle' | 'armor' | 'shoes' | 'accessory' | 'bags';
|
|
45
|
-
export interface MountEquipment {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
slot: MountEquipmentSlot;
|
|
49
|
-
speedBonus?: number;
|
|
50
|
-
staminaBonus?: number;
|
|
51
|
-
armorBonus?: number;
|
|
52
|
-
bagSlots?: number;
|
|
53
|
-
effects?: string[];
|
|
54
|
-
}
|
|
55
|
-
export type MountAbilityId = string;
|
|
56
|
-
export interface MountAbility {
|
|
57
|
-
id: MountAbilityId;
|
|
58
|
-
name: string;
|
|
59
|
-
description?: string;
|
|
60
|
-
cooldown: number;
|
|
61
|
-
staminaCost: number;
|
|
62
|
-
type: 'movement' | 'combat' | 'utility';
|
|
63
|
-
effect: (mount: Mount, rider: RiderId) => void;
|
|
64
|
-
}
|
|
65
|
-
export interface Mount {
|
|
66
|
-
id: MountId;
|
|
67
|
-
typeId: MountTypeId;
|
|
68
|
-
ownerId: RiderId;
|
|
69
|
-
name: string;
|
|
70
|
-
summoned: boolean;
|
|
71
|
-
position: Vector3;
|
|
72
|
-
rotation: number;
|
|
73
|
-
currentSpeed: number;
|
|
74
|
-
isSprinting: boolean;
|
|
75
|
-
isJumping: boolean;
|
|
76
|
-
isFlying: boolean;
|
|
77
|
-
isSwimming: boolean;
|
|
78
|
-
currentStamina: number;
|
|
79
|
-
maxStamina: number;
|
|
80
|
-
speedModifier: number;
|
|
81
|
-
riders: Map<number, RiderId>;
|
|
82
|
-
equipment: Map<MountEquipmentSlot, MountEquipment>;
|
|
83
|
-
abilityCooldowns: Map<MountAbilityId, number>;
|
|
84
|
-
inventory?: unknown[];
|
|
85
|
-
customData: Record<string, unknown>;
|
|
86
|
-
}
|
|
87
|
-
export type MountEventType = 'mount-created' | 'mount-removed' | 'mount-summoned' | 'mount-dismissed' | 'rider-mounted' | 'rider-dismounted' | 'mount-ability-used' | 'mount-equipment-changed' | 'mount-sprint-start' | 'mount-sprint-end' | 'mount-flight-start' | 'mount-flight-end' | 'mount-stamina-depleted';
|
|
88
|
-
export interface MountEvent {
|
|
89
|
-
type: MountEventType;
|
|
90
|
-
mountId: MountId;
|
|
91
|
-
riderId?: RiderId;
|
|
92
|
-
data?: Record<string, unknown>;
|
|
93
|
-
}
|
|
94
|
-
export interface MountSystemConfig {
|
|
95
|
-
maxMountsPerPlayer?: number;
|
|
96
|
-
mountSummonTime?: number;
|
|
97
|
-
dismountCooldown?: number;
|
|
98
|
-
staminaCostSprint?: number;
|
|
99
|
-
staminaCostFly?: number;
|
|
100
|
-
staminaCostJump?: number;
|
|
101
|
-
}
|
|
102
|
-
export declare const DEFAULT_MOUNT_CONFIG: MountSystemConfig;
|
|
103
|
-
export declare class NiceMount extends EventEmitter {
|
|
104
|
-
private mounts;
|
|
105
|
-
private mountTypes;
|
|
106
|
-
private abilities;
|
|
107
|
-
private ownerMounts;
|
|
108
|
-
private activeMounts;
|
|
109
|
-
private riderMounts;
|
|
110
|
-
private nextMountId;
|
|
111
|
-
private config;
|
|
112
|
-
constructor(config?: Partial<MountSystemConfig>);
|
|
113
|
-
registerType(type: MountType): void;
|
|
114
|
-
getType(typeId: MountTypeId): MountType | undefined;
|
|
115
|
-
getAllTypes(): MountType[];
|
|
116
|
-
getTypesByCategory(category: MountCategory): MountType[];
|
|
117
|
-
registerAbility(ability: MountAbility): void;
|
|
118
|
-
getAbility(abilityId: MountAbilityId): MountAbility | undefined;
|
|
119
|
-
create(ownerId: RiderId, typeId: MountTypeId, name: string): MountId | null;
|
|
120
|
-
remove(mountId: MountId): boolean;
|
|
121
|
-
get(mountId: MountId): Mount | undefined;
|
|
122
|
-
getByOwner(ownerId: RiderId): Mount[];
|
|
123
|
-
summon(mountId: MountId, position: Vector3): boolean;
|
|
124
|
-
dismiss(mountId: MountId): boolean;
|
|
125
|
-
getActiveMount(ownerId: RiderId): Mount | undefined;
|
|
126
|
-
mount(riderId: RiderId, mountId: MountId, seatIndex?: number): boolean;
|
|
127
|
-
dismount(riderId: RiderId): boolean;
|
|
128
|
-
getRiderMount(riderId: RiderId): Mount | undefined;
|
|
129
|
-
isRiding(riderId: RiderId): boolean;
|
|
130
|
-
getRiders(mountId: MountId): Array<{
|
|
131
|
-
riderId: RiderId;
|
|
132
|
-
seatIndex: number;
|
|
133
|
-
}>;
|
|
134
|
-
getSpeed(mountId: MountId): number;
|
|
135
|
-
setSprinting(mountId: MountId, sprinting: boolean): void;
|
|
136
|
-
jump(mountId: MountId): boolean;
|
|
137
|
-
setFlying(mountId: MountId, flying: boolean): boolean;
|
|
138
|
-
setSwimming(mountId: MountId, swimming: boolean): void;
|
|
139
|
-
update(deltaTime: number): void;
|
|
140
|
-
equip(mountId: MountId, equipment: MountEquipment): boolean;
|
|
141
|
-
unequip(mountId: MountId, slot: MountEquipmentSlot): MountEquipment | null;
|
|
142
|
-
getEquipment(mountId: MountId, slot: MountEquipmentSlot): MountEquipment | undefined;
|
|
143
|
-
useAbility(mountId: MountId, abilityId: MountAbilityId): boolean;
|
|
144
|
-
getAbilityCooldown(mountId: MountId, abilityId: MountAbilityId): number;
|
|
145
|
-
}
|
|
146
|
-
export declare function createMountSystem(config?: Partial<MountSystemConfig>): NiceMount;
|
|
147
|
-
export declare function defineMountType(data: MountType): MountType;
|
|
148
|
-
export declare function defineMountAbility(data: Omit<MountAbility, 'effect'> & {
|
|
149
|
-
effect?: MountAbility['effect'];
|
|
150
|
-
}): MountAbility;
|
|
151
|
-
export declare function defineMountEquipment(data: MountEquipment): MountEquipment;
|
|
152
|
-
export default NiceMount;
|