Skip to content

Commit f08e1b2

Browse files
authored
Merge pull request #225 from HielkeMinecraft/development
3.8.2
2 parents 862ee52 + 11ff48d commit f08e1b2

File tree

11 files changed

+34
-16
lines changed

11 files changed

+34
-16
lines changed

datafiles/Data/changelog.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Changes in v3.8.2 (2021.01.04):
2+
* Added a warning about version compatibility when exporting a schematic.
3+
* Fixed a crash when trying to export a schematic.
4+
* Fixed settings being saved too often, causing high disk and CPU usage.
5+
* Fixed wrong note block counts in Compatibility and Song stats.
6+
* Fixed red outline on out-of-range blocks being too large.
7+
* Fixed a glitch in the Save options window when using the Aqua theme.
8+
* Fixed a blurry button in Instrument settings.
9+
110
Changes in v3.8.1 (2020.12.31):
211
* Increased max number of custom instruments from 18 to 240.
312
* It's now possible to reorder custom instruments on the instrument settings.
@@ -239,7 +248,6 @@ Changes in v3.3.8 (2019.03.21):
239248
* Fixed a glitch with layer names.
240249
* Fixed a glitch with compatibility indicator.
241250

242-
243251
Changes in v3.3.7 (2019.03.13):
244252
* Changed fonts.
245253
* Added support for cyrillic characters.

