diff options
| author | troido <troido@protonmail.com> | 2020-04-13 14:16:35 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-04-13 14:16:35 +0200 |
| commit | ee200f3003acdfdfde1a746246a7a4669188eb18 (patch) | |
| tree | b15ac6b53f52e72b586c529fba550368e1ca6f68 /src/componentwrapper.rs | |
| parent | ab67714238c162646af10334715c6de41939c83f (diff) | |
spawners now also use timer component and triggers
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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::<u32>()) @@ -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); |
