Change imports

This commit is contained in:
2026-11-04 21:51:26 -03:00
parent 98fa45ebd1
commit ba4b2a8798
270 changed files with 994 additions and 994 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { canvas, draw_rect, draw_text } from "$/client/renderer/mod.ts";
import { canvas, draw_rect, draw_text } from "@/client/renderer/mod.ts";
const LINE_HEIGHT = 24;
const VISIBLE_SECONDS = 10;
+3 -3
View File
@@ -2,9 +2,9 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import { Marked } from "marked";
import { AssetManager } from "$/client/assets.ts";
import { mod_credits } from "$/client/mods.ts";
import { canvas, draw_rect } from "$/client/renderer/mod.ts";
import { AssetManager } from "@/client/assets.ts";
import { mod_credits } from "@/client/mods.ts";
import { canvas, draw_rect } from "@/client/renderer/mod.ts";
import { GuiScreen } from "./gui_screen.ts";
// credits come from servers' mods, so markdown only: raw html is shown as text and links can't run code
+9 -9
View File
@@ -1,15 +1,15 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import type { Client } from "$/client/client.ts";
import { DebugUI } from "$/client/debug_ui.ts";
import { format_clock } from "$/common/time.ts";
import { profiler, type SectionStats } from "$/client/profiler.ts";
import { canvas, gpu_timer, render_debug, render_stats } from "$/client/renderer/mod.ts";
import { RENDER_LAYERS } from "$/common/everything_registry.ts";
import { atlas_png } from "$/client/atlas.ts";
import { RenderBenchmark } from "$/client/benchmark/benchmark.ts";
import { format_report } from "$/client/benchmark/report.ts";
import type { Client } from "@/client/client.ts";
import { DebugUI } from "@/client/debug_ui.ts";
import { format_clock } from "@/common/time.ts";
import { profiler, type SectionStats } from "@/client/profiler.ts";
import { canvas, gpu_timer, render_debug, render_stats } from "@/client/renderer/mod.ts";
import { RENDER_LAYERS } from "@/common/everything_registry.ts";
import { atlas_png } from "@/client/atlas.ts";
import { RenderBenchmark } from "@/client/benchmark/benchmark.ts";
import { format_report } from "@/client/benchmark/report.ts";
// how often the totals that go through every chunk are worked out again, so the overlay doesn't slow the frames it's
// measuring
+1 -1
View File
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import { canvas, draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { GuiScreen } from "./gui_screen.ts";
import { back_to_title } from "./title_screen.ts";
import { Button, TEXT_HEIGHT, TEXT_SCALE } from "./widgets.ts";
+3 -3
View File
@@ -2,11 +2,11 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
import { GuiScreen } from "./gui_screen.ts";
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import { canvas, draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { InputManager } from "../input_manager.ts";
import type { Client } from "../client.ts";
import { MAX_CHAT_LENGTH, type ServerMessage } from "$/common/protocol.ts";
import type { Suggestion } from "$/common/commands.ts";
import { MAX_CHAT_LENGTH, type ServerMessage } from "@/common/protocol.ts";
import type { Suggestion } from "@/common/commands.ts";
import { TEXT_HEIGHT, TextInput } from "./widgets.ts";
const SCALE = 2;
+2 -2
View File
@@ -3,8 +3,8 @@
// screens mods' client scripts make, see docs/modding/gui/index.md: the screens of their menus, and screens with no
// menu. a mod's screen that throws is closed, with the error in the console
import { TICK_DELTA } from "$/common/constants.ts";
import type { ClientMenu as ModClientMenu, MenuScreen, Screen } from "$/common/mod_api/client.ts";
import { TICK_DELTA } from "@/common/constants.ts";
import type { ClientMenu as ModClientMenu, MenuScreen, Screen } from "@/common/mod_api/client.ts";
import { canvas } from "../renderer/mod.ts";
import type { Client } from "../client.ts";
import type { ClientMenu } from "../menu.ts";
+5 -5
View File
@@ -3,11 +3,11 @@
import { GuiMenuScreen } from "./gui_screen.ts";
import type { LocalPlayer } from "../entity/local_player.ts";
import { EverythingRegistry } from "$/common/everything_registry.ts";
import type { EffectJson } from "$/common/mod_data.ts";
import { TICKS_PER_SECOND } from "$/common/constants.ts";
import { display_name } from "$/common/utils.ts";
import { ClientMessage, PLAYER_MENU_EXTRA } from "$/common/protocol.ts";
import { EverythingRegistry } from "@/common/everything_registry.ts";
import type { EffectJson } from "@/common/mod_data.ts";
import { TICKS_PER_SECOND } from "@/common/constants.ts";
import { display_name } from "@/common/utils.ts";
import { ClientMessage, PLAYER_MENU_EXTRA } from "@/common/protocol.ts";
import { player_menu } from "../menu.ts";
import type { ModGraphics } from "./mod_graphics.ts";
import { draw_gui_player } from "../rendering/gui_player.ts";
+3 -3
View File
@@ -1,10 +1,10 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { SLOT_SIZE } from "$/common/constants.ts";
import { SLOT_SIZE } from "@/common/constants.ts";
import { draw_gui_sprite, GUI_SCALE } from "./gui_sprites.ts";
import { click_slot } from "$/common/inventory.ts";
import { ClientMessage, CRAFTING_RESULT_SLOT, PLAYER_MENU } from "$/common/protocol.ts";
import { click_slot } from "@/common/inventory.ts";
import { ClientMessage, CRAFTING_RESULT_SLOT, PLAYER_MENU } from "@/common/protocol.ts";
import { point_inside_rec } from "../../common/utils.ts";
import { InputManager } from "../input_manager.ts";
import { ClientInventories } from "../inventory.ts";
+3 -3
View File
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { AssetManager } from "$/client/assets.ts";
import type { Texture } from "$/client/renderer/mod.ts";
import { draw_nine_slice } from "$/client/rendering/render_utils.ts";
import { AssetManager } from "@/client/assets.ts";
import type { Texture } from "@/client/renderer/mod.ts";
import { draw_nine_slice } from "@/client/rendering/render_utils.ts";
import { GUI_ATLAS, type GuiSprite } from "./gui_atlas.ts";
// gui sprites are drawn 3 times bigger, like minecraft at gui scale 3. SLOT_SIZE is its 18 pixel slot at this scale
+8 -8
View File
@@ -1,14 +1,14 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import type { Client } from "$/client/client.ts";
import type { LocalPlayer } from "$/client/entity/local_player.ts";
import type { ClientInventories } from "$/client/inventory.ts";
import { draw_item } from "$/client/rendering/render_utils.ts";
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import { display_name } from "$/common/utils.ts";
import { clock } from "$/common/time.ts";
import { biome_season } from "$/common/worldgen/biomes.ts";
import type { Client } from "@/client/client.ts";
import type { LocalPlayer } from "@/client/entity/local_player.ts";
import type { ClientInventories } from "@/client/inventory.ts";
import { draw_item } from "@/client/rendering/render_utils.ts";
import { canvas, draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { display_name } from "@/common/utils.ts";
import { clock } from "@/common/time.ts";
import { biome_season } from "@/common/worldgen/biomes.ts";
import { TEXT_HEIGHT, TEXT_SCALE } from "./widgets.ts";
import { draw_gui_sprite, GUI_SCALE } from "./gui_sprites.ts";
+10 -10
View File
@@ -4,13 +4,13 @@
// the immediate mode drawing mods' client scripts get (Graphics in common/mod_api/client.ts), on top of the renderer.
// one per screen, so text inputs keep their text and focus while it's open. mods work in gui pixels, GUI_SCALE canvas
// pixels each
import { EverythingRegistry, type ItemRegistry } from "$/common/everything_registry.ts";
import { ItemStack } from "$/common/inventory.ts";
import type { Color, Graphics } from "$/common/mod_api/client.ts";
import type { FluidVariant, KeyCode } from "$/common/mod_api/shared.ts";
import { point_inside_rec } from "$/common/utils.ts";
import { AssetManager } from "$/client/assets.ts";
import { InputManager, type KeyCode as InputKey } from "$/client/input_manager.ts";
import { EverythingRegistry, type ItemRegistry } from "@/common/everything_registry.ts";
import { ItemStack } from "@/common/inventory.ts";
import type { Color, Graphics } from "@/common/mod_api/client.ts";
import type { FluidVariant, KeyCode } from "@/common/mod_api/shared.ts";
import { point_inside_rec } from "@/common/utils.ts";
import { AssetManager } from "@/client/assets.ts";
import { InputManager, type KeyCode as InputKey } from "@/client/input_manager.ts";
import {
begin_clip,
canvas,
@@ -20,9 +20,9 @@ import {
end_clip,
measure_text,
Texture,
} from "$/client/renderer/mod.ts";
import { draw_fluid, draw_item } from "$/client/rendering/render_utils.ts";
import { get_sprite_region } from "$/client/sprites.ts";
} from "@/client/renderer/mod.ts";
import { draw_fluid, draw_item } from "@/client/rendering/render_utils.ts";
import { get_sprite_region } from "@/client/sprites.ts";
import { draw_tooltip, item_tooltip, type TooltipLine } from "./tooltip.ts";
import { TEXT_HEIGHT, TEXT_SCALE, TextInput } from "./widgets.ts";
import { GUI_ATLAS } from "./gui_atlas.ts";
+2 -2
View File
@@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import type { Client } from "$/client/client.ts";
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import type { Client } from "@/client/client.ts";
import { canvas, draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { GuiScreen } from "./gui_screen.ts";
import { Button, TEXT_HEIGHT } from "./widgets.ts";
import { CreditsScreen } from "./credits_screen.ts";
+5 -5
View File
@@ -1,11 +1,11 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { MAX_NAME_LENGTH } from "$/common/protocol.ts";
import { InputManager } from "$/client/input_manager.ts";
import { canvas, draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import { default_server, HandshakeError, server_address, ServerAddress } from "$/client/handshake.ts";
import { default_player_name } from "$/client/network.ts";
import { MAX_NAME_LENGTH } from "@/common/protocol.ts";
import { InputManager } from "@/client/input_manager.ts";
import { canvas, draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { default_server, HandshakeError, server_address, ServerAddress } from "@/client/handshake.ts";
import { default_player_name } from "@/client/network.ts";
import { GuiScreen } from "./gui_screen.ts";
import { CreditsScreen } from "./credits_screen.ts";
import { Button, EditBox, TEXT_HEIGHT, TEXT_SCALE, TextInput } from "./widgets.ts";
+8 -8
View File
@@ -3,14 +3,14 @@
// the box next to the mouse saying what an item is, like minecraft's: its name, the fluid in it, what it's worth, then
// its lore
import { EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
import { contained_fluid, type ItemStack, sell_value } from "$/common/inventory.ts";
import { display_name } from "$/common/utils.ts";
import { fluid_rules } from "$/client/fluid_rules.ts";
import { canvas, draw_text, draw_texture_region, measure_text, type Texture } from "$/client/renderer/mod.ts";
import { AssetManager } from "$/client/assets.ts";
import type { MenuTank } from "$/common/protocol.ts";
import { get_sprite_region } from "$/client/sprites.ts";
import { EverythingRegistry, ItemRegistry } from "@/common/everything_registry.ts";
import { contained_fluid, type ItemStack, sell_value } from "@/common/inventory.ts";
import { display_name } from "@/common/utils.ts";
import { fluid_rules } from "@/client/fluid_rules.ts";
import { canvas, draw_text, draw_texture_region, measure_text, type Texture } from "@/client/renderer/mod.ts";
import { AssetManager } from "@/client/assets.ts";
import type { MenuTank } from "@/common/protocol.ts";
import { get_sprite_region } from "@/client/sprites.ts";
import { draw_gui_sprite, GUI_SCALE } from "./gui_sprites.ts";
import { TEXT_HEIGHT, TEXT_SCALE } from "./widgets.ts";
+3 -3
View File
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: 2026 Paula Wisnievski
// SPDX-License-Identifier: AGPL-3.0-or-later
import { point_inside_rec } from "$/common/utils.ts";
import { InputManager, type KeyCode } from "$/client/input_manager.ts";
import { draw_rect, draw_text, measure_text } from "$/client/renderer/mod.ts";
import { point_inside_rec } from "@/common/utils.ts";
import { InputManager, type KeyCode } from "@/client/input_manager.ts";
import { draw_rect, draw_text, measure_text } from "@/client/renderer/mod.ts";
import { draw_gui_sprite } from "./gui_sprites.ts";
export const TEXT_SCALE = 2;