asobi_zone_spawner (asobi v0.35.4)
View SourceSummary
Types
-type respawn_rule() :: #{strategy := timer, delay := non_neg_integer(), max_respawns => non_neg_integer() | infinity, jitter => non_neg_integer()}.
-type spawn_template() :: #{template_id := binary(), type := binary(), base_state := map(), persistent => boolean(), respawn => respawn_rule() | undefined}.
-opaque state()
Functions
-spec entity_removed(binary(), pos_integer(), state()) -> state().
-spec get_spawn_count(binary(), state()) -> non_neg_integer().
-spec get_templates(state()) -> #{binary() => spawn_template()}.
-spec new() -> state().
-spec new(#{binary() => spawn_template()}) -> state().
-spec set_templates(#{binary() => spawn_template()}, state()) -> state().