Crossfire Server, Trunk
|
#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) |
void | init_type_lamp (void) |
static method_ret | lamp_type_apply (object *lighter, object *applier, int aflags) |
static void | lamp_type_describe (const object *op, const object *observer, int use_media_tags, char *buf, size_t size) |
Lamps.
Definition in file lamp.c.
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 56 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, liv::food, MSG_TYPE_APPLY, MSG_TYPE_APPLY_CURSED, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, object_free_drop_inventory(), object_insert_in_ob(), object_remove(), give::op, P_NEED_UPDATE, PLAYER, QUERY_FLAG, SET_FLAG, SET_MAP_FLAGS, obj::stats, update_all_los(), update_position(), and autojail::who.
Referenced by lamp_type_apply().
void init_type_lamp | ( | void | ) |
Initializer for the LAMP object type.
Definition at line 40 of file lamp.c.
References LAMP, lamp_type_apply(), lamp_type_describe(), register_apply(), and register_describe().
Referenced by register_all_ob_types().
|
static |
Applies a lamp.
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 107 of file lamp.c.
References AP_NOPRINT, do_turn(), draw_ext_info_format(), FLAG_APPLIED, liv::food, liv::maxsp, METHOD_ERROR, METHOD_OK, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_FAILURE, obj::name, NDI_UNIQUE, obj::nrof, object_get_player_container(), object_insert_in_ob(), object_split(), QUERY_FLAG, obj::stats, and Ice::tmp.
Referenced by init_type_lamp().
|
static |
Definition at line 147 of file lamp.c.
References buf, FLAG_APPLIED, FLAG_BLIND, give::op, QUERY_FLAG, query_name(), stringbuffer_append_printf(), stringbuffer_finish(), stringbuffer_new(), and nlohmann::detail::void().
Referenced by init_type_lamp().