Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit bc45002

Browse files
committed
Rename tags and prepare for ObjectBrowser update
1 parent dd5cf3f commit bc45002

File tree

5 files changed

+29
-20
lines changed

5 files changed

+29
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
- Now buildings whose hp is 0 will be displayed as their rubble frame
66
- Currently the rubble will probably be drawn with an incorrect palette
77
- New ***ExtConfig*** : `HideNoRubbleBuilding` = **BOOLEAN**, defaults to false, enable it so Buildings with `LeaveRubble=no` will be hide if their HP = 0
8+
- New ***ExtConfig*** : `ModernObjectBrowser` = **BOOLEAN**, defaults to false, enable it to use the experimental object browser
9+
- Renamed ***ExtConfig*** : `BrowserRedraw.GuessMode` to `ObjectBrowser.GuessMode`
10+
- Renamed ***ExtConfig*** : `BrowserRedraw.CleanUp` to `ObjectBrowser.CleanUp`
11+
- Renamed ***ExtConfig*** : `BrowserRedraw.SafeHouses` to `ObjectBrowser.SafeHouses`
812
- Multiselection deselect all hotkey changed from CTRL+D into CTRL+SHIFT+D
913
- Added hotkey CTRL+SHIFT+F for Navigate to coordinate
1014
- SliderCtrl now displays tooltip indicating current strength of the object

DOCUMENT.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,12 @@ Now this feature supports RaiseSingleTile/LowerSingleTile (though they are not "
2828
## BASIC TYPES
2929
- FAData.ini
3030
- [ExtConfigs]
31-
- `BrowserRedraw` = **BOOLEAN** ; Enable refactored ObjectBrowserView
32-
- `BrowserRedraw.GuessMode` = **$0/1$** ; Determines how FA2sp guess Technos' side, $0$(Default) to Prerequisite, $1$ to use first Owner
33-
- `BrowserRedraw.CleanUp` = **BOOLEAN** ; Sides classification will clear empty items
34-
- `BrowserRedraw.SafeHouses` = **BOOLEAN** ; Determines whether FA2sp will rearrangement the houses or not
31+
- **ObjectBrowser**, if `ModernObjectBrowser` is enabled, `BrowserRedraw` won't be useful
32+
- `BrowserRedraw` = **BOOLEAN** ; Enable refactored ObjectBrowserView
33+
- `ModernObjectBrowser` = **BOOLEAN** ; If this value is true, then experimental object browser will be enabled, replacing the vanilla tree view, defaults to **false**
34+
- `ObjectBrowser.GuessMode` = **$0/1$** ; Determines how FA2sp guess Technos' side, $0$(Default) to Prerequisite, $1$ to use first Owner
35+
- `ObjectBrowser.CleanUp` = **BOOLEAN** ; Sides classification will clear empty items
36+
- `ObjectBrowser.SafeHouses` = **BOOLEAN** ; Determines whether FA2sp will rearrangement the houses or not
3537
- `AllowIncludes` = **BOOLEAN** ; Read #include section for other ini (NOT RECOMMENDED)
3638
- `AllowPlusEqual` = **BOOLEAN** ; Read += (NOT RECOMMENDED)
3739
- `TutorialTexts.Fix` = **BOOLEAN** ; Replace original process while loading texts to comboboxes

FA2sp/Ext/CFinalSunDlg/Body.ObjectBrowserControl.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void CViewObjectsExt::Redraw_Initialize()
112112
loadSet("VehicleTypes", Set_Vehicle);
113113
loadSet("AircraftTypes", Set_Aircraft);
114114

115-
if (ExtConfigs::BrowserRedraw_GuessMode == 1)
115+
if (ExtConfigs::ObjectBrowser_GuessMode == 1)
116116
{
117117
auto loadOwner = []()
118118
{
@@ -221,7 +221,7 @@ void CViewObjectsExt::Redraw_Owner()
221221
HTREEITEM& hOwner = ExtNodes[Root_Owner];
222222
if (hOwner == NULL) return;
223223

224-
if (ExtConfigs::BrowserRedraw_SafeHouses)
224+
if (ExtConfigs::ObjectBrowser_SafeHouses)
225225
{
226226
if (CMapData::Instance->IsMultiOnly())
227227
{
@@ -302,7 +302,7 @@ void CViewObjectsExt::Redraw_Infantry()
302302
}
303303

304304
// Clear up
305-
if (ExtConfigs::BrowserRedraw_CleanUp)
305+
if (ExtConfigs::ObjectBrowser_CleanUp)
306306
{
307307
for (auto& subnode : subNodes)
308308
{
@@ -351,7 +351,7 @@ void CViewObjectsExt::Redraw_Vehicle()
351351
}
352352

353353
// Clear up
354-
if (ExtConfigs::BrowserRedraw_CleanUp)
354+
if (ExtConfigs::ObjectBrowser_CleanUp)
355355
{
356356
for (auto& subnode : subNodes)
357357
{
@@ -401,7 +401,7 @@ void CViewObjectsExt::Redraw_Aircraft()
401401
}
402402

403403
// Clear up
404-
if (ExtConfigs::BrowserRedraw_CleanUp)
404+
if (ExtConfigs::ObjectBrowser_CleanUp)
405405
{
406406
for (auto& subnode : subNodes)
407407
{
@@ -451,7 +451,7 @@ void CViewObjectsExt::Redraw_Building()
451451
}
452452

453453
// Clear up
454-
if (ExtConfigs::BrowserRedraw_CleanUp)
454+
if (ExtConfigs::ObjectBrowser_CleanUp)
455455
{
456456
for (auto& subnode : subNodes)
457457
{
@@ -991,7 +991,7 @@ int CViewObjectsExt::GuessGenericSide(const char* pRegName, int nType)
991991
if (set.find(pRegName) == set.end())
992992
return -1;
993993

994-
switch (ExtConfigs::BrowserRedraw_GuessMode)
994+
switch (ExtConfigs::ObjectBrowser_GuessMode)
995995
{
996996
default:
997997
case 0:

FA2sp/FA2sp.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ std::map<ppmfc::CString, ppmfc::CString> FA2sp::TutorialTextsMap;
1919
void* FA2sp::pExceptionHandler = nullptr;
2020

2121
bool ExtConfigs::BrowserRedraw;
22-
int ExtConfigs::BrowserRedraw_GuessMode;
23-
bool ExtConfigs::BrowserRedraw_CleanUp;
24-
bool ExtConfigs::BrowserRedraw_SafeHouses;
22+
int ExtConfigs::ObjectBrowser_GuessMode;
23+
bool ExtConfigs::ObjectBrowser_CleanUp;
24+
bool ExtConfigs::ObjectBrowser_SafeHouses;
2525
bool ExtConfigs::AllowIncludes;
2626
bool ExtConfigs::AllowPlusEqual;
2727
bool ExtConfigs::TutorialTexts_Hide;
@@ -58,16 +58,18 @@ bool ExtConfigs::NoHouseNameTranslation;
5858
bool ExtConfigs::EnableMultiSelection;
5959
bool ExtConfigs::ExtendedValidationNoError;
6060
bool ExtConfigs::HideNoRubbleBuilding;
61+
bool ExtConfigs::ModernObjectBrowser;
6162

6263
MultimapHelper Variables::Rules = { &CINI::Rules(), &CINI::CurrentDocument() };
6364
MultimapHelper Variables::FAData = { &CINI::FAData() };
6465

6566
void FA2sp::ExtConfigsInitialize()
6667
{
6768
ExtConfigs::BrowserRedraw = CINI::FAData->GetBool("ExtConfigs", "BrowserRedraw");
68-
ExtConfigs::BrowserRedraw_GuessMode = CINI::FAData->GetInteger("ExtConfigs", "BrowserRedraw.GuessMode", 0);
69-
ExtConfigs::BrowserRedraw_CleanUp = CINI::FAData->GetBool("ExtConfigs", "BrowserRedraw.CleanUp");
70-
ExtConfigs::BrowserRedraw_SafeHouses = CINI::FAData->GetBool("ExtConfigs", "BrowserRedraw.SafeHouses");
69+
ExtConfigs::ModernObjectBrowser = CINI::FAData->GetBool("ExtConfigs", "ModernObjectBrowser");
70+
ExtConfigs::ObjectBrowser_GuessMode = CINI::FAData->GetInteger("ExtConfigs", "ObjectBrowser.GuessMode", 0);
71+
ExtConfigs::ObjectBrowser_CleanUp = CINI::FAData->GetBool("ExtConfigs", "ObjectBrowser.CleanUp");
72+
ExtConfigs::ObjectBrowser_SafeHouses = CINI::FAData->GetBool("ExtConfigs", "ObjectBrowser.SafeHouses");
7173

7274
ExtConfigs::AllowIncludes = CINI::FAData->GetBool("ExtConfigs", "AllowIncludes");
7375
ExtConfigs::AllowPlusEqual = CINI::FAData->GetBool("ExtConfigs", "AllowPlusEqual");

FA2sp/FA2sp.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ class ExtConfigs
2727
{
2828
public:
2929
static bool BrowserRedraw;
30-
static int BrowserRedraw_GuessMode;
31-
static bool BrowserRedraw_CleanUp;
32-
static bool BrowserRedraw_SafeHouses;
30+
static int ObjectBrowser_GuessMode;
31+
static bool ObjectBrowser_CleanUp;
32+
static bool ObjectBrowser_SafeHouses;
3333
static bool AllowIncludes;
3434
static bool AllowPlusEqual;
3535
static bool TutorialTexts_Hide;
@@ -66,6 +66,7 @@ class ExtConfigs
6666
static bool EnableMultiSelection;
6767
static bool ExtendedValidationNoError;
6868
static bool HideNoRubbleBuilding;
69+
static bool ModernObjectBrowser;
6970
};
7071

7172
class Variables

0 commit comments

Comments
 (0)