Welcome to the Builder Academy

Question Minor bug in CEDIT, fresh install tbaMUD-2020

More
10 Feb 2020 17:06 #8561 by Salty
Tested with a fresh install of tbaMUD-2020.

pastebin.com/RGYQ1Cm3

The Gameplay Options feature "Display Closed Doors" does not save to the ../lib/config file correctly.


The structures are here:
github.com/tbamud/tbamud/blob/7f0acefcb4.../src/structs.h#L1309
github.com/tbamud/tbamud/blob/7f0acefcb4.../src/structs.h#L1386
github.com/tbamud/tbamud/blob/7f0acefcb4...7ea/src/utils.h#L981

from cedit.c
Code:
OLC_CONFIG(d)->play.disp_closed_doors = CONFIG_DISP_CLOSED_DOORS;
Code:
CONFIG_DISP_CLOSED_DOORS = OLC_CONFIG(d)->play.disp_closed_doors;
Code:
fprintf(fl, "* Should closed doors be shown on autoexit / exit?\n" "disp_closed_doors = %d\n\n", CONFIG_DISP_CLOSED_DOORS);
Code:
grn, nrm, cyn, CHECK_VAR(OLC_CONFIG(d)->play.disp_closed_doors),
Code:
case 'p': case 'P': TOGGLE_VAR(OLC_CONFIG(d)->play.disp_closed_doors); break;

However, the problem arises from config.h, config.c and db.c using display_closed_doors instead of disp_closed_doors. The function load_default_config() in db.c is to blame, as follows:

github.com/tbamud/tbamud/blob/7f0acefcb4...007ea/src/db.c#L3857
github.com/tbamud/tbamud/blob/7f0acefcb4...007ea/src/db.c#L3956

config.c contains the default values for the cedit game configurator, as per the top level comment.
github.com/tbamud/tbamud/blob/7f0acefcb4...ea/src/config.c#L297
github.com/tbamud/tbamud/blob/7f0acefcb4...7ea/src/config.h#L70

I was able to get the cedit saving behavior for this option rectified by changing the 2 lines in db.c, lines in config.c and config.h to be consistent with the naming convention used in structs.h

I know this is a small bug, nothing major. If there is a better way to report non-critical issues, please let me know.

Please Log in or Create an account to join the conversation.

More
10 Feb 2020 23:05 #8562 by thomas
This is ok. Even better would be a pull request on github :) But we can live with this :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.178 seconds