Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fog of war to the patch map #4462

Closed
Closed
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
659a409
Added basics for implementing fog of war
ender-titan1 Sep 10, 2023
9c6ce8d
Added basic fog of war implemetation
ender-titan1 Sep 10, 2023
75bb23c
Improved fog of war
ender-titan1 Sep 10, 2023
cc0dc3a
Hide info from player when inspecting unknown patches
ender-titan1 Sep 10, 2023
4276a09
Finish basic implementation
ender-titan1 Sep 10, 2023
9eb100d
Add freebuild implementation
ender-titan1 Sep 10, 2023
196b8a5
Stopped unexplored patches from highlighting connections
ender-titan1 Sep 11, 2023
a0b87b7
Fixed problem with changing region links
ender-titan1 Sep 11, 2023
b3be32c
Auto-evo exploring tool ignores fog of war
ender-titan1 Sep 12, 2023
818fb0a
Add cheat to reveal the entire patch map
ender-titan1 Sep 12, 2023
3a9b820
Fixed issue with incorrectly rendered region links
ender-titan1 Sep 13, 2023
bee8c09
Undo accidental change
ender-titan1 Sep 14, 2023
79f8810
Moved code to different editor class
ender-titan1 Sep 14, 2023
c995838
Fixed formatting
ender-titan1 Sep 14, 2023
5dd669c
Merge master into fog-of-war
ender-titan1 Sep 14, 2023
aa0e079
Update localization
ender-titan1 Sep 14, 2023
f21193f
Removed redundant field
ender-titan1 Sep 14, 2023
5f7f369
Removed manual setter
ender-titan1 Sep 14, 2023
184f2bf
Add fog of war toggle
ender-titan1 Sep 16, 2023
4a0552f
Update locale
ender-titan1 Sep 16, 2023
41f17f1
Update xml comment and add placeholder text
ender-titan1 Sep 18, 2023
ef12dbf
Update locale
ender-titan1 Sep 18, 2023
b1fb201
Add exploration modes
ender-titan1 Sep 19, 2023
349cf5f
Remove unknown patches from report
ender-titan1 Sep 20, 2023
74ceac2
Add basic dynamic region links
ender-titan1 Sep 21, 2023
7be9bc3
Fix lines being too long
ender-titan1 Sep 21, 2023
23a7f28
Fix some other formatting
ender-titan1 Sep 21, 2023
9b04e69
Implement many requested changes
ender-titan1 Sep 22, 2023
c17e9bd
Implement even more requested changes
ender-titan1 Sep 22, 2023
185c9c9
Refactor code to use Line2D and add fade
ender-titan1 Sep 23, 2023
7c37a85
Refactor a bunch of code to use structs/enums
ender-titan1 Sep 23, 2023
93bd9fd
Refactor borders to use Line2D
ender-titan1 Sep 24, 2023
f904d03
Get links to render corretly (for the most part)
ender-titan1 Sep 25, 2023
54a7b6d
Finally get the lines to render properly
ender-titan1 Sep 26, 2023
cb88b13
Other small fixes
ender-titan1 Sep 26, 2023
af3e28b
Fix formatting
ender-titan1 Sep 26, 2023
9b306ee
Small ci fix
ender-titan1 Sep 26, 2023
4e59ca3
Convert back to using draw calls for borders
ender-titan1 Sep 26, 2023
cb52483
Update code
ender-titan1 Sep 28, 2023
168e008
Update FogOfWarMode.cs
ender-titan1 Sep 28, 2023
2ff1190
Update RunResults.cs
ender-titan1 Sep 29, 2023
294616d
Implement requested changes
ender-titan1 Sep 29, 2023
e391456
Merge branch 'fog-of-war' of https://github.com/ender-titan1/Thrive i…
ender-titan1 Sep 29, 2023
42ad335
Get loading to work mostly properly
ender-titan1 Sep 29, 2023
20c380e
Clean up some code
ender-titan1 Sep 30, 2023
d32ec81
Account for multiple connections between the same regions
ender-titan1 Oct 1, 2023
bad76f7
Some more cleanup
ender-titan1 Oct 1, 2023
cf5e093
Begin drawer refactor
ender-titan1 Oct 2, 2023
0434c71
Update AdjustEndpoints method
ender-titan1 Oct 2, 2023
abf86ff
Finish base for refactor
ender-titan1 Oct 2, 2023
4cf2a16
Make sure graphics are updated
ender-titan1 Oct 2, 2023
2d2dec0
Stop rendering multiple links between explored regions
ender-titan1 Oct 2, 2023
20e3e27
RegionLink now handles endpoint adjustment
ender-titan1 Oct 3, 2023
5070256
Add an algorithm to separate endpoints
ender-titan1 Oct 4, 2023
821cf1c
Remove RegionLinkGroup
ender-titan1 Oct 14, 2023
b93b86f
Make sure multi-patch connections do not shitft
ender-titan1 Oct 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
406 changes: 221 additions & 185 deletions locale/af.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/ar.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/bg.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/ca.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/cs.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/da.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/de.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/el.po

