summaryrefslogtreecommitdiff
path: root/src/componentwrapper.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-01 16:48:24 +0200
committertroido <troido@protonmail.com>2020-04-01 16:48:24 +0200
commit633cb7d5b2048324a13bedb43468a7f04a81a519 (patch)
tree5541a261e9e65fa8b26f0bc521cb1bd16c7e6a0c /src/componentwrapper.rs
parenta911b7fabbaac429efd1747c3b1e925f679752f9 (diff)
removed Sometime parameter
Diffstat (limited to 'src/componentwrapper.rs')
-rw-r--r--src/componentwrapper.rs17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/componentwrapper.rs b/src/componentwrapper.rs
index 40faa2d..589da15 100644
--- a/src/componentwrapper.rs
+++ b/src/componentwrapper.rs
@@ -181,7 +181,22 @@ components!(
Faction (faction: String) {Faction::from_str(faction.as_str())?};
Interactable (action: String) {Interactable::from_str(action.as_str())?};
Loot (loot: LootList);
- Grow (into: Template, delay: Int, target_time: SomeTime);
+ Grow (
+ into: Template (Grow.into.clone()),
+ delay: Int (Grow.delay),
+ target_time: Int ({
+ if let Some(time) = Grow.target_time {
+ time.0
+ } else {
+ 0
+ }
+ })
+ )
+ Grow {
+ into,
+ delay,
+ target_time: if target_time == 0 { None } else { Some(Timestamp(target_time)) }
+ };
Equipment () {panic!("equipment from parameters not implemented")};
CreationTime (time: Int) {CreationTime{time: Timestamp(time)}};
);