Go to the documentation of this file.
48 if (!strcmp(reg->name, region_name))
53 LOG(
llevDebug,
"region called %s requested, but not found, fallback used.\n", region_name);
57 LOG(
llevInfo,
"Got no region or fallback for region %s.\n", region_name);
91 if (
m->region != NULL)
92 return m->region->name;
97 LOG(
llevInfo,
"map %s had no region and I couldn't find a fallback to use.\n",
m->name);
188 if (!strcmp(child->
name,
r->name))
190 else if (child->
parent != NULL)
211 if (
r->longname != NULL)
213 else if (
r->parent != NULL)
216 LOG(
llevDebug,
"NOTICE region %s has no parent and no longname.\n",
r->name);
217 return "no name can be found for the current region";
234 else if (
r->parent != NULL)
237 LOG(
llevDebug,
"NOTICE region %s has no parent and no msg.\n",
r->name);
238 return "no description can be found for the current region";
258 LOG(
llevError,
"region.c: get_jail_exit called against non-player object.\n");
264 while (reg != NULL) {
276 LOG(
llevDebug,
"No suitable jailmap for region %s was found.\n", orig ? orig->
name :
"(unknown region?)");
322 std::map<region *, std::string> parents;
326 while (isspace(*
buf))
334 while (isspace(*
value))
351 if (!strcmp(
buf,
"region")) {
354 }
else if (!strcmp(
buf,
"parent")) {
362 LOG(
llevError,
"region.c: malformated regions file: \"parent\" before \"region\".\n");
366 LOG(
llevError,
"region.c: malformated regions file: No value given for \"parent\" key.\n");
369 parents[add] =
value;
370 }
else if (!strcmp(
buf,
"longname")) {
372 LOG(
llevError,
"region.c: malformated regions file: \"longname\" before \"region\".\n");
376 LOG(
llevError,
"region.c: malformated regions file: No value given for \"longname\" key.\n");
380 }
else if (!strcmp(
buf,
"jail")) {
386 LOG(
llevError,
"region.c: malformated regions file: \"jail\" before \"region\".\n");
390 LOG(
llevError,
"region.c: malformated regions file: No value given for \"jail\" key.\n");
394 if (sscanf(
value,
"%[^ ] %d %d\n",
path, &
x, &
y) != 3) {
401 }
else if (!strcmp(
buf,
"msg")) {
403 LOG(
llevError,
"region.c: malformated regions file: \"msg\" before \"region\".\n");
408 while (isspace(*other))
410 if (strcmp(other,
"endmsg") == 0)
413 strcpy(
msgbuf+msgpos, other);
414 msgpos += strlen(other);
415 strcpy(
msgbuf+msgpos,
"\n");
429 }
else if (!strcmp(
buf,
"fallback")) {
431 LOG(
llevError,
"region.c: malformated regions file %s: \"fallback\" before \"region\".\n",
filename);
435 LOG(
llevError,
"region.c: malformated regions file %s: No value given for \"fallback\" key.\n",
filename);
439 }
else if (!strcmp(
buf,
"end")) {
441 LOG(
llevError,
"region.c: Ignoring spurious \"end\" between regions.\n");
446 }
else if (!strcmp(
buf,
"nomore")) {
448 LOG(
llevError,
"region.c: Last region not properly closed.\n");
458 if (!
buf || strcmp(
buf,
"nomore")) {
463 for (
auto p : parents) {
465 if (!p.first->parent) {
466 LOG(
llevError,
"Couldn't find parent %s for region %s\n", p.second.c_str(), p.first->name);
const char * get_name_of_region_for_map(const mapstruct *m)
region * get_region_struct(void)
void LOG(LogLevel logLevel, const char *format,...)
region * get_region_by_name(const char *region_name)
void init_regions(BufferReader *reader, const char *filename)
int region_is_child_of_region(const region *child, const region *r)
static char msgbuf[HUGE_BUF]
const char * get_region_longname(const region *r)
Plugin animator file specs[Config] name
static event_registration m
sstring add_string(const char *str)
const char * get_region_msg(const region *r)
object * object_new(void)
pluglist shows those as well as a short text describing each the list will simply appear empty The keyword for the Python plugin is Python plugout< keyword > Unloads a given identified by its _keyword_ So if you want to unload the Python you need to do plugout Python plugin< libname > Loads a given whose _filename_ is libname So in the case of you d have to do a plugin cfpython so Note that all filenames are relative to the default plugin path(SHARE/plugins). Console messages. ----------------- When Crossfire starts
void fatal(enum fatal_error err)
std::vector< region * > all_regions
object * get_jail_exit(object *op)
Install Bug reporting Credits but rather whatever guild name you are using *With the current map and server there are three they and GreenGoblin *Whatever name you give the folder should but it will still use GUILD_TEMPLATE *You can change what guild it uses by editing the map files Modify Map or objects if you want to use the optional Python based Guild Storage hall The first three are on the main the next two are in the guild_hq and the final one is in hallofjoining Withe the Storage three objects are found on the main floor and the last two are in the basement It s not that but you will need a map editor You find the object that has the click edit and change the line script options(which currently is "GUILD_TEMPALTE") to the guild you wish to use. And make sure you use the same one for all of them or it won 't work. Here 's a quick HOWTO for using the map editor to make these changes edit the mainfloor map exit(x15, y29 - set to/Edit/This/Exit/Path in the template) back to the world map as well. If you are using the Storage Hall map(storage_hall)
region * get_region_from_string(const char *name)
int strcasecmp(const char *s1, const char *s2)
region * get_region_by_map(mapstruct *m)
char * bufferreader_next_line(BufferReader *br)