Crossfire Server, Branch 1.12
R12190
|
Lamps. More...
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
Go to the source code of this file.
Functions | |
static void | do_turn (object *op, object *who, int aflags, const char *onoff) |
Turn on/off the lamp, based on op's APPLIED status. | |
void | init_type_lamp (void) |
Initializer for the LAMP object type. | |
static method_ret | lamp_type_apply (ob_methods *context, object *lamp, object *applier, int aflags) |
Applies a lamp. |
Lamps.
Definition in file lamp.c.
static void do_turn | ( | object * | op, |
object * | who, | ||
int | aflags, | ||
const char * | onoff | ||
) | [static] |
Turn on/off the lamp, based on op's APPLIED status.
op | lamp. |
who | player or monster. |
aflags | flags. |
onoff | string that will be appended to the 'turn' verb in the message. |
Definition at line 54 of file lamp.c.
References AP_NOPRINT, arch_to_object(), CLEAR_FLAG, draw_ext_info(), draw_ext_info_format(), fix_object(), FLAG_APPLIED, FLAG_CURSED, FLAG_DAMNED, FLAG_INV_LOCKED, FLAG_KNOWN_CURSED, free_object(), insert_ob_in_ob(), MSG_TYPE_APPLY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, P_NEED_UPDATE, PLAYER, QUERY_FLAG, remove_ob(), SET_FLAG, SET_MAP_FLAGS, update_all_los(), and update_position().
Referenced by lamp_type_apply().
void init_type_lamp | ( | void | ) |
Initializer for the LAMP object type.
Definition at line 39 of file lamp.c.
References LAMP, lamp_type_apply(), and register_apply().
Referenced by register_all_ob_types().
static method_ret lamp_type_apply | ( | ob_methods * | context, |
object * | lamp, | ||
object * | applier, | ||
int | aflags | ||
) | [static] |
Applies a lamp.
context | method context. |
lamp | lamp to turn on/off. |
applier | object attempting to apply the scroll. Should be a player. |
aflags | special flags (always apply/unapply). |
Definition at line 108 of file lamp.c.
References AP_NOPRINT, do_turn(), draw_ext_info_format(), FLAG_APPLIED, get_player_container(), get_split_ob(), insert_ob_in_ob(), METHOD_ERROR, METHOD_OK, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_FAILURE, NDI_UNIQUE, and QUERY_FLAG.
Referenced by init_type_lamp().