Feature #13 ยป 0012-Add-support-for-second-alt-terrain-gfx-tag.patch
| client/packhand.c | ||
|---|---|---|
|
names_set(&pterrain->name, NULL, p->name, p->rule_name);
|
||
|
sz_strlcpy(pterrain->graphic_str, p->graphic_str);
|
||
|
sz_strlcpy(pterrain->graphic_alt, p->graphic_alt);
|
||
|
sz_strlcpy(pterrain->graphic_alt2, p->graphic_alt2);
|
||
|
pterrain->movement_cost = p->movement_cost;
|
||
|
pterrain->defense_bonus = p->defense_bonus;
|
||
| client/tilespec.c | ||
|---|---|---|
|
int i, l;
|
||
|
if (!drawing_hash_lookup(t->tile_hash, pterrain->graphic_str, &draw)
|
||
|
&& !drawing_hash_lookup(t->tile_hash, pterrain->graphic_alt, &draw)) {
|
||
|
&& !drawing_hash_lookup(t->tile_hash, pterrain->graphic_alt, &draw)
|
||
|
&& !drawing_hash_lookup(t->tile_hash, pterrain->graphic_alt2, &draw)) {
|
||
|
tileset_error(LOG_FATAL, tileset_name_get(t),
|
||
|
_("Terrain \"%s\": no graphic tile \"%s\" or \"%s\"."),
|
||
|
_("Terrain \"%s\": no graphic tile \"%s\", \"%s\", or \"%s\"."),
|
||
|
terrain_rule_name(pterrain), pterrain->graphic_str,
|
||
|
pterrain->graphic_alt);
|
||
|
pterrain->graphic_alt, pterrain->graphic_alt2);
|
||
|
}
|
||
|
if (draw->init) {
|
||
| common/networking/packets.def | ||
|---|---|---|
|
STRING rule_name[MAX_LEN_NAME];
|
||
|
STRING graphic_str[MAX_LEN_NAME];
|
||
|
STRING graphic_alt[MAX_LEN_NAME];
|
||
|
STRING graphic_alt2[MAX_LEN_NAME];
|
||
|
UINT8 movement_cost; # Whole movement points (not multiplied by SINGLE_MOVE)
|
||
|
SINT16 defense_bonus;
|
||
| common/terrain.h | ||
|---|---|---|
|
#define MAX_NUM_TERRAINS (96)
|
||
|
/*
|
||
|
* This struct gives data about each terrain type. There are many ways
|
||
|
* This struct gives data about each terrain type. There are many ways
|
||
|
* it could be extended.
|
||
|
*/
|
||
|
struct terrain {
|
||
| ... | ... | |
|
struct name_translation name;
|
||
|
bool ruledit_disabled; /* Does not really exist - hole in terrain array */
|
||
|
void *ruledit_dlg;
|
||
|
char graphic_str[MAX_LEN_NAME]; /* add tile_ prefix */
|
||
|
char graphic_str[MAX_LEN_NAME];
|
||
|
char graphic_alt[MAX_LEN_NAME];
|
||
|
char graphic_alt2[MAX_LEN_NAME];
|
||
|
char identifier; /* Single-character identifier used in games saved. */
|
||
|
char identifier_load; /* Single-character identifier that was used in the savegame
|
||
| data/alien/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Savannah")
|
||
|
graphic = "savannah"
|
||
|
graphic_alt = "grassland"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g" ; Since this used to be "Grassland"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Alien Forest")
|
||
|
graphic = "alien_forest"
|
||
|
graphic_alt = "forest"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Radiating Rocks")
|
||
|
graphic = "radiating_rocks"
|
||
|
graphic_alt = "desert"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Thick Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "ocean"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Boiling Ocean")
|
||
|
graphic = "boiling_ocean"
|
||
|
graphic_alt = "floor"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "b"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| data/civ1/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Arctic")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/civ2/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/civ2civ3/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/classic/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/goldkeep/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/granularity/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 5
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 15
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 5
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 5
|
||
| data/multiplayer/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/ruledit/comments-3.3.txt | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching\n\
|
||
|
; preferred graphic is not found, this will be used.\n\
|
||
|
; Otherwise may be \"-\"\n\
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither\n\
|
||
|
; main tag nor first alternate tag is not found.\n\
|
||
|
; identifier = single-character identifier used in savegames. This\n\
|
||
|
; must be unique for each terrain.\n\
|
||
|
; class = Terrain class terrain belongs to: \"Land\" or \"Oceanic\"\n\
|
||
| data/sandbox/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| data/stub/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Generic")
|
||
|
graphic = "generic"
|
||
|
graphic_alt = "grassland"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| data/webperimental/terrain.ruleset | ||
|---|---|---|
|
; graphic_alt = alternate graphic. When no tilespec 'tag' matching
|
||
|
; preferred graphic is not found, this will be used.
|
||
|
; Otherwise may be "-"
|
||
|
; graphic_alt2 = second alternate graphic, to be used when neither
|
||
|
; main tag nor first alternate tag is not found.
|
||
|
; identifier = single-character identifier used in savegames. This
|
||
|
; must be unique for each terrain.
|
||
|
; class = Terrain class terrain belongs to: "Land" or "Oceanic"
|
||
| ... | ... | |
|
name = _("Inaccessible")
|
||
|
graphic = "inaccessible"
|
||
|
graphic_alt = "arctic"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "i"
|
||
|
class = "Land"
|
||
|
movement_cost = 0
|
||
| ... | ... | |
|
name = _("Lake")
|
||
|
graphic = "lake"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "+"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Ocean")
|
||
|
graphic = "coast"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = " "
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Deep Ocean")
|
||
|
graphic = "floor"
|
||
|
graphic_alt = "coast"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = ":"
|
||
|
class = "Oceanic"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Glacier")
|
||
|
graphic = "arctic"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "a"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Desert")
|
||
|
graphic = "desert"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "d"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Forest")
|
||
|
graphic = "forest"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "f"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Grassland")
|
||
|
graphic = "grassland"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "g"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Hills")
|
||
|
graphic = "hills"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "h"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Jungle")
|
||
|
graphic = "jungle"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "j"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Mountains")
|
||
|
graphic = "mountains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "m"
|
||
|
class = "Land"
|
||
|
movement_cost = 3
|
||
| ... | ... | |
|
name = _("Plains")
|
||
|
graphic = "plains"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "p"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| ... | ... | |
|
name = _("Swamp")
|
||
|
graphic = "swamp"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "s"
|
||
|
class = "Land"
|
||
|
movement_cost = 2
|
||
| ... | ... | |
|
name = _("Tundra")
|
||
|
graphic = "tundra"
|
||
|
graphic_alt = "-"
|
||
|
graphic_alt2 = "-"
|
||
|
identifier = "t"
|
||
|
class = "Land"
|
||
|
movement_cost = 1
|
||
| server/ruleset.c | ||
|---|---|---|
|
sz_strlcpy(terrain_control.gui_type_base1, text);
|
||
|
if (ok) {
|
||
|
/* terrain details */
|
||
|
/* Terrain details */
|
||
|
terrain_type_iterate(pterrain) {
|
||
|
const char **slist;
|
||
| ... | ... | |
|
secfile_lookup_str(file, "%s.graphic", tsection));
|
||
|
sz_strlcpy(pterrain->graphic_alt,
|
||
|
secfile_lookup_str(file, "%s.graphic_alt", tsection));
|
||
|
sz_strlcpy(pterrain->graphic_alt2,
|
||
|
secfile_lookup_str(file, "%s.graphic_alt2", tsection));
|
||
|
pterrain->identifier
|
||
|
= secfile_lookup_str(file, "%s.identifier", tsection)[0];
|
||
| ... | ... | |
|
sz_strlcpy(packet.rule_name, rule_name_get(&pterrain->name));
|
||
|
sz_strlcpy(packet.graphic_str, pterrain->graphic_str);
|
||
|
sz_strlcpy(packet.graphic_alt, pterrain->graphic_alt);
|
||
|
sz_strlcpy(packet.graphic_alt2, pterrain->graphic_alt2);
|
||
|
packet.movement_cost = pterrain->movement_cost;
|
||
|
packet.defense_bonus = pterrain->defense_bonus;
|
||
| tools/ruledit/edit_terrain.cpp | ||
|---|---|---|
|
ter_layout->addWidget(label, row, 0);
|
||
|
ter_layout->addWidget(gfx_tag_alt, row++, 1);
|
||
|
label = new QLabel(QString::fromUtf8(R__("Second alt graphics tag")));
|
||
|
label->setParent(this);
|
||
|
gfx_tag_alt2 = new QLineEdit(this);
|
||
|
connect(gfx_tag_alt2, SIGNAL(returnPressed()), this, SLOT(gfx_tag_alt2_given()));
|
||
|
ter_layout->addWidget(label, row, 0);
|
||
|
ter_layout->addWidget(gfx_tag_alt2, row++, 1);
|
||
|
refresh();
|
||
|
main_layout->addLayout(ter_layout);
|
||
| ... | ... | |
|
// Save values from text fields.
|
||
|
gfx_tag_given();
|
||
|
gfx_tag_alt_given();
|
||
|
gfx_tag_alt2_given();
|
||
|
ter->ruledit_dlg = nullptr;
|
||
|
}
|
||
| ... | ... | |
|
defense->setValue(ter->defense_bonus);
|
||
|
gfx_tag->setText(ter->graphic_str);
|
||
|
gfx_tag_alt->setText(ter->graphic_alt);
|
||
|
gfx_tag_alt2->setText(ter->graphic_alt2);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
| ... | ... | |
|
sz_strlcpy(ter->graphic_alt, tag_bytes);
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
User entered new second alternative graphics tag.
|
||
|
**************************************************************************/
|
||
|
void edit_terrain::gfx_tag_alt2_given()
|
||
|
{
|
||
|
QByteArray tag_bytes = gfx_tag_alt2->text().toUtf8();
|
||
|
sz_strlcpy(ter->graphic_alt2, tag_bytes);
|
||
|
}
|
||
| tools/ruledit/edit_terrain.h | ||
|---|---|---|
|
QSpinBox *defense;
|
||
|
QLineEdit *gfx_tag;
|
||
|
QLineEdit *gfx_tag_alt;
|
||
|
QLineEdit *gfx_tag_alt2;
|
||
|
protected:
|
||
|
void closeEvent(QCloseEvent *cevent);
|
||
| ... | ... | |
|
void set_defense_value(int value);
|
||
|
void gfx_tag_given();
|
||
|
void gfx_tag_alt_given();
|
||
|
void gfx_tag_alt2_given();
|
||
|
};
|
||
|
#endif // FC__EDIT_TERRAIN_H
|
||