Module ...

Describes a trap

Functions

_M:canDisarm (x, y, who) Can we disarm this trap?
_M:canTrigger (x, y, who) Called when triggered
_M:disarm (x, y, who) Try to disarm the trap
_M:enoughEnergy (val) Do we have enough energy
_M:getEntityKind () Return the kind of the entity
_M:getName () Get trap name Can be overloaded to do trap identification if needed
_M:knownBy (actor) Get the known status for the given actor
_M:onDisarm (x, y, who) Called when disarmed
_M:on_move (x, y, who, forced) When moving on a trap, trigger it
_M:setKnown (actor, v) Set the known status for the given actor
_M:setup () Setup the trap
_M:setupMinimapInfo (mo, map) Setup minimap color for this entity You may overload this method to customize your minimap
_M:trigger (x, y, who) Trigger the trap
_M:useEnergy (val) Use some energy


Functions

_M:canDisarm (x, y, who)
Can we disarm this trap?

Parameters

  • x:
  • y:
  • who:
_M:canTrigger (x, y, who)
Called when triggered

Parameters

  • x:
  • y:
  • who:
_M:disarm (x, y, who)
Try to disarm the trap

Parameters

  • x:
  • y:
  • who:
_M:enoughEnergy (val)
Do we have enough energy

Parameters

  • val:
_M:getEntityKind ()
Return the kind of the entity
_M:getName ()
Get trap name Can be overloaded to do trap identification if needed
_M:knownBy (actor)
Get the known status for the given actor

Parameters

  • actor:
_M:onDisarm (x, y, who)
Called when disarmed

Parameters

  • x:
  • y:
  • who:
_M:on_move (x, y, who, forced)
When moving on a trap, trigger it

Parameters

  • x:
  • y:
  • who:
  • forced:
_M:setKnown (actor, v)
Set the known status for the given actor

Parameters

  • actor:
  • v:
_M:setup ()
Setup the trap
_M:setupMinimapInfo (mo, map)
Setup minimap color for this entity You may overload this method to customize your minimap

Parameters

  • mo:
  • map:
_M:trigger (x, y, who)
Trigger the trap

Parameters

  • x:
  • y:
  • who:
_M:useEnergy (val)
Use some energy

Parameters

  • val:

Valid XHTML 1.0!