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

Go to the source code of this file.

Functions

static method_ret clock_type_apply (object *op, object *applier, int aflags)
 
void init_type_clock (void)
 

Detailed Description

The implementation of the Clock class of objects.

Definition in file clock.cpp.

Function Documentation

◆ clock_type_apply()

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

Handles using a clock.

Parameters
opThe clock to apply
applierThe object attempting to view the clock
aflagsSpecial flags (always apply/unapply)
Return values
METHOD_UNHANDLEDIf the clock wasn't viewed by a player
METHOD_OKIf applier was a player

Definition at line 50 of file clock.cpp.

References object::contr, draw_ext_info_format(), get_tod(), METHOD_OK, METHOD_UNHANDLED, MSG_TYPE_APPLY, MSG_TYPE_APPLY_SUCCESS, NDI_UNIQUE, give::op, play_sound_player_only(), PLAYER, SOUND_TYPE_ITEM, time_format_time(), object::type, and nlohmann::detail::void().

Referenced by init_type_clock().

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

◆ init_type_clock()

void init_type_clock ( void  )

Initializer for the CLOCK object type.

Definition at line 38 of file clock.cpp.

References CLOCK, clock_type_apply(), and register_apply().

Referenced by register_all_ob_types().

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