mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-09 13:11:40 -04:00
fixed terrain list item skipped issue, caused by refine .
This commit is contained in:
parent
d45137f942
commit
52151f6ce5
2 changed files with 23 additions and 6 deletions
|
@ -3057,7 +3057,7 @@ void CLoading::InitTMPs(CProgressCtrl* prog)
|
|||
bMorph = TRUE;
|
||||
}
|
||||
|
||||
if (!pSec->GetBool("AllowToPlace")) {
|
||||
if (!pSec->GetBool("AllowToPlace", true)) {
|
||||
bPlace = FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -156,8 +156,8 @@ void CTerrainDlg::Update()
|
|||
string += TranslateStringACP(pSec->GetString("SetName"));
|
||||
string += ")";
|
||||
|
||||
BOOL bForced = FALSE;
|
||||
BOOL bForcedNot = FALSE;
|
||||
bool bForced = false;
|
||||
bool bIgnore = false;
|
||||
|
||||
|
||||
// force yes
|
||||
|
@ -165,16 +165,33 @@ void CTerrainDlg::Update()
|
|||
auto tsetc = CString(std::to_string(atoi(tset)).c_str());
|
||||
|
||||
if (g_data["UseSet" + theaterType].HasValue(tsetc)) {
|
||||
bForced = TRUE;
|
||||
bForced = true;
|
||||
}
|
||||
|
||||
// force no
|
||||
if (g_data["IgnoreSet" + theaterType].HasValue(tsetc)) {
|
||||
bForcedNot = TRUE;
|
||||
bIgnore = true;
|
||||
}
|
||||
|
||||
auto legal = false;
|
||||
do {
|
||||
if (bForced) {
|
||||
legal = true;
|
||||
break;
|
||||
}
|
||||
if (bIgnore) {
|
||||
break;
|
||||
}
|
||||
auto const& tile = (*tiledata)[tilecount];
|
||||
if (tile.bMarbleMadness) {
|
||||
break;
|
||||
}
|
||||
if (tile.bAllowToPlace) {
|
||||
legal = true;
|
||||
}
|
||||
} while (0);
|
||||
|
||||
if (bForced || (!bForcedNot && (*tiledata)[tilecount].bAllowToPlace && !(*tiledata)[tilecount].bMarbleMadness)) {
|
||||
if (legal) {
|
||||
TileSet->SetItemData(TileSet->AddString(string), i);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue