Skip to content

Commit aef84c6

Browse files
committed
track export part 3
1 parent fa64d51 commit aef84c6

9 files changed

Lines changed: 345 additions & 616 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
function block_circuit_track(x, y, z){
22
TAG_List("pos", 3, 3)
3-
buffer_write_int_be(y)
3+
buffer_write_int_be(99 - y)
44
buffer_write_int_be(z)
55
buffer_write_int_be(x)
66
TAG_Int("state", 1)
7+
TAG_End()
8+
totalblocksc++
79
}

scripts/block_other_track/block_other_track.gml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function block_other_track(x, y, z, id, data){
2-
var insnum = insnum = ds_list_size(instrument_list)
2+
var insnum = ds_list_size(instrument_list)
33
if (id = 0) TAG_Int("state", insnum * 26 + 4) //air
44
else if (id = 35 && data = 11) TAG_Int("state", insnum * 26 + 3) //blue_wool
55
else if (id = 65) TAG_Int("state", insnum * 26 + 5) //ladder
@@ -23,8 +23,9 @@ function block_other_track(x, y, z, id, data){
2323
}
2424
}
2525
TAG_List("pos", 3, 3)
26-
buffer_write_int_be(y)
26+
buffer_write_int_be(99 - y)
2727
buffer_write_int_be(z)
2828
buffer_write_int_be(x)
2929
TAG_End()
30+
totalblocksc++
3031
}
Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
11
function block_repeater_track(x, y, z, delay, direction, powered){
2-
var insnum = insnum = ds_list_size(instrument_list)
2+
var insnum = ds_list_size(instrument_list)
33
var dir
4-
if (direction = 1) dir = 11
5-
else if (direction = 1 + 4) dir = 12
6-
else if (direction = 1 + 4 * 2) dir = 13
7-
else if (direction = 1 + 4 * 3) dir = 14
8-
else if (direction = 2) dir = 7
9-
else if (direction = 2 + 4) dir = 8
10-
else if (direction = 2 + 4 * 2) dir = 9
11-
else if (direction = 2 + 4 * 3) dir = 10
12-
else if (direction = 3) dir = 15
4+
if (direction = 1) {
5+
if (delay = 0) dir = 11
6+
else if (delay = 1) dir = 12
7+
else if (delay = 2) dir = 13
8+
else if (delay = 3) dir = 14
9+
}
10+
else if (direction = 2) {
11+
if (delay = 0) dir = 7
12+
else if (delay = 1) dir = 8
13+
else if (delay = 2) dir = 9
14+
else if (delay = 3) dir = 10
15+
}
16+
else if (direction = 3) {
17+
dir = 15
18+
}
1319
TAG_List("pos", 3, 3)
14-
buffer_write_int_be(y)
20+
buffer_write_int_be(99 - y)
1521
buffer_write_int_be(z)
1622
buffer_write_int_be(x)
1723
TAG_Int("state", insnum * 26 + dir)
1824
TAG_End()
25+
totalblocksc++
1926
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
function block_walkway_track(x, y, z){
22
TAG_List("pos", 3, 3)
3-
buffer_write_int_be(y)
3+
buffer_write_int_be(99 - y)
44
buffer_write_int_be(z)
55
buffer_write_int_be(x)
66
TAG_Int("state", 0)
77
TAG_End()
8+
totalblocksc++
89
}

scripts/control_create/control_create.gml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ function control_create() {
5656
icon_time = -1
5757
last_icon = -1
5858
icon_display = 1
59-
minus = 0
6059

6160
font_table =
6261
[

scripts/control_draw/control_draw.gml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,6 @@ function control_draw() {
122122
else set_msg("全屏模式 => 关闭")
123123
}
124124
}
125-
if (keyboard_check_pressed(ord("M"))) {
126-
minus -= 1
127-
}
128-
if (keyboard_check_pressed(ord("N"))) {
129-
minus += 1
130-
}
131-
//show_debug_message(minus)
132125
}
133126

134127
if (theme = 0) window_background = 15790320

scripts/macros/macros.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function macros() {
22
#macro gm_runtime_version "2022.2.0.487"
3-
#macro version_date "2022.05.24"
3+
#macro version_date "2022.06.16"
44
#macro version "3.10.0-beta.3"
55
#macro is_prerelease 1 // remember to change to 0 in the release!
66
#macro nbs_version 5

scripts/schematic_export/schematic_export.gml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,8 +951,8 @@ function schematic_export() {
951951
TAG_Compound("nbt")
952952
soundname = dat_instrument(noteblockins[a])
953953
soundpitch = dat_pitch(noteblocknote[a] + 33 + noteblockpit[a] / 100)
954-
if (noteblocknote[a] < 0) soundname += "_-1"
955-
else if (noteblocknote[a] > 24) soundname += "_1"
954+
if (noteblocknote[a] + noteblockpit[a] / 100 < 0) soundname += "_-1"
955+
else if (noteblocknote[a] + noteblockpit[a] / 100 > 24) soundname += "_1"
956956
TAG_String("Command", "playsound "+ soundname +" block @a ~ ~ ~ 3 " + string(soundpitch))
957957
TAG_Byte("TrackOutput", 0)
958958
TAG_Byte("powered", 0)

0 commit comments

Comments
 (0)