HammeriteCompileProgress

Core: in the scene. Inherits RefCounted

How far a worldrep compile has got, and whether it has been asked to stop.

Written by the compile, which may be on a worker thread (HammeriteWorldrepCompile), and read by whoever is showing it - hence the lock around everything.

Properties

TypeNameDefault
Callableon_report
Variantstages

Methods

ReturnsMethod
voidcancel()
Stringdescribe() const
floatget_overall_fraction() const
Stringget_stage() const
floatget_stage_fraction() const
boolis_cancelled() const
boolreport(stage: String, done: int, total: int)
PackedStringArraystages() static

Property descriptions

on_report

var on_report: Callable

Called with this progress on every report, on the thread that reported: for a caller that compiles on the main thread and still has to draw something while it does.

stages

var stages: Variant

Every stage of this compile, in order - stages() and then whatever was hooked in with HammeriteWorldrepCompile.add_stage(). Set before the compile starts; once it has reported, assigning it is refused.

Method descriptions

cancel()

func cancel() -> void

Ask the compile to stop at the next item. What it leaves behind is not a worldrep - see HammeriteWorldrepCompile.finish().

describe()

func describe() -> String

"cells 1204 / 3310", for a status line.

get_overall_fraction()

func get_overall_fraction() -> float

How far through the whole compile, 0..1, counting each stage as an equal share. A stage's share of the time is nothing like equal, and differs by level, but a bar that only ever moves forward is what somebody waiting needs.

get_stage()

func get_stage() -> String

The name of the stage last reported, one of stages, or empty before the first report.

get_stage_fraction()

func get_stage_fraction() -> float

Finished items of the current stage, over how many it has. 0 when it has not said.

is_cancelled()

func is_cancelled() -> bool

Whether cancel() has been called.

report()

func report(stage: String, done: int, total: int) -> bool

Record that done of total items of stage are finished. False once the compile has been cancelled, which is the compile's cue to stop.

stages()

static func stages() -> PackedStringArray

The worldrep's own stages, in the order it goes through them. The constant STAGES before the class was native: a native class's constants can only be integers.

Hammerite 2.0 · built from 6d57ab2d, 2026-10-17