Feature #2172 ยป 0067-Tiledef-Add-owned-property.patch
| client/packhand.c | ||
|---|---|---|
|
} extra_type_iterate_end;
|
||
|
td->known = p->known;
|
||
|
td->owned = p->owned;
|
||
|
}
|
||
|
/************************************************************************//**
|
||
| common/networking/packets.def | ||
|---|---|---|
|
BV_EXTRAS extras;
|
||
|
BOOL known;
|
||
|
BOOL owned;
|
||
|
end
|
||
|
/**************************************************************************
|
||
| common/tiledef.c | ||
|---|---|---|
|
return FALSE;
|
||
|
}
|
||
|
if (td->owned && pplayer != nullptr
|
||
|
&& tile_owner(ptile) != pplayer) {
|
||
|
return FALSE;
|
||
|
}
|
||
|
return TRUE;
|
||
|
}
|
||
| common/tiledef.h | ||
|---|---|---|
|
enum terrain_flag_id terr_flag;
|
||
|
struct extra_type_list *extras;
|
||
|
bool known;
|
||
|
bool owned;
|
||
|
};
|
||
|
void tiledefs_init(void);
|
||
| data/alien/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/civ1/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/civ2/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/civ2civ3/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/classic/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/goldkeep/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/granularity/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/multiplayer/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/ruledit/comments-3.4.txt | ||
|---|---|---|
|
; extras = List of extras that the tile must have\n\
|
||
|
; to satisfy tiledef requirements.\n\
|
||
|
; known = Whether the target player must know the tile or not\n\
|
||
|
; owned = Whether the tile must be within borders of\n\
|
||
|
; the target player or not\n\
|
||
|
;\n\
|
||
|
; */ <-- avoid gettext warnings\n\
|
||
|
"
|
||
| data/sandbox/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| data/stub/terrain.ruleset | ||
|---|---|---|
|
; extras = List of extras that the tile must have
|
||
|
; to satisfy tiledef requirements.
|
||
|
; known = Whether the target player must know the tile or not
|
||
|
; owned = Whether the tile must be within borders of
|
||
|
; the target player or not
|
||
|
;
|
||
|
; */ <-- avoid gettext warnings
|
||
| server/ruleset/ruleload.c | ||
|---|---|---|
|
if (ok) {
|
||
|
td->known = secfile_lookup_bool_default(file, FALSE,
|
||
|
"%s.known", section);
|
||
|
td->owned = secfile_lookup_bool_default(file, FALSE,
|
||
|
"%s.owned", section);
|
||
|
}
|
||
|
if (!ok) {
|
||
| ... | ... | |
|
packet.extras = extras;
|
||
|
packet.known = td->known;
|
||
|
packet.owned = td->owned;
|
||
|
lsend_packet_ruleset_tiledef(dest, &packet);
|
||
|
} tiledef_iterate_end;
|
||
| tools/ruleutil/rulesave.c | ||
|---|---|---|
|
if (td->known) {
|
||
|
secfile_insert_bool(sfile, td->known, "%s.known", path);
|
||
|
}
|
||
|
if (td->owned) {
|
||
|
secfile_insert_bool(sfile, td->owned, "%s.owned", path);
|
||
|
}
|
||
|
} tiledef_iterate_end;
|
||
|
return save_ruleset_file(sfile, filename);
|
||