Skip to content

Commit

Permalink
fix picker bug And More
Browse files Browse the repository at this point in the history
  • Loading branch information
Skirlez committed Jul 3, 2024
1 parent 1d8553b commit 9b2281d
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 21 deletions.
2 changes: 1 addition & 1 deletion objects/obj_ev_display/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function handle_click(tile_i, tile_j) {
audio_play_sound(pick_sound, 10, false, 1.2)

global.selected_thing = thing_placeable
switch_held_tile(final_state)
switch_held_tile(new tile_with_state(final_state.tile, struct_copy(final_state.properties)))
global.mouse_held = false;


Expand Down
3 changes: 2 additions & 1 deletion objects/obj_ev_editor/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

randomize()
global.latest_lvl_format = 2;
global.ev_version = "0.89";
global.ev_version = "0.90";

global.compiled_for_merge = (asset_get_index("obj_game") != -1)

Expand Down Expand Up @@ -1465,3 +1465,4 @@ global.death_count = 0

global.turn_frames = 0
global.death_frames = -1

2 changes: 1 addition & 1 deletion objects/obj_ev_editor/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ else if (room == global.startup_room) {
draw_set_font(global.ev_font)
draw_set_halign(fa_center)
draw_set_valign(fa_middle)
draw_text_transformed(112, 72, "Communicating with server...", 1, 1, 0)
draw_text_transformed(112, 72, $"Communicating with server...\nTasks left: {startup_actions_count}", 1, 1, 0)
}

13 changes: 6 additions & 7 deletions objects/obj_ev_placeable_drag/Draw_0.gml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
if (global.tile_mode) {
var tile = global.editor_instance.tiles_list[tile_ind]

var tile = global.editor_instance.current_list[object_ind]
if (tile == global.editor_instance.object_player)
sprite_index = ev_get_stranger_down_sprite(global.stranger)
else
sprite_index = tile.spr_ind
}
else {
var object = global.editor_instance.objects_list[object_ind]
sprite_index = object.spr_ind
}


if selected {
var alpha = (dsin(global.editor_time * 4) / 5) + 0.75
Expand Down
1 change: 1 addition & 0 deletions objects/obj_ev_upload_window/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function can_upload_level(level) {


are_you_sure_upload_text = "This" + ((irandom($7fffffffffffffff) == 40) ? " stupid " : " ") + "level is not uploaded.\nDo you want to upload it?"
are_you_sure_delete_text = "Are you sure you want to\n delete this level? It will\nnot be deleted locally."
doing_the_thing_text = "Doing the thing..."
verifying_text = "Verifying upload..."
done_text = "Done!\nThe thing you tried doing\nwas successful!"
Expand Down
10 changes: 1 addition & 9 deletions scripts/ev_level_management/ev_level_management.gml
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,7 @@ function import_process_tiles(tile_string, level, height, failsafe_tile, version
}
}

function save_level(lvl)
{
var file = file_text_open_write(global.levels_directory + lvl.save_name + "." + "vsl")
if (file == -1)
return;
var str = export_level(lvl)
file_text_write_string(file, str)
file_text_close(file)
}

/*
function consider_multiplier(str, pointer, previous_string) {
if string_copy(str, pointer, 1) != MULTIPLIER_CHAR
Expand Down
11 changes: 11 additions & 0 deletions scripts/ev_save/ev_save.gml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ function ev_save(){
ini_write_string("options", "brand", global.author.brand)
ini_write_string("options", "server_ip", global.server_ip)
ini_write_string("options", "stranger", global.stranger)

ini_write_string("options", "memory", global.memory_style)
ini_write_string("options", "wings", global.wings_style)
ini_write_string("options", "blade", global.blade_style)
Expand Down Expand Up @@ -33,3 +34,13 @@ function ev_update_vars() {

}

function save_level(lvl)
{
var file = file_text_open_write(global.levels_directory + lvl.save_name + "." + "vsl")
if (file == -1)
return;
var str = export_level(lvl)
file_text_write_string(file, str)
file_text_close(file)
}

19 changes: 19 additions & 0 deletions scripts/ev_tile_with_state/ev_tile_with_state.gml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,22 @@ function struct_copy(SS) {
return(SS_new);
}

function struct_deep_copy(struct) {
var arr = variable_struct_get_names(struct);

var new_struct = {};
for (var i = 0; i < array_length(arr); i++) {
var field = arr[i];
var value = struct[$ field];
if is_struct(value)
new_struct[$ field] = struct_deep_copy(value);
else if is_array(value)
new_struct[$ field] = copy_array(value)
else {


new_struct[$ field] = value
}
}
return new_struct;
}
2 changes: 1 addition & 1 deletion void-stranger-endless-void.resource_order
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"FolderOrderSettings": [
{"name":"Unused","order":49,"path":"folders/Objects/Unused.yy",},
{"name":"Bee","order":3,"path":"folders/Sprites/Bee.yy",},
{"name":"Items","order":43,"path":"folders/Sprites/Items.yy",},
{"name":"TilesetSprites","order":1,"path":"folders/Sprites/TilesetSprites.yy",},
{"name":"Void Stranger Sprites","order":2,"path":"folders/Sprites/Void Stranger Sprites.yy",},
{"name":"Unused","order":49,"path":"folders/Objects/Unused.yy",},
],
"ResourceOrderSettings": [
{"name":"obj_ev_executing_button","order":5,"path":"objects/obj_ev_executing_button/obj_ev_executing_button.yy",},
Expand Down
2 changes: 1 addition & 1 deletion void-stranger-endless-void.yyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9b2281d

Please sign in to comment.