1/* * module *
    2% teleport.pl
    3%
    4% This file defines how an agent teleports 
    5%
    6%  Test of the new concise syntax:
    7% 
    8%   props(Agent,charge>10),
    9%
   10% Comments below document the basic idea.
   11%
   12% Dec 13, 2035
   13% Douglas Miles
   14*/
   15% :-swi_module(user). 
   16:-swi_module(modTeleport, []).   17
   18:- include(prologmud(mud_header)).   19
   20% :- register_module_type (mtCommand).
   21
   22% teleport
   23action_info(actTeleport(isOptional(isAnd([tObj,isNot(tRegion)]),isSelfAgent),isOptionalStr("to"),isOptional(tRegion,isRandom(tRegion))),"teleport [obj] [to] [somewhere]").
   24
   25verb_alias(tp,actTeleport).
   26
   27%targeted
   28agent_call_command(_Agent,actTeleport(Other,_TO,Where)):-
   29   coerce(Other,tObj,Target),
   30   coerce(Where,tRegion,Location),
   31   detatch_object(Target),
   32   to_3d(Location,Where3D),
   33   ain(mudAtLoc(Target,Where3D)).
   34
   35
   36:- include(prologmud(mud_footer)).