You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(187) |
Dec
(318) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(268) |
Feb
(231) |
Mar
(251) |
Apr
(372) |
May
(258) |
Jun
(197) |
Jul
(85) |
Aug
(175) |
Sep
(77) |
Oct
(213) |
Nov
(108) |
Dec
(53) |
2002 |
Jan
(38) |
Feb
(50) |
Mar
(32) |
Apr
(30) |
May
(34) |
Jun
(24) |
Jul
(42) |
Aug
(29) |
Sep
(58) |
Oct
(57) |
Nov
(73) |
Dec
(51) |
2003 |
Jan
(98) |
Feb
(64) |
Mar
(39) |
Apr
(38) |
May
(67) |
Jun
(39) |
Jul
(80) |
Aug
(21) |
Sep
(82) |
Oct
(85) |
Nov
(48) |
Dec
(30) |
2004 |
Jan
(29) |
Feb
(82) |
Mar
(43) |
Apr
(54) |
May
(60) |
Jun
(41) |
Jul
(23) |
Aug
(35) |
Sep
(55) |
Oct
(53) |
Nov
(18) |
Dec
(22) |
2005 |
Jan
(49) |
Feb
(28) |
Mar
(112) |
Apr
(60) |
May
(120) |
Jun
(67) |
Jul
(129) |
Aug
(67) |
Sep
(173) |
Oct
(221) |
Nov
(126) |
Dec
(198) |
2006 |
Jan
(172) |
Feb
(141) |
Mar
(54) |
Apr
(15) |
May
(60) |
Jun
(50) |
Jul
(79) |
Aug
(118) |
Sep
(114) |
Oct
(78) |
Nov
(56) |
Dec
(106) |
2007 |
Jan
(80) |
Feb
(268) |
Mar
(238) |
Apr
(222) |
May
(198) |
Jun
(178) |
Jul
(114) |
Aug
(234) |
Sep
(202) |
Oct
(141) |
Nov
(182) |
Dec
(446) |
2008 |
Jan
(260) |
Feb
(143) |
Mar
(210) |
Apr
(158) |
May
(342) |
Jun
(195) |
Jul
(309) |
Aug
(99) |
Sep
(154) |
Oct
(279) |
Nov
(555) |
Dec
(327) |
2009 |
Jan
(182) |
Feb
(289) |
Mar
(30) |
Apr
(51) |
May
(59) |
Jun
(304) |
Jul
(95) |
Aug
(50) |
Sep
(16) |
Oct
(44) |
Nov
(57) |
Dec
(27) |
2010 |
Jan
(59) |
Feb
(178) |
Mar
(220) |
Apr
(272) |
May
(297) |
Jun
(75) |
Jul
(104) |
Aug
(157) |
Sep
(247) |
Oct
(105) |
Nov
(100) |
Dec
(75) |
2011 |
Jan
(61) |
Feb
(32) |
Mar
(47) |
Apr
(79) |
May
(68) |
Jun
(247) |
Jul
(174) |
Aug
(98) |
Sep
(127) |
Oct
(198) |
Nov
(627) |
Dec
(421) |
2012 |
Jan
(521) |
Feb
(372) |
Mar
(489) |
Apr
(256) |
May
(143) |
Jun
(132) |
Jul
(74) |
Aug
(38) |
Sep
(42) |
Oct
(18) |
Nov
(58) |
Dec
(21) |
2013 |
Jan
(10) |
Feb
(10) |
Mar
(68) |
Apr
(50) |
May
(33) |
Jun
(17) |
Jul
(100) |
Aug
(111) |
Sep
(107) |
Oct
(21) |
Nov
(63) |
Dec
(53) |
2014 |
Jan
(29) |
Feb
(20) |
Mar
(39) |
Apr
(86) |
May
(122) |
Jun
(87) |
Jul
(7) |
Aug
(35) |
Sep
(40) |
Oct
(39) |
Nov
(21) |
Dec
(18) |
2015 |
Jan
(6) |
Feb
(56) |
Mar
(67) |
Apr
(24) |
May
(86) |
Jun
(5) |
Jul
(2) |
Aug
(17) |
Sep
(2) |
Oct
(14) |
Nov
(80) |
Dec
(97) |
2016 |
Jan
(9) |
Feb
(14) |
Mar
(3) |
Apr
(2) |
May
(45) |
Jun
(9) |
Jul
(5) |
Aug
(21) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2017 |
Jan
(9) |
Feb
|
Mar
(7) |
Apr
|
May
(24) |
Jun
(35) |
Jul
(60) |
Aug
(44) |
Sep
(22) |
Oct
(1) |
Nov
(2) |
Dec
(2) |
2018 |
Jan
(21) |
Feb
(6) |
Mar
(1) |
Apr
(1) |
May
(11) |
Jun
(2) |
Jul
(1) |
Aug
(5) |
Sep
(11) |
Oct
(15) |
Nov
(4) |
Dec
(55) |
2019 |
Jan
(41) |
Feb
(9) |
Mar
(23) |
Apr
(25) |
May
(55) |
Jun
(82) |
Jul
(19) |
Aug
(81) |
Sep
(15) |
Oct
(11) |
Nov
(12) |
Dec
(37) |
2020 |
Jan
(11) |
Feb
(34) |
Mar
(77) |
Apr
(24) |
May
(6) |
Jun
(14) |
Jul
(4) |
Aug
(76) |
Sep
(141) |
Oct
(62) |
Nov
(46) |
Dec
(116) |
2021 |
Jan
(188) |
Feb
(134) |
Mar
(38) |
Apr
(55) |
May
(12) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-08 21:48:53
|
Revision: 22117 http://sourceforge.net/p/crossfire/code/22117 Author: partmedia Date: 2021-05-08 21:48:50 +0000 (Sat, 08 May 2021) Log Message: ----------- Remove freelist remnants Modified Paths: -------------- client/trunk/common/item.c Modified: client/trunk/common/item.c =================================================================== --- client/trunk/common/item.c 2021-05-08 09:33:36 UTC (rev 22116) +++ client/trunk/common/item.c 2021-05-08 21:48:50 UTC (rev 22117) @@ -27,9 +27,6 @@ static item *player, *map; /* these lists contains rest of items */ /* player = pl->ob, map = pl->below */ -#define NROF_ITEMS 50 /* how many items are reserved initially */ -/* for the item spool */ - #include "item-types.h" /* This uses the item_types table above. We try to figure out if This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-08 09:33:37
|
Revision: 22116 http://sourceforge.net/p/crossfire/code/22116 Author: ryo_saeba Date: 2021-05-08 09:33:36 +0000 (Sat, 08 May 2021) Log Message: ----------- Rebalance gauntlet treasurelist. Move gauntlets to their own treasure list. Patch https://sourceforge.net/p/crossfire/patches/395/ by DraugTheWhopper. Modified Paths: -------------- arch/trunk/ChangeLog arch/trunk/treasures.trs Added Paths: ----------- arch/trunk/armour/gauntlets/random_gauntlet.trs Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-05-08 06:00:36 UTC (rev 22115) +++ arch/trunk/ChangeLog 2021-05-08 09:33:36 UTC (rev 22116) @@ -1,3 +1,9 @@ +Rebalance gauntlet treasurelist. Move gauntlets to their own treasure list. +Patch https://sourceforge.net/p/crossfire/patches/395/ +armour/gauntlets/random_gauntlet.trs +treasures.trs +DraugTheWhopper + Add special face for goblin's hand. Add a copy of human hand as classic image to preserve old appearance for that face set. flesh/goblin/goblin_hand.base.111.png Added: arch/trunk/armour/gauntlets/random_gauntlet.trs =================================================================== --- arch/trunk/armour/gauntlets/random_gauntlet.trs (rev 0) +++ arch/trunk/armour/gauntlets/random_gauntlet.trs 2021-05-08 09:33:36 UTC (rev 22116) @@ -0,0 +1,21 @@ +treasureone random_gauntlet + arch gloves + magic 1 + chance 5 + more + arch gloves_b + magic 3 + chance 1 + more + arch gloves_w + magic 3 + chance 1 + more + arch b_gauntlets + magic 2 + chance 5 + more + arch gauntlets + magic 4 + chance 5 + end Modified: arch/trunk/treasures.trs =================================================================== --- arch/trunk/treasures.trs 2021-05-08 06:00:36 UTC (rev 22115) +++ arch/trunk/treasures.trs 2021-05-08 09:33:36 UTC (rev 22116) @@ -203,6 +203,9 @@ chance 10 end treasureone random_armour + list random_gauntlet + chance 10 + more arch b_full_helmet magic 4 chance 5 @@ -219,10 +222,6 @@ magic 4 chance 5 more - arch b_gauntlets - magic 4 - chance 5 - more arch b_plate_mail magic 4 chance 5 @@ -239,7 +238,6 @@ magic 4 chance 5 more -# arch ring_mail magic 4 chance 5 @@ -316,10 +314,6 @@ magic 1 chance 5 more - arch gauntlets - magic 2 - chance 1 - more arch high_boots magic 3 chance 3 @@ -336,18 +330,6 @@ magic 3 chance 1 more - arch gloves - magic 2 - chance 2 - more - arch gloves_b - magic 2 - chance 1 - more - arch gloves_w - magic 2 - chance 1 - more arch lapron magic 1 chance 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-08 06:00:41
|
Revision: 22115 http://sourceforge.net/p/crossfire/code/22115 Author: rjtanner Date: 2021-05-08 06:00:36 +0000 (Sat, 08 May 2021) Log Message: ----------- Remove trailing spaces Modified Paths: -------------- metaserver/trunk/meta_update.php Modified: metaserver/trunk/meta_update.php =================================================================== --- metaserver/trunk/meta_update.php 2021-05-08 05:58:10 UTC (rev 22114) +++ metaserver/trunk/meta_update.php 2021-05-08 06:00:36 UTC (rev 22115) @@ -112,20 +112,20 @@ if (db_num_rows($qret)) { $qrow = db_fetch_assoc($qret); $update="update servers set hostname='". $our_post['hostname'] . - "', port='". $our_post['port'] . - "', html_comment='". $our_post['html_comment'] . - "', text_comment='". $our_post['text_comment'] . - "', archbase='". $our_post['archbase'] . - "', mapbase='". $our_post['mapbase'] . - "', codebase='". $our_post['codebase'] . - "', flags='". $our_post['flags'] . - "', num_players='". $our_post['num_players'] . - "', in_bytes='". $our_post['in_bytes'] . - "', out_bytes='". $our_post['out_bytes'] . - "', uptime='". $our_post['uptime'] . - "', version='". $our_post['version'] . - "', sc_version='". $our_post['sc_version'] . - "', cs_version='". $our_post['cs_version'] . + "', port='". $our_post['port'] . + "', html_comment='". $our_post['html_comment'] . + "', text_comment='". $our_post['text_comment'] . + "', archbase='". $our_post['archbase'] . + "', mapbase='". $our_post['mapbase'] . + "', codebase='". $our_post['codebase'] . + "', flags='". $our_post['flags'] . + "', num_players='". $our_post['num_players'] . + "', in_bytes='". $our_post['in_bytes'] . + "', out_bytes='". $our_post['out_bytes'] . + "', uptime='". $our_post['uptime'] . + "', version='". $our_post['version'] . + "', sc_version='". $our_post['sc_version'] . + "', cs_version='". $our_post['cs_version'] . "', last_update=now() where entry=" . $qrow['entry'] . ";"; } else { $update="insert into servers (hostname, port, html_comment, text_comment, " . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-08 05:58:13
|
Revision: 22114 http://sourceforge.net/p/crossfire/code/22114 Author: rjtanner Date: 2021-05-08 05:58:10 +0000 (Sat, 08 May 2021) Log Message: ----------- Fix use of undefined constant with hostname in meta_update.php Modified Paths: -------------- metaserver/trunk/meta_update.php Modified: metaserver/trunk/meta_update.php =================================================================== --- metaserver/trunk/meta_update.php 2021-05-06 22:06:22 UTC (rev 22113) +++ metaserver/trunk/meta_update.php 2021-05-08 05:58:10 UTC (rev 22114) @@ -43,10 +43,10 @@ // on the ip of the incoming connection does not match that specified // by the server, we reject this user - no spoofing of other servers // allowed. -if ($ip != $_SERVER['REMOTE_ADDR'] && $hostname != $_POST[hostname]) { +if ($ip != $_SERVER['REMOTE_ADDR'] && $hostname != $_POST['hostname']) { echo "neither forward nor reverse DNS look corresponds to incoming ip address.\n"; echo "incoming ip: " . $_SERVER['REMOTE_ADDR'] . ", DNS of that: $hostname\n"; - echo "User specified hostname: " . $_POST[hostname] . " IP of that hostname: $ip\n"; + echo "User specified hostname: " . $_POST['hostname'] . " IP of that hostname: $ip\n"; log_message(LOG_WARN, $_SERVER['REMOTE_ADDR'] . " does not have correct hostname set\n"); exit; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-06 22:06:25
|
Revision: 22113 http://sourceforge.net/p/crossfire/code/22113 Author: partmedia Date: 2021-05-06 22:06:22 +0000 (Thu, 06 May 2021) Log Message: ----------- Make function static Modified Paths: -------------- client/trunk/common/item.c client/trunk/common/proto.h Modified: client/trunk/common/item.c =================================================================== --- client/trunk/common/item.c 2021-05-06 22:06:18 UTC (rev 22112) +++ client/trunk/common/item.c 2021-05-06 22:06:22 UTC (rev 22113) @@ -386,7 +386,7 @@ * and sets its tag field and clears locked flag (all other fields * are unitialized and may contain random values) */ -item *create_new_item(item *env, gint32 tag) +static item *create_new_item(item *env, gint32 tag) { item *op; op = new_item(); Modified: client/trunk/common/proto.h =================================================================== --- client/trunk/common/proto.h 2021-05-06 22:06:18 UTC (rev 22112) +++ client/trunk/common/proto.h 2021-05-06 22:06:22 UTC (rev 22113) @@ -60,7 +60,6 @@ item *locate_item(gint32 tag); void remove_item(item *op); void remove_item_inventory(item *op); -item *create_new_item(item *env, gint32 tag); void set_item_values(item *op, char *name, gint32 weight, guint16 face, guint16 flags, guint16 anim, guint16 animspeed, guint32 nrof, guint16 type); void toggle_locked(item *op); void send_mark_obj(item *op); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-06 22:06:19
|
Revision: 22112 http://sourceforge.net/p/crossfire/code/22112 Author: partmedia Date: 2021-05-06 22:06:18 +0000 (Thu, 06 May 2021) Log Message: ----------- Remove item free list Modified Paths: -------------- client/trunk/common/item.c client/trunk/common/p_cmd.c client/trunk/common/proto.h Modified: client/trunk/common/item.c =================================================================== --- client/trunk/common/item.c 2021-05-06 18:45:53 UTC (rev 22111) +++ client/trunk/common/item.c 2021-05-06 22:06:18 UTC (rev 22112) @@ -24,7 +24,6 @@ #include "item.h" #include "script.h" -static item *free_items; /* the list of free (unused) items */ static item *player, *map; /* these lists contains rest of items */ /* player = pl->ob, map = pl->below */ @@ -241,24 +240,6 @@ } /* - * alloc_items() returns pointer to list of allocated objects - */ -static item *alloc_items(int nrof) -{ - item *op, *list; - int i; - - list = op = new_item(); - - for (i = 1; i < nrof; i++) { - op->next = new_item(); - op->next->prev = op; - op = op->next; - } - return list; -} - -/* * free_items() frees all allocated items from list */ void free_all_items(item *op) @@ -357,34 +338,7 @@ return; /* Don't free this! */ } - /* add object to a list of free objects */ - op->next = free_items; - if (op->next != NULL) { - op->next->prev = op; - } - free_items = op; - - /* Clear all these values, since this item will get re-used */ - op->prev = NULL; - op->env = NULL; - op->tag = 0; - copy_name(op->d_name, ""); - copy_name(op->s_name, ""); - copy_name(op->p_name, ""); - op->inv = NULL; - op->env = NULL; - op->tag = 0; - op->face = 0; - op->weight = 0; - op->magical = op->cursed = op->damned = op->blessed = 0; - op->unpaid = op->locked = op->applied = 0; - op->flagsval = 0; - op->animation_id = 0; - op->last_anim = 0; - op->anim_state = 0; - op->nrof = 0; - op->open = 0; - op->type = NO_ITEM_TYPE; + free(op); } /* @@ -435,17 +389,8 @@ item *create_new_item(item *env, gint32 tag) { item *op; + op = new_item(); - if (!free_items) { - free_items = alloc_items(NROF_ITEMS); - } - - op = free_items; - free_items = free_items->next; - if (free_items) { - free_items->prev = NULL; - } - op->tag = tag; op->locked = 0; if (env) { @@ -455,18 +400,6 @@ return op; } -int num_free_items(void) -{ - item *tmp; - int count = 0; - - for (tmp = free_items; tmp; tmp = tmp->next) { - count++; - } - - return count; -} - /* * Hardcoded now, server could send these at initiation phase. */ Modified: client/trunk/common/p_cmd.c =================================================================== --- client/trunk/common/p_cmd.c 2021-05-06 18:45:53 UTC (rev 22111) +++ client/trunk/common/p_cmd.c 2021-05-06 22:06:18 UTC (rev 22112) @@ -212,11 +212,6 @@ command_take("take", used); /* I dunno why they want it. */ } -static void do_num_free_items() { - LOG(LOG_INFO, "common::extended_command", "num_free_items=%d", - num_free_items()); -} - /* Help "typecasters". */ #include "chelp.h" @@ -338,8 +333,6 @@ {"unbind", COMM_CAT_SETUP, unbind_key, help_unbind, NULL}, - {"num_free_items", COMM_CAT_DEBUG, do_num_free_items, NULL, - "log the number of free items?"}, {"show", COMM_CAT_SETUP, command_show, NULL, "Change what items to show in inventory"}, }; Modified: client/trunk/common/proto.h =================================================================== --- client/trunk/common/proto.h 2021-05-06 18:45:53 UTC (rev 22111) +++ client/trunk/common/proto.h 2021-05-06 22:06:18 UTC (rev 22112) @@ -61,7 +61,6 @@ void remove_item(item *op); void remove_item_inventory(item *op); item *create_new_item(item *env, gint32 tag); -int num_free_items(void); void set_item_values(item *op, char *name, gint32 weight, guint16 face, guint16 flags, guint16 anim, guint16 animspeed, guint32 nrof, guint16 type); void toggle_locked(item *op); void send_mark_obj(item *op); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-06 18:45:54
|
Revision: 22111 http://sourceforge.net/p/crossfire/code/22111 Author: ryo_saeba Date: 2021-05-06 18:45:53 +0000 (Thu, 06 May 2021) Log Message: ----------- Display server start date in console Modified Paths: -------------- server/trunk/ChangeLog server/trunk/utils/crossloop.in Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-05-06 16:21:18 UTC (rev 22110) +++ server/trunk/ChangeLog 2021-05-06 18:45:53 UTC (rev 22111) @@ -1,4 +1,7 @@ 2021-05-06 Nicolas Weeger + * utils/crossloop.in: Display server start date in console + +2021-05-06 Nicolas Weeger * server/c_misc.c: Remove line length limit for help files. 2021-05-05 Nicolas Weeger Modified: server/trunk/utils/crossloop.in =================================================================== --- server/trunk/utils/crossloop.in 2021-05-06 16:21:18 UTC (rev 22110) +++ server/trunk/utils/crossloop.in 2021-05-06 18:45:53 UTC (rev 22111) @@ -54,7 +54,7 @@ # Change to the ${CF_TMP} directory and start server. cd ${CF_TMP} - echo "===>>> Starting server (generation ${generation})..." + echo "===>>> Starting server (generation ${generation} on `date +%Y-%m-%d-%H:%M`)..." ${CF_BIN} ${CF_FLAGS} -tmpdir "${CF_TMP}" -log "${CF_LOG}" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-06 16:21:21
|
Revision: 22110 http://sourceforge.net/p/crossfire/code/22110 Author: ryo_saeba Date: 2021-05-06 16:21:18 +0000 (Thu, 06 May 2021) Log Message: ----------- Remove line length limit for help files. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/server/c_misc.c Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-05-06 15:21:05 UTC (rev 22109) +++ server/trunk/ChangeLog 2021-05-06 16:21:18 UTC (rev 22110) @@ -1,3 +1,6 @@ +2021-05-06 Nicolas Weeger + * server/c_misc.c: Remove line length limit for help files. + 2021-05-05 Nicolas Weeger * socket/info.c: Fix va_list not being reinitialized after formatting. Modified: server/trunk/server/c_misc.c =================================================================== --- server/trunk/server/c_misc.c 2021-05-06 15:21:05 UTC (rev 22109) +++ server/trunk/server/c_misc.c 2021-05-06 16:21:18 UTC (rev 22110) @@ -1748,6 +1748,34 @@ } /** + * Attempt to send the contents of the specified file to the player. + * If the file does not exist, then an error is logged to the server, and + * nothing is sent to the player. + * @param op who to send the file to. + * @param filename full help filename. + */ +static void display_help_file(object *op, const char *filename) { + FILE *fp; + BufferReader *br; + const char *line; + + if ((fp = fopen(filename, "r")) == NULL) { + LOG(llevError, "Cannot open help file %s: %s\n", filename, strerror(errno)); + return; + } + + br = bufferreader_create(); + bufferreader_init_from_file(br, fp); + fclose(fp); + + while (line = bufferreader_next_line(br)) { + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, line); + } + + bufferreader_destroy(br); +} + +/** * Player is asking for some help. * * @param op @@ -1756,9 +1784,7 @@ * what kind of help to ask for. */ void command_help(object *op, const char *params) { - FILE *fp; - char filename[MAX_BUF], line[MAX_BUF]; - int len; + char filename[MAX_BUF]; const char *language; /* @@ -1766,18 +1792,7 @@ */ if (*params == '\0') { snprintf(filename, sizeof(filename), "%s/def_help", settings.datadir); - if ((fp = fopen(filename, "r")) == NULL) { - LOG(llevError, "Cannot open help file %s: %s\n", filename, strerror(errno)); - return; - } - while (fgets(line, MAX_BUF, fp)) { - line[MAX_BUF-1] = '\0'; - len = strlen(line)-1; - if (line[len] == '\n') - line[len] = '\0'; - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, line); - } - fclose(fp); + display_help_file(op, filename); return; } @@ -1828,23 +1843,7 @@ /* * Found that. Just cat it to screen. */ - if ((fp = fopen(filename, "r")) == NULL) { - LOG(llevError, "Cannot open help file %s: %s\n", filename, strerror(errno)); - return; - } - - draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - "Help about '%s'", - params); - - while (fgets(line, MAX_BUF, fp)) { - line[MAX_BUF-1] = '\0'; - len = strlen(line)-1; - if (line[len] == '\n') - line[len] = '\0'; - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, line); - } - fclose(fp); + display_help_file(op, filename); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-06 15:21:06
|
Revision: 22109 http://sourceforge.net/p/crossfire/code/22109 Author: silvernexus Date: 2021-05-06 15:21:05 +0000 (Thu, 06 May 2021) Log Message: ----------- Add special face for goblin hand. Modified Paths: -------------- arch/trunk/ChangeLog Added Paths: ----------- arch/trunk/flesh/goblin/goblin_hand.base.111.png arch/trunk/flesh/goblin/goblin_hand.clsc.111.png arch/trunk/flesh/goblin/goblin_hand.face Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-05-05 07:50:12 UTC (rev 22108) +++ arch/trunk/ChangeLog 2021-05-06 15:21:05 UTC (rev 22109) @@ -1,3 +1,10 @@ +Add special face for goblin's hand. Add a copy of human hand as classic image to preserve old +appearance for that face set. +flesh/goblin/goblin_hand.base.111.png +flesh/goblin/goblin_hand.clsc.111.png +flesh/goblin/goblin_hand.face +Daniel Hawkins 2021-05-06 + Fix animation issue from a missing face in the classic faceset for big galleon. transport/biggalleon.clsc.x71.png Daniel Hawkins 2021-04-26 Added: arch/trunk/flesh/goblin/goblin_hand.base.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/goblin/goblin_hand.base.111.png =================================================================== --- arch/trunk/flesh/goblin/goblin_hand.base.111.png 2021-05-05 07:50:12 UTC (rev 22108) +++ arch/trunk/flesh/goblin/goblin_hand.base.111.png 2021-05-06 15:21:05 UTC (rev 22109) Property changes on: arch/trunk/flesh/goblin/goblin_hand.base.111.png ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/goblin/goblin_hand.clsc.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/goblin/goblin_hand.clsc.111.png =================================================================== --- arch/trunk/flesh/goblin/goblin_hand.clsc.111.png 2021-05-05 07:50:12 UTC (rev 22108) +++ arch/trunk/flesh/goblin/goblin_hand.clsc.111.png 2021-05-06 15:21:05 UTC (rev 22109) Property changes on: arch/trunk/flesh/goblin/goblin_hand.clsc.111.png ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/goblin/goblin_hand.face =================================================================== --- arch/trunk/flesh/goblin/goblin_hand.face (rev 0) +++ arch/trunk/flesh/goblin/goblin_hand.face 2021-05-06 15:21:05 UTC (rev 22109) @@ -0,0 +1,3 @@ +face goblin_hand.111 +magicmap white +end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-05 07:50:14
|
Revision: 22108 http://sourceforge.net/p/crossfire/code/22108 Author: ryo_saeba Date: 2021-05-05 07:50:12 +0000 (Wed, 05 May 2021) Log Message: ----------- Fix va_list not being reinitialized after formatting. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/socket/info.c Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-05-05 01:41:52 UTC (rev 22107) +++ server/trunk/ChangeLog 2021-05-05 07:50:12 UTC (rev 22108) @@ -1,3 +1,6 @@ +2021-05-05 Nicolas Weeger + * socket/info.c: Fix va_list not being reinitialized after formatting. + 2021-05-01 Nicolas Weeger * common/readable.c, * test/unit/common/Makefile.am, Modified: server/trunk/socket/info.c =================================================================== --- server/trunk/socket/info.c 2021-05-05 01:41:52 UTC (rev 22107) +++ server/trunk/socket/info.c 2021-05-05 07:50:12 UTC (rev 22108) @@ -149,6 +149,7 @@ if ((flags&NDI_ALL) || (flags&NDI_ALL_DMS)) { vsnprintf(buf, HUGE_BUF, format, ap); LOG(llevInfo, "-- %s\n", buf); + va_start(ap, format); } // Then, if we need to translate, attempt to do so. if ((~flags)&NDI_NO_TRANSLATE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-05 01:41:58
|
Revision: 22107 http://sourceforge.net/p/crossfire/code/22107 Author: silvernexus Date: 2021-05-05 01:41:52 +0000 (Wed, 05 May 2021) Log Message: ----------- Increase the item power of greyshield from 6 to 30. Modified Paths: -------------- maps/trunk/ChangeLog maps/trunk/quests/greyshield/Finish Modified: maps/trunk/ChangeLog =================================================================== --- maps/trunk/ChangeLog 2021-05-01 20:53:45 UTC (rev 22106) +++ maps/trunk/ChangeLog 2021-05-05 01:41:52 UTC (rev 22107) @@ -1,3 +1,6 @@ +2021-05-04 Daniel Hawkins + * quests/greyshield/Finish: Change Greyshield item power (6 -> 30). + 2021-04-23 DraugTheWhopper * brest/brest.scrolls.right, * unlinked/zornstuff/zornstuff.NOT.a.map: Use renamed treasure list for humans. Modified: maps/trunk/quests/greyshield/Finish =================================================================== --- maps/trunk/quests/greyshield/Finish 2021-05-01 20:53:45 UTC (rev 22106) +++ maps/trunk/quests/greyshield/Finish 2021-05-05 01:41:52 UTC (rev 22107) @@ -9,7 +9,7 @@ enter_y 7 msg Created: 1996-10-26 Chris Jeske -Modified: 2017-07-09 Jason Zheng +Modified: 2021-05-04 Daniel Hawkins endmsg end arch marble @@ -2626,6 +2626,7 @@ identified 1 reflect_missile 1 reflect_spell 1 +item_power 30 end arch teleporter hp 7 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-05-01 20:53:48
|
Revision: 22106 http://sourceforge.net/p/crossfire/code/22106 Author: ryo_saeba Date: 2021-05-01 20:53:45 +0000 (Sat, 01 May 2021) Log Message: ----------- Clean extra space in list with eg god descriptions. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/common/readable.c server/trunk/test/unit/common/Makefile.am server/trunk/test/unit/common/check_readable.c Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-27 17:42:33 UTC (rev 22105) +++ server/trunk/ChangeLog 2021-05-01 20:53:45 UTC (rev 22106) @@ -1,3 +1,8 @@ +2021-05-01 Nicolas Weeger + * common/readable.c, + * test/unit/common/Makefile.am, + * test/unit/common/check_readable.c: Clean extra space in list with eg god descriptions. + 2021-04-27 Nicolas Weeger * configure.ac, * include/modules.h, Modified: server/trunk/common/readable.c =================================================================== --- server/trunk/common/readable.c 2021-04-27 17:42:33 UTC (rev 22105) +++ server/trunk/common/readable.c 2021-05-01 20:53:45 UTC (rev 22106) @@ -649,6 +649,18 @@ } /** + * Return buf without its leading spaces. + * @param buf what to trim. + * @return trimmed buf. + */ +const char *trim(const char *buf) { + while ((*buf) == ' ') { + buf++; + } + return buf; +} + +/** * Takes a string in buf1 and separates it into * a list of strings delimited by buf2. Then returns a comma * separated string w/ decent punctuation. @@ -672,7 +684,7 @@ strlcpy(buf, buf1, sizeof(buf)); snprintf(retbuf, size, " "); for (tbuf = strtok(buf, buf2); tbuf && i > 0; tbuf = strtok(NULL, buf2)) { - snprintf(retbuf+strlen(retbuf), size-strlen(retbuf), "%s", tbuf); + snprintf(retbuf+strlen(retbuf), size-strlen(retbuf), "%s", trim(tbuf)); i--; if (i == 1 && maxi > 1) snprintf(retbuf+strlen(retbuf), size-strlen(retbuf), " and "); Modified: server/trunk/test/unit/common/Makefile.am =================================================================== --- server/trunk/test/unit/common/Makefile.am 2021-04-27 17:42:33 UTC (rev 22105) +++ server/trunk/test/unit/common/Makefile.am 2021-05-01 20:53:45 UTC (rev 22106) @@ -17,9 +17,9 @@ # disabled tests, enable them when they have some real content # check_anim check_button check_exp check_friend check_glue check_holy check_info check_init # check_links check_logger check_los check_map -# check_player check_porting check_recipe check_re-cmp check_region check_readable +# check_player check_porting check_recipe check_re-cmp check_region -TESTS= check_arch check_image check_item check_living check_loader check_object check_path check_shstr check_time check_treasure check_utils +TESTS= check_arch check_image check_item check_living check_loader check_object check_path check_readable check_shstr check_time check_treasure check_utils DISTCLEANFILES= .autorun.xml Modified: server/trunk/test/unit/common/check_readable.c =================================================================== --- server/trunk/test/unit/common/check_readable.c 2021-04-27 17:42:33 UTC (rev 22105) +++ server/trunk/test/unit/common/check_readable.c 2021-05-01 20:53:45 UTC (rev 22106) @@ -49,6 +49,19 @@ /* put any cleanup steps here, they will be run after each testcase */ } +START_TEST(test_strtoktolin) { + char buf[MAX_BUF]; + +#define C(w, e) \ + strtoktolin(w, ",", buf, sizeof(buf)); \ + fail_unless(strcmp(buf, e) == 0, "got %s instead of %s", buf, e); + + C("single", " single."); + C("one, two", " one and two."); + C("one, two, three", " one, two and three."); +} +END_TEST + static Suite *readable_suite(void) { Suite *s = suite_create("readable"); TCase *tc_core = tcase_create("Core"); @@ -57,6 +70,7 @@ tcase_add_checked_fixture(tc_core, setup, teardown); suite_add_tcase(s, tc_core); + tcase_add_test(tc_core, test_strtoktolin); return s; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-27 17:42:40
|
Revision: 22105 http://sourceforge.net/p/crossfire/code/22105 Author: ryo_saeba Date: 2021-04-27 17:42:33 +0000 (Tue, 27 Apr 2021) Log Message: ----------- Convert the 'random house generator' plugin to a module, disabled by default. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/configure.ac server/trunk/include/modules.h server/trunk/plugins/Makefile.am server/trunk/server/Makefile.am server/trunk/server/init.c Added Paths: ----------- server/trunk/server/modules/random_house_generator.c Removed Paths: ------------- server/trunk/plugins/cfrhg/ Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/ChangeLog 2021-04-27 17:42:33 UTC (rev 22105) @@ -1,4 +1,19 @@ 2021-04-27 Nicolas Weeger + * configure.ac, + * include/modules.h, + * plugins/Makefile.am, + * plugins/cfrhg, + * plugins/cfrhg/Makefile.am, + * plugins/cfrhg/cfrhg.c, + * plugins/cfrhg/include, + * plugins/cfrhg/include/Makefile.am, + * plugins/cfrhg/include/cfrhg.h, + * plugins/cfrhg/include/cfrhg_proto.h, + * server/Makefile.am, + * server/init.c, + * server/modules/random_house_generator.c: Convert the 'random house generator' plugin to a module, disabled by default. + +2021-04-27 Nicolas Weeger * server/modules/cfcitybell.cpp, * server/modules/citylife.cpp: Correctly unregister event listeners at close. Modified: server/trunk/configure.ac =================================================================== --- server/trunk/configure.ac 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/configure.ac 2021-04-27 17:42:33 UTC (rev 22105) @@ -16,9 +16,6 @@ [enable_mapper=yes], [enable_mapper=no]) dnl Options for plugins -AC_ARG_ENABLE(cfrhg, [AS_HELP_STRING([--enable-cfrhg], - [Build the random house generator plugin])], - [], [enable_cfrhg=no]) AC_ARG_ENABLE(logger, [AS_HELP_STRING([--enable-logger], [Build the SQLite logging plugin])], @@ -85,9 +82,6 @@ ]) AM_CONDITIONAL(MAPPER, test "$enable_mapper" = "yes") -dnl Random house generator -AM_CONDITIONAL(CFRHG_PLUGIN, test "$enable_cfrhg" = "yes") - dnl Unit tests AS_IF([test "$enable_check" = "yes"], [ PKG_CHECK_MODULES([CHECK], [check], [have_check="yes"], [have_check="no"]) @@ -178,8 +172,6 @@ plugins/cfnewspaper/Makefile plugins/cfnewspaper/include/Makefile plugins/cfpython/Makefile plugins/cfpython/include/Makefile - plugins/cfrhg/Makefile - plugins/cfrhg/include/Makefile plugins/common/Makefile plugins/common/include/Makefile test/Makefile test/bugs/Makefile test/bugs/bugtrack/Makefile @@ -214,8 +206,6 @@ AC_MSG_NOTICE([ Build python plugin? $cf_will_build_python]) fi -AC_MSG_NOTICE([ Build random house plugin? $enable_cfrhg]) - if test x"$xsltengine" != "x" ; then check_complement=["(will generate report)"] fi Modified: server/trunk/include/modules.h =================================================================== --- server/trunk/include/modules.h 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/include/modules.h 2021-04-27 17:42:33 UTC (rev 22105) @@ -28,6 +28,9 @@ void citylife_init(Settings *settings); void citylife_close(); +void random_house_generator_init(Settings *settings); +void random_house_generator_close(); + #ifdef __cplusplus } #endif Modified: server/trunk/plugins/Makefile.am =================================================================== --- server/trunk/plugins/Makefile.am 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/plugins/Makefile.am 2021-04-27 17:42:33 UTC (rev 22105) @@ -1,3 +1,3 @@ -SUBDIRS = cfrhg cfpython cfanim common cflogger cfnewspaper +SUBDIRS = cfpython cfanim common cflogger cfnewspaper DISTCHECK_CONFIGURE_FLAGS = --localstatedir=$$dc_install_base/var --mandir=$$dc_install_base/man Modified: server/trunk/server/Makefile.am =================================================================== --- server/trunk/server/Makefile.am 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/server/Makefile.am 2021-04-27 17:42:33 UTC (rev 22105) @@ -49,7 +49,8 @@ weather.c\ server.c \ modules/cfcitybell.cpp \ - modules/citylife.cpp + modules/citylife.cpp \ + modules/random_house_generator.c AM_CPPFLAGS = -I$(top_srcdir)/include -DDATADIR=\"$(pkgdatadir)\" -DCONFDIR=\"$(pkgconfdir)\" \ -DLIBDIR=\"$(pkglibdir)\" -DLOCALDIR=\"$(pkgstatedir)\" \ Modified: server/trunk/server/init.c =================================================================== --- server/trunk/server/init.c 2021-04-27 17:30:06 UTC (rev 22104) +++ server/trunk/server/init.c 2021-04-27 17:42:33 UTC (rev 22105) @@ -55,6 +55,7 @@ static module_information modules[] = { { "citybell", "Ring bells every hour for defined temples", true, cfcitybell_init, cfcitybell_close }, { "citylife", "Add NPCs in towns", true, citylife_init, citylife_close }, + { "rhg", "Add random maps to exits in towns", false, random_house_generator_init, random_house_generator_close }, { NULL, NULL, NULL } }; Copied: server/trunk/server/modules/random_house_generator.c (from rev 22101, server/trunk/plugins/cfrhg/cfrhg.c) =================================================================== --- server/trunk/server/modules/random_house_generator.c (rev 0) +++ server/trunk/server/modules/random_house_generator.c 2021-04-27 17:42:33 UTC (rev 22105) @@ -0,0 +1,226 @@ +/* + * Crossfire -- cooperative multi-player graphical RPG and adventure game + * + * Copyright (c) 1999-2021 The Crossfire Development Team + * + * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are + * welcome to redistribute it under certain conditions. For details, please + * see COPYING and LICENSE. + * + * The authors can be reached via e-mail at <cro...@me...>. + */ + +/** + * @defgroup module_rhg Random house generation module + * This module links unused exits to random maps. + * The random map parameters vary based on the map it is in, but each exit will always use + * the same random seed to have the same layout and content. + * + * Exits will only point to a random map if both their @ref obj::slaying "slaying" and + * @ref obj::msg "msg" fields are empty. + * + * @todo + * - make more parameters vary based on maps + * - add exits to all towns + * + * @{ + */ + +/** + * @file + * This file is part of the @ref module_rhg "random house generation plugin". + * See this page for more information. + */ + +#include <stdarg.h> +#include <assert.h> +#include <string.h> + +#include "global.h" +#include "object.h" +#include "sproto.h" + +/** Link between a map and the exits to generate for it. */ +typedef struct house_zone_struct { + const char *mappath; /**< Full map path. */ + const char *monsterstyle; /**< Style of monsters. */ +} house_zone_struct; + +/** Maps we work on. */ +static const house_zone_struct zones[] = { + /* Scorn */ + { "/world/world_104_115", "city" }, + { "/world/world_105_115", "city" }, + { "/world/world_104_116", "city" }, + { "/world/world_105_116", "city" }, + /* Navar */ + { "/world/world_122_116", "city" }, + { "/world/world_121_116", "city" }, + { "/world/world_122_117", "city" }, + { "/world/world_121_117", "city" }, + { NULL, NULL } +}; + +/** + * Get the random map parameters of a map. + * @param map + * map to get the zone of. + * @return + * NULL if the map shouldn't be processed, else its parameters. + */ +static const house_zone_struct *get_map_zone(const mapstruct *map) { + int zone; + + for (zone = 0; zones[zone].mappath != NULL; zone++) { + if (strcmp(zones[zone].mappath, map->path) == 0) + return &zones[zone]; + } + + return NULL; +} + +/** + * Should we add a random map to this exit? + * @param exit + * exit to check. + * @return + * 1 if a map should be set, 0 else. + */ +static int is_suitable_exit(object *exit) { + assert(exit); + + if (exit->type != EXIT) + return 0; + if (exit->slaying || exit->msg) + return 0; + + return 1; +} + +/** + * Get the random map seed. Will always yield the same value for the same (position included) exit. + * @param exit + * exit to get the seed of. + * @param map + * map the exit is on. + * @return + * random seed. + */ +static int get_exit_seed(const object *exit, const mapstruct *map) { + char r[500]; + int seed = 0, len, w = 0; + + snprintf(r, sizeof(r), "%s!%d,%d*%s", exit->arch->name, exit->x, exit->y, map->path); + + len = strlen(r)-1; + while (len >= 0) { + seed ^= ((int)r[len])<<w; + w += 8; + w = w%32; + len--; + } + + return seed; +} + +/** + * Change an empty exit to point to a random map. + * @param exit + * exit to alter. + * @param zone + * zone we're part of, to know the random map parameters. + * @param map + * map the exit is on. + */ +static void add_exit_to_item(object *exit, const house_zone_struct *zone, const mapstruct *map) { + char params[MAX_BUF]; + + assert(exit); + assert(zone); + + snprintf(params, sizeof(params), "layoutstyle onion\n" + "floorstyle indoor\n" + "wallstyle wooden\n" + "monsterstyle %s\n" + "dungeon_level 1\n" + "dungeon_depth 1\n" + "decorstyle furniture\n" + "random_seed %d\n", + zone->monsterstyle, + get_exit_seed(exit, map)); + + exit->slaying = add_string("/!"); + exit->msg = add_string(params); +} + +/** + * Checks if the map should be processed, and if so process it. + * @param map + * map to work on. + */ +static void add_exits_to_map(const mapstruct *map) { + int x, y; + const house_zone_struct *zone = get_map_zone(map); + + if (!zone) + return; + + for (x = 0; x < MAP_WIDTH(map); x++) { + for (y = 0; y < MAP_HEIGHT(map); y++) { + FOR_MAP_PREPARE(map, x, y, item) { + if (is_suitable_exit(item)) + add_exit_to_item(item, zone, map); + } FOR_MAP_FINISH(); + } + } +} + +/** + * Global server event handling. Only uses EVENT_MAPLOAD. + * @param type + * unused. + * @return + * 0. + */ +static int cfrhg_globalEventListener(int *type, ...) { + va_list args; + int rv = 0; + mapstruct *map; + int code; + + va_start(args, type); + code = va_arg(args, int); + + switch (code) { + case EVENT_MAPLOAD: + map = va_arg(args, mapstruct *); + add_exits_to_map(map); + break; + } + va_end(args); + + return rv; +} + +static event_registration eg; + +/** + * Module initialisation. +*/ +void random_house_generator_init(Settings *settings) { + eg = events_register_global_handler(EVENT_MAPLOAD, cfrhg_globalEventListener); + + /* Disable the plugin in case it's still there */ + linked_char *disable = calloc(1, sizeof(linked_char)); + disable->next = settings->disabled_plugins; + disable->name = strdup("cfrhg"); + settings->disabled_plugins = disable; +} + +/** + * Close the module. + */ +void random_house_generator_close() { + events_unregister_global_handler(EVENT_MAPLOAD, eg); +} +/*@}*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-27 17:30:14
|
Revision: 22104 http://sourceforge.net/p/crossfire/code/22104 Author: ryo_saeba Date: 2021-04-27 17:30:06 +0000 (Tue, 27 Apr 2021) Log Message: ----------- Correctly unregister event listeners at close. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/server/modules/cfcitybell.cpp server/trunk/server/modules/citylife.cpp Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-27 17:22:35 UTC (rev 22103) +++ server/trunk/ChangeLog 2021-04-27 17:30:06 UTC (rev 22104) @@ -1,4 +1,8 @@ 2021-04-27 Nicolas Weeger + * server/modules/cfcitybell.cpp, + * server/modules/citylife.cpp: Correctly unregister event listeners at close. + +2021-04-27 Nicolas Weeger * common/init.c, * include/global.h, * server/init.c: Allow modules to be enabled or disabled by default. Modified: server/trunk/server/modules/cfcitybell.cpp =================================================================== --- server/trunk/server/modules/cfcitybell.cpp 2021-04-27 17:22:35 UTC (rev 22103) +++ server/trunk/server/modules/cfcitybell.cpp 2021-04-27 17:30:06 UTC (rev 22104) @@ -145,6 +145,8 @@ return 0; } +static event_registration global_handler; + /** * Citybells module initialisation. * @param settings server settings. @@ -154,7 +156,7 @@ timeofday_t tod; get_tod(&tod); last_hr = tod.hour; - events_register_global_handler(EVENT_CLOCK, clock_listener); + global_handler = events_register_global_handler(EVENT_CLOCK, clock_listener); settings->hooks_filename[settings->hooks_count] = ".bells"; settings->hooks[settings->hooks_count] = load_bells; @@ -169,6 +171,7 @@ extern "C" void cfcitybell_close() { + events_unregister_global_handler(EVENT_CLOCK, global_handler); for (auto reg : regions) { delete reg.second; } Modified: server/trunk/server/modules/citylife.cpp =================================================================== --- server/trunk/server/modules/citylife.cpp 2021-04-27 17:22:35 UTC (rev 22103) +++ server/trunk/server/modules/citylife.cpp 2021-04-27 17:30:06 UTC (rev 22104) @@ -407,10 +407,12 @@ } } +static event_registration c, m; + extern "C" void citylife_init(Settings *settings) { - events_register_global_handler(EVENT_CLOCK, citylife_globalEventListener); - events_register_global_handler(EVENT_MAPLOAD, citylife_globalEventListener); + c = events_register_global_handler(EVENT_CLOCK, citylife_globalEventListener); + m = events_register_global_handler(EVENT_MAPLOAD, citylife_globalEventListener); events_register_object_handler(CITYLIFE_NAME, eventListener); settings->hooks_filename[settings->hooks_count] = ".citylife"; @@ -426,6 +428,9 @@ extern "C" void citylife_close() { + events_unregister_global_handler(EVENT_CLOCK, c); + events_unregister_global_handler(EVENT_MAPLOAD, m); + events_unregister_object_handler(CITYLIFE_NAME); for (auto map : maps) { delete map.second; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-27 17:22:42
|
Revision: 22103 http://sourceforge.net/p/crossfire/code/22103 Author: ryo_saeba Date: 2021-04-27 17:22:35 +0000 (Tue, 27 Apr 2021) Log Message: ----------- Allow modules to be enabled or disabled by default. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/common/init.c server/trunk/include/global.h server/trunk/server/init.c Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-27 17:19:54 UTC (rev 22102) +++ server/trunk/ChangeLog 2021-04-27 17:22:35 UTC (rev 22103) @@ -1,3 +1,8 @@ +2021-04-27 Nicolas Weeger + * common/init.c, + * include/global.h, + * server/init.c: Allow modules to be enabled or disabled by default. + 2021-04-21 Daniel Hawkins * include/shared/newclient.h, server/c_misc.c, Modified: server/trunk/common/init.c =================================================================== --- server/trunk/common/init.c 2021-04-27 17:19:54 UTC (rev 22102) +++ server/trunk/common/init.c 2021-04-27 17:22:35 UTC (rev 22103) @@ -94,7 +94,6 @@ .hooks_count = 0, .ignore_assets_errors = 0, .archetypes_tracker = NULL, - .disabled_modules = NULL, }; struct Statistics statistics; Modified: server/trunk/include/global.h =================================================================== --- server/trunk/include/global.h 2021-04-27 17:19:54 UTC (rev 22102) +++ server/trunk/include/global.h 2021-04-27 17:22:35 UTC (rev 22103) @@ -320,7 +320,6 @@ uint8_t max_stat; /**< Maximum stat value - 255 should be sufficient */ uint8_t special_break_map; /**< If set, then submaps in random maps can break the walls. */ linked_char *disabled_plugins; /**< List of disabled plugins, 'All' means all. */ - linked_char *disabled_modules; /**< List of disabled modules, 'All' means all. */ uint8_t ignore_plugin_compatibility; /**< If set, don't check plugin version. */ uint8_t account_block_create; /** Block account creation for untrusted hosts. */ char* account_trusted_host; /**< Trusted host for account creation, defaults to 127.0.0.1. */ Modified: server/trunk/server/init.c =================================================================== --- server/trunk/server/init.c 2021-04-27 17:19:54 UTC (rev 22102) +++ server/trunk/server/init.c 2021-04-27 17:22:35 UTC (rev 22103) @@ -43,9 +43,10 @@ /** If set after command line argument parsing, then the server will exit. */ static int should_exit = 0; -typedef struct { +typedef struct module_information { const char *name; /**< Module name, without space. */ char const *description; /**< Module long description. */ + bool enabled; /**< Whether the module is enabled or not. */ void (*init)(); /**< Initialisation function. */ void (*close)(); /**< Cleanup function. */ } module_information; @@ -52,37 +53,23 @@ /** All built modules. */ static module_information modules[] = { - { "citybell", "Ring bells every hour for defined temples", cfcitybell_init, cfcitybell_close }, - { "citylife", "Add NPCs in towns", citylife_init, citylife_close }, + { "citybell", "Ring bells every hour for defined temples", true, cfcitybell_init, cfcitybell_close }, + { "citylife", "Add NPCs in towns", true, citylife_init, citylife_close }, { NULL, NULL, NULL } }; /** - * Check whether a module is disabled or not. - * @param settings game settings. - * @param name module name. - * @return 1 if module is disabled, 0 else. - */ -static int module_disabled(const Settings *settings, const char *name) { - for (linked_char *disabled = settings->disabled_modules; disabled != NULL; disabled = disabled->next) { - if (strcmp(disabled->name, "All") == 0 || strcmp(disabled->name, name) == 0) { - return 1; - } - } - return 0; -} - -/** * Init all modules which are not disabled. */ void init_modules() { LOG(llevInfo, "Initializing modules\n"); for (int module = 0; modules[module].name != NULL; module++) { - if (module_disabled(&settings, modules[module].name)) { - LOG(llevInfo, " %s (%s): disabled\n", modules[module].name, modules[module].description); + module_information *mod = &modules[module]; + if (!mod->enabled) { + LOG(llevInfo, " %s (%s): disabled\n", mod->name, mod->description); } else { - modules[module].init(&settings); - LOG(llevInfo, " %s (%s): activated\n", modules[module].name, modules[module].description); + mod->init(&settings); + LOG(llevInfo, " %s (%s): activated\n", mod->name, mod->description); } } } @@ -93,9 +80,10 @@ void close_modules() { LOG(llevInfo, "Cleaning modules\n"); for (int module = 0; modules[module].name != NULL; module++) { - if (!module_disabled(&settings, modules[module].name)) { - modules[module].close(&settings); - LOG(llevInfo, " %s (%s): closed\n", modules[module].name, modules[module].description); + module_information *mod = &modules[module]; + if (mod->enabled) { + mod->close(&settings); + LOG(llevInfo, " %s (%s): closed\n", mod->name, mod->description); } } } @@ -106,7 +94,7 @@ static void list_modules() { LOG(llevInfo, "Built-in modules:\n"); for (int module = 0; modules[module].name != NULL; module++) { - LOG(llevInfo, " %s: %s\n", modules[module].name, modules[module].description); + LOG(llevInfo, " %s: %s -> %s\n", modules[module].name, modules[module].description, modules[module].enabled ? "enabled" : "disabled"); } should_exit = 1; } @@ -307,17 +295,42 @@ } /** + * Change the 'enabled' flag of a module. + * @param name module's name, or 'All'. + * @param enabled new value of the 'enabled' flag. + * @note will fatal() if the module name is invalid. + */ +static void do_module(const char *name, bool enabled) { + bool one = false; + for (int module = 0; modules[module].name; module++) { + if (strcmp("All", name) == 0 || strcmp(modules[module].name, name) == 0) { + modules[module].enabled = enabled; + one = true; + } + } + if (!one) { + LOG(llevError, "Invalid module name %s\n", name); + fatal(SEE_LAST_ERROR); + } +} + +/** * Disable a module. - * @param name module's name. + * @param name module's name, or 'All'. */ static void set_disable_module(const char *name) { - linked_char *disable = calloc(1, sizeof(linked_char)); - disable->next = settings.disabled_modules; - disable->name = strdup(name); - settings.disabled_modules = disable; + do_module(name, false); } /** + * Enable a module. + * @param name module's name, or 'All'. + */ +static void set_enable_module(const char *name) { + do_module(name, true); +} + +/** * Dump all animations, then exit. */ static void server_dump_animations(void) { @@ -372,6 +385,7 @@ { "-data", 1, 1, set_datadir }, { "-disable-plugin", 1, 1, set_disable_plugin }, { "-disable-module", 1, 1, set_disable_module }, + { "-enable-module", 1, 1, set_enable_module }, { "-list-modules", 0, 1, list_modules }, { "-h", 0, 1, help }, { "-ignore-assets-errors", 0, 1, set_ignore_assets_errors }, @@ -1156,6 +1170,9 @@ printf(" -disable-module\n" " Disable specified module, by its name\n" " Can be specified multiple times. 'All' disables all modules.\n"); + printf(" -enable-module\n" + " Enable specified module, by its name\n" + " Can be specified multiple times. 'All' enables all modules.\n"); printf(" -disable-plugin\n" " Disables specified plugin. Use the name without the extension.\n" " Can be specified multiple times. 'All' disables all plugins.\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-27 17:19:56
|
Revision: 22102 http://sourceforge.net/p/crossfire/code/22102 Author: ryo_saeba Date: 2021-04-27 17:19:54 +0000 (Tue, 27 Apr 2021) Log Message: ----------- Optimise CRE display. Modified Paths: -------------- server/trunk/utils/cre/CRECombatSimulator.cpp server/trunk/utils/cre/CREFormulaePanel.cpp server/trunk/utils/cre/CREMainWindow.cpp server/trunk/utils/cre/CREMapInformationManager.cpp server/trunk/utils/cre/CREMapPanel.cpp server/trunk/utils/cre/CREScriptPanel.cpp Modified: server/trunk/utils/cre/CRECombatSimulator.cpp =================================================================== --- server/trunk/utils/cre/CRECombatSimulator.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CRECombatSimulator.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -5,6 +5,8 @@ #include <global.h> #include <sproto.h> } +#include "assets.h" +#include "AssetsManager.h" CRECombatSimulator::CRECombatSimulator() { @@ -19,8 +21,7 @@ mySecond = new QComboBox(this); layout->addWidget(mySecond, line++, 1); - archetype* arch = get_next_archetype(NULL); - while (arch) + getManager()->archetypes()->each([this] (archetype *arch) { if (arch->head == NULL && QUERY_FLAG(&arch->clone, FLAG_MONSTER)) { @@ -27,8 +28,7 @@ myFirst->addItem(CREPixmap::getIcon(arch->clone.face->number), arch->name, qVariantFromValue((void*)arch)); mySecond->addItem(CREPixmap::getIcon(arch->clone.face->number), arch->name, qVariantFromValue((void*)arch)); } - arch = get_next_archetype(arch); - } + }); layout->addWidget(new QLabel(tr("Number of fights:"), this), line, 0); myCombats = new QSpinBox(this); Modified: server/trunk/utils/cre/CREFormulaePanel.cpp =================================================================== --- server/trunk/utils/cre/CREFormulaePanel.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CREFormulaePanel.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -5,6 +5,8 @@ #include "global.h" #include "recipe.h" } +#include "assets.h" +#include "AssetsManager.h" #include "CREFormulaePanel.h" #include "CREUtils.h" @@ -50,16 +52,15 @@ mySkill->addItem(tr("(none)"), 0); myCauldron->addItem(tr("(none)"), 0); - archt* arch = get_next_archetype(NULL); - for (; arch; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([this] (archetype *arch) { if (arch->head) - continue; + return; if (arch->clone.type == SKILL) mySkill->addItem(arch->clone.name); if (QUERY_FLAG(&arch->clone, FLAG_IS_CAULDRON)) myCauldron->addItem(arch->name); - } + }); layout->addWidget(new QLabel(tr("Index:"), this), 9, 1); myIndex = new QLineEdit(this); Modified: server/trunk/utils/cre/CREMainWindow.cpp =================================================================== --- server/trunk/utils/cre/CREMainWindow.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CREMainWindow.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -554,11 +554,9 @@ QStringList spell; QList<QStringList> damage; - archetype* arch = get_next_archetype(NULL); object* caster = create_archetype("orc"); - int dm, cost; - while (arch != NULL) + getManager()->archetypes()->each([&caster, &spell, &damage] (archetype *arch) { if (arch->clone.type == SPELL && arch->clone.subtype == SP_BULLET && arch->clone.skill && strcmp(arch->clone.skill, "praying") == 0) { @@ -567,15 +565,14 @@ for (int l = 0; l < settings.max_level; l++) { caster->level = l; - dm = arch->clone.stats.dam + SP_level_dam_adjust(caster, &arch->clone); - cost = SP_level_spellpoint_cost(caster, &arch->clone, SPELL_GRACE); + int dm = arch->clone.stats.dam + SP_level_dam_adjust(caster, &arch->clone); + int cost = SP_level_spellpoint_cost(caster, &arch->clone, SPELL_GRACE); dam.append(tr("%1 [%2]").arg(dm).arg(cost)); } damage.append(dam); } + }); - arch = get_next_archetype(arch); - } object_free_drop_inventory(caster); QString report("<table><thead><tr><th>level</th>"); @@ -689,13 +686,11 @@ { QStringList skills; - archt* arch = get_next_archetype(NULL); - for (; arch; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([&skills] (const auto arch) { if (arch->clone.type == SKILL) skills.append(arch->clone.name); - } - + }); skills.sort(); QString report("<h1>Alchemy formulae</h1>"); @@ -823,16 +818,13 @@ QHash<int, QStringList> spells; - archetype* spell; - - for (spell = get_next_archetype(NULL); spell; spell = get_next_archetype(spell)) - { + getManager()->archetypes()->each([&skill, &spells, &one] (const archetype *spell) { if (spell->clone.type == SPELL && spell->clone.skill == skill) { spells[spell->clone.level].append(QString("<tr><td>%1</td><td>%2</td></tr>").arg(spell->clone.name).arg(spell->clone.level)); one = true; } - } + }); if (!one) return QString(); @@ -841,6 +833,7 @@ qSort(levels); foreach(int level, levels) { + spells[level].sort(); report += spells[level].join("\n"); } @@ -853,12 +846,11 @@ { QStringList skills; - archt* arch = get_next_archetype(NULL); - for (; arch; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([&skills] (const archt *arch) { if (arch->clone.type == SKILL) skills.append(arch->clone.name); - } + }); skills.sort(); @@ -1107,8 +1099,7 @@ QMap<QString, archetype*> monsters; QList<archetype*> skills; - archt* arch = get_next_archetype(NULL); - for (; arch; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([&names, &monsters, &skills] (archetype *arch) { if (QUERY_FLAG(&arch->clone, FLAG_MONSTER) && arch->clone.stats.hp > 0 && arch->head == NULL) { @@ -1128,10 +1119,10 @@ if (arch->clone.type == SKILL && IS_COMBAT_SKILL(arch->clone.subtype)) { if (strcmp(arch->name, "skill_missile_weapon") == 0 || strcmp(arch->name, "skill_throwing") == 0) - continue; + return; skills.append(arch); } - } + }); names = monsters.keys(); names.sort(); @@ -1249,30 +1240,30 @@ QMap<QString, QString> spells; - for (archetype* summon = get_next_archetype(NULL); summon; summon = get_next_archetype(summon)) + getManager()->archetypes()->each([&spells] (archetype *summon) { if (summon->clone.type != SPELL || summon->clone.subtype != SP_SUMMON_GOLEM) - continue; + return; if (summon->clone.other_arch != NULL) { spells[summon->clone.name] = reportSummon(summon, &summon->clone.other_arch->clone, QString(summon->clone.name)); - continue; + return; } // god-based summoning - for (archetype* god = get_next_archetype(NULL); god; god = get_next_archetype(god)) + getManager()->archetypes()->each([&summon, &spells] (archetype *god) { if (god->clone.type != GOD) - continue; + return; QString name(QString(summon->clone.name) + " (" + QString(god->name) + ")"); archetype* holy = determine_holy_arch(&god->clone, summon->clone.race); if (holy == NULL) - continue; + return; spells[name] = reportSummon(summon, &holy->clone, name); - } - } + }); + }); QStringList keys = spells.keys(); keys.sort(); Modified: server/trunk/utils/cre/CREMapInformationManager.cpp =================================================================== --- server/trunk/utils/cre/CREMapInformationManager.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CREMapInformationManager.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -14,6 +14,8 @@ extern "C" { #include "global.h" } +#include "assets.h" +#include "AssetsManager.h" const char* eventNames[NR_EVENTS] = { "EVENT_NONE", @@ -306,12 +308,11 @@ /* try to find race-specific start maps */ if (first_map_ext_path[0] != 0) { - char path[MAX_BUF], name[MAX_BUF]; - archetype* arch = get_next_archetype(NULL); - while (arch) + getManager()->archetypes()->each([this] (archetype *arch) { if (arch->clone.type == PLAYER) { + char path[MAX_BUF], name[MAX_BUF]; snprintf(name, sizeof(name), "%s/%s", first_map_ext_path, arch->name); create_pathname(name, path, sizeof(path)); if (QFileInfo(path).exists()) { @@ -318,8 +319,7 @@ myToProcess.append(name); } } - arch = get_next_archetype(arch); - } + }); } /* Add style maps */ Modified: server/trunk/utils/cre/CREMapPanel.cpp =================================================================== --- server/trunk/utils/cre/CREMapPanel.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CREMapPanel.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -8,6 +8,8 @@ extern "C" { #include "define.h" } +#include "assets.h" +#include "AssetsManager.h" static QHash<QString, archetype*> events; @@ -18,13 +20,13 @@ return; } - for (archt* arch = get_next_archetype(NULL); arch != NULL; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([] (archetype *arch) { if (arch->clone.type == EVENT_CONNECTOR) { events.insert(arch->name, arch); } - } + }); } CREMapPanel::CREMapPanel(ScriptFileManager* manager, QWidget* parent) : CRETPanel(parent) Modified: server/trunk/utils/cre/CREScriptPanel.cpp =================================================================== --- server/trunk/utils/cre/CREScriptPanel.cpp 2021-04-26 04:24:45 UTC (rev 22101) +++ server/trunk/utils/cre/CREScriptPanel.cpp 2021-04-27 17:19:54 UTC (rev 22102) @@ -8,6 +8,8 @@ extern "C" { #include "define.h" } +#include "assets.h" +#include "AssetsManager.h" static QHash<QString, archetype*> events; @@ -18,13 +20,13 @@ return; } - for (archt* arch = get_next_archetype(NULL); arch != NULL; arch = get_next_archetype(arch)) + getManager()->archetypes()->each([] (archetype *arch) { if (arch->clone.type == EVENT_CONNECTOR) { events.insert(arch->name, arch); } - } + }); } CREScriptPanel::CREScriptPanel(QWidget* parent) : CRETPanel(parent) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-26 04:24:47
|
Revision: 22101 http://sourceforge.net/p/crossfire/code/22101 Author: silvernexus Date: 2021-04-26 04:24:45 +0000 (Mon, 26 Apr 2021) Log Message: ----------- Fix missing face for big galleon in classic face set. Modified Paths: -------------- arch/trunk/ChangeLog Added Paths: ----------- arch/trunk/transport/biggalleon.clsc.x71.png Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-24 14:41:44 UTC (rev 22100) +++ arch/trunk/ChangeLog 2021-04-26 04:24:45 UTC (rev 22101) @@ -1,3 +1,7 @@ +Fix animation issue from a missing face in the classic faceset for big galleon. +transport/biggalleon.clsc.x71.png +Daniel Hawkins 2021-04-26 + New art to override the default corpse art for zombies and goblin. Added copies of classic corpse image so that image set gets a consistent corpse. flesh/goblin/goblin_corpse.* Added: arch/trunk/transport/biggalleon.clsc.x71.png =================================================================== (Binary files differ) Index: arch/trunk/transport/biggalleon.clsc.x71.png =================================================================== --- arch/trunk/transport/biggalleon.clsc.x71.png 2021-04-24 14:41:44 UTC (rev 22100) +++ arch/trunk/transport/biggalleon.clsc.x71.png 2021-04-26 04:24:45 UTC (rev 22101) Property changes on: arch/trunk/transport/biggalleon.clsc.x71.png ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-24 14:41:50
|
Revision: 22100 http://sourceforge.net/p/crossfire/code/22100 Author: silvernexus Date: 2021-04-24 14:41:44 +0000 (Sat, 24 Apr 2021) Log Message: ----------- Additional art for goblin and zombie corpses. Modified Paths: -------------- arch/trunk/ChangeLog Added Paths: ----------- arch/trunk/flesh/goblin/goblin_corpse.base.111.png arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png arch/trunk/flesh/goblin/goblin_corpse.face arch/trunk/flesh/misc/zombie_corpse.base.111.png arch/trunk/flesh/misc/zombie_corpse.clsc.111.png arch/trunk/flesh/misc/zombie_corpse.face Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-23 17:35:52 UTC (rev 22099) +++ arch/trunk/ChangeLog 2021-04-24 14:41:44 UTC (rev 22100) @@ -1,3 +1,9 @@ +New art to override the default corpse art for zombies and goblin. +Added copies of classic corpse image so that image set gets a consistent corpse. +flesh/goblin/goblin_corpse.* +flesh/misc/zombie_corpse.* +Daniel Hawkins 2021-04-24 + Rename and move the treasurelist for human bodyparts. Patch https://sourceforge.net/p/crossfire/patches/393/ monster/humanoid/Arabic/a_priest.trs Added: arch/trunk/flesh/goblin/goblin_corpse.base.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/goblin/goblin_corpse.base.111.png =================================================================== --- arch/trunk/flesh/goblin/goblin_corpse.base.111.png 2021-04-23 17:35:52 UTC (rev 22099) +++ arch/trunk/flesh/goblin/goblin_corpse.base.111.png 2021-04-24 14:41:44 UTC (rev 22100) Property changes on: arch/trunk/flesh/goblin/goblin_corpse.base.111.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png =================================================================== --- arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png 2021-04-23 17:35:52 UTC (rev 22099) +++ arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png 2021-04-24 14:41:44 UTC (rev 22100) Property changes on: arch/trunk/flesh/goblin/goblin_corpse.clsc.111.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/goblin/goblin_corpse.face =================================================================== --- arch/trunk/flesh/goblin/goblin_corpse.face (rev 0) +++ arch/trunk/flesh/goblin/goblin_corpse.face 2021-04-24 14:41:44 UTC (rev 22100) @@ -0,0 +1,3 @@ +face goblin_corpse.111 +magicmap white +end Property changes on: arch/trunk/flesh/goblin/goblin_corpse.face ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: arch/trunk/flesh/misc/zombie_corpse.base.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/misc/zombie_corpse.base.111.png =================================================================== --- arch/trunk/flesh/misc/zombie_corpse.base.111.png 2021-04-23 17:35:52 UTC (rev 22099) +++ arch/trunk/flesh/misc/zombie_corpse.base.111.png 2021-04-24 14:41:44 UTC (rev 22100) Property changes on: arch/trunk/flesh/misc/zombie_corpse.base.111.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/misc/zombie_corpse.clsc.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/misc/zombie_corpse.clsc.111.png =================================================================== --- arch/trunk/flesh/misc/zombie_corpse.clsc.111.png 2021-04-23 17:35:52 UTC (rev 22099) +++ arch/trunk/flesh/misc/zombie_corpse.clsc.111.png 2021-04-24 14:41:44 UTC (rev 22100) Property changes on: arch/trunk/flesh/misc/zombie_corpse.clsc.111.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: arch/trunk/flesh/misc/zombie_corpse.face =================================================================== --- arch/trunk/flesh/misc/zombie_corpse.face (rev 0) +++ arch/trunk/flesh/misc/zombie_corpse.face 2021-04-24 14:41:44 UTC (rev 22100) @@ -0,0 +1,3 @@ +face zombie_corpse.111 +magicmap white +end Property changes on: arch/trunk/flesh/misc/zombie_corpse.face ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-23 17:35:59
|
Revision: 22099 http://sourceforge.net/p/crossfire/code/22099 Author: ryo_saeba Date: 2021-04-23 17:35:52 +0000 (Fri, 23 Apr 2021) Log Message: ----------- Use renamed treasure list for humans. Patch https://sourceforge.net/p/crossfire/patches/393/ by DraugTheWhopper. Modified Paths: -------------- maps/trunk/ChangeLog maps/trunk/brest/brest.scrolls.right maps/trunk/unlinked/zornstuff/zornstuff.NOT.a.map Modified: maps/trunk/ChangeLog =================================================================== --- maps/trunk/ChangeLog 2021-04-23 17:34:10 UTC (rev 22098) +++ maps/trunk/ChangeLog 2021-04-23 17:35:52 UTC (rev 22099) @@ -1,3 +1,8 @@ +2021-04-23 DraugTheWhopper + * brest/brest.scrolls.right, + * unlinked/zornstuff/zornstuff.NOT.a.map: Use renamed treasure list for humans. + Patch https://sourceforge.net/p/crossfire/patches/393/ + 2021-04-20 Nicolas Weeger * world.citylife: Add city life definition file. Modified: maps/trunk/brest/brest.scrolls.right =================================================================== --- maps/trunk/brest/brest.scrolls.right 2021-04-23 17:34:10 UTC (rev 22098) +++ maps/trunk/brest/brest.scrolls.right 2021-04-23 17:35:52 UTC (rev 22099) @@ -4941,7 +4941,7 @@ resist_blind 75 path_attuned 607 carrying 53700 -randomitems human_parts +randomitems humanoid_parts pick_up 1 see_invisible 1 hitback 1 Modified: maps/trunk/unlinked/zornstuff/zornstuff.NOT.a.map =================================================================== --- maps/trunk/unlinked/zornstuff/zornstuff.NOT.a.map 2021-04-23 17:34:10 UTC (rev 22098) +++ maps/trunk/unlinked/zornstuff/zornstuff.NOT.a.map 2021-04-23 17:35:52 UTC (rev 22099) @@ -908,7 +908,7 @@ resist_blind 75 path_attuned 607 carrying 53700 -randomitems human_parts +randomitems humanoid_parts pick_up 1 see_invisible 1 hitback 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-23 17:34:13
|
Revision: 22098 http://sourceforge.net/p/crossfire/code/22098 Author: ryo_saeba Date: 2021-04-23 17:34:10 +0000 (Fri, 23 Apr 2021) Log Message: ----------- Rename and move the treasurelist for human bodyparts. Patch https://sourceforge.net/p/crossfire/patches/393/ by DraugTheWhopper. Modified Paths: -------------- arch/trunk/ChangeLog arch/trunk/monster/humanoid/Arabic/a_priest.trs arch/trunk/monster/humanoid/Arabic/holy_priest.trs arch/trunk/monster/humanoid/Arabic/slave.trs arch/trunk/monster/humanoid/Human/evilclown.trs arch/trunk/monster/humanoid/Human/postman/postman.trs arch/trunk/monster/humanoid/Human/sage.trs arch/trunk/monster/misc/c_knight.trs arch/trunk/monster/misc/c_priest.trs arch/trunk/treasures.trs Added Paths: ----------- arch/trunk/monster/humanoid/humanoid.trs Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/ChangeLog 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,3 +1,16 @@ +Rename and move the treasurelist for human bodyparts. +Patch https://sourceforge.net/p/crossfire/patches/393/ +monster/humanoid/Arabic/a_priest.trs +monster/humanoid/Arabic/holy_priest.trs +monster/humanoid/Arabic/slave.trs +monster/humanoid/Human/evilclown.trs +monster/humanoid/Human/postman/postman.trs +monster/humanoid/Human/sage.trs +monster/misc/c_knight.trs +monster/misc/c_priest.trs +treasures.trs +DraugTheWhopper + Clean up formatting in formulae file. Patch https://sourceforge.net/p/crossfire/patches/394/ formulae Modified: arch/trunk/monster/humanoid/Arabic/a_priest.trs =================================================================== --- arch/trunk/monster/humanoid/Arabic/a_priest.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Arabic/a_priest.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,7 +1,7 @@ treasure a_priest list all_spell_skills more - list human_parts + list humanoid_parts chance 20 more arch spell_paralyze Modified: arch/trunk/monster/humanoid/Arabic/holy_priest.trs =================================================================== --- arch/trunk/monster/humanoid/Arabic/holy_priest.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Arabic/holy_priest.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,7 +1,7 @@ treasure holy_priest list all_spell_skills more - list human_parts + list humanoid_parts more arch spell_paralyze more Modified: arch/trunk/monster/humanoid/Arabic/slave.trs =================================================================== --- arch/trunk/monster/humanoid/Arabic/slave.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Arabic/slave.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,5 +1,5 @@ treasure slave - list human_parts + list humanoid_parts chance 20 more arch turban Modified: arch/trunk/monster/humanoid/Human/evilclown.trs =================================================================== --- arch/trunk/monster/humanoid/Human/evilclown.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Human/evilclown.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,5 +1,5 @@ treasure evilclown - list human_parts + list humanoid_parts chance 50 more arch spell_ball_lightning Modified: arch/trunk/monster/humanoid/Human/postman/postman.trs =================================================================== --- arch/trunk/monster/humanoid/Human/postman/postman.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Human/postman/postman.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,7 +1,7 @@ treasure postman arch skill_use_magic_item more - list human_parts + list humanoid_parts chance 20 more arch letter Modified: arch/trunk/monster/humanoid/Human/sage.trs =================================================================== --- arch/trunk/monster/humanoid/Human/sage.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/humanoid/Human/sage.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -9,6 +9,6 @@ arch skill_jeweler end more - list human_parts + list humanoid_parts end Added: arch/trunk/monster/humanoid/humanoid.trs =================================================================== --- arch/trunk/monster/humanoid/humanoid.trs (rev 0) +++ arch/trunk/monster/humanoid/humanoid.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -0,0 +1,42 @@ +# humanoid body parts +# careful, some humanoids should not use this list. (cyclops have only one eye!) +treasureone humanoid_parts + arch fl_corpse + chance 60 + more + arch arm + nrof 2 + chance 15 + more + arch leg + nrof 2 + chance 15 + more + arch head + chance 15 + more + arch eye + nrof 2 + chance 1 + more + arch tongue + chance 1 + more + arch foot + nrof 2 + chance 10 + more + arch hand + nrof 2 + chance 10 + more + arch finger + nrof 5 + chance 3 + more + arch skin + chance 1 + more + arch brain + chance 1 + end \ No newline at end of file Modified: arch/trunk/monster/misc/c_knight.trs =================================================================== --- arch/trunk/monster/misc/c_knight.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/misc/c_knight.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,7 +1,7 @@ treasure c_knight arch skill_use_magic_item more - list human_parts + list humanoid_parts more arch sword_2 magic 3 Modified: arch/trunk/monster/misc/c_priest.trs =================================================================== --- arch/trunk/monster/misc/c_priest.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/monster/misc/c_priest.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -1,7 +1,7 @@ treasure c_m_priest list all_spell_skills more - list human_parts + list humanoid_parts more arch staff magic 1 @@ -43,7 +43,7 @@ treasure c_priest list all_spell_skills more - list human_parts + list humanoid_parts more arch staff magic 3 Modified: arch/trunk/treasures.trs =================================================================== --- arch/trunk/treasures.trs 2021-04-23 17:30:58 UTC (rev 22097) +++ arch/trunk/treasures.trs 2021-04-23 17:34:10 UTC (rev 22098) @@ -36,52 +36,6 @@ arch skill_summoning end # -############################################################## -# -# BODY PARTS - -# -# human/man-sized body parts -treasureone human_parts - arch fl_corpse - chance 60 - more - arch arm - nrof 2 - chance 15 - more - arch leg - nrof 2 - chance 15 - more - arch head - chance 15 - more - arch eye - nrof 2 - chance 1 - more - arch tongue - chance 1 - more - arch foot - nrof 2 - chance 10 - more - arch hand - nrof 2 - chance 10 - more - arch finger - nrof 5 - chance 3 - more - arch skin - chance 1 - more - arch brain - chance 1 - end -# treasure door list traps chance 30 @@ -1794,7 +1748,7 @@ treasure rich list rich_old more - list human_parts + list humanoid_parts chance 20 end treasure standard @@ -1807,13 +1761,13 @@ nrof 3 chance 1 more - list human_parts + list humanoid_parts chance 20 end treasure poor list poor_old more - list human_parts + list humanoid_parts chance 20 end # I switched the names to '_old' -- these lists This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-23 17:31:00
|
Revision: 22097 http://sourceforge.net/p/crossfire/code/22097 Author: ryo_saeba Date: 2021-04-23 17:30:58 +0000 (Fri, 23 Apr 2021) Log Message: ----------- Clean up formatting in formulae file. Patch https://sourceforge.net/p/crossfire/patches/394/ by DraugTheWhopper. Modified Paths: -------------- arch/trunk/ChangeLog arch/trunk/formulae Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-23 17:28:47 UTC (rev 22096) +++ arch/trunk/ChangeLog 2021-04-23 17:30:58 UTC (rev 22097) @@ -1,3 +1,8 @@ +Clean up formatting in formulae file. +Patch https://sourceforge.net/p/crossfire/patches/394/ +formulae +DraugTheWhopper + Updated docs pointers and added more relevant info. Axed some deprecated info. Patch https://sourceforge.net/p/crossfire/patches/392/ README Modified: arch/trunk/formulae =================================================================== --- arch/trunk/formulae 2021-04-23 17:28:47 UTC (rev 22096) +++ arch/trunk/formulae 2021-04-23 17:30:58 UTC (rev 22097) @@ -2185,7 +2185,6 @@ cauldron workbench ingred 20 arrow,dragon's heart,water of emerald,scorpion's stinger # -# Object Assassinating Trolls arch bolt chance 0 @@ -2197,7 +2196,6 @@ cauldron workbench ingred 20 bolt,troll's heart,scorpion's stinger # -# Object Assassinating Trolls arch arrow chance 0 @@ -2209,7 +2207,6 @@ cauldron workbench ingred 20 arrow,troll's heart,scorpion's stinger # -# Object Blessedness arch bolt chance 0 @@ -2221,7 +2218,6 @@ cauldron workbench ingred 20 bolt,unicorn horn,2 water of sapphire # -# Object Blessedness arch arrow chance 0 @@ -2233,7 +2229,6 @@ cauldron workbench ingred 20 arrow,unicorn horn,2 water of sapphire # -# Object Magic arch arrow chance 4 @@ -2245,7 +2240,6 @@ cauldron workbench ingred 20 arrow,potion of mystic power # -# Object Magic arch bolt chance 4 @@ -2257,7 +2251,6 @@ cauldron workbench ingred 20 bolt,potion of mystic power # -# Object Fire arch arrow chance 4 @@ -2269,7 +2262,6 @@ cauldron workbench ingred 20 arrow,wyvern's steak # -# Object Fire arch bolt chance 4 @@ -2281,7 +2273,6 @@ cauldron workbench ingred 20 bolt,wyvern's steak # -# Object Frost arch arrow chance 4 @@ -2293,7 +2284,6 @@ cauldron workbench ingred 20 arrow,ghost's ectoplasm # -# Object Frost arch bolt chance 4 @@ -2305,7 +2295,6 @@ cauldron workbench ingred 20 bolt,ghost's ectoplasm # -# Object Lightning arch arrow chance 4 @@ -2317,7 +2306,6 @@ cauldron workbench ingred 20 arrow,skull's tooth # -# Object Lightning arch bolt chance 4 @@ -2329,7 +2317,6 @@ cauldron workbench ingred 20 bolt,skull's tooth # -# Object Paralysis arch arrow chance 4 @@ -2341,7 +2328,6 @@ cauldron workbench ingred 20 arrow,beholdereye # -# Object Paralysis arch bolt chance 4 @@ -2353,7 +2339,6 @@ cauldron workbench ingred 20 bolt,beholdereye # -# Object Poison arch arrow chance 4 @@ -2365,7 +2350,6 @@ cauldron workbench ingred 20 arrow,scorpion's stinger # -# Object Poison arch bolt chance 4 @@ -4279,7 +4263,6 @@ chance 0 combination 1 tool file - # # gem combos Object NONE @@ -4291,6 +4274,7 @@ cauldron thaumaturg_desk diff 2 exp 2000 +# Object great value arch gem yield 1 @@ -4300,7 +4284,7 @@ cauldron jeweler_bench diff 2 exp 2000 - +# Object NONE arch raw_diamond_exceptional_beauty yield 1 @@ -4310,6 +4294,7 @@ cauldron thaumaturg_desk diff 6 exp 6000 +# Object exceptional beauty arch gem yield 1 @@ -4319,7 +4304,7 @@ cauldron jeweler_bench diff 6 exp 6000 - +# Object NONE arch raw_diamond_flawless_beauty yield 1 @@ -4329,6 +4314,7 @@ cauldron thaumaturg_desk diff 12 exp 12000 +# Object flawless beauty arch gem yield 1 @@ -4338,7 +4324,7 @@ cauldron jeweler_bench diff 12 exp 12000 - +# Object NONE arch raw_ruby_great_value yield 1 @@ -4348,6 +4334,7 @@ cauldron thaumaturg_desk diff 2 exp 2000 +# Object great value arch ruby yield 1 @@ -4357,7 +4344,7 @@ cauldron jeweler_bench diff 2 exp 2000 - +# Object NONE arch raw_ruby_exceptional_beauty yield 1 @@ -4367,6 +4354,7 @@ cauldron thaumaturg_desk diff 6 exp 6000 +# Object exceptional beauty arch ruby yield 1 @@ -4376,7 +4364,7 @@ cauldron jeweler_bench diff 6 exp 6000 - +# Object NONE arch raw_ruby_flawless_beauty yield 1 @@ -4386,6 +4374,7 @@ cauldron thaumaturg_desk diff 12 exp 12000 +# Object flawless beauty arch ruby yield 1 @@ -4395,7 +4384,7 @@ cauldron jeweler_bench diff 12 exp 12000 - +# Object NONE arch raw_sapphire_great_value yield 1 @@ -4405,6 +4394,7 @@ cauldron thaumaturg_desk diff 2 exp 2000 +# Object great value arch sapphire yield 1 @@ -4414,7 +4404,7 @@ cauldron jeweler_bench diff 2 exp 2000 - +# Object NONE arch raw_sapphire_exceptional_beauty yield 1 @@ -4424,6 +4414,7 @@ cauldron thaumaturg_desk diff 6 exp 6000 +# Object exceptional beauty arch sapphire yield 1 @@ -4433,7 +4424,7 @@ cauldron jeweler_bench diff 6 exp 6000 - +# Object NONE arch raw_sapphire_flawless_beauty yield 1 @@ -4443,6 +4434,7 @@ cauldron thaumaturg_desk diff 12 exp 12000 +# Object flawless beauty arch sapphire yield 1 @@ -4452,7 +4444,7 @@ cauldron jeweler_bench diff 12 exp 12000 - +# Object NONE arch raw_emerald_great_value yield 1 @@ -4462,6 +4454,7 @@ cauldron thaumaturg_desk diff 2 exp 2000 +# Object great value arch emerald yield 1 @@ -4471,7 +4464,7 @@ cauldron jeweler_bench diff 2 exp 2000 - +# Object NONE arch raw_emerald_exceptional_beauty yield 1 @@ -4481,6 +4474,7 @@ cauldron thaumaturg_desk diff 6 exp 6000 +# Object exceptional beauty arch emerald yield 1 @@ -4490,7 +4484,7 @@ cauldron jeweler_bench diff 6 exp 6000 - +# Object NONE arch raw_emerald_flawless_beauty yield 1 @@ -4500,6 +4494,7 @@ cauldron thaumaturg_desk diff 12 exp 12000 +# Object flawless beauty arch emerald yield 1 @@ -4509,8 +4504,7 @@ cauldron jeweler_bench diff 12 exp 12000 - - +# Object NONE arch raw_amethyst_great_value yield 1 @@ -4520,6 +4514,7 @@ cauldron thaumaturg_desk diff 2 exp 2000 +# Object great value arch amethyst yield 1 @@ -4529,7 +4524,7 @@ cauldron jeweler_bench diff 2 exp 2000 - +# Object NONE arch raw_amethyst_exceptional_beauty yield 1 @@ -4539,6 +4534,7 @@ cauldron thaumaturg_desk diff 6 exp 6000 +# Object exceptional beauty arch amethyst yield 1 @@ -4548,7 +4544,7 @@ cauldron jeweler_bench diff 6 exp 6000 - +# Object NONE arch raw_amethyst_flawless_beauty yield 1 @@ -4558,6 +4554,7 @@ cauldron thaumaturg_desk diff 12 exp 12000 +# Object flawless beauty arch amethyst yield 1 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-23 17:28:49
|
Revision: 22096 http://sourceforge.net/p/crossfire/code/22096 Author: ryo_saeba Date: 2021-04-23 17:28:47 +0000 (Fri, 23 Apr 2021) Log Message: ----------- Updated docs pointers and added more relevant info. Axed some deprecated info. Patch https://sourceforge.net/p/crossfire/patches/392/ by DraugTheWhopper Modified Paths: -------------- arch/trunk/ChangeLog arch/trunk/README arch/trunk/treasures.trs Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-22 19:21:48 UTC (rev 22095) +++ arch/trunk/ChangeLog 2021-04-23 17:28:47 UTC (rev 22096) @@ -1,3 +1,9 @@ +Updated docs pointers and added more relevant info. Axed some deprecated info. +Patch https://sourceforge.net/p/crossfire/patches/392/ +README +treasures.trs +DraugTheWhopper + New art for corpse. This should be easier to use as a base for making different corpse images for goblins, angels, etc. Moved old image to classic image set. Modified: arch/trunk/README =================================================================== --- arch/trunk/README 2021-04-22 19:21:48 UTC (rev 22095) +++ arch/trunk/README 2021-04-23 17:28:47 UTC (rev 22096) @@ -4,6 +4,15 @@ :numbered: :toc: +Introduction +------------ +This file contains general design notes about archetypes and faces. For more +technical details about how archetypes are handled inside the engine, see +'server/doc/Developers/objects' and 'server/doc/Developers/objects.dox'. + +Some bits of info like types and subtypes are defined in +'server/include/object.h'. + Item Attributes --------------- Correctly choosing item attributes is key to maintaining balance and fun. @@ -15,14 +24,23 @@ Weight ~~~~~~ Weights are given in integer grams, and should resemble those of real-life -counterparts to objects. Players should be able to carry at most 100 kg -(with limited exceptions for creatures such as dragons). Until this change -is implemented in the game itself, weight values should be multiplied by -ten. For example, an apple with a real-world weight of 0.1 kg should have a -weight value of 1000 in the archetype file. +counterparts to objects. You may find some objects do not follow this closely, +so examine similar objects to better judge what weight to set. For extremely +bulky objects, you can increase the weight a bit to simulate the difficulty of +carrying large objects. -Pixmaps +At one time, it was theorized that players would have a weight limit of about +100kg, but currently the balance is pretty far from this. +--DraugTheWhopper 4/20/2021 + +Images ------- +Images should generally be stored in PNG, optionally with indexed color. +You may find that server or clients still support XBM or XPM, but these are +considered deprecated. + +Pixmap support (deprecated) +~~~~~~~~~~~~~~~~~~~~~~~~~~~ The color bitmap files use the XPM library (called xpm-3.4f on most ftp sites. A later version may be out now.) Modified: arch/trunk/treasures.trs =================================================================== --- arch/trunk/treasures.trs 2021-04-22 19:21:48 UTC (rev 22095) +++ arch/trunk/treasures.trs 2021-04-23 17:28:47 UTC (rev 22096) @@ -7,8 +7,8 @@ # re-linking and generation of only 1 item on that list. This does away # with the treasure lists from being embedded in the program. # -# See the file doc/crossfire.doc for information on the format of this -# file +# See the file server/doc/Developers/treasure_list.dox for information on the +# format of this file # # #NOTE: GOD treasure lists have been moved out to the arches This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-22 19:21:49
|
Revision: 22095 http://sourceforge.net/p/crossfire/code/22095 Author: silvernexus Date: 2021-04-22 19:21:48 +0000 (Thu, 22 Apr 2021) Log Message: ----------- New art for corpse. Moved old art to classic image set. Modified Paths: -------------- arch/trunk/ChangeLog Added Paths: ----------- arch/trunk/flesh/human/corpse.base.111.png arch/trunk/flesh/human/corpse.clsc.111.png Removed Paths: ------------- arch/trunk/flesh/human/corpse.base.111.png Modified: arch/trunk/ChangeLog =================================================================== --- arch/trunk/ChangeLog 2021-04-22 02:10:11 UTC (rev 22094) +++ arch/trunk/ChangeLog 2021-04-22 19:21:48 UTC (rev 22095) @@ -1,3 +1,10 @@ +New art for corpse. +This should be easier to use as a base for making different corpse images for goblins, angels, etc. +Moved old image to classic image set. +flesh/human/corpse.base.111.png +flesh/human/corpse.clsc.111.png +Daniel Hawkins 2021-04-22 + Erase previously defined recipes. This solves duplicated recipes index warnings when 'make install' is done on the server while the 'arch' directory is symlinked to share. Deleted: arch/trunk/flesh/human/corpse.base.111.png =================================================================== (Binary files differ) Added: arch/trunk/flesh/human/corpse.base.111.png =================================================================== (Binary files differ) Index: arch/trunk/flesh/human/corpse.base.111.png =================================================================== --- arch/trunk/flesh/human/corpse.base.111.png 2021-04-22 02:10:11 UTC (rev 22094) +++ arch/trunk/flesh/human/corpse.base.111.png 2021-04-22 19:21:48 UTC (rev 22095) Property changes on: arch/trunk/flesh/human/corpse.base.111.png ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Copied: arch/trunk/flesh/human/corpse.clsc.111.png (from rev 22094, arch/trunk/flesh/human/corpse.base.111.png) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-22 02:10:15
|
Revision: 22094 http://sourceforge.net/p/crossfire/code/22094 Author: silvernexus Date: 2021-04-22 02:10:11 +0000 (Thu, 22 Apr 2021) Log Message: ----------- Allow for any strings sent through draw_ext_info() or draw_ext_info_format() to be translatable. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/include/shared/newclient.h server/trunk/server/c_misc.c server/trunk/server/c_wiz.c server/trunk/server/knowledge.c server/trunk/server/player.c server/trunk/server/server.c server/trunk/socket/info.c Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/ChangeLog 2021-04-22 02:10:11 UTC (rev 22094) @@ -1,3 +1,13 @@ +2021-04-21 Daniel Hawkins + * include/shared/newclient.h, + server/c_misc.c, + server/c_wiz.c, + server/knowledge.c, + server/server.c, + socket/info.c: Make draw_ext_info() and draw_ext_info_format() do i18n translation inside them, instead of + relying on the caller to do it. This makes adding strings to translations in the future significantly easier. + * server/player.c: Make calls to send_query() use a translatable string. + 2021-04-21 Nicolas Weeger * common/recipe.c, * include/libproto.h, Modified: server/trunk/include/shared/newclient.h =================================================================== --- server/trunk/include/shared/newclient.h 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/include/shared/newclient.h 2021-04-22 02:10:11 UTC (rev 22094) @@ -218,30 +218,33 @@ * be implicitly specified. */ /*@{*/ -#define NDI_BLACK 0 -#define NDI_WHITE 1 -#define NDI_NAVY 2 -#define NDI_RED 3 -#define NDI_ORANGE 4 -#define NDI_BLUE 5 /**< Actually, it is Dodger Blue */ -#define NDI_DK_ORANGE 6 /**< DarkOrange2 */ -#define NDI_GREEN 7 /**< SeaGreen */ -#define NDI_LT_GREEN 8 /**< DarkSeaGreen, which is actually paler - * than seagreen - also background color. */ -#define NDI_GREY 9 -#define NDI_BROWN 10 /**< Sienna. */ -#define NDI_GOLD 11 -#define NDI_TAN 12 /**< Khaki. */ -#define NDI_MAX_COLOR 12 /**< Last value in. */ +#define NDI_BLACK 0 +#define NDI_WHITE 1 +#define NDI_NAVY 2 +#define NDI_RED 3 +#define NDI_ORANGE 4 +#define NDI_BLUE 5 /**< Actually, it is Dodger Blue */ +#define NDI_DK_ORANGE 6 /**< DarkOrange2 */ +#define NDI_GREEN 7 /**< SeaGreen */ +#define NDI_LT_GREEN 8 /**< DarkSeaGreen, which is actually paler + * than seagreen - also background color. */ +#define NDI_GREY 9 +#define NDI_BROWN 10 /**< Sienna. */ +#define NDI_GOLD 11 +#define NDI_TAN 12 /**< Khaki. */ +#define NDI_MAX_COLOR 12 /**< Last value in. */ -#define NDI_COLOR_MASK 0xff /**< Gives lots of room for expansion - we are - * using an int anyways, so we have the - * space to still do all the flags. - */ -#define NDI_UNIQUE 0x100 /**< Print immediately, don't buffer. */ -#define NDI_ALL 0x200 /**< Inform all players of this message. */ -#define NDI_ALL_DMS 0x400 /**< Inform all logged in DMs. Used in case of - * errors. Overrides NDI_ALL. */ +#define NDI_COLOR_MASK 0xff /**< Gives lots of room for expansion - we are + * using an int anyways, so we have the + * space to still do all the flags. + */ +#define NDI_UNIQUE 0x100 /**< Print immediately, don't buffer. */ +#define NDI_ALL 0x200 /**< Inform all players of this message. */ +#define NDI_ALL_DMS 0x400 /**< Inform all logged in DMs. Used in case of + * errors. Overrides NDI_ALL. */ +#define NDI_NO_TRANSLATE 0x800 /**< Do not attempt to translate. + * Either it has been already translated or + * will not be translatable (e.g. say/chat/shout) */ /*@}*/ /** Modified: server/trunk/server/c_misc.c =================================================================== --- server/trunk/server/c_misc.c 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/server/c_misc.c 2021-04-22 02:10:11 UTC (rev 22094) @@ -52,14 +52,14 @@ static void map_info(object *op, const char *search) { if ( *search != 0 ) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, - i18n(op, "Maps matching search: '%s'"), search); + "Maps matching search: '%s'", search); } if (QUERY_FLAG(op, FLAG_WIZ)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, - i18n(op, "[fixed]Path Reset In (HH:MM:SS) Pl IM TO")); + "[fixed]Path Reset In (HH:MM:SS) Pl IM TO"); } else { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, - i18n(op, "[fixed]Path Reset In (HH:MM)")); + "[fixed]Path Reset In (HH:MM)"); } /* Allow a comma-separate list of search strings; more complicated because of the const */ @@ -109,12 +109,12 @@ if (QUERY_FLAG(op, FLAG_WIZ)) { draw_ext_info_format( NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, - i18n(op, "[fixed]%-26.26s %2d:%02d:%02d %2d %2d %4d"), + "[fixed]%-26.26s %2d:%02d:%02d %2d %2d %4d", map_path, hh, mm, ss, m->players, m->in_memory, m->timeout); } else { draw_ext_info_format( NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MAPS, - i18n(op, "[fixed]%-26.26s %2d:%02d%s"), map_path, hh, mm, + "[fixed]%-26.26s %2d:%02d%s", map_path, hh, mm, m->players ? " (in use)" : ""); } } @@ -137,9 +137,9 @@ if (*params == '\0' || (!strcmp(params, ""))) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Your current language is set to: English.")); + "Your current language is set to: English."); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Available languages:")); + "Available languages:"); i18n_list_languages(op); return; } @@ -149,7 +149,7 @@ /* Error out if unknown language. */ if (language == -1) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Unknown language.")); + "Unknown language."); return; } @@ -156,7 +156,7 @@ op->contr->language = language; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Your current language is set to English.")); + "Your current language is set to English."); } /** @@ -179,13 +179,13 @@ * give a description. */ draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "The first column is the name of the body location.")); + "The first column is the name of the body location."); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "The second column is how many of those locations your body has.")); + "The second column is how many of those locations your body has."); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "The third column is how many slots in that location are available.")); + "The third column is how many slots in that location are available."); for (i = 0; i < NUM_BODY_LOCATIONS; i++) { /* really debugging - normally body_used should not be set to anything @@ -193,16 +193,16 @@ */ if (op->body_info[i] || op->body_used[i]) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "[fixed]%-30s %5d %5d"), + "[fixed]%-30s %5d %5d", i18n(op, body_locations[i].use_name), op->body_info[i], op->body_used[i]); } } if (!QUERY_FLAG(op, FLAG_USE_ARMOUR)) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "You are not allowed to wear armor.")); + "You are not allowed to wear armor."); if (!QUERY_FLAG(op, FLAG_USE_WEAPON)) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_BODY, - i18n(op, "You are not allowed to use weapons.")); + "You are not allowed to use weapons."); } /** @@ -271,33 +271,33 @@ } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "Sizeof: object=%d player=%d map=%d"), + "Sizeof: object=%d player=%d map=%d", sizeof(object), sizeof(player), sizeof(mapstruct)); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]Objects:")); + "[fixed]Objects:"); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%6d used"), ob_used); + "[fixed]%6d used", ob_used); if (ob_used != nrofallocobjects - nroffreeobjects) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed] (used list mismatch: %d)"), + "[fixed] (used list mismatch: %d)", nrofallocobjects - nroffreeobjects); } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%6d free (%.2f%% of %d allocated)"), + "[fixed]%6d free (%.2f%% of %d allocated)", ob_free, (float)ob_free / nrofallocobjects * 100, nrofallocobjects); if (ob_free != nroffreeobjects) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed] (free list mismatch: %d)"), + "[fixed] (free list mismatch: %d)", nroffreeobjects); } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%6d on active list"), + "[fixed]%6d on active list", object_count_active()); i = (ob_used*sizeof(object)); @@ -305,13 +305,13 @@ sum_alloc += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed] object total: %11d"), i); + "[fixed] object total: %11d", i); i = (ob_free*sizeof(object)); sum_alloc += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d players: %8d"), + "[fixed]%4d players: %8d", players, i = (players*sizeof(player))); sum_alloc += i; @@ -318,7 +318,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d maps allocated: %8d"), + "[fixed]%4d maps allocated: %8d", nrofmaps, i = (nrofmaps*sizeof(mapstruct))); sum_alloc += i; @@ -325,7 +325,7 @@ sum_used += nrm*sizeof(mapstruct); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d maps in memory: %8d"), + "[fixed]%4d maps in memory: %8d", nrm, mapmem); sum_alloc += mapmem; @@ -332,7 +332,7 @@ sum_used += mapmem; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d archetypes: %8d"), + "[fixed]%4d archetypes: %8d", anr, i = (anr*sizeof(archetype))); sum_alloc += i; @@ -339,7 +339,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d animations: %8d"), + "[fixed]%4d animations: %8d", anims, i = (anims*sizeof(uint16_t))); sum_alloc += i; @@ -346,7 +346,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d treasurelists %8d"), + "[fixed]%4d treasurelists %8d", assets_number_of_treasurelists(), i = (assets_number_of_treasurelists() * sizeof(treasurelist))); sum_alloc += i; @@ -353,7 +353,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4ld treasures %8d"), + "[fixed]%4ld treasures %8d", assets_number_of_treasures(), i = (assets_number_of_treasures() *sizeof(treasure))); sum_alloc += i; @@ -360,7 +360,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4ld artifacts %8d"), + "[fixed]%4ld artifacts %8d", nrofartifacts, i = (nrofartifacts*sizeof(artifact))); sum_alloc += i; @@ -367,7 +367,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4ld artifacts strngs %8d"), + "[fixed]%4ld artifacts strngs %8d", nrofallowedstr, i = (nrofallowedstr*sizeof(linked_char))); sum_alloc += i; @@ -374,7 +374,7 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]%4d artifactlists %8d"), + "[fixed]%4d artifactlists %8d", alnr, i = (alnr*sizeof(artifactlist))); sum_alloc += i; @@ -381,11 +381,11 @@ sum_used += i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]Total space allocated:%8d"), + "[fixed]Total space allocated:%8d", sum_alloc); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_MALLOC, - i18n(op, "[fixed]Total space used: %8d"), + "[fixed]Total space used: %8d", sum_used); } @@ -412,7 +412,7 @@ return; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You are in %s.\n%s"), + "You are in %s.\n%s", get_region_longname(r), get_region_msg(r)); } @@ -434,7 +434,7 @@ if (QUERY_FLAG(op, FLAG_WIZ)) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "players:%d difficulty:%d size:%dx%d start:%dx%d timeout %d"), + "players:%d difficulty:%d size:%dx%d start:%dx%d timeout %d", m->players, m->difficulty, MAP_WIDTH(m), MAP_HEIGHT(m), MAP_ENTER_X(m), MAP_ENTER_Y(m), @@ -458,10 +458,10 @@ if (!malloc_verify()) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Heap is corrupted.")); + "Heap is corrupted."); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Heap checks out OK.")); + "Heap checks out OK."); return 1; } @@ -504,12 +504,12 @@ } } draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "In the world currently there are:")); + "In the world currently there are:"); for (reg = first_region; reg != NULL; reg = reg->next) if (reg->counter > 0) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "%u players in %s"), + "%u players in %s", reg->counter, get_region_longname(reg)); } } @@ -571,7 +571,7 @@ chars = (chars_names *)realloc(chars, num_players*sizeof(chars_names)); if (chars == NULL) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, - i18n(op, "who failed - out of memory!")); + "who failed - out of memory!"); return; } sprintf(chars[num_players-1].namebuf, "%s", pl->ob->name); @@ -591,15 +591,15 @@ if (first_player != (player *)NULL) { if (reg == NULL && party == NULL) draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, - i18n(op, "Total Players (%d) -- WIZ(%d) AFK(%d) BOT(%d)"), + "Total Players (%d) -- WIZ(%d) AFK(%d) BOT(%d)", num_players, num_wiz, num_afk, num_bot); else if (party == NULL) draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, - i18n(op, "Total Players in %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)"), + "Total Players in %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)", reg->longname ? reg->longname : reg->name, num_players, num_wiz, num_afk, num_bot); else draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_WHO, - i18n(op, "Total Players in party %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)"), + "Total Players in party %s (%d) -- WIZ(%d) AFK(%d) BOT(%d)", party->partyname, num_players, num_wiz, num_afk, num_bot); } qsort(chars, num_players, sizeof(chars_names), (int (*)(const void *, const void *))name_cmp); @@ -769,11 +769,11 @@ if (QUERY_FLAG(op, FLAG_AFK)) { CLEAR_FLAG(op, FLAG_AFK); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You are no longer AFK")); + "You are no longer AFK"); } else { SET_FLAG(op, FLAG_AFK); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You are now AFK")); + "You are now AFK"); } } @@ -882,13 +882,13 @@ if (*params == '\0' || !sscanf(params, "%d", &i)) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Global debug level is %d."), + "Global debug level is %d.", settings.debug); return; } settings.debug = (enum LogLevel)FABS(i); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Debug level set to %d."), + "Debug level set to %d.", i); } @@ -914,11 +914,11 @@ if (i) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You will now walk through walls.")); + "You will now walk through walls."); SET_FLAG(op, FLAG_WIZPASS); } else { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You will now be stopped by walls.")); + "You will now be stopped by walls."); CLEAR_FLAG(op, FLAG_WIZPASS); } } @@ -944,11 +944,11 @@ if (i) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You can now cast spells anywhere.")); + "You can now cast spells anywhere."); SET_FLAG(op, FLAG_WIZCAST); } else { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You now cannot cast spells in no-magic areas.")); + "You now cannot cast spells in no-magic areas."); CLEAR_FLAG(op, FLAG_WIZCAST); } } @@ -1066,18 +1066,18 @@ if (*params == '\0' || !sscanf(params, "%d", &i)) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Set listen to what (presently %d)?"), + "Set listen to what (presently %d)?", op->contr->listening); return; } if (i < 0) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Verbose level should be positive.")); + "Verbose level should be positive."); return; } op->contr->listening = (char)i; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Your verbose level is now %d."), + "Your verbose level is now %d.", i); } @@ -1111,31 +1111,31 @@ level_exp(pl->level+1, pl->expmul)); draw_ext_info(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]\nStat Nat/Real/Max")); + "[fixed]\nStat Nat/Real/Max"); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Str %2d/ %3d/%3d"), + "[fixed]Str %2d/ %3d/%3d", pl->contr->orig_stats.Str, pl->stats.Str, 20+pl->arch->clone.stats.Str); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Dex %2d/ %3d/%3d"), + "[fixed]Dex %2d/ %3d/%3d", pl->contr->orig_stats.Dex, pl->stats.Dex, 20+pl->arch->clone.stats.Dex); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Con %2d/ %3d/%3d"), + "[fixed]Con %2d/ %3d/%3d", pl->contr->orig_stats.Con, pl->stats.Con, 20+pl->arch->clone.stats.Con); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Int %2d/ %3d/%3d"), + "[fixed]Int %2d/ %3d/%3d", pl->contr->orig_stats.Int, pl->stats.Int, 20+pl->arch->clone.stats.Int); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Wis %2d/ %3d/%3d"), + "[fixed]Wis %2d/ %3d/%3d", pl->contr->orig_stats.Wis, pl->stats.Wis, 20+pl->arch->clone.stats.Wis); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Pow %2d/ %3d/%3d"), + "[fixed]Pow %2d/ %3d/%3d", pl->contr->orig_stats.Pow, pl->stats.Pow, 20+pl->arch->clone.stats.Pow); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "[fixed]Cha %2d/ %3d/%3d"), + "[fixed]Cha %2d/ %3d/%3d", pl->contr->orig_stats.Cha, pl->stats.Cha, 20+pl->arch->clone.stats.Cha); draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "\nAttack Mode: %s"), + "\nAttack Mode: %s", i18n(pl, pl->contr->peaceful ? "Peaceful" : "Hostile")); /** * Add preliminary damage per second calculations here @@ -1151,7 +1151,7 @@ // TODO: Account for opposing AC in calculations, make some sort of table/chart. // Then we round the floating-point. draw_ext_info_format(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_STATISTICS, - i18n(pl, "\n\nDam/Sec: %4d"), (int)(dps + 0.5f)); + "\n\nDam/Sec: %4d", (int)(dps + 0.5f)); /* max_time is in microseconds - thus divide by 1000000. * Need 64 bit values, as otherwise ticks_played * max_time @@ -1221,7 +1221,7 @@ struct tm *tm = localtime(&st.st_mtime); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]%s\t%04d %02d %02d %02d %02d %02d"), + "[fixed]%s\t%04d %02d %02d %02d %02d %02d", entry->d_name, 1900+tm->tm_year, 1+tm->tm_mon, @@ -1255,7 +1255,7 @@ if (*params == '\0') { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "applymode is set to %s"), + "applymode is set to %s", types[op->contr->unapply]); return; } @@ -1268,12 +1268,12 @@ op->contr->unapply = unapply_always; else { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "applymode: Unknown options %s, valid options are nochoice, never, always"), + "applymode: Unknown options %s, valid options are nochoice, never, always", params); return; } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "applymode%s set to %s"), + "applymode%s set to %s", (unapply == op->contr->unapply ? "" : " now"), types[op->contr->unapply]); } @@ -1306,7 +1306,7 @@ if (*params == '\0') { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "bowmode is set to %s"), + "bowmode is set to %s", types[op->contr->bowtype]); return; } @@ -1335,7 +1335,7 @@ return; } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "bowmode%s set to %s"), + "bowmode%s set to %s", (oldtype == op->contr->bowtype ? "" : " now"), types[op->contr->bowtype]); return; @@ -1416,7 +1416,7 @@ if (*params == '\0') { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "petmode is set to %s"), + "petmode is set to %s", types[op->contr->petmode]); return; } @@ -1431,12 +1431,12 @@ op->contr->petmode = pet_arena; else { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "petmode: Unknown options %s, valid options are normal, sad (seek and destroy), defend, arena"), + "petmode: Unknown options %s, valid options are normal, sad (seek and destroy), defend, arena", params); return; } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "petmode%s set to %s"), + "petmode%s set to %s", (oldtype == op->contr->petmode ? "" : " now"), types[op->contr->petmode]); } @@ -1464,42 +1464,42 @@ if (target == 0) { if (counter == 0) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Pets:")); + "Pets:"); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "%d %s - level %d"), + "%d %s - level %d", ++counter, ob->name, ob->level); } else if (!have_shown_pet && ++counter == target) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]level %d %s"), + "[fixed]level %d %s", ob->level, ob->name); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]%d/%d HP, %d/%d SP"), + "[fixed]%d/%d HP, %d/%d SP", ob->stats.hp, ob->stats.maxhp, ob->stats.sp, ob->stats.maxsp); /* this is not a nice way to do this, it should be made to be more like the statistics command */ draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Str %d"), + "[fixed]Str %d", ob->stats.Str); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Dex %d"), + "[fixed]Dex %d", ob->stats.Dex); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Con %d"), + "[fixed]Con %d", ob->stats.Con); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Int %d"), + "[fixed]Int %d", ob->stats.Int); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Wis %d"), + "[fixed]Wis %d", ob->stats.Wis); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Cha %d"), + "[fixed]Cha %d", ob->stats.Cha); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]Pow %d"), + "[fixed]Pow %d", ob->stats.Pow); draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "[fixed]wc %d damage %d ac %d"), + "[fixed]wc %d damage %d ac %d", ob->stats.wc, ob->stats.dam, ob->stats.ac); have_shown_pet = 1; } @@ -1507,10 +1507,10 @@ } if (counter == 0) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You have no pets.")); + "You have no pets."); else if (target != 0 && have_shown_pet == 0) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "No such pet.")); + "No such pet."); } /** @@ -1531,7 +1531,7 @@ if (*params == '\0') { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "usekeys is set to %s"), + "usekeys is set to %s", types[op->contr->usekeys]); return; } @@ -1544,12 +1544,12 @@ op->contr->usekeys = containers; else { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "usekeys: Unknown option %s, valid options are inventory, keyrings, containers"), + "usekeys: Unknown option %s, valid options are inventory, keyrings, containers", params); return; } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "usekeys%s set to %s"), + "usekeys%s set to %s", (oldtype == op->contr->usekeys ? "" : " now"), types[op->contr->usekeys]); } @@ -1572,7 +1572,7 @@ continue; draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "[fixed]%-20s %+5d"), + "[fixed]%-20s %+5d", attacktype_desc[i], op->resist[i]); } @@ -1584,12 +1584,12 @@ tmp = object_find_by_type_and_arch_name(op, FORCE, "dragon_skin_force"); if (tmp != NULL) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "\nNatural skin resistances:")); + "\nNatural skin resistances:"); for (attack = 0; attack < NROFATTACKS; attack++) { if (atnr_is_dragon_enabled(attack)) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "%s: %d"), + "%s: %d", change_resist_msg[attack], tmp->resist[attack]); } } @@ -1622,19 +1622,19 @@ case 1: snprintf(filename, sizeof(filename), "%s/wizhelp", settings.datadir); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Wiz commands:")); + " Wiz commands:"); break; case 3: snprintf(filename, sizeof(filename), "%s/mischelp", settings.datadir); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Misc help:")); + " Misc help:"); break; default: snprintf(filename, sizeof(filename), "%s/help", settings.datadir); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Commands:")); + " Commands:"); break; } if (!(dirp = opendir(filename))) @@ -1678,7 +1678,7 @@ ap = WizCommands; size = WizCommandsSize; draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Wiz commands:")); + " Wiz commands:"); break; case 2: @@ -1685,7 +1685,7 @@ ap = CommunicationCommands; size = CommunicationCommandSize; draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Communication commands:")); + " Communication commands:"); break; default: @@ -1692,7 +1692,7 @@ ap = Commands; size = CommandsSize; draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, " Commands:")); + " Commands:"); break; } @@ -1811,7 +1811,7 @@ */ if (strchr(params, '.') || strchr(params, ' ') || strchr(params, '/')) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "Illegal characters in '%s'"), + "Illegal characters in '%s'", params); return; } @@ -1820,7 +1820,7 @@ if (!find_help_file(params, language, QUERY_FLAG(op, FLAG_WIZ), filename, sizeof(filename))) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "No help available on '%s'"), + "No help available on '%s'", params); return; } @@ -1834,7 +1834,7 @@ } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_INFO, - i18n(op, "Help about '%s'"), + "Help about '%s'", params); while (fgets(line, MAX_BUF, fp)) { @@ -1894,9 +1894,8 @@ void command_quit(object* op, const char* params) { draw_ext_info( NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "To leave the game, sleep in (apply) a bed to reality. To " - "permenantly delete your character, use the 'delete' command.")); + "permenantly delete your character, use the 'delete' command."); } /** @@ -1931,11 +1930,11 @@ if (!(op->contr->socket.sound&SND_MUTE)) { op->contr->socket.sound = op->contr->socket.sound|SND_MUTE; draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Sounds are turned off.")); + "Sounds are turned off."); } else { op->contr->socket.sound = op->contr->socket.sound&~SND_MUTE; draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "The sounds are enabled.")); + "The sounds are enabled."); } return; } @@ -1975,7 +1974,7 @@ || op->contr->state == ST_CHANGE_PASSWORD_NEW || op->contr->state == ST_CHANGE_PASSWORD_CONFIRM) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Password changed cancelled.")); + "Password changed cancelled."); player_set_state(op->contr, ST_PLAYING); } else get_name(op); @@ -1988,7 +1987,7 @@ if (checkbanned(op->name, op->contr->socket.host)) { LOG(llevInfo, "Banned player tried to add: [%s@%s]\n", op->name, op->contr->socket.host); draw_ext_info(NDI_UNIQUE|NDI_RED, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You are not allowed to play.")); + "You are not allowed to play."); get_name(op); return; } @@ -1996,7 +1995,7 @@ if (op->contr->state == ST_CONFIRM_PASSWORD) { if (!check_password(op->contr->write_buf+1, op->contr->password)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "The passwords did not match.")); + "The passwords did not match."); get_name(op); return; } @@ -2003,7 +2002,7 @@ LOG(llevInfo, "LOGIN: New player named %s from ip %s\n", op->name, op->contr->socket.host); display_motd(op); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "\nWelcome, Brave New Warrior!\n")); + "\nWelcome, Brave New Warrior!\n"); roll_again(op); player_set_state(op->contr, ST_ROLL_STAT); return; @@ -2012,7 +2011,7 @@ if (op->contr->state == ST_CHANGE_PASSWORD_OLD) { if (!check_password(op->contr->write_buf+1, op->contr->password)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You entered the wrong current password.")); + "You entered the wrong current password."); player_set_state(op->contr, ST_PLAYING); } else { send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, i18n(op, "Please enter your new password, or blank to cancel:")); @@ -2033,10 +2032,10 @@ if (op->contr->state == ST_CHANGE_PASSWORD_CONFIRM) { if (!check_password(op->contr->write_buf+1, op->contr->new_password)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "The new passwords don't match!")); + "The new passwords don't match!"); } else { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Password changed.")); + "Password changed."); strncpy(op->contr->password, op->contr->new_password, 13); } player_set_state(op->contr, ST_PLAYING); @@ -2064,7 +2063,7 @@ if (settings.set_title == FALSE) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "You cannot change your title.")); + "You cannot change your title."); return; } @@ -2071,7 +2070,7 @@ /* dragon players cannot change titles */ if (is_dragon_pl(op)) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Dragons cannot change titles.")); + "Dragons cannot change titles."); return; } @@ -2079,7 +2078,7 @@ char tmp[MAX_BUF]; player_get_title(op->contr, tmp, sizeof(tmp)); - snprintf(buf, sizeof(buf), i18n(op, "Your title is '%s'."), tmp); + snprintf(buf, sizeof(buf), "Your title is '%s'.", tmp); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, buf); return; } @@ -2086,10 +2085,10 @@ if (strcmp(params, "clear") == 0 || strcmp(params, "default") == 0) { if (!player_has_own_title(op->contr)) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Your title is the default title.")); + "Your title is the default title."); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Title set to default.")); + "Title set to default."); player_set_own_title(op->contr, ""); return; } @@ -2096,7 +2095,7 @@ if ((int)strlen(params) >= MAX_NAME) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Title too long.")); + "Title too long."); return; } player_set_own_title(op->contr, params); @@ -2113,17 +2112,17 @@ void command_save(object *op, const char *params) { if (get_map_flags(op->map, NULL, op->x, op->y, NULL, NULL)&P_NO_CLERIC) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You can not save on unholy ground.")); + "You can not save on unholy ground."); } else if (!op->stats.exp) { draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You don't deserve to save yet.")); + "You don't deserve to save yet."); } else { if (save_player(op, 1)) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You have been saved.")); + "You have been saved."); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "SAVE FAILED!")); + "SAVE FAILED!"); } } @@ -2138,10 +2137,10 @@ void command_peaceful(object *op, const char *params) { if ((op->contr->peaceful = !op->contr->peaceful)) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "You will not attack other players.")); + "You will not attack other players."); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "You will attack other players.")); + "You will attack other players."); } /** @@ -2157,7 +2156,7 @@ if (*params == '\0' || !sscanf(params, "%d", &i)) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Your current wimpy level is %d."), + "Your current wimpy level is %d.", op->run_away); return; } @@ -2164,13 +2163,13 @@ if (i < 0 || i > 100) { draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Wimpy level should be between 1 and 100."), + "Wimpy level should be between 1 and 100.", i); return; } draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_TYPE_COMMAND_CONFIG, - i18n(op, "Your new wimpy level is %d."), + "Your new wimpy level is %d.", i); op->run_away = i; } @@ -2191,10 +2190,10 @@ if (op->contr->braced) draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "You are braced.")); + "You are braced."); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Not braced.")); + "Not braced."); fix_object(op); } @@ -2214,7 +2213,7 @@ if (*params == '\0') { pets_terminate_all(op); draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Your pets have been killed.")); + "Your pets have been killed."); } else { int target = atoi(params); for (obl = first_friendly_object; obl != NULL; obl = next) { @@ -2231,11 +2230,11 @@ } if (removecount != 0) draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Killed %d pets."), + "Killed %d pets.", removecount); else draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(op, "Couldn't find any suitable pets to kill.")); + "Couldn't find any suitable pets to kill."); } } @@ -2257,7 +2256,7 @@ /* If new client (login_method = 2) or jxclient (login_method = 1), changing the password does nothing anyway, so error out */ else{ draw_ext_info(NDI_UNIQUE, 0, pl, MSG_TYPE_COMMAND, MSG_SUBTYPE_NONE, - i18n(pl, "passwd is maintained for older clients that do not support the account system. Please use the 'Password' button in your character selection screen to change your password.")); + "passwd is maintained for older clients that do not support the account system. Please use the 'Password' button in your character selection screen to change your password."); } } Modified: server/trunk/server/c_wiz.c =================================================================== --- server/trunk/server/c_wiz.c 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/server/c_wiz.c 2021-04-22 02:10:11 UTC (rev 22094) @@ -2783,60 +2783,60 @@ * @param ignored ignored additional text. */ void command_settings(object *op, const char *ignored) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, "Server settings:")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, "Server settings:"); - draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * item power factor: %2f"), settings.item_power_factor); + draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * item power factor: %2f", settings.item_power_factor); if (settings.not_permadeth) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * death is not permanent")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * death is not permanent"); } else if (settings.resurrection) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * permanent death, resurrection is enabled")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * permanent death, resurrection is enabled"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * permanent death, resurrection is NOT enabled")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * permanent death, resurrection is NOT enabled"); } if (settings.set_title) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can set their title")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can set their title"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can't set their title")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can't set their title"); } if (settings.spell_encumbrance) { if (settings.spell_failure_effects) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * too much equipment can lead to spell failure and ill effects")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * too much equipment can lead to spell failure and ill effects"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * too much equipment can lead to spell failure but no ill effects")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * too much equipment can lead to spell failure but no ill effects"); } } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * too much equipment can't lead to spell failure")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * too much equipment can't lead to spell failure"); } if (settings.casting_time) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * casting takes time")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * casting takes time"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * casting is immediate")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * casting is immediate"); } - draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * permanent experience: %d%%"), settings.permanent_exp_ratio); - draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * death penalty %d%% or %d levels"), settings.death_penalty_ratio, settings.death_penalty_level); + draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * permanent experience: %d%%", settings.permanent_exp_ratio); + draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * death penalty %d%% or %d levels", settings.death_penalty_ratio, settings.death_penalty_level); - draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * friendly fire: %d%%"), settings.set_friendly_fire); + draw_ext_info_format(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * friendly fire: %d%%", settings.set_friendly_fire); if (settings.no_player_stealing) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can't steal from other players")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can't steal from other players"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can steal from other players")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can steal from other players"); } if (settings.create_home_portals) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can create portals from their apartments")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can create portals from their apartments"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can't create portals from their apartments")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can't create portals from their apartments"); } if (settings.allow_denied_spells_writing) { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can write spells they are denied")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can write spells they are denied"); } else { - draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, i18n(op, " * players can't write spells they are denied")); + draw_ext_info(NDI_UNIQUE, 0, op, MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_DM, " * players can't write spells they are denied"); } } Modified: server/trunk/server/knowledge.c =================================================================== --- server/trunk/server/knowledge.c 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/server/knowledge.c 2021-04-22 02:10:11 UTC (rev 22094) @@ -1035,10 +1035,10 @@ free(copy); if (added) { - draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_MISC, MSG_TYPE_CLIENT_NOTICE, TAG_START "%s" TAG_END, i18n(pl->ob, "You keep that in mind for future reference.")); + draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_MISC, MSG_TYPE_CLIENT_NOTICE, TAG_START "%s" TAG_END, "You keep that in mind for future reference."); if (none) { /* first information ever written down, be nice and give hint to recover it. */ - draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_MISC, MSG_TYPE_CLIENT_NOTICE, TAG_START "%s" TAG_END, i18n(pl->ob, "Use the 'knowledge' command to see what you keep in mind (this message will not appear anymore).")); + draw_ext_info_format(NDI_UNIQUE, 0, pl->ob, MSG_TYPE_MISC, MSG_TYPE_CLIENT_NOTICE, TAG_START "%s" TAG_END, "Use the 'knowledge' command to see what you keep in mind (this message will not appear anymore)."); } } Modified: server/trunk/server/player.c =================================================================== --- server/trunk/server/player.c 2021-04-21 16:21:46 UTC (rev 22093) +++ server/trunk/server/player.c 2021-04-22 02:10:11 UTC (rev 22094) @@ -861,7 +861,7 @@ void get_name(object *op) { op->contr->write_buf[0] = '\0'; player_set_state(op->contr, ST_GET_NAME); - send_query(&op->contr->socket, 0, "What is your name?\n:"); + send_query(&op->contr->socket, 0, i18n(op, "What is your name?\n:")); } /** @@ -873,7 +873,7 @@ void get_password(object *op) { op->contr->write_buf[0] = '\0'; player_set_state(op->contr, ST_GET_PASSWORD); - send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, "What is your password?\n:"); + send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, i18n(op, "What is your password?\n:")); } /** @@ -894,7 +894,7 @@ * For clients with account support, just return to character seletion (see below). */ if (op->contr->socket.login_method == 0) { - send_query(&op->contr->socket, CS_QUERY_SINGLECHAR, "Do you want to play again (a/q)?"); + send_query(&op->contr->socket, CS_QUERY_SINGLECHAR, i18n(op, "Do you want to play again (a/q)?")); } /* a bit of a hack, but there are various places early in th * player creation process that a user can quit (eg, roll @@ -988,7 +988,7 @@ void confirm_password(object *op) { op->contr->write_buf[0] = '\0'; player_set_state(op->contr, ST_CONFIRM_PASSWORD); - send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, "Please type your password again.\n:"); + send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, i18n(op, "Please type your password again.\n:")); } /** @@ -1009,7 +1009,7 @@ op->contr->write_buf[0] = '\0'; player_set_state(op->contr, ST_GET_PARTY_PASSWORD); op->contr->party_to_join = party; - send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, "What is the password?\n:"); + send_query(&op->contr->socket, CS_QUERY_HIDEINPUT, i18n(op, "What is the password?\n:")); return 1; } @@ -1119,7 +1119,7 @@ */ void roll_again(object *op) { esrv_new_player(op->contr, 0); - send_query(&op->contr->socket, CS_QUERY_SINGLECHAR, "<y> to roll new stats <n> to use stats\n<1-7> <1-7> to swap stats.\nRoll again (y/n/1-7)? "); + send_query(&op->contr->socket, CS_QUERY_SINGLECHAR, i18n(op, "<y> to roll new stats <n> to use stats\n<1-7> <1-7> to swap stats.\nRoll again (y/n/1-7)? ")); } /** @@ -1226,7 +1226,7 @@ SET_ANIMATION(op, 2); /* So player faces south */ /* Enter exit adds a player otherwise */ add_statbonus(op); - send_query(&op->contr->socket, CS_QU... [truncated message content] |
From: Crossfire C. r. messages.
<cro...@li...> - 2021-04-21 16:21:48
|
Revision: 22093 http://sourceforge.net/p/crossfire/code/22093 Author: ryo_saeba Date: 2021-04-21 16:21:46 +0000 (Wed, 21 Apr 2021) Log Message: ----------- Extract function. Fix icon and title of formulae nodes. Modified Paths: -------------- server/trunk/ChangeLog server/trunk/common/recipe.c server/trunk/include/libproto.h server/trunk/server/knowledge.c server/trunk/utils/cre/CREUtils.cpp Modified: server/trunk/ChangeLog =================================================================== --- server/trunk/ChangeLog 2021-04-20 19:07:11 UTC (rev 22092) +++ server/trunk/ChangeLog 2021-04-21 16:21:46 UTC (rev 22093) @@ -1,3 +1,9 @@ +2021-04-21 Nicolas Weeger + * common/recipe.c, + * include/libproto.h, + * server/knowledge.c: Extract function. + * utils/cre/CREUtils.cpp: Fix icon and title of formulae nodes. + 2021-04-20 Nicolas Weeger * server/modules/citylife.cpp: Fix compilation on some systems. Modified: server/trunk/common/recipe.c =================================================================== --- server/trunk/common/recipe.c 2021-04-20 19:07:11 UTC (rev 22092) +++ server/trunk/common/recipe.c 2021-04-21 16:21:46 UTC (rev 22093) @@ -755,3 +755,40 @@ return NULL; } + +/** + * Return the best face associated with a recipe. + * @param rp recipe to get the face of. + * @return best face, may be NULL if none applicable. + */ +const Face *recipe_get_face(const recipe *rp) { + const artifact *art; + archetype *arch; + object *item; + const Face *face; + + if (rp->arch_names == 0) + return NULL; + + arch = try_find_archetype(rp->arch_name[0]); + if (arch == NULL) { + return NULL; + } + if (strcmp(rp->title, "NONE") == 0) { + return arch->clone.face; + } + + art = locate_recipe_artifact(rp, 0); + if (art == NULL) + return arch->clone.face; + + face = arch->clone.face; + item = arch_to_object(arch); + give_artifact_abilities(item, art->item); + object_give_identified_properties(item); + if (item->face != NULL && item->face != blank_face) + face = item->face; + object_free(item, FREE_OBJ_FREE_INVENTORY | FREE_OBJ_NO_DESTROY_CALLBACK); + + return face; +} Modified: server/trunk/include/libproto.h =================================================================== --- server/trunk/include/libproto.h 2021-04-20 19:07:11 UTC (rev 22092) +++ server/trunk/include/libproto.h 2021-04-21 16:21:46 UTC (rev 22093) @@ -378,6 +378,7 @@ extern void free_all_recipes(void); extern recipe *find_recipe_for_tool(const char *tool, recipe *from); extern void check_formulae(void); +extern const Face *recipe_get_face(const recipe *rp); /* region.c */ extern region *get_region_by_name(const char *region_name); extern region *get_region_by_map(mapstruct *m); Modified: server/trunk/server/knowledge.c =================================================================== --- server/trunk/server/knowledge.c 2021-04-20 19:07:11 UTC (rev 22092) +++ server/trunk/server/knowledge.c 2021-04-21 16:21:46 UTC (rev 22093) @@ -508,10 +508,6 @@ */ static const Face *knowledge_alchemy_face(sstring code) { const recipe *rp = knowledge_alchemy_get_recipe(code); - const artifact *art; - archetype *arch; - object *item; - const Face *face; if (!rp) { LOG(llevError, "knowledge: couldn't find recipe for %s", code); @@ -518,30 +514,7 @@ return NULL; } - if (rp->arch_names == 0) - return NULL; - - arch = try_find_archetype(rp->arch_name[0]); - if (arch == NULL) { - return NULL; - } - if (strcmp(rp->title, "NONE") == 0) { - return arch->clone.face; - } - - art = locate_recipe_artifact(rp, 0); - if (art == NULL) - return arch->clone.face; - - face = arch->clone.face; - item = arch_to_object(arch); - give_artifact_abilities(item, art->item); - object_give_identified_properties(item); - if (item->face != NULL && item->face != blank_face) - face = item->face; - object_free(item, FREE_OBJ_FREE_INVENTORY | FREE_OBJ_NO_DESTROY_CALLBACK); - - return face; + return recipe_get_face(rp); } /** Modified: server/trunk/utils/cre/CREUtils.cpp =================================================================== --- server/trunk/utils/cre/CREUtils.cpp 2021-04-20 19:07:11 UTC (rev 22092) +++ server/trunk/utils/cre/CREUtils.cpp 2021-04-21 16:21:46 UTC (rev 22093) @@ -164,7 +164,10 @@ } else if (strcmp(recipe->title, "NONE") == 0) { - title = base->clone.name; + if (base->clone.title) + title = QString("%1 %2").arg(base->clone.name, base->clone.title); + else + title = base->clone.name; } else { @@ -172,8 +175,13 @@ } } QTreeWidgetItem* item = new QTreeWidgetItem(parent, QStringList(title)); - if (base != NULL && base->clone.face != 0) - item->setIcon(0, CREPixmap::getIcon(base->clone.face->number)); + const Face *face = recipe_get_face(recipe); + if (!face && base != NULL) + { + face = base->clone.face; + } + if (face) + item->setIcon(0, CREPixmap::getIcon(face->number)); return item; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |