summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-13 14:16:35 +0200
committertroido <troido@protonmail.com>2020-04-13 14:16:35 +0200
commitee200f3003acdfdfde1a746246a7a4669188eb18 (patch)
treeb15ac6b53f52e72b586c529fba550368e1ca6f68 /src/componentwrapper.rs
parentab67714238c162646af10334715c6de41939c83f (diff)
spawners now also use timer component and triggers
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs6
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);