Skip to content

Powerup

Movable entitiessource

Derived from Entity, Movable

Derived types: AnkhPowerup, Backpack, KapalaPowerup, ParachutePowerup, TrueCrownPowerup

Methods

clear_virtual

function Powerup:clear_virtual(callback_id: integer)
callback_id: integer
source

set_post_putting_off

function Powerup:set_post_putting_off(fun: fun(self: Entity?, who: PowerupCapable?)): integer
fun: fun(self: Entity?, who: PowerupCapable?)

Returns integer

only for backpacks

source

set_post_putting_on

function Powerup:set_post_putting_on(fun: fun(self: Entity?, who: PowerupCapable?)): integer
fun: fun(self: Entity?, who: PowerupCapable?)

Returns integer

only for backpacks

source

set_post_virtual

function Powerup:set_post_virtual(index: integer, fun: function): integer?
index: integer
fun: function
Callback signature not known from the code.

Returns integer? (may be nil)

source

set_pre_putting_off

function Powerup:set_pre_putting_off(fun: fun(self: Entity?, who: PowerupCapable?): boolean): integer
fun: fun(self: Entity?, who: PowerupCapable?): boolean
Returning nil (or nothing): treated as false: the original function runs (true skips it).

Returns integer

only for backpacks

source

set_pre_putting_on

function Powerup:set_pre_putting_on(fun: fun(self: Entity?, who: PowerupCapable?): boolean): integer
fun: fun(self: Entity?, who: PowerupCapable?): boolean
Returning nil (or nothing): treated as false: the original function runs (true skips it).

Returns integer

only for backpacks

source

set_pre_virtual

function Powerup:set_pre_virtual(index: integer, fun: function): integer?
index: integer
fun: function
Callback signature not known from the code.

Returns integer? (may be nil)

source