Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/js/core/background_resources_loader.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Application } from "../application";
/* typehints:end */
/**
* @import { Application } from "../application"
*/

import { initSpriteCache } from "../game/meta_building_registry";
import { MUSIC, SOUNDS } from "../platform/sound";
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/globals.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Application } from "../application";
/* typehints:end */
/**
* @import { Application } from "../application"
*/

/**
* Used for the bug reporter, and the click detector which both have no handles to this.
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/read_write_proxy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Storage } from "@/platform/storage";
/* typehints:end */
/**
* @import { Storage } from "@/platform/storage"
*/

import { FsError } from "@/platform/fs_error";
import { ExplainedResult } from "./explained_result";
Expand Down
6 changes: 3 additions & 3 deletions src/js/core/state_manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start*/
import { Application } from "../application";
/* typehints:end*/
/**
* @import { Application } from "../application"
*/

import { MOD_SIGNALS } from "../mods/mod_signals";
import { GameState } from "./game_state";
Expand Down
10 changes: 5 additions & 5 deletions src/js/game/building_codes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* typehints:start */
import { MetaBuilding } from "./meta_building";
import { AtlasSprite } from "../core/sprites";
import { Vector } from "../core/vector";
/* typehints:end */
/**
* @import { MetaBuilding } from "./meta_building"
* @import { AtlasSprite } from "../core/sprites"
* @import { Vector } from "../core/vector"
*/

import { gMetaBuildingRegistry } from "../core/global_registries";

Expand Down
6 changes: 3 additions & 3 deletions src/js/game/buildings/block.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Entity } from "../entity";
/* typehints:end */
/**
* @import { Entity } from "../entity"
*/

import { defaultBuildingVariant, MetaBuilding } from "../meta_building";

Expand Down
6 changes: 3 additions & 3 deletions src/js/game/buildings/constant_producer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Entity } from "../entity";
/* typehints:end */
/**
* @import { Entity } from "../entity"
*/

import { enumDirection, Vector } from "../../core/vector";
import { ConstantSignalComponent } from "../components/constant_signal";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/buildings/goal_acceptor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Entity } from "../entity";
/* typehints:end */
/**
* @import { Entity } from "../entity"
*/

import { enumDirection, Vector } from "../../core/vector";
import { GoalAcceptorComponent } from "../components/goal_acceptor";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/core.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Application } from "../application";
/* typehints:end */
/**
* @import { Application } from "../application"
*/
import { BufferMaintainer } from "../core/buffer_maintainer";
import { getBufferStats } from "../core/buffer_utils";
import { globalConfig } from "../core/config";
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/entity.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { DrawParameters } from "../core/draw_parameters";
import { Component } from "./component";
/* typehints:end */
/**
* @import { DrawParameters } from "../core/draw_parameters"
* @import { Component } from "./component"
*/

import { GameRoot } from "./root";
import { globalConfig } from "../core/config";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/game_loading_overlay.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Application } from "../application";
/* typehints:end */
/**
* @import { Application } from "../application"
*/

import { randomChoice } from "../core/utils";
import { T } from "../translations";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/game_mode.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "./root";
/* typehints:end */
/**
* @import { GameRoot } from "./root"
*/

import { gGameModeRegistry } from "../core/global_registries";
import { Rectangle } from "../core/rectangle";
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/game_system.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { GameRoot } from "./root";
import { DrawParameters } from "../core/draw_parameters";
/* typehints:end */
/**
* @import { GameRoot } from "./root"
* @import { DrawParameters } from "../core/draw_parameters"
*/

/**
* A game system processes all entities which match a given schema, usually a list of
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/game_system_manager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { GameSystem } from "./game_system";
import { GameRoot } from "./root";
/* typehints:end */
/**
* @import { GameSystem } from "./game_system"
* @import { GameRoot } from "./root"
*/

import { Logger } from "../core/logging";
import { BeltSystem } from "./systems/belt";
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/game_system_with_filter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { Component } from "./component";
import { Entity } from "./entity";
/* typehints:end */
/**
* @import { Component } from "./component"
* @import { Entity } from "./entity"
*/

import { GameRoot } from "./root";
import { GameSystem } from "./game_system";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/game_time.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "./root";
/* typehints:end */
/**
* @import { GameRoot } from "./root"
*/

import { globalConfig } from "../core/config";
import { BasicSerializableObject, types } from "../savegame/serialization";
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/hud/base_hud_part.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { DrawParameters } from "../../core/draw_parameters";
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { DrawParameters } from "../../core/draw_parameters"
* @import { GameRoot } from "../root"
*/

import { ClickDetector } from "../../core/click_detector";

Expand Down
6 changes: 0 additions & 6 deletions src/js/game/hud/hud.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ export class GameHUD {
settingsMenu: new HUDSettingsMenu(this.root),
debugInfo: new HUDDebugInfo(this.root),
dialogs: new HUDModalDialogs(this.root),

// Typing hints
/* typehints:start */
/** @type {HUDChangesDebugger} */
changesDebugger: null,
/* typehints:end */
};

if (G_IS_DEV) {
Expand Down
4 changes: 0 additions & 4 deletions src/js/game/hud/parts/mass_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import { THEME } from "../../theme";
import { enumHubGoalRewards } from "../../tutorial_goals";
import { BaseHUDPart } from "../base_hud_part";

/* typehints:start */
// @ts-ignore
/* typehints:end */

const logger = new Logger("hud/mass_selector");

export class HUDMassSelector extends BaseHUDPart {
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/hud/parts/modal_dialogs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { Application } from "../../../application";
/* typehints:end */
/**
* @import { Application } from "../../../application"
*/

import { SOUNDS } from "../../../platform/sound";
import { DynamicDomAttach } from "../dynamic_dom_attach";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/hud/parts/next_puzzle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { PuzzlePlayGameMode } from "../../modes/puzzle_play";
/* typehints:end */
/**
* @import { PuzzlePlayGameMode } from "../../modes/puzzle_play"
*/

import { makeDiv } from "../../../core/utils";
import { T } from "../../../translations";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/hud/parts/puzzle_complete_notification.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { PuzzlePlayGameMode } from "../../modes/puzzle_play";
/* typehints:end */
/**
* @import { PuzzlePlayGameMode } from "../../modes/puzzle_play"
*/

import { InputReceiver } from "../../../core/input_receiver";
import { makeDiv } from "../../../core/utils";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/hud/parts/puzzle_play_metadata.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { PuzzlePlayGameMode } from "../../modes/puzzle_play";
/* typehints:end */
/**
* @import { PuzzlePlayGameMode } from "../../modes/puzzle_play"
*/

import { formatBigNumberFull, formatSeconds, makeDiv } from "../../../core/utils";
import { T } from "../../../translations";
Expand Down
10 changes: 5 additions & 5 deletions src/js/game/key_action_mapper.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* typehints:start */
import { Application } from "../application";
import { InputReceiver } from "../core/input_receiver";
import { GameRoot } from "./root";
/* typehints:end */
/**
* @import { Application } from "../application"
* @import { InputReceiver } from "../core/input_receiver"
* @import { GameRoot } from "./root"
*/

import { getStringForKeyCode, KEYCODES, keyToKeyCode } from "@/core/keycodes";
import { IS_MOBILE } from "../core/config";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/modes/puzzle.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { GameRoot } from "../root"
*/

import { Rectangle } from "../../core/rectangle";
import { types } from "../../savegame/serialization";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/modes/puzzle_edit.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { GameRoot } from "../root"
*/

import { enumGameModeIds } from "../game_mode";
import { PuzzleGameMode } from "./puzzle";
Expand Down
6 changes: 3 additions & 3 deletions src/js/game/modes/puzzle_play.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { GameRoot } from "../root"
*/

import { enumGameModeIds } from "../game_mode";
import { PuzzleGameMode } from "./puzzle";
Expand Down
8 changes: 4 additions & 4 deletions src/js/game/modes/regular.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* typehints:start */
import { MetaBuilding } from "../meta_building";
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { MetaBuilding } from "../meta_building"
* @import { GameRoot } from "../root"
*/

import { IS_MOBILE } from "../../core/config";
import { findNiceIntegerValue } from "../../core/utils";
Expand Down
50 changes: 25 additions & 25 deletions src/js/game/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ import { RandomNumberGenerator } from "../core/rng";
import { Signal } from "../core/signal";

// Type hints
/* typehints:start */
import { Application } from "../application";
import { BufferMaintainer } from "../core/buffer_maintainer";
import { Vector } from "../core/vector";
import { Savegame } from "../savegame/savegame";
import { InGameState } from "../states/ingame";
import { AutomaticSave } from "./automatic_save";
import { BaseItem } from "./base_item";
import { Camera } from "./camera";
import { DynamicTickrate } from "./dynamic_tickrate";
import { Entity } from "./entity";
import { EntityManager } from "./entity_manager";
import { GameMode } from "./game_mode";
import { GameSystemManager } from "./game_system_manager";
import { GameTime } from "./game_time";
import { HubGoals } from "./hub_goals";
import { GameHUD } from "./hud/hud";
import { KeyActionMapper } from "./key_action_mapper";
import { GameLogic } from "./logic";
import { MapView } from "./map_view";
import { ProductionAnalytics } from "./production_analytics";
import { ShapeDefinition } from "./shape_definition";
import { ShapeDefinitionManager } from "./shape_definition_manager";
import { SoundProxy } from "./sound_proxy";
/* typehints:end */
/**
* @import { Application } from "../application"
* @import { BufferMaintainer } from "../core/buffer_maintainer"
* @import { Vector } from "../core/vector"
* @import { Savegame } from "../savegame/savegame"
* @import { InGameState } from "../states/ingame"
* @import { AutomaticSave } from "./automatic_save"
* @import { BaseItem } from "./base_item"
* @import { Camera } from "./camera"
* @import { DynamicTickrate } from "./dynamic_tickrate"
* @import { Entity } from "./entity"
* @import { EntityManager } from "./entity_manager"
* @import { GameMode } from "./game_mode"
* @import { GameSystemManager } from "./game_system_manager"
* @import { GameTime } from "./game_time"
* @import { HubGoals } from "./hub_goals"
* @import { GameHUD } from "./hud/hud"
* @import { KeyActionMapper } from "./key_action_mapper"
* @import { GameLogic } from "./logic"
* @import { MapView } from "./map_view"
* @import { ProductionAnalytics } from "./production_analytics"
* @import { ShapeDefinition } from "./shape_definition"
* @import { ShapeDefinitionManager } from "./shape_definition_manager"
* @import { SoundProxy } from "./sound_proxy"
*/

const logger = new Logger("game/root");

Expand Down
6 changes: 3 additions & 3 deletions src/js/game/sound_proxy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* typehints:start */
import { GameRoot } from "./root";
/* typehints:end */
/**
* @import { GameRoot } from "./root"
*/

import { SOUNDS } from "../platform/sound";

Expand Down
10 changes: 5 additions & 5 deletions src/js/game/systems/zone.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* typehints:start */
import { DrawParameters } from "../../core/draw_parameters";
import { MapChunkView } from "../map_chunk_view";
import { GameRoot } from "../root";
/* typehints:end */
/**
* @import { DrawParameters } from "../../core/draw_parameters"
* @import { MapChunkView } from "../map_chunk_view"
* @import { GameRoot } from "../root"
*/

import { globalConfig } from "../../core/config";
import { STOP_PROPAGATION } from "../../core/signal";
Expand Down
Loading
Loading