scripts/add_block_manual/add_block_manual.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ function add_block_manual(argument0, argument1, argument2, argument3, argument4,
3535
if ((key < 33 || key > 57) && warning_octaves = 0) {
3636
message("NOTE: Since this block is outside the 2 octave limit, you won't be able to import it into Minecraft without a resource pack.\n\nThis warning will never be shown again.", "Warning")
3737
warning_octaves = 1
38+
save_settings()
3839
} else if (ins.user && warning_instrument = 0) {
3940
message("NOTE: Since this block has a custom instrument, you won't be able to import it into Minecraft without mods or resource packs.\n\nThis warning will never be shown again.", "Warning")
4041
warning_instrument = 1
42+
save_settings()
4143
}
4244

4345
// Add block

scripts/blocks_set_instruments/blocks_set_instruments.gml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ function blocks_set_instruments() {
88
if (colamount[a] > 0) {
99
for (b = 0; b <= collast[a]; b += 1) {
1010
if (song_exists[a, b]) {
11-
show_debug_message(instrument_list[| song_ins[a, b]])
1211
song_ins[a, b] = instrument_list[| song_ins[a, b]]
13-
//song_ins[a, b].num_blocks++
14-
//if (song_ins[a, b].user) block_custom++
12+
song_ins[a, b].num_blocks++
13+
if (song_ins[a, b].user) block_custom++
1514
}
1615
}
1716
}

scripts/calculate_size/calculate_size.gml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
function calculate_size() {
22
var a, b, c;
3+
if (warning_schematic == 0) {
4+
message("The exported schematic is currently only compatible with Minecraft: Java Edition 1.12 and below. To import it in 1.13 and above, first create a world in 1.12, import the schematic, then open the world in 1.13 or above. Newer versions may be supported in the future.\n\nThis warning will never be shown again.", "Warning")
5+
warning_schematic = 1
6+
save_settings()
7+
}
38
if (block_outside > 0) {
49
if (!question("Some note blocks are outside of Minecraft's 2 octave limit. Do you want to export a Schematic anyway, ignoring the affected blocks?", "Minecraft Compatibility")) return 0
510
}
@@ -75,7 +80,7 @@ function calculate_size() {
7580
for (b = 0; b < 2; b += 1) {
7681
if (a <= scp_exp_enda[b]) {
7782
sch_exp_repeaters[b, 2] += 1
78-
if (sch_colamount[a] > 0) {
83+
if (sch_colamount[b, a] > 0) {
7984
sch_exp_repeaters[b, 0] += 1
8085
cnt[b, 0] = 0
8186
sch_exp_repeaters[b, 1] += 1

scripts/control_draw/control_draw.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@ function control_draw() {
4949
if (keyboard_check_pressed(vk_enter) || keyboard_check_pressed(vk_space) || keyboard_check_pressed(vk_escape)) {
5050
piano_key[key_edit] = 0
5151
key_edit = -1
52+
save_settings()
5253
} else if (keyboard_check_pressed(vk_anykey)) {
5354
piano_key[key_edit] = keyboard_lastkey
5455
key_edit = -1
56+
save_settings()
5557
}
5658
}
5759

scripts/draw_block/draw_block.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function draw_block(argument0, argument1, argument2, argument3, argument4, argum
6161
if (show_incompatible && (ins.user || key < 33 || key > 57)) {
6262
draw_set_color(c_red)
6363
draw_set_alpha(1)
64-
draw_rectangle(xx, yy, xx + 32, yy + 32, 1)
64+
draw_rectangle(xx + 1, yy + 1, xx + 31, yy + 31, 1)
6565
}
6666
draw_set_color(c_white)
6767
if (salpha > 0) {

scripts/draw_window_instruments/draw_window_instruments.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function draw_window_instruments() {
4242
sounds++
4343
}
4444
}
45-
if (draw_button2(x1 + 12, y1 + 318, 85, "Export sounds", (user_instruments == 0 || sounds == 0))) pack_instruments()
45+
if (draw_button2(x1 + 12, y1 + 318, 86, "Export sounds", (user_instruments == 0 || sounds == 0))) pack_instruments()
4646
c = 0
4747
if (draw_button2(x1 + 110, y1 + 318, 80, "Add", user_instruments >= 240) && wmenu = 0) {
4848
changed = true
@@ -78,6 +78,7 @@ function draw_window_instruments() {
7878
show_message("This song contains more than 18 instruments and cannot be saved in version " + string(save_version) + ". The save version will be changed to " + string(nbs_version) + ".")
7979
save_version = nbs_version
8080
}
81+
save_settings()
8182
}
8283
if (mouse_check_button_pressed(mb_left)) {
8384
insedit = -1
@@ -170,7 +171,6 @@ function draw_window_instruments() {
170171
draw_line(x1 + 13 + 194 + 160 + 80, y1 + 87, x1 + 13 + 194 + 160 + 80, y1 + 86 + 20 * a)
171172
draw_scrollbar(insscrollbar, x1 + 14 + 194 + 160 + 80 + 70, y1 + 88, 21, 9, ds_list_size(instrument_list) - 2, 0, 1)
172173
window_set_cursor(curs)
173-
save_settings()
174174

175175

176176
}

scripts/draw_window_preferences/draw_window_preferences.gml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,11 @@ function draw_window_preferences() {
188188
if (draw_radiobox(x1 + 233 + 32, y1 + 224 + 16, !use_bpm, "Ticks per second (t/s)", "Display song tempos in ticks per second.")) use_bpm = 0
189189
if (draw_radiobox(x1 + 233 + 32, y1 + 244 + 16, use_bpm, "Beats per minute (BPM)", "Display song tempos in beats per minute.")) use_bpm = 1
190190
}
191-
if (draw_button2(x1 + 420, y1 + 478, 72, "OK")) window = 0
192-
window_set_cursor(curs)
193-
save_settings()
194-
191+
if (draw_button2(x1 + 420, y1 + 478, 72, "OK")) {
192+
window = 0
193+
window_set_cursor(curs)
194+
save_settings()
195+
}
195196

196197

197198
}

scripts/draw_window_save_options/draw_window_save_options.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ function draw_window_save_options() {
1111
draw_set_font(fnt_main)
1212
if (theme = 0) {
1313
draw_set_color(c_white)
14-
draw_rectangle(x1 + 6, y1 + 26, x1 + 134, y1 + 117, 0)
14+
draw_rectangle(x1 + 6, y1 + 26, x1 + 134, y1 + 132, 0)
1515
draw_set_color(make_color_rgb(137, 140, 149))
16-
draw_rectangle(x1 + 6, y1 + 26, x1 + 134, y1 + 117, 1)
16+
draw_rectangle(x1 + 6, y1 + 26, x1 + 134, y1 + 132, 1)
1717
}
1818
draw_theme_color()
1919

scripts/draw_window_update/draw_window_update.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ function draw_window_update() {
3838
if (draw_button2(x1 + 220, y1 + 340, 72, "OK")) {
3939
if (window = w_update) {
4040
window = w_greeting
41+
save_settings() // Save new version number
4142
} else {
4243
window = 0
4344
}

0 commit comments

Comments
 (0)