Skip to content

Commit bfa9ec6

Browse files
committed
Fix data pack visualizer spawning blocks very far away
This is what you get for using the numeric block ID as a coordinate.
1 parent f35ab9f commit bfa9ec6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

scripts/block_get_namespaced_id/block_get_namespaced_id.gml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function block_get_namespaced_id(argument0, argument1) {
1+
function block_get_namespaced_id(argument0, argument1=0) {
22
// block_get_namespaced_id(val, data)
33
// Returns the namespaced ID of the block with the given value and data.
44

scripts/dat_generate/dat_generate.gml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ function dat_generate(argument0, argument1, argument2) {
3434

3535
if o.dat_visualizer = 1 {
3636

37-
var ins = ds_list_find_index(o.instrument_list, o.song_ins[a, b]);
38-
var team_number = string(ins + 1);
39-
var ins_index = o.sch_exp_ins_block[ins];
40-
var block_id = block_get_namespaced_id(ins_index);
37+
var ins_index = ds_list_find_index(o.instrument_list, o.song_ins[a, b]);
38+
var team_number = string(ins_index + 1);
39+
var numeric_id = o.sch_exp_ins_block[ins_index];
40+
var block_id = block_get_namespaced_id(numeric_id);
4141

4242
// Visualizer Types
4343
if o.dat_vis_type = "Arc" { // Arc

0 commit comments

Comments
 (0)