@open-core/framework 1.0.5-beta.1 → 1.0.5-beta.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/dist/adapters/contracts/IEngineEvents.d.ts +3 -0
- package/dist/adapters/contracts/IEngineEvents.js +7 -0
- package/dist/adapters/contracts/IPlatformContext.d.ts +43 -0
- package/dist/adapters/contracts/IPlatformContext.js +8 -0
- package/dist/adapters/contracts/client/IClientLocalPlayerBridge.d.ts +4 -0
- package/dist/adapters/contracts/client/IClientLocalPlayerBridge.js +2 -0
- package/dist/adapters/contracts/client/IClientLogConsole.d.ts +13 -0
- package/dist/adapters/contracts/client/IClientLogConsole.js +2 -0
- package/dist/adapters/contracts/client/IClientPlatformBridge.d.ts +195 -0
- package/dist/adapters/contracts/client/IClientPlatformBridge.js +282 -0
- package/dist/adapters/contracts/client/IClientRuntimeBridge.d.ts +18 -0
- package/dist/adapters/contracts/client/IClientRuntimeBridge.js +14 -0
- package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.d.ts +26 -0
- package/dist/adapters/contracts/client/IGtaPedAppearanceBridge.js +2 -0
- package/dist/adapters/contracts/client/index.d.ts +7 -0
- package/dist/adapters/contracts/client/index.js +7 -0
- package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.d.ts +7 -0
- package/dist/adapters/contracts/client/spawn/IClientSpawnBridge.js +2 -0
- package/dist/adapters/contracts/client/spawn/index.d.ts +2 -0
- package/dist/adapters/contracts/client/spawn/index.js +2 -0
- package/dist/adapters/contracts/client/spawn/types.d.ts +14 -0
- package/dist/adapters/contracts/client/ui/IClientBlipBridge.d.ts +25 -0
- package/dist/adapters/contracts/client/ui/IClientBlipBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/IClientMarkerBridge.d.ts +31 -0
- package/dist/adapters/contracts/client/ui/IClientMarkerBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/IClientNotificationBridge.d.ts +21 -0
- package/dist/adapters/contracts/client/ui/IClientNotificationBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/index.d.ts +4 -0
- package/dist/adapters/contracts/client/ui/index.js +4 -0
- package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.d.ts +13 -0
- package/dist/adapters/contracts/client/ui/webview/IClientWebViewBridge.js +2 -0
- package/dist/adapters/contracts/client/ui/webview/index.d.ts +2 -0
- package/dist/adapters/contracts/client/ui/webview/index.js +2 -0
- package/dist/adapters/contracts/client/ui/webview/types.d.ts +25 -0
- package/dist/adapters/contracts/client/ui/webview/types.js +0 -0
- package/dist/adapters/contracts/index.d.ts +4 -2
- package/dist/adapters/contracts/index.js +4 -3
- package/dist/adapters/contracts/runtime/index.d.ts +1 -0
- package/dist/adapters/contracts/runtime/index.js +1 -0
- package/dist/adapters/contracts/runtime/runtime-events.d.ts +9 -0
- package/dist/adapters/contracts/runtime/runtime-events.js +7 -0
- package/dist/adapters/contracts/server/IEntityServer.d.ts +4 -28
- package/dist/adapters/contracts/server/IEntityServer.js +0 -26
- package/dist/adapters/contracts/server/IPlayerServer.d.ts +7 -26
- package/dist/adapters/contracts/server/IPlayerServer.js +0 -26
- package/dist/adapters/contracts/server/index.d.ts +10 -0
- package/dist/adapters/contracts/server/index.js +10 -0
- package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.d.ts +5 -0
- package/dist/adapters/contracts/server/npc-lifecycle/INpcLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/npc-lifecycle/types.d.ts +17 -0
- package/dist/adapters/contracts/server/npc-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.d.ts +11 -0
- package/dist/adapters/contracts/server/player-appearance/IPlayerAppearanceLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/player-appearance/index.d.ts +1 -0
- package/dist/adapters/contracts/server/player-appearance/index.js +1 -0
- package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.d.ts +6 -0
- package/dist/adapters/contracts/server/player-lifecycle/IPlayerLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/player-lifecycle/types.d.ts +17 -0
- package/dist/adapters/contracts/server/player-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.d.ts +6 -0
- package/dist/adapters/contracts/server/player-state/IPlayerStateSyncServer.js +2 -0
- package/dist/adapters/contracts/server/player-state/index.d.ts +1 -0
- package/dist/adapters/contracts/server/player-state/index.js +1 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.d.ts +5 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/IVehicleLifecycleServer.js +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/index.d.ts +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/index.js +2 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/types.d.ts +16 -0
- package/dist/adapters/contracts/server/vehicle-lifecycle/types.js +0 -0
- package/dist/adapters/contracts/transport/index.d.ts +4 -0
- package/dist/adapters/contracts/transport/index.js +4 -0
- package/dist/adapters/index.d.ts +3 -14
- package/dist/adapters/index.js +3 -20
- package/dist/adapters/node/node-capabilities.d.ts +11 -11
- package/dist/adapters/node/node-capabilities.js +15 -27
- package/dist/adapters/node/node-engine-events.d.ts +1 -1
- package/dist/adapters/node/node-engine-events.js +2 -1
- package/dist/adapters/node/node-entity-server.d.ts +2 -2
- package/dist/adapters/node/node-entity-server.js +2 -2
- package/dist/adapters/node/node-ped-appearance-client.d.ts +2 -2
- package/dist/adapters/node/node-ped-appearance-client.js +2 -2
- package/dist/adapters/node/node-platform.js +4 -4
- package/dist/adapters/node/node-player-server.d.ts +3 -2
- package/dist/adapters/node/node-player-server.js +8 -2
- package/dist/adapters/register-capabilities.d.ts +1 -1
- package/dist/adapters/register-capabilities.js +1 -3
- package/dist/adapters/register-client-capabilities.d.ts +3 -2
- package/dist/adapters/register-client-capabilities.js +16 -41
- package/dist/contracts/client.d.ts +5 -0
- package/dist/contracts/client.js +5 -0
- package/dist/contracts/server.d.ts +19 -0
- package/dist/contracts/server.js +19 -0
- package/dist/contracts.d.ts +4 -0
- package/dist/contracts.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/kernel/logger/client-log-console.d.ts +4 -0
- package/dist/kernel/logger/client-log-console.js +43 -0
- package/dist/kernel/logger/core-logger.d.ts +3 -1
- package/dist/kernel/logger/core-logger.js +4 -2
- package/dist/kernel/logger/index.d.ts +2 -0
- package/dist/kernel/logger/index.js +1 -0
- package/dist/kernel/logger/transports/dev-transport.factory.js +1 -1
- package/dist/kernel/logger/transports/simple-console.transport.js +13 -8
- package/dist/kernel-public.d.ts +1 -0
- package/dist/kernel-public.js +1 -0
- package/dist/runtime/client/adapter/client-adapter.d.ts +25 -0
- package/dist/runtime/client/adapter/client-adapter.js +11 -0
- package/dist/runtime/client/adapter/index.d.ts +15 -0
- package/dist/runtime/client/adapter/index.js +15 -0
- package/dist/runtime/client/adapter/local-player-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/local-player-bridge.js +1 -0
- package/dist/runtime/client/adapter/node-blip-bridge.d.ts +9 -0
- package/dist/runtime/client/adapter/node-blip-bridge.js +34 -0
- package/dist/runtime/client/adapter/node-client-adapter.d.ts +5 -0
- package/dist/runtime/client/adapter/node-client-adapter.js +50 -0
- package/dist/runtime/client/adapter/node-local-player-bridge.d.ts +8 -0
- package/dist/{adapters/fivem/fivem-hasher.js → runtime/client/adapter/node-local-player-bridge.js} +7 -9
- package/dist/runtime/client/adapter/node-log-console.d.ts +11 -0
- package/dist/runtime/client/adapter/node-log-console.js +48 -0
- package/dist/runtime/client/adapter/node-marker-bridge.d.ts +10 -0
- package/dist/runtime/client/adapter/node-marker-bridge.js +35 -0
- package/dist/runtime/client/adapter/node-notification-bridge.d.ts +5 -0
- package/dist/runtime/client/adapter/node-notification-bridge.js +16 -0
- package/dist/runtime/client/adapter/node-platform-bridge.d.ts +3 -0
- package/dist/{adapters/fivem/fivem-tick.js → runtime/client/adapter/node-platform-bridge.js} +5 -10
- package/dist/runtime/client/adapter/node-runtime-bridge.d.ts +24 -0
- package/dist/runtime/client/adapter/node-runtime-bridge.js +58 -0
- package/dist/runtime/client/adapter/node-spawn-bridge.d.ts +8 -0
- package/dist/runtime/client/adapter/node-spawn-bridge.js +18 -0
- package/dist/runtime/client/adapter/node-webview-bridge.d.ts +15 -0
- package/dist/runtime/client/adapter/node-webview-bridge.js +43 -0
- package/dist/runtime/client/adapter/platform-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/platform-bridge.js +1 -0
- package/dist/runtime/client/adapter/registry.d.ts +9 -0
- package/dist/runtime/client/adapter/registry.js +85 -0
- package/dist/runtime/client/adapter/runtime-bridge.d.ts +1 -0
- package/dist/runtime/client/adapter/runtime-bridge.js +1 -0
- package/dist/runtime/client/api.d.ts +2 -1
- package/dist/runtime/client/api.js +2 -1
- package/dist/runtime/client/client-bootstrap.js +51 -44
- package/dist/runtime/client/client-core.d.ts +2 -0
- package/dist/runtime/client/client-core.js +9 -0
- package/dist/runtime/client/client-runtime.d.ts +3 -0
- package/dist/runtime/client/client-runtime.js +3 -0
- package/dist/runtime/client/controllers/appearance.controller.d.ts +3 -1
- package/dist/runtime/client/controllers/appearance.controller.js +14 -4
- package/dist/runtime/client/controllers/spawner.controller.js +2 -0
- package/dist/runtime/client/decorators/controller.js +2 -10
- package/dist/runtime/client/decorators/onView.d.ts +3 -3
- package/dist/runtime/client/decorators/onView.js +3 -3
- package/dist/runtime/client/index.d.ts +1 -0
- package/dist/runtime/client/index.js +1 -0
- package/dist/runtime/client/library/create-client-library.js +9 -1
- package/dist/runtime/client/services/appearance.service.d.ts +2 -2
- package/dist/runtime/client/services/appearance.service.js +7 -4
- package/dist/runtime/client/services/blip.service.d.ts +6 -93
- package/dist/runtime/client/services/blip.service.js +58 -153
- package/dist/runtime/client/services/camera-effects.registry.d.ts +3 -0
- package/dist/runtime/client/services/camera-effects.registry.js +20 -7
- package/dist/runtime/client/services/camera.d.ts +3 -83
- package/dist/runtime/client/services/camera.js +37 -93
- package/dist/runtime/client/services/cinematic.d.ts +5 -1
- package/dist/runtime/client/services/cinematic.js +45 -30
- package/dist/runtime/client/services/index.d.ts +1 -0
- package/dist/runtime/client/services/index.js +1 -0
- package/dist/runtime/client/services/marker.service.d.ts +12 -63
- package/dist/runtime/client/services/marker.service.js +62 -97
- package/dist/runtime/client/services/notification.service.d.ts +6 -57
- package/dist/runtime/client/services/notification.service.js +43 -81
- package/dist/runtime/client/services/ped.service.d.ts +3 -130
- package/dist/runtime/client/services/ped.service.js +66 -198
- package/dist/runtime/client/services/progress.service.d.ts +5 -30
- package/dist/runtime/client/services/progress.service.js +73 -99
- package/dist/runtime/client/services/session-bridge.service.d.ts +15 -0
- package/dist/runtime/client/services/session-bridge.service.js +61 -0
- package/dist/runtime/client/services/spawn.service.d.ts +6 -56
- package/dist/runtime/client/services/spawn.service.js +34 -191
- package/dist/runtime/client/services/streaming.service.d.ts +5 -126
- package/dist/runtime/client/services/streaming.service.js +72 -217
- package/dist/runtime/client/services/textui.service.d.ts +5 -45
- package/dist/runtime/client/services/textui.service.js +55 -88
- package/dist/runtime/client/services/vehicle-client.service.d.ts +12 -149
- package/dist/runtime/client/services/vehicle-client.service.js +180 -326
- package/dist/runtime/client/services/vehicle.service.d.ts +3 -109
- package/dist/runtime/client/services/vehicle.service.js +94 -194
- package/dist/runtime/client/system/processors/export.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/export.processor.js +16 -3
- package/dist/runtime/client/system/processors/gameEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/gameEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/interval.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/interval.processor.js +17 -4
- package/dist/runtime/client/system/processors/key.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/key.processor.js +18 -5
- package/dist/runtime/client/system/processors/localEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/localEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/netEvent.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/netEvent.processor.js +16 -3
- package/dist/runtime/client/system/processors/onRpc.processor.js +1 -1
- package/dist/runtime/client/system/processors/resourceLifecycle.processor.d.ts +5 -0
- package/dist/runtime/client/system/processors/resourceLifecycle.processor.js +26 -7
- package/dist/runtime/client/system/processors/tick.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/tick.processor.js +16 -3
- package/dist/runtime/client/system/processors/view.processor.d.ts +3 -0
- package/dist/runtime/client/system/processors/view.processor.js +21 -10
- package/dist/runtime/client/system/processors.register.d.ts +1 -0
- package/dist/runtime/client/system/processors.register.js +8 -0
- package/dist/runtime/client/ui-bridge.d.ts +2 -114
- package/dist/runtime/client/ui-bridge.js +2 -194
- package/dist/runtime/client/webview-bridge.d.ts +31 -0
- package/dist/runtime/client/webview-bridge.js +97 -0
- package/dist/runtime/client/webview.service.d.ts +14 -0
- package/dist/runtime/client/webview.service.js +98 -0
- package/dist/runtime/server/adapter/index.d.ts +5 -0
- package/dist/runtime/server/adapter/index.js +5 -0
- package/dist/runtime/server/adapter/node-npc-lifecycle-server.d.ts +12 -0
- package/dist/runtime/server/adapter/node-npc-lifecycle-server.js +52 -0
- package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.d.ts +22 -0
- package/dist/runtime/server/adapter/node-player-appearance-lifecycle-server.js +94 -0
- package/dist/runtime/server/adapter/node-player-lifecycle-server.d.ts +11 -0
- package/dist/runtime/server/adapter/node-player-lifecycle-server.js +55 -0
- package/dist/runtime/server/adapter/node-player-state-sync-server.d.ts +12 -0
- package/dist/runtime/server/adapter/node-player-state-sync-server.js +49 -0
- package/dist/runtime/server/adapter/node-server-adapter.d.ts +5 -0
- package/dist/runtime/server/adapter/node-server-adapter.js +67 -0
- package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.d.ts +13 -0
- package/dist/runtime/server/adapter/node-vehicle-lifecycle-server.js +57 -0
- package/dist/runtime/server/adapter/player-adapter.d.ts +28 -0
- package/dist/runtime/server/adapter/player-adapter.js +28 -0
- package/dist/runtime/server/adapter/registry.d.ts +26 -0
- package/dist/runtime/server/adapter/registry.js +101 -0
- package/dist/runtime/server/adapter/serialization.d.ts +6 -0
- package/dist/runtime/server/adapter/serialization.js +9 -0
- package/dist/runtime/server/adapter/server-adapter.d.ts +28 -0
- package/dist/runtime/server/adapter/server-adapter.js +14 -0
- package/dist/runtime/server/api.d.ts +2 -1
- package/dist/runtime/server/api.js +2 -1
- package/dist/runtime/server/apis/appearance.api.d.ts +5 -3
- package/dist/runtime/server/apis/appearance.api.js +20 -7
- package/dist/runtime/server/apis/npcs.api.d.ts +3 -4
- package/dist/runtime/server/apis/npcs.api.js +26 -56
- package/dist/runtime/server/apis/vehicle-modification.api.d.ts +3 -1
- package/dist/runtime/server/apis/vehicle-modification.api.js +9 -4
- package/dist/runtime/server/apis/vehicles.api.d.ts +12 -6
- package/dist/runtime/server/apis/vehicles.api.js +48 -36
- package/dist/runtime/server/bootstrap.js +15 -7
- package/dist/runtime/server/controllers/channel.controller.js +2 -1
- package/dist/runtime/server/controllers/command-export.controller.js +1 -1
- package/dist/runtime/server/controllers/player-export.controller.js +5 -4
- package/dist/runtime/server/controllers/session.controller.js +3 -2
- package/dist/runtime/server/controllers/vehicle.controller.d.ts +3 -1
- package/dist/runtime/server/controllers/vehicle.controller.js +10 -5
- package/dist/runtime/server/core.d.ts +2 -0
- package/dist/runtime/server/core.js +9 -1
- package/dist/runtime/server/decorators/onRuntimeEvent.d.ts +2 -1
- package/dist/runtime/server/entities/npc.d.ts +2 -0
- package/dist/runtime/server/entities/npc.js +3 -3
- package/dist/runtime/server/entities/player.d.ts +8 -11
- package/dist/runtime/server/entities/player.js +39 -28
- package/dist/runtime/server/entities/vehicle.js +2 -2
- package/dist/runtime/server/error-handler.js +13 -2
- package/dist/runtime/server/helpers/command-validation.helper.js +1 -1
- package/dist/runtime/server/implementations/local/player.local.d.ts +7 -3
- package/dist/runtime/server/implementations/local/player.local.js +23 -11
- package/dist/runtime/server/implementations/remote/channel.remote.d.ts +2 -1
- package/dist/runtime/server/implementations/remote/channel.remote.js +5 -2
- package/dist/runtime/server/implementations/remote/command.remote.d.ts +3 -1
- package/dist/runtime/server/implementations/remote/command.remote.js +9 -4
- package/dist/runtime/server/implementations/remote/player.remote.d.ts +7 -10
- package/dist/runtime/server/implementations/remote/player.remote.js +24 -29
- package/dist/runtime/server/library/create-server-library.js +17 -2
- package/dist/runtime/server/runtime.d.ts +3 -0
- package/dist/runtime/server/runtime.js +1 -15
- package/dist/runtime/server/services/appearance.service.d.ts +0 -95
- package/dist/runtime/server/services/appearance.service.js +15 -192
- package/dist/runtime/server/services/services.register.js +56 -24
- package/dist/runtime/server/system/processors/netEvent.processor.js +1 -1
- package/dist/runtime/server/system/processors/onRpc.processor.js +1 -1
- package/dist/runtime/server/system/processors/runtimeEvent.processor.d.ts +2 -1
- package/dist/runtime/server/system/processors/runtimeEvent.processor.js +1 -1
- package/dist/runtime/server/types/core-exports.types.d.ts +5 -0
- package/dist/runtime/shared/helpers/process-tuple-schema.d.ts +2 -0
- package/dist/runtime/shared/helpers/process-tuple-schema.js +29 -0
- package/package.json +21 -3
- package/dist/adapters/cfx/cfx-capabilities.d.ts +0 -16
- package/dist/adapters/cfx/cfx-capabilities.js +0 -70
- package/dist/adapters/cfx/cfx-platform.d.ts +0 -2
- package/dist/adapters/cfx/cfx-platform.js +0 -85
- package/dist/adapters/cfx/index.d.ts +0 -3
- package/dist/adapters/cfx/index.js +0 -3
- package/dist/adapters/cfx/runtime-profile.d.ts +0 -3
- package/dist/adapters/cfx/runtime-profile.js +0 -37
- package/dist/adapters/contracts/IPlatformCapabilities.d.ts +0 -79
- package/dist/adapters/contracts/IPlatformCapabilities.js +0 -27
- package/dist/adapters/contracts/client/IPedAppearanceClient.d.ts +0 -206
- package/dist/adapters/contracts/client/IPedAppearanceClient.js +0 -12
- package/dist/adapters/fivem/fivem-capabilities.d.ts +0 -18
- package/dist/adapters/fivem/fivem-capabilities.js +0 -61
- package/dist/adapters/fivem/fivem-engine-events.d.ts +0 -5
- package/dist/adapters/fivem/fivem-engine-events.js +0 -24
- package/dist/adapters/fivem/fivem-entity-server.d.ts +0 -26
- package/dist/adapters/fivem/fivem-entity-server.js +0 -87
- package/dist/adapters/fivem/fivem-exports.d.ts +0 -5
- package/dist/adapters/fivem/fivem-exports.js +0 -9
- package/dist/adapters/fivem/fivem-hasher.d.ts +0 -7
- package/dist/adapters/fivem/fivem-net-transport.d.ts +0 -1
- package/dist/adapters/fivem/fivem-ped-appearance-client.d.ts +0 -34
- package/dist/adapters/fivem/fivem-ped-appearance-client.js +0 -79
- package/dist/adapters/fivem/fivem-ped-appearance-server.d.ts +0 -14
- package/dist/adapters/fivem/fivem-ped-appearance-server.js +0 -22
- package/dist/adapters/fivem/fivem-ped-server.d.ts +0 -9
- package/dist/adapters/fivem/fivem-ped-server.js +0 -30
- package/dist/adapters/fivem/fivem-platform.d.ts +0 -5
- package/dist/adapters/fivem/fivem-platform.js +0 -74
- package/dist/adapters/fivem/fivem-player-server.d.ts +0 -24
- package/dist/adapters/fivem/fivem-player-server.js +0 -83
- package/dist/adapters/fivem/fivem-playerinfo.d.ts +0 -6
- package/dist/adapters/fivem/fivem-playerinfo.js +0 -10
- package/dist/adapters/fivem/fivem-resourceinfo.d.ts +0 -5
- package/dist/adapters/fivem/fivem-resourceinfo.js +0 -24
- package/dist/adapters/fivem/fivem-tick.d.ts +0 -7
- package/dist/adapters/fivem/fivem-vehicle-server.d.ts +0 -15
- package/dist/adapters/fivem/fivem-vehicle-server.js +0 -44
- package/dist/adapters/fivem/index.d.ts +0 -14
- package/dist/adapters/fivem/index.js +0 -16
- package/dist/adapters/fivem/transport/adapter.d.ts +0 -8
- package/dist/adapters/fivem/transport/adapter.js +0 -8
- package/dist/adapters/fivem/transport/fivem.events.d.ts +0 -8
- package/dist/adapters/fivem/transport/fivem.events.js +0 -36
- package/dist/adapters/fivem/transport/fivem.rpc.d.ts +0 -28
- package/dist/adapters/fivem/transport/fivem.rpc.js +0 -183
- package/dist/runtime/client/controllers/player-sync.controller.d.ts +0 -11
- package/dist/runtime/client/controllers/player-sync.controller.js +0 -51
- package/dist/runtime/client/player/player.d.ts +0 -262
- package/dist/runtime/client/player/player.js +0 -474
- package/dist/runtime/client/player/player.loader.d.ts +0 -1
- package/dist/runtime/client/player/player.loader.js +0 -18
- package/dist/runtime/server/helpers/process-tuple-schema.d.ts +0 -20
- package/dist/runtime/server/helpers/process-tuple-schema.js +0 -56
- /package/dist/adapters/{fivem/fivem-net-transport.js → contracts/client/spawn/types.js} +0 -0
|
@@ -4,145 +4,110 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from 'tsyringe';
|
|
14
|
+
import { IClientMarkerBridge, } from '../../../adapters/contracts/client/ui/IClientMarkerBridge';
|
|
8
15
|
const DEFAULT_OPTIONS = {
|
|
16
|
+
variant: 1,
|
|
9
17
|
type: 1,
|
|
18
|
+
size: { x: 1.0, y: 1.0, z: 1.0 },
|
|
10
19
|
scale: { x: 1.0, y: 1.0, z: 1.0 },
|
|
11
20
|
rotation: { x: 0, y: 0, z: 0 },
|
|
12
21
|
color: { r: 255, g: 0, b: 0, a: 200 },
|
|
22
|
+
bob: false,
|
|
13
23
|
bobUpAndDown: false,
|
|
14
24
|
faceCamera: false,
|
|
15
25
|
rotate: false,
|
|
16
26
|
drawOnEnts: false,
|
|
27
|
+
visible: true,
|
|
17
28
|
};
|
|
18
|
-
/**
|
|
19
|
-
* Service for managing and rendering markers in the game world.
|
|
20
|
-
* Handles automatic rendering via tick.
|
|
21
|
-
*/
|
|
22
29
|
let MarkerService = class MarkerService {
|
|
23
|
-
markers
|
|
24
|
-
|
|
30
|
+
markers;
|
|
31
|
+
activeMarkers = new Map();
|
|
25
32
|
idCounter = 0;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @param position - World position for the marker
|
|
30
|
-
* @param options - Marker appearance options
|
|
31
|
-
* @returns The marker ID
|
|
32
|
-
*/
|
|
33
|
+
constructor(markers) {
|
|
34
|
+
this.markers = markers;
|
|
35
|
+
}
|
|
33
36
|
create(position, options = {}) {
|
|
34
37
|
const id = `marker_${++this.idCounter}`;
|
|
35
|
-
const
|
|
38
|
+
const definition = this.buildDefinition(position, options);
|
|
39
|
+
this.markers.create(id, definition);
|
|
40
|
+
this.activeMarkers.set(id, {
|
|
36
41
|
id,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
visible: true,
|
|
40
|
-
};
|
|
41
|
-
this.markers.set(id, marker);
|
|
42
|
-
this.ensureTickRunning();
|
|
42
|
+
definition,
|
|
43
|
+
});
|
|
43
44
|
return id;
|
|
44
45
|
}
|
|
45
|
-
/**
|
|
46
|
-
* Remove a marker by ID.
|
|
47
|
-
*
|
|
48
|
-
* @param id - The marker ID to remove
|
|
49
|
-
*/
|
|
50
46
|
remove(id) {
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
const removed = this.markers.remove(id);
|
|
48
|
+
if (removed)
|
|
49
|
+
this.activeMarkers.delete(id);
|
|
50
|
+
return removed;
|
|
54
51
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Remove all markers.
|
|
57
|
-
*/
|
|
58
52
|
removeAll() {
|
|
59
53
|
this.markers.clear();
|
|
60
|
-
this.
|
|
54
|
+
this.activeMarkers.clear();
|
|
61
55
|
}
|
|
62
|
-
/**
|
|
63
|
-
* Update a marker's position.
|
|
64
|
-
*
|
|
65
|
-
* @param id - The marker ID
|
|
66
|
-
* @param position - New position
|
|
67
|
-
*/
|
|
68
56
|
setPosition(id, position) {
|
|
69
|
-
const marker = this.
|
|
57
|
+
const marker = this.activeMarkers.get(id);
|
|
70
58
|
if (!marker)
|
|
71
59
|
return false;
|
|
72
|
-
|
|
73
|
-
|
|
60
|
+
const updated = this.markers.update(id, { position });
|
|
61
|
+
if (!updated)
|
|
62
|
+
return false;
|
|
63
|
+
marker.definition = { ...marker.definition, position };
|
|
64
|
+
return updated;
|
|
74
65
|
}
|
|
75
|
-
/**
|
|
76
|
-
* Update marker options.
|
|
77
|
-
*
|
|
78
|
-
* @param id - The marker ID
|
|
79
|
-
* @param options - Options to update
|
|
80
|
-
*/
|
|
81
66
|
setOptions(id, options) {
|
|
82
|
-
const marker = this.
|
|
67
|
+
const marker = this.activeMarkers.get(id);
|
|
83
68
|
if (!marker)
|
|
84
69
|
return false;
|
|
85
|
-
|
|
86
|
-
|
|
70
|
+
const patch = this.normalizeOptions(options);
|
|
71
|
+
const updated = this.markers.update(id, patch);
|
|
72
|
+
if (!updated)
|
|
73
|
+
return false;
|
|
74
|
+
marker.definition = { ...marker.definition, ...patch };
|
|
75
|
+
return updated;
|
|
87
76
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Set marker visibility.
|
|
90
|
-
*
|
|
91
|
-
* @param id - The marker ID
|
|
92
|
-
* @param visible - Whether the marker should be visible
|
|
93
|
-
*/
|
|
94
77
|
setVisible(id, visible) {
|
|
95
|
-
|
|
96
|
-
if (!marker)
|
|
97
|
-
return false;
|
|
98
|
-
marker.visible = visible;
|
|
99
|
-
return true;
|
|
78
|
+
return this.setOptions(id, { visible });
|
|
100
79
|
}
|
|
101
|
-
/**
|
|
102
|
-
* Get a marker by ID.
|
|
103
|
-
*/
|
|
104
80
|
get(id) {
|
|
105
|
-
return this.
|
|
81
|
+
return this.activeMarkers.get(id);
|
|
106
82
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Get all managed markers.
|
|
109
|
-
*/
|
|
110
83
|
getAll() {
|
|
111
|
-
return Array.from(this.
|
|
84
|
+
return Array.from(this.activeMarkers.values());
|
|
112
85
|
}
|
|
113
|
-
/**
|
|
114
|
-
* Draw a marker immediately (one frame only).
|
|
115
|
-
* For persistent markers, use create() instead.
|
|
116
|
-
*/
|
|
117
86
|
drawOnce(position, options = {}) {
|
|
118
|
-
|
|
119
|
-
DrawMarker(opts.type, position.x, position.y, position.z, 0, 0, 0, opts.rotation.x, opts.rotation.y, opts.rotation.z, opts.scale.x, opts.scale.y, opts.scale.z, opts.color.r, opts.color.g, opts.color.b, opts.color.a, opts.bobUpAndDown, opts.faceCamera, 2, opts.rotate, null, null, opts.drawOnEnts);
|
|
87
|
+
this.markers.draw(this.buildDefinition(position, options));
|
|
120
88
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return;
|
|
124
|
-
this.tickHandle = setTick(() => {
|
|
125
|
-
for (const marker of this.markers.values()) {
|
|
126
|
-
if (!marker.visible)
|
|
127
|
-
continue;
|
|
128
|
-
const { position, options } = marker;
|
|
129
|
-
DrawMarker(options.type, position.x, position.y, position.z, 0, 0, 0, options.rotation.x, options.rotation.y, options.rotation.z, options.scale.x, options.scale.y, options.scale.z, options.color.r, options.color.g, options.color.b, options.color.a, options.bobUpAndDown, options.faceCamera, 2, options.rotate, null, null, options.drawOnEnts);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
89
|
+
exists(id) {
|
|
90
|
+
return this.markers.exists(id);
|
|
132
91
|
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.
|
|
137
|
-
}
|
|
92
|
+
buildDefinition(position, options) {
|
|
93
|
+
return {
|
|
94
|
+
position,
|
|
95
|
+
...this.normalizeOptions({ ...DEFAULT_OPTIONS, ...options }),
|
|
96
|
+
};
|
|
138
97
|
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
98
|
+
normalizeOptions(options) {
|
|
99
|
+
const { type, variant, scale, size, bob, bobUpAndDown, ...rest } = options;
|
|
100
|
+
return {
|
|
101
|
+
...rest,
|
|
102
|
+
variant: variant ?? type,
|
|
103
|
+
size: size ?? scale,
|
|
104
|
+
bob: bob ?? bobUpAndDown,
|
|
105
|
+
};
|
|
143
106
|
}
|
|
144
107
|
};
|
|
145
108
|
MarkerService = __decorate([
|
|
146
|
-
injectable()
|
|
109
|
+
injectable(),
|
|
110
|
+
__param(0, inject(IClientMarkerBridge)),
|
|
111
|
+
__metadata("design:paramtypes", [IClientMarkerBridge])
|
|
147
112
|
], MarkerService);
|
|
148
113
|
export { MarkerService };
|
|
@@ -1,76 +1,25 @@
|
|
|
1
|
+
import { IClientNotificationBridge, type ClientNotificationDefinition } from '../../../adapters/contracts/client/ui/IClientNotificationBridge';
|
|
2
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
1
3
|
export type NotificationType = 'info' | 'success' | 'warning' | 'error';
|
|
2
4
|
export interface AdvancedNotificationOptions {
|
|
3
|
-
/** Notification title */
|
|
4
5
|
title: string;
|
|
5
|
-
/** Notification subtitle */
|
|
6
6
|
subtitle?: string;
|
|
7
|
-
/** Message text */
|
|
8
7
|
message: string;
|
|
9
|
-
/** Texture dictionary for the icon */
|
|
10
|
-
textureDict?: string;
|
|
11
|
-
/** Texture name for the icon */
|
|
12
|
-
textureName?: string;
|
|
13
|
-
/** Icon type (1-7) */
|
|
14
|
-
iconType?: number;
|
|
15
|
-
/** Flash the notification */
|
|
16
8
|
flash?: boolean;
|
|
17
|
-
/** Save to brief (map menu) */
|
|
18
9
|
saveToBrief?: boolean;
|
|
19
|
-
/** Background color index */
|
|
20
10
|
backgroundColor?: number;
|
|
21
11
|
}
|
|
22
|
-
/**
|
|
23
|
-
* Service for displaying native GTA V notifications.
|
|
24
|
-
*/
|
|
25
12
|
export declare class NotificationService {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @param message - The message to display
|
|
30
|
-
* @param blink - Whether the notification should blink
|
|
31
|
-
*/
|
|
13
|
+
private readonly notifications;
|
|
14
|
+
private readonly platform;
|
|
15
|
+
constructor(notifications: IClientNotificationBridge, platform: IClientPlatformBridge);
|
|
32
16
|
show(message: string, blink?: boolean): void;
|
|
33
|
-
/**
|
|
34
|
-
* Show a notification with a type indicator using throbber icons.
|
|
35
|
-
*
|
|
36
|
-
* @param message - The message to display
|
|
37
|
-
* @param type - The notification type
|
|
38
|
-
*/
|
|
39
17
|
showWithType(message: string, type?: NotificationType): void;
|
|
40
|
-
/**
|
|
41
|
-
* Show an advanced notification with picture/icon.
|
|
42
|
-
*
|
|
43
|
-
* @param options - Advanced notification options
|
|
44
|
-
*/
|
|
45
18
|
showAdvanced(options: AdvancedNotificationOptions): void;
|
|
46
|
-
/**
|
|
47
|
-
* Show a help notification (appears at top-left).
|
|
48
|
-
*
|
|
49
|
-
* @param message - The help message
|
|
50
|
-
* @param duration - How long to show in milliseconds (-1 for indefinite)
|
|
51
|
-
* @param beep - Play a beep sound
|
|
52
|
-
* @param looped - Keep showing until cleared
|
|
53
|
-
*/
|
|
54
19
|
showHelp(message: string, duration?: number, beep?: boolean, looped?: boolean): void;
|
|
55
|
-
/**
|
|
56
|
-
* Clear all help messages.
|
|
57
|
-
*/
|
|
58
20
|
clearHelp(): void;
|
|
59
|
-
/**
|
|
60
|
-
* Show a subtitle (centered at bottom of screen).
|
|
61
|
-
*
|
|
62
|
-
* @param message - The subtitle text
|
|
63
|
-
* @param duration - Duration in milliseconds
|
|
64
|
-
*/
|
|
65
21
|
showSubtitle(message: string, duration?: number): void;
|
|
66
|
-
/**
|
|
67
|
-
* Clear the current subtitle.
|
|
68
|
-
*/
|
|
69
22
|
clearSubtitle(): void;
|
|
70
|
-
/**
|
|
71
|
-
* Show a floating help text above the player's head.
|
|
72
|
-
*
|
|
73
|
-
* @param message - The message to display
|
|
74
|
-
*/
|
|
75
23
|
showFloatingHelp(message: string): void;
|
|
24
|
+
showRaw(definition: ClientNotificationDefinition): void;
|
|
76
25
|
}
|
|
@@ -4,105 +4,67 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
+
};
|
|
13
|
+
import { inject, injectable } from 'tsyringe';
|
|
14
|
+
import { IClientNotificationBridge, } from '../../../adapters/contracts/client/ui/IClientNotificationBridge';
|
|
15
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
11
16
|
let NotificationService = class NotificationService {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
notifications;
|
|
18
|
+
platform;
|
|
19
|
+
constructor(notifications, platform) {
|
|
20
|
+
this.notifications = notifications;
|
|
21
|
+
this.platform = platform;
|
|
22
|
+
}
|
|
18
23
|
show(message, blink = false) {
|
|
19
|
-
|
|
20
|
-
AddTextComponentString(message);
|
|
21
|
-
DrawNotification(blink, true);
|
|
24
|
+
this.notifications.show({ kind: 'feed', message, blink, saveToBrief: true });
|
|
22
25
|
}
|
|
23
|
-
/**
|
|
24
|
-
* Show a notification with a type indicator using throbber icons.
|
|
25
|
-
*
|
|
26
|
-
* @param message - The message to display
|
|
27
|
-
* @param type - The notification type
|
|
28
|
-
*/
|
|
29
26
|
showWithType(message, type = 'info') {
|
|
30
|
-
|
|
31
|
-
info: 1,
|
|
32
|
-
success: 2,
|
|
33
|
-
warning: 3,
|
|
34
|
-
error: 4,
|
|
35
|
-
};
|
|
36
|
-
BeginTextCommandThefeedPost('STRING');
|
|
37
|
-
AddTextComponentString(message);
|
|
38
|
-
EndTextCommandThefeedPostMessagetext('CHAR_SOCIAL_CLUB', 'CHAR_SOCIAL_CLUB', true, iconMap[type], '', message);
|
|
27
|
+
this.notifications.show({ kind: 'typed', message, type });
|
|
39
28
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Show an advanced notification with picture/icon.
|
|
42
|
-
*
|
|
43
|
-
* @param options - Advanced notification options
|
|
44
|
-
*/
|
|
45
29
|
showAdvanced(options) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
30
|
+
this.notifications.show({
|
|
31
|
+
kind: 'advanced',
|
|
32
|
+
title: options.title,
|
|
33
|
+
subtitle: options.subtitle,
|
|
34
|
+
message: options.message,
|
|
35
|
+
flash: options.flash,
|
|
36
|
+
saveToBrief: options.saveToBrief,
|
|
37
|
+
backgroundColor: options.backgroundColor,
|
|
38
|
+
});
|
|
54
39
|
}
|
|
55
|
-
/**
|
|
56
|
-
* Show a help notification (appears at top-left).
|
|
57
|
-
*
|
|
58
|
-
* @param message - The help message
|
|
59
|
-
* @param duration - How long to show in milliseconds (-1 for indefinite)
|
|
60
|
-
* @param beep - Play a beep sound
|
|
61
|
-
* @param looped - Keep showing until cleared
|
|
62
|
-
*/
|
|
63
40
|
showHelp(message, duration = 5000, beep = true, looped = false) {
|
|
64
|
-
|
|
65
|
-
AddTextComponentSubstringPlayerName(message);
|
|
66
|
-
EndTextCommandDisplayHelp(0, looped, beep, duration);
|
|
41
|
+
this.notifications.show({ kind: 'help', message, duration, beep, looped });
|
|
67
42
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Clear all help messages.
|
|
70
|
-
*/
|
|
71
43
|
clearHelp() {
|
|
72
|
-
|
|
44
|
+
this.notifications.clear('help');
|
|
73
45
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Show a subtitle (centered at bottom of screen).
|
|
76
|
-
*
|
|
77
|
-
* @param message - The subtitle text
|
|
78
|
-
* @param duration - Duration in milliseconds
|
|
79
|
-
*/
|
|
80
46
|
showSubtitle(message, duration = 2500) {
|
|
81
|
-
|
|
82
|
-
AddTextComponentSubstringPlayerName(message);
|
|
83
|
-
EndTextCommandPrint(duration, true);
|
|
47
|
+
this.notifications.show({ kind: 'subtitle', message, duration });
|
|
84
48
|
}
|
|
85
|
-
/**
|
|
86
|
-
* Clear the current subtitle.
|
|
87
|
-
*/
|
|
88
49
|
clearSubtitle() {
|
|
89
|
-
|
|
50
|
+
this.notifications.clear('subtitle');
|
|
90
51
|
}
|
|
91
|
-
/**
|
|
92
|
-
* Show a floating help text above the player's head.
|
|
93
|
-
*
|
|
94
|
-
* @param message - The message to display
|
|
95
|
-
*/
|
|
96
52
|
showFloatingHelp(message) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
53
|
+
this.notifications.show({
|
|
54
|
+
kind: 'floating',
|
|
55
|
+
message,
|
|
56
|
+
worldPosition: this.platform.getEntityCoords(this.platform.getLocalPlayerPed()),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
showRaw(definition) {
|
|
60
|
+
this.notifications.show(definition);
|
|
103
61
|
}
|
|
104
62
|
};
|
|
105
63
|
NotificationService = __decorate([
|
|
106
|
-
injectable()
|
|
64
|
+
injectable(),
|
|
65
|
+
__param(0, inject(IClientNotificationBridge)),
|
|
66
|
+
__param(1, inject(IClientPlatformBridge)),
|
|
67
|
+
__metadata("design:paramtypes", [IClientNotificationBridge,
|
|
68
|
+
IClientPlatformBridge])
|
|
107
69
|
], NotificationService);
|
|
108
70
|
export { NotificationService };
|
|
@@ -1,34 +1,21 @@
|
|
|
1
1
|
import { Vector3 } from '../../../kernel/utils/vector3';
|
|
2
|
+
import { IClientPlatformBridge } from '../adapter/platform-bridge';
|
|
2
3
|
export interface PedSpawnOptions {
|
|
3
|
-
/** Model name or hash */
|
|
4
4
|
model: string;
|
|
5
|
-
/** Spawn position */
|
|
6
5
|
position: Vector3;
|
|
7
|
-
/** Heading/rotation */
|
|
8
6
|
heading?: number;
|
|
9
|
-
/** Network the ped */
|
|
10
7
|
networked?: boolean;
|
|
11
|
-
/** Make the ped a mission entity */
|
|
12
8
|
missionEntity?: boolean;
|
|
13
|
-
/** Relationship group */
|
|
14
9
|
relationshipGroup?: string;
|
|
15
|
-
/** Whether to block non-temporary events */
|
|
16
10
|
blockEvents?: boolean;
|
|
17
11
|
}
|
|
18
12
|
export interface PedAnimationOptions {
|
|
19
|
-
/** Animation dictionary */
|
|
20
13
|
dict: string;
|
|
21
|
-
/** Animation name */
|
|
22
14
|
anim: string;
|
|
23
|
-
/** Blend in speed */
|
|
24
15
|
blendInSpeed?: number;
|
|
25
|
-
/** Blend out speed */
|
|
26
16
|
blendOutSpeed?: number;
|
|
27
|
-
/** Duration (-1 for looped) */
|
|
28
17
|
duration?: number;
|
|
29
|
-
/** Animation flags */
|
|
30
18
|
flags?: number;
|
|
31
|
-
/** Playback rate */
|
|
32
19
|
playbackRate?: number;
|
|
33
20
|
}
|
|
34
21
|
export interface ManagedPed {
|
|
@@ -37,146 +24,32 @@ export interface ManagedPed {
|
|
|
37
24
|
model: string;
|
|
38
25
|
position: Vector3;
|
|
39
26
|
}
|
|
40
|
-
/**
|
|
41
|
-
* Service for ped (NPC) operations and management.
|
|
42
|
-
*/
|
|
43
27
|
export declare class PedService {
|
|
28
|
+
private readonly platform;
|
|
44
29
|
private peds;
|
|
45
30
|
private idCounter;
|
|
46
|
-
|
|
47
|
-
* Spawn a ped at a position.
|
|
48
|
-
*
|
|
49
|
-
* @param options - Spawn options
|
|
50
|
-
* @returns The ped ID and handle
|
|
51
|
-
*/
|
|
31
|
+
constructor(platform: IClientPlatformBridge);
|
|
52
32
|
spawn(options: PedSpawnOptions): Promise<{
|
|
53
33
|
id: string;
|
|
54
34
|
handle: number;
|
|
55
35
|
}>;
|
|
56
|
-
/**
|
|
57
|
-
* Delete a ped by ID.
|
|
58
|
-
*
|
|
59
|
-
* @param id - The ped ID
|
|
60
|
-
*/
|
|
61
36
|
delete(id: string): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Delete a ped by handle.
|
|
64
|
-
*
|
|
65
|
-
* @param handle - The ped handle
|
|
66
|
-
*/
|
|
67
37
|
deleteByHandle(handle: number): void;
|
|
68
|
-
/**
|
|
69
|
-
* Delete all managed peds.
|
|
70
|
-
*/
|
|
71
38
|
deleteAll(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Play an animation on a ped.
|
|
74
|
-
*
|
|
75
|
-
* @param handle - Ped handle
|
|
76
|
-
* @param options - Animation options
|
|
77
|
-
*/
|
|
78
39
|
playAnimation(handle: number, options: PedAnimationOptions): Promise<void>;
|
|
79
|
-
/**
|
|
80
|
-
* Stop all animations on a ped.
|
|
81
|
-
*
|
|
82
|
-
* @param handle - Ped handle
|
|
83
|
-
*/
|
|
84
40
|
stopAnimation(handle: number): void;
|
|
85
|
-
/**
|
|
86
|
-
* Stop animation immediately on a ped.
|
|
87
|
-
*
|
|
88
|
-
* @param handle - Ped handle
|
|
89
|
-
*/
|
|
90
41
|
stopAnimationImmediately(handle: number): void;
|
|
91
|
-
/**
|
|
92
|
-
* Freeze a ped in place.
|
|
93
|
-
*
|
|
94
|
-
* @param handle - Ped handle
|
|
95
|
-
* @param freeze - Whether to freeze
|
|
96
|
-
*/
|
|
97
42
|
freeze(handle: number, freeze: boolean): void;
|
|
98
|
-
/**
|
|
99
|
-
* Set ped invincibility.
|
|
100
|
-
*
|
|
101
|
-
* @param handle - Ped handle
|
|
102
|
-
* @param invincible - Whether invincible
|
|
103
|
-
*/
|
|
104
43
|
setInvincible(handle: number, invincible: boolean): void;
|
|
105
|
-
/**
|
|
106
|
-
* Give a weapon to a ped.
|
|
107
|
-
*
|
|
108
|
-
* @param handle - Ped handle
|
|
109
|
-
* @param weapon - Weapon name/hash
|
|
110
|
-
* @param ammo - Ammo count
|
|
111
|
-
* @param hidden - Whether to hide the weapon
|
|
112
|
-
* @param forceInHand - Whether to force weapon in hand
|
|
113
|
-
*/
|
|
114
44
|
giveWeapon(handle: number, weapon: string, ammo?: number, hidden?: boolean, forceInHand?: boolean): void;
|
|
115
|
-
/**
|
|
116
|
-
* Remove all weapons from a ped.
|
|
117
|
-
*
|
|
118
|
-
* @param handle - Ped handle
|
|
119
|
-
*/
|
|
120
45
|
removeAllWeapons(handle: number): void;
|
|
121
|
-
/**
|
|
122
|
-
* Get the closest ped to the player.
|
|
123
|
-
*
|
|
124
|
-
* @param radius - Search radius
|
|
125
|
-
* @param excludePlayer - Exclude the player ped
|
|
126
|
-
* @returns Ped handle or null
|
|
127
|
-
*/
|
|
128
46
|
getClosest(radius?: number, excludePlayer?: boolean): number | null;
|
|
129
|
-
/**
|
|
130
|
-
* Get all peds in a radius.
|
|
131
|
-
*
|
|
132
|
-
* @param position - Center position
|
|
133
|
-
* @param radius - Search radius
|
|
134
|
-
* @param excludePlayer - Exclude the player ped
|
|
135
|
-
* @returns Array of ped handles
|
|
136
|
-
*/
|
|
137
47
|
getNearby(position: Vector3, radius: number, excludePlayer?: boolean): number[];
|
|
138
|
-
/**
|
|
139
|
-
* Make ped look at entity.
|
|
140
|
-
*
|
|
141
|
-
* @param handle - Ped handle
|
|
142
|
-
* @param entity - Entity to look at
|
|
143
|
-
* @param duration - Duration in ms (-1 for infinite)
|
|
144
|
-
*/
|
|
145
48
|
lookAtEntity(handle: number, entity: number, duration?: number): void;
|
|
146
|
-
/**
|
|
147
|
-
* Make ped look at position.
|
|
148
|
-
*
|
|
149
|
-
* @param handle - Ped handle
|
|
150
|
-
* @param position - Position to look at
|
|
151
|
-
* @param duration - Duration in ms (-1 for infinite)
|
|
152
|
-
*/
|
|
153
49
|
lookAtCoords(handle: number, position: Vector3, duration?: number): void;
|
|
154
|
-
/**
|
|
155
|
-
* Make ped walk to position.
|
|
156
|
-
*
|
|
157
|
-
* @param handle - Ped handle
|
|
158
|
-
* @param position - Target position
|
|
159
|
-
* @param speed - Walking speed (1.0 = walk, 2.0 = run)
|
|
160
|
-
*/
|
|
161
50
|
walkTo(handle: number, position: Vector3, speed?: number): void;
|
|
162
|
-
/**
|
|
163
|
-
* Set ped combat attributes.
|
|
164
|
-
*
|
|
165
|
-
* @param handle - Ped handle
|
|
166
|
-
* @param canFight - Whether the ped can fight
|
|
167
|
-
* @param canUseCover - Whether the ped can use cover
|
|
168
|
-
*/
|
|
169
51
|
setCombatAttributes(handle: number, canFight: boolean, canUseCover?: boolean): void;
|
|
170
|
-
/**
|
|
171
|
-
* Get a managed ped by ID.
|
|
172
|
-
*/
|
|
173
52
|
get(id: string): ManagedPed | undefined;
|
|
174
|
-
/**
|
|
175
|
-
* Get all managed peds.
|
|
176
|
-
*/
|
|
177
53
|
getAll(): ManagedPed[];
|
|
178
|
-
/**
|
|
179
|
-
* Check if a managed ped still exists.
|
|
180
|
-
*/
|
|
181
54
|
exists(id: string): boolean;
|
|
182
55
|
}
|