Skip to content

Commit 273d706

Browse files
committed
menu: general intensity description
1 parent 1e39d85 commit 273d706

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

src/helpers/menu_descriptors/main.wss

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,37 @@ class RER_MainMenuDescriptor extends SU_MenuDescriptor {
99
"Enabling <font color='#CD7D03'>Performance Mode</font> will alter how the mod operates to focus even more on performances, sometimes by ignoring the values from the menu to use pre-defined ones, or by disabling features like the Ecosystem for a smoother experience at the cost of immersion.<br/><br/>Changes to the option requires a reload of the save to take effect."
1010
);
1111

12-
this.onHover(
12+
this.onHoverDynamic(
1313
'RERgeneralIntensity',
14-
"This slider allows you to instantly speed up or slow down every system in the mod at once, the values of each individual system are then multiplied by the % you specify here.<br/><br/. If you feel like there is too much happening then turning it down to 50% is the way to go, or if you'd like more of what the mod offers then turning it up to 200% will do exactly that."
14+
"This slider allows you to instantly speed up or slow down every system in the mod at once, the values of each individual system are then multiplied by the % you specify here.<br/><br/>If you feel like there is too much happening then turning it down to 50% is the way to go, or if you'd like more of what the mod offers then turning it up to 200% will do exactly that."
1515
);
1616
}
17+
18+
protected function dynamicDescription(
19+
/// the current menu
20+
menu: string,
21+
/// the currently hovered field
22+
option: name,
23+
/// the current description that's going to be displayed
24+
description: string
25+
): string {
26+
var value: float;
27+
28+
if (option == 'RERgeneralIntensity') {
29+
value = StringToFloat(
30+
theGame
31+
.GetInGameConfigWrapper()
32+
.GetVarValue('RERmain', option)
33+
);
34+
35+
if (value > 200.0) {
36+
return description + "<br/><br/>A value above 200% can cause performance issues from the amount of spawns it will cause, adjust encounter settings and more specifically the death threshold accordingly (a lower value).";
37+
}
38+
}
39+
40+
// unchanged description for any result we do not handle.
41+
return description;
42+
}
1743
}
1844

1945
@wrapMethod(CR4IngameMenu)

0 commit comments

Comments
 (0)