Go to the documentation of this file.
35 static void lamp_type_describe(
const object *
op,
const object *observer,
int use_media_tags,
char *
buf,
size_t size);
56 static void do_turn(
object *
op,
object *
who,
int aflags,
const char *onoff) {
61 "You turn %s your %s.",
83 "Oops, it feels deadly cold!");
112 "You must get it first!\n");
127 do_turn(lamp, applier, aflags,
"off");
132 "Your %s is out of fuel!",
136 do_turn(lamp, applier, aflags,
"on");
151 (
void)use_media_tags;
159 if (
op->stats.maxsp) {
160 float fill = (float)
op->stats.food /
op->stats.maxsp;
164 }
else if (fill == 0) {
166 }
else if (fill > 1) {
169 }
else if (fill > 0.9) {
171 }
else if (fill > 0.6) {
173 }
else if (fill > 0.4) {
175 }
else if (fill > 0.2) {
177 }
else if (fill > 0.1) {
184 strncat(
buf,
final, size);
void object_remove(object *op)
StringBuffer * stringbuffer_new(void)
#define QUERY_FLAG(xyz, p)
#define MSG_TYPE_APPLY_CURSED
static void do_turn(object *op, object *who, int aflags, const char *onoff)
#define MSG_TYPE_APPLY_SUCCESS
void query_name(const object *op, char *buf, size_t size)
#define FLAG_KNOWN_CURSED
#define SET_MAP_FLAGS(M, X, Y, C)
void fix_object(object *op)
char * stringbuffer_finish(StringBuffer *sb)
static void lamp_type_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void register_describe(int ob_type, describe_func method)
void register_apply(int ob_type, apply_func method)
#define CLEAR_FLAG(xyz, p)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
object * object_insert_in_ob(object *op, object *where)
void update_all_los(const mapstruct *map, int x, int y)
object * arch_to_object(archetype *at)
static method_ret lamp_type_apply(object *lighter, object *applier, int aflags)
#define MSG_TYPE_APPLY_FAILURE
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
void object_free_drop_inventory(object *ob)
void update_position(mapstruct *m, int x, int y)
object * object_get_player_container(object *op)
#define MSG_TYPE_APPLY_ERROR
void init_type_lamp(void)
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...)