Large diffs are not rendered by default.

423 changes: 231 additions & 192 deletions locale/en.po

Large diffs are not rendered by default.

422 changes: 233 additions & 189 deletions locale/eo.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/es.po

Large diffs are not rendered by default.

417 changes: 232 additions & 185 deletions locale/es_AR.po

Large diffs are not rendered by default.

432 changes: 241 additions & 191 deletions locale/et.po

Large diffs are not rendered by default.

428 changes: 237 additions & 191 deletions locale/fi.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/fr.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/frm.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/he.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/hr.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/hu.po

Large diffs are not rendered by default.

425 changes: 236 additions & 189 deletions locale/id.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/it.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/ka.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/ko.po

Large diffs are not rendered by default.

407 changes: 222 additions & 185 deletions locale/la.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/lb_LU.po

Large diffs are not rendered by default.

417 changes: 232 additions & 185 deletions locale/lt.po

Large diffs are not rendered by default.

427 changes: 236 additions & 191 deletions locale/lv.po

Large diffs are not rendered by default.

404 changes: 220 additions & 184 deletions locale/messages.pot

Large diffs are not rendered by default.

407 changes: 222 additions & 185 deletions locale/nb_NO.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/nl.po

Large diffs are not rendered by default.

428 changes: 237 additions & 191 deletions locale/nl_BE.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/pl.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/pt_BR.po

Large diffs are not rendered by default.

432 changes: 241 additions & 191 deletions locale/pt_PT.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/ro.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/ru.po

Large diffs are not rendered by default.

412 changes: 227 additions & 185 deletions locale/si_LK.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/sk.po

Large diffs are not rendered by default.

422 changes: 233 additions & 189 deletions locale/sr_Cyrl.po

Large diffs are not rendered by default.

422 changes: 233 additions & 189 deletions locale/sr_Latn.po

Large diffs are not rendered by default.

422 changes: 233 additions & 189 deletions locale/sv.po

Large diffs are not rendered by default.

418 changes: 233 additions & 185 deletions locale/th_TH.po

Large diffs are not rendered by default.

407 changes: 222 additions & 185 deletions locale/tok.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/tr.po

Large diffs are not rendered by default.

425 changes: 237 additions & 188 deletions locale/uk.po

Large diffs are not rendered by default.

406 changes: 221 additions & 185 deletions locale/vi.po

Large diffs are not rendered by default.

421 changes: 233 additions & 188 deletions locale/zh_CN.po

Large diffs are not rendered by default.

