From 181ddbf1c83693aa092fcf1dcf234ea350b327a0 Mon Sep 17 00:00:00 2001 From: TheLazySquid <76746384+TheLazySquid@users.noreply.github.com> Date: Tue, 21 Jul 2026 14:17:52 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#75294=20Replace=20?= =?UTF-8?q?Gimloader=20types=20with=20stub=20referencing=20new=20package?= =?UTF-8?q?=20by=20@TheLazySquid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/gimloader/gimloader-tests.ts | 326 +-- types/gimloader/index.d.ts | 3396 +--------------------------- types/gimloader/package.json | 6 +- 3 files changed, 4 insertions(+), 3724 deletions(-) diff --git a/types/gimloader/gimloader-tests.ts b/types/gimloader/gimloader-tests.ts index 0ad6a7366ce67f..0973a887cae522 100644 --- a/types/gimloader/gimloader-tests.ts +++ b/types/gimloader/gimloader-tests.ts @@ -1,324 +1,2 @@ -interface TestPlugin { - one: number; -} - -interface TestLib { - two: string; -} - -declare namespace Gimloader { - interface Plugins { - testPlugin: TestPlugin; - } - - interface Libraries { - testLib: TestLib; - } -} - -GL; // $ExpectType typeof Api -api; // $ExpectType Api - -new GL(); // $ExpectType Api - -api.React; // $ExpectType typeof React -api.UI; // $ExpectType Readonly -api.hotkeys; // $ExpectType Readonly -api.libs; // $ExpectType Readonly -api.net; // $ExpectType Readonly -api.patcher; // $ExpectType Readonly -api.plugins; // $ExpectType Readonly -api.rewriter; // $ExpectType Readonly -api.storage; // $ExpectType Readonly -api.commands; // $ExpectType Readonly - -GL.React; // $ExpectType typeof React -GL.UI; // $ExpectType Readonly -GL.hotkeys; // $ExpectType Readonly -GL.libs; // $ExpectType Readonly -GL.net; // $ExpectType Readonly -GL.patcher; // $ExpectType Readonly -GL.plugins; // $ExpectType Readonly -GL.rewriter; // $ExpectType Readonly -GL.storage; // $ExpectType Readonly -GL.commands; // $ExpectType Readonly - -api.plugin("testPlugin").one; // $ExpectType number -api.lib("testLib").two; // $ExpectType string -api.plugin("somethingElse"); // $ExpectType any - -// @ts-expect-error -GL.onStop; -// @ts-expect-error -GL.openSettingsMenu; -// @ts-expect-error -api.onStop(); -// @ts-expect-error -api.openSettingsMenu(); - -api.UI.showModal(document.createElement("div"), { - buttons: [ - { text: "Ok", onClick: () => {} }, - { text: "Ok", onClick: () => true }, - ], -}); - -api.requestReload(); -GL.net.gamemode; // $ExpectType string -api.UI.forceReactUpdate(); -api.net.gamemode; // $ExpectType string -api.net.onLoad((type, gamemode) => {}); -api.net.modifyFetchRequest("/path/*/thing", (options) => null); -api.net.modifyFetchRequest("/path/*/thing", (options) => options); -api.net.modifyFetchResponse("/path/*/thing", (response) => response); -api.rewriter.runInScope("App", (code, evalCode) => evalCode("something")); -api.rewriter.exposeVar("App", { - check: "someString", - find: /,(.+)=>{/, - callback: (theVar) => {}, - multiple: false, -}); - -// Test patcher -let object = { a: true, b: (arg1: number, arg2: string) => true }; -api.patcher.after(object, "b", (thisVal, args, returnVal) => { - args[0]; // $ExpectType number - args[1]; // $ExpectType string - returnVal; // $ExpectType boolean -}); -// @ts-expect-error -api.patcher.after(object, "a", () => {}); -api.patcher.swap(object, "b", function(arg1, args2) { - arg1; // $ExpectType number - args2; // $ExpectType string - return false; -}); - -// Test commands -api.commands.addCommand({ - text: "test", - hidden: () => false, - keywords: ["thing", "thing"], -}, async (context) => { - await context.number({ - title: "Number", - decimal: false, - max: 6, - min: 1, - }); - await context.select({ - title: "Select", - options: [ - { - label: "Option 1", - value: "option1", - }, - { - label: "Option 2", - value: "option2", - }, - ], - }); - await context.string({ - title: "String", - maxLength: 10, - }); -}); - -api.commands.addCommand({ text: () => "something" }, () => {}); - -// Test stores -GL.stores.phaser; // $ExpectType PhaserStore -window.stores.phaser; // $ExpectType PhaserStore -let worldManagerInstance!: Gimloader.Stores.WorldManager; -worldManagerInstance; // $ExpectType WorldManager - -api.stores.me.movementSpeed; // $ExpectType number -api.stores.loading.percentageAssetsLoaded; // $ExpectType number -api.stores.worldOptions.terrainOptions[0].name; // $ExpectType string - -api.stores.phaser.scene.add; // $ExpectType GameObjectFactory -api.stores.phaser.mainCharacter.input; // $ExpectType CharacterInput -api.stores.phaser.mainCharacter.physics.getBody().rigidBody.translation(); // $ExpectType Vector -api.stores.phaser.mainCharacter.physics.getBody().character.feetSensor; // $ExpectType Collider - -const { actionManager, characterManager, inputManager, tileManager, worldManager } = api.stores.phaser.scene; -actionManager; // $ExpectType ActionManager -characterManager; // $ExpectType CharacterManager -inputManager; // $ExpectType InputManager -tileManager; // $ExpectType TileManager -worldManager; // $ExpectType WorldManager - -let character = characterManager.characters.get("...")!; // $ExpectType Character -character.setIsMain(true); -inputManager.getMouseWorldXY(); // $ExpectType Vector -tileManager.layerManager.getActualLayerDepth("..."); // $ExpectType number -let device = worldManager.devices.getDeviceById("...")!; // $ExpectType Device -device.colliders.list; // $ExpectType ColliderEntry[] -device.colliders.list[0].options.r1; // $ExpectType number | undefined -device.state; // $ExpectType Record -worldManager.physics.bodies.staticBodies; // $ExpectType Set -worldManager.devices.interactives.findClosestInteractiveDevice([], 0, 0); // $ExpectType Device | undefined -worldManager.inGameTerrainBuilder.clearPreviewLayer(); - -// Test colyseus state -api.net.state.characters["..."].x; // $ExpectType number -api.net.state.characters.get("...")!.x; // $ExpectType number -api.net.state.teams[0].characters[0]; // $ExpectType string -api.net.state.mapSettings; // $ExpectType string -api.net.state.listen("teams", () => {}); -api.net.state.characters.onAdd((item, index) => { - item; // $ExpectType ObjectSchema - index; // $ExpectType string - item.listen("x", () => {}); -}); -api.net.state.teams.onAdd((item, index) => { - item; // $ExpectType ObjectSchema - index; // $ExpectType number -}); -api.net.state.characters.onRemove((item, index) => {}); -api.net.state.$callbacks; -api.net.state.characters.get("...")!.$callbacks; - -// Test settings -api.settings.something; -api.settings.somethingElse; -api.settings.something = 123; -api.settings.something = "abc"; -api.settings.something = {}; -api.settings.listen("someSetting", (val: any) => {}); -const settings = api.settings.create([ - { - type: "group", - title: "Group", - settings: [ - { - type: "toggle", - id: "toggle1", - title: "A Toggle", - description: "Some Toggle", - }, - ], - }, - { - type: "color", - id: "color1", - title: "A Color", - rgba: true, - default: "rgba(255, 0, 0, 1)", - onChange: (val: string) => {}, - }, - { - type: "dropdown", - id: "dropdown1", - options: [ - { label: "Option 1", value: "option1" }, - { label: "Option 2", value: "option2" }, - ], - title: "A Dropdown", - default: "option1", - onChange: (value: string) => {}, - }, - { - type: "multiselect", - id: "multiselect1", - options: [ - { label: "Option A", value: "optionA" }, - { label: "Option B", value: "optionB" }, - { label: "Option C", value: "optionC" }, - ], - title: "A Multiselect", - default: ["optionA", "optionC"], - onChange: (value: readonly string[]) => {}, - }, - { - type: "number", - id: "number1", - title: "A Number", - min: 5, - max: 10, - step: 2, - onChange: (value: number) => {}, - }, - { - type: "radio", - id: "radio1", - options: [ - { label: "Option A", value: "optionA" }, - { label: "Option B", value: "optionB" }, - { label: "Option C", value: "optionC" }, - ], - title: "A Radio", - default: "optionB", - description: "Pick one", - onChange: (value: string) => {}, - }, - { - type: "slider", - id: "slider1", - title: "A Slider", - min: 5, - max: 500, - step: 2, - formatter: (v: number) => v + "s", - ticks: [5, 100, 300, 400, 500], - onChange: (value: number) => {}, - }, - { - type: "text", - id: "text1", - title: "A Text", - placeholder: "Type", - maxLength: 50, - onChange: (value: string) => {}, - }, - { - type: "toggle", - id: "toggle2", - title: "Another Toggle", - default: true, - onChange: (value: boolean) => {}, - }, - { - type: "custom", - id: "custom1", - title: "Custom Setting", - default: 50, - render: (container: HTMLElement, value: any, update: (value: any) => void) => { - container.innerText = `Value is ${value}`; - container.onclick = () => update(value + 1); - }, - onChange: (value: any) => {}, - }, - { - type: "customsection", - id: "customsection1", - default: 50, - render: (container: HTMLElement, value: any, update: (value: any) => void) => { - container.innerText = `Value is ${value}`; - container.onclick = () => update(value + 1); - }, - onChange: (value: any) => {}, - }, -]); - -// @ts-expect-error -settings.listen("fakekey", () => {}); -// @ts-expect-error -settings.listen("number1", (value: string) => {}); -settings.listen("number1", (value) => { - value; // $ExpectType number -}); -// @ts-expect-error -settings.fakekey; -settings.toggle1; // $ExpectType boolean -settings.toggle2; // $ExpectType boolean -settings.color1; // $ExpectType string -settings.dropdown1; // $ExpectType string -settings.multiselect1; // $ExpectType readonly string[] -settings.number1; // $ExpectType number -settings.radio1; // $ExpectType string -settings.slider1; // $ExpectType number -settings.text1; // $ExpectType string -settings.custom1; // $ExpectType any -settings.customsection1; // $ExpectType any +GL; +api; diff --git a/types/gimloader/index.d.ts b/types/gimloader/index.d.ts index e79e9bad9133b4..2eb17f586d65d6 100644 --- a/types/gimloader/index.d.ts +++ b/types/gimloader/index.d.ts @@ -1,3395 +1 @@ -export {}; - -import { - Collider, - ColliderDesc, - KinematicCharacterController, - RigidBody, - RigidBodyDesc, - Vector, - World, -} from "@dimforge/rapier2d-compat"; -import EventEmitter2 from "eventemitter2"; -import { GameObjects, Input, Scene as BaseScene, Tweens, Types } from "phaser"; -import * as React$1 from "react"; - -declare global { - namespace Gimloader { - namespace Stores { - interface Shapes { - circles: number[][]; - lines: number[][]; - paths: number[][]; - rects: number[][]; - } - interface CustomAsset { - data: { - shapes: Shapes; - }; - icon: string; - id: string; - name: string; - optionId: string; - } - interface WorldCustomAssets { - customAssets: Map; - isUIOpen: boolean; - updateCounter: number; - } - interface CodeGridSchema { - allowChannelGrids: boolean; - customBlocks: any[]; - triggers: any[]; - } - interface WireConnection { - id: string; - name: string; - } - interface DeviceOption { - codeGridSchema: CodeGridSchema; - defaultState: Record; - description?: string; - id: string; - initialMemoryCost?: number; - maxOnMap?: number; - maximumRoleLevel?: number; - minimumRoleLevel?: number; - name?: string; - optionSchema: { - options: any[]; - }; - seasonTicketRequired?: boolean; - subsequentMemoryCost?: number; - supportedMapStyles?: string[]; - wireConfig: { - in: { - connections: WireConnection[]; - }; - out: { - connections: WireConnection[]; - }; - }; - } - interface DeviceData { - depth: number; - deviceOption: DeviceOption; - existsBeforeReconnect: boolean; - hooks: any; - id: string; - isPreview: boolean; - layerId: string; - name: any; - options: Record; - props: any; - x: number; - y: number; - } - interface CodeGridItem { - createdAt: number; - existsBeforeReconnect: boolean; - json: string; - triggerType: string; - owner?: string; - triggerValue?: string; - visitors: string[]; - } - interface CodeGrid { - existsBeforeReconnect: boolean; - items: Map; - } - interface DeviceState { - deviceId: string; - properties: Map; - } - interface WorldDevices { - codeGrids: Map; - devices: Map; - states: Map; - } - interface Tile { - collides: boolean; - depth: number; - terrain: string; - x: number; - y: number; - } - interface QueuedTile { - timestamp: number; - removedBodyIds: string[]; - } - interface Terrain { - currentTerrainUpdateId: number; - modifiedHealth: Map; - queuedTiles: Map; - teamColorTiles: Map; - tiles: Map; - } - interface GimkitWorld { - customAssets: WorldCustomAssets; - devices: WorldDevices; - height: number; - width: number; - mapOptionsJSON: string; - terrain: Terrain; - wires: { - wires: Map; - }; - } - interface ExistingDevice { - action: string; - id: string; - shiftX: number; - shiftY: number; - use: boolean; - } - interface AddingDevices { - currentlySelectedProp: string; - existingDevice: ExistingDevice; - selectedDeviceType: string; - } - interface AddingTerrain { - brushSize: number; - buildTerrainAsWall: boolean; - currentlySelectedTerrain: string; - currentlySelectedTerrainDepth: number; - } - interface AddingWires { - hoveringOverSupportedDevice: boolean; - pointUnderMouseDeviceId?: string; - startDeviceSelected: boolean; - } - interface Adding { - devices: AddingDevices; - terrain: AddingTerrain; - wires: AddingWires; - mode: string; - } - interface CinematicMode { - charactersVisible: boolean; - enabled: boolean; - followingMainCharacter: boolean; - hidingGUI: boolean; - mainCharacterVisible: boolean; - nameTagsVisible: boolean; - } - interface ClassDesigner { - activeClassDeviceId: string; - lastActivatedClassDeviceId: string; - lastClassDeviceActivationId: number; - } - interface Context { - cursorIsOverCharacterId: string; - __devicesUnderCursor: string[]; - __wiresUnderCursor: Set; - cursorIsOverDevice: boolean; - cursorIsOverWire: boolean; - } - interface MeCustomAssets { - currentData?: { - shapes: Shapes; - }; - currentIcon: string; - currentId: string; - currentName: string; - currentOptionId: string; - isUIOpen: boolean; - openOptionId: string | null; - pendingDeleteId: string | null; - showDeleteConfirm: boolean; - } - interface MeDeviceUI { - current: { - deviceId: string; - props: Record; - }; - desiredOpenDeviceId?: string; - serverVersionOpenDeviceId: string; - } - interface CurrentlyEditedDevice { - deviceOptionId: string; - id: string; - } - interface SortingState { - depth: number; - deviceId: string; - deviceName: string; - globalDepth: number; - layer: string; - y: number; - } - interface VisualEditing { - active: boolean; - cursor: string; - id: string; - instruction: string; - keyboardHelpers: { - trigger: string; - action: string; - }[]; - } - interface EditingDevice { - currentlyEditedDevice: CurrentlyEditedDevice; - currentlyEditedGridId: string; - currentlySortedDeviceId: string; - screen: string; - sortingState: SortingState[]; - usingMultiselect: boolean; - visualEditing: VisualEditing; - } - interface EditingPreferences { - cameraZoom: number; - movementSpeed: number | null; - phase: boolean | null; - showGrid: boolean | null; - topDownControlsActive: boolean; - } - interface Editing { - device: EditingDevice; - preferences: EditingPreferences; - wire: { - currentlyEditedWireId: string; - }; - } - interface Health { - fragility: number; - health: number; - lives: number; - maxHealth: number; - maxShield: number; - shield: number; - } - interface InteractiveInfo { - action: string; - allowedToInteract: boolean; - message: string; - topHeader?: string; - topHeaderColor: string; - } - interface Interactives { - deviceId: string; - info: InteractiveInfo; - } - interface InteractiveSlot { - clipSize: number; - count: number; - currentClip: number; - durability: number; - itemId: string; - waiting: boolean; - waitingEndTime: number; - waitingStartTime: number; - } - interface AlertFeed { - amount: number; - itemId: string; - } - interface InventorySlot { - amount: number; - existsBeforeReconnect: boolean; - } - interface Inventory { - activeInteractiveSlot: number; - alertFeed?: AlertFeed; - alertsFeed: AlertFeed[]; - currentWaitingEndTime: number; - infiniteAmmo: boolean; - interactiveSlotErrorMessageTimeouts: Map>; - interactiveSlotErrorMessages: Map; - interactiveSlots: Map; - interactiveSlotsOrder: number[]; - isCurrentWaitingSoundForItem: boolean; - lastShotsTimestamps: Map; - maxSlots: number; - slots: Map; - } - interface MobileControls { - left: boolean; - right: boolean; - up: boolean; - } - interface Mood { - activeDeviceId: string; - vignetteActive: boolean; - vignetteStrength: number; - } - interface NonDismissMessage { - description: string; - title: string; - } - interface TileToRemove { - depth: number; - id: string; - x: number; - y: number; - } - interface Removing { - deviceIdToRemove?: string; - removingMode: string; - removingTilesEraserSize: number; - removingTilesLayer: number; - removingTilesMode: string; - tilesToRemove: TileToRemove[]; - wireIdToRemove?: string; - } - interface MeSpectating { - id: string; - name: string; - shuffle: boolean; - } - interface XPAddition { - amount: number; - reason: string; - xp: number; - } - interface XP { - additionTimeouts: Map>; - additions: XPAddition[]; - showingLevelUp: boolean; - } - interface ZoneDropOverrides { - allowItemDrop: boolean; - allowResourceDrop: boolean; - allowWeaponDrop: boolean; - } - interface Me { - adding: Adding; - cinematicMode: CinematicMode; - classDesigner: ClassDesigner; - completedInitialPlacement: boolean; - context: Context; - currentAction: string; - customAssets: MeCustomAssets; - deviceUI: MeDeviceUI; - editing: Editing; - gotKicked: boolean; - health: Health; - interactives: Interactives; - inventory: Inventory; - isRespawning: boolean; - mobileControls: MobileControls; - mood: Mood; - movementSpeed: number; - myTeam: string; - nonDismissMessage: NonDismissMessage; - phase: boolean; - preferences: { - startGameWithMode: string; - }; - properties: Map; - removing: Removing; - roleLevel: number; - spawnPosition: Vector; - spectating: MeSpectating; - teleportCount: number; - unredeemeedXP: number; - xp: XP; - zoneDropOverrides: ZoneDropOverrides; - } - interface CallToActionCategory { - id: string; - name: string; - plural: string; - } - interface CallToActionItem { - id: string; - category: string; - name: string; - url: string; - } - interface Widget { - type: string; - id: string; - y: number; - placement: string; - statName: string; - statValue: number; - } - interface GameSession { - callToAction: { - categories: CallToActionCategory[]; - items: CallToActionItem[]; - }; - countdownEnd: number; - phase: string; - resultsEnd: number; - widgets: { - widgets: Widget[]; - }; - } - interface Session { - allowGoogleTranslate: boolean; - amIGameOwner: boolean; - canAddGameTime: boolean; - cosmosBlocked: boolean; - customTeams: { - characterToTeamMap: Map; - }; - duringTransition: boolean; - gameClockDuration: string; - gameOwnerId: string; - gameSession: GameSession; - gameTime: number; - gameTimeLastUpdateAt: number; - globalPermissions: Permissions; - loadingPhase: boolean; - mapCreatorRoleLevel: number; - mapStyle: string; - modeType: string; - ownerRole: string; - phase: string; - phaseChangedAt: number; - version: string; - } - interface Achievement { - id: string; - key: string; - reset: () => void; - update: () => void; - } - interface BottomInGamePrimaryContent { - interactionWantsToBeVisible: boolean; - prioritizeInteraction: boolean; - } - interface DamageIndicator { - show: boolean; - /** `h` for red, `s` for blue, and any other string for yellow. */ - type: string; - } - interface GuiSlot { - id: string; - position: string; - text: string; - trackedItemId: string | null; - showTrackedItemMaximumAmount: boolean; - type: string; - priority: number; - color: string; - } - interface KnockoutAlert { - id: string; - name: string; - } - interface Modals { - closeAllModals: () => void; - cosmosModalOpen: boolean; - switchToRegisterScreenWhenCosmosModalOpens: boolean; - } - interface NoneGui { - addMenu: { - screen: string; - }; - duringGameScreenVisible: boolean; - optionsMenu: { - screen: string; - }; - screen: string; - } - interface Scorebar { - teamColors: string[]; - teams: string[]; - } - interface GUI { - achievement: Achievement; - bottomInGamePrimaryContent: BottomInGamePrimaryContent; - damageIndicator: DamageIndicator; - guiSlots: GuiSlot[]; - guiSlotsChangeCounter: number; - knockoutAlerts: KnockoutAlert[]; - modals: Modals; - none: NoneGui; - openInputBlockingUI: string[]; - playersManagerUpdateCounter: number; - scale: number; - scorebar?: Scorebar; - selectedPlayerId: string; - showingGrid: boolean; - } - interface CharacterPermissions { - adding: boolean; - editing: boolean; - manageCodeGrids: boolean; - removing: boolean; - } - interface CharacterInfo { - allowWeaponFire: boolean; - existsBeforeReconnect: boolean; - fragility: number; - health: number; - id: string; - isActive: boolean; - lastPlayersTeamId: string; - name: string; - permissions: CharacterPermissions; - score: number; - teamId: string; - type: string; - } - interface Characters { - characters: Map; - } - interface Costs { - codeGrid: number; - collidingTile: number; - customAssetDefault: number; - deviceInitialDefault: number; - deviceSubsequentDefault: number; - nonCollidingTile: number; - wire: number; - } - interface Counters { - codeGrids: number; - collidingTiles: number; - customAssets: Map; - devices: Map; - nonCollidingTiles: number; - wires: number; - } - interface Limits { - blocksPerCodeGrid: number; - codeGrids: number; - codeGridsPerDevice: number; - collidingTiles: number; - customAssetOnMapDefault: number; - deviceMaxOnMapDefault: number; - nonCollidingTiles: number; - wires: number; - } - interface MemorySystem { - costs: Costs; - counters: Counters; - limits: Limits; - maxUsedMemory: number; - usedMemoryCost: number; - } - interface Rect { - x: number; - y: number; - width: number; - height: number; - } - interface RotatedRect extends Rect { - angle: number; - } - interface Circle { - x: number; - y: number; - radius: number; - } - interface RotatedCircle extends Circle { - angle: number; - } - interface Ellipse { - x: number; - y: number; - r1: number; - r2: number; - } - interface RotatedEllipse extends Ellipse { - angle: number; - } - interface RectShort { - x: number; - y: number; - w: number; - h: number; - } - interface RotatedRectShort extends RectShort { - angle: number; - } - interface CircleShort { - x: number; - y: number; - r: number; - } - interface CodeGrids { - blockCategories: string; - customBlocks: string; - customBlocksParsed: any[]; - } - interface OptionSchema { - options: any[]; - categories?: any[]; - } - interface DeviceInfo { - id: string; - name: string; - description?: string; - optionSchema: OptionSchema; - defaultState: any; - codeGridSchema: CodeGridSchema; - wireConfig?: any; - minimumRoleLevel?: number; - maxOnMap?: number; - initialMemoryCost?: number; - subsequentMemoryCost?: number; - supportedMapStyles?: string[]; - seasonTicketRequired?: boolean; - maximumRoleLevel?: number; - } - interface ItemOption { - type: string; - id: string; - name: string; - editorName: string; - description: string; - previewImage: string; - rarity?: string; - weapon?: Weapon; - minimumRoleLevel?: number; - useCommand?: string; - consumeType?: string; - terrainId?: string; - maxStackSize?: number; - } - interface Weapon { - type: string; - appearance: string; - shared: WeaponShared; - bullet?: { - ammoItemId: string; - }; - } - interface WeaponShared { - cooldownBetweenShots: number; - allowAutoFire: boolean; - startingProjectileDistanceFromCharacter: number; - } - interface PropOption { - id: string; - name: string; - scaleMultip: number; - originX: number; - originY: number; - imageUrl: string; - rectColliders: RotatedRectShort[]; - circleColliders: CircleShort[]; - ellipseColliders: RotatedEllipse[]; - shadows: Ellipse[]; - seasonTicketRequired?: boolean; - minimumRoleLevel?: number; - defaultLayer?: string; - } - interface SkinOption { - id: string; - name: string; - minimumRoleLevel?: number; - } - interface TerrainOption { - id: string; - name: string; - maskTilesUrl: string; - borderTilesUrl: string; - fillUrl: string; - blockedMapStyles?: string[]; - seasonTicketRequired?: boolean; - previewUrl: string; - health?: number; - minimumRoleLevel?: number; - } - interface CustomAssetOption { - id: string; - maxOnMap: number; - memoryCost: number; - minimumRoleLevel?: number; - validate: any; - } - interface WorldOptions { - codeGrids: CodeGrids; - customAssetsOptions: CustomAssetOption[]; - deviceOptions: DeviceInfo[]; - hasAllProps: boolean; - itemOptions: ItemOption[]; - propsOptions: PropOption[]; - skinOptions: SkinOption[]; - terrainOptions: TerrainOption[]; - } - interface AppearanceVariation { - device: Device; - resetAppearance(): void; - setPreviewAppearance(): void; - setRemovalAppearance(): void; - } - interface BoundingBox { - cachedBoundingBox: Rect; - device: Device; - hardcodedBoundingBox?: Rect; - clearCached(): void; - clearHardcoded(): void; - getBoundingBox(): Rect; - isHardcoded(): boolean; - isInsideBoundingBox(x: number, y: number): boolean; - setHardcoded(rect: Rect): void; - } - type DeviceCollider = RectShort | CircleShort | Ellipse; - type ColliderOptions = { - device: Device; - scene: Scene; - angle: number; - x: number; - y: number; - } & Partial; - interface ColliderEntry { - bodyId: string; - options: ColliderOptions; - device: Device; - scene: Scene; - } - interface Colliders { - add: { - box(collider: RectShort): void; - circle(collider: CircleShort): void; - ellipse(collider: Ellipse): void; - }; - device: Device; - list: ColliderEntry[]; - createOptions(collider: DeviceCollider): ColliderOptions; - destroy(): void; - forEach(callback: (collider: DeviceCollider) => void): void; - hideDebug(): void; - showDebug(): void; - } - interface UpdateCullOptions { - mainCharacter: Character; - isPhase: boolean; - insideView: boolean; - } - interface Cull { - device: Device; - ignoresCull: boolean; - isInsideView: boolean; - margin: number; - wasInsideView: boolean; - getMargin(): number; - ignoreCulling(): void; - setMargin(margin: number): void; - setOnEnterViewCallback(callback: () => void): void; - setOnLeaveViewCallback(callback: () => void): void; - onEnterViewCallback?(): void; - onLeaveViewCallback?(): void; - updateCull(options: UpdateCullOptions): void; - } - interface DeviceUI { - device: Device; - close(): void; - open(options: Record): void; - update(options: Record): void; - } - interface DeviceInput { - device: Device; - enabled: boolean; - hasKeyListeners: boolean; - isCurrentlyUnderMouse: boolean; - addDeviceToCursorUnderList(): void; - createKeyListeners(): void; - cutCopyHandler(action: string): void; - disable(): void; - dispose(): void; - disposeKeyListeners(): void; - enable(): void; - partIsNoLongerUnderMouse(): void; - partIsUnderMouse(): void; - removeDeviceFromCursorUnderList(): void; - } - interface InteractiveZones { - add: { - circle(zone: CircleShort): void; - rect(zone: Rect): void; - }; - canInteractThroughColliders: boolean; - device: Device; - forceDisabled: boolean; - zones: (CircleShort | Rect)[]; - contains(x: number, y: number): boolean; - destroy(): void; - getCanInteractThroughColliders(): boolean; - getInfo(): any; - getMaxDistance(x: number, y: number): number; - isInteractive(): boolean; - onPlayerCanInteract(): void; - onPlayerCantInteractAnyMore(): void; - setCanInteractThroughColliders(canInteract: boolean): void; - setForceDisabled(forceDisabled: boolean): void; - setInfo(info: any): void; - remove(zone: CircleShort | Rect): void; - onInteraction?(): void; - } - interface VisualEditingBox { - width: number; - height: number; - angle: number; - minWidth: number; - maxWidth: number; - minHeight: number; - maxHeight: number; - keepRatio: boolean; - rotable: boolean; - onChange(value: RotatedRect): void; - } - interface VisualEditingCircle { - angle: number; - rotable: boolean; - radius: number; - minRadius: number; - maxRadius: number; - onChange(value: RotatedCircle): void; - } - interface DeviceVisualEditing { - add: { - box(options: VisualEditingBox): void; - circle(options: VisualEditingCircle): void; - }; - device: Device; - isActive: boolean; - shapes: (VisualEditingBox | VisualEditingCircle)[]; - clear(): void; - } - interface ShadowOptions { - x: number; - y: number; - r1: number; - r2: number; - alphaMultip: number; - depth: number; - } - interface Shadows { - device: Device; - list: ShadowOptions[]; - add(options: ShadowOptions): void; - destroy(): void; - forEach(callback: (shadow: ShadowOptions) => void): void; - hide(): void; - show(): void; - } - interface Layers { - depth: number; - device: Device; - layer: string; - options: any; - } - interface WirePoints { - device: Device; - end: Vector; - start: Vector; - onPointChange(): void; - setBoth(x: number, y: number): void; - } - interface DeviceTweens { - list: Tweens.Tween[]; - device: Device; - add(config: Types.Tweens.TweenBuilderConfig): Tweens.Tween; - destroy(): void; - } - interface DeviceProjectiles { - device: Device; - addToDynamicDevices(): void; - collidesWithProjectile(object: Circle): boolean; - onClientPredictedHit(position: Vector): void; - removeFromDynamicDevices(): void; - setDynamic(dynamic: boolean): void; - } - interface BaseDevice { - isPreview: boolean; - placedByClient: boolean; - isDestroyed: boolean; - x: number; - y: number; - forceUseMyState: boolean; - options: Record; - state: Record; - prevState: Record; - name: string; - id: string; - scene: Scene; - deviceOption: DeviceOption; - visualEditing: DeviceVisualEditing; - shadows: Shadows; - input: DeviceInput; - parts: any; - cull: Cull; - boundingBox: BoundingBox; - appearanceVariation: AppearanceVariation; - colliders: Colliders; - interactiveZones: InteractiveZones; - deviceUI: DeviceUI; - layers: Layers; - wirePoints: WirePoints; - tweens: DeviceTweens; - projectiles: DeviceProjectiles; - sensors: any; - onHide: (() => void) | null; - onShow: (() => void) | null; - onUpdate: (() => void) | null; - initialStateProcessing(state: Record): Record; - getMaxDepth(): number; - onStateUpdateFromServer(key: string, value: any): void; - getRealKey(key: string): string; - onPostUpdate(): void; - onInit(): void; - onMessage(message: { - key: string; - data: any; - }): void; - onStateChange(key: string): void; - onDestroy(options: { - isBeingReplaced: boolean; - }): void; - sendToServerDevice(key: string, data: any): void; - openDeviceUI(): void; - checkIfCollidersEnabled(): boolean; - destroy(options: { - isBeingReplaced: boolean; - }): void; - } - type Device = BaseDevice & { - [key: string]: any; - }; - interface Jump { - /** Optional in top-down, required in platformer */ - actuallyJumped?: boolean; - isJumping: boolean; - jumpCounter: number; - jumpTicks: number; - jumpsLeft: number; - xVelocityAtJumpStart: number; - } - interface MovementState { - accelerationTicks: number; - direction: string; - xVelocity: number; - } - interface PhysicsState { - forces: any[]; - gravity: number; - grounded: boolean; - groundedTicks: number; - jump: Jump; - lastGroundedAngle: number; - movement: MovementState; - velocity: Vector; - } - interface PhysicsInput extends TickInput { - activeClassDeviceId: string; - ignoredStaticBodies: Set; - ignoredTileBodies: Set; - projectileHitForcesQueue: Set; - } - interface CharacterBody { - id: string; - ignoredStaticBodies: Set; - ignoredTileBodies: Set; - controller: KinematicCharacterController; - aroundSensor: Collider; - feetSensor: Collider; - } - interface Bodies { - character: CharacterBody; - collider: Collider; - colliderDesc: ColliderDesc; - rigidBody: RigidBody; - rigidBodyDesc: RigidBodyDesc; - } - interface ServerPosition { - packet: number; - x: number; - y: number; - jsonState: string; - teleport: boolean; - } - type AngleInput = number | null; - interface TickInput { - angle: AngleInput; - jump: boolean; - _jumpKeyPressed: boolean; - } - interface Physics { - character: Character; - currentPacketId: number; - frameInputsHistory: Map; - justAppliedProjectileHitForces: Set; - lastClassDeviceActivationId: number; - lastPacketSent: number[]; - lastSentClassDeviceActivationId: number; - lastSentTerrainUpdateId: number; - lastTerrainUpdateId: number; - newlyAddedTileBodies: Set; - phase: boolean; - physicsBodyId: string; - prevState: PhysicsState; - projectileHitForcesHistory: Map; - projectileHitForcesQueue: Set; - scene: Scene; - state: PhysicsState; - tickInput: TickInput; - destroy(): void; - getBody(): Bodies; - postUpdate(dt: number): void; - preUpdate(): void; - sendToServer(): void; - setServerPosition(serverPosition: ServerPosition): void; - setupBody(x: number, y: number): void; - updateDebugGraphics(): void; - } - interface AimCursor { - aimCursor: GameObjects.Sprite; - aimCursorWorldPos: Vector; - centerShiftX: number; - centerShiftY: number; - scene: Scene; - x: number; - y: number; - update(): void; - } - interface Cursor { - scene: Scene; - createStateListeners(): void; - updateCursor(): void; - } - interface PressedKeys { - up: boolean; - down: boolean; - left: boolean; - right: boolean; - } - interface KeyboardState { - isHoldingDown: boolean; - isHoldingLeft: boolean; - isHoldingRight: boolean; - isHoldingUp: boolean; - isHoldingSpace: boolean; - } - interface Keyboard { - heldKeys: Set; - scene: Scene; - state: KeyboardState; - createListeners(): void; - isKeyDown(key: number): boolean; - } - interface MovementPointer { - id: string; - x: number; - y: number; - downX: number; - downY: number; - } - interface Mouse { - clickListeners: Map void>; - downX: number; - downY: number; - isHoldingDown: boolean; - movementPointer?: MovementPointer; - scene: Scene; - stopRunningClickHandlers: boolean; - worldX: number; - worldY: number; - x: number; - y: number; - addClickListener(options: { - callback: (pointer: Input.Pointer) => void; - }): () => void; - pointerUpdate(pointer: Input.Pointer): void; - removeClickListener(id: string): void; - shouldBecomeMovementPointer(pointer: Input.Pointer): boolean; - } - interface InputManager { - aimCursor: AimCursor; - angleSinceLastPhysicsFetch: AngleInput; - currentInput: TickInput; - cursor: Cursor; - isListeningForInput: boolean; - jumpedSinceLastPhysicsFetch: boolean; - keyboard: Keyboard; - mouse: Mouse; - physicsInputHandledBetweenUpdates: boolean; - scene: Scene; - getAimingDirection(): Vector; - getInputAngle(): number | null; - getKeys(): PressedKeys; - getMouseWorldXY(): Vector; - getPhysicsInput(): TickInput; - refreshInput(): void; - update(): void; - } - interface Cameras { - allCameras: Device[]; - allCamerasNeedsUpdate: boolean; - camerasPlayerIsInside: any[]; - scene: Scene; - wasInPrePhase: boolean; - findNewCameras(allCameras: Device[], x: number, y: number): any; - setCurrentCameraSizeDevice(device: Device): void; - switchToDefaultCameraSize(reset: boolean): void; - update(devices: Device[]): void; - } - interface DevicesAction { - inputManager: InputManager; - scene: Scene; - onClick(arg: any): void; - update(): void; - } - interface DevicesPreview { - devicePreviewOverlay: Overlay; - previousDevices: Device[]; - scene: Scene; - removePreviousDevices(isBeingReplaced: boolean): void; - update(): void; - } - interface WorldInteractives { - scene: Scene; - currentDevice?: Device; - clearCurrentDevice(): void; - setCurrentDevice(device: Device): void; - update(devices: Device[]): void; - canBeReachedByPlayer(device: Device): boolean; - findClosestInteractiveDevice(devices: Device[], x: number, y: number): Device | undefined; - } - interface Devices { - allDevices: Device[]; - cameras: Cameras; - devicesAction: DevicesAction; - devicesInView: Device[]; - devicesPreview: DevicesPreview; - devicesToPostUpdate: Set; - devicesToUpdate: Set; - interactives: WorldInteractives; - scene: Scene; - visualEditingManager: any; - addDevice(device: Device): void; - cullDevices(): void; - findDeviceUnderMouse(): Device | undefined; - getDeviceById(id: string): Device | undefined; - hasDevice(id: string): boolean; - removeDeviceById(id: string, options: { - isBeingReplaced: boolean; - }): void; - update(dt: number): void; - } - interface CreateTileOptions { - x: number; - y: number; - tileIndex: number; - terrainOption: TerrainOption; - } - interface InGameTerrainBuilder { - afterFailureWithTouch: boolean; - overlay: Overlay; - previewingTile?: Vector; - scene: Scene; - wasDown: boolean; - clearConsumeErrorMessage(): void; - clearPreviewLayer(): void; - createPreviewTile(options: CreateTileOptions): void; - update(): void; - } - interface ActiveBodies { - activeBodies: Set; - bodyManager: BodyManager; - currentCoordinateKeys: Set; - world: World; - disableBody(id: string): void; - enable(keys: Set, setAll: boolean): void; - enableBodiesAlongLine(options: { - start: Vector; - end: Vector; - }): void; - enableBodiesWithinAreas(options: { - areas: Rect[]; - disableActiveBodiesOutsideArea: boolean; - }): void; - enableBody(id: string): void; - setDirty(): void; - } - interface BodyBounds { - minX: number; - minY: number; - maxX: number; - maxY: number; - } - interface BodyStatic { - bounds: BodyBounds; - cells: Set; - } - interface GimkitBody { - collider?: Collider; - colliderDesc: ColliderDesc; - rigidBody?: RigidBody; - rigidBodyDesc: RigidBodyDesc; - static: BodyStatic; - device?: { - id: string; - }; - terrain?: { - key: string; - }; - } - interface BodyManager { - activeBodies: ActiveBodies; - bodies: Map; - cells: Map>; - dynamicBodies: Set; - gridSize: number; - staticBodies: Set; - staticSensorBodies: Set; - _idCount: number; - find(id: string): GimkitBody | undefined; - findPotentialStaticBodiesWithinArea(area: Rect): Set; - generateId(): void; - insert(body: GimkitBody): string; - remove(id: string): void; - } - interface WorldBoundsCollider { - body: RigidBody; - collider: Collider; - } - interface PhysicsManager { - bodies: BodyManager; - cumulTime: number; - lastTime: number; - physicsStep(dt: number): void; - runPhysicsLoop(dt: number): void; - world: World; - worldBoundsColliders: Set; - } - interface Projectile { - id: string; - startTime: number; - endTime: number; - start: Vector; - end: Vector; - radius: number; - appearance: string; - ownerId: string; - ownerTeamId: string; - damage: number; - hitPos?: Vector; - hitTime?: number; - } - interface Projectiles { - damageMarkers: any; - dynamicDevices: Set; - fireSlashes: any; - projectileJSON: Map; - runClientSidePrediction: boolean; - scene: Scene; - addProjectile(projectile: Projectile): void; - fire(pointer: Input.Pointer, snap: boolean): void; - update(): void; - } - interface WorldManager { - devices: Devices; - inGameTerrainBuilder: InGameTerrainBuilder; - physics: PhysicsManager; - projectiles: Projectiles; - scene: Scene; - terrain: any; - wires: any; - update(dt: number): void; - } - interface BackgroundLayersManager { - layerManager: LayerManager; - scene: Scene; - createLayer(options: { - layerId: string; - depth: number; - }): void; - fill(terrain: TerrainOption): void; - fillForPlatformer(): void; - fillForTopDown(terrain: TerrainOption): void; - removeLayer(options: { - layerId: string; - }): void; - } - interface LayerManager { - backgroundLayersManager: BackgroundLayersManager; - colliders: Map>; - layers: Map; - scene: Scene; - createInitialLayers(): void; - createLayer(id: string): void; - fillBottomLayer(terrain: TerrainOption): void; - getActualLayerDepth(id: string): number; - moveLayersAboveCharacters(): void; - onWorldSizeChange(): void; - } - interface TileKey { - depth: number; - x: number; - y: number; - } - interface TileManager { - cumulTime: number; - scene: Scene; - layerManager: LayerManager; - damageTileAtXY(x: number, y: number, depth: number, damage: number, healthPercent: number): void; - destroyTileByTileKey(tileKey: TileKey): void; - onMapStyleSet(): void; - regenerateTileAtXY(x: number, y: number, depth: number, healthPercent: number): void; - update(dt: number): void; - updateTeamColorTileAtXY(x: number, y: number, depth: number, team?: string, playerId?: string): void; - } - interface ShowOverlayOptions { - x: number; - y: number; - width: number; - height: number; - depth: number; - } - interface Overlay { - scene: Scene; - showing: boolean; - showingDimensions: { - width: number; - height: number; - } | null; - showingPosition: { - x: number; - y: number; - } | null; - hide(): void; - show(options: ShowOverlayOptions): void; - } - interface DepthSort { - overlay: Overlay; - scene: Scene; - update(): void; - } - interface SelectedDevicesOverlay { - graphics: GameObjects.Graphics; - scene: Scene; - showing: boolean; - hide(): void; - show(rects: Rect[]): void; - } - interface MultiSelect { - boundingBoxAroundEverything: Rect | null; - currentlySelectedDevices: Device[]; - currentlySelectedDevicesIds: string[]; - hidingSelectionForDevices: boolean; - isSelecting: boolean; - modifierKeyDown: boolean; - mouseShifts: Vector[]; - movedOrCopiedDevices: Device[]; - overlay: Overlay; - scene: Scene; - selectedDevices: Device[]; - selectedDevicesIds: string[]; - selectedDevicesOverlay: SelectedDevicesOverlay; - selection: Rect | null; - addDeviceToSelection(device: Device): void; - endSelectionRect(): void; - findSelectedDevices(): void; - hasSomeSelection(): boolean; - hideSelection(): void; - multiselectDeleteKeyHandler(): void; - multiselectKeyHandler(down: boolean): void; - onDeviceAdded(device: Device): void; - onDeviceRemoved(id: string): void; - setShiftParams(): void; - startSelectionRect(): void; - unselectAll(): void; - update(): void; - updateSelectedDevicesOverlay(): void; - updateSelectionRect(): void; - } - interface PlatformerEditing { - setTopDownControlsActive(active: boolean): void; - } - interface Removal { - overlay: Overlay; - prevMouseWasDown: boolean; - scene: Scene; - checkForItem(): void; - createStateListeners(): void; - removeSelectedItems(): void; - update(): void; - } - interface ActionManager { - depthSort: DepthSort; - multiSelect: MultiSelect; - platformerEditing: PlatformerEditing; - removal: Removal; - update(): void; - } - interface Spectating { - findNewCharacter(): void; - onBeginSpectating(): void; - onEndSpectating(): void; - setShuffle(shuffle: boolean, save?: boolean): void; - } - interface CharacterOptions { - id: string; - x: number; - y: number; - scale: number; - type: string; - } - interface CharacterManager { - characterContainer: GameObjects.Container; - characters: Map; - scene: Scene; - spectating: Spectating; - addCharacter(options: CharacterOptions): Character; - cullCharacters(): void; - removeCharacter(id: string): void; - update(dt: number): void; - } - interface Scene extends BaseScene { - actionManager: ActionManager; - cameraHelper: any; - characterManager: CharacterManager; - dt: number; - inputManager: InputManager; - resizeManager: any; - shadowsManager: any; - spine: any; - tileManager: TileManager; - uiManager: any; - worldManager: WorldManager; - create(): void; - } - interface SoundEffect { - path: string; - volume: number; - } - interface BaseAsset { - frameHeight: number; - frameRate: number; - frameWidth: number; - imageUrl: string; - scale: number; - } - interface ImpactAsset extends BaseAsset { - frames: number[]; - hideIfNoHit?: boolean; - } - interface WeaponAsset extends BaseAsset { - fireFrames: number[]; - fromCharacterCenterRadius: number; - hideFireSlash: boolean; - idleFrames: number; - originX: number; - originY: number; - } - interface ProjectileAppearance { - imageUrl: string; - rotateToTarget: boolean; - scale: number; - } - interface CurrentAppearance { - id: string; - explosionSfx: SoundEffect[]; - fireSfx: SoundEffect[]; - impact: ImpactAsset; - projectile: ProjectileAppearance; - reloadSfx: SoundEffect; - weapon: WeaponAsset; - } - interface AimingAndLookingAround { - angleTween?: Tweens.Tween; - character: Character; - currentAngle?: number; - currentAppearance?: CurrentAppearance; - currentWeaponId?: string; - isAiming: boolean; - lastUsedAngle: number; - sprite: GameObjects.Sprite; - targetAngle?: number; - characterShouldFlipX(): boolean; - destroy(): void; - isCurrentlyAiming(): boolean; - onInventoryStateChange(): void; - playFireAnimation(): void; - setImage(appearance: CurrentAppearance): void; - setSpriteParams(skipRecalculateAlpha: boolean): void; - setTargetAngle(angle: number, instant?: boolean): void; - update(): void; - updateAnotherCharacter(): void; - updateMainCharacterMouse(): void; - updateMainCharacterTouch(): void; - } - interface NonMainCharacterState { - grounded: boolean; - } - interface CharacterAnimation { - availableAnimations: string[]; - blinkTimer: number; - bodyAnimationLocked: boolean; - bodyAnimationStartedAt: number; - character: Character; - currentBodyAnimation: string; - currentEyeAnimation: string; - lastGroundedAnimationAt: number; - nonMainCharacterState: NonMainCharacterState; - prevNonMainCharacterState: NonMainCharacterState; - skinChanged: boolean; - destroy(): void; - onAnimationComplete(options: any): void; - onSkinChanged(): void; - playAnimationOrClearTrack(animations: string[], track: number): void; - playBodyAnimation(animation: string): void; - playBodySupplementalAnimation(animation: string): void; - playEyeAnimation(animation: string): void; - playJumpSupplementalAnimation(animation: string): void; - playMovementSupplementalAnimation(animation: string): void; - setupAnimations(): void; - startBlinkAnimation(): void; - stopBlinkAnimation(): void; - update(dt: number): void; - } - interface Point { - endTime: number; - endX: number; - endY: number; - startTime: number; - startX: number; - startY: number; - teleported: boolean; - usedTeleported: boolean; - } - interface EndInfo { - end: number; - start: number; - x: number; - y: number; - } - interface Movement { - character: Character; - currentPoint: Point; - currentTime: number; - nonMainCharacterGrounded: boolean; - pointMap: Point[]; - targetIsDirty: boolean; - targetNonMainCharacterGrounded: boolean; - targetX: number; - targetY: number; - teleportCount: number; - teleported: boolean; - getCurrentEndInfo(): EndInfo; - moveToTargetPosition(): void; - onMainCharacterTeleport(): void; - postPhysicsUpdate(dt: number): void; - setNonMainCharacterTargetGrounded(grounded: boolean): void; - setTargetX(x: number): void; - setTargetY(y: number): void; - setTeleportCount(teleportCount: number): void; - update(dt: number): void; - } - interface Updates { - update(update: { - delta: number; - }): void; - updateAlpha(): void; - updateDepth(): void; - updatePosition(dt: number): void; - updateScale(): void; - } - interface TeamState { - status: string; - teamId: string; - } - interface TweenAlphaOptions { - alpha: number; - type: string; - duration: number; - ease?: string; - } - interface Alpha { - character: Character; - cinematicModeAlpha: number; - currentAlpha: number; - immunity: number; - phaseAlpha: number; - playerAppearanceModifierDeviceAlpha: number; - scene: Scene; - getCurrentAlpha(): number; - setAlpha(type: string, alpha: number): void; - tweenAlpha(options: TweenAlphaOptions): void; - update(): void; - } - interface TrailEmitter { - frequency: number; - quantity: number; - blendMode: number; - speed: number; - speedVariation: number; - lifetime: number; - lifetimeVariation: number; - scale: number; - scaleVariation: number; - scaleThreshold: number; - rotationRandomAtStart: boolean; - rotationChange: number; - rotationChangeVariation: number; - rotationAllowNegativeChange: boolean; - alphaThresholdStart: number; - alphaThresholdEnd: number; - gravityY: number; - yOriginChange: number; - emitterZone: Partial; - } - interface TrailParticles { - frameHeight: number; - frameWidth: number; - imageUrl: string; - numberOfFrames: number; - } - interface TrailAppearance { - id: string; - emitter: TrailEmitter; - particles: TrailParticles; - } - interface CharacterTrail { - character: Character; - currentAppearance: TrailAppearance; - currentAppearanceId: string; - isReady: boolean; - lastSetAlpha: number; - destroy(): void; - followCharacter(): void; - setNewAppearance(appearance: TrailAppearance): void; - update(): void; - updateAppearance(id: string): void; - } - interface Culling { - character: Character; - isInCamera: boolean; - needsCullUpdate: boolean; - scene: Scene; - shouldForceUpdate: boolean; - forceUpdate(): void; - hideObject(object: any): void; - onInCamera(): void; - onOutCamera(): void; - showObject(object: any): void; - updateNeedsUpdate(): void; - } - interface Depth { - character: Character; - currentDepth: number; - lastY: number; - update(): void; - updateDepth(): void; - } - interface Dimensions { - character: Character; - currentDimensionsId: string; - bottomY: number; - centerX: number; - topY: number; - x: number; - onPotentialDimensionsChange(): void; - } - interface Flip { - character: Character; - flipXLastX: number; - isFlipped: boolean; - lastX: number; - lastY: number; - update(): void; - updateFlipForMainCharacter(): void; - updateFlipForOthers(): void; - } - interface Healthbar extends Updates { - character: Character; - depth: number; - isVisible: boolean; - scene: Scene; - destroy(): void; - makeIndicator(): void; - updateValue(): void; - } - interface Immunity { - character: Character; - classImmunityActive: boolean; - spawnImmunityActive: boolean; - activate(): void; - activateClassImmunity(): void; - activateSpawnImmunity(): void; - deactivate(): void; - deactivateClassImmunity(): void; - deactivateSpawnImmunity(): void; - isActive(): boolean; - } - interface ImpactAnimation { - animations: Map; - character: Character; - loadedAnimations: Set; - scene: Scene; - _play(animation: string): void; - destroy(): void; - load(animation: string): void; - play(animation: string): void; - } - interface Indicator extends Updates { - character: Character; - characterHeight: number; - depth: number; - image: GameObjects.Image; - isMain: boolean; - isSpectated: boolean; - lastCharacterAlpha: number; - scene: Scene; - teamState: TeamState; - destroy(): void; - makeIndicator(): void; - } - interface CharacterInput { - character: Character; - isListeningForInput: boolean; - scene: Scene; - setupInput(): void; - } - interface Nametag { - alpha: number; - character: Character; - creatingTag: boolean; - depth: number; - destroyed: boolean; - followScale: boolean; - fragilityTag?: GameObjects.Text; - healthMode: string; - name: string; - scale: number; - scene: Scene; - tag: GameObjects.Text; - teamState: TeamState; - fontColor: string; - tags: GameObjects.Text[]; - createFragilityTag(): void; - createTag(): void; - destroy(): void; - makeVisibleChanges(force?: boolean): void; - playHideAnimation(): void; - playShowUpAnimation(): void; - setName(name: string): void; - update(update: { - teamState: TeamState; - }): void; - updateFontColor(): void; - updateFragility(fragility: number): void; - updateTagAlpha(force?: boolean): void; - updateTagDepth(force?: boolean): void; - updateTagPosition(force?: boolean): void; - updateTagScale(force?: boolean): void; - } - interface Network { - lastAngle?: number; - lastAngleUpdate: number; - updateAimAngle(angle: number): void; - } - interface CharacterPosition { - character: Character; - update(dt: number): void; - } - interface TweenScaleOptions { - type: string; - scale: number; - duration: number; - } - interface Scale { - activeScale: number; - baseScale: number; - character: Character; - respawningScale: number; - scaleX: number; - scaleY: number; - scene: Scene; - spectatorScale: number; - dependencyScale: number; - isVisible: boolean; - getCurrentScale(type: number): void; - onSkinChange(): void; - setScale(type: number, scale: number): void; - tweenScale(options: TweenScaleOptions): void; - update(): void; - } - interface Shadow { - character: Character; - image?: GameObjects.Image; - createShadow(): void; - destroy(): void; - update(): void; - } - interface SkinOptions { - id: string; - editStyles?: Record; - } - interface SkinSetupOptions extends SkinOptions { - x?: number; - y?: number; - } - interface Skin { - character: Character; - editStyles?: Record; - latestSkinId: string; - scene: Scene; - skinId: string; - applyEditStyles(options: SkinOptions): void; - setupSkin(position: SkinSetupOptions): void; - updateSkin(options: SkinOptions): void; - } - interface TintParams { - type: string; - fromColor: string; - toColor: string; - duration: number; - tween?: Tweens.Tween; - ease(t: number): number; - } - interface Tint { - character: Character; - scene: Scene; - phase?: TintParams; - playerAppearanceModifierDevice?: TintParams; - immunity?: TintParams; - damageBoost?: TintParams; - getTintParams(type: string): TintParams | undefined; - setTintParams(type: string, tint?: TintParams): void; - startAnimateTint(params: TintParams): void; - stopAnimateTint(type: string): void; - update(): void; - } - interface VFX { - character: Character; - damageBoostActive: boolean; - phaseActive: boolean; - tintModifierId: string; - transparencyModifierId: string; - setTintModifier(id: string): void; - setTransparencyModifier(id: string): void; - startDamageBoostAnim(): void; - startPhaseAnim(): void; - stopDamageBoostAnim(): void; - stopPhaseAnim(): void; - } - interface Character { - aimingAndLookingAround: AimingAndLookingAround; - alpha: Alpha; - animation: CharacterAnimation; - body: Vector; - characterTrail: CharacterTrail; - culling: Culling; - depth: Depth; - dimensions: Dimensions; - flip: Flip; - healthbar: Healthbar; - id: string; - immunity: Immunity; - impactAnimation: ImpactAnimation; - indicator: Indicator; - input: CharacterInput; - isActive: boolean; - isDestroyed: boolean; - isMain: boolean; - movement: Movement; - nametag: Nametag; - network: Network; - physics: Physics; - position: CharacterPosition; - prevBody: Vector; - scale: Scale; - scene: Scene; - shadow: Shadow; - skin: Skin; - spine: any; - teamId: string; - tint: Tint; - type: string; - vfx: VFX; - destroy(): void; - setIsMain(isMain: boolean): void; - update(dt: number): void; - } - interface ActivityFeed { - feedItems: { - id: string; - message: string; - }[]; - } - interface Assignment { - hasSavedProgress: boolean; - objective: string; - percentageComplete: number; - } - interface EditingStore { - accessPoints: Map; - gridSnap: number; - showMemoryBarAtAllTimes: boolean; - } - interface Hooks { - hookJSON: string; - } - interface Loading { - completedInitialLoad: boolean; - loadedInitialDevices: boolean; - loadedInitialTerrain: boolean; - percentageAssetsLoaded: number; - } - interface Matchmaker { - gameCode: string; - } - interface NetworkStore { - attemptingToConnect: boolean; - attemptingToReconnect: boolean; - authId: string; - client: any; - clientConnectionString: string; - error: any; - errorFindingServerForGame: boolean; - errorJoiningRoom: boolean; - failedToReconnect: boolean; - findingServerForGame: boolean; - hasJoinedRoom: boolean; - isOffline: boolean; - isUpToDateWithPingPong: boolean; - joinedRoom: boolean; - phaseBeforeReconnect: string | null; - ping: number; - room: any; - roomIntentErrorMessage: string; - syncingAfterReconnection: boolean; - } - interface PhaserStore { - mainCharacter: Character; - mainCharacterTeleported: boolean; - scene: Scene; - } - interface SceneStore { - currentScene: string; - gpuTier: number; - isCursorOverCanvas: boolean; - } - interface Team { - characters: Map; - id: string; - name: string; - score: number; - } - interface Teams { - teams: Map; - updateCounter: number; - } - /** The stores type is incomplete and is not guaranteed to be accurate */ - interface Stores { - activityFeed: ActivityFeed; - assignment: Assignment; - characters: Characters; - editing: EditingStore; - gui: GUI; - hooks: Hooks; - loading: Loading; - matchmaker: Matchmaker; - me: Me; - memorySystem: MemorySystem; - network: NetworkStore; - phaser: PhaserStore; - scene: SceneStore; - session: Session; - teams: Teams; - world: GimkitWorld; - worldOptions: WorldOptions; - } - } - - interface BaseSetting { - id: K; - default?: T; - onChange?: (value: T, remote: boolean) => void; - } - interface NamedSetting extends BaseSetting { - title: string; - description?: string; - } - interface DropdownSetting extends NamedSetting { - type: "dropdown"; - options: ReadonlyArray<{ - label: string; - value: string; - }>; - allowNone?: boolean; - } - interface MultiselectSetting extends NamedSetting> { - type: "multiselect"; - options: ReadonlyArray<{ - label: string; - value: string; - }>; - } - interface NumberSetting extends NamedSetting { - type: "number"; - min?: number; - max?: number; - step?: number; - } - interface ToggleSetting extends NamedSetting { - type: "toggle"; - } - interface TextSetting extends NamedSetting { - type: "text"; - placeholder?: string; - maxLength?: number; - } - interface SliderSetting extends NamedSetting { - type: "slider"; - min: number; - max: number; - step?: number; - ticks?: ReadonlyArray; - formatter?: (value: number) => string; - } - interface RadioSetting extends NamedSetting { - type: "radio"; - options: ReadonlyArray<{ - label: string; - value: string; - }>; - } - interface ColorSetting extends NamedSetting { - type: "color"; - rgba?: boolean; - } - interface CustomSetting extends NamedSetting { - type: "custom"; - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - render: (container: HTMLElement, currentValue: T, update: (newValue: T) => void) => (() => void) | void; - } - interface CustomSection extends BaseSetting { - type: "customsection"; - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - render: (container: HTMLElement, currentValue: T, onChange: (newValue: T) => void) => (() => void) | void; - } - type PluginSetting = - | DropdownSetting - | MultiselectSetting - | NumberSetting - | ToggleSetting - | TextSetting - | SliderSetting - | RadioSetting - | ColorSetting - | CustomSetting - | CustomSection; - interface SettingGroup { - type: "group"; - title: string; - settings: ReadonlyArray; - } - type PluginSettingsDescription = ReadonlyArray; - type SettingsChangeCallback = (value: T, remote: boolean) => void; - type DescriptionToReturnType = T extends DropdownSetting ? string - : T extends MultiselectSetting ? ReadonlyArray - : T extends NumberSetting ? number - : T extends ToggleSetting ? boolean - : T extends TextSetting ? string - : T extends SliderSetting ? number - : T extends RadioSetting ? string - : T extends ColorSetting ? string - : T extends CustomSetting ? V - : T extends CustomSection ? V - : never; - type ExtractSettingObject = T extends PluginSetting ? { - [K in Id]: DescriptionToReturnType; - } - : T extends SettingGroup ? ExtractSettingObject - : never; - type UnionToIntersection = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never; - type SettingsObject = T & { - listen(key: K, callback: SettingsChangeCallback, immediate?: boolean): void; - }; - interface SettingsMethods { - create( - description: T, - ): SettingsObject>>; - listen(key: string, callback: SettingsChangeCallback, immediate?: boolean): () => void; - } - type PluginSettings = SettingsMethods & Record; - - interface HotkeyTrigger { - /** Should be a keyboardevent [code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code) */ - key?: string; - /** Should be keyboardevent [codes](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code) */ - keys?: ReadonlyArray; - ctrl?: boolean; - shift?: boolean; - alt?: boolean; - } - - interface HotkeyOptions extends HotkeyTrigger { - preventDefault?: boolean; - } - - interface ConfigurableHotkeyOptions { - category: string; - /** There should be no duplicate titles within a category */ - title: string; - preventDefault?: boolean; - default?: HotkeyTrigger; - } - interface OldConfigurableOptions { - category: string; - title: string; - preventDefault?: boolean; - defaultKeys?: Set; - } - - type KeyboardCallback = (e: KeyboardEvent) => void; - class BaseHotkeysApi { - /** - * Releases all keys, needed if a hotkey opens something that will - * prevent keyup events from being registered, such as an alert - */ - releaseAll(): void; - /** Which key codes are currently being pressed */ - get pressed(): Set; - /** - * @deprecated Use {@link pressed} instead - * @hidden - */ - get pressedKeys(): Set; - } - class HotkeysApi extends BaseHotkeysApi { - /** - * Adds a hotkey with a given id - * @returns A function to remove the hotkey - */ - addHotkey(id: string, options: HotkeyOptions, callback: KeyboardCallback): () => void; - /** Removes all hotkeys with a given id */ - removeHotkeys(id: string): void; - /** - * Adds a hotkey which can be changed by the user - * @param id A unique id for the hotkey, such as `myplugin-myhotkey` - * @returns A function to remove the hotkey - */ - addConfigurableHotkey( - id: string, - options: ConfigurableHotkeyOptions, - callback: KeyboardCallback, - ): () => void; - /** Removes a configurable hotkey with a given id */ - removeConfigurableHotkey(id: string): void; - /** - * @deprecated Use {@link addHotkey} instead - * @hidden - */ - add(keys: Set, callback: KeyboardCallback, preventDefault?: boolean): void; - /** - * @deprecated Use {@link removeHotkeys} instead - * @hidden - */ - remove(keys: Set): void; - /** - * @deprecated Use {@link addConfigurableHotkey} instead - * @hidden - */ - addConfigurable( - pluginName: string, - hotkeyId: string, - callback: KeyboardCallback, - options: OldConfigurableOptions, - ): void; - /** - * @deprecated Use {@link removeConfigurableHotkeys} instead - * @hidden - */ - removeConfigurable(pluginName: string, hotkeyId: string): void; - } - class ScopedHotkeysApi extends BaseHotkeysApi { - constructor(id: string); - /** - * Adds a hotkey which will fire when certain keys are pressed - * @returns A function to remove the hotkey - */ - addHotkey(options: HotkeyOptions, callback: KeyboardCallback): () => void; - /** - * Adds a hotkey which can be changed by the user - * @returns A function to remove the hotkey - */ - addConfigurableHotkey(options: ConfigurableHotkeyOptions, callback: KeyboardCallback): () => void; - } - class BaseParcelApi { - /** - * Gets a module based on a filter, returns null if none are found - * Be cautious when using this- plugins will often run before any modules load in, - * meaning that if this is run on startup it will likely return nothing. - * Consider using getLazy instead. - */ - query(): any; - /** - * Returns an array of all loaded modules matching a filter - * Be cautious when using this- plugins will often run before any modules load in, - * meaning that if this is run on startup it will likely return nothing. - * Consider using getLazy instead. - */ - queryAll(): any[]; - } - class ParcelApi extends BaseParcelApi { - /** - * Waits for a module to be loaded, then runs a callback - * @returns A function to cancel waiting for the module - */ - getLazy(): () => void; - /** Cancels any calls to getLazy with the same id */ - stopLazy(): void; - /** - * @deprecated Use {@link getLazy} instead - * @hidden - */ - get interceptRequire(): () => () => void; - /** - * @deprecated Use {@link stopLazy} instead - * @hidden - */ - get stopIntercepts(): () => void; - } - class ScopedParcelApi extends BaseParcelApi { - /** - * Waits for a module to be loaded, then runs a callback - * @returns A function to cancel waiting for the module - */ - getLazy(): () => void; - } - type ConnectionType = "None" | "Colyseus" | "Blueboat"; - interface RequesterOptions { - url: string; - method?: string; - data?: any; - cacheKey?: string; - success?: (response: any, cached: boolean) => void; - both?: () => void; - error?: (error: any) => void; - } - namespace Schema { - interface ColyseusMethods { - $callbacks: Record; - $changes: any; - toJson(): any; - } - type ObjectSchema = T & ColyseusMethods & { - listen( - key: K, - callback: (value: T[K], lastValue: T[K]) => void, - immediate?: boolean, - ): () => void; - onChange(callback: () => void): () => void; - onRemove(callback: () => void): () => void; - }; - type CollectionSchema = ColyseusMethods & { - onAdd(callback: (value: T, index: K) => void, immediate?: boolean): () => void; - onRemove(callback: (value: T, index: K) => void): () => void; - onChange(callback: (item: T, index: K) => void): () => void; - }; - type MapSchema = - & { - [key: string]: T; - } - & Map - & CollectionSchema; - type ArraySchema = T[] & CollectionSchema; - interface AppearanceState { - skin: string; - tintModifierId: string; - trailId: string; - transparencyModifierId: string; - } - interface AssignmentState { - hasSavedProgress: boolean; - objective?: string; - percentageComplete?: number; - } - interface ClassDesignerState { - lastActivatedClassDeviceId: string; - lastClassDeviceActivationId: number; - } - interface HealthState { - classImmunityActive: boolean; - fragility: number; - health: number; - lives: number; - maxHealth: number; - maxShield: number; - shield: number; - showHealthBar: boolean; - spawnImmunityActive: boolean; - } - interface InteractiveSlotState { - clipSize: number; - count: number; - currentClip: number; - durability: number; - itemId: string; - waiting: boolean; - waitingEndTime: number; - waitingStartTime: number; - } - interface SlotState { - amount: number; - } - interface InventoryState { - activeInteractiveSlot: number; - infiniteAmmo: boolean; - interactiveSlots: MapSchema>; - interactiveSlotsOrder: ArraySchema; - maxSlots: number; - slots: MapSchema>; - } - interface PermissionsState { - adding: boolean; - editing: boolean; - manageCodeGrids: boolean; - removing: boolean; - } - interface PhysicsState { - isGrounded: boolean; - } - interface ProjectilesState { - aimAngle: number; - damageMultiplier: number; - } - interface XPState { - unredeemedXP: number; - } - interface ZoneAbilitiesOverridesState { - allowItemDrop: boolean; - allowResourceDrop: boolean; - allowWeaponDrop: boolean; - allowWeaponFire: boolean; - } - interface CharacterState { - appearance: ObjectSchema; - assignment: ObjectSchema; - classDesigner: ObjectSchema; - completedInitialPlacement: boolean; - health: ObjectSchema; - id: string; - inventory: ObjectSchema; - isActive: boolean; - isRespawning: boolean; - lastPlayersTeamId: string; - movementSpeed: number; - name: string; - openDeviceUI: string; - openDeviceUIChangeCounter: number; - permissions: ObjectSchema; - phase: boolean; - physics: ObjectSchema; - projectiles: ObjectSchema; - roleLevel: number; - scale: number; - score: number; - teamId: string; - teleportCount: number; - type: string; - x: number; - xp: ObjectSchema; - y: number; - zoneAbilitiesOverrides: ObjectSchema; - } - interface ActionCategoryState { - id: string; - name: string; - plural: string; - } - interface ActionItemState { - id: string; - category: string; - name: string; - url: string; - } - interface CallToActionState { - categories: ArraySchema>; - items: ArraySchema>; - } - interface GameSessionState { - callToAction: ObjectSchema; - countdownEnd: number; - phase: string; - resultsEnd: number; - } - interface SessionState { - allowGoogleTranslate: boolean; - cosmosBlocked: boolean; - gameOwnerId: string; - gameSession: ObjectSchema; - gameTime: number; - globalPermissions: ObjectSchema; - loadingPhase: boolean; - mapCreatorRoleLevel: number; - mapStyle: string; - modeType: string; - phase: string; - version: string; - } - interface DevicesState { - codeGrids: MapSchema; - } - interface WorldState { - devices: ObjectSchema; - height: number; - width: number; - } - interface CustomAssetState { - data: string; - icon: string; - id: string; - name: string; - optionId: string; - } - interface HooksState { - hookJSON: string; - } - interface MatchmakerState { - gameCode: string; - } - interface TeamState { - characters: ArraySchema; - id: string; - name: string; - score: number; - } - interface GimkitState { - characters: MapSchema>; - customAssets: MapSchema>; - hooks: ObjectSchema; - mapSettings: string; - matchmaker: ObjectSchema; - session: ObjectSchema; - teams: ArraySchema>; - world: ObjectSchema; - } - type GimkitSchema = ObjectSchema; - } - class BaseNetApi extends EventEmitter2 { - constructor(); - /** Which type of server the client is currently connected to */ - get type(): ConnectionType; - /** The id of the gamemode the player is currently playing */ - get gamemode(): string; - /** The room that the client is connected to, or null if there is no connection */ - get room(): any; - /** Gimkit's internal Colyseus state */ - get state(): Schema.GimkitSchema; - /** Whether the user is the one hosting the current game */ - get isHost(): boolean; - /** Sends a message to the server on a specific channel */ - send(channel: string, message?: any): void; - } - class NetApi extends BaseNetApi { - constructor(); - /** - * Runs a callback when the game is loaded, or runs it immediately if the game has already loaded - * @returns A function to cancel waiting for load - */ - onLoad( - id: string, - callback: (type: ConnectionType, gamemode: string) => void, - gamemode?: string | ReadonlyArray, - ): () => void; - /** Cancels any calls to {@link onLoad} with the same id */ - offLoad(id: string): void; - /** Runs a callback when a request is made that matches a certain path (can have wildcards) */ - modifyFetchRequest(id: string, path: string, callback: (options: RequesterOptions) => any): () => void; - /** Runs a callback when a response is recieved for a request under a certain path (can have wildcards) */ - modifyFetchResponse(id: string, path: string, callback: (response: any) => any): () => void; - /** Stops any modifications made by {@link modifyFetchRequest} with the same id */ - stopModifyRequest(id: string): void; - /** Stops any modifications made by {@link modifyFetchResponse} with the same id */ - stopModifyResponse(id: string): void; - /** - * @deprecated Methods for both transports are now on the base net api - * @hidden - */ - get colyseus(): this; - /** - * @deprecated Methods for both transports are now on the base net api - * @hidden - */ - get blueboat(): this; - /** @hidden */ - private wrappedListeners; - /** - * @deprecated use net.on - * @hidden - */ - addEventListener(channel: string, callback: (...args: any[]) => void): void; - /** - * @deprecated use net.off - * @hidden - */ - removeEventListener(channel: string, callback: (...args: any[]) => void): void; - } - class ScopedNetApi extends BaseNetApi { - constructor(id: string, defaultGamemode: string[]); - /** - * Runs a callback when the game is loaded, or runs it immediately if the game has already loaded. - * If the \@gamemode header is set the callback will only fire if the gamemode matches one of the provided gamemodes. - * @returns A function to cancel waiting for load - */ - onLoad( - callback: (type: ConnectionType, gamemode: string) => void, - gamemode?: string | ReadonlyArray, - ): () => void; - /** Runs a callback when a request is made that matches a certain path (can have wildcards) */ - modifyFetchRequest(path: string, callback: (options: RequesterOptions) => any): () => void; - /** Runs a callback when a response is recieved for a request under a certain path (can have wildcards) */ - modifyFetchResponse(path: string, callback: (response: any) => any): () => void; - } - interface ModalButton { - text: string; - style?: "primary" | "danger" | "close"; - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - onClick?: (event: MouseEvent) => boolean | void; - } - - interface ModalOptions { - id?: string; - title?: string; - style?: string; - className?: string; - closeOnBackgroundClick?: boolean; - buttons?: ReadonlyArray; - onClosed?: () => void; - } - type NoticeType = "info" | "success" | "error" | "warning" | "loading"; - interface MessageSemanticClassNames { - root?: string; - icon?: string; - content?: string; - } - interface MessageSemanticStyles { - root?: React$1.CSSProperties; - icon?: React$1.CSSProperties; - content?: React$1.CSSProperties; - } - type ArgsClassNamesType = MessageSemanticClassNames; - type ArgsStylesType = MessageSemanticStyles; - interface MessageConfigOptions { - top?: string | number; - duration?: number; - prefixCls?: string; - getContainer?: () => HTMLElement; - transitionName?: string; - maxCount?: number; - rtl?: boolean; - pauseOnHover?: boolean; - classNames?: ArgsClassNamesType; - styles?: ArgsStylesType; - } - interface MessageArgsProps { - content: React$1.ReactNode; - duration?: number; - type?: NoticeType; - onClose?: () => void; - icon?: React$1.ReactNode; - key?: string | number; - style?: React$1.CSSProperties; - className?: string; - classNames?: ArgsClassNamesType; - styles?: ArgsStylesType; - onClick?: (e: React$1.MouseEvent) => void; - pauseOnHover?: boolean; - } - type MessageJointContent = React$1.ReactNode | MessageArgsProps; - interface MessageType extends PromiseLike { - (): void; - } - type MessageTypeOpen = ( - content: MessageJointContent, - duration?: number | VoidFunction, - onClose?: VoidFunction, - ) => MessageType; - interface MessageInstance { - info: MessageTypeOpen; - success: MessageTypeOpen; - error: MessageTypeOpen; - warning: MessageTypeOpen; - loading: MessageTypeOpen; - open: (args: MessageArgsProps) => MessageType; - destroy: (key?: React$1.Key) => void; - } - interface MessageBaseMethods { - open: (config: MessageArgsProps) => MessageType; - destroy: (key?: React$1.Key) => void; - config: (config: MessageConfigOptions) => void; - useMessage: () => MessageInstance; - _InternalPanelDoNotUseOrYouWillBeFired: React$1.FC; - } - interface MessageMethods { - info: MessageTypeOpen; - success: MessageTypeOpen; - error: MessageTypeOpen; - warning: MessageTypeOpen; - loading: MessageTypeOpen; - } - const NotificationPlacements: readonly [ - "top", - "topLeft", - "topRight", - "bottom", - "bottomLeft", - "bottomRight", - ]; - type NotificationPlacement = (typeof NotificationPlacements)[number]; - type NotificationIconType = "success" | "info" | "error" | "warning"; - interface NotificationSemanticClassNames { - root?: string; - title?: string; - description?: string; - actions?: string; - icon?: string; - } - interface NotificationSemanticStyles { - root?: React$1.CSSProperties; - title?: React$1.CSSProperties; - description?: React$1.CSSProperties; - actions?: React$1.CSSProperties; - icon?: React$1.CSSProperties; - } - type NotificationClassNamesType = NotificationSemanticClassNames; - type NotificationStylesType = NotificationSemanticStyles; - interface NotificationDivProps extends React$1.HTMLProps { - "data-testid"?: string; - } - interface NotificationArgsProps { - message?: React$1.ReactNode; - title?: React$1.ReactNode; - description?: React$1.ReactNode; - btn?: React$1.ReactNode; - actions?: React$1.ReactNode; - key?: React$1.Key; - onClose?: () => void; - duration?: number | false; - showProgress?: boolean; - pauseOnHover?: boolean; - icon?: React$1.ReactNode; - placement?: NotificationPlacement; - style?: React$1.CSSProperties; - className?: string; - classNames?: NotificationClassNamesType; - styles?: NotificationStylesType; - readonly type?: NotificationIconType; - onClick?: () => void; - closeIcon?: React$1.ReactNode; - closable?: boolean | { - onClose?: () => void; - }; - props?: NotificationDivProps; - role?: "alert" | "status"; - } - type NotificationStaticFn = (args: NotificationArgsProps) => void; - interface NotificationInstance { - success: NotificationStaticFn; - error: NotificationStaticFn; - info: NotificationStaticFn; - warning: NotificationStaticFn; - open: NotificationStaticFn; - destroy: (key?: React$1.Key) => void; - } - interface NotificationGlobalConfigProps { - top?: number; - bottom?: number; - duration?: number | false; - showProgress?: boolean; - pauseOnHover?: boolean; - prefixCls?: string; - getContainer?: () => HTMLElement | ShadowRoot; - placement?: NotificationPlacement; - closeIcon?: React$1.ReactNode; - closable?: boolean | { - onClose?: () => void; - }; - rtl?: boolean; - maxCount?: number; - props?: NotificationDivProps; - } - interface NotificationBaseMethods { - open: (config: NotificationArgsProps) => void; - destroy: (key?: React$1.Key) => void; - config: (config: NotificationGlobalConfigProps) => void; - useNotification: () => NotificationInstance; - _InternalPanelDoNotUseOrYouWillBeFired: React$1.FC; - } - interface NotificationNoticeMethods { - success: NotificationStaticFn; - info: NotificationStaticFn; - warning: NotificationStaticFn; - error: NotificationStaticFn; - } - interface ModalSemanticClassNames { - root?: string; - header?: string; - body?: string; - footer?: string; - container?: string; - title?: string; - wrapper?: string; - mask?: string; - } - interface ModalSemanticStyles { - root?: React$1.CSSProperties; - header?: React$1.CSSProperties; - body?: React$1.CSSProperties; - footer?: React$1.CSSProperties; - container?: React$1.CSSProperties; - title?: React$1.CSSProperties; - wrapper?: React$1.CSSProperties; - mask?: React$1.CSSProperties; - } - type ModalClassNamesType = ModalSemanticClassNames; - type ModalStylesType = ModalSemanticStyles; - type ModalMousePosition = { - x: number; - y: number; - } | null; - type ModalGetContainerFunc = () => HTMLElement; - type ModalLegacyButtonType = "primary" | "dashed" | "default" | "text" | "link"; - interface ModalCommonProps { - footer?: - | React$1.ReactNode - | ((originNode: React$1.ReactNode, extra: { - OkBtn: React$1.FC; - CancelBtn: React$1.FC; - }) => React$1.ReactNode); - closable?: boolean | { - onClose?: () => void; - afterClose?: () => void; - }; - classNames?: ModalClassNamesType; - styles?: ModalStylesType; - } - interface ModalProps extends ModalCommonProps { - open?: boolean; - confirmLoading?: boolean; - title?: React$1.ReactNode; - onOk?: (e: React$1.MouseEvent) => void; - onCancel?: (e: React$1.MouseEvent) => void; - afterClose?: () => void; - afterOpenChange?: (open: boolean) => void; - centered?: boolean; - width?: string | number; - okText?: React$1.ReactNode; - okType?: ModalLegacyButtonType; - cancelText?: React$1.ReactNode; - maskClosable?: boolean; - forceRender?: boolean; - okButtonProps?: Record; - cancelButtonProps?: Record; - destroyOnClose?: boolean; - destroyOnHidden?: boolean; - style?: React$1.CSSProperties; - wrapClassName?: string; - maskTransitionName?: string; - transitionName?: string; - className?: string; - rootClassName?: string; - rootStyle?: React$1.CSSProperties; - getContainer?: string | HTMLElement | ModalGetContainerFunc | false; - zIndex?: number; - bodyStyle?: React$1.CSSProperties; - maskStyle?: React$1.CSSProperties; - mask?: boolean | "static"; - keyboard?: boolean; - wrapProps?: any; - prefixCls?: string; - closeIcon?: React$1.ReactNode; - modalRender?: (node: React$1.ReactNode) => React$1.ReactNode; - children?: React$1.ReactNode; - mousePosition?: ModalMousePosition; - loading?: boolean; - focusTriggerAfterClose?: boolean; - focusable?: { - focusTriggerAfterClose?: boolean; - }; - } - interface ModalFuncProps extends ModalCommonProps { - prefixCls?: string; - className?: string; - rootClassName?: string; - open?: boolean; - title?: React$1.ReactNode; - content?: React$1.ReactNode; - onOk?: (...args: any[]) => any; - onCancel?: (...args: any[]) => any; - afterClose?: () => void; - okButtonProps?: Record; - cancelButtonProps?: Record; - centered?: boolean; - width?: string | number; - okText?: React$1.ReactNode; - okType?: ModalLegacyButtonType; - cancelText?: React$1.ReactNode; - icon?: React$1.ReactNode; - mask?: boolean | "static"; - maskClosable?: boolean; - zIndex?: number; - okCancel?: boolean; - style?: React$1.CSSProperties; - wrapClassName?: string; - maskStyle?: React$1.CSSProperties; - type?: "info" | "success" | "error" | "warn" | "warning" | "confirm"; - keyboard?: boolean; - getContainer?: string | HTMLElement | ModalGetContainerFunc | false; - transitionName?: string; - maskTransitionName?: string; - direction?: "ltr" | "rtl"; - bodyStyle?: React$1.CSSProperties; - closeIcon?: React$1.ReactNode; - footer?: ModalProps["footer"]; - modalRender?: (node: React$1.ReactNode) => React$1.ReactNode; - focusTriggerAfterClose?: boolean; - autoFocusButton?: null | "ok" | "cancel"; - focusable?: { - focusTriggerAfterClose?: boolean; - autoFocusButton?: null | "ok" | "cancel"; - }; - } - type ModalConfigUpdate = ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps); - interface ModalFuncReturn { - destroy: () => void; - update: (configUpdate: ModalConfigUpdate) => void; - } - type ModalFunc = (props: ModalFuncProps) => ModalFuncReturn; - interface ModalStaticFunctions { - info: ModalFunc; - success: ModalFunc; - error: ModalFunc; - warning: ModalFunc; - confirm: ModalFunc; - warn: ModalFunc; - } - interface ModalBaseMethods { - useModal: () => [ - api: any, - contextHolder: React$1.ReactNode, - ]; - destroyAll: () => void; - config: (config: { - rootPrefixCls: string; - }) => void; - _InternalPanelDoNotUseOrYouWillBeFired: React$1.FC; - } - type AntdNotification = NotificationNoticeMethods & NotificationBaseMethods; - type AntdMessage = MessageMethods & MessageBaseMethods; - type AntdModal = React$1.FC & ModalStaticFunctions & ModalBaseMethods; - class BaseUIApi { - /** Shows a customizable modal to the user */ - showModal(element: HTMLElement | React$1.ReactElement, options?: ModalOptions): void; - /** Forces Gimkit's react tree to fully rerender */ - forceReactUpdate(): void; - /** - * Gimkit's notification object, only available when joining or playing a game - * - * {@link https://ant.design/components/notification#api} - */ - get notification(): AntdNotification; - /** - * Gimkit's message object - * - * {@link https://ant.design/components/message#api} - */ - get message(): AntdMessage; - /** - * Gimkit's modal object - * - * {@link https://ant.design/components/modal#modalmethod} - */ - get modal(): AntdModal; - } - class UIApi extends BaseUIApi { - /** - * Adds a style to the DOM - * @returns A function to remove the styles - */ - addStyles(id: string, style: string): () => void; - /** Remove all styles with a given id */ - removeStyles(id: string): void; - } - class ScopedUIApi extends BaseUIApi { - constructor(id: string); - /** - * Adds a style to the DOM - * @returns A function to remove the styles - */ - addStyles(style: string): () => void; - } - - type ValueChangeCallback = (value: any, remote: boolean) => void; - class StorageApi { - /** Gets a value that has previously been saved */ - getValue(pluginName: string, key: string, defaultValue?: any): any; - /** Sets a value which can be retrieved later, through reloads */ - setValue(pluginName: string, key: string, value: any): void; - /** Removes a value which has been saved */ - deleteValue(pluginName: string, key: string): void; - /** - * @deprecated use {@link deleteValue} - * @hidden - */ - get removeValue(): (pluginName: string, key: string) => void; - /** Adds a listener for when a plugin's stored value with a certain key changes */ - onChange(pluginName: string, key: string, callback: ValueChangeCallback): () => void; - /** Removes a listener added by onChange */ - offChange(pluginName: string, key: string, callback: ValueChangeCallback): void; - /** Removes all listeners added by onChange for a certain plugin */ - offAllChanges(pluginName: string): void; - } - class ScopedStorageApi { - constructor(id: string); - /** Gets a value that has previously been saved */ - getValue(key: string, defaultValue?: any): any; - /** Sets a value which can be retrieved later, persisting through reloads */ - setValue(key: string, value: any): void; - /** Removes a value which has been saved */ - deleteValue(key: string): void; - /** Adds a listener for when a stored value with a certain key changes */ - onChange(key: string, callback: ValueChangeCallback): () => void; - } - type BaseFunction = (...args: any[]) => any; - type FunctionKeys = keyof { - [K in keyof T as T[K] extends BaseFunction ? K : never]: T[K]; - }; - - type PatcherAfterCallback = ( - thisVal: any, - args: T extends BaseFunction ? Parameters : any[], - returnVal: T extends BaseFunction ? ReturnType : any, - ) => any; - - type PatcherBeforeCallback = ( - thisVal: any, - args: T extends BaseFunction ? Parameters : any[], - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - ) => boolean | void; - - type PatcherInsteadCallback = (thisVal: any, args: T extends BaseFunction ? Parameters : any[]) => any; - - type PatcherSwapCallback = (...args: T extends BaseFunction ? Parameters : any[]) => any; - class PatcherApi { - /** - * Runs a callback after a function on an object has been run - * @returns A function to remove the patch - */ - after>( - id: string, - object: O, - method: K, - callback: PatcherAfterCallback, - ): () => void; - /** - * Runs a callback before a function on an object has been run. - * Return true from the callback to prevent the function from running - * @returns A function to remove the patch - */ - before>( - id: string, - object: O, - method: K, - callback: PatcherBeforeCallback, - ): () => void; - /** - * Runs a function instead of a function on an object - * @returns A function to remove the patch - */ - instead>( - id: string, - object: O, - method: K, - callback: PatcherInsteadCallback, - ): () => void; - /** - * Replaces a function on an object with another function - * @returns A function to remove the patch - */ - swap>( - id: string, - object: O, - method: K, - callback: PatcherSwapCallback, - ): () => void; - /** Removes all patches with a given id */ - unpatchAll(id: string): void; - } - class ScopedPatcherApi { - constructor(id: string); - /** - * Runs a callback after a function on an object has been run - * @returns A function to remove the patch - */ - after>( - object: O, - method: K, - callback: PatcherAfterCallback, - ): () => void; - /** - * Runs a callback before a function on an object has been run. - * Return true from the callback to prevent the function from running - * @returns A function to remove the patch - */ - before>( - object: O, - method: K, - callback: PatcherBeforeCallback, - ): () => void; - /** - * Runs a function instead of a function on an object - * @returns A function to remove the patch - */ - instead>( - object: O, - method: K, - callback: PatcherInsteadCallback, - ): () => void; - /** - * Replaces a function on an object with another function - * @returns A function to remove the patch - */ - swap>( - object: O, - method: K, - callback: PatcherSwapCallback, - ): () => void; - } - - // eslint-disable-next-line @typescript-eslint/no-invalid-void-type - type RunInScopeCallback = (code: string, run: (evalCode: string) => any, initial: boolean) => true | void; - - interface Exposer { - check?: string; - find: RegExp; - callback: (val: any) => void; - multiple?: boolean; - } - class RewriterApi { - /** - * Creates a hook that will modify the code of a script before it is run. - * This value is cached, so this hook may not run on subsequent page loads. - * addParseHook should always be called in the top level of a script. - * @param pluginName The name of the plugin creating the hook. - * @param prefix Limits the hook to only running on scripts beginning with this prefix. - * Passing `true` will only run on the index script, and passing `false` will run on all scripts. - * @param modifier A function that will modify the code, which should return the modified code. - */ - addParseHook(pluginName: string, prefix: string | boolean, modifier: (code: string) => string): () => void; - /** Removes all parse hooks created by a certain plugin */ - removeParseHooks(pluginName: string): void; - /** - * Creates a shared value that can be accessed from any script. - * @param pluginName The name of the plugin creating the shared value. - * @param id A unique identifier for the shared value. - * @param value The value to be shared. - * @returns A string representing the code to access the shared value. - */ - createShared(pluginName: string, id: string, value: any): string; - /** Removes all values created by {@link createShared} by a certain plugin */ - removeShared(pluginName: string): void; - /** Removes the shared value with a certain id created by {@link createShared} */ - removeSharedById(pluginName: string, id: string): void; - /** - * Runs code in the scope of modules when they are loaded, or when runInScope is called with them already loaded. - * Returning true from the callback will remove the hook. - */ - runInScope(pluginName: string, prefix: string | boolean, callback: RunInScopeCallback): () => void; - /** Stops all hooks created by {@link runInScope} */ - removeRunInScope(pluginName: string): void; - /** A utility function that exposes a variable based on regex to get its name. */ - exposeVar(pluginName: string, prefix: string | boolean, exposer: Exposer): () => void; - } - class ScopedRewriterApi { - constructor(id: string); - /** - * Creates a hook that will modify the code of a script before it is run. - * This value is cached, so this hook may not run on subsequent page loads. - * addParseHook should always be called in the top level of a script. - * @param prefix Limits the hook to only running on scripts beginning with this prefix. - * Passing `true` will only run on the index script, and passing `false` will run on all scripts. - * @param modifier A function that will modify the code, which should return the modified code. - */ - addParseHook(prefix: string | boolean, modifier: (code: string) => string): () => void; - /** - * Creates a shared value that can be accessed from any script. - * @param id A unique identifier for the shared value. - * @param value The value to be shared. - * @returns A string representing the code to access the shared value. - */ - createShared(id: string, value: any): string; - /** Removes the shared value with a certain id created by {@link createShared} */ - removeSharedById(id: string): void; - /** - * Runs code in the scope of modules when they are loaded, or when runInScope is called with them already loaded. - * Returning true from the callback will remove the hook. - */ - runInScope(prefix: string | boolean, callback: RunInScopeCallback): () => void; - /** A utility function that exposes a variable based on regex to get its name. */ - exposeVar(prefix: string | boolean, exposer: Exposer): () => void; - } - - interface CommandOptions { - text: string | (() => string); - keywords?: ReadonlyArray; - hidden?: () => boolean; - } - interface BaseCommandOptions { - title: string; - } - interface CommandSelectOptions extends BaseCommandOptions { - options: ReadonlyArray<{ - label: string; - value: string; - }>; - } - interface CommandNumberOptions extends BaseCommandOptions { - min?: number; - max?: number; - decimal?: boolean; - } - interface CommandStringOptions extends BaseCommandOptions { - maxLength?: number; - } - - interface CommandContext { - select(options: CommandSelectOptions): Promise; - number(options: CommandNumberOptions): Promise; - string(options: CommandStringOptions): Promise; - } - - type CommandCallback = (context: CommandContext) => void | Promise; - class CommandsApi { - /** Adds a command to the user's command palette. Can request additional input within the callback. */ - addCommand(id: string, options: CommandOptions, callback: CommandCallback): () => void; - /** Removes all commands that were added with the same id */ - removeCommands(id: string): void; - } - class ScopedCommandsApi { - constructor(id: string); - /** Adds a command to the user's command palette. Can request additional input within the callback. */ - addCommand(options: CommandOptions, callback: CommandCallback): () => void; - } - interface ScriptHeaders { - name: string; - description: string; - author: string; - version: string | null; - reloadRequired: string; - isLibrary: string; - downloadUrl: string | null; - webpage: string | null; - needsLib: string[]; - optionalLib: string[]; - deprecated: string | null; - gamemode: string[]; - changelog: string[]; - /** Only available for plugins */ - needsPlugin: string[]; - hasSettings: string; - } - class LibsApi { - /** A list of all the libraries installed */ - get list(): string[]; - /** Gets whether or not a plugin is installed and enabled */ - isEnabled(name: string): boolean; - /** Gets the headers of a library, such as version, author, and description */ - getHeaders(name: string): ScriptHeaders; - /** Gets the exported values of a library */ - get(name: T): Gimloader.Libraries[T]; - } - class ScopedLibsApi extends LibsApi { - constructor(id: string); - /** Gets a library by name, prompting the user to enable/download it if necessary. Returns a promise with its exports. */ - require(name: string, downloadUrl?: string): Promise; - } - class PluginsApi { - /** A list of all the plugins installed */ - get list(): string[]; - /** Whether a plugin exists and is enabled */ - isEnabled(name: string): boolean; - /** Gets the headers of a plugin, such as version, author, and description */ - getHeaders(name: string): ScriptHeaders; - /** Gets the exported values of a plugin, if it has been enabled */ - get(name: T): Gimloader.Plugins[T]; - /** - * @deprecated Use {@link get} instead - * @hidden - */ - getPlugin(name: string): { - return: any; - }; - } - class ScopedPluginsApi extends PluginsApi { - constructor(id: string); - /** Gets a plugin by name, prompting the user to enable/download it if necessary. Returns a promise with its exports. */ - require(name: string, downloadUrl?: string): Promise; - } - interface SvelteExport { - Index: any; - Client: any; - Animate: any; - Attachments: any; - Easing: any; - Events: any; - Motion: any; - WindowReactivity: any; - Reactivity: any; - Store: any; - Transition: any; - } - class Api { - /** Functions to edit Gimkit's code */ - static rewriter: Readonly; - /** Functions to edit Gimkit's code */ - rewriter: Readonly; - /** Functions to listen for key combinations */ - static hotkeys: Readonly; - /** Functions to listen for key combinations */ - hotkeys: Readonly; - /** - * Ways to interact with the current connection to the server, - * and functions to send general requests - */ - static net: Readonly; - /** - * Ways to interact with the current connection to the server, - * and functions to send general requests - */ - net: Readonly; - /** Functions for interacting with the DOM */ - static UI: Readonly; - /** Functions for interacting with the DOM */ - UI: Readonly; - /** Functions for persisting data between reloads */ - static storage: Readonly; - /** Functions for persisting data between reloads */ - storage: Readonly; - /** Functions for intercepting the arguments and return values of functions */ - static patcher: Readonly; - /** Functions for intercepting the arguments and return values of functions */ - patcher: Readonly; - /** Functions for adding commands to the command palette */ - static commands: Readonly; - /** Functions for adding commands to the command palette */ - commands: Readonly; - /** Methods for getting info on libraries */ - static libs: Readonly; - /** Methods for getting info on libraries */ - libs: Readonly; - /** Gets the exported values of a library */ - static lib: (name: T) => Gimloader.Libraries[T]; - /** Gets the exported values of a library */ - lib: (name: T) => Gimloader.Libraries[T]; - /** Methods for getting info on plugins */ - static plugins: Readonly; - /** Methods for getting info on plugins */ - plugins: Readonly; - /** Gets the exported values of a plugin, if it has been enabled */ - static plugin: (name: T) => Gimloader.Plugins[T]; - /** Gets the exported values of a plugin, if it has been enabled */ - plugin: (name: T) => Gimloader.Plugins[T]; - /** Gimkit's internal react instance */ - static get React(): typeof import("react"); - /** Gimkit's internal react instance */ - get React(): typeof import("react"); - /** Gimkit's internal reactDom instance */ - static get ReactDOM(): typeof import("react-dom/client"); - /** Gimkit's internal reactDom instance */ - get ReactDOM(): typeof import("react-dom/client"); - /** A variety of Gimkit internal objects available in 2d gamemodes */ - static get stores(): Stores.Stores; - /** A variety of gimkit internal objects available in 2d gamemodes */ - get stores(): Stores.Stores; - /** - * The exports of svelte v5.43.0, used internally by Gimloader and exposed to make scripts smaller. - * Should never be used by hand. - */ - static svelte_5_43_0: SvelteExport; - /** - * The exports of svelte v5.43.0, used internally by Gimloader and exposed to make scripts smaller. - * Should never be used by hand. - */ - svelte_5_43_0: SvelteExport; - /** - * @deprecated Gimkit has switched from Parcel to vite, rendering this api useless. - * @hidden - */ - static parcel: Readonly; - /** - * @deprecated Gimkit has switched from Parcel to vite, rendering this api useless. - * @hidden - */ - parcel: Readonly; - /** - * @deprecated Use GL.UI.notification - * @hidden - */ - static get notification(): AntdNotification; - /** - * @deprecated Use api.UI.notification - * @hidden - */ - get notification(): AntdNotification; - /** - * @deprecated No longer supported - * @hidden - */ - static get contextMenu(): { - showContextMenu: () => void; - createReactContextMenu: () => void; - }; - /** - * @deprecated No longer supported - * @hidden - */ - static get platformerPhysics(): any; - /** - * @deprecated The api no longer emits events. Use GL.net.loaded to listen to load events - * @hidden - */ - static addEventListener(type: string, callback: () => void): void; - /** - * @deprecated The api no longer emits events - * @hidden - */ - static removeEventListener(type: string, callback: () => void): void; - /** - * @deprecated Use {@link plugins} instead - * @hidden - */ - static get pluginManager(): Readonly; - constructor(type?: string, name?: string); - /** A utility for creating persistent settings menus, only available to plugins */ - settings: PluginSettings; - /** Run a callback when the script is disabled */ - onStop: (callback: () => void) => void; - /** - * Run a callback when the plugin's settings menu button is clicked - * - * This function is not available for libraries - */ - openSettingsMenu: (callback: () => void) => void; - /** Display a modal to the user indicating that the script requires a reload */ - requestReload: () => void; - } - - interface Plugins { - [name: string]: any; - } - - interface Libraries { - [name: string]: any; - } - } - const api: Gimloader.Api; - const GL: typeof Gimloader.Api; - /** @deprecated Use GL.stores */ - const stores: Gimloader.Stores.Stores; - /** @deprecated No longer supported */ - const platformerPhysics: any; - - interface Window { - api: Gimloader.Api; - GL: typeof Gimloader.Api; - /** @deprecated Use GL.stores */ - stores: Gimloader.Stores.Stores; - /** @deprecated No longer supported */ - platformerPhysics: any; - } -} +/// diff --git a/types/gimloader/package.json b/types/gimloader/package.json index 80e974b6574601..86729d491e276b 100644 --- a/types/gimloader/package.json +++ b/types/gimloader/package.json @@ -8,11 +8,7 @@ "https://github.com/Gimloader/Gimloader#readme" ], "dependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "phaser": "~3.90.0", - "@dimforge/rapier2d-compat": "~0.17.2", - "eventemitter2": "~6.4.9" + "@gimloader/types": "latest" }, "devDependencies": { "@types/gimloader": "workspace:."