diff options
| author | troido <troido@protonmail.com> | 2020-04-01 16:48:24 +0200 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-04-01 16:48:24 +0200 |
| commit | 633cb7d5b2048324a13bedb43468a7f04a81a519 (patch) | |
| tree | 5541a261e9e65fa8b26f0bc521cb1bd16c7e6a0c /src/componentwrapper.rs | |
| parent | a911b7fabbaac429efd1747c3b1e925f679752f9 (diff) | |
removed Sometime parameter
Diffstat (limited to 'src/componentwrapper.rs')
| -rw-r--r-- | src/componentwrapper.rs | 17 |
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)}}; ); |