428 changes: 237 additions & 191 deletions locale/zh_TW.po

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions simulation_parameters/common/difficulty_presets.json
Expand Up @@ -10,6 +10,7 @@
"osmoregulationMultiplier": 0.8,
"freeGlucoseCloud": true,
"passiveReproduction": true,
"patchMapExplorationMode": "Light",
"limitGrowthRate": false
},
"normal": {
Expand All @@ -23,6 +24,7 @@
"osmoregulationMultiplier": 1,
"freeGlucoseCloud": true,
"passiveReproduction": true,
"patchMapExplorationMode": "Intense",
ender-titan1 marked this conversation as resolved.
Show resolved Hide resolved
"limitGrowthRate": true
},
"hard": {
Expand All @@ -36,6 +38,7 @@
"osmoregulationMultiplier": 1.2,
"freeGlucoseCloud": false,
"passiveReproduction": true,
"patchMapExplorationMode": "Intense",
"limitGrowthRate": true
},
"custom": {
Expand Down
4 changes: 3 additions & 1 deletion src/auto-evo/AutoEvoExploringTool.tscn
Expand Up @@ -857,12 +857,14 @@ anchor_bottom = 0.0
margin_right = 792.0
margin_bottom = 206.0
DrawDefaultMapIfEmpty = false
IgnoreFogOfWar = true

[node name="PatchDetailsPanel" parent="GUI/VBoxContainer/HistoryReportSplit/PatchMap/HBoxContainer" instance=ExtResource( 17 )]
margin_left = 834.0
margin_right = 1180.0
margin_bottom = 518.0
MoveToPatchButtonVisible = false
IgnoreFogOfWar = true

[node name="Report" type="Control" parent="GUI/VBoxContainer/HistoryReportSplit"]
visible = false
Expand Down Expand Up @@ -1025,8 +1027,8 @@ HideCancelButton = true
[connection signal="value_changed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer3/FinishXGenerationsSpin" to="." method="OnFinishXGenerationsSpinBoxValueChanged"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer3/FinishXGenerations" to="." method="OnFinishXGenerationsButtonPressed"]
[connection signal="value_changed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer4/RunXWorldsSpin" to="." method="OnRunXWorldsSpinBoxValueChanged"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer4/RunXWorlds" to="." method="OnFinishXGenerationsButtonPressed"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer4/RunXWorlds" to="." method="OnRunXWorldsButtonPressed"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer4/RunXWorlds" to="." method="OnFinishXGenerationsButtonPressed"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/Abort" to="." method="OnAbortButtonPressed"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/PlayWithThis" to="." method="PlayWithCurrentSettingPressed"]
[connection signal="pressed" from="GUI/VBoxContainer/WorldEditor/VBoxContainer/PanelContainer/MarginContainer/VBoxContainer/WorldExportButton" to="." method="ExportWorlds"]
Expand Down
8 changes: 8 additions & 0 deletions src/auto-evo/RunResults.cs
Expand Up @@ -599,6 +599,14 @@ public void PrintSummary(PatchMap? previousPopulations = null)
LocalizedStringBuilder PatchString(Patch patch)
{
var builder2 = new LocalizedStringBuilder(80);

if (!patch.Explored)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this method needs to have a parameter to skip Fog of war, so that the report to be shown in the auto-evo exploration tool works well.

{
var unknownPatch = new LocalizedString("UNKNOWN_PATCH");
builder2.Append(unknownPatch);
return builder2;
}

if (!playerReadable)
{
builder2.Append(patch.ID);
Expand Down
Expand Up @@ -115,6 +115,11 @@ public void OnCurrentPatchUpdated(Patch patch)
cellEditorTab.UpdateBackgroundImage(patch.BiomeTemplate);
}

public void UpdateReportTabPatchSelector()
{
reportTab.UpdateReportTabPatchSelector();
}

public override int WhatWouldActionsCost(IEnumerable<EditorCombinableActionData> actions)
{
return history.WhatWouldActionsCost(actions);
Expand Down
10 changes: 10 additions & 0 deletions src/engine/CheatManager.cs
Expand Up @@ -27,6 +27,11 @@ static CheatManager()
/// </summary>
public static event EventHandler<EventArgs>? OnDespawnAllEntitiesCheatUsed;

/// <summary>
/// Fired whenerver the user uses the "Reveal Entire Patch Map" cheat
/// </summary>
public static event EventHandler<EventArgs>? OnRevealEntirePatchMapCheatUsed;

/// <summary>
/// You automatically have 100% of all compounds
/// </summary>
Expand Down Expand Up @@ -79,6 +84,11 @@ public static void DespawnAllEntities()
OnDespawnAllEntitiesCheatUsed?.Invoke(null, EventArgs.Empty);
}

public static void RevealEntirePatchMap()
{
OnRevealEntirePatchMapCheatUsed?.Invoke(null, EventArgs.Empty);
}

public static void DisableAllCheats()
{
InfiniteCompounds = false;
Expand Down
1 change: 1 addition & 0 deletions src/general/CustomDifficulty.cs
Expand Up @@ -12,5 +12,6 @@ public class CustomDifficulty : IDifficulty
public float OsmoregulationMultiplier { get; set; }
public bool FreeGlucoseCloud { get; set; }
public bool PassiveReproduction { get; set; }
public PatchMap.FogOfWarMode PatchMapExplorationMode { get; set; }
public bool LimitGrowthRate { get; set; }
}
3 changes: 3 additions & 0 deletions src/general/DifficultyPreset.cs
Expand Up @@ -51,6 +51,9 @@ public class DifficultyPreset : IDifficulty, IRegistryType
[JsonProperty]
public bool PassiveReproduction { get; private set; }

[JsonProperty]
public PatchMap.FogOfWarMode PatchMapExplorationMode { get; private set; }

[JsonProperty]
public bool LimitGrowthRate { get; private set; }

Expand Down
8 changes: 8 additions & 0 deletions src/general/IDifficulty.cs
Expand Up @@ -44,6 +44,12 @@ public interface IDifficulty : IRegistryAssignable
/// </summary>
public bool PassiveReproduction { get; }

/// <summary>
/// If true, the patch map will have to be discovered by the player instead of having the
ender-titan1 marked this conversation as resolved.
Show resolved Hide resolved
/// entire patch map revealed at the start
/// </summary>
public PatchMap.FogOfWarMode PatchMapExplorationMode { get; }

/// <summary>
/// Whether microbes are limited in how fast they can consume reproduction compounds to grow
/// </summary>
Expand All @@ -64,6 +70,7 @@ public static CustomDifficulty Clone(this IDifficulty difficulty)
OsmoregulationMultiplier = difficulty.OsmoregulationMultiplier,
FreeGlucoseCloud = difficulty.FreeGlucoseCloud,
PassiveReproduction = difficulty.PassiveReproduction,
PatchMapExplorationMode = difficulty.PatchMapExplorationMode,
LimitGrowthRate = difficulty.LimitGrowthRate,
};
}
Expand All @@ -81,6 +88,7 @@ public static string GetDescriptionString(this IDifficulty difficulty)
$", Osmoregulation multiplier: {difficulty.OsmoregulationMultiplier}" +
$", Free glucose cloud: {difficulty.FreeGlucoseCloud}" +
$", Passive Reproduction: {difficulty.PassiveReproduction}" +
$", Patch Map Exploration: {difficulty.PatchMapExplorationMode}" +
$", Limit Growth Rate: {difficulty.LimitGrowthRate}";
}
}
1 change: 0 additions & 1 deletion src/general/MainMenu.tscn
Expand Up @@ -898,7 +898,6 @@ visible = false
visible = false

