CODE: ./share/settings setting for allowing item destruction
Posted: Sun Dec 07, 2003 3:15 am
crossfire = cvs copy
crossfire-dev = my modified copy
diff in settings file should explain it all, but, in a nutshell, this patch lets server admins change whether items can be burned or turned into icecubes. For some players, this can be interesting, for others, merely annoying, so they should be allowed to choose, imo
enjoy the code
crossfire-dev = my modified copy
diff in settings file should explain it all, but, in a nutshell, this patch lets server admins change whether items can be burned or turned into icecubes. For some players, this can be interesting, for others, merely annoying, so they should be allowed to choose, imo

diff wrote:$ diff ./crossfire-dev/server/attack.c ./crossfire/server/attack.c
127c127
<
---
>
141,143c141
< {
< if (settings.destroy_items == FALSE)
< return;
---
> {
diff wrote:$ diff ./crossfire-dev/server/init.c ./crossfire/server/init.c
577,593c577,584
< } else if (!strcasecmp(buf,"simple_exp")) {
< if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
< settings.simple_exp=TRUE;
< } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
< settings.simple_exp=FALSE;
< } else {
< LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
< cp);
< }
< } else if (!strcasecmp(buf,"destroy_items")) {
< if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
< settings.destroy_items=TRUE;
< } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
< settings.destroy_items=FALSE;
< } else {
< LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
< cp);
---
> } else if (!strcasecmp(buf,"simple_exp")) {
> if (!strcasecmp(cp,"on") || !strcasecmp(cp,"true")) {
> settings.simple_exp=TRUE;
> } else if (!strcasecmp(cp,"off") || !strcasecmp(cp,"false")) {
> settings.simple_exp=FALSE;
> } else {
> LOG(llevError,"load_settings: Unkown value for simple_exp: %s\n",
> cp);
diff wrote:$ diff ./crossfire-dev/include/config.h ./crossfire/include/config.h
135,136c135
< #define SET_FRIENDLY_FIRE 5
< #define DESTROY_ITEMS FALSE
---
> #define SET_FRIENDLY_FIRE 5
diff wrote:$ diff ./crossfire-dev/lib/settings ./crossfire/lib/settings
156d155
< #spellpoint_level_depend false
205,211d203
<
< # This option enables the destruction of items with spells if on. This option
< # can cause the destruction of key items, forcing someone to redo a map if they
< # accidentally destroy a quest item or the likes. Set to true by default within
< # code.
<
< destroy_items false