mirror of
https://github.com/PoshoDev/DexTool.git
synced 2026-08-20 09:34:12 -05:00
Added Shiny visibility with error prevention.
This commit is contained in:
@@ -15062,6 +15062,14 @@
|
||||
"resourceType": "GMIncludedFile"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "961739d9-bcef-9d3d-a9a7-6d0487191e8e",
|
||||
"Value": {
|
||||
"id": "cf68e563-92be-d148-9a63-2bb86baa8cc2",
|
||||
"resourcePath": "scripts\/icon_path_get\/icon_path_get.yy",
|
||||
"resourceType": "GMScript"
|
||||
}
|
||||
},
|
||||
{
|
||||
"Key": "961d8a7b-8870-4aec-b54b-34a0dd33e129",
|
||||
"Value": {
|
||||
@@ -25421,7 +25429,8 @@
|
||||
"e257f1de-10d0-486a-a721-c70dd8b0aa73",
|
||||
"cbd4e6c3-a230-4859-b701-f265d466f46e",
|
||||
"3247001c-7534-4dfa-8b6f-ceb476a8fffa",
|
||||
"ac8c8340-c548-499d-8832-1749194e8f3d"
|
||||
"ac8c8340-c548-499d-8832-1749194e8f3d",
|
||||
"961739d9-bcef-9d3d-a9a7-6d0487191e8e"
|
||||
],
|
||||
"tutorial": ""
|
||||
}
|
||||
@@ -73,7 +73,8 @@ if (file_exists("save.ini"))
|
||||
{
|
||||
ini_open("save.ini")
|
||||
global.current_box = ini_read_real("Navigation", "Current Box", 1);
|
||||
global.show_galar = ini_read_real("Display", "Galar Dex", false);
|
||||
global.show_galar = ini_read_real("Display", "Galar Dex", false);
|
||||
global.show_shiny = ini_read_real("Display", "Shiny Mode", false);
|
||||
|
||||
for (var i=0; i<=global.dex_len; i++)
|
||||
global.savedata[i] = ini_read_real("Pokemon", string(i), 0);
|
||||
@@ -89,6 +90,7 @@ else
|
||||
|
||||
global.current_box = 1;
|
||||
global.show_galar = false;
|
||||
global.show_shiny = false;
|
||||
|
||||
for (var i=0; i<=global.dex_len; i++)
|
||||
global.savedata[i] = 0;
|
||||
|
||||
@@ -14,5 +14,4 @@ draw_type_hud(global.selected[dex.type1], global.selected[dex.type2], 4.5);
|
||||
|
||||
// Debug
|
||||
|
||||
//draw_guidelines(false);
|
||||
|
||||
draw_guidelines(true);
|
||||
|
||||
1
Project/DexTool/objects/obj_global/KeyPress_73.gml
Normal file
1
Project/DexTool/objects/obj_global/KeyPress_73.gml
Normal file
@@ -0,0 +1 @@
|
||||
script_execute(make_screenshot,0,0,0,0,0);
|
||||
@@ -1 +1,10 @@
|
||||
script_execute(make_screenshot,0,0,0,0,0);
|
||||
global.show_shiny = !global.show_shiny
|
||||
|
||||
if (file_exists("save.ini"))
|
||||
{
|
||||
ini_open("save.ini")
|
||||
ini_write_real("Display", "Shiny Mode", global.show_shiny);
|
||||
ini_close();
|
||||
}
|
||||
|
||||
room_restart();
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
},
|
||||
{
|
||||
"id": "8405e8f9-ffe3-458f-b3e5-c28dbb847442",
|
||||
"id": "107c5c32-28b7-49cb-bf70-f24296321d25",
|
||||
"modelName": "GMEvent",
|
||||
"mvc": "1.0",
|
||||
"IsDnD": false,
|
||||
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
|
||||
"enumb": 2,
|
||||
"enumb": 0,
|
||||
"eventtype": 3,
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
},
|
||||
@@ -35,12 +35,12 @@
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
},
|
||||
{
|
||||
"id": "107c5c32-28b7-49cb-bf70-f24296321d25",
|
||||
"id": "8405e8f9-ffe3-458f-b3e5-c28dbb847442",
|
||||
"modelName": "GMEvent",
|
||||
"mvc": "1.0",
|
||||
"IsDnD": false,
|
||||
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
|
||||
"enumb": 0,
|
||||
"enumb": 2,
|
||||
"eventtype": 3,
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
},
|
||||
@@ -73,6 +73,16 @@
|
||||
"enumb": 71,
|
||||
"eventtype": 9,
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
},
|
||||
{
|
||||
"id": "db58ef6f-3cf5-6035-8582-75865e3af3c8",
|
||||
"modelName": "GMEvent",
|
||||
"mvc": "1.0",
|
||||
"IsDnD": false,
|
||||
"eventtype": 9,
|
||||
"enumb": 73,
|
||||
"collisionObjectId": "00000000-0000-0000-0000-000000000000",
|
||||
"m_owner": "b5a21a9b-6e2e-40d3-9039-73cd19a7b959"
|
||||
}
|
||||
],
|
||||
"maskSpriteId": "00000000-0000-0000-0000-000000000000",
|
||||
|
||||
29
Project/DexTool/scripts/icon_path_get/icon_path_get.gml
Normal file
29
Project/DexTool/scripts/icon_path_get/icon_path_get.gml
Normal file
@@ -0,0 +1,29 @@
|
||||
///icon_path_get(str[pkmn+form], shiny?)
|
||||
|
||||
var str = argument0;
|
||||
var shiny = argument1;
|
||||
|
||||
if (!shiny)
|
||||
var folder = "Regular";
|
||||
else
|
||||
var folder = "Shiny";
|
||||
|
||||
var filename = "Icons\\"+folder+"\\"+string(str)+".png";
|
||||
|
||||
if (!file_exists(filename))
|
||||
{
|
||||
if (!directory_exists("_Logs"))
|
||||
directory_create("_Logs")
|
||||
|
||||
var log = file_text_open_append(working_directory+"/_Logs/MissingSprites.log")
|
||||
file_text_write_string(log, str+" ("+folder+")");
|
||||
file_text_writeln(log);
|
||||
file_text_close(log);
|
||||
|
||||
show_debug_message("Missing Icon: "+str+" ("+folder+")");
|
||||
|
||||
if (shiny)
|
||||
return icon_path_get(str, false);
|
||||
}
|
||||
|
||||
return filename;
|
||||
8
Project/DexTool/scripts/icon_path_get/icon_path_get.yy
Normal file
8
Project/DexTool/scripts/icon_path_get/icon_path_get.yy
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"id": "961739d9-bcef-9d3d-a9a7-6d0487191e8e",
|
||||
"modelName": "GMScript",
|
||||
"mvc": "1.0",
|
||||
"name": "icon_path_get",
|
||||
"IsCompatibility": false,
|
||||
"IsDnD": false
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
/// @description make_slot(x_index, y_index, Pokémon index)
|
||||
/// @param x_index
|
||||
/// @param y_index
|
||||
/// @param Pokémon index
|
||||
///make_slot(x_index, y_index, Pokémon index)
|
||||
|
||||
var px = argument0;
|
||||
var py = argument1;
|
||||
|
||||
@@ -1,22 +1,17 @@
|
||||
/// @description make_sprite(pokemon, form)
|
||||
/// @param pokemon
|
||||
/// @param form
|
||||
///make_sprite(pokemon, form)
|
||||
|
||||
var pkmn = argument0;
|
||||
var form = argument1;
|
||||
|
||||
var sprtemp;
|
||||
var str = pkmn;
|
||||
|
||||
if (form != "")
|
||||
{
|
||||
str = form_get_string(pkmn, form);
|
||||
//show_debug_message(str);
|
||||
}
|
||||
|
||||
sprtemp = sprite_add("Icons\\Regular\\"+string(str)+".png",0,false,false,19,14);
|
||||
var path = icon_path_get(str, global.show_shiny);
|
||||
var sprtemp = sprite_add(path, 0, false, false, 19, 14);
|
||||
|
||||
if (sprite_get_width(sprtemp) > 40 || sprite_get_height(sprtemp) > 30 || sprite_get_height(sprtemp) == 29 || pkmn=="ALCREMIE")
|
||||
sprite_set_offset(sprtemp, sprite_get_width(sprtemp)/2, sprite_get_height(sprtemp)/2);
|
||||
|
||||
return sprtemp;
|
||||
return sprtemp;
|
||||
@@ -34,7 +34,8 @@
|
||||
"5613b2cc-c046-476d-8550-02c1c597e3c6",
|
||||
"f9b58311-f42f-4092-8b77-56cf2bed59c9",
|
||||
"f9ef32bc-566b-4f55-b4ad-0c7ece021e10",
|
||||
"4c6c661a-b881-4851-8e46-222958fde9e9"
|
||||
"4c6c661a-b881-4851-8e46-222958fde9e9",
|
||||
"961739d9-bcef-9d3d-a9a7-6d0487191e8e"
|
||||
],
|
||||
"filterType": "GMScript",
|
||||
"folderName": "scripts",
|
||||
|
||||
Reference in New Issue
Block a user