Change the asset keys
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user