1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-24 16:44:20 +00:00

Some changes I bundled together to not break stuff

This commit is contained in:
Steffo 2023-10-14 00:18:35 +02:00
parent 16a064f8e8
commit b24e98e5c5
Signed by: steffo
GPG key ID: 2A24051445686895
5 changed files with 22 additions and 13 deletions

View file

@ -1,8 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://c3p0jdf7416ac"] [gd_scene load_steps=2 format=3 uid="uid://c3p0jdf7416ac"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_np8fu"] [sub_resource type="ConvexPolygonShape2D" id="ConvexPolygonShape2D_cfy64"]
size = Vector2(32, 35) points = PackedVector2Array(-15, 9, -6, 15, 5, 15, 15, 9, 15, -16, -15, -16)
[node name="FullConverterShape" type="CollisionShape2D"] [node name="FullConverterShape" type="CollisionShape2D"]
shape = SubResource("RectangleShape2D_np8fu") shape = SubResource("ConvexPolygonShape2D_cfy64")
debug_color = Color(0, 1, 1, 0)

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=23 format=3 uid="uid://c3rxmcwa5nqng"] [gd_scene load_steps=21 format=3 uid="uid://c3rxmcwa5nqng"]
[ext_resource type="Script" path="res://game/game.gd" id="1_i3ly0"] [ext_resource type="Script" path="res://game/game.gd" id="1_i3ly0"]
[ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"] [ext_resource type="PackedScene" uid="uid://bllsprv8orpn4" path="res://bottle/bottle.tscn" id="1_y7o2l"]
@ -7,16 +7,14 @@
[ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="3_qwsty"] [ext_resource type="PackedScene" uid="uid://c67lfbk4gf1ga" path="res://spawner/spawner.tscn" id="3_qwsty"]
[ext_resource type="Texture2D" uid="uid://taojrwr7xrp4" path="res://interface/upgrade_gold.png" id="4_i557v"] [ext_resource type="Texture2D" uid="uid://taojrwr7xrp4" path="res://interface/upgrade_gold.png" id="4_i557v"]
[ext_resource type="Texture2D" uid="uid://yx3gme4q4ote" path="res://interface/upgrade_gem.png" id="5_y725k"] [ext_resource type="Texture2D" uid="uid://yx3gme4q4ote" path="res://interface/upgrade_gem.png" id="5_y725k"]
[ext_resource type="Texture2D" uid="uid://pj3ip6vlatms" path="res://converters/copper_to_silver/copper_converter.png" id="6_0jj8g"]
[ext_resource type="PackedScene" uid="uid://beg758fa6o0cs" path="res://value/evaluator.tscn" id="6_my6nv"] [ext_resource type="PackedScene" uid="uid://beg758fa6o0cs" path="res://value/evaluator.tscn" id="6_my6nv"]
[ext_resource type="PackedScene" uid="uid://ratkps4plkhl" path="res://converters/copper_to_silver/copper_converter.tscn" id="7_ipeok"]
[ext_resource type="PackedScene" uid="uid://4d0al27t7axe" path="res://bottle/placeable_area.tscn" id="7_muqgj"] [ext_resource type="PackedScene" uid="uid://4d0al27t7axe" path="res://bottle/placeable_area.tscn" id="7_muqgj"]
[ext_resource type="PackedScene" uid="uid://c2rlx7egl7xiv" path="res://collector/universal_collector.tscn" id="9_7op48"] [ext_resource type="PackedScene" uid="uid://c2rlx7egl7xiv" path="res://collector/universal_collector.tscn" id="9_7op48"]
[ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="9_evdhb"] [ext_resource type="PackedScene" uid="uid://c5w3b55aiui6c" path="res://collector/collector.tscn" id="9_evdhb"]
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="10_sayqn"] [ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="10_sayqn"]
[ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"] [ext_resource type="Texture2D" uid="uid://c8pvjgtr2ufjl" path="res://interface/upgrade_copper.png" id="11_lt33g"]
[ext_resource type="PackedScene" uid="uid://c3kitncwpi42j" path="res://entity/coin_copper/coin_copper.tscn" id="13_4j8om"] [ext_resource type="PackedScene" uid="uid://c3kitncwpi42j" path="res://entity/coin_copper/coin_copper.tscn" id="13_4j8om"]
[ext_resource type="PackedScene" uid="uid://qtk4tm6l367w" path="res://interface/ghost.tscn" id="16_8vhx6"] [ext_resource type="PackedScene" uid="uid://qtk4tm6l367w" path="res://interface/ghost/ghost.tscn" id="16_8vhx6"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"] [sub_resource type="RectangleShape2D" id="RectangleShape2D_rh35r"]
size = Vector2(240, 384) size = Vector2(240, 384)
@ -43,13 +41,11 @@ upgrade_gem_texture = ExtResource("5_y725k")
[node name="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")] [node name="GravityFromGyro" parent="." instance=ExtResource("2_h2pfr")]
[node name="Ghost" parent="." node_paths=PackedStringArray("target") instance=ExtResource("16_8vhx6")] [node name="Ghost" parent="." node_paths=PackedStringArray("container") instance=ExtResource("16_8vhx6")]
process_mode = 4 process_mode = 4
visible = false visible = false
position = Vector2(253, 109) position = Vector2(253, 109)
preview_texture = ExtResource("6_0jj8g") container = NodePath("..")
scene_to_instantiate = ExtResource("7_ipeok")
target = NodePath("..")
[node name="Bottle" parent="." instance=ExtResource("1_y7o2l")] [node name="Bottle" parent="." instance=ExtResource("1_y7o2l")]
metadata/_edit_lock_ = true metadata/_edit_lock_ = true

View file

@ -13,6 +13,13 @@ class_name Ghost
## The [Instantiator] to use to spawn the ghosted item. ## The [Instantiator] to use to spawn the ghosted item.
@onready var instantiator: Instantiator = $Instantiator @onready var instantiator: Instantiator = $Instantiator
## The node which materialized entities should be attached to.
@export var container: Node = null:
get:
return instantiator.container
set(value):
instantiator.container = value
## The [OverlapChecker] to use to see if a solid block is overlapping the ghost. ## The [OverlapChecker] to use to see if a solid block is overlapping the ghost.
@onready var overlap_checker: OverlapChecker = $OverlapChecker @onready var overlap_checker: OverlapChecker = $OverlapChecker

View file

@ -23,7 +23,9 @@ var is_overlapping_with: Array[Node2D] = []:
return is_overlapping_with return is_overlapping_with
set(value): set(value):
for body in is_overlapping_with: for body in is_overlapping_with:
body.modulate = valid_color # Make sure to re-modulate coins which have been collected
if body.is_instance_valid():
body.modulate = valid_color
for body in value: for body in value:
body.modulate = invalid_color body.modulate = invalid_color
is_overlapping_with = value is_overlapping_with = value

View file

@ -17,6 +17,11 @@ boot_splash/bg_color=Color(0.0977035, 0.0977035, 0.10161, 1)
boot_splash/image="res://icon.png" boot_splash/image="res://icon.png"
config/icon="res://media/jar_icon.png" config/icon="res://media/jar_icon.png"
[debug]
settings/stdout/print_fps=true
settings/stdout/print_gpu_profile=true
[display] [display]
window/size/viewport_width=270 window/size/viewport_width=270