/* ************************************************************************
* File: db.h Part of CircleMUD *
* Usage: header file for database handling *
* *
* All rights reserved. See license.doc for complete information. *
* *
* Copyright (C) 1993, 94 by the Trustees of the Johns Hopkins University *
* CircleMUD is based on DikuMUD, Copyright (C) 1990, 1991. *
************************************************************************ */
/*
* Here we have parts of db.h needed to load the world
*
* Same as structs.h ... If you've modified these for your mud, then you
* should update this to match.
*/
#ifndef __DB_H__
#define __DB_H__
/*
* Defines
*/
#define DB_BOOT_WLD 0
#define DB_BOOT_MOB 1
#define DB_BOOT_OBJ 2
#define DB_BOOT_ZON 3
#define DB_BOOT_SHP 4
#define DB_BOOT_HLP 5
#define LIB_WORLD "world/"
#define LIB_TEXT "text/"
#define LIB_ZONES "zones/"
#define SLASH "/"
#define INDEX_FILE "index" /* index of world files */
#define MINDEX_FILE "index.mini" /* ... and for mini-mud-mode */
#define WLD_PREFIX LIB_WORLD"wld"SLASH /* room definitions */
#define MOB_PREFIX LIB_WORLD"mob"SLASH /* monster prototypes */
#define OBJ_PREFIX LIB_WORLD"obj"SLASH /* object prototypes */
#define ZON_PREFIX LIB_WORLD"zon"SLASH /* zon defs & command tables */
#define SHP_PREFIX LIB_WORLD"shp"SLASH /* shop definitions */
#define HLP_PREFIX LIB_TEXT"help"SLASH /* for HELP <keyword> */
#define ETC_PLROBJS "plrobjs/"
#define ETC_ETC "etc/"
#define ETC_PLRTEXT "plrtext/"
#define ETC_PLROBJS "plrobjs/"
#define ETC_PLRALIAS "plralias/"
#define ETC_HOUSE "house/"
#define ETC_ZONES "zones/"
#define SUF_OBJS "objs"
#define SUF_TEXT "text"
#define SUF_ALIAS "alias"
#define SUF_ZONE "dao"
/*
* Structures
*
* NOTICE:
*
* We've added one value to the structure zone_data. If you update with
* your own structures, make sure you include the new element.
*/
struct reset_com {
char command; /* current command */
bool if_flag; /* if TRUE: exe only if preceding exe'd */
int arg1; /* */
int arg2; /* Arguments to the command */
int arg3; /* */
int line; /* line number this command appears on */
};
struct zone_data {
char *name; /* name of this zone */
char *keyword; /* --NEW-- Keyword for zone --NEW-- */
int lifespan; /* how long between resets (minutes) */
int age; /* current age of this zone (minutes) */
room_vnum bot; /* starting room number for this zone */
room_vnum top; /* upper limit for rooms in this zone */
int reset_mode; /* conditions for reset (see below) */
zone_vnum number; /* virtual number of this zone */
struct reset_com *cmd; /* command table for reset */
};
/*
* Globals
*/
extern struct room_data *world;
extern room_rnum top_of_world;
extern struct zone_data *zone_table;
extern zone_rnum top_of_zone_table;
extern struct char_data *mob_proto;
extern mob_rnum top_of_mobt;
extern struct obj_data *obj_proto;
extern obj_rnum top_of_objt;
extern struct index_data *mob_index;
extern struct index_data *obj_index;
void boot_world(void);
void mag_assign_spells(void);
#endif /* __STRUCTS_H__ */