Skip to content

Commit

Permalink
icl_check
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Feb 6, 2022
1 parent c3e9e8f commit 6d0acc9
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions prolog/prologmud/vworld/world_agent.pfc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,20 @@
baseKB:agent_call_command_now(Agent,CMD ):- where_atloc(Agent,Where),
% start event
must(raise_location_event(Where,actNotice(reciever,begin(Agent,CMD)))),
(call(on_x_debug(baseKB:agent_call_command_now_2(Agent,CMD)) ->
(call(/*on_x_debug*/(baseKB:agent_call_command_now_2(Agent,CMD)) ->
% event done
send_command_completed_message(Agent,Where,done,CMD);
% event fail
send_command_completed_message(Agent,Where,failed,CMD))),!.

baseKB:agent_call_command_now_2(Agent,CMD):- loop_check((baseKB:agent_call_command_now_3(Agent,CMD)),dmsg(looped(baseKB:agent_call_command_now_2(Agent,CMD)))).
baseKB:agent_call_command_now_3(Agent,CMD):-
baseKB:agent_call_command_now_2(Agent,CMD):-
loop_check((baseKB:agent_call_command_now_3(Agent,CMD)),
dmsg(looped(baseKB:agent_call_command_now_2(Agent,CMD)))).

baseKB:agent_call_command_now_3(Agent,CMD):-
once(baseKB:agent_call_command_now_4(Agent,CMD)).

baseKB:agent_call_command_now_4(Agent,CMD):-
with_agent(Agent,
locally(t_l:side_effect_ok,
locally(t_l:agent_current_action(Agent,CMD),
Expand Down

0 comments on commit 6d0acc9

Please sign in to comment.