You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1222 lines
36 KiB
1222 lines
36 KiB
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
|
|
<object>
|
|
<spriteName><undefined></spriteName>
|
|
<solid>0</solid>
|
|
<visible>-1</visible>
|
|
<depth>0</depth>
|
|
<persistent>0</persistent>
|
|
<parentName><undefined></parentName>
|
|
<maskName><undefined></maskName>
|
|
<events>
|
|
<event eventtype="0" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>done = false;
|
|
global.curropt = 0;
|
|
var tempnumcounter = 0;
|
|
/*
|
|
This list dictates the order of selection in the Extras Menu.
|
|
Also, the list in User Defined 0 needs to be in order.
|
|
*/
|
|
init = 0;
|
|
num_censorip = tempnumcounter++;
|
|
num_ip = tempnumcounter++;
|
|
num_port = tempnumcounter++;
|
|
num_name = tempnumcounter++;
|
|
num_color = tempnumcounter++;
|
|
num_palette = tempnumcounter++;
|
|
num_selfpalette = tempnumcounter++;
|
|
num_showname = tempnumcounter++;
|
|
num_moderator = tempnumcounter++;
|
|
num_difficulty = tempnumcounter++;
|
|
num_elm = tempnumcounter++;
|
|
num_seedgen = tempnumcounter++;
|
|
num_customseed = tempnumcounter++;
|
|
num_reset = tempnumcounter++;
|
|
num_locklobby = tempnumcounter++;
|
|
num_saxmode = tempnumcounter++;
|
|
num_connection = tempnumcounter++;
|
|
|
|
lastitem = tempnumcounter; // This value will be one number higher than the last number in the list above.
|
|
|
|
ip = oControl.ipaddress;
|
|
name = oControl.name;
|
|
port = string(oControl.port);
|
|
showname = 1;
|
|
sequence = 1;
|
|
password = oControl.password;
|
|
|
|
menuDifficulty = global.difficulty;
|
|
|
|
if(oControl.mod_fusion) menuDifficulty = 3;
|
|
|
|
elm = oControl.mod_monstersextremecheck;
|
|
|
|
connectiontxt = "Connect";
|
|
|
|
if(instance_exists(oClient)){
|
|
connectiontxt = "Disconnect";
|
|
} else {
|
|
connectiontxt = "Connect";
|
|
}
|
|
|
|
switch(oControl.reactorsequence){
|
|
case "synced":
|
|
sequence = 1;
|
|
break;
|
|
case "disabled":
|
|
sequence = 0;
|
|
break;
|
|
}
|
|
|
|
switch(oControl.showname){
|
|
case "enabled":
|
|
showname = 1;
|
|
break;
|
|
case "disabled":
|
|
showname = 0;
|
|
break;
|
|
}
|
|
|
|
vTargetY = 18 * lastitem + 30;
|
|
|
|
editing = 0;
|
|
active = 0;
|
|
alarm[0] = 5;
|
|
i = 0;
|
|
repeat (lastitem + 1) {
|
|
canedit[i] = 1;
|
|
i += 1;
|
|
}
|
|
targety = y;
|
|
view_object[0] = id;
|
|
timer = 0;
|
|
event_user(0);
|
|
with (oSS_Control) active = 1;
|
|
with (oSS_Fg) {
|
|
active = 1;
|
|
}
|
|
|
|
|
|
tip[num_censorip] = "Toggle whether your IP address is censored"
|
|
tip[num_ip] = "Set the IP address of the server";
|
|
tip[num_port] = "Set the port of the server";
|
|
tip[num_name] = "Set your display name";
|
|
tip[num_color] = "Pick your preferred player color";
|
|
tip[num_palette] = "Choose palette setting";
|
|
tip[num_selfpalette] = "Toggle use of the palette on yourself";
|
|
tip[num_showname] = "Enable/disable showing player names";
|
|
tip[num_moderator] = "Set the moderator password";
|
|
tip[num_difficulty] = "Choose the shared Multitroid difficulty";
|
|
tip[num_elm] = "Choose the shared ELM difficulty";
|
|
tip[num_seedgen] = "Generate a random seed for Multitroid";
|
|
tip[num_customseed] = "Enter a custom seed";
|
|
tip[num_reset] = "Reset the server";
|
|
tip[num_locklobby] = "Lock the lobby";
|
|
tip[num_saxmode] = "Toggle SA-X Mode";
|
|
tip[num_connection] = "Connect/disconnect to the server";
|
|
|
|
|
|
tip[lastitem] = get_text("GlobalOptions", "ExitMain_Tip");
|
|
global.tiptext = tip[global.curropt];
|
|
alarm[1] = 1;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="1" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>event_user(1);
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="2" enumb="1">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string></string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="2" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>active = 1;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="3" enumb="0">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>
|
|
if (active) {
|
|
if (oControl.kDown > 0 && (oControl.kDownPushedSteps == 0 || oControl.kDownPushedSteps > 30 && timer == 0) && !editing) {
|
|
global.curropt += 1;
|
|
if (global.curropt > lastitem) global.curropt = 0;
|
|
while (canedit[global.curropt] == 0) global.curropt += 1;
|
|
if (global.curropt > lastitem) global.curropt = 0;
|
|
targety = op[global.curropt].y + lastitem;
|
|
if (targety > vTargetY) targety = vTargetY;
|
|
sfx_play(sndMenuMove);
|
|
global.tiptext = tip[global.curropt];
|
|
}
|
|
if (oControl.kUp > 0 && (oControl.kUpPushedSteps == 0 || oControl.kUpPushedSteps > 30 && timer == 0) && !editing) {
|
|
global.curropt -= 1;
|
|
if (global.curropt < 0) global.curropt = lastitem;
|
|
while (canedit[global.curropt] == 0)
|
|
{
|
|
global.curropt -= 1;
|
|
if (global.curropt < 0) global.curropt = lastitem;
|
|
}
|
|
targety = op[global.curropt].y + lastitem;
|
|
if (targety > vTargetY) targety = vTargetY;
|
|
sfx_play(sndMenuMove);
|
|
global.tiptext = tip[global.curropt];
|
|
}
|
|
|
|
|
|
if (oControl.kLeft > 0 && oControl.kLeftPushedSteps == 0 && oControl.kDown == 0 && oControl.kUp == 0)
|
|
{
|
|
if (global.shaders_compiled) {
|
|
if (global.curropt == num_color)
|
|
{
|
|
oControl.preferredcolor--;
|
|
if(oControl.preferredcolor < 1){
|
|
oControl.preferredcolor = 17;
|
|
}
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
|
|
if (global.curropt == num_palette)
|
|
{
|
|
oControl.palette--;
|
|
if(oControl.palette < 0){
|
|
oControl.palette = 3;
|
|
}
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
}
|
|
|
|
if (global.curropt == num_difficulty && instance_exists(oClient))
|
|
{
|
|
oClient.syncedDifficulty--;
|
|
menuDifficulty--;
|
|
if(oClient.syncedDifficulty < 0){
|
|
oClient.syncedDifficulty = 3;
|
|
menuDifficulty = 3;
|
|
}
|
|
with(oClient) event_user(0);
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
} // End Left
|
|
|
|
|
|
if (oControl.kRight > 0 && oControl.kRightPushedSteps == 0 && oControl.kDown == 0 && oControl.kUp == 0)
|
|
{
|
|
if (global.shaders_compiled) {
|
|
if (global.curropt == num_color)
|
|
{
|
|
oControl.preferredcolor++;
|
|
if(oControl.preferredcolor > 17){
|
|
oControl.preferredcolor = 1;
|
|
}
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
|
|
if (global.curropt == num_palette)
|
|
{
|
|
oControl.palette++;
|
|
if(oControl.palette > 3){
|
|
oControl.palette = 0;
|
|
}
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
}
|
|
|
|
if (global.curropt == num_difficulty && instance_exists(oClient))
|
|
{
|
|
oClient.syncedDifficulty++;
|
|
menuDifficulty++;
|
|
if(oClient.syncedDifficulty > 3){
|
|
oClient.syncedDifficulty = 0;
|
|
menuDifficulty = 0;
|
|
}
|
|
with(oClient) event_user(0);
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
} // End Right
|
|
//End Controller
|
|
|
|
|
|
if (oControl.kLeft > 0 && oControl.kLeftPushedSteps == 0 || oControl.kRight > 0 && oControl.kRightPushedSteps == 0 && global.curropt < lastitem && oControl.kDown == 0 && oControl.kUp == 0) {
|
|
if (global.curropt == num_censorip) oControl.censorip = !oControl.censorip;
|
|
if (global.curropt == num_showname) showname = !showname;
|
|
if (global.curropt == num_selfpalette) oControl.useselfpalette = !oControl.useselfpalette;
|
|
//if (global.shaders_compiled) {
|
|
//if (global.curropt == num_MSRfusion) oControl.msr_fusionsuit = !oControl.msr_fusionsuit;
|
|
//}
|
|
//if (global.curropt == num_exmonsters) oControl.mod_monstersextremecheck = !oControl.mod_monstersextremecheck;
|
|
//if (global.curropt == num_IGT) oControl.mod_IGT = !oControl.mod_IGT;
|
|
if (global.curropt == num_elm && instance_exists(oClient)){
|
|
oClient.elm = !oClient.elm;
|
|
elm = !elm;
|
|
with(oClient) event_user(1);
|
|
}
|
|
|
|
if (global.curropt == num_locklobby && instance_exists(oClient)){
|
|
global.lobbyLocked = !global.lobbyLocked;
|
|
with(oClient) event_user(6);
|
|
}
|
|
|
|
if (global.curropt == num_saxmode && instance_exists(oClient)){
|
|
global.saxmode = !global.saxmode;
|
|
with(oClient) event_user(7);
|
|
}
|
|
|
|
sfx_play(sndMenuMove);
|
|
event_user(2);
|
|
}
|
|
|
|
var key, keyBegin;
|
|
var keyBegin = (oControl.kMenu1 > 0);
|
|
if(os_type != os_android){
|
|
key = keyboard_check_pressed(vk_enter);
|
|
} else {
|
|
key = (oControl.kMenu1 > 0);
|
|
}
|
|
|
|
if (key && oControl.kMenu1PushedSteps == 0 || (os_type != os_android && keyBegin && oControl.kMenu1PushedSteps == 0 && !editing)) {
|
|
if (global.curropt == num_ip && os_type != os_android) {
|
|
editing = !editing;
|
|
op[num_ip].editing = editing;
|
|
if(editing){
|
|
keyboard_string = ip;
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
} else if(global.curropt == num_ip && os_type == os_android){
|
|
if(!editing){
|
|
msg = get_string_async("Type in the IP Address to connect to.", ip);
|
|
}
|
|
editing = !editing;
|
|
op[num_ip].editing = editing;
|
|
}
|
|
if (global.curropt == num_port && os_type != os_android) {
|
|
editing = !editing;
|
|
op[num_port].editing = editing;
|
|
if(editing){
|
|
keyboard_string = port;
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
} else if(global.curropt = num_port && os_type == os_android){
|
|
if(!editing){
|
|
msg = get_integer_async("Type in the server port.", real(port));
|
|
}
|
|
editing = !editing;
|
|
op[num_port].editing = editing;
|
|
}
|
|
if (global.curropt == num_name && os_type != os_android) {
|
|
editing = !editing;
|
|
op[num_name].editing = editing;
|
|
if(editing){
|
|
keyboard_string = name;
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
} else if(global.curropt == num_name && os_type == os_android){
|
|
if(!editing){
|
|
msg = get_string_async("Type in your nametag.", name);
|
|
}
|
|
editing = !editing;
|
|
op[num_name].editing = editing;
|
|
}
|
|
if (global.curropt == num_moderator && os_type != os_android) {
|
|
editing = !editing;
|
|
op[num_moderator].editing = editing;
|
|
if(editing){
|
|
keyboard_string = password;
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
} else if(global.curropt == num_moderator && os_type == os_android){
|
|
if(!editing){
|
|
msg = get_integer_async("Type in your moderator password.", password);
|
|
}
|
|
editing = !editing;
|
|
op[num_moderator].editing = editing;
|
|
}
|
|
if (global.curropt == num_customseed && os_type != os_android) {
|
|
editing = !editing;
|
|
op[num_customseed].editing = editing;
|
|
if(editing){
|
|
keyboard_string = string(global.multiCustomSeed);
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
} else if(global.curropt == num_customseed && os_type == os_android){
|
|
if(!editing){
|
|
msg = get_integer_async("Type in your custom seed.", global.multiCustomSeed);
|
|
}
|
|
editing = !editing;
|
|
op[num_customseed].editing = editing;
|
|
}
|
|
} // if (oControl.kMenu1 && oControl.kMenu1PushedSteps == 0)
|
|
|
|
if (oControl.kMenu1 && oControl.kMenu1PushedSteps == 0){
|
|
if (global.curropt == num_connection){
|
|
if(!instance_exists(oClient) && global.canConnect){
|
|
instance_create(x, y, oClient);
|
|
connectiontxt = "Disconnect";
|
|
op[num_connection].label = connectiontxt;
|
|
} else {
|
|
with(oClient){
|
|
instance_destroy();
|
|
}
|
|
connectiontxt = "Connect";
|
|
op[num_connection].label = connectiontxt;
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
event_user(2);
|
|
}
|
|
if (global.curropt == num_seedgen) {
|
|
if(instance_exists(oClient)){
|
|
randomize();
|
|
oClient.seed = random_get_seed();
|
|
random_set_seed(oClient.seed);
|
|
send_seed();
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
}
|
|
if (global.curropt == num_reset) {
|
|
if(instance_exists(oClient)){
|
|
with(oClient) event_user(5);
|
|
}
|
|
sfx_play(sndMenuSel);
|
|
}
|
|
if (global.curropt == lastitem) {
|
|
save_gameoptions();
|
|
view_object[0] = noone;
|
|
view_yview[0] = 0;
|
|
instance_create(50, 92, oOptionsMain);
|
|
instance_destroy();
|
|
sfx_play(sndMenuSel);
|
|
}
|
|
}
|
|
|
|
/*
|
|
if (oControl.kMenu2 && oControl.kMenu1PushedSteps == 0) {
|
|
if(instance_exists(oSS_Control)){
|
|
if(editing){
|
|
editing = !editing;
|
|
}
|
|
instance_destroy();
|
|
}
|
|
}
|
|
*/
|
|
|
|
if(editing && global.curropt == num_ip && os_type != os_android){
|
|
ip = keyboard_string;
|
|
op[num_ip].optext = ip;
|
|
}
|
|
|
|
if(editing && global.curropt == num_port && os_type != os_android){
|
|
port = keyboard_string;
|
|
op[num_port].optext = port;
|
|
}
|
|
|
|
if(editing && global.curropt == num_name && os_type != os_android){
|
|
var keyboardLength = string_length(keyboard_string);
|
|
if(keyboardLength > 15){
|
|
keyboard_string = string_copy(keyboard_string, 1, 15);
|
|
}
|
|
name = keyboard_string;
|
|
op[num_name].optext = name;
|
|
}
|
|
|
|
if(editing && global.curropt == num_moderator && os_type != os_android){
|
|
var keyboardLength = string_length(keyboard_string);
|
|
if(keyboardLength > 15){
|
|
keyboard_string = string_copy(keyboard_string, 1, 15);
|
|
}
|
|
password = keyboard_string;
|
|
op[num_moderator].optext = password;
|
|
}
|
|
|
|
if(editing && global.curropt == num_customseed && os_type != os_android){
|
|
var keyboardLength = string_length(keyboard_string);
|
|
//show_debug_message(keyboard_lastchar);
|
|
if(keyboard_lastchar != "0" && keyboard_lastchar != "1" && keyboard_lastchar != "2" && keyboard_lastchar != "3" && keyboard_lastchar != "4" && keyboard_lastchar != "5" && keyboard_lastchar != "6" && keyboard_lastchar != "7" && keyboard_lastchar != "8" && keyboard_lastchar != "9" && keyboard_lastchar != "" && keyboard_lastchar != -1){
|
|
if(keyboard_lastkey != vk_backspace) keyboard_string = string_copy(keyboard_string, 1, string_length(keyboard_string) - 1);
|
|
keyboard_lastchar = "";
|
|
}
|
|
if(keyboardLength > 10){
|
|
keyboard_string = string_copy(keyboard_string, 1, 10);
|
|
}
|
|
//show_debug_message(keyboard_lastchar);
|
|
//show_debug_message(keyboard_string);
|
|
global.multiCustomSeed = real(keyboard_string);
|
|
op[num_customseed].optext = string(global.multiCustomSeed);
|
|
}
|
|
} // if (active)
|
|
if (targety != y) y += (targety - y) / 10;
|
|
timer -= 1;
|
|
if (timer < 0) timer = 8;
|
|
|
|
if(instance_exists(oClient) && instance_exists(self) && instance_exists(connID)){
|
|
connectiontxt = "Disconnect";
|
|
op[num_connection].label = connectiontxt;
|
|
} else if((!instance_exists(oClient)) && instance_exists(self) && instance_exists(connID)){
|
|
connectiontxt = "Connect";
|
|
op[num_connection].label = connectiontxt;
|
|
}
|
|
|
|
if(!done){
|
|
if(global.moderator){
|
|
op[num_difficulty].enabled = 1;
|
|
canedit[num_difficulty] = 1;
|
|
|
|
op[num_seedgen].enabled = 1;
|
|
canedit[num_seedgen] = 1;
|
|
|
|
op[num_elm].enabled = 1;
|
|
canedit[num_elm] = 1;
|
|
|
|
op[num_reset].enabled = 1;
|
|
canedit[num_reset] = 1;
|
|
|
|
op[num_customseed].enabled = 1;
|
|
canedit[num_customseed] = 1;
|
|
|
|
op[num_locklobby].enabled = 1;
|
|
canedit[num_locklobby] = 1;
|
|
|
|
op[num_saxmode].enabled = 1;
|
|
canedit[num_saxmode] = 1;
|
|
} else {
|
|
op[num_difficulty].enabled = 0;
|
|
canedit[num_difficulty] = 0;
|
|
|
|
op[num_seedgen].enabled = 0;
|
|
canedit[num_seedgen] = 0;
|
|
|
|
op[num_elm].enabled = 0;
|
|
canedit[num_elm] = 0;
|
|
|
|
op[num_reset].enabled = 0;
|
|
canedit[num_reset] = 0;
|
|
|
|
op[num_customseed].enabled = 0;
|
|
canedit[num_customseed] = 0;
|
|
|
|
op[num_locklobby].enabled = 0;
|
|
canedit[num_locklobby] = 0;
|
|
|
|
op[num_saxmode].enabled = 0;
|
|
canedit[num_saxmode] = 0;
|
|
}
|
|
|
|
/*
|
|
if(!instance_exists(oClient)){
|
|
op[num_difficulty].enabled = 0;
|
|
canedit[num_difficulty] = 0;
|
|
} else {
|
|
if(!instance_exists(oSS_Control)){
|
|
op[num_difficulty].enabled = 1;
|
|
canedit[num_difficulty] = 1;
|
|
} else {
|
|
op[num_difficulty].enabled = 0;
|
|
canedit[num_difficulty] = 0;
|
|
}
|
|
}
|
|
|
|
if(!instance_exists(oClient)){
|
|
op[num_seedgen].enabled = 0;
|
|
canedit[num_seedgen] = 0;
|
|
} else {
|
|
if(!instance_exists(oSS_Control)){
|
|
op[num_seedgen].enabled = 1;
|
|
canedit[num_seedgen] = 1;
|
|
} else {
|
|
op[num_seedgen].enabled = 0;
|
|
canedit[num_seedgen] = 0;
|
|
}
|
|
}
|
|
|
|
if(!instance_exists(oClient)){
|
|
op[num_elm].enabled = 0;
|
|
canedit[num_elm] = 0;
|
|
} else {
|
|
if(!instance_exists(oSS_Control)){
|
|
op[num_elm].enabled = 1;
|
|
canedit[num_elm] = 1;
|
|
} else {
|
|
op[num_elm].enabled = 0;
|
|
canedit[num_elm] = 0;
|
|
}
|
|
}
|
|
*/
|
|
|
|
switch(menuDifficulty){
|
|
case 0:
|
|
op[num_difficulty].optext = "Easy";
|
|
break;
|
|
case 1:
|
|
op[num_difficulty].optext = "Normal";
|
|
break;
|
|
case 2:
|
|
op[num_difficulty].optext = "Hard";
|
|
break;
|
|
case 3:
|
|
op[num_difficulty].optext = "Fusion";
|
|
break;
|
|
}
|
|
|
|
switch(elm){
|
|
case 0:
|
|
op[num_elm].optext = "Disabled";
|
|
break;
|
|
case 1:
|
|
op[num_elm].optext = "Enabled";
|
|
break;
|
|
}
|
|
|
|
switch(global.lobbyLocked){
|
|
case 0:
|
|
op[num_locklobby].optext = "Open";
|
|
break;
|
|
case 1:
|
|
op[num_locklobby].optext = "Locked";
|
|
break;
|
|
}
|
|
|
|
switch(global.saxmode){
|
|
case 0:
|
|
op[num_saxmode].optext = "Disabled";
|
|
break;
|
|
case 1:
|
|
op[num_saxmode].optext = "Enabled";
|
|
break;
|
|
}
|
|
|
|
if(oControl.censorip && !op[num_ip].editing){
|
|
op[num_ip].optext = "";
|
|
init = 1;
|
|
}
|
|
|
|
if(op[num_ip].editing){
|
|
if(keyboard_check(vk_control) && keyboard_check_pressed(ord('V'))){
|
|
keyboard_string = clipboard_get_text();
|
|
}
|
|
}
|
|
}
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="7" enumb="63">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>var ID = ds_map_find_value(async_load, "id");
|
|
|
|
if(ID == msg && global.curropt == num_ip){
|
|
if(ds_map_find_value(async_load, "status")){
|
|
var input = ds_map_find_value(async_load, "result");
|
|
if(is_string(input)){
|
|
ini_open(working_directory + "\multitroid\settings.ini");
|
|
ini_write_string("Settings", "ipaddress", input);
|
|
ini_close();
|
|
ip = input;
|
|
oControl.ipaddress = ip;
|
|
op[num_ip].optext = ip;
|
|
event_user(2);
|
|
}
|
|
}
|
|
editing = !editing;
|
|
op[num_ip].editing = editing;
|
|
}
|
|
|
|
if(ID == msg && global.curropt == num_port){
|
|
if(ds_map_find_value(async_load, "status")){
|
|
var input = ds_map_find_value(async_load, "value");
|
|
if(is_real(input)){
|
|
ini_open(working_directory + "\multitroid\settings.ini");
|
|
ini_write_real("Settings", "port", input);
|
|
ini_close();
|
|
port = string(input);
|
|
op[num_port].optext = port;
|
|
event_user(2);
|
|
}
|
|
}
|
|
editing = !editing;
|
|
op[num_port].editing = editing;
|
|
}
|
|
|
|
if(ID == msg && global.curropt == num_name){
|
|
if(ds_map_find_value(async_load, "status")){
|
|
var input = ds_map_find_value(async_load, "result");
|
|
if(is_string(input)){
|
|
ini_open(working_directory + "\multitroid\settings.ini");
|
|
ini_write_string("Settings", "name", input);
|
|
ini_close();
|
|
name = input;
|
|
op[num_name].optext = name;
|
|
event_user(2);
|
|
}
|
|
}
|
|
editing = !editing;
|
|
op[num_name].editing = editing;
|
|
}
|
|
|
|
if(ID == msg && global.curropt == num_moderator){
|
|
if(ds_map_find_value(async_load, "status")){
|
|
var input = ds_map_find_value(async_load, "result");
|
|
if(is_string(input)){
|
|
password = input;
|
|
op[num_moderator].optext = password;
|
|
event_user(2);
|
|
}
|
|
}
|
|
editing = !editing;
|
|
op[num_moderator].editing = editing;
|
|
}
|
|
|
|
if(ID == msg && global.curropt == num_customseed){
|
|
if(ds_map_find_value(async_load, "status")){
|
|
var input = ds_map_find_value(async_load, "result");
|
|
if(is_real(input)){
|
|
global.multiCustomSeed = input;
|
|
op[num_customseed].optext = string(global.multiCustomSeed);
|
|
event_user(2);
|
|
}
|
|
}
|
|
editing = !editing;
|
|
op[num_customseed].editing = editing;
|
|
}
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="7" enumb="12">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>var color = "random";
|
|
var _sequence = "synced";
|
|
var _showname = "enabled";
|
|
|
|
if(oControl.censorip){
|
|
if(init) op[num_ip].optext = ip;
|
|
} else op[num_ip].optext = ip;
|
|
|
|
op[num_port].optext = port;
|
|
op[num_name].optext = name;
|
|
op[num_moderator].optext = password;
|
|
op[num_customseed].optext = string(global.multiCustomSeed);
|
|
|
|
|
|
switch(oControl.preferredcolor){
|
|
case 1:
|
|
op[num_color].optext = "Green";
|
|
break;
|
|
case 2:
|
|
op[num_color].optext = "Red";
|
|
break;
|
|
case 3:
|
|
op[num_color].optext = "Blue";
|
|
break;
|
|
case 4:
|
|
op[num_color].optext = "Yellow";
|
|
break;
|
|
case 5:
|
|
op[num_color].optext = "Orange";
|
|
break;
|
|
case 6:
|
|
op[num_color].optext = "Purple";
|
|
break;
|
|
case 7:
|
|
op[num_color].optext = "Pink";
|
|
break;
|
|
case 8:
|
|
op[num_color].optext = "White";
|
|
break;
|
|
case 9:
|
|
op[num_color].optext = "Canary";
|
|
break;
|
|
case 10:
|
|
op[num_color].optext = "Red Orange";
|
|
break;
|
|
case 11:
|
|
op[num_color].optext = "Sky Blue";
|
|
break;
|
|
case 12:
|
|
op[num_color].optext = "Gold";
|
|
break;
|
|
case 13:
|
|
op[num_color].optext = "Porsche";
|
|
break;
|
|
case 14:
|
|
op[num_color].optext = "Light Purple";
|
|
break;
|
|
case 15:
|
|
op[num_color].optext = "Hot Pink";
|
|
break;
|
|
case 16:
|
|
op[num_color].optext = "Retro Green";
|
|
break;
|
|
case 17:
|
|
op[num_color].optext = "Random";
|
|
break;
|
|
}
|
|
|
|
switch(showname){
|
|
case 0:
|
|
op[num_showname].optext = "disabled";
|
|
oControl.showname = "disabled";
|
|
break;
|
|
case 1:
|
|
op[num_showname].optext = "enabled";
|
|
oControl.showname = "enabled";
|
|
break;
|
|
}
|
|
|
|
switch(oControl.preferredcolor){
|
|
case 1:
|
|
color = "green";
|
|
break;
|
|
case 2:
|
|
color = "red";
|
|
break;
|
|
case 3:
|
|
color = "blue";
|
|
break;
|
|
case 4:
|
|
color = "yellow";
|
|
break;
|
|
case 5:
|
|
color = "orange";
|
|
break;
|
|
case 6:
|
|
color = "purple";
|
|
break;
|
|
case 7:
|
|
color = "pink";
|
|
break;
|
|
case 8:
|
|
color = "white";
|
|
break;
|
|
case 9:
|
|
color = "canary";
|
|
break;
|
|
case 10:
|
|
color = "red orange";
|
|
break;
|
|
case 11:
|
|
color = "sky blue";
|
|
break;
|
|
case 12:
|
|
color = "gold";
|
|
break;
|
|
case 13:
|
|
color = "porsche";
|
|
break;
|
|
case 14:
|
|
color = "light purple";
|
|
break;
|
|
case 15:
|
|
color = "hot pink";
|
|
break;
|
|
case 16:
|
|
color = "retro green";
|
|
break;
|
|
case 17:
|
|
color = "random";
|
|
break;
|
|
}
|
|
|
|
switch(sequence){
|
|
case 0:
|
|
_sequence = "disabled";
|
|
break;
|
|
case 1:
|
|
_sequence = "synced";
|
|
break;
|
|
}
|
|
|
|
switch(showname){
|
|
case 0:
|
|
_showname = "disabled";
|
|
break;
|
|
case 1:
|
|
_showname = "enabled";
|
|
break;
|
|
}
|
|
|
|
switch(oControl.palette){
|
|
case 0:
|
|
op[num_palette].optext = "Default";
|
|
break;
|
|
case 1:
|
|
op[num_palette].optext = "Color";
|
|
break;
|
|
case 2:
|
|
op[num_palette].optext = "Custom";
|
|
break;
|
|
case 3:
|
|
op[num_palette].optext = "Disabled";
|
|
break;
|
|
}
|
|
|
|
switch(oControl.useselfpalette){
|
|
case 0:
|
|
op[num_selfpalette].optext = "Disabled";
|
|
break;
|
|
case 1:
|
|
op[num_selfpalette].optext = "Enabled";
|
|
break;
|
|
}
|
|
|
|
|
|
switch(oControl.censorip){
|
|
case 0:
|
|
op[num_censorip].optext = "Disabled";
|
|
break;
|
|
case 1:
|
|
op[num_censorip].optext = "Enabled";
|
|
break;
|
|
}
|
|
|
|
switch(global.lobbyLocked){
|
|
case 0:
|
|
op[num_locklobby].optext = "Open";
|
|
break;
|
|
case 1:
|
|
op[num_locklobby].optext = "Locked";
|
|
break;
|
|
}
|
|
|
|
switch(global.saxmode){
|
|
case 0:
|
|
op[num_saxmode].optext = "Disabled";
|
|
break;
|
|
case 1:
|
|
op[num_saxmode].optext = "Enabled";
|
|
break;
|
|
}
|
|
|
|
ini_open(working_directory + "\multitroid\mod_settings.ini");
|
|
ini_write_string("ModSettings", "ipaddress", ip);
|
|
ini_write_real("ModSettings", "port", real(port));
|
|
ini_write_string("ModSettings", "displayname", name);
|
|
ini_write_string("ModSettings", "reactorsequence", _sequence);
|
|
ini_write_string("ModSettings", "preferredcolor", color);
|
|
ini_write_string("ModSettings", "showname", _showname);
|
|
ini_write_real("ModSettings", "palette", oControl.palette);
|
|
ini_write_real("ModSettings", "censorip", oControl.censorip);
|
|
ini_write_real("ModSettings", "selfpalette", oControl.useselfpalette);
|
|
ini_write_string("ModSettings", "moderatorpass", password);
|
|
ini_close();
|
|
|
|
oControl.ipaddress = ip;
|
|
oControl.name = name;
|
|
oControl.port = real(port);
|
|
oControl.password = password;
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="7" enumb="11">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>done = true;
|
|
for (var i = 0; i <= lastitem; i++)
|
|
{
|
|
with (op[i]) instance_destroy();
|
|
}
|
|
|
|
with (op[50]) instance_destroy();
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
<event eventtype="7" enumb="10">
|
|
<action>
|
|
<libid>1</libid>
|
|
<id>603</id>
|
|
<kind>7</kind>
|
|
<userelative>0</userelative>
|
|
<isquestion>0</isquestion>
|
|
<useapplyto>-1</useapplyto>
|
|
<exetype>2</exetype>
|
|
<functionname></functionname>
|
|
<codestring></codestring>
|
|
<whoName>self</whoName>
|
|
<relative>0</relative>
|
|
<isnot>0</isnot>
|
|
<arguments>
|
|
<argument>
|
|
<kind>1</kind>
|
|
<string>//This list needs to be in order. It won't work correctly otherwise.
|
|
|
|
sep = 16;
|
|
op[50] = instance_create(x, y, oMenuLabel);
|
|
op[50].text = "Multitroid settings";
|
|
|
|
var tempcount = 1;
|
|
|
|
op[num_censorip] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_censorip].label = "IP Address Censoring";
|
|
op[num_censorip].optionid = num_censorip;
|
|
|
|
op[num_ip] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
|
|
op[num_ip].label = "IP Address";
|
|
op[num_ip].optionid = num_ip;
|
|
|
|
op[num_port] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
|
|
op[num_port].label = "Port";
|
|
op[num_port].optionid = num_port;
|
|
|
|
op[num_name] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
|
|
op[num_name].label = "Display name";
|
|
op[num_name].optionid = num_name;
|
|
|
|
op[num_color] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_color].label = "Preferred color";
|
|
op[num_color].optionid = num_color;
|
|
if(!global.shaders_compiled){
|
|
op[num_color].enabled = 0;
|
|
canedit[num_color] = 0;
|
|
}
|
|
|
|
op[num_palette] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_palette].label = "Palette";
|
|
op[num_palette].optionid = num_palette;
|
|
if(!global.shaders_compiled){
|
|
op[num_palette].enabled = 0;
|
|
canedit[num_palette] = 0;
|
|
}
|
|
|
|
op[num_selfpalette] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_selfpalette].label = "Self palette";
|
|
op[num_selfpalette].optionid = num_selfpalette;
|
|
if(!global.shaders_compiled){
|
|
op[num_selfpalette].enabled = 0;
|
|
canedit[num_selfpalette] = 0;
|
|
}
|
|
|
|
op[num_showname] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_showname].label = "Show names";
|
|
op[num_showname].optionid = num_showname;
|
|
|
|
op[num_moderator] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
|
|
op[num_moderator].label = "Moderator Password";
|
|
op[num_moderator].optionid = num_moderator;
|
|
|
|
op[num_difficulty] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_difficulty].label = "Difficulty";
|
|
op[num_difficulty].optionid = num_difficulty;
|
|
|
|
op[num_difficulty].enabled = 0;
|
|
canedit[num_difficulty] = 0;
|
|
|
|
op[num_elm] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_elm].label = "Extreme Lab Metroids";
|
|
op[num_elm].optionid = num_elm;
|
|
|
|
op[num_elm].enabled = 0;
|
|
canedit[num_elm] = 0;
|
|
|
|
op[num_seedgen] = instance_create(x, y + sep * tempcount++, oPauseOption);
|
|
op[num_seedgen].optionid = num_seedgen;
|
|
op[num_seedgen].label = "Send seed";
|
|
|
|
op[num_seedgen].enabled = 0;
|
|
canedit[num_seedgen] = 0;
|
|
|
|
op[num_customseed] = instance_create(x, y + sep * tempcount++, oOptionLRMod);
|
|
op[num_customseed].optionid = num_customseed;
|
|
op[num_customseed].label = "Custom seed";
|
|
|
|
op[num_customseed].enabled = 0;
|
|
canedit[num_customseed] = 0;
|
|
|
|
op[num_reset] = instance_create(x, y + sep * tempcount++, oPauseOption);
|
|
op[num_reset].optionid = num_reset;
|
|
op[num_reset].label = "Reset server";
|
|
|
|
op[num_reset].enabled = 0;
|
|
canedit[num_reset] = 0;
|
|
|
|
op[num_locklobby] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_locklobby].optionid = num_locklobby;
|
|
op[num_locklobby].label = "Lock lobby";
|
|
|
|
op[num_locklobby].enabled = 0;
|
|
canedit[num_locklobby] = 0;
|
|
|
|
op[num_saxmode] = instance_create(x, y + sep * tempcount++, oOptionLR);
|
|
op[num_saxmode].optionid = num_saxmode;
|
|
op[num_saxmode].label = "SA-X Mode";
|
|
|
|
op[num_saxmode].enabled = 0;
|
|
canedit[num_saxmode] = 0;
|
|
|
|
op[num_connection] = instance_create(x, y + sep * tempcount++, oPauseOption);
|
|
op[num_connection].optionid = num_connection;
|
|
op[num_connection].label = connectiontxt;
|
|
connID = op[num_connection].id;
|
|
|
|
op[lastitem] = instance_create(x, y + sep * (lastitem + 1), oPauseOption);
|
|
op[lastitem].optionid = lastitem;
|
|
op[lastitem].label = get_text("GlobalOptions", "Exit");
|
|
event_user(2);
|
|
|
|
|
|
|
|
</string>
|
|
</argument>
|
|
</arguments>
|
|
</action>
|
|
</event>
|
|
</events>
|
|
<PhysicsObject>0</PhysicsObject>
|
|
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
|
<PhysicsObjectShape>0</PhysicsObjectShape>
|
|
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
|
|
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
|
|
<PhysicsObjectGroup>0</PhysicsObjectGroup>
|
|
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
|
|
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
|
|
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
|
|
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
|
|
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
|
|
<PhysicsShapePoints/>
|
|
</object>
|