33 static void apply_sign(
object *sign,
object *op,
int autoapply);
51 static void apply_sign(
object *sign,
object *op,
int moved_on) {
54 if (sign->
msg == NULL) {
56 "Nothing is written on it.");
64 "You cannot read it anymore.");
77 "You are unable to read while blind.");
see doc/Developers/objects
method_ret common_pre_ob_move_on(object *trap, object *victim, object *originator)
#define MSG_TYPE_APPLY_FAILURE
Apply OK, but no/bad result.
#define FLAG_BLIND
If set, object cannot see (visually)
void register_move_on(int ob_type, move_on_func method)
Registers the move_on method for the given type.
uint8_t message_type
Message type to be sent to the client.
static method_ret sign_type_apply(object *op, object *applier, int aflags)
Attempts to apply a sign.
Global type definitions and header inclusions.
struct player * contr
Pointer to the player which control this object.
void draw_ext_info(int flags, int pri, const object *pl, uint8_t type, uint8_t subtype, const char *message)
Sends message to player(s).
#define MSG_TYPE_APPLY
Applying objects.
char method_ret
Define some standard return values for callbacks which don't need to return any other results...
void init_type_sign(void)
Initializer for the SIGN object type.
#define QUERY_FLAG(xyz, p)
#define MSG_TYPE_APPLY_ERROR
#define FOR_INV_FINISH()
Finishes FOR_INV_PREPARE().
sstring msg
If this is a book/sign/magic mouth/etc.
void knowledge_read(player *pl, object *book)
Player is reading a book, give knowledge if needed, warn player, and such.
Struct to store the message_type and message_subtype for signs and books used by the player...
#define FLAG_WIZ
Object has special privilegies.
living stats
Str, Con, Dex, etc.
static void apply_sign(object *sign, object *op, int autoapply)
Handles applying a sign.
void common_post_ob_move_on(object *trap, object *victim, object *originator)
uint8_t type
PLAYER, BULLET, etc.
static method_ret sign_type_move_on(object *trap, object *victim, object *originator)
Move on this Sign object.
#define NDI_UNIQUE
Print immediately, don't buffer.
int32_t food
How much food in stomach.
uint8_t message_subtype
Message subtype to be sent to the client.
#define FLAG_WIZPASS
The wizard can go through walls.
Object type functions and variables.
const readable_message_type * get_readable_message_type(object *readable)
Get the readable type for an object (hopefully book).
#define FOR_INV_PREPARE(op_, it_)
Constructs a loop iterating over the inventory of an object.
int32_t last_eat
How long since we last ate.
void register_apply(int ob_type, apply_func method)
Registers the apply method for the given type.