diff --git a/database/DBtechname.c b/database/DBtechname.c index df052581..5cf97b1b 100644 --- a/database/DBtechname.c +++ b/database/DBtechname.c @@ -451,6 +451,9 @@ DBTechPrintTypes(mask, dolist) for (p = dbTypeNameLists.sn_next; p != &dbTypeNameLists; p = p->sn_next) { + /* Ignore aliases */ + if (p->sn_alias) continue; + if (((TileType)(spointertype) p->sn_value) == i) { if (dolist) diff --git a/database/DBtechtype.c b/database/DBtechtype.c index 5eeb9d1f..e7fe51ed 100644 --- a/database/DBtechtype.c +++ b/database/DBtechtype.c @@ -760,7 +760,7 @@ dbTechNameAdd(name, cdata, ptable, alias) *cp = '\0'; if (*(cp = onename)) { - if ((current = dbTechNameAddOne(cp, cdata, FALSE, ptable)) == NULL) + if ((current = dbTechNameAddOne(cp, cdata, FALSE, alias, ptable)) == NULL) return (NULL); if (first == NULL) first = current->sn_name; @@ -793,10 +793,11 @@ dbTechNameAdd(name, cdata, ptable, alias) */ NameList * -dbTechNameAddOne(name, cdata, isPrimary, ptable) +dbTechNameAddOne(name, cdata, isPrimary, isAlias, ptable) char *name; /* Name to be added */ ClientData cdata; /* Client value associated with this name */ bool isPrimary; /* TRUE if this is the primary abbreviation */ + bool isAlias; /* TRUE if this name is an alias */ NameList *ptable; /* Table of names to which we're adding this */ { int cmp; @@ -817,6 +818,7 @@ dbTechNameAddOne(name, cdata, isPrimary, ptable) new->sn_name = StrDup((char **) NULL, name); new->sn_value = cdata; new->sn_primary = isPrimary; + new->sn_alias = isAlias; /* Link this entry in to the list before 'tbl' */ new->sn_next = tbl; diff --git a/database/databaseInt.h b/database/databaseInt.h index 5f631cfb..eda67bed 100644 --- a/database/databaseInt.h +++ b/database/databaseInt.h @@ -81,6 +81,7 @@ typedef struct namelist char *sn_name; /* Text of name */ ClientData sn_value; /* Value (TileType or plane number) */ bool sn_primary; /* If TRUE, this is the primary name */ + bool sn_alias; /* If TRUE, this is an alias name */ } NameList; typedef struct