Module m_wearable

Documentation for the modules-m_wearable module in /std/modules/m_wearable.c.

Functions

void set_stat_mods(mapping m)

Sets the scores to modify a stat with for this wearable. function.

set_stat_mods(([“int”:2,”dex”:-2]));

void set_stat_mod(int b)

Sets the score to modify a stat with for this wearable. See also set_stat_bonus which is needed in tandem with this function.

set_stat_mod(2); set_stat_bonus(“int”);

int query_stat_mod()

Query the stat modification set on this wearable. See also set_stat_mod() and set_stat_bonus().

void set_stat_bonus(string s)

Set the stat that the bonus should applied to. On nuke the following stats are supported:

  • str, dex, int, con, cha.

See also query_stat_bonus and set_stat_mod.

string query_stat_bonus()

Returns the stat that this wearable provides a bonus to. See also set_stat_bonus for legal stats and set_stat_mod which is required in tandom with set_stat_bonus() calls.

set_stat_mod(2); set_stat_bonus(“int”);

void set_wearmsg(string s)

Set the message used when an object is worn.

string query_wearmsg()

Return the message given when an object is used.

void set_slot(string which)

Set the bodyslot that the wearable object takes up.

string query_slot()

Return the bodyslot the wearable object takes up.

void set_also_covers(string *s...)

Set string or an an array of other limbs that this armour piece also covers.

set_also_covers(“left foot”); (If you’re doing a pair of boots)

void set_worn(int g)

set_worn(1) causes an object to become worn. set_worn(0) removes it.

int is_wearable()

Returns 1 for wearables.

File generated by Lima 1.1a4 reStructured Text daemon.