[node name="NewGameSettings" parent="." instance=ExtResource( 18 )]
visible = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintended change to this being visible by default.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line of code is still here...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting again to add this (and my previous comment) to my current review.


[node name="Thriveopedia" parent="." instance=ExtResource( 49 )]
visible = false
Expand Down
60 changes: 60 additions & 0 deletions src/general/NewGameSettings.cs
Expand Up @@ -96,6 +96,12 @@ public class NewGameSettings : ControlWithInput
[Export]
public NodePath PassiveReproductionButtonPath = null!;

[Export]
public NodePath PatchMapExplorationModePath = null!;

[Export]
public NodePath PatchMapExplorationModeDescriptionPath = null!;

[Export]
public NodePath LimitGrowthRateButtonPath = null!;

Expand Down Expand Up @@ -176,6 +182,8 @@ public class NewGameSettings : ControlWithInput
private Button freeGlucoseCloudButton = null!;
private Button passiveReproductionButton = null!;
private Button limitGrowthRateButton = null!;
private OptionButton patchMapExplorationMode = null!;
private Label patchMapExplorationModeDescription = null!;

// Planet controls
private OptionButton lifeOriginButton = null!;
Expand Down Expand Up @@ -257,6 +265,8 @@ public override void _Ready()
osmoregulationMultiplierReadout = GetNode<LineEdit>(OsmoregulationMultiplierReadoutPath);
freeGlucoseCloudButton = GetNode<Button>(FreeGlucoseCloudButtonPath);
passiveReproductionButton = GetNode<Button>(PassiveReproductionButtonPath);
patchMapExplorationMode = GetNode<OptionButton>(PatchMapExplorationModePath);
patchMapExplorationModeDescription = GetNode<Label>(PatchMapExplorationModeDescriptionPath);
limitGrowthRateButton = GetNode<Button>(LimitGrowthRateButtonPath);
lifeOriginButton = GetNode<OptionButton>(LifeOriginButtonPath);
lifeOriginButtonAdvanced = GetNode<OptionButton>(LifeOriginButtonAdvancedPath);
Expand Down Expand Up @@ -301,6 +311,10 @@ public override void _Ready()
difficultyPresetAdvancedButton.AddItem(preset.UntranslatedName);
}

patchMapExplorationMode.AddItem(TranslationServer.Translate("FOG_OF_WAR_DISABLED"));
ender-titan1 marked this conversation as resolved.
Show resolved Hide resolved
patchMapExplorationMode.AddItem(TranslationServer.Translate("FOG_OF_WAR_LIGHT"));
patchMapExplorationMode.AddItem(TranslationServer.Translate("FOG_OF_WAR_INTENSE"));

