From 0927c9f4273db114bc996d8eb68ef84aaa354a21 Mon Sep 17 00:00:00 2001 From: krypek Date: Sun, 4 Feb 2024 00:26:36 +0100 Subject: [PATCH] Rename remaining Optional to Nullable --- modules/game.feature.gui.base.text.d.ts | 2 +- modules/game.feature.menu.gui.help.help-menu.d.ts | 2 +- modules/game.feature.menu.gui.menu-misc.d.ts | 2 +- modules/game.feature.menu.gui.save.save-misc.d.ts | 2 +- modules/game.feature.msg.gui.message-box.d.ts | 2 +- modules/game.feature.new-game.new-game-model.d.ts | 2 +- modules/game.feature.npc.entities.sc-actor.d.ts | 2 +- modules/game.feature.player.player-model.d.ts | 2 +- modules/impact.base.actor-entity.d.ts | 2 +- modules/impact.base.entity.d.ts | 4 ++-- modules/impact.base.sound.d.ts | 4 ++-- modules/impact.feature.bgm.bgm.d.ts | 2 +- modules/impact.feature.storage.storage.d.ts | 4 ++-- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/game.feature.gui.base.text.d.ts b/modules/game.feature.gui.base.text.d.ts index 5f19ee6..815e88b 100644 --- a/modules/game.feature.gui.base.text.d.ts +++ b/modules/game.feature.gui.base.text.d.ts @@ -24,7 +24,7 @@ declare global { font: ig.MultiFont; text: sc.TextLike; textBlock: ig.TextBlock; - beepSound: Optional + beepSound: Nullable bleepDelay: number; playSound: boolean; stopped: boolean; diff --git a/modules/game.feature.menu.gui.help.help-menu.d.ts b/modules/game.feature.menu.gui.help.help-menu.d.ts index dc6aea7..a6092db 100644 --- a/modules/game.feature.menu.gui.help.help-menu.d.ts +++ b/modules/game.feature.menu.gui.help.help-menu.d.ts @@ -17,4 +17,4 @@ declare global { } var HelpScreen: HelpScreenConstructor; } -} \ No newline at end of file +} diff --git a/modules/game.feature.menu.gui.menu-misc.d.ts b/modules/game.feature.menu.gui.menu-misc.d.ts index 7041416..6b845bc 100644 --- a/modules/game.feature.menu.gui.menu-misc.d.ts +++ b/modules/game.feature.menu.gui.menu-misc.d.ts @@ -35,7 +35,7 @@ declare global { interface PercentNumber extends ig.GuiElementBase { number: sc.NumberGui - setNumber(this: this, number: number, skipTransition?: Optional): void + setNumber(this: this, number: number, skipTransition?: Nullable): void setColor(this: this, color: sc.GUI_NUMBER_COLOR): void; } interface PercentNumberConstructor extends ImpactClass { diff --git a/modules/game.feature.menu.gui.save.save-misc.d.ts b/modules/game.feature.menu.gui.save.save-misc.d.ts index c606062..f712d1f 100644 --- a/modules/game.feature.menu.gui.save.save-misc.d.ts +++ b/modules/game.feature.menu.gui.save.save-misc.d.ts @@ -46,7 +46,7 @@ declare global { hour: sc.NumberGui minute: sc.NumberGui second: sc.NumberGui - millis: Optional + millis: Nullable color: sc.GUI_NUMBER_COLOR hideHours: boolean drawHourDots: boolean diff --git a/modules/game.feature.msg.gui.message-box.d.ts b/modules/game.feature.msg.gui.message-box.d.ts index 1711b3a..9a40900 100644 --- a/modules/game.feature.msg.gui.message-box.d.ts +++ b/modules/game.feature.msg.gui.message-box.d.ts @@ -17,7 +17,7 @@ declare global { } interface MsgBoxGuiConstructor extends ImpactClass { new(maxWidth: number, pointerType: sc.ArrowBoxGui.POINTER, - text: ig.LangLabel, speed: ig.TextBlock.SPEED, personEntry: ig.MessageOverlayGui.Entry, beepSound: Optional): MsgBoxGui + text: ig.LangLabel, speed: ig.TextBlock.SPEED, personEntry: ig.MessageOverlayGui.Entry, beepSound: Nullable): MsgBoxGui } var MsgBoxGui: MsgBoxGuiConstructor } diff --git a/modules/game.feature.new-game.new-game-model.d.ts b/modules/game.feature.new-game.new-game-model.d.ts index 6b2b71c..b350f59 100644 --- a/modules/game.feature.new-game.new-game-model.d.ts +++ b/modules/game.feature.new-game.new-game-model.d.ts @@ -102,7 +102,7 @@ declare global { options: Record; setActive(this: this, active: boolean): void - toggle(this: this, options: sc.NEW_GAME_OPTIONS.Keys, set?: Optional): void + toggle(this: this, options: sc.NEW_GAME_OPTIONS.Keys, set?: Nullable): void get(this: this, option: sc.NEW_GAME_OPTIONS.Keys): boolean; applyStoreData(this: this, atRhombus: boolean): void; getDropRateMultiplier(this: this): number; diff --git a/modules/game.feature.npc.entities.sc-actor.d.ts b/modules/game.feature.npc.entities.sc-actor.d.ts index c58f91b..5bb3309 100644 --- a/modules/game.feature.npc.entities.sc-actor.d.ts +++ b/modules/game.feature.npc.entities.sc-actor.d.ts @@ -57,7 +57,7 @@ declare global { interface ActorEntity extends ig.ActorEntity { soundType: 'default' dustType: sc.ACTOR_DUST - stepFx: { frames: number[], lastFrame: number, effects: ig.EffectSheet, prevTerrain: Optional, prevEffect: Optional } + stepFx: { frames: number[], lastFrame: number, effects: ig.EffectSheet, prevTerrain: Nullable, prevEffect: Nullable } nav: { path: ig.NavPath, failTimer: number, lastFailCount: number } tooHighToFall: boolean stepStats: { terrain: ig.TERRAIN, centerTerrain: number } diff --git a/modules/game.feature.player.player-model.d.ts b/modules/game.feature.player.player-model.d.ts index 345272d..c1ff852 100644 --- a/modules/game.feature.player.player-model.d.ts +++ b/modules/game.feature.player.player-model.d.ts @@ -103,7 +103,7 @@ declare global { hasOverload: boolean hp: number core: sc.PlayerModel['core'] - skills: Optional[] + skills: Nullable[] chapter: number skillPoints: sc.PlayerModel['skillPoints'] skillPointsExtra: sc.PlayerModel['skillPointsExtra'] diff --git a/modules/impact.base.actor-entity.d.ts b/modules/impact.base.actor-entity.d.ts index d7c0f5c..9fa75c6 100644 --- a/modules/impact.base.actor-entity.d.ts +++ b/modules/impact.base.actor-entity.d.ts @@ -86,7 +86,7 @@ declare global { cancelJump(this: this): void; setWalkAnims(this: this, config: string | ig.ActorEntity.WalkAnims): void; storeWalkAnims(this: this, name: string, config: ig.ActorEntity.WalkAnims): void; - doJump(this: this, zVel: number, callbackHeight: number, maxVel: number, accelSpeed: Optional, ignoreSounds: boolean): void + doJump(this: this, zVel: number, callbackHeight: number, maxVel: number, accelSpeed: Nullable, ignoreSounds: boolean): void doFloatJump(this: this, floatJump: number, jumping: boolean | number, maxVel: number): void } interface ActorEntityConstructor extends ImpactClass { diff --git a/modules/impact.base.entity.d.ts b/modules/impact.base.entity.d.ts index 2ba89a7..69a9824 100644 --- a/modules/impact.base.entity.d.ts +++ b/modules/impact.base.entity.d.ts @@ -39,7 +39,7 @@ declare global { mapId: number; settings: unknown; // an empty object, appears to be unused - name?: Optional + name?: Nullable coll: ig.CollEntry; sprites: ig.CubeSprite[]; entityAttached: ig.Entity.Attachable[]; @@ -96,7 +96,7 @@ declare global { } namespace EntityTools { - function getGroundEntity(entity: ig.Entity): Optional + function getGroundEntity(entity: ig.Entity): Nullable function isInScreen(entity: ig.Entity, x?: number, y?: number): boolean } diff --git a/modules/impact.base.sound.d.ts b/modules/impact.base.sound.d.ts index 0f062a4..9a52294 100644 --- a/modules/impact.base.sound.d.ts +++ b/modules/impact.base.sound.d.ts @@ -132,8 +132,8 @@ declare global { namespace SoundHelper { function playAtEntity( - sound: ig.Sound, entity: ig.Entity, isLooped: Optional, - settings: Optional, range?: number, type?: ig.SOUND_RANGE_TYPE): ig.SoundHandle; + sound: ig.Sound, entity: ig.Entity, isLooped: Nullable, + settings: Nullable, range?: number, type?: ig.SOUND_RANGE_TYPE): ig.SoundHandle; } type SoundHandle = ig.SoundHandleWebAudio | ig.SoundHandleDefault diff --git a/modules/impact.feature.bgm.bgm.d.ts b/modules/impact.feature.bgm.bgm.d.ts index e670aa6..4cbd08b 100644 --- a/modules/impact.feature.bgm.bgm.d.ts +++ b/modules/impact.feature.bgm.bgm.d.ts @@ -31,7 +31,7 @@ declare global { defaultTrackTypeStack: string[] overloadDefault: boolean paused: boolean - resumeOnChange: Optional + resumeOnChange: Nullable } } diff --git a/modules/impact.feature.storage.storage.d.ts b/modules/impact.feature.storage.storage.d.ts index 75d346f..4243b63 100644 --- a/modules/impact.feature.storage.storage.d.ts +++ b/modules/impact.feature.storage.storage.d.ts @@ -9,9 +9,9 @@ declare global { area: ig.LangLabel.Data; arena: sc.Arena.Data bgm: ig.Bgm.Data - cancelButtonText: Optional + cancelButtonText: Nullable commonEvents: { runData: Record } - currentTask: Optional + currentTask: Nullable drops: sc.MenuModel['dropCounts'] floor: ig.LangLabel.Data | 'MISSING LABEL'; forceCombatMode: boolean