implement brush cost gauges

they're a little ugly at the moment, and can be a little useless for most simple brushes, but whatever we'll make them better later
This commit is contained in:
りき萌 2024-10-25 21:38:18 +02:00
parent 43e6951f7d
commit 913d65b0a8
19 changed files with 378 additions and 65 deletions

View file

@ -257,4 +257,24 @@ export class Haku {
return { status: "ok" };
}
get astSize() {
if (this.#pBrush != 0) {
return w.haku_stat_ast_size(this.#pBrush);
} else {
return 0;
}
}
get numRefs() {
return w.haku_stat_num_refs(this.#pInstance);
}
get remainingFuel() {
return w.haku_stat_remaining_fuel(this.#pInstance);
}
get remainingMemory() {
return w.haku_stat_remaining_memory(this.#pInstance);
}
}