Crossfire Server, Trunk
sign.c File Reference
#include <global.h>
#include <ob_methods.h>
#include <ob_types.h>
#include <sounds.h>
#include <sproto.h>
+ Include dependency graph for sign.c:

Go to the source code of this file.

Functions

static void apply_sign (object *sign, object *op, int autoapply)
 
void init_type_sign (void)
 
static method_ret sign_type_apply (object *op, object *applier, int aflags)
 
static method_ret sign_type_move_on (object *trap, object *victim, object *originator)
 

Detailed Description

The implementation of the Sign class of objects.

Definition in file sign.c.

Function Documentation

◆ apply_sign()

static void apply_sign ( object sign,
object op,
int  moved_on 
)
static

Handles applying a sign.

Parameters
signThe sign applied
opThe object applying the sign
moved_onSet to 1 if op moved on sign, 0 else.

Definition at line 51 of file sign.c.

References draw_ext_info(), FLAG_BLIND, FLAG_WIZ, FLAG_WIZPASS, liv::food, get_readable_message_type(), knowledge_read(), obj::last_eat, readable_message_type::message_subtype, readable_message_type::message_type, obj::msg, MSG_TYPE_APPLY, MSG_TYPE_APPLY_ERROR, MSG_TYPE_APPLY_FAILURE, NDI_NAVY, NDI_UNIQUE, give::op, QUERY_FLAG, and obj::stats.

Referenced by sign_type_apply(), and sign_type_move_on().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_type_sign()

void init_type_sign ( void  )

Initializer for the SIGN object type.

Definition at line 40 of file sign.c.

References register_apply(), register_move_on(), SIGN, sign_type_apply(), and sign_type_move_on().

Referenced by register_all_ob_types().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sign_type_apply()

static method_ret sign_type_apply ( object op,
object applier,
int  aflags 
)
static

Attempts to apply a sign.

Parameters
opThe Sign to apply
applierThe object attempting to apply the Sign
aflagsSpecial flags (always apply/unapply)
Returns
The return value is always METHOD_OK

Definition at line 95 of file sign.c.

References apply_sign(), METHOD_OK, give::op, and nlohmann::detail::void().

Referenced by init_type_sign().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ sign_type_move_on()

static method_ret sign_type_move_on ( object trap,
object victim,
object originator 
)
static

Move on this Sign object.

Parameters
trapThe Sign we're moving on
victimThe object moving over this one
originatorThe object that caused the move_on event
Returns
METHOD_OK

Definition at line 108 of file sign.c.

References apply_sign(), common_post_ob_move_on(), common_pre_ob_move_on(), liv::food, FOR_INV_FINISH, FOR_INV_PREPARE, commongive::inv, METHOD_ERROR, METHOD_OK, PLAYER, obj::stats, TRANSPORT, and reputation::victim.

Referenced by init_type_sign().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: