Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,14 @@ TypeSelectUseIFVMode=false ; boolean
WeaponGroupAsN= ; string, default to N if [General] -> TypeSelectUseIFVMode=true, and 0 if false
```

- This behavior is designed to be toggleable by users. For now you can only do that externally via client or manually.

In `RA2MD.INI`:
```ini
[Phobos]
TypeSelectUseIFVMode=true ; boolean
```

### Customizing crushing tilt and slowdown

- Vehicles with `Crusher=true` and `OmniCrusher=true` / `MovementZone=CrusherAll` were hardcoded to tilt when crushing vehicles / walls respectively. This now obeys `TiltsWhenCrushes` but can be customized individually for these two scenarios using `TiltsWhenCrusher.Vehicles` and `TiltsWhenCrusher.Overlays`, which both default to `TiltsWhenCrushes`.
Expand Down
8 changes: 8 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Fixed-or-Improved-Logics.po
Original file line number Diff line number Diff line change
Expand Up @@ -4479,6 +4479,14 @@ msgid ""
"weapons, which makes type selection on IFVs work the same as before."
msgstr "若设为 false 则 `WeaponGroupAsN` 将默认为 0 以保持原有行为。"

msgid ""
"This behavior is designed to be toggleable by users. For now you can only"
" do that externally via client or manually."
msgstr "此行为设计为可由用户切换。目前你只能通过客户端或进行手动设置。"

msgid "In `RA2MD.INI`:"
msgstr "在 `RA2MD.INI`:"

msgid "Customizing crushing tilt and slowdown"
msgstr "自定义碾压倾斜和减速"

Expand Down
4 changes: 2 additions & 2 deletions src/Misc/Selection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class ExtSelection
char* gunnerID = pTypeExt->WeaponGroupAs[pTechno->CurrentWeaponNumber];

if (!GeneralUtils::IsValidString(gunnerID))
sprintf_s(gunnerID, 0x20, "%d", RulesExt::Global()->TypeSelectUseIFVMode ? pTechno->CurrentWeaponNumber + 1 : 0);
sprintf_s(gunnerID, 0x20, "%d", RulesExt::Global()->TypeSelectUseIFVMode && Phobos::Config::TypeSelectUseIFVMode ? pTechno->CurrentWeaponNumber + 1 : 0);

if (std::ranges::none_of(ExtSelection::IFVGroups, [gunnerID](const char* pID) { return !_stricmp(pID, gunnerID); }))
break;
Expand Down Expand Up @@ -188,7 +188,7 @@ DEFINE_FUNCTION_JUMP(LJMP, 0x6D9FF0, ExtSelection::Tactical_MakeFilteredSelectio

DEFINE_HOOK(0x73298D, TypeSelectExecute_UseIFVMode, 0x5)
{
const bool useIFVMode = RulesExt::Global()->TypeSelectUseIFVMode;
const bool useIFVMode = RulesExt::Global()->TypeSelectUseIFVMode && Phobos::Config::TypeSelectUseIFVMode;

for (const auto pObject : ObjectClass::CurrentObjects)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Phobos.INI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ bool Phobos::Config::ToolTipDescriptions = true;
bool Phobos::Config::ToolTipBlur = false;
bool Phobos::Config::PrioritySelectionFiltering = true;
bool Phobos::Config::PriorityDeployFiltering = true;
bool Phobos::Config::TypeSelectUseIFVMode = true;
bool Phobos::Config::DevelopmentCommands = true;
bool Phobos::Config::SuperWeaponSidebarCommands = false;
bool Phobos::Config::ShowPlanningPath = false;
Expand Down Expand Up @@ -90,6 +91,7 @@ DEFINE_HOOK(0x5FACDF, OptionsClass_LoadSettings_LoadPhobosSettings, 0x5)
Phobos::Config::ToolTipBlur = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "ToolTipBlur", false);
Phobos::Config::PrioritySelectionFiltering = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "PrioritySelectionFiltering", true);
Phobos::Config::PriorityDeployFiltering = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "PriorityDeployFiltering", true);
Phobos::Config::TypeSelectUseIFVMode = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "TypeSelectUseIFVMode", true);
Phobos::Config::ShowPlacementPreview = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "ShowPlacementPreview", true);
Phobos::Config::MessageApplyHoverState = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "MessageApplyHoverState", false);
Phobos::Config::MessageDisplayInCenter = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "MessageDisplayInCenter", false);
Expand Down
1 change: 1 addition & 0 deletions src/Phobos.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class Phobos
static bool ToolTipBlur;
static bool PrioritySelectionFiltering;
static bool PriorityDeployFiltering;
static bool TypeSelectUseIFVMode;
static bool DevelopmentCommands;
static bool SuperWeaponSidebarCommands;
static bool ArtImageSwap;
Expand Down
Loading