HammeriteBrushEntity

Core: the map. Inherits HammeriteEntity < Resource

An entity made of brushes rather than standing at a point: a door, a pool, a trigger volume.

Its brushes are ordinary HammeriteBrushes in HammeriteMap.brushes whose HammeriteBrush.brush_entity_id names it; they leave the carved world and are built by the entity's node instead. Give it an id and assign_brush() each brush, before or after it is added to the map (HammeriteMap.add_entity()) - a brush already in the map that names it joins it when it arrives. Its HammeriteEntity.origin is kept at the middle of its brushes. Losing its last brush deletes it (HammeriteEntity.delete_requested).

Methods

ReturnsMethod
HammeriteBrush[]get_brushes()
boolhas_brush(brush: HammeriteBrush)
voidassign_brush(brush: HammeriteBrush)
voidunassign_brush(brush: HammeriteBrush)
voidcompute_origin()

Method descriptions

get_brushes()

func get_brushes() -> HammeriteBrush[]

The brushes this entity owns, as a new array. Change them with assign_brush() and unassign_brush().

has_brush()

func has_brush(brush: HammeriteBrush) -> bool

Whether brush is one of this entity's.

assign_brush()

func assign_brush(brush: HammeriteBrush) -> void

Make this entity the owner of brush, taking it from whichever entity owned it before. Through the map (HammeriteMap.assign_brush_to_entity()) once the entity is in one; before that, on the two of them alone. The entity needs a non-zero HammeriteEntity.id.

unassign_brush()

func unassign_brush(brush: HammeriteBrush) -> void

Make brush belong to no entity again; its tier is left as it is. Losing its last brush deletes the entity.

compute_origin()

func compute_origin() -> void

Set the origin property to the mean of the brushes' centroids, in map space. Done for you as brushes are assigned, unassigned and moved.

Hammerite 1.0 · built from a6dd634, 2026-10-10