- added blanket protection to all submenus of OptionsMenu, except the player menu.
Sadly, some mods are truly careless enough to modify the engine internal menus to add their own things, which should have no business whatsoever in there. As an example, in a D4D version released in May, the Display Options menu is showing quite a bit of outdated content and missing important settings.
This commit is contained in:
parent
8482653bbc
commit
ee3d73478a
3 changed files with 39 additions and 37 deletions
|
|
@ -521,9 +521,9 @@ static bool ReplaceMenu(FScanner &sc, DMenuDescriptor *desc)
|
|||
DMenuDescriptor **pOld = MenuDescriptors.CheckKey(desc->mMenuName);
|
||||
if (pOld != nullptr && *pOld != nullptr)
|
||||
{
|
||||
if (desc->mMenuName == NAME_Optionsmenu)
|
||||
if ((*pOld)->mProtected)
|
||||
{
|
||||
sc.ScriptMessage("Cannot replace the main options menu!");
|
||||
sc.ScriptMessage("Cannot replace protected menu %s!", desc->mMenuName.GetChars());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -881,6 +881,7 @@ static void ParseOptionMenu(FScanner &sc)
|
|||
desc->mScrollTop = DefaultOptionMenuSettings->mScrollTop;
|
||||
desc->mIndent = DefaultOptionMenuSettings->mIndent;
|
||||
desc->mDontDim = DefaultOptionMenuSettings->mDontDim;
|
||||
desc->mProtected = sc.CheckString("protected");
|
||||
|
||||
ParseOptionMenuBody(sc, desc);
|
||||
ReplaceMenu(sc, desc);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue