Skip to content

Commit d0fa783

Browse files
authored
Merge pull request #118 from HielkeMinecraft/development
3.7.1
2 parents b57c225 + 5199c42 commit d0fa783

File tree

62 files changed

+462
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+462
-195
lines changed

Minecraft Note Block Studio.yyp

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/action_redo/action_redo.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ arg14 = history[historypos, 15]
2121
changed = 1
2222

2323
if (t = h_addblock) {
24-
add_block(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
24+
add_block(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
2525
} else if (t = h_removeblock) {
2626
remove_block(arg0, arg1)
2727
} else if (t = h_changeblock) {

scripts/action_undo/action_undo.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ changed = 1
2222
if (t = h_addblock) {
2323
remove_block(arg0, arg1)
2424
} else if (t = h_removeblock) {
25-
add_block(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
25+
add_block(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
2626
} else if (t = h_changeblock) {
2727
change_block(arg0, arg1, arg7, arg8, arg9, arg10, arg11)
2828
} else if (t = h_selectadd) {

scripts/add_block/add_block.gml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// add_block(x, y, ins, key, vel, pan, [insnum])
1+
// add_block(x, y, ins, key, vel, pan, pit, [insnum])
22
var a, b, c, xx, yy, ins, key, vel, pan, pit, insnum;
33
xx = argument[0]
44
yy = argument[1]
@@ -51,6 +51,7 @@ if (!insnum) {
5151
if (ins.user) block_custom += 1
5252
}
5353
if (key < 33 || key > 57) block_outside += 1
54+
if (pit != 0) block_pitched += 1
5455
totalblocks += 1
5556

5657
if (colfirst[xx] = -1 || yy < colfirst[xx]) colfirst[xx] = yy

scripts/add_block_manual/add_block_manual.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ rowamount[yy] += 1
5353
ins.num_blocks++
5454
if (key < 33 || key > 57) block_outside += 1
5555
if (ins.user) block_custom += 1
56+
if (pit != 0) block_pitched += 1
5657
totalblocks += 1
5758
changed = 1
5859
work_add += 1

scripts/add_block_select/add_block_select.gml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// add_block_select(x, y, ins, key, vel, pan)
1+
// add_block_select(x, y, ins, key, vel, pan, pit)
22
var a, b, c, xx, yy, ins, key, vel, pan, pit;
33
xx = argument0
44
yy = argument1
@@ -44,6 +44,7 @@ rowamount[yy] += 1
4444
ins.num_blocks++
4545
if (key < 33 || key > 57) block_outside += 1
4646
if (ins.user) block_custom += 1
47+
if (pit != 0) block_pitched += 1
4748
totalblocks += 1
4849

4950
if (colfirst[xx] = -1 || yy < colfirst[xx]) colfirst[xx] = yy

scripts/calculate_size/calculate_size.gml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ if (block_outside > 0) {
55
if (block_custom > 0) {
66
if (!question("Some note blocks have a custom instrument assigned to them. Export anyway?", "Minecraft Compatibility")) return 0
77
}
8+
if (block_pitched > 0) {
9+
if (!question("Some note blocks have fine pitch tuning, which isn't supported in note blocks. Export anyway?", "Minecraft Compatibility")) return 0
10+
}
811
if (tempo != 10 && tempo != 5 && tempo != 2.5) {
912
message("The tempo of the song is not compatible with Minecraft. As a result, the playback speed of the song in-game will differ from the one in the program.", "Tempo")
1013
}

scripts/change_block_manual/change_block_manual.gml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ history_set(h_changeblock, xx, yy, ins, key, vel, pan, pit, pins, pkey, pvel, pp
2424
changed = 1
2525
if (pkey >= 33 && pkey <= 57 && (key < 33 || key > 57)) block_outside += 1
2626
if (key >= 33 && key <= 57 && (pkey < 33 || pkey > 57)) block_outside -= 1
27+
if (ppit = 0 && pit != 0) block_pitched += 1
28+
if (ppit != 0 && pit = 0) block_pitched -= 1
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// check_updates()
2+
// Handles the update checking
3+
// update values:
4+
// -1: unable to check for update
5+
// 1: update found
6+
// 2: up to date
7+
8+
if (async_load[? "id"] = update_http) {
9+
update_http = -1
10+
if (async_load[? "http_status"] = 200) {
11+
var res = async_load[? "result"];
12+
if (is_string(res)) {
13+
res = json_decode(res)
14+
if(res[?"tag_name"] != undefined){
15+
var newVersion = string_replace(res[?"tag_name"],"v","")
16+
if (string_count(".", newVersion) = 2) {
17+
if (newVersion = version) {
18+
update = 2
19+
} else {
20+
if (question("Version " + newVersion + " is available! Do you want to download it?", "Update available!")) {
21+
update_download = http_get_file("https://github.com/HielkeMinecraft/OpenNoteBlockStudio/releases/latest/download/Minecraft.Note.Block.Studio.exe", update_file)
22+
update = 4
23+
} else {
24+
update = 1
25+
}
26+
}
27+
}
28+
}else
29+
update = -1
30+
}else
31+
update = -1
32+
} else
33+
update = -1
34+
}

scripts/check_updates/check_updates.yy

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)