From 5052e040646cddccab3270e271670f2ae60e427b Mon Sep 17 00:00:00 2001 From: Harmony Honey Date: Wed, 2 Nov 2022 17:27:44 -0400 Subject: [PATCH] saving notes! <3 (; --- project.godot | 2 ++ src/actor/Note.gd | 10 ++++++++++ src/actor/Note.tscn | 1 + src/autoload/Shared.gd | 44 +++++++++++++++++++++++++++++------------- src/autoload/UI.gd | 4 ++++ src/autoload/UI.tscn | 36 +++++++++++++++++++++++++++++++++- src/map/1-2.tscn | 6 +++--- src/menu/select.gd | 4 ++-- 8 files changed, 88 insertions(+), 19 deletions(-) diff --git a/project.godot b/project.godot index 324550a..19448f7 100644 --- a/project.godot +++ b/project.godot @@ -84,6 +84,8 @@ config/name="Tiny Crate" config/description="Tiny Crate by Harmony Honey hhoney.net" run/main_scene="res://src/menu/splash.tscn" +config/use_custom_user_dir=true +config/custom_user_dir_name="tiny_crate" config/icon="res://media/image/icon.png" config/windows_native_icon="res://media/image/icon_gimp.ico" diff --git a/src/actor/Note.gd b/src/actor/Note.gd index a9a6376..d6fea38 100644 --- a/src/actor/Note.gd +++ b/src/actor/Note.gd @@ -7,6 +7,14 @@ var bounce := 0.0 var explosion := preload("res://src/fx/Explosion.tscn") +export var palette : PoolColorArray + +func _ready(): + if Engine.editor_hint: return + + if Shared.notes.has(Shared.current_map): + modulate = palette[1] + func _physics_process(delta): if Engine.editor_hint: return @@ -20,4 +28,6 @@ func collect(): var e = explosion.instance() e.position = center() get_parent().add_child(e) + + Shared.is_note = true queue_free() diff --git a/src/actor/Note.tscn b/src/actor/Note.tscn index beb85f8..673f464 100644 --- a/src/actor/Note.tscn +++ b/src/actor/Note.tscn @@ -11,6 +11,7 @@ script = ExtResource( 1 ) hitbox_x = 10 hitbox_y = 10 tag = "note" +palette = PoolColorArray( 1, 0.945098, 0.909804, 1, 0.113725, 0.168627, 0.32549, 1 ) [node name="Sprite" type="Sprite" parent="."] position = Vector2( 5, 5 ) diff --git a/src/autoload/Shared.gd b/src/autoload/Shared.gd index fec9508..729385f 100644 --- a/src/autoload/Shared.gd +++ b/src/autoload/Shared.gd @@ -28,10 +28,14 @@ var bus_volume = [10, 10, 10] var current_map := 0 var maps := [] +var map_save := 0 var actors := [] var player +var is_note := false +var notes := [] + func _ready(): print("Shared._ready(): ") @@ -49,10 +53,15 @@ func _ready(): print("maps: ", maps) # load save data - if load_file(save_filename): - save_data = JSON.parse(load_file(save_filename)).result + var l = load_file(save_filename) + if l: + save_data = JSON.parse(l).result print("save_data: " + JSON.print(save_data, "\t")) - if !save_data.has("map"): + if save_data.has("map"): + map_save = save_data["map"] + if save_data.has("notes"): + notes = save_data["notes"] + else: create_save() else: print(save_filename + " not found") @@ -106,6 +115,9 @@ func change_map(): is_in_game = scene_path.begins_with(map_path) or scene_path.begins_with(win_screen_path) TouchScreen.pause.visible = is_in_game Pause.set_process_input(true) + is_note = false + UI.notes.visible = is_level_select + UI.notes_label.text = str(notes.size()) UI.keys(false, false) ### Saving and Loading @@ -126,6 +138,7 @@ func load_file(fname = "box.save"): func create_save(): save_data = {} save_data["map"] = 0 + save_data["notes"] = [] save_file(save_filename, JSON.print(save_data, "\t")) func delete_save(): @@ -133,21 +146,26 @@ func delete_save(): create_save() func unlock(): - save_data["map"] = 99 + map_save = 99 + save_data["map"] = map_save save_file(save_filename, JSON.print(save_data, "\t")) func win(): - win_save() - set_map(current_map + 1) - start_reset() - print("map complete") - -func win_save(): - if save_data["map"] < current_map + 1: - save_data["map"] = current_map + 1 + if map_save < current_map + 1: + map_save = current_map + 1 + + if is_note and !notes.has(current_map): + notes.append(current_map) + notes.sort() + + save_data["map"] = map_save + save_data["notes"] = notes save_file(save_filename, JSON.print(save_data, "\t")) - print("save_data: ", save_data) + print("map complete, save_data: ", save_data) + + set_map(current_map + 1) + start_reset() # look into a folder and return a list of filenames without file extension func dir_list(path : String): diff --git a/src/autoload/UI.gd b/src/autoload/UI.gd index 5922d87..8a11bf9 100644 --- a/src/autoload/UI.gd +++ b/src/autoload/UI.gd @@ -3,8 +3,12 @@ extends CanvasLayer onready var x := $Buttons/X onready var c := $Buttons/C +onready var notes := $Notes +onready var notes_label := $Notes/Label + func _ready(): keys(false, false) + notes.visible = false func keys(left := true, right := true): x.visible = left diff --git a/src/autoload/UI.tscn b/src/autoload/UI.tscn index 8fb8b6a..0bc687e 100644 --- a/src/autoload/UI.tscn +++ b/src/autoload/UI.tscn @@ -1,8 +1,20 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=9 format=2] [ext_resource path="res://media/font/m6x11.tres" type="DynamicFont" id=1] [ext_resource path="res://media/image/btn.png" type="Texture" id=2] [ext_resource path="res://src/autoload/UI.gd" type="Script" id=3] +[ext_resource path="res://media/image/HarmonyHoneyLogo.png" type="Texture" id=4] +[ext_resource path="res://media/font/m6x11.ttf" type="DynamicFontData" id=5] +[ext_resource path="res://src/shader/outline2D_outer.shader" type="Shader" id=6] + +[sub_resource type="DynamicFont" id=1] +extra_spacing_bottom = -1 +font_data = ExtResource( 5 ) + +[sub_resource type="ShaderMaterial" id=2] +shader = ExtResource( 6 ) +shader_param/line_color = Color( 0, 0, 0, 1 ) +shader_param/line_thickness = 1.0 [node name="UI" type="CanvasLayer"] layer = 5 @@ -66,3 +78,25 @@ custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) custom_constants/shadow_as_outline = 1 custom_fonts/font = ExtResource( 1 ) text = "move" + +[node name="Notes" type="Node2D" parent="."] +position = Vector2( 218, 11 ) + +[node name="Label" type="Label" parent="Notes"] +margin_left = -70.0 +margin_top = -6.0 +margin_right = -9.0 +margin_bottom = 7.0 +custom_colors/font_color = Color( 1, 0.945098, 0.909804, 1 ) +custom_colors/font_color_shadow = Color( 0, 0, 0, 1 ) +custom_constants/shadow_as_outline = 1 +custom_fonts/font = SubResource( 1 ) +text = "13" +align = 2 + +[node name="Sprite" type="Sprite" parent="Notes"] +modulate = Color( 1, 0.945098, 0.909804, 1 ) +material = SubResource( 2 ) +texture = ExtResource( 4 ) +region_enabled = true +region_rect = Rect2( 4, 2, 14, 14 ) diff --git a/src/map/1-2.tscn b/src/map/1-2.tscn index 3409019..e017b88 100644 --- a/src/map/1-2.tscn +++ b/src/map/1-2.tscn @@ -17,7 +17,7 @@ script = ExtResource( 7 ) [node name="SolidTileMap" parent="." instance=ExtResource( 1 )] -tile_data = PoolIntArray( -589839, 536870913, 0, -589838, 536870913, 0, -589837, 536870913, 0, -589836, 536870913, 0, -589835, 536870913, 0, -589834, 536870913, 0, -589833, 536870913, 0, -589832, 536870913, 0, -589831, 536870913, 0, -589830, 536870913, 0, -589829, 536870913, 0, -589828, 536870913, 0, -589827, 536870913, 0, -589826, 536870913, 0, -589825, 536870913, 0, -655360, 536870913, 0, -655359, 536870913, 0, -655358, 536870913, 0, -655357, 536870913, 0, -655356, 536870913, 0, -655355, 536870913, 0, -655354, 536870913, 0, -655353, 536870913, 0, -655352, 536870913, 0, -655351, 536870913, 0, -655350, 536870913, 0, -655349, 536870913, 0, -655348, 536870913, 0, -655347, 536870913, 0, -655346, 536870913, 0, -524303, 536870913, 0, -589810, 536870913, 0, -458767, 536870913, 0, -524274, 536870913, 0, -393231, 536870913, 0, -458738, 536870913, 0, -327695, 536870913, 0, -393202, 536870913, 0, -262159, 536870913, 0, -327666, 536870913, 0, -196623, 536870913, 0, -196613, 0, 0, -196612, 536870912, 1, -196611, 536870912, 0, -196610, 536870912, 1, -196609, 0, 0, -262142, 536870912, 1, -262141, 0, 0, -262140, 536870912, 1, -262139, 0, 0, -262138, 536870912, 1, -262137, 0, 0, -262130, 536870913, 0, -131087, 536870913, 0, -131077, 0, 0, -196601, 0, 0, -196594, 536870913, 0, -65551, 536870913, 0, -65550, 536870913, 0, -65549, 536870913, 0, -65548, 536870913, 0, -65547, 536870913, 0, -65544, 0, 0, -65543, 536870912, 1, -65542, 0, 0, -65541, 0, 1, -131065, 536870912, 1, -131058, 536870913, 0, -11, 536870913, 0, -10, 536870913, 0, -9, 536870913, 0, -8, 0, 0, -65533, 0, 0, -65532, 536870912, 0, -65531, 536870912, 1, -65530, 0, 0, -65529, 0, 0, -65528, 536870913, 0, -65527, 536870913, 0, -65526, 536870913, 0, -65525, 536870913, 0, -65524, 536870913, 0, -65523, 536870913, 0, -65522, 536870913, 0, 65528, 536870912, 1, 3, 536870912, 1, 131064, 536870912, 0, 65539, 0, 0, 196600, 536870912, 1, 196607, 0, 0, 131072, 536870912, 0, 131073, 536870912, 1, 131074, 0, 0, 131075, 0, 0, 262136, 0, 0, 262143, 0, 0, 327672, 0, 0, 327673, 536870912, 1, 327674, 0, 0, 327675, 536870912, 1, 327676, 536870912, 0, 327677, 536870912, 0, 327678, 536870912, 1, 327679, 0, 0 ) +tile_data = PoolIntArray( -589839, 536870913, 0, -589838, 536870913, 0, -589837, 536870913, 0, -589836, 536870913, 0, -589835, 536870913, 0, -589834, 536870913, 0, -589833, 536870913, 0, -589832, 536870913, 0, -589831, 536870913, 0, -589830, 536870913, 0, -589829, 536870913, 0, -589828, 536870913, 0, -589827, 536870913, 0, -589826, 536870913, 0, -589825, 536870913, 0, -655360, 536870913, 0, -655359, 536870913, 0, -655358, 536870913, 0, -655357, 536870913, 0, -655356, 536870913, 0, -655355, 536870913, 0, -655354, 536870913, 0, -655353, 536870913, 0, -655352, 536870913, 0, -655351, 536870913, 0, -655350, 536870913, 0, -655349, 536870913, 0, -655348, 536870913, 0, -655347, 536870913, 0, -655346, 536870913, 0, -524303, 536870913, 0, -589810, 536870913, 0, -458767, 536870913, 0, -524274, 536870913, 0, -393231, 536870913, 0, -458738, 536870913, 0, -327695, 536870913, 0, -393202, 536870913, 0, -262159, 536870913, 0, -327666, 536870913, 0, -196623, 536870913, 0, -196613, 0, 0, -196612, 536870912, 1, -196611, 536870912, 0, -196610, 536870912, 1, -196609, 0, 0, -262142, 536870912, 1, -262141, 0, 0, -262140, 536870912, 1, -262139, 0, 0, -262138, 536870912, 1, -262137, 0, 0, -262130, 536870913, 0, -131087, 536870913, 0, -131077, 0, 0, -196601, 0, 0, -196594, 536870913, 0, -65551, 536870913, 0, -65550, 536870913, 0, -65549, 536870913, 0, -65548, 536870913, 0, -65547, 536870913, 0, -65546, 1, 0, -65545, 1, 0, -65544, 0, 0, -65543, 536870912, 1, -65542, 0, 0, -65541, 0, 1, -131065, 536870912, 1, -131058, 536870913, 0, -8, 0, 0, -65533, 0, 0, -65532, 536870912, 0, -65531, 536870912, 1, -65530, 0, 0, -65529, 0, 0, -65528, 536870913, 0, -65527, 536870913, 0, -65526, 536870913, 0, -65525, 536870913, 0, -65524, 536870913, 0, -65523, 536870913, 0, -65522, 536870913, 0, 65528, 536870912, 1, 3, 536870912, 1, 131064, 536870912, 0, 65539, 0, 0, 196600, 536870912, 1, 196607, 0, 0, 131072, 536870912, 0, 131073, 536870912, 1, 131074, 0, 0, 131075, 0, 0, 262136, 0, 0, 262143, 0, 0, 327672, 0, 0, 327673, 536870912, 1, 327674, 0, 0, 327675, 536870912, 1, 327676, 536870912, 0, 327677, 536870912, 0, 327678, 536870912, 1, 327679, 0, 0 ) [node name="SpikeTileMap" parent="." instance=ExtResource( 5 )] @@ -26,7 +26,7 @@ z_index = -11 tile_data = PoolIntArray( -458747, 2, 0, -458746, 0, 0, -458745, -1610612734, 0, -327687, 536870916, 3, -327686, 536870916, 0, -327685, 4, 3, -393211, -1073741822, 0, -393210, 0, 0, -393209, 1610612738, 0, -262151, 4, 2, -262150, 4, 1, -262149, 4, 0, -262148, 4, 3, -327674, 1, 0, -196614, 4, 2, -131078, 536870916, 3, -131076, 4, 1, -131075, 4, 3, -131074, 1073741829, 2, -131073, 5, 0, -196608, 1610612741, 2, -196606, 4, 2, -196605, 4, 0, -196604, 4, 3, -65548, 5, 2, -65547, -1610612731, 2, -65540, 536870916, 2, -131070, 4, 2, -131069, 4, 1, -131068, 4, 3, -12, -1073741819, 0, -11, -1073741819, 0, -10, -1073741819, 1, -9, -1073741819, 1, -6, 4, 2, -5, 4, 0, -4, 536870916, 2, 65524, -1073741819, 2, 65525, 1610612741, 2, 65529, -1610612731, 2, 65531, 0, 0, 7, 5, 1, 131061, 0, 0, 131062, -1073741823, 0, 131063, -1073741823, 0, 131065, -536870907, 2, 131071, 536870916, 3, 65536, 536870916, 0, 65537, 4, 3, 65538, 5, 2, 65540, 4, 3, 65542, 2, 0, 65543, 5, 1, 65544, -1610612734, 0, 196599, 536870916, 3, 196601, 536870916, 0, 196602, 4, 3, 196604, 5, 0, 131076, 536870916, 0, 131077, 4, 3, 131078, 5, 2, 131079, 5, 0, 131080, -1610612731, 2, 262135, 536870916, 3, 262137, 4, 1, 262138, 4, 3, 262140, 5, 1, 196608, 536870916, 1, 196609, 536870916, 0, 196610, 4, 1, 196611, 4, 0, 196612, 536870916, 2, 196614, 5, 0, 196615, 5, 0, 196616, 5, 0, 327670, 4, 2, 327671, 4, 1, 262150, -1073741819, 2, 262151, 5, 0, 262152, 1610612741, 2, 393206, 536870916, 3, 393207, 4, 0, 393208, 4, 1, 393209, 4, 0, 393210, 536870916, 2, 458742, 4, 2, 458743, 4, 0, 458744, 536870916, 2 ) [node name="ObscureMap" parent="." instance=ExtResource( 11 )] -tile_data = PoolIntArray( -524302, 536870913, 0, -524301, 536870913, 0, -524300, 536870913, 0, -524299, 536870913, 0, -524298, 536870913, 0, -524297, 536870913, 0, -524296, 536870913, 0, -524295, 536870913, 0, -524294, 536870913, 0, -524293, 536870913, 0, -524292, 536870913, 0, -524291, 536870913, 0, -524290, 536870913, 0, -524289, 536870913, 0, -589824, 536870913, 0, -589823, 536870913, 0, -589822, 536870913, 0, -589821, 536870913, 0, -589820, 536870913, 0, -589819, 536870913, 0, -589818, 536870913, 0, -589817, 536870913, 0, -589816, 536870913, 0, -589815, 536870913, 0, -589814, 536870913, 0, -589813, 536870913, 0, -589812, 536870913, 0, -589811, 536870913, 0, -458766, 536870913, 0, -458765, 536870913, 0, -458764, 536870913, 0, -458763, 536870913, 0, -458762, 536870913, 0, -458761, 536870913, 0, -458760, 536870913, 0, -458759, 536870913, 0, -458758, 536870913, 0, -458757, 536870913, 0, -458756, 536870913, 0, -458755, 536870913, 0, -458754, 536870913, 0, -458753, 536870913, 0, -524288, 536870913, 0, -524287, 536870913, 0, -524286, 536870913, 0, -524285, 536870913, 0, -524284, 536870913, 0, -524283, 536870913, 0, -524282, 536870913, 0, -524281, 536870913, 0, -524280, 536870913, 0, -524279, 536870913, 0, -524278, 536870913, 0, -524277, 536870913, 0, -524276, 536870913, 0, -524275, 536870913, 0, -393230, 536870913, 0, -393229, 536870913, 0, -393228, 536870913, 0, -393227, 536870913, 0, -393226, 536870913, 0, -393225, 536870913, 0, -393224, 536870913, 0, -393223, 536870913, 0, -393222, 536870913, 0, -393221, 536870913, 0, -393220, 536870913, 0, -393219, 536870913, 0, -393218, 536870913, 0, -393217, 536870913, 0, -458752, 536870913, 0, -458751, 536870913, 0, -458750, 536870913, 0, -458749, 536870913, 0, -458748, 536870913, 0, -458747, 536870913, 0, -458746, 536870913, 0, -458745, 536870913, 0, -458744, 536870913, 0, -458743, 536870913, 0, -458742, 536870913, 0, -458741, 536870913, 0, -458740, 536870913, 0, -458739, 536870913, 0, -327694, 536870913, 0, -327693, 536870913, 0, -327692, 536870912, 0, -327691, 536870912, 0, -327690, 536870913, 0, -327689, 536870913, 0, -327688, 536870913, 0, -327687, 536870913, 0, -327686, 536870913, 0, -327685, 536870913, 0, -327684, 536870913, 0, -327683, 536870913, 0, -327682, 536870913, 0, -327681, 536870913, 0, -393216, 536870913, 0, -393215, 536870913, 0, -393214, 536870913, 0, -393213, 536870913, 0, -393212, 536870913, 0, -393211, 536870913, 0, -393210, 536870913, 0, -393209, 536870913, 0, -393208, 536870913, 0, -393207, 536870913, 0, -393206, 536870913, 0, -393205, 536870913, 0, -393204, 536870913, 0, -393203, 536870913, 0, -262158, 536870913, 0, -262157, 536870913, 0, -262156, 536870912, 0, -262155, 536870912, 0, -262154, 536870913, 0, -262153, 536870913, 0, -262152, 536870913, 0, -262151, 536870913, 0, -262150, 536870913, 0, -262149, 536870913, 0, -262148, 536870913, 0, -262147, 536870913, 0, -262146, 536870913, 0, -262145, 536870913, 0, -327680, 536870913, 0, -327679, 536870913, 0, -327678, 536870913, 0, -327677, 536870913, 0, -327676, 536870913, 0, -327675, 536870913, 0, -327674, 536870913, 0, -327673, 536870913, 0, -327672, 536870913, 0, -327671, 536870913, 0, -327670, 536870913, 0, -327669, 536870913, 0, -327668, 536870913, 0, -327667, 536870913, 0, -196622, 536870913, 0, -196621, 536870913, 0, -196620, 536870913, 0, -196619, 536870913, 0, -196618, 536870913, 0, -196617, 536870913, 0, -196616, 536870913, 0, -196615, 536870913, 0, -196614, 536870913, 0, -262144, 536870914, 1, -262143, 536870914, 0, -262136, 536870913, 0, -262135, 536870913, 0, -262134, 536870913, 0, -262133, 536870913, 0, -262132, 536870913, 0, -262131, 536870913, 0, -131086, 536870913, 0, -131085, 536870913, 0, -131084, 536870913, 0, -131083, 536870913, 0, -131082, 536870913, 0, -131081, 536870913, 0, -131080, 536870913, 0, -131079, 536870913, 0, -131078, 536870913, 0, -196600, 536870913, 0, -196599, 536870913, 0, -196598, 536870913, 0, -196597, 536870913, 0, -196596, 536870913, 0, -196595, 536870913, 0, -65546, 536870913, 0, -65545, 536870913, 0, -131064, 536870913, 0, -131063, 536870913, 0, -131062, 536870913, 0, -131061, 536870913, 0, -131060, 536870913, 0, -131059, 536870913, 0 ) +tile_data = PoolIntArray( -524302, 536870913, 0, -524301, 536870913, 0, -524300, 536870913, 0, -524299, 536870913, 0, -524298, 536870913, 0, -524297, 536870913, 0, -524296, 536870913, 0, -524295, 536870913, 0, -524294, 536870913, 0, -524293, 536870913, 0, -524292, 536870913, 0, -524291, 536870913, 0, -524290, 536870913, 0, -524289, 536870913, 0, -589824, 536870913, 0, -589823, 536870913, 0, -589822, 536870913, 0, -589821, 536870913, 0, -589820, 536870913, 0, -589819, 536870913, 0, -589818, 536870913, 0, -589817, 536870913, 0, -589816, 536870913, 0, -589815, 536870913, 0, -589814, 536870913, 0, -589813, 536870913, 0, -589812, 536870913, 0, -589811, 536870913, 0, -458766, 536870913, 0, -458765, 536870913, 0, -458764, 536870913, 0, -458763, 536870913, 0, -458762, 536870913, 0, -458761, 536870913, 0, -458760, 536870913, 0, -458759, 536870913, 0, -458758, 536870913, 0, -458757, 536870913, 0, -458756, 536870913, 0, -458755, 536870913, 0, -458754, 536870913, 0, -458753, 536870913, 0, -524288, 536870913, 0, -524287, 536870913, 0, -524286, 536870913, 0, -524285, 536870913, 0, -524284, 536870913, 0, -524283, 536870913, 0, -524282, 536870913, 0, -524281, 536870913, 0, -524280, 536870913, 0, -524279, 536870913, 0, -524278, 536870913, 0, -524277, 536870913, 0, -524276, 536870913, 0, -524275, 536870913, 0, -393230, 536870913, 0, -393229, 536870913, 0, -393228, 536870913, 0, -393227, 536870913, 0, -393226, 536870913, 0, -393225, 536870913, 0, -393224, 536870913, 0, -393223, 536870913, 0, -393222, 536870913, 0, -393221, 536870913, 0, -393220, 536870913, 0, -393219, 536870913, 0, -393218, 536870913, 0, -393217, 536870913, 0, -458752, 536870913, 0, -458751, 536870913, 0, -458750, 536870913, 0, -458749, 536870913, 0, -458748, 536870913, 0, -458747, 536870913, 0, -458746, 536870913, 0, -458745, 536870913, 0, -458744, 536870913, 0, -458743, 536870913, 0, -458742, 536870913, 0, -458741, 536870913, 0, -458740, 536870913, 0, -458739, 536870913, 0, -327694, 536870913, 0, -327693, 536870913, 0, -327692, 1, 0, -327691, 536870912, 0, -327690, 0, 0, -327689, 536870913, 0, -327688, 536870913, 0, -327687, 536870913, 0, -327686, 536870913, 0, -327685, 536870913, 0, -327684, 536870913, 0, -327683, 536870913, 0, -327682, 536870913, 0, -327681, 536870913, 0, -393216, 536870913, 0, -393215, 536870913, 0, -393214, 536870913, 0, -393213, 536870913, 0, -393212, 536870913, 0, -393211, 536870913, 0, -393210, 536870913, 0, -393209, 536870913, 0, -393208, 536870913, 0, -393207, 536870913, 0, -393206, 536870913, 0, -393205, 536870913, 0, -393204, 536870913, 0, -393203, 536870913, 0, -262158, 536870913, 0, -262157, 536870913, 0, -262156, 1, 0, -262155, 536870912, 0, -262154, 0, 0, -262153, 536870913, 0, -262152, 536870913, 0, -262151, 536870913, 0, -262150, 536870913, 0, -262149, 536870913, 0, -262148, 536870913, 0, -262147, 536870913, 0, -262146, 536870913, 0, -262145, 536870913, 0, -327680, 536870913, 0, -327679, 536870913, 0, -327678, 536870913, 0, -327677, 536870913, 0, -327676, 536870913, 0, -327675, 536870913, 0, -327674, 536870913, 0, -327673, 536870913, 0, -327672, 536870913, 0, -327671, 536870913, 0, -327670, 536870913, 0, -327669, 536870913, 0, -327668, 536870913, 0, -327667, 536870913, 0, -196622, 536870913, 0, -196621, 536870913, 0, -196620, 536870913, 0, -196619, 536870913, 0, -196618, 536870913, 0, -196617, 536870913, 0, -196616, 536870913, 0, -196615, 536870913, 0, -196614, 536870913, 0, -262144, 536870914, 1, -262143, 536870914, 0, -262136, 536870913, 0, -262135, 536870913, 0, -262134, 536870913, 0, -262133, 536870913, 0, -262132, 536870913, 0, -262131, 536870913, 0, -131086, 536870913, 0, -131085, 536870913, 0, -131084, 536870913, 0, -131083, 536870913, 0, -131082, 536870913, 0, -131081, 536870913, 0, -131080, 536870913, 0, -131079, 536870913, 0, -131078, 536870913, 0, -196600, 536870913, 0, -196599, 536870913, 0, -196598, 536870913, 0, -196597, 536870913, 0, -196596, 536870913, 0, -196595, 536870913, 0, -131064, 536870913, 0, -131063, 536870913, 0, -131062, 536870913, 0, -131061, 536870913, 0, -131060, 536870913, 0, -131059, 536870913, 0 ) [node name="GameCamera" parent="." instance=ExtResource( 3 )] @@ -39,7 +39,7 @@ position = Vector2( -48, 24 ) position = Vector2( 45, -19 ) [node name="Note" parent="Actors" instance=ExtResource( 12 )] -position = Vector2( -93, -45 ) +position = Vector2( -85, -45 ) [node name="x" type="Sprite" parent="."] position = Vector2( 0, -47 ) diff --git a/src/menu/select.gd b/src/menu/select.gd index abb6b29..3d302ee 100644 --- a/src/menu/select.gd +++ b/src/menu/select.gd @@ -25,7 +25,7 @@ func _ready(): $Control/Screen.queue_free() for i in Shared.maps.size(): - if i <= Shared.save_data["map"]: + if i <= Shared.map_save: var new = screen.duplicate() var sy = i / columns var sx = i % columns @@ -73,6 +73,6 @@ func scroll(arg = 0): cam.position = screens.get_children()[cursor].rect_position + Vector2(50, 50) func open_map(): - if cursor <= Shared.save_data["map"]: + if cursor <= Shared.map_save: Shared.set_map(cursor) Shared.do_reset()