Skip to content

Commit

Permalink
Rename remaining Optional to Nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
krypciak committed Feb 3, 2024
1 parent ce5b596 commit 0927c9f
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion modules/game.feature.gui.base.text.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ declare global {
font: ig.MultiFont;
text: sc.TextLike;
textBlock: ig.TextBlock;
beepSound: Optional<ig.Sound>
beepSound: Nullable<ig.Sound>
bleepDelay: number;
playSound: boolean;
stopped: boolean;
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.menu.gui.help.help-menu.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ declare global {
}
var HelpScreen: HelpScreenConstructor;
}
}
}
2 changes: 1 addition & 1 deletion modules/game.feature.menu.gui.menu-misc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ declare global {
interface PercentNumber extends ig.GuiElementBase {
number: sc.NumberGui

setNumber(this: this, number: number, skipTransition?: Optional<boolean>): void
setNumber(this: this, number: number, skipTransition?: Nullable<boolean>): void
setColor(this: this, color: sc.GUI_NUMBER_COLOR): void;
}
interface PercentNumberConstructor extends ImpactClass<PercentNumber> {
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.menu.gui.save.save-misc.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ declare global {
hour: sc.NumberGui
minute: sc.NumberGui
second: sc.NumberGui
millis: Optional<sc.NumberGui>
millis: Nullable<sc.NumberGui>
color: sc.GUI_NUMBER_COLOR
hideHours: boolean
drawHourDots: boolean
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.msg.gui.message-box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare global {
}
interface MsgBoxGuiConstructor extends ImpactClass<MsgBoxGui> {
new(maxWidth: number, pointerType: sc.ArrowBoxGui.POINTER,
text: ig.LangLabel, speed: ig.TextBlock.SPEED, personEntry: ig.MessageOverlayGui.Entry, beepSound: Optional<ig.Sound>): MsgBoxGui
text: ig.LangLabel, speed: ig.TextBlock.SPEED, personEntry: ig.MessageOverlayGui.Entry, beepSound: Nullable<ig.Sound>): MsgBoxGui
}
var MsgBoxGui: MsgBoxGuiConstructor
}
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.new-game.new-game-model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ declare global {
options: Record<sc.NEW_GAME_OPTIONS.Keys, boolean>;

setActive(this: this, active: boolean): void
toggle(this: this, options: sc.NEW_GAME_OPTIONS.Keys, set?: Optional<sc.NEW_GAME_SETS.Keys>): void
toggle(this: this, options: sc.NEW_GAME_OPTIONS.Keys, set?: Nullable<sc.NEW_GAME_SETS.Keys>): void
get(this: this, option: sc.NEW_GAME_OPTIONS.Keys): boolean;
applyStoreData(this: this, atRhombus: boolean): void;
getDropRateMultiplier(this: this): number;
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.npc.entities.sc-actor.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<ig.TERRAIN>, prevEffect: Optional<ig.ENTITY.Effect> }
stepFx: { frames: number[], lastFrame: number, effects: ig.EffectSheet, prevTerrain: Nullable<ig.TERRAIN>, prevEffect: Nullable<ig.ENTITY.Effect> }
nav: { path: ig.NavPath, failTimer: number, lastFailCount: number }
tooHighToFall: boolean
stepStats: { terrain: ig.TERRAIN, centerTerrain: number }
Expand Down
2 changes: 1 addition & 1 deletion modules/game.feature.player.player-model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ declare global {
hasOverload: boolean
hp: number
core: sc.PlayerModel['core']
skills: Optional<boolean>[]
skills: Nullable<boolean>[]
chapter: number
skillPoints: sc.PlayerModel['skillPoints']
skillPointsExtra: sc.PlayerModel['skillPointsExtra']
Expand Down
2 changes: 1 addition & 1 deletion modules/impact.base.actor-entity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>, ignoreSounds: boolean): void
doJump(this: this, zVel: number, callbackHeight: number, maxVel: number, accelSpeed: Nullable<number>, ignoreSounds: boolean): void
doFloatJump(this: this, floatJump: number, jumping: boolean | number, maxVel: number): void
}
interface ActorEntityConstructor extends ImpactClass<ActorEntity> {
Expand Down
4 changes: 2 additions & 2 deletions modules/impact.base.entity.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ declare global {
mapId: number;

settings: unknown; // an empty object, appears to be unused
name?: Optional<string>
name?: Nullable<string>
coll: ig.CollEntry;
sprites: ig.CubeSprite[];
entityAttached: ig.Entity.Attachable[];
Expand Down Expand Up @@ -96,7 +96,7 @@ declare global {
}

namespace EntityTools {
function getGroundEntity(entity: ig.Entity): Optional<ig.Entity>
function getGroundEntity(entity: ig.Entity): Nullable<ig.Entity>
function isInScreen(entity: ig.Entity, x?: number, y?: number): boolean
}

Expand Down
4 changes: 2 additions & 2 deletions modules/impact.base.sound.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ declare global {

namespace SoundHelper {
function playAtEntity(
sound: ig.Sound, entity: ig.Entity, isLooped: Optional<boolean>,
settings: Optional<SoundPlaySettings>, range?: number, type?: ig.SOUND_RANGE_TYPE): ig.SoundHandle;
sound: ig.Sound, entity: ig.Entity, isLooped: Nullable<boolean>,
settings: Nullable<SoundPlaySettings>, range?: number, type?: ig.SOUND_RANGE_TYPE): ig.SoundHandle;
}
type SoundHandle = ig.SoundHandleWebAudio | ig.SoundHandleDefault

Expand Down
2 changes: 1 addition & 1 deletion modules/impact.feature.bgm.bgm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ declare global {
defaultTrackTypeStack: string[]
overloadDefault: boolean
paused: boolean
resumeOnChange: Optional<unknown>
resumeOnChange: Nullable<unknown>
}
}

Expand Down
4 changes: 2 additions & 2 deletions modules/impact.feature.storage.storage.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ declare global {
area: ig.LangLabel.Data;
arena: sc.Arena.Data
bgm: ig.Bgm.Data
cancelButtonText: Optional<ig.LangLabel>
cancelButtonText: Nullable<ig.LangLabel>
commonEvents: { runData: Record<string, { trigger: number }> }
currentTask: Optional<ig.LangLabel.Data>
currentTask: Nullable<ig.LangLabel.Data>
drops: sc.MenuModel['dropCounts']
floor: ig.LangLabel.Data | 'MISSING LABEL';
forceCombatMode: boolean
Expand Down

0 comments on commit 0927c9f

Please sign in to comment.