Atrinik Server  4.0
Functions
door.c File Reference
#include <global.h>
#include <arch.h>
#include <player.h>
#include <object.h>
#include <object_methods.h>
#include <door.h>
#include <key.h>
#include <rune.h>

Go to the source code of this file.

Functions

static void process_func (object *op)
 
static int apply_func (object *op, object *applier, int aflags)
 
 OBJECT_TYPE_INIT_DEFINE (door)
 
static void door_open (object *op, object *opener, bool nearby)
 
static void doors_open (object *op, object *opener)
 
bool door_try_open (object *op, mapstruct *m, int x, int y, bool test)
 
void door_show_message (object *op, mapstruct *m, int x, int y)
 

Detailed Description

Door related code.

Author
Alex Tokar

Definition in file door.c.

Function Documentation

static int apply_func ( object op,
object applier,
int  aflags 
)
static

Applies an object.

Parameters
opThe object to apply.
applierThe object that executes the apply action.
aflagsSpecial (always apply/unapply) flags.

Definition at line 98 of file door.c.

static void door_open ( object op,
object opener,
bool  nearby 
)
static

Open the specified door.

Parameters
opThe door to open.
openerWho is opening the door.
nearbyWhether this door was opened by opening a nearby door.

Definition at line 125 of file door.c.

void door_show_message ( object op,
mapstruct m,
int  x,
int  y 
)

Print the locked door message to the specified player.

Parameters
opPlayer.
mMap where the locked door is.
xX position.
yY position.

Definition at line 312 of file door.c.

bool door_try_open ( object op,
mapstruct m,
int  x,
int  y,
bool  test 
)

Open a door (or check whether it can be opened).

Parameters
opObject which will open the door.
mMap where the door is.
xX position of the door.
yY position of the door.
testIf true, only check whether the door can be opened, but do not actually open the door.
Returns
True if door was opened (or can be), false if not and is not possible to open.

Definition at line 231 of file door.c.

static void doors_open ( object op,
object opener 
)
static

Open a door, including all nearby doors.

Parameters
opDoor object to open.
openerObject opening the door.

Definition at line 181 of file door.c.

OBJECT_TYPE_INIT_DEFINE ( door  )

Initialize the door type object methods.

Definition at line 108 of file door.c.

static void process_func ( object op)
static

Processes an object, giving it the opportunity to move or react.

Parameters
opThe object to process.

Definition at line 43 of file door.c.