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);
#define QUERY_FLAG(xyz, p)
void stringbuffer_append_printf(StringBuffer *sb, const char *format,...)
void update_position(mapstruct *m, int x, int y)
StringBuffer * stringbuffer_new(void)
void register_apply(int ob_type, apply_func method)
#define MSG_TYPE_APPLY_CURSED
void draw_ext_info_format(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *format,...) PRINTF_ARGS(6
void fix_object(object *op)
object * object_insert_in_ob(object *op, object *where)
char * stringbuffer_finish(StringBuffer *sb)
void object_free_drop_inventory(object *ob)
#define MSG_TYPE_APPLY_SUCCESS
void query_name(const object *op, char *buf, size_t size)
#define FLAG_KNOWN_CURSED
static method_ret lamp_type_apply(object *lighter, object *applier, int aflags)
void init_type_lamp(void)
#define SET_MAP_FLAGS(M, X, Y, C)
object * object_split(object *orig_ob, uint32_t nr, char *err, size_t size)
#define CLEAR_FLAG(xyz, p)
object * arch_to_object(archetype *at)
#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)
static void lamp_type_describe(const object *op, const object *observer, int use_media_tags, char *buf, size_t size)
void object_remove(object *op)
void update_all_los(const mapstruct *map, int x, int y)
#define MSG_TYPE_APPLY_ERROR
object * object_get_player_container(object *op)
void register_describe(int ob_type, describe_func method)
static void do_turn(object *op, object *who, int aflags, const char *onoff)