Change the asset keys

This commit is contained in:
2026-11-04 21:54:01 -03:00
parent ba4b2a8798
commit 4683b09e10
20 changed files with 39 additions and 39 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ export class CreditsScreen extends GuiScreen {
}
#sections() {
const sections = [{ heading: "bworld", text: AssetManager.instance.get<string>("bworld:assets_text") ?? "" }];
const sections = [{ heading: "bworld", text: AssetManager.instance.get<string>("cubi:assets_text") ?? "" }];
for (const mod of mod_credits) {
sections.push({ heading: `${mod.name} ${mod.version}`, text: mod.text });
}
+1 -1
View File
@@ -64,7 +64,7 @@ export class GuiPlayerInventory extends GuiMenuScreen {
#render_player(g: ModGraphics) {
const { x, y, size } = PLAYER_BOX;
g.rect(x, y, size, size, PLAYER_BOX_COLOR);
const skin = this.#player.skin ?? AssetManager.instance.get<Texture>("bworld:skin");
const skin = this.#player.skin ?? AssetManager.instance.get<Texture>("cubi:skin");
const mouse = InputManager.get_mouse_position();
draw_gui_player(
skin,
+1 -1
View File
@@ -167,7 +167,7 @@ export abstract class GuiMenuScreen extends GuiScreen {
} else if (slot.icon) {
// where an item's sprite would be
const icon = get_sprite_region(slot.icon);
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
const [x, y, size] = [this.#slot_x(slot) + 3, this.#slot_y(slot) + 3, SLOT_SIZE - 6];
draw_texture_region(atlas, icon.x, icon.y, icon.width, icon.height, x, y, size, size);
}
+1 -1
View File
@@ -19,7 +19,7 @@ export function draw_gui_sprite(
height?: number,
color = [1, 1, 1, 1],
) {
const texture = AssetManager.instance.get<Texture>("bworld:gui");
const texture = AssetManager.instance.get<Texture>("cubi:gui");
const sprite = GUI_ATLAS[name];
const [left, top, right, bottom] = sprite.border;
draw_nine_slice(
+1 -1
View File
@@ -121,7 +121,7 @@ export class ModGraphics implements Graphics {
}
texture(id: string, x: number, y: number, w: number, h: number, part = [0, 0, 1, 1]) {
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
const region = get_sprite_region(id);
const [u, v, pw, ph] = part;
draw_texture_region(
+1 -1
View File
@@ -92,7 +92,7 @@ export function draw_tooltip(lines: TooltipLine[], mouse_x: number, mouse_y: num
y = Math.max(0, y);
draw_gui_sprite("tooltip", x, y, width, height);
const atlas = AssetManager.instance.get<Texture>("bworld:textures");
const atlas = AssetManager.instance.get<Texture>("cubi:textures");
lines.forEach((line, i) => {
const line_y = y + PADDING + i * (line_height + LINE_GAP);
if (line.icon) {