Skip to content

Commit b51c1b1

Browse files
committed
Added color palettes and IP censoring
1 parent adcb9d2 commit b51c1b1

8 files changed

+120
-9
lines changed

AM2R.project.gmx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5003,8 +5003,11 @@
50035003
<sprite>sprites\sShirkTurnFrozen</sprite>
50045004
<sprite>sprites\sMultitroidMapPlayerCountBox</sprite>
50055005
<sprite>sprites\sMiepee</sprite>
5006-
<sprite>sprites\sPalMultitroidMiepeeNew</sprite>
5006+
<sprite>sprites\sPalMultitroidColorNew</sprite>
50075007
<sprite>sprites\sMultitroidMapIconMiepee</sprite>
5008+
<sprite>sprites\sPalMultitroidFusionColor</sprite>
5009+
<sprite>sprites\sPalSpiderballColor</sprite>
5010+
<sprite>sprites\sPalMetroidBabyColor</sprite>
50085011
</sprites>
50095012
</sprites>
50105013
<backgrounds name="background">

objects/oControl.object.gmx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ if(!(file_exists(working_directory + "\multitroid\mod_settings.ini"))){
408408
ini_write_string("ModSettings", "preferredcolor", "random");
409409
ini_write_string("ModSettings", "showname", "enabled");
410410
ini_write_real("ModSettings", "palette", 0);
411+
ini_write_real("ModSettings", "censorip", 0);
411412
ini_close();
412413
}
413414
ini_open(working_directory + "\multitroid\mod_settings.ini");
@@ -418,6 +419,7 @@ reactorsequence = string_lower(ini_read_string("ModSettings", "reactorsequence",
418419
preferredcolor = string_lower(ini_read_string("ModSettings", "preferredcolor", "random"));
419420
showname = string_lower(ini_read_string("ModSettings", "showname", "enabled"));
420421
palette = ini_read_real("ModSettings", "palette", 0);
422+
censorip = ini_read_real("ModSettings", "censorip", 0);
421423
ini_close();
422424

423425
var nameLength = string_length(name);
@@ -490,10 +492,10 @@ MultitroidIconDefault = sMultitroidIcon;
490492
MultitroidIconDarkDefault = sDarkMultitroidPlayer;
491493
MultitroidMapIconDefault = sMultitroidMapIcon;
492494

493-
MultitroidPaletteColor = sPalMultitroidMiepeeNew;
494-
MultitroidPaletteFusionColor = sPalMultitroidFusion;
495-
SpiderballPaletteColor = sPalSpiderball;
496-
MultitroidBabyPaletteColor = sPalMultitroidBaby;
495+
MultitroidPaletteColor = sPalMultitroidColorNew;
496+
MultitroidPaletteFusionColor = sPalMultitroidFusionColor;
497+
SpiderballPaletteColor = sPalSpiderballColor;
498+
MultitroidBabyPaletteColor = sPalMetroidBabyColor;
497499
MultitroidIconColor = sMultitroidIcon;
498500
MultitroidIconDarkColor = sMultitroidIcon;
499501
MultitroidMapIconColor = sMultitroidMapIconMiepee;

objects/oOptionsMod.object.gmx

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ var tempnumcounter = 0;
3232
This list dictates the order of selection in the Extras Menu.
3333
Also, the list in User Defined 0 needs to be in order.
3434
*/
35-
35+
init = 0;
36+
num_censorip = tempnumcounter++;
3637
num_ip = tempnumcounter++;
3738
num_port = tempnumcounter++;
3839
num_name = tempnumcounter++;
@@ -105,6 +106,7 @@ with (oSS_Fg) {
105106
}
106107

107108

109+
tip[num_censorip] = "Toggle whether your IP address is censored"
108110
tip[num_ip] = "Set the IP address of the server";
109111
tip[num_port] = "Set the port of the server";
110112
tip[num_name] = "Set your display name";
@@ -318,6 +320,7 @@ if (active) {
318320

319321

320322
if (oControl.kLeft &gt; 0 &amp;&amp; oControl.kLeftPushedSteps == 0 || oControl.kRight &gt; 0 &amp;&amp; oControl.kRightPushedSteps == 0 &amp;&amp; global.curropt &lt; lastitem &amp;&amp; oControl.kDown == 0 &amp;&amp; oControl.kUp == 0) {
323+
if (global.curropt == num_censorip) oControl.censorip = !oControl.censorip;
321324
if (global.curropt == num_sequence) sequence = !sequence;
322325
if (global.curropt == num_showname) showname = !showname;
323326
//if (global.shaders_compiled) {
@@ -535,6 +538,17 @@ if(!done){
535538
op[num_elm].optext = "Enabled";
536539
break;
537540
}
541+
542+
if(oControl.censorip &amp;&amp; !op[num_ip].editing){
543+
op[num_ip].optext = "";
544+
init = 1;
545+
}
546+
547+
if(op[num_ip].editing){
548+
if(keyboard_check(vk_control) &amp;&amp; keyboard_check_pressed(ord('V'))){
549+
keyboard_string = clipboard_get_text();
550+
}
551+
}
538552
}
539553
</string>
540554
</argument>
@@ -634,7 +648,10 @@ if(ID == msg &amp;&amp; global.curropt == num_name){
634648
var _sequence = "synced";
635649
var _showname = "enabled";
636650

637-
op[num_ip].optext = ip;
651+
if(oControl.censorip){
652+
if(init) op[num_ip].optext = ip;
653+
} else op[num_ip].optext = ip;
654+
638655
op[num_port].optext = port;
639656
op[num_name].optext = name;
640657

@@ -799,6 +816,15 @@ switch(oControl.palette){
799816
break;
800817
}
801818

819+
switch(oControl.censorip){
820+
case 0:
821+
op[num_censorip].optext = "Disabled";
822+
break;
823+
case 1:
824+
op[num_censorip].optext = "Enabled";
825+
break;
826+
}
827+
802828
ini_open(working_directory + "\multitroid\mod_settings.ini");
803829
ini_write_string("ModSettings", "ipaddress", ip);
804830
ini_write_real("ModSettings", "port", real(port));
@@ -807,6 +833,7 @@ ini_write_string("ModSettings", "reactorsequence", _sequence);
807833
ini_write_string("ModSettings", "preferredcolor", color);
808834
ini_write_string("ModSettings", "showname", _showname);
809835
ini_write_real("ModSettings", "palette", oControl.palette);
836+
ini_write_real("ModSettings", "censorip", oControl.censorip);
810837
ini_close();
811838

812839
oControl.ipaddress = ip;
@@ -871,6 +898,10 @@ op[50].text = "Multitroid settings";
871898

872899
var tempcount = 1;
873900

901+
op[num_censorip] = instance_create(x, y + sep * tempcount++, oOptionLR);
902+
op[num_censorip].label = "IP Address Censoring";
903+
op[num_censorip].optionid = num_censorip;
904+
874905
op[num_ip] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
875906
op[num_ip].label = "IP Address";
876907
op[num_ip].optionid = num_ip;

objects/oSmallSplash.object.gmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ image_speed = 0.5;
5050
<argument>
5151
<kind>1</kind>
5252
<string>y = global.waterlevel;
53-
if (global.watertype == 0) y += oWater.yoffset;
53+
if (global.watertype == 0 &amp;&amp; instance_exists(oWater)) y += oWater.yoffset;
5454
</string>
5555
</argument>
5656
</arguments>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
2+
<sprite>
3+
<type>0</type>
4+
<xorig>0</xorig>
5+
<yorigin>0</yorigin>
6+
<colkind>1</colkind>
7+
<coltolerance>0</coltolerance>
8+
<sepmasks>0</sepmasks>
9+
<bboxmode>0</bboxmode>
10+
<bbox_left>0</bbox_left>
11+
<bbox_right>16</bbox_right>
12+
<bbox_top>0</bbox_top>
13+
<bbox_bottom>9</bbox_bottom>
14+
<HTile>0</HTile>
15+
<VTile>0</VTile>
16+
<TextureGroups>
17+
<TextureGroup0>0</TextureGroup0>
18+
</TextureGroups>
19+
<For3D>0</For3D>
20+
<width>17</width>
21+
<height>10</height>
22+
<frames>
23+
<frame index="0">images\sPalMetroidBabyColor_0.png</frame>
24+
</frames>
25+
</sprite>

sprites/sPalMultitroidMiepeeNew.sprite.gmx renamed to sprites/sPalMultitroidColorNew.sprite.gmx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
<width>17</width>
2121
<height>87</height>
2222
<frames>
23-
<frame index="0">images\sPalMultitroidMiepeeNew_0.png</frame>
23+
<frame index="0">images\sPalMultitroidColorNew_0.png</frame>
2424
</frames>
2525
</sprite>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
2+
<sprite>
3+
<type>0</type>
4+
<xorig>0</xorig>
5+
<yorigin>0</yorigin>
6+
<colkind>1</colkind>
7+
<coltolerance>0</coltolerance>
8+
<sepmasks>0</sepmasks>
9+
<bboxmode>0</bboxmode>
10+
<bbox_left>0</bbox_left>
11+
<bbox_right>16</bbox_right>
12+
<bbox_top>0</bbox_top>
13+
<bbox_bottom>80</bbox_bottom>
14+
<HTile>0</HTile>
15+
<VTile>0</VTile>
16+
<TextureGroups>
17+
<TextureGroup0>0</TextureGroup0>
18+
</TextureGroups>
19+
<For3D>0</For3D>
20+
<width>17</width>
21+
<height>81</height>
22+
<frames>
23+
<frame index="0">images\sPalMultitroidFusionColor_0.png</frame>
24+
</frames>
25+
</sprite>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
2+
<sprite>
3+
<type>0</type>
4+
<xorig>0</xorig>
5+
<yorigin>0</yorigin>
6+
<colkind>1</colkind>
7+
<coltolerance>0</coltolerance>
8+
<sepmasks>0</sepmasks>
9+
<bboxmode>0</bboxmode>
10+
<bbox_left>0</bbox_left>
11+
<bbox_right>16</bbox_right>
12+
<bbox_top>0</bbox_top>
13+
<bbox_bottom>68</bbox_bottom>
14+
<HTile>0</HTile>
15+
<VTile>0</VTile>
16+
<TextureGroups>
17+
<TextureGroup0>0</TextureGroup0>
18+
</TextureGroups>
19+
<For3D>0</For3D>
20+
<width>17</width>
21+
<height>69</height>
22+
<frames>
23+
<frame index="0">images\sPalSpiderballColor_0.png</frame>
24+
</frames>
25+
</sprite>

0 commit comments

Comments
 (0)