Class engine.Trap

Describes a trap

Methods

engine.Trap:setupMinimapInfo (mo, map)

Setup minimap color for this entity You may overload this method to customize your minimap

engine.Trap:enoughEnergy (val)

Do we have enough energy

engine.Trap:useEnergy (val)

Use some energy

engine.Trap:getName ()

Get trap name Can be overloaded to do trap identification if needed

engine.Trap:setup ()

Setup the trap

engine.Trap:setKnown (actor, v)

Set the known status for the given actor

engine.Trap:knownBy (actor)

Get the known status for the given actor

engine.Trap:canDisarm (x, y, who)

Can we disarm this trap?

engine.Trap:disarm (x, y, who)

Try to disarm the trap

engine.Trap:trigger (x, y, who)

Trigger the trap

engine.Trap:on_move (x, y, who, forced)

When moving on a trap, trigger it

engine.Trap:onDisarm (x, y, who)

Called when disarmed

engine.Trap:canTrigger (x, y, who)

Called when triggered

engine.Trap:getEntityKind ()

Return the kind of the entity



Methods

engine.Trap:setupMinimapInfo (mo, map)
Setup minimap color for this entity You may overload this method to customize your minimap

Parameters:

  • mo
  • map
engine.Trap:enoughEnergy (val)
Do we have enough energy

Parameters:

  • val
engine.Trap:useEnergy (val)
Use some energy

Parameters:

  • val
engine.Trap:getName ()
Get trap name Can be overloaded to do trap identification if needed
engine.Trap:setup ()
Setup the trap
engine.Trap:setKnown (actor, v)
Set the known status for the given actor

Parameters:

  • actor
  • v
engine.Trap:knownBy (actor)
Get the known status for the given actor

Parameters:

  • actor
engine.Trap:canDisarm (x, y, who)
Can we disarm this trap?

Parameters:

  • x
  • y
  • who
engine.Trap:disarm (x, y, who)
Try to disarm the trap

Parameters:

  • x
  • y
  • who
engine.Trap:trigger (x, y, who)
Trigger the trap

Parameters:

  • x
  • y
  • who Try to disarm
engine.Trap:on_move (x, y, who, forced)
When moving on a trap, trigger it

Parameters:

  • x
  • y
  • who
  • forced
engine.Trap:onDisarm (x, y, who)
Called when disarmed

Parameters:

  • x
  • y
  • who
engine.Trap:canTrigger (x, y, who)
Called when triggered

Parameters:

  • x
  • y
  • who
engine.Trap:getEntityKind ()
Return the kind of the entity
generated by LDoc 1.4.3