Crossfire Server, Trunk  R20513
Data Structures | Macros | Functions | Variables
citylife.c File Reference

This file is part of the city life plugin. More...

#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include "citylife.h"
#include "citylife_proto.h"
#include "svnversion.h"
Include dependency graph for citylife.c:

Go to the source code of this file.

Data Structures

struct  mapzone
 Options for a map. More...
 
struct  spawn_point
 Point from which a NPC can come when the map is loaded. More...
 
struct  spawn_zone
 Zone in which to add NPCs when the map was just loaded. More...
 

Macros

#define FIRST_MOVE_KEY   "citylife_first_move"
 Key to contain whether it's the first move of the NPC or not. More...
 

Functions

CF_PLUGIN int citylife_runPluginCommand (object *op, char *params)
 
CF_PLUGIN void * getPluginProperty (int *type,...)
 Gets a plugin property. More...
 
CF_PLUGIN int initPlugin (const char *iversion, f_plug_api gethooksptr)
 Plugin initialisation function. More...
 

Variables

static const char *const darcap_archs []
 Archetypes to spawn in Darcap. More...
 
static const spawn_point darcap_points []
 Points for map 116_102. More...
 
static const spawn_zone darcap_zones []
 Zones for map 116_102. More...
 
static const char *const navar_archs []
 Archetypes to spawn in Navar. More...
 
static const spawn_point navar_ne_points []
 Points for map 122_116. More...
 
static const spawn_zone navar_ne_zones []
 Zones for map 122_116. More...
 
static const spawn_point navar_nw_points []
 Points for map 121_116. More...
 
static const spawn_zone navar_nw_zones []
 Zones for map 121_116. More...
 
static const spawn_point navar_se_points []
 Points for map 122_117. More...
 
static const spawn_zone navar_se_zones []
 Zones for map 122_117. More...
 
static const spawn_point navar_sw_points []
 Points for map 121_117. More...
 
static const spawn_zone navar_sw_zones []
 Zones for map 121_117. More...
 
static const char *const port_joseph_archs []
 Archetypes to spawn in Port Joseph. More...
 
static const spawn_point port_joseph_points []
 Points for map 101_114. More...
 
static const spawn_zone port_joseph_zones []
 Zones for map 101_114. More...
 
static const char *const santo_dominion_archs []
 Archetypes to spawn in santo_dominion. More...
 
static const spawn_point santo_dominion_points []
 Points for map 102_108. More...
 
static const spawn_zone santo_dominion_zones []
 Zones for map 102_108. More...
 
static const char *const scorn_archs []
 Archetypes to spawn in Scorn. More...
 
static const spawn_point scorn_ne_points []
 Points for map 105_115. More...
 
static const spawn_zone scorn_ne_zones []
 Zones for map 105_115. More...
 
static const spawn_point scorn_nw_points []
 Points for map 104_115. More...
 
static const spawn_zone scorn_nw_zones []
 Zones for map 104_115. More...
 
static const spawn_point scorn_se_points []
 Points for map 105_116. More...
 
static const spawn_zone scorn_se_zones []
 Zones for map 105_116. More...
 
static const spawn_point scorn_sw_points []
 Points for map 104_116. More...
 
static const spawn_zone scorn_sw_zones []
 Zones for map 104_116. More...
 
static const char *const stoneville_archs []
 Archetypes to spawn in stoneville. More...
 
static const spawn_point stoneville_points []
 Points for map 103_127. More...
 
static const spawn_zone stoneville_zones []
 Zones for map 103_127. More...
 
CF_PLUGIN char SvnRevPlugin [] = SVN_REV
 
static const char *const wolfsburg_archs []
 Archetypes to spawn in wolfsburg. More...
 
static const spawn_point wolfsburg_points []
 Points for map 128_109. More...
 
static const spawn_zone wolfsburg_zones []
 Zones for map 128_109. More...
 
static const mapzone available_zones []
 All maps we work on. More...
 
static const mapzoneget_zone_for_map (mapstruct *map)
 Finds if a map has a zone defined. More...
 
static objectget_npc (const mapzone *zone)
 Creates a NPC for the specified zone, and do needed initialization. More...
 
static void add_npc_to_zone (const mapzone *zone, mapstruct *map)
 Add an NPC somewhere in a spawn zone. More...
 
static void add_npc_to_point (const mapzone *zone, mapstruct *map)
 Add an NPC somewhere at a spawn point. More...
 
static void add_npcs_to_map (mapstruct *map)
 Add some NPCs to the map, based on the zone definition. More...
 
static void add_npc_to_random_map (void)
 Find a suitable map loaded and add an NPC to it. More...
 
CF_PLUGIN int citylife_globalEventListener (int *type,...)
 
CF_PLUGIN int postInitPlugin (void)
 Plugin was initialized, now to finish. More...
 
CF_PLUGIN int eventListener (int *type,...)
 Handles an object-related event. More...
 
CF_PLUGIN int closePlugin (void)
 Close the plugin. More...
 

Detailed Description

This file is part of the city life plugin.

See this page for more information.

Definition in file citylife.c.