diff options
Diffstat (limited to 'karld/src/main.rs')
-rw-r--r-- | karld/src/main.rs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/karld/src/main.rs b/karld/src/main.rs index 181c2be..35cca04 100644 --- a/karld/src/main.rs +++ b/karld/src/main.rs @@ -10,7 +10,7 @@ use crossbeam_channel::Sender; use helper::Overlaps; use interface::network_loop; use karlcommon::{ - ClientboundPacket, Condition, Instance, Property, ProtoError, Schedule, ServerboundPacket, Task, + ClientboundPacket, Condition, Property, ProtoError, Schedule, ServerboundPacket, Task, }; use log::{debug, error, info}; use std::{collections::HashMap, sync::RwLock}; @@ -118,10 +118,7 @@ pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<C Schedule::Dynamic { .. } => (), // TODO Schedule::Static(r) => { if range.overlaps(r.clone()) { - ocs.push(Instance { - of: t.id, - at: Some(r.start)..Some(r.end), - }) + ocs.push(Some(r.start)..Some(r.end)) } } Schedule::Condition(o) => { @@ -131,10 +128,7 @@ pub fn handle_packet(client: u32, packet: ServerboundPacket, responder: Sender<C let start = o.find(condition::Edge::Start, condition::Direction::Forward, time); let end = o.find(condition::Edge::End, condition::Direction::Forward, time); - ocs.push(Instance { - of: t.id, - at: start.map(|e| e.timestamp())..end.map(|e| e.timestamp()), - }); + ocs.push(start.map(|e| e.timestamp())..end.map(|e| e.timestamp())); if let Some(s) = end { if let Some(e) = end_time { if s > e { |