Skip to content

Commit bab877c

Browse files
committed
v2.1.4
1 parent 32ac256 commit bab877c

File tree

7 files changed

+101
-17
lines changed

7 files changed

+101
-17
lines changed

MapOptions/modinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "MapOptions",
33
"name": "MapOptions",
4-
"version": "2.1.3",
4+
"version": "2.1.4",
55
"authors": "SchuhBaum",
66
"description": "Adds options to configure the map.",
77
"requirements": [],

MapOptions/workshopdata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"Title": "MapOptions",
33
"Description": "Adds options to configure the map.",
44
"ID": "MapOptions",
5-
"Version": "2.1.3",
5+
"Version": "2.1.4",
66
"TargetGameVersion": "",
77
"Requirements": "",
88
"RequirementNames": "",

ReadMe.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
## MapOptions
2-
###### Version: 2.1.3
2+
###### Version: 2.1.4
33
This is a mod for Rain World v1.9.
44

55
### Description
@@ -18,7 +18,7 @@ Adds options to configure the map:
1818

1919
### Installation
2020
0. Update Rain World to version 1.9 if needed.
21-
1. Download the file `MapOptions.zip` from [Releases](https://github.com/SchuhBaum/MapOptions/releases/tag/v2.1.3).
21+
1. Download the file `MapOptions.zip` from [Releases](https://github.com/SchuhBaum/MapOptions/releases/tag/v2.1.4).
2222
2. Extract its content in the folder `[Steam]\SteamApps\common\Rain World\RainWorld_Data\StreamingAssets\mods`.
2323
3. Start the game as normal. In the main menu select `Remix` and enable the mod.
2424

@@ -34,12 +34,13 @@ There are two licenses available - MIT and Unlicense. You can choose which one y
3434

3535
### Changelog
3636
#### (Rain World v1.9)
37-
v2.1.3:
37+
v2.1.4:
3838
- Fixed a bug that could lag the game when you would try to open the map while an in-game text message is displayed.
3939
- (creature symbols) Fixed a bug where slugcat npc symbols would have the same color as the player.
4040
- (creature symbols) Fixed a bug where a NullReference exeption was thrown when the room of the creature could not be found.
4141
- (creature symbols) Removed that symbols are shown in shelters. Vanilla already shows symbols for items and creatures in shelters.
4242
- Changed the hook initialization logic. This should reduce the log spam from IL hooks. Instead of doing it every cycle while in-game they are initialized when starting the game or when changing the options.
43+
- (discover multiplier) Added a slider to change the map discover radius around slugcat.
4344

4445
v2.1.0:
4546
- Added support for Rain World 1.9.

SourceCode/MainMod.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111

1212
namespace MapOptions;
1313

14-
[BepInPlugin("SchuhBaum.MapOptions", "MapOptions", "2.1.3")]
14+
[BepInPlugin("SchuhBaum.MapOptions", "MapOptions", "2.1.4")]
1515
public class MainMod : BaseUnityPlugin {
1616
//
1717
// meta data
1818
//
1919

2020
public static readonly string mod_id = "MapOptions";
2121
public static readonly string author = "SchuhBaum";
22-
public static readonly string version = "2.1.3";
22+
public static readonly string version = "2.1.4";
2323

2424
//
2525
// options

SourceCode/MainModOptions.cs

Lines changed: 90 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ public class MainModOptions : OptionInterface {
2929
public static Configurable<int> zoom_slider = main_mod_options.config.Bind("zoom_slider", defaultValue: 10, new ConfigurableInfo("The default value is 100% (10) zoom. Each value (5-15) corresponds to 10*value% (50%-150%) zoom..", new ConfigAcceptableRange<int>(5, 15), "", "Zoom Level (10)"));
3030
public static Configurable<int> creature_symbol_scale = main_mod_options.config.Bind("creature_symbol_scale", defaultValue: 10, new ConfigurableInfo("The default value is 100% (10). Each value (5-20) corresponds to 10*value% (50%-200%).", new ConfigAcceptableRange<int>(5, 20), "", "Creature Symbol Size (10)"));
3131
public static Configurable<int> slugcat_symbol_scale = main_mod_options.config.Bind("slugcat_symbol_scale", defaultValue: 10, new ConfigurableInfo("The default value is 100% (10). Each value (5-20) corresponds to 10*value% (50%-200%).", new ConfigAcceptableRange<int>(5, 20), "", "Slugcat Symbol Size (10)"));
32+
33+
public static Configurable<int> discover_multiplier = main_mod_options.config.Bind("discover_multiplier", defaultValue: 2, new ConfigurableInfo("The default value is two. For a given value X the map around slugcat is discovered (X/2)-times as far.\nWARNING: This will delete and change the size of any loaded region discover texture. The game tries to recover your map progress based on visited rooms.", new ConfigAcceptableRange<int>(1, 10), "", "Discover Multiplier (2)"));
3234
public static Configurable<int> reveal_speed_multiplier = main_mod_options.config.Bind("reveal_speed_multiplier", defaultValue: 1, new ConfigurableInfo("The default value is one. For a given value X the map is revealed X-times as fast.\nIf the maximum value is selected then opening the map displays known areas instantly instead of revealing them gradually.", new ConfigAcceptableRange<int>(1, 10), "", "Reveal Speed Multiplier (1)"));
3335

3436
//
@@ -86,10 +88,15 @@ private void Save_Config_File(On.OptionInterface.orig__SaveConfigFile orig, Opti
8688

8789
public override void Initialize() {
8890
base.Initialize();
89-
Tabs = new OpTab[1];
91+
int number_of_tabs = 3;
92+
Tabs = new OpTab[number_of_tabs];
93+
94+
//
95+
// General
96+
//
9097

9198
int tab_index = 0;
92-
Tabs[tab_index] = new OpTab(main_mod_options, "Options");
99+
Tabs[tab_index] = new OpTab(main_mod_options, "General");
93100
InitializeMarginAndPos();
94101

95102
// Title
@@ -107,30 +114,103 @@ public override void Initialize() {
107114
AddNewLine();
108115
AddBox();
109116

117+
AddTextLabel("General:", FLabelAlignment.Left);
118+
DrawTextLabels(ref Tabs[tab_index]);
119+
AddNewLine();
120+
110121
AddSlider(zoom_slider, (string)zoom_slider.info.Tags[0], "50%", "150%");
111122
DrawSliders(ref Tabs[tab_index]);
112123

113124
AddNewLine();
114125

115126
AddCheckBox(aerial_map, (string)aerial_map.info.Tags[0]);
116-
AddCheckBox(creature_symbols, (string)creature_symbols.info.Tags[0]);
117127
AddCheckBox(item_tracker, (string)item_tracker.info.Tags[0]);
118-
119128
AddCheckBox(layer_focus, (string)layer_focus.info.Tags[0]);
120-
AddCheckBox(shadow_sprites, (string)shadow_sprites.info.Tags[0]);
121-
AddCheckBox(skip_fade, (string)skip_fade.info.Tags[0]);
122129

123-
AddCheckBox(slugcat_symbols, (string)slugcat_symbols.info.Tags[0]);
124-
AddCheckBox(uncover_region, (string)uncover_region.info.Tags[0]);
130+
AddCheckBox(skip_fade, (string)skip_fade.info.Tags[0]);
125131
AddCheckBox(uncover_room, (string)uncover_room.info.Tags[0]);
132+
DrawCheckBoxes(ref Tabs[tab_index]);
133+
134+
AddNewLine();
135+
136+
AddSlider(reveal_speed_multiplier, (string)reveal_speed_multiplier.info.Tags[0], "1", "10");
137+
DrawSliders(ref Tabs[tab_index]);
138+
139+
DrawBox(ref Tabs[tab_index]);
140+
141+
//
142+
// Symbols
143+
//
144+
145+
++tab_index;
146+
Tabs[tab_index] = new OpTab(main_mod_options, "Symbols");
147+
InitializeMarginAndPos();
148+
149+
// Title
150+
AddNewLine();
151+
AddTextLabel("MapOptions Mod", big_text: true);
152+
DrawTextLabels(ref Tabs[tab_index]);
153+
154+
// Subtitle
155+
AddNewLine(0.5f);
156+
AddTextLabel("Version " + version, FLabelAlignment.Left);
157+
AddTextLabel("by " + author, FLabelAlignment.Right);
158+
DrawTextLabels(ref Tabs[tab_index]);
159+
160+
// Content //
161+
AddNewLine();
162+
AddBox();
126163

164+
AddTextLabel("Symbols:", FLabelAlignment.Left);
165+
DrawTextLabels(ref Tabs[tab_index]);
166+
AddNewLine();
167+
168+
AddCheckBox(creature_symbols, (string)creature_symbols.info.Tags[0]);
169+
AddCheckBox(shadow_sprites, (string)shadow_sprites.info.Tags[0]);
170+
AddCheckBox(slugcat_symbols, (string)slugcat_symbols.info.Tags[0]);
127171
DrawCheckBoxes(ref Tabs[tab_index]);
128172

129173
AddNewLine();
130174

131175
AddSlider(creature_symbol_scale, (string)creature_symbol_scale.info.Tags[0], "50%", "200%");
132176
AddSlider(slugcat_symbol_scale, (string)slugcat_symbol_scale.info.Tags[0], "50%", "200%");
133-
AddSlider(reveal_speed_multiplier, (string)reveal_speed_multiplier.info.Tags[0], "1", "10");
177+
DrawSliders(ref Tabs[tab_index]);
178+
179+
DrawBox(ref Tabs[tab_index]);
180+
181+
//
182+
// Danger Zone
183+
//
184+
185+
++tab_index;
186+
Tabs[tab_index] = new OpTab(main_mod_options, "Danger Zone");
187+
InitializeMarginAndPos();
188+
189+
// Title
190+
AddNewLine();
191+
AddTextLabel("MapOptions Mod", big_text: true);
192+
DrawTextLabels(ref Tabs[tab_index]);
193+
194+
// Subtitle
195+
AddNewLine(0.5f);
196+
AddTextLabel("Version " + version, FLabelAlignment.Left);
197+
AddTextLabel("by " + author, FLabelAlignment.Right);
198+
DrawTextLabels(ref Tabs[tab_index]);
199+
200+
// Content //
201+
AddNewLine();
202+
AddBox();
203+
204+
AddTextLabel("Danger Zone:", FLabelAlignment.Left);
205+
DrawTextLabels(ref Tabs[tab_index]);
206+
AddNewLine();
207+
208+
AddCheckBox(uncover_region, (string)uncover_region.info.Tags[0]);
209+
DrawCheckBoxes(ref Tabs[tab_index]);
210+
211+
AddNewLine();
212+
213+
AddSlider(discover_multiplier, (string)discover_multiplier.info.Tags[0], "0.5", "5");
134214
DrawSliders(ref Tabs[tab_index]);
135215

136216
DrawBox(ref Tabs[tab_index]);
@@ -141,6 +221,7 @@ public void Log_All_Options() {
141221
Debug.Log(mod_id + ": Map_Scale " + Map_Scale);
142222
Debug.Log(mod_id + ": Slugcat_Symbols_Scale " + Slugcat_Symbols_Scale);
143223

224+
Debug.Log(mod_id + ": Discover_Multiplier " + Discover_Multiplier);
144225
Debug.Log(mod_id + ": Reveal_Speed_Multiplier " + Reveal_Speed_Multiplier);
145226
Debug.Log(mod_id + ": Can_Instant_Reveal " + Can_Instant_Reveal);
146227

SourceCode/MapMod.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static class MapMod {
2424
public static float Map_Scale => 10f / zoom_slider.Value;
2525
public static float Slugcat_Symbols_Scale => slugcat_symbol_scale.Value / 10f;
2626

27+
public static float Discover_Multiplier => 0.5f * discover_multiplier.Value;
2728
public static int Reveal_Speed_Multiplier => reveal_speed_multiplier.Value;
2829

2930
//
@@ -397,6 +398,7 @@ private static void HUD_Map_ClearSprites(On.HUD.Map.orig_ClearSprites orig, Map
397398

398399
private static void HUD_Map_Ctor(On.HUD.Map.orig_ctor orig, Map map, HUD.HUD hud, MapData map_data) {
399400
orig(map, hud, map_data);
401+
map.DiscoverResolution = 7f * Discover_Multiplier;
400402

401403
// no arial maps
402404
if (Option_AerialMap) {

SourceCode/MapOptions.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>net48</TargetFramework>
5-
<Version>2.1.3</Version>
5+
<Version>2.1.4</Version>
66
<Nullable>enable</Nullable>
77
<LangVersion>10.0</LangVersion>
88
</PropertyGroup>

0 commit comments

Comments
 (0)