pub fn request_handled(&mut self, request_data: Request, opts: RequestHandledOpts) -> anyhow::Result<()> {
        let mut tick_handled = game::time();
        match opts {
            RequestHandledOpts::DelayHandleForOneTick => {
                tick_handled += 1;
            },
            RequestHandledOpts::None => {},
        }
        match self.requests.remove(&request_data.request_id) {
            Some(_old_request) => {
                self.handled_requests.entry(tick_handled).or_default().insert(request_data.request_id.to_owned(), request_data);
            },
            None => {
                warn!("called request_handled with id {}, but request is not queued anymore", request_data.request_id);
            },
        }
        Ok(())
    }
/// 
///
/// opts - If you do something which result can only be checked after a tick (for example
///   spawn a minion), set this to DelayHandleForOneTick.
///   Handlers will update themselfes only then.
// pub fn request_handled<>(&mut self, request_id: UniqId,  opts: RequestHandledOpts) -> anyhow::Result<()> {
If you do something which result can only be checked after a tick (for example
spawn a minion), set this to DelayHandleForOneTick.
Handlers will update themselfes only then.
If you do something which result can only be checked after a tick ( for example spawn a minion ) set this to DelayHandleForOneTick . Handlers will update themselfes only then .
pub fn request_handled(&mut self, request_data: Request, opts: RequestHandledOpts) -> anyhow::Result<()> {
        let mut tick_handled = game::time();
        match opts {
            RequestHandledOpts::DelayHandleForOneTick => {
                tick_handled += 1;
            },
            RequestHandledOpts::None => {},
        }
        match self.requests.remove(&request_data.request_id) {
            Some(_old_request) => {
                self.handled_requests.entry(tick_handled).or_default().insert(request_data.request_id.to_owned(), request_data);
            },
            None => {
                warn!("called request_handled with id {}, but request is not queued anymore", request_data.request_id);
            },
        }
        Ok(())
    }
pub fn request_handled ( & mut self , request_data : Request , opts : RequestHandledOpts ) -> anyhow :: Result < ( ) > { let mut tick_handled = game :: time ( ) ; match opts { RequestHandledOpts :: DelayHandleForOneTick => { tick_handled += 1 ; } , RequestHandledOpts :: None => { } , } match self . requests . remove ( & request_data . request_id ) { Some ( _old_request ) => { self . handled_requests . entry ( tick_handled ) . or_default ( ) . insert ( request_data . request_id . to_owned ( ) , request_data ) ; } , None => { warn ! ( " " request_data request_id ) ; } , } Ok ( ( ) ) }
opts - If you do something which result can only be checked after a tick (for example
spawn a minion), set this to DelayHandleForOneTick.
opts - If you do something which result can only be checked after a tick ( for example spawn a minion ) set this to DelayHandleForOneTick .
&mut self
request_data
Request
opts
RequestHandledOpts
&mut self
request_data
Request
opts
RequestHandledOpts