From ee200f3003acdfdfde1a746246a7a4669188eb18 Mon Sep 17 00:00:00 2001 From: troido Date: Mon, 13 Apr 2020 14:16:35 +0200 Subject: spawners now also use timer component and triggers --- src/componentwrapper.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/componentwrapper.rs') diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs index 996d922..8f493a3 100644 --- a/src/componentwrapper.rs +++ b/src/componentwrapper.rs @@ -164,10 +164,9 @@ components!( Healing (delay: Int, health: Int) {Healing{delay, health, next_heal: None}}; Autofight () {Autofight::default()}; MonsterAI (move_chance: Float, homesickness: Float, view_distance: Int); - Spawner (amount: Int, delay: Int, clan: String, template: Template, initial_spawn: Bool) { + Spawner (amount: Int, clan: String, template: Template) { Spawner{ amount: amount as usize, - delay, clan: Clan{name: if clan == "" { format!("$random({})", rand::thread_rng().gen::()) @@ -175,8 +174,7 @@ components!( clan } }, - template: template.unsaved(), - last_spawn: if initial_spawn {Some(Timestamp(-delay))} else {None} + template: template.unsaved() } }; Clan (name: String); -- cgit