Skip to content

Commit 5c229e6

Browse files
committed
Don't set a default .minecraft location for macOS
1 parent 305521f commit 5c229e6

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

scripts/control_create/control_create.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ function control_create() {
557557
// Import sounds
558558
mc_default_path = string_copy(game_save_id, 0, string_last_pos(condstr(os_type = os_windows, "\\", "/"), string_copy(game_save_id, 1, string_length(game_save_id) - 1))) + condstr(os_type != os_macosx, ".") + "minecraft/";
559559
if (os_type = os_windows) mc_default_path = string_replace_all(mc_default_path, "/", "\\");
560+
if (os_type = os_macosx) mc_default_path = (language != 1 ? "Please choose one..." : "请选择……")
560561
mc_install_path = mc_default_path;
561562

562563
var asset_index_names_keys = ["pre-1.6", "legacy", "1.7.3", "1.7.4", "1.7.10", "14w25a", "14w31a", "1.8", "1.9", "1.9-aprilfools", "1.10", "1.11", "1.12", "1.13", "1.13.1", "1.14", "1.14-af", "1.15", "1.16", "1.17", "1.18", "1.19", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "_"];

scripts/menu_click/menu_click.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function menu_click(argument0) {
194194
ins -= floor((ins) / 26) // subtract the "More..." entries to get the instrument number
195195
if (sel < insoffset + 1) {songs[song].instrument = songs[song].instrument_list[| ins]; selected_vel = 100; selected_pan = 100; selected_pit = 0}
196196
if (sel = insoffset + 1) window = w_instruments
197-
if (sel = insoffset + 2) { window = w_sound_import update_asset_index_menu() }
197+
if (sel = insoffset + 2) { window = w_sound_import update_asset_index_menu(0) }
198198
if (sel = insoffset + 3) window = w_songinfoedit
199199
if (sel = insoffset + 4) window = w_properties
200200
if (sel = insoffset + 5) {selection_place(0) window = w_stats}

scripts/sound_import/sound_import.gml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,14 @@ function get_assets_dir() {
2121
}
2222

2323
function find_asset_indexes() {
24+
var check_exists = 1
25+
if (argument_count > 0) check_exists = argument0
2426

2527
if (!directory_exists(mc_install_path)) {
26-
if (language != 1) message("No Minecraft installation was found\nat the selected location!", "Sound import");
27-
else message("在所选位置未找到有Minecraft安装!", "音效导入");
28+
if (!check_exists) {
29+
if (language != 1) message("No Minecraft installation was found\nat the selected location!", "Sound import");
30+
else message("在所选位置未找到有Minecraft安装!", "音效导入");
31+
}
2832
return [];
2933
}
3034
if (os_type = os_macosx) macos_bookmark_begin(mc_install_path)

0 commit comments

Comments
 (0)