// Do this in case default values in NewGameSettings.tscn don't match the normal preset
InitialiseToPreset(normal);

Expand Down Expand Up @@ -368,6 +382,9 @@ public void OpenFromDescendScreen(GameProperties currentGame)
freeGlucoseCloudButton.Pressed = difficulty.FreeGlucoseCloud;
passiveReproductionButton.Pressed = difficulty.PassiveReproduction;
limitGrowthRateButton.Pressed = difficulty.LimitGrowthRate;
patchMapExplorationMode.Selected = (int)difficulty.PatchMapExplorationMode;

UpdatePatchMapExplorationModeDescription(patchMapExplorationMode.Selected);

UpdateSelectedDifficultyPresetControl();

Expand Down Expand Up @@ -445,6 +462,8 @@ protected override void Dispose(bool disposing)
OsmoregulationMultiplierReadoutPath.Dispose();
FreeGlucoseCloudButtonPath.Dispose();
PassiveReproductionButtonPath.Dispose();
PatchMapExplorationModePath.Dispose();
PatchMapExplorationModeDescriptionPath.Dispose();
LimitGrowthRateButtonPath.Dispose();
LifeOriginButtonPath.Dispose();
LifeOriginButtonAdvancedPath.Dispose();
Expand Down Expand Up @@ -544,6 +563,7 @@ private void StartGame()
FreeGlucoseCloud = freeGlucoseCloudButton.Pressed,
PassiveReproduction = passiveReproductionButton.Pressed,
LimitGrowthRate = limitGrowthRateButton.Pressed,
PatchMapExplorationMode = (PatchMap.FogOfWarMode)patchMapExplorationMode.Selected,
};

settings.Difficulty = customDifficulty;
Expand Down Expand Up @@ -676,6 +696,9 @@ private void OnDifficultyPresetSelected(int index)
freeGlucoseCloudButton.Pressed = preset.FreeGlucoseCloud;
passiveReproductionButton.Pressed = preset.PassiveReproduction;
limitGrowthRateButton.Pressed = preset.LimitGrowthRate;
patchMapExplorationMode.Selected = (int)preset.PatchMapExplorationMode;

UpdatePatchMapExplorationModeDescription(patchMapExplorationMode.Selected);

UpdateSelectedDifficultyPresetControl();
}
Expand Down Expand Up @@ -716,6 +739,9 @@ private void UpdateSelectedDifficultyPresetControl()
if (limitGrowthRateButton.Pressed != preset.LimitGrowthRate)
continue;

if (patchMapExplorationMode.Selected != (int)preset.PatchMapExplorationMode)
continue;

// If all values are equal to the values for a preset, use that preset
difficultyPresetButton.Selected = preset.Index;
difficultyPresetAdvancedButton.Selected = preset.Index;
Expand Down Expand Up @@ -787,6 +813,12 @@ private void OnPassiveReproductionToggled(bool pressed)
UpdateSelectedDifficultyPresetControl();
}

private void OnPatchMapExplorationModeToggled(bool pressed)
ender-titan1 marked this conversation as resolved.
Show resolved Hide resolved
{
_ = pressed;
UpdateSelectedDifficultyPresetControl();
}

private void OnGrowthRateToggled(bool pressed)
{
_ = pressed;
Expand All @@ -800,6 +832,34 @@ private void OnLifeOriginSelected(int index)
lifeOriginButtonAdvanced.Selected = index;
}

private void OnPatchMapExplorationModeSelected(int index)
{
patchMapExplorationMode.Selected = index;

UpdatePatchMapExplorationModeDescription(index);

UpdateSelectedDifficultyPresetControl();
}

private void UpdatePatchMapExplorationModeDescription(int index)
{
switch (index)
{
case 0:
patchMapExplorationModeDescription.Text =
TranslationServer.Translate("FOG_OF_WAR_DISABLED_DESCRIPTION");
break;
case 1:
patchMapExplorationModeDescription.Text =
TranslationServer.Translate("FOG_OF_WAR_LIGHT_DESCRIPTION");
break;
case 2:
patchMapExplorationModeDescription.Text =
TranslationServer.Translate("FOG_OF_WAR_INTENSE_DESCRIPTION");
break;
}
}

// This and a few other callbacks are not currently needed to detect anything, but I left them in in case we
// need them in the future / this is refactored to build the custom difficulty object in steps - hhyyrylainen
private void OnMapTypeSelected(int index)
Expand Down