diff --git a/export_presets.cfg b/export_presets.cfg index 52c6c67..08d4504 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -35,7 +35,7 @@ package/app_category=2 package/retain_data_on_uninstall=false package/exclude_from_recents=false launcher_icons/main_192x192="res://media/jar_icon.png" -launcher_icons/adaptive_foreground_432x432="res://media/jar_icon.png" +launcher_icons/adaptive_foreground_432x432="" launcher_icons/adaptive_background_432x432="" graphics/opengl_debug=false xr_features/xr_mode=0 diff --git a/interface/ghost.gd b/interface/ghost.gd index 474ad97..3a0afac 100644 --- a/interface/ghost.gd +++ b/interface/ghost.gd @@ -43,9 +43,6 @@ var can_place: bool: ## The last input event of the input that's dragging the ghost around, or null if the ghost isn't being dragged. var last_input_event: InputEvent -## The last alternate input event. -var last_alternate_event: InputEvent - func _ready(): collision_mask = collision_mask_prevent_placement | collision_mask_delete_placement @@ -58,30 +55,8 @@ func _input(event: InputEvent): last_input_event = event if event.pressed else null # Handle touch begin elif event is InputEventScreenTouch: - print("Event: ", event) - print("Last: ", last_input_event) - print("Alt: ", last_alternate_event) - if not last_input_event: - last_input_event = event if event.pressed else null - elif event.index == last_input_event.index: - last_input_event = event if event.pressed else null - last_alternate_event = null - else: - last_alternate_event = event if event.pressed else null + last_input_event = event if event.pressed else null - # If is pinching - if last_alternate_event: - if event.index == last_input_event.index: - var last_vector: Vector2 = last_alternate_event.position - last_input_event.position - var vector: Vector2 = last_alternate_event.position - event.position - var angle = vector.angle_to(last_vector) - rotation += angle - else: - var last_vector: Vector2 = last_alternate_event.position - last_input_event.position - var vector: Vector2 = event.position - last_input_event.position - var angle = vector.angle_to(last_vector) - rotation += angle - # If is dragging elif last_input_event: # Handle mouse drag @@ -95,8 +70,6 @@ func _input(event: InputEvent): var delta = event.position - last_input_event.position position += delta last_input_event = event - else: - last_alternate_event = event ## Update the value of [can_place]. # DIRTY HACK: Relies on the placeable area being perfectly surrounded by solid bodies. diff --git a/interface/shop_ui.gd b/interface/shop_ui.gd index a126948..49ea431 100644 --- a/interface/shop_ui.gd +++ b/interface/shop_ui.gd @@ -56,7 +56,7 @@ func _on_any_purchase_success(what: Node): return if what.item_scene: ghost_materialize.emit() - delete_button.disabled = false + delete_button.disabled = false purchase_success.emit(what) set_all_can_buy(true, what) @@ -80,30 +80,36 @@ signal upgraded_auto_spawn(scene: PackedScene, period: float) func _on_buy_auto_copper_purchase_success(): print("[ShopUI] Upgrading to Auto Copper * 2...") upgraded_auto_spawn.emit(copper_coin_scene, 0.5) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyAutoCopper.has_unlocked = false $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyHeliCopper.has_unlocked = true func _on_buy_heli_copper_purchase_success(): print("[ShopUI] Upgrading to Auto Copper * 8...") upgraded_auto_spawn.emit(copper_coin_scene, 0.125) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyHeliCopper.has_unlocked = false $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyAutoSilver.has_unlocked = true func _on_buy_auto_silver_purchase_success(): print("[ShopUI] Upgrading to Auto Silver * 2...") upgraded_auto_spawn.emit(silver_coin_scene, 0.5) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyAutoSilver.has_unlocked = false $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuySuperSilver.has_unlocked = true func _on_buy_super_silver_purchase_success(): print("[ShopUI] Upgrading to Auto Silver * 8...") upgraded_auto_spawn.emit(silver_coin_scene, 0.125) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuySuperSilver.has_unlocked = false $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyAutoGold.has_unlocked = true func _on_buy_auto_gold_purchase_success(): print("[ShopUI] Upgrading to Auto Gold * 2...") upgraded_auto_spawn.emit(gold_coin_scene, 0.5) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyAutoGold.has_unlocked = false $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyMidasTouch.has_unlocked = true func _on_buy_midas_touch_purchase_success(): print("[ShopUI] Upgrading to Auto Gold * 8...") + $Rows/PaddedScrollable/Scrollable/ScrollableItems/ManualCategory/BuyMidasTouch.has_unlocked = false upgraded_auto_spawn.emit(gold_coin_scene, 0.125) @@ -112,10 +118,13 @@ signal upgraded_manual_spawn(scene: PackedScene) func _on_buy_silver_star_purchase_success(): print("[ShopUI] Upgrading to Manual Silver...") upgraded_manual_spawn.emit(silver_coin_scene) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/AutomaticCategory/BuySilverStar.has_unlocked = false + $Rows/PaddedScrollable/Scrollable/ScrollableItems/AutomaticCategory/BuyGoldStar.has_unlocked = true func _on_buy_gold_star_purchase_success(): print("[ShopUI] Upgrading to Manual Gold...") upgraded_manual_spawn.emit(gold_coin_scene) + $Rows/PaddedScrollable/Scrollable/ScrollableItems/AutomaticCategory/BuyGoldStar.has_unlocked = false signal ghost_materialize