Fix furniture not showing oval names

This commit is contained in:
kinther 2025-09-07 19:51:05 -07:00
parent 648085d41f
commit 3d82609ec8
4 changed files with 52 additions and 11 deletions

View file

@ -113,6 +113,27 @@ const char *exit_bits[] = {
"\n"
};
/* Furniture: which body positions are supported on this piece */
const char *furniture_position_bits[] = {
"STAND", /* can stand on it */
"SIT", /* can sit on it */
"REST", /* can rest on it */
"SLEEP", /* can sleep on it */
"KNEEL", /* can kneel at/on it */
"\n"
};
/* Furniture flags: behavior & semantics */
const char *furniture_flag_bits[] = {
"ON", /* interact 'on' it (table, stage, dais) */
"IN", /* interact 'in' it (bed with canopy, tub) */
"AT", /* interact 'at' it (altar, bar, desk) */
"BLOCKS_PASSAGE",/* occupies/blocks movement in room */
"MOUNT_POINT", /* anchor for ropes, mounts, etc. */
"NO_DRAG", /* cannot be dragged */
"\n"
};
/** Description of the room sector type.
* @pre Must be in the same order as the defines.
* Must end array with a single newline. */
@ -835,8 +856,16 @@ int movement_loss[] =
6, /* Mountains */
4, /* Swimming */
1, /* Unswimable */
1, /* Flying */
5 /* Underwater */
5, /* Underwater */
1, /* Flying */
3, /* Scrubland */
3, /* Sand */
5, /* Rocky Hill */
1, /* Road */
2, /* Underground */
4, /* Silt */
2, /* Ashland */
2 /* Tableland */
};
/** The names of the days of the mud week. Not used in sprinttype(). */

View file

@ -179,7 +179,7 @@ extern const char *nrm, *grn, *cyn, *yel;
#define OEDIT_KEYWORD 2
#define OEDIT_SHORTDESC 3
#define OEDIT_LONGDESC 4
#define OEDIT_ACTDESC 5
#define OEDIT_MAINDESC 5
#define OEDIT_TYPE 6
#define OEDIT_EXTRAS 7
#define OEDIT_WEAR 8

View file

@ -102,8 +102,8 @@ static const char *money_val_labels[NUM_OBJ_VAL_POSITIONS] = {
/* Furniture */
static const char *furniture_val_labels[NUM_OBJ_VAL_POSITIONS] = {
"capacity", "num_people", "unused2", "unused3",
"Value[4]", "Value[5]", "Value[6]", "Value[7]"
"capacity", "max_people", "allowed_pos", "furn_flags",
"comfy_bonus", "climb_dc", "script_hook", "reserved"
};
/* Generic fallback */
@ -396,7 +396,6 @@ static void oedit_disp_container_flags_menu(struct descriptor_data *d)
write_to_output(d, "Enter container flag number (toggles on/off): ");
}
/* For extra descriptions. */
static void oedit_disp_extradesc_menu(struct descriptor_data *d)
{
@ -519,6 +518,7 @@ static void oedit_disp_values_menu(struct descriptor_data *d)
case ITEM_DRINKCON:
case ITEM_FOUNTAIN: labels = drink_val_labels; break;
case ITEM_CONTAINER: labels = container_val_labels; break;
case ITEM_FURNITURE: labels = furniture_val_labels; break;
default: labels = generic_val_labels; break;
}
@ -745,7 +745,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
OLC_MODE(d) = OEDIT_LONGDESC;
break;
case '4':
OLC_MODE(d) = OEDIT_ACTDESC;
OLC_MODE(d) = OEDIT_MAINDESC;
send_editor_help(d);
write_to_output(d, "Enter action description:\r\n\r\n");
if (OLC_OBJ(d)->main_description) {
@ -885,7 +885,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
oedit_disp_menu(d);
return;
case OEDIT_ACTDESC:
case OEDIT_MAINDESC:
/* Multi-line editor is correct here, requires '@' to finish */
send_editor_help(d);
write_to_output(d, "Enter action description:\r\n\r\n");
@ -1307,7 +1307,7 @@ void oedit_parse(struct descriptor_data *d, char *arg)
void oedit_string_cleanup(struct descriptor_data *d, int terminator)
{
switch (OLC_MODE(d)) {
case OEDIT_ACTDESC:
case OEDIT_MAINDESC:
OLC_DIRTY(d) = 1;
oedit_disp_menu(d);
break;

View file

@ -120,7 +120,7 @@
#define SECT_MOUNTAIN 5 /**< On a mountain */
#define SECT_WATER_SWIM 6 /**< Swimmable water */
#define SECT_WATER_NOSWIM 7 /**< Water - need a boat */
#define SECT_UNDERWATER 8 /**< Flying */
#define SECT_UNDERWATER 8 /**< Underwater */
#define SECT_FLYING 9 /**< Flying */
#define SECT_SCRUBLAND 10 /**< Scrublands */
#define SECT_SAND 11 /**< Sandy Wastes */
@ -1304,7 +1304,7 @@ struct recent_player
/* 5e system helpers */
/* Armor item values (for ITEM_ARMOR objects)
/* Armor item object values (for ITEM_ARMOR objects)
* value[0] = piece_ac (03)
* value[1] = bulk (03), determines allowed dex bonus
* value[2] = magic_bonus (03, most will be at most +1)
@ -1333,6 +1333,18 @@ void loadout_free_list(struct mob_loadout **head);
void loadout_add_entry(struct mob_loadout **head, obj_vnum vnum, sh_int wear_pos, int qty);
struct mob_loadout *loadout_deep_copy(const struct mob_loadout *src);
/* Furniture defines for object values */
/* Furniture object values (obj_flags.value[x]) */
#define VAL_FURN_CAPACITY 0 /* how much it can hold / support */
#define VAL_FURN_MAX_OCC 1 /* max occupants */
#define VAL_FURN_POSITIONS 2 /* allowed positions (bitvector) */
#define VAL_FURN_FLAGS 3 /* behavior flags (bitvector) */
#define VAL_FURN_COMFORT 4 /* comfort/healing bonus */
#define VAL_FURN_ENTRY_DC 5 /* difficulty to climb onto */
#define VAL_FURN_SCRIPT 6 /* script hook */
#define VAL_FURN_RESERVED 7 /* reserved */
/* Config structs */
/** The game configuration structure used for configurating the game play