Merge commit 'cdcb3c618e8169a74a4e9f60e6fa0869b91ec05f' into development

This commit is contained in:
betalars 2025-04-13 19:31:39 +02:00
commit 1a814b157a
29 changed files with 868 additions and 502 deletions

View File

@ -120,9 +120,11 @@ func trigger_intro():
intro.emit() intro.emit()
intro_triggered = true intro_triggered = true
var was_skipped = false
func skip_text(): func skip_text():
if not animation_complete: if not animation_complete:
animation_player.stop(true) animation_player.stop(true)
was_skipped = true
text_finished.emit() text_finished.emit()
func _on_text_finished(): func _on_text_finished():

View File

@ -783,7 +783,7 @@ func _ready() -> void:
$childhood.finished.connect(on_childhood_done) $childhood.finished.connect(on_childhood_done)
$JuiJutsu.finished.connect(on_jui_jutsu_done) $JuiJutsu.finished.connect(on_jui_jutsu_done)
$voice_training.finished.connect(on_voice_training_done) $voice_training.finished.connect(on_voice_training_done)
$draven.intro.connect(func(): play(\"intro\")) $draven.intro.connect(try_intro)
for id in range(Scenes.id.YOUTH_DRAEVEN, Scenes.id.YOUTH_JUI_JUTSU+1): for id in range(Scenes.id.YOUTH_DRAEVEN, Scenes.id.YOUTH_JUI_JUTSU+1):
Scenes.sign_up_for_sequence(play_scene, id, 0) Scenes.sign_up_for_sequence(play_scene, id, 0)
@ -831,8 +831,16 @@ func on_draeven_done():
Scenes.continue_sequence(self) Scenes.continue_sequence(self)
$draven.hide() $draven.hide()
func try_intro():
if $draven.was_skipped:
play(\"intro\")
func scene_finished(_id: int, _repeat: bool): func scene_finished(_id: int, _repeat: bool):
queue(\"RESET\") queue(\"RESET\")
func play(anin_name: StringName = \"\", a: float = -1, b: float = 1, c: bool = false) -> void:
print(\"anim player accessed!\")
super.play(anin_name, a, b, c)
" "
[sub_resource type="BoxShape3D" id="BoxShape3D_cb3g8"] [sub_resource type="BoxShape3D" id="BoxShape3D_cb3g8"]
@ -2260,7 +2268,6 @@ light_array = Array[Vector3]([Vector3(-0.545, 0.915, 1.035), Vector3(-0.47, 0.85
[connection signal="body_exited" from="logic/Bed and Ladders/reset_failover" to="logic/PlayerController" method="_on_bed_exit"] [connection signal="body_exited" from="logic/Bed and Ladders/reset_failover" to="logic/PlayerController" method="_on_bed_exit"]
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending_button" method="hide"] [connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending_button" method="hide"]
[connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending" method="show"] [connection signal="pressed" from="logic/UI/ending_button" to="logic/UI/ending" method="show"]
[connection signal="cards_picked" from="logic/UI/Picker" to="logic/UI/Board" method="populate_board"]
[connection signal="board_completed" from="logic/UI/Board" to="logic/UI/ending_button" method="show"] [connection signal="board_completed" from="logic/UI/Board" to="logic/UI/ending_button" method="show"]
[connection signal="finished" from="logic/ScenePlayer/draven" to="logic/ScenePlayer" method="on_draeven_done"] [connection signal="finished" from="logic/ScenePlayer/draven" to="logic/ScenePlayer" method="on_draeven_done"]
[connection signal="input_event" from="logic/MaskMemento/UiWrapper" to="logic/MaskMemento/UiWrapper" method="_on_input_event"] [connection signal="input_event" from="logic/MaskMemento/UiWrapper" to="logic/MaskMemento/UiWrapper" method="_on_input_event"]

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=5 format=3 uid="uid://bvowj4l8dtceu"] [gd_scene load_steps=4 format=3 uid="uid://bvowj4l8dtceu"]
[ext_resource type="Script" uid="uid://b6xp63orcmjq8" path="res://dev-util/devs_board.gd" id="1_ols6o"] [ext_resource type="Script" uid="uid://b6xp63orcmjq8" path="res://dev-util/devs_board.gd" id="1_ols6o"]
[ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="1_xrckx"] [ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="1_xrckx"]
[ext_resource type="PackedScene" uid="uid://vkcdj8c3ytbq" path="res://logic-scenes/board/sticky-note.tscn" id="2_ucudl"] [ext_resource type="PackedScene" uid="uid://vkcdj8c3ytbq" path="res://logic-scenes/board/sticky-note.tscn" id="2_ucudl"]
[ext_resource type="PackedScene" uid="uid://dp4eps03igd3w" path="res://logic-scenes/board/void_card.tscn" id="4_b7cny"]
[node name="board of devs" type="Control"] [node name="board of devs" type="Control"]
layout_mode = 3 layout_mode = 3
@ -22,6 +21,7 @@ offset_right = 230.0
offset_bottom = 181.0 offset_bottom = 181.0
[node name="c_out-of-world" parent="draeven" instance=ExtResource("1_xrckx")] [node name="c_out-of-world" parent="draeven" instance=ExtResource("1_xrckx")]
position = Vector2(2, -6)
text = "I feel like I am not from of this world" text = "I feel like I am not from of this world"
[node name="p_unique" parent="draeven/c_out-of-world" groups=["c_comic_heroes", "c_confusion", "c_hit", "c_homework", "c_joy", "c_out-of-world", "c_teachers"] instance=ExtResource("2_ucudl")] [node name="p_unique" parent="draeven/c_out-of-world" groups=["c_comic_heroes", "c_confusion", "c_hit", "c_homework", "c_joy", "c_out-of-world", "c_teachers"] instance=ExtResource("2_ucudl")]
@ -33,7 +33,7 @@ position = Vector2(-32, 140)
text = "I am thankful for the few friends that get me" text = "I am thankful for the few friends that get me"
[node name="c_rejection" parent="draeven" instance=ExtResource("1_xrckx")] [node name="c_rejection" parent="draeven" instance=ExtResource("1_xrckx")]
position = Vector2(0, 300) position = Vector2(9, 294)
text = "I fear being rejected" text = "I fear being rejected"
[node name="p_friends" parent="draeven/c_rejection" groups=["c_boy_stuff", "c_comic_heroes", "c_fighting", "c_homework", "c_joy", "c_out-of-world", "c_rejection", "c_teachers"] instance=ExtResource("2_ucudl")] [node name="p_friends" parent="draeven/c_rejection" groups=["c_boy_stuff", "c_comic_heroes", "c_fighting", "c_homework", "c_joy", "c_out-of-world", "c_rejection", "c_teachers"] instance=ExtResource("2_ucudl")]
@ -45,7 +45,7 @@ position = Vector2(-32, 140)
text = "I'm afraid I will just get laughed at" text = "I'm afraid I will just get laughed at"
[node name="c_confusion" parent="draeven" instance=ExtResource("1_xrckx")] [node name="c_confusion" parent="draeven" instance=ExtResource("1_xrckx")]
position = Vector2(0, 600) position = Vector2(11, 593)
text = "I am just too many things at once" text = "I am just too many things at once"
[node name="p_inner_conflict" parent="draeven/c_confusion" groups=["c_boy_stuff", "c_confusion", "c_fighting", "c_homework", "c_rejection", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_inner_conflict" parent="draeven/c_confusion" groups=["c_boy_stuff", "c_confusion", "c_fighting", "c_homework", "c_rejection", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -64,6 +64,7 @@ offset_right = 594.0
offset_bottom = 181.0 offset_bottom = 181.0
[node name="c_homework" parent="childhood" instance=ExtResource("1_xrckx")] [node name="c_homework" parent="childhood" instance=ExtResource("1_xrckx")]
position = Vector2(4, -6)
text = "I never put in much effort for homework" text = "I never put in much effort for homework"
[node name="p_good_grades" parent="childhood/c_homework" groups=["c_body", "c_boy_stuff", "c_homework", "c_out-of-world", "c_rejection", "c_teachers"] instance=ExtResource("2_ucudl")] [node name="p_good_grades" parent="childhood/c_homework" groups=["c_body", "c_boy_stuff", "c_homework", "c_out-of-world", "c_rejection", "c_teachers"] instance=ExtResource("2_ucudl")]
@ -75,7 +76,7 @@ position = Vector2(-32, 140)
text = "my peers were upset about that." text = "my peers were upset about that."
[node name="c_teachers" parent="childhood" instance=ExtResource("1_xrckx")] [node name="c_teachers" parent="childhood" instance=ExtResource("1_xrckx")]
position = Vector2(0, 300) position = Vector2(9, 291)
text = "I like my teachers more than my classmates" text = "I like my teachers more than my classmates"
[node name="p_volunteering" parent="childhood/c_teachers" groups=["c_boy_stuff", "c_comic_heroes", "c_joy", "c_teachers"] instance=ExtResource("2_ucudl")] [node name="p_volunteering" parent="childhood/c_teachers" groups=["c_boy_stuff", "c_comic_heroes", "c_joy", "c_teachers"] instance=ExtResource("2_ucudl")]
@ -87,7 +88,7 @@ position = Vector2(-32, 140)
text = "maybe I want to become a teacher." text = "maybe I want to become a teacher."
[node name="c_joy" parent="childhood" instance=ExtResource("1_xrckx")] [node name="c_joy" parent="childhood" instance=ExtResource("1_xrckx")]
position = Vector2(0, 600) position = Vector2(11, 595)
text = "I can put ages into things I enjoy" text = "I can put ages into things I enjoy"
[node name="p_worried_mother" parent="childhood/c_joy" groups=["c_body", "c_boy_stuff", "c_comic_heroes", "c_fighting", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_worried_mother" parent="childhood/c_joy" groups=["c_body", "c_boy_stuff", "c_comic_heroes", "c_fighting", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -106,6 +107,7 @@ offset_right = 904.0
offset_bottom = 141.0 offset_bottom = 141.0
[node name="c_comic_heroes" parent="voice_training" instance=ExtResource("1_xrckx")] [node name="c_comic_heroes" parent="voice_training" instance=ExtResource("1_xrckx")]
position = Vector2(9, -7)
text = "Comic heroes are my role models " text = "Comic heroes are my role models "
[node name="p_effort" parent="voice_training/c_comic_heroes" groups=["c_comic_heroes", "c_hit", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_effort" parent="voice_training/c_comic_heroes" groups=["c_comic_heroes", "c_hit", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -117,7 +119,7 @@ position = Vector2(-32, 140)
text = "and I want to be like agent q!" text = "and I want to be like agent q!"
[node name="c_boy_stuff" parent="voice_training" instance=ExtResource("1_xrckx")] [node name="c_boy_stuff" parent="voice_training" instance=ExtResource("1_xrckx")]
position = Vector2(0, 300) position = Vector2(8, 301)
text = "I like boy stuff" text = "I like boy stuff"
[node name="p_pretending" parent="voice_training/c_boy_stuff" groups=["c_body", "c_boy_stuff", "c_hit", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_pretending" parent="voice_training/c_boy_stuff" groups=["c_body", "c_boy_stuff", "c_hit", "c_homework", "c_joy", "c_teachers", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -128,9 +130,8 @@ text = "yet they think I'm just pretending"
position = Vector2(-32, 140) position = Vector2(-32, 140)
text = "and girls don't get that." text = "and girls don't get that."
[node name="c_teasing" parent="voice_training" node_paths=PackedStringArray("evil_sticky_notes") instance=ExtResource("1_xrckx")] [node name="c_teasing" parent="voice_training" instance=ExtResource("1_xrckx")]
position = Vector2(0, 600) position = Vector2(6, 598)
evil_sticky_notes = [NodePath("../../childhood/c_joy/p_thomas")]
text = "When Jojo got teased for trying, I pretty much exploded" text = "When Jojo got teased for trying, I pretty much exploded"
[node name="p_stubborn" parent="voice_training/c_teasing" groups=["c_boy_stuff", "c_comic_heroes", "c_confusion", "c_fighting", "c_hit", "c_homework", "c_joy", "c_out-of-world", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_stubborn" parent="voice_training/c_teasing" groups=["c_boy_stuff", "c_comic_heroes", "c_confusion", "c_fighting", "c_hit", "c_homework", "c_joy", "c_out-of-world", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -149,6 +150,7 @@ offset_right = 1254.0
offset_bottom = 141.0 offset_bottom = 141.0
[node name="c_fighting" parent="juijutsu" instance=ExtResource("1_xrckx")] [node name="c_fighting" parent="juijutsu" instance=ExtResource("1_xrckx")]
position = Vector2(-2, -13)
text = "I stopped doing Jiu Jitsu." text = "I stopped doing Jiu Jitsu."
[node name="p_body" parent="juijutsu/c_fighting" groups=["c_boy_stuff", "c_confusion", "c_fighting", "c_out-of-world"] instance=ExtResource("2_ucudl")] [node name="p_body" parent="juijutsu/c_fighting" groups=["c_boy_stuff", "c_confusion", "c_fighting", "c_out-of-world"] instance=ExtResource("2_ucudl")]
@ -159,20 +161,8 @@ text = "My body just didn't feel right"
position = Vector2(-32, 140) position = Vector2(-32, 140)
text = "I just hate being treated like a girl" text = "I just hate being treated like a girl"
[node name="c_void" parent="juijutsu" instance=ExtResource("4_b7cny")] [node name="c_hit" parent="juijutsu" instance=ExtResource("1_xrckx")]
position = Vector2(0, 600) position = Vector2(15, 297)
[node name="p_wet" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 50)
text = "I was wet, so I must have been into it."
[node name="p_stop" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 140)
text = "I didn't say stop."
[node name="c_hit" parent="juijutsu" node_paths=PackedStringArray("evil_sticky_notes") instance=ExtResource("1_xrckx")]
position = Vector2(0, 300)
evil_sticky_notes = [NodePath("../../childhood/c_teachers/p_becoming_teacher")]
text = "I know how to properly hit people" text = "I know how to properly hit people"
[node name="p_confidence" parent="juijutsu/c_hit" groups=["c_boy_stuff", "c_comic_heroes", "c_hit", "c_homework", "c_joy", "c_teasing"] instance=ExtResource("2_ucudl")] [node name="p_confidence" parent="juijutsu/c_hit" groups=["c_boy_stuff", "c_comic_heroes", "c_hit", "c_homework", "c_joy", "c_teasing"] instance=ExtResource("2_ucudl")]
@ -183,6 +173,17 @@ text = "that gives me a lot of confidence."
position = Vector2(-32, 140) position = Vector2(-32, 140)
text = "and thats a great vent." text = "and thats a great vent."
[node name="c_void" parent="juijutsu" instance=ExtResource("1_xrckx")]
position = Vector2(16, 598)
[node name="p_wet" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 50)
text = "I was wet, so I must have been into it."
[node name="p_stop" parent="juijutsu/c_void" groups=["c_void"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 140)
text = "I didn't say stop."
[node name="test2" type="Control" parent="."] [node name="test2" type="Control" parent="."]
anchors_preset = 0 anchors_preset = 0
offset_left = 1610.0 offset_left = 1610.0
@ -191,6 +192,7 @@ offset_right = 1650.0
offset_bottom = 181.0 offset_bottom = 181.0
[node name="c_random1" parent="test2" instance=ExtResource("1_xrckx")] [node name="c_random1" parent="test2" instance=ExtResource("1_xrckx")]
position = Vector2(12, 1)
[node name="p_random11" parent="test2/c_random1" groups=["c_boy_stuff"] instance=ExtResource("2_ucudl")] [node name="p_random11" parent="test2/c_random1" groups=["c_boy_stuff"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 50) position = Vector2(-32, 50)
@ -201,7 +203,7 @@ position = Vector2(-32, 140)
text = "random 1" text = "random 1"
[node name="c_pick" parent="test2" instance=ExtResource("1_xrckx")] [node name="c_pick" parent="test2" instance=ExtResource("1_xrckx")]
position = Vector2(0, 300) position = Vector2(14, 301)
[node name="p_pick" parent="test2/c_pick" groups=["c_boy_stuff", "c_comic_heroes", "c_homework", "c_joy"] instance=ExtResource("2_ucudl")] [node name="p_pick" parent="test2/c_pick" groups=["c_boy_stuff", "c_comic_heroes", "c_homework", "c_joy"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 50) position = Vector2(-32, 50)
@ -212,7 +214,7 @@ position = Vector2(-32, 140)
text = "you done goofed" text = "you done goofed"
[node name="c_random2" parent="test2" instance=ExtResource("1_xrckx")] [node name="c_random2" parent="test2" instance=ExtResource("1_xrckx")]
position = Vector2(0, 600) position = Vector2(17, 600)
[node name="p_random21" parent="test2/c_random2" groups=["c_void"] instance=ExtResource("2_ucudl")] [node name="p_random21" parent="test2/c_random2" groups=["c_void"] instance=ExtResource("2_ucudl")]
position = Vector2(-32, 50) position = Vector2(-32, 50)

View File

@ -0,0 +1,177 @@
class_name HardCards extends Node2D
static var source_dicts: Array[Dictionary] = [
{
"out-of-world": ["unique", "few_friends", []],
"rejection": ["finding_friends", "laughed_at", []],
"confusion": ["inner_conflict", "outer_conflict", []]
},
{
"homework": ["good_grades", "upset_peers", []],
"teachers": ["volunteering", "becoming_teacher", []],
"joy": ["worried_mother", "thomas_gifted", []]
},
{
"comic_heroes": ["effort", "agend_t", []],
"boy_stuff": ["pretending", "girls", []],
"teasing": ["stubborn", "good_intended", ["thomas_gifted"]]
},
{
"jui_jutsu": ["body", "girly", []],
"void": ["wet", "stop", []],
"hit": ["confidence", "vent", ["becoming_teacher"]]
},
]
static var id_reference: Dictionary[StringName, StringName] = generate_id_reference(true, true)
static var card_id_reference: Dictionary[StringName, StringName] = generate_id_reference(true, false)
static var sticky_id_reference: Dictionary[StringName, StringName] = generate_id_reference(false, true)
static func generate_id_reference(include_cards: bool, include_sticky: bool) -> Dictionary[StringName, StringName]:
var out:Dictionary[StringName, StringName] = {}
for id in range(source_dicts.size()):
for card_name:String in source_dicts[id].keys():
if include_cards:
out[card_name] = "%d.%s" % [id, card_name]
if include_sticky:
for sticky_name in source_dicts[id][card_name]:
if sticky_name is String:
out[sticky_name] = "%d.%s.%s" % [id, card_name, sticky_name]
return out
static func get_child_names_of(parent_id: StringName) -> Array[StringName]:
var out: Array[StringName]
for child_name: StringName in id_reference.keys():
if id_reference[child_name].contains(parent_id):
if child_name != parent_id:
out.append(child_name)
return out
#FIXME: enhance typing!
static func get_children_of(parent_id: StringName) -> Array:
return get_cards_by_name_array(get_child_names_of(parent_id))["sticky_notes"]
func arrange(cards: Array[Card], rect: Rect2, obstacles: Array[Area2D]) -> Array[Card]:
var total_cards = cards.size()
var x:int = 0
var y:int = 0
var i:int = 0
var max:int = cards.size()
var grid: int = ceil(sqrt(max))
var diameter:float = cards[0].diameter
var r_cards: Array[Card] = cards.duplicate()
r_cards.shuffle()
while i < max:
while x < grid and i < max:
while y < ceil(sqrt(max)) and i < max:
r_cards[i].position = rect.size / Vector2(y, x) * (1.0 / (rect.size.x * diameter) ) + rect.position + Vector2(randf_range(diameter/2+5, diameter-5), randf_range(diameter/2+5, diameter-5))
i += 1
y += 1
x += 1
for card: Card in r_cards:
for _i in range(20):
if is_out_of_bounds(card, rect):
card.position = rect.get_center() - card.position * 0.8
continue
var colliders: Array[Card] = []
for collision:Card in r_cards:
if card != collision:
if card.collider.collide(card.transform.rotated(PI/2), collision.collider, collision.transform.rotated(PI/2)):
colliders.append(collision)
if colliders != []:
var nearest: Card = colliders[0]
for colliding in colliders:
if (colliding.position - card.position).length() > (nearest.position - card.position).length():
nearest = colliding
card.position += min(nearest.position - card.position.normalized() * card.diameter + 1, nearest.position - card.position)
continue
break
return r_cards
func is_out_of_bounds(card: Card, rect: Rect2):
var world_boundaries: Array[Transform2D] = [
Transform2D(PI, rect.position),
Transform2D(PI/2, rect.position),
Transform2D(-PI/2, rect.position+rect.size),
Transform2D(0, rect.position+rect.size)
]
var shape: = WorldBoundaryShape2D.new()
for boundary:Transform2D in world_boundaries:
if card.collider.collide(card.transform, shape, boundary):
return true
return false
static func get_cards_by_scene_id(id: int) -> Array:
var output:Array
for card_name in source_dicts[id].keys():
output.append(Card.new(card_name, id_reference[card_name]))
return output
# used to put cards on the dev board
static func get_cards_by_name_array(names: Array[StringName]) -> Dictionary:
var output:Dictionary = {
"cards": [],
"sticky_notes": []
}
for card_name:StringName in names:
if card_id_reference.has(card_name):
output["cards"].append(create_from_id(id_reference[card_name]))
else:
output["sticky_notes"].append(create_from_id(id_reference[card_name]))
return output
static func create_from_id(id:StringName) -> Area2D:
var parsed: PackedStringArray = id.rsplit(".")
var helper = card_id_reference
var keys = card_id_reference.keys()
if card_id_reference.values().has(id):
return Card.new(parsed[1], id)
elif sticky_id_reference.values().has(id):
return StickyNote.new(parsed[2], id)
else:
push_error("Attempted to create Card or Sticky from non-existent ID!")
return null
static func create_dev_board(parent: Node2D, rect: Rect2) -> void:
for x in range(source_dicts.size()):
var sub_parent = Node2D.new()
sub_parent.position = Vector2( rect.size.x/(source_dicts.size()+1) * (x+1) , 0)
parent.add_child(sub_parent, false, Node.INTERNAL_MODE_BACK)
var y = 1
for card_name in source_dicts[x].keys():
var card:Card = create_from_id(card_id_reference[card_name])
sub_parent.add_child(card, false, Node.INTERNAL_MODE_BACK)
card.position = Vector2(0, card.diameter * y - card.diameter/2)
var z = 0
for sticky_name in get_child_names_of(card_name):
var sticky: StickyNote = create_from_id(sticky_id_reference[sticky_name])
card.add_child(sticky, false, Node.INTERNAL_MODE_BACK)
sticky.position = card.sticky_note_position + Vector2(0, 80) * z
z += 1
y += 1
func _ready() -> void:
create_dev_board(self, get_viewport().get_visible_rect())

View File

@ -0,0 +1 @@
uid://dysgoaaesqjbg

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dckj4hhl42v8u"]
[ext_resource type="Script" uid="uid://dysgoaaesqjbg" path="res://dev-util/hardcoded_cards.gd" id="1_5kg6w"]
[node name="Node2D" type="Node2D"]
script = ExtResource("1_5kg6w")

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://cnaffkv2n4gy5"]
[ext_resource type="Script" uid="uid://dysgoaaesqjbg" path="res://dev-util/hardcoded_cards.gd" id="1_ba1m7"]
[node name="Node2D" type="Node2D"]
script = ExtResource("1_ba1m7")

View File

@ -20,8 +20,8 @@ script_export_mode=2
[preset.0.options] [preset.0.options]
custom_template/debug="/home/betalars/Development/godot/godot-steam/godotsteam.44.debug.template.linux.x86_64" custom_template/debug="/home/betalars/Development/godot/godot-steam/godotsteam.441.debug.template.linux.x86_64"
custom_template/release="/home/betalars/Development/godot/godot-steam/godotsteam.44.template.linux.x86_64" custom_template/release="/home/betalars/Development/godot/godot-steam/godotsteam.441.template.linux.x86_64"
debug/export_console_wrapper=1 debug/export_console_wrapper=1
binary_format/embed_pck=false binary_format/embed_pck=false
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true
@ -66,8 +66,8 @@ script_export_mode=2
[preset.1.options] [preset.1.options]
custom_template/debug="/home/betalars/Development/godot/godot-steam/godotsteam.44.debug.template.windows.64.exe" custom_template/debug="/home/betalars/Development/godot/godot-steam/godotsteam.441.debug.template.windows.64.exe"
custom_template/release="/home/betalars/Development/godot/godot-steam/godotsteam.44.template.windows.64.exe" custom_template/release="/home/betalars/Development/godot/godot-steam/godotsteam.441.template.windows.64.exe"
debug/export_console_wrapper=1 debug/export_console_wrapper=1
binary_format/embed_pck=false binary_format/embed_pck=false
texture_format/s3tc_bptc=true texture_format/s3tc_bptc=true

View File

@ -92,7 +92,7 @@ General,General,Allgemeines,,,In the context of a video settings menu
apply preset,apply preset,Voreinstellungen,,, apply preset,apply preset,Voreinstellungen,,,
Performance,Performance,Leistungsschonend,,, Performance,Performance,Leistungsschonend,,,
Balanced,Balanced,Ausgeglichen,,, Balanced,Balanced,Ausgeglichen,,,
Quality,Quality,höchste Qualität,,, Quality,Quality,Qualität,,,
Fulscreen Mode,Fulscreen Mode,Fenster-Modus,,, Fulscreen Mode,Fulscreen Mode,Fenster-Modus,,,
Windowed,Windowed,im Fenster,,, Windowed,Windowed,im Fenster,,,
Fullscreen,Fullscreen,Vollbild,,, Fullscreen,Fullscreen,Vollbild,,,
@ -103,12 +103,12 @@ Super Resolution,Super Resolution,Super Resolution,,,
disabled,disabled,aus,,, disabled,disabled,aus,,,
limit FPS,limit FPS,FPS begrenzen,,, limit FPS,limit FPS,FPS begrenzen,,,
Graphic Fidelity,Graphic Fidelity,graphische Qualität,,, Graphic Fidelity,Graphic Fidelity,graphische Qualität,,,
Lighting Quality,Lighting Quality,Lichtqualität,,, Global Illumination,Global Illumination,Globale Illumination,,,
minimum,minimum,minimum,,, minimum,minimum,minimum,,,
low (SDF Global Illumination),low (SDF Global Illumination),niedrig (SDF globale Illumination),,, low (SDF Global Illumination),low (SDF Global Illumination),Niedrig (SDF Illumination),,,
medium (SDF and Screen Space Global Illumination),medium (SDF and Screen Space Global Illumination),medium (SDF und Screen Space globale Illumination),,, medium (SDF and Screen Space Global Illumination),medium (SDF and Screen Space Global Illumination),mittel (SDF-Beleuchtung und SSGI),,,
high (SDF and Screen Space Global Illumination),high (SDF and Screen Space Global Illumination),hoch (SDF und Screen Space globale Illumination),,, high (SDF and Screen Space Global Illumination),high (SDF and Screen Space Global Illumination),hoch (SDF-Beleuchtung und SSGI),,,
Shadow Quality,Shadow Quality,Schattenqualität,,, Shadow Quality,Shadow Quality,Shattenqualität,,,
performance,performance,leistungsschonend,,, performance,performance,leistungsschonend,,,
balanced,balanced,ausgeglichen,,, balanced,balanced,ausgeglichen,,,
quality,quality,höchste Qualität,,, quality,quality,höchste Qualität,,,
@ -151,44 +151,44 @@ Exploring social service year.,Exploring social service year.,Während des FSJ.,
Transitioning to university.,Transitioning to university.,Übergang zur Universität.,,, Transitioning to university.,Transitioning to university.,Übergang zur Universität.,,,
Exploring dorm room.,Exploring dorm room.,Während des Studiums,,, Exploring dorm room.,Exploring dorm room.,Während des Studiums,,,
Ending,Ending,Ende,,, Ending,Ending,Ende,,,
I never put in much effort for homework,I never put in much effort for homework,Ich habe mir nie Mühe bei Hausaufgaben gegeben,,, homework,I never put in much effort for homework ,Ich habe mir nie Mühe bei Hausaufgaben gegeben,,,
but at least I get good grades.,but at least I get good grades.,aber zumindest waren meine Noten gut.,,, good_grades,but at least I get good grades.,aber zumindest waren meine Noten gut.,,,
my peers were upset about that.,my peers were upset about that.,meine Klasse war deswegen sauer.,,, upset_peers,my peers were upset about that.,meine Klasse war deswegen sauer.,,,
I like my teachers more than my classmates,I like my teachers more than my classmates,"Ich komm mit meinen Lehrern besser klar, als mit meiner Klasse.",,, teachers,I like my teachers more than my classmates ,"Ich komm mit meinen Lehrern besser klar, als mit meiner Klasse.",,,
doing voluntary social service at my school would be great.,doing voluntary social service at my school would be great.,vielleicht sollte ich ein FSJ vor dem Studium machen,,, volunteering,doing voluntary social service at my school would be great.,vielleicht sollte ich ein FSJ vor dem Stidum machen,,,
maybe I want to become a teacher.,maybe I want to become a teacher.,vielleicht sollte ich Lehrerin werden.,,, becoming_teacher,maybe I want to become a teacher.,vielleicht sollte ich Lehrerin werden.,,,
I can put ages into things I enjoy,I can put ages into things I enjoy,"Ich versinke in Dingen, die mir Freude machen",,, joy,I can put ages into things I enjoy ,"Ich versinke in Dingen, die mir Freude machen",,,
my mother would be worried about that,my mother would be worried about that,meiner Mutter macht das Sorgen.,,, worried_mother,my mother would be worried about that,meiner Mutter macht das Sorgen.,,,
Mr Thomas thinks that makes me gifted.,Mr Thomas thinks that makes me gifted.,Herr Thomas denkt das macht mich begabt.,,, thomas_gifted,Mr Thomas thinks that makes me gifted.,Herr Thomas denkt das macht mich begabt.,,,
Comic heroes are my role models,Comic heroes are my role models,Comic Helden sind meine Vorbilder,,, comic_heroes,Comic heroes are my role models ,Comic Helden sind meine Vorbilder,,,
"when I put in the effort, I can make the world a better place","when I put in the effort, I can make the world a better place","wenn ich mich nur anstrenge, kann ich die Welt verbessern!",,, effort,"when I put in the effort, I can make the world a better place","wenn ich mich nur anstrenge, kann ich die Welt verbessern!",,,
and I want to be like agent q!,and I want to be like agent q!,"Ich will so sein, wie Agent Clue!",,, agent_q,and I want to be like agent q!,"Ich will so sein, wie Agend Clue!",,,
I like boy stuff,I like boy stuff,Ich mag Jungs Kram,,, boy_stuff,I like boy stuff ,Ich mag Jugns Kram,,,
yet they think I'm just pretending,yet they think I'm just pretending,aber die denken ich tu einfach nur so.,,, pretending,yet they think I'm just pretending,aber die denken ich tu einfach nur so.,,,
and girls don't get that.,and girls don't get that.,und Mädchen verstehen das einfach nicht!,,, girls,and girls don't get that.,und Mädchen verstehen das einfach nicht!,,,
"When Jojo got teased for trying, I pretty much exploded","When Jojo got teased for trying, I pretty much exploded","Ich bin ausgerastet, weil Jojo für ihre Mühe gemobbt wurde",,, teasing,"When Jojo got teased for trying, I pretty much exploded","Ich bin ausgerastet, weil Jojo für ihre Mühe gemobbt wurde",,,
"I wouldn't have it any other way, even if it was for my own good","I wouldn't have it any other way, even if it was for my own good","das würde ich nicht aufgeben, selbst wenn das mir helfen würde.",,, stubborn,"I wouldn't have it any other way, even if it was for my own good","das würde ich nicht aufgeben, selbst wenn es mir helfen würde.",,,
I will always stand up for the good intended,I will always stand up for the good intended,"ich werde immer für Menschen einstehen, die das Richtige wollen!",,, good_intended,I will always stand up for the good intended,"ich werde immer für Menschen einstehen, die das Richtige wollen!",,,
I stopped doing Jiu Jitsu.,I stopped doing Jiu Jitsu.,Ich habe mit Jiu Jutsu aufgehört,,, jui_jutsu,I stopped doing Jui Jitsu.,Ich habe mit Jui Jutsu aufgehört,,,
My body just didn't feel right,My body just didn't feel right,mein Körper hat sich falsch angefühlt,,, body,My body just didn't feel right,mein Körper hat sich falsch anfefühlt,,,
I just hate being treated like a girl,I just hate being treated like a girl,Ich hasse es wie ein Mädchen behandelt zu werden,,, girly,I just hate being treated like a girl,Ich hasse es wie ein Mädchen behandelt zu werden,,,
I know how to properly hit people,I know how to properly hit people,"Ich weiß, wie man ordentlich zuschlägt",,, hit,I know how to properly hit people ,"Ich weiß, wie man ordentlich zuschlägt",,,
that gives me a lot of confidence.,that gives me a lot of confidence.,das gibt mir viel Selbstvertrauen.,,, confidence,that gives me a lot of confidence.,das gibt mir viel Selbstvertrauen.,,,
and thats a great vent.,and thats a great vent.,ich kann da gut Frust ablassen.,,, vent,and thats a great vent.,ich kann da gut Frust ablassen.,,,
"Lukas did not ask for consent, he didn't explain a thing, I didn't even move! Yet he dared to assume, that ","Lukas did not ask for consent, he didn't explain a thing, I didn't even move! Yet he dared to assume, that ","Lukas hat mich nicht gefragt, er hat nichts erklärt und trotzdem wagte er es zu glauben:",,,It is very crucial that this sentence and the next line form a complete sentence "Lukas did not ask for consent, he didn't explain a thing, I didnt even move! Yet he dared to assume, that ","Lukas did not ask for consent, he didn't explain a thing, I didnt even move! Yet he dared to assume, that ","Lukas hat mich nicht gefragt, er hat nichts erklärt und trotzdem wagte er es zu glauben:",,,It is very crucial that this sentence and the next line form a complete sentence
"I was wet, so I must have been into it.","I was wet, so I must have been into it","Ich war feucht, also hab ichs wohl gewollt?",,,This line on itself should seem like a intrusive thought on its own without the content above. wet,"I was wet, so I must have been into it","Ich war feucht, also hab ichs wohl gewollt?",,,This line on itself should seem like a intrusive thought on its own without the contect above.
"Lukas jumped me, he didn't even explain a thing or ask consent. I was confused and paralyzed, so ","Lukas jumped me, he didn't even explain a thing or ask consent. I was confused and paralyzed, so ","Lukas hat mich überrumpelt, er hat nichts erklärt oder überhaupt gefragt, was ich wollte. Ich war im Moment nicht mehr ich selbst und",,,It is very crucial that this sentence and the next line form a complete sentence "Lukas jumped me, he didn't even explain a thing or ask consent. I was confused and paralised, so ","Lukas jumped me, he didn't even explain a thing or ask consent. I was confused and paralised, so ","Lukas hat mich überrumpelt, er hat nichts erklärt oder überhaupt gefragt, was ich wollte. Ich war im Moment nicht mehr ich selbst und",,,It is very crucial that this sentence and the next line form a complete sentence
I didn't say stop.,I didn't say stop.,Ich habe nicht Stopp gesagt.,,,This line on itself should seem like a intrusive thought on its own without the contect above. stop,I didnt say stop.,Ich habe nicht Stopp gesagt.,,,This line on itself should seem like a intrusive thought on its own without the contect above.
I feel like I am not from of this world,I feel like I am not from of this world,Ich fühl mich wie von einer anderen Welt,,, out-of-world,I feel like I am not from of this world,Ich fühl mich wie von einer anderen Welt,,,
I like being unique like that,I like being unique like that,ich mag es so besonders zu sein.,,, unique,I like being unique like that,ich mag es so besonders zu sein.,,,
I am thankful for the few friends that get me,I am thankful for the few friends that get me,"gut, dass ich ein paar Freunde habe, die das verstehen.",,, few_friends,I am thankful for the few friends that get me,"gut, dass ich ein paar Freunde habe, die das verstehen.",,,
I fear being rejected,I fear being rejected,"Ich habe Angst, ausgeschlossen zu werden",,, rejection,I fear being rejected,"Ich habe Angst, ausgeschlossen zu werden",,,
that makes it hard to find friends,that makes it hard to find friends,darum fällt mir Freunde finden schwer.,,, finding_friends,that makes it hard to find friends,darum fällt mir Freunde finden schwer.,,,
I'm afraid I will just get laughed at,I'm afraid I will just get laughed at,"was, wenn ich deswegen ausgelacht werde?",,, laughed_at,I'm afraid I will just get laughed at,"was, wenn ich deswegen ausgelacht werde?",,,
I am just too many things at once,I am just too many things at once,Ich bin zu viel gleichzeitig.,,, confusion,I am just too many things at once,Ich bin zu viel gleichzeitig.,,,
it is just so overwhelming for me,it is just so overwhelming for me,das ist einfach zu viel für mich.,,, inner_conflict,it is just so overwhealming for me,das ist einfach überfordernd für mich.,,,
this is just too much for others,this is just too much for others,das ist einfach zu viel für andere.,,, outer_conflict,this is just too much for others,das ist einfach überfordernd für andere.,,,
"[p]Oh, my old mask. I have so many good memories about theatre club. ","[p]Oh, my old mask. I have so many good memories about theatre club.",das ist einfach zu viel für mich.,,, "[p]Oh, my old mask. I have so many good memories about theatre club. ","[p]Oh, my old mask. I have so many good memories about theatre club.","[p]Nahw, meine gute alte Maske. Ich habe so schöne Erinnerungen an die Theater-AG. ",,,
"I would stand on my bed for entire afternoons, weeks on end, practicing my lines. Pretending to be on the big stage ... ","I would stand on my bed for entire afternoons, weeks on end, practicing my lines. Pretending to be on the big stage ... ","Ich hab den ganzen Nachmittag geübt, wochenlang. Mein Bett eine große Bühne. ",,, "I would stand on my bed for entire afternoons, weeks on end, practicing my lines. Pretending to be on the big stage ... ","I would stand on my bed for entire afternoons, weeks on end, practicing my lines. Pretending to be on the big stage ... ","Ich hab den ganzen Nachmittag geübt, wochenlang. Mein Bett eine große Bühne. ",,,
"my mom would get mad at me, when she had to call me three or four times for dinner. ","my mom would get mad at me, when she had to call me three or four times for dinner. [/p]","Es gab so oft Zoff, weil mich meine Mutter immer wieder zum Essen rufen musste.[/p]",,, "my mom would get mad at me, when she had to call me three or four times for dinner. ","my mom would get mad at me, when she had to call me three or four times for dinner. [/p]","Es gab so oft Zoff, weil mich meine Mutter immer wieder zum Essen rufen musste.[/p]",,,
I just … didn't like the interruptions. We both were often mad at each other.,[p]I just … didn't like the interruptions. We both were often mad at each other.[/p],[p]Ich konnte die Unterbrechungen einfach nicht ab. Wir haben uns so oft deswegen gestritten.[/p],,, I just … didn't like the interruptions. We both were often mad at each other.,[p]I just … didn't like the interruptions. We both were often mad at each other.[/p],[p]Ich konnte die Unterbrechungen einfach nicht ab. Wir haben uns so oft deswegen gestritten.[/p],,,
@ -266,10 +266,10 @@ They don't talk behind your back. They don't think everything is about relations
Like I won't deny I was probably the first girl in my class to see a dick.,Like I won't deny I was probably the first girl in my class to see a dick.[/p],Ich hab vermutlich als erstes Mädchen meiner Stufe einen Schwanz gesehen.,,, Like I won't deny I was probably the first girl in my class to see a dick.,Like I won't deny I was probably the first girl in my class to see a dick.[/p],Ich hab vermutlich als erstes Mädchen meiner Stufe einen Schwanz gesehen.,,,
"But like - thats what the boys do, right?","[p]But like - thats what the boys do, right?[/p]","Aber das machen Jungs halt miteinander, oder?",,, "But like - thats what the boys do, right?","[p]But like - thats what the boys do, right?[/p]","Aber das machen Jungs halt miteinander, oder?",,,
At least it has gotten better after me and Jojo became friends.,[p]At least it has gotten better after me and Jojo became friends.,"Zumindest hat es sich gebessert, nachdem Jojo und ich Freundinnen wurden.",,, At least it has gotten better after me and Jojo became friends.,[p]At least it has gotten better after me and Jojo became friends.,"Zumindest hat es sich gebessert, nachdem Jojo und ich Freundinnen wurden.",,,
I still remember how that happened. I did a voice acting workshop in art class.,I still remember how that happened. I did a voice acting workshop in art class.,Die Geschichte ist großartig. Ich durfte in Kunst einen Vortrag über Voice Acting halten.,,, I still remember how that happend. I did a voice acting workshop in art class. ,I still remember how that happend. I did a voice acting workshop in art class. ,Die Geschichte ist großartig. Ich durfte in Kunst einen Vortag über Voice Acting halten.,,,
Being allowed to share my technique in front of everyone was just :D,Being allowed to share my technique in front of everyone was just :D,Meine Technik mit allen teilen können war einfach nur :D,,, Being allowed to share my technique in front of everyone was just :D,Being allowed to share my technique in front of everyone was just :D ,Meine Technik mit allen teilen können war einfach nur :D,,,
I mean next to nobody put in any effort. But Jojo did.,I mean next to nobody put in any effort. But Jojo did.[/p],"Ich meine … niemand hat sich wirklich angestrengt, außer Jojo halt.",,, I mean next to nobody put in any effort. But Jojo did.,I mean next to nobody put in any effort. But Jojo did.[/p],"Ich meine … nieman hat sich wirklich angesträngt, außer Jojo halt.",,,
"When our Mr Funny then decided to ape her attempts instead of just minding his own, I pretty much exploded.","[p]When our Mr Funny then decided to ape her attempts instead of just minding his own, I pretty much exploded.[/p]",Langsam kam ich zurück.,,, "When our Mr Funny then decided to ape her attempts instead of just minding his own, I pretty much exploded.","[p]When our Mr Funny then decided to ape her attempts instead of just minding his own, I pretty much exploded.[/p]","Als unser Klassencloun sie dann nachäffen musste anstatt sich um seinen Scheiß zu kümmern, bin ich einfach eplodiert.",,,
"After this, we suddenly were besties. And my class finally started to just leave me be. ","[p]After this, we suddenly were besties. And my class finally started to just leave me be. ",Danach hatte ich plötzlich eine beste Freundin und endlich meine Ruhe.,,, "After this, we suddenly were besties. And my class finally started to just leave me be. ","[p]After this, we suddenly were besties. And my class finally started to just leave me be. ",Danach hatte ich plötzlich eine beste Freundin und endlich meine Ruhe.,,,
Maybe because I for once was friends with another girl. Maybe because I scared them. Maybe both.,Maybe because I for once was friends with another girl. Maybe because I scared them. Maybe both.[/p],"Vielleicht, weil ich nun auch mit einem Mädchen befreundet war. Vielleicht weil die Mobber plötzlich Angst vor mir hatten. Vermutlich beides.",,, Maybe because I for once was friends with another girl. Maybe because I scared them. Maybe both.,Maybe because I for once was friends with another girl. Maybe because I scared them. Maybe both.[/p],"Vielleicht, weil ich nun auch mit einem Mädchen befreundet war. Vielleicht weil die Mobber plötzlich Angst vor mir hatten. Vermutlich beides.",,,
skip reading (hold),skip reading (hold),zum Ende springen (gedrückt halten),,, skip reading (hold),skip reading (hold),zum Ende springen (gedrückt halten),,,
@ -302,4 +302,4 @@ Collect Memento,Collect Memento,Erinnerung einsammeln,,,
Order Thoughts,Order Thoughts,Gedanken sortieren,,, Order Thoughts,Order Thoughts,Gedanken sortieren,,,
listen again,listen again,erneut anhören,,, listen again,listen again,erneut anhören,,,
Why does that story mean so much to me?,Why does that story mean so much to me?,Warum geht mir diese Geschichte so nah?,,, Why does that story mean so much to me?,Why does that story mean so much to me?,Warum geht mir diese Geschichte so nah?,,,
lang-disclaimer,"""Frame of Mind"" is as of now not yet fully localised for German.","""Frame of Mind"" ist noch nicht voll nach Deutsch übersetzt.",,, lang-disclaimer,"""Frame of Mind"" is as of now not yet fully localised for German.","""Frame of Mind"" ist noch nicht voll nach Deutsch übersetzt.",,,

1 keys en de es ja notes
92 invert Y (gamepad) invert Y (gamepad) Y-Achse invertieren
93 Input Sensitivity Input Sensitivity Eingabesensibilität
94 Stream Overlay Stream Overlay Stream-Einblendungen
95 Displays content note and currently playing music at a corner of the screen. Displays content note and currently playing music at s corner of the screen. Zeigt Hinweise zu sensiblen Themen und aktuell laufender Musik an einer Ecke des Bildschirms an.
96 none none keine
97 top left top left oben links
98 top right top right oben rechts
103 Start new game. Start new game. Neuen Spielstand anlegen.
104 Empty Slot Empty Slot leerer Spielstand
105 Intro Sequence Intro Sequence Einleitung
106 Inside youth room. Inside youth room. Im Jugendzimmer.
107 Transitioning to voluntary year. Transitioning to voluntary year. Übergang zum FSJ.
108 Exploring social service year. Exploring social service year. Während des FSJ.
109 Transitioning to university. Transitioning to university. Übergang zur Universität.
110 Exploring dorm room. Exploring dorm room. Während des Studiums
111 Ending Ending Ende
112 I never put in much effort for homework homework I never put in much effort for homework I never put in much effort for homework Ich habe mir nie Mühe bei Hausaufgaben gegeben
113 but at least I get good grades. good_grades but at least I get good grades. aber zumindest waren meine Noten gut.
114 my peers were upset about that. upset_peers my peers were upset about that. meine Klasse war deswegen sauer.
151 my mom would get mad at me, when she had to call me three or four times for dinner. my mom would get mad at me, when she had to call me three or four times for dinner. [/p] Es gab so oft Zoff, weil mich meine Mutter immer wieder zum Essen rufen musste.[/p]
152 I just … didn't like the interruptions. We both were often mad at each other. [p]I just … didn't like the interruptions. We both were often mad at each other.[/p] [p]Ich konnte die Unterbrechungen einfach nicht ab. Wir haben uns so oft deswegen gestritten.[/p]
153 Dinner was difficult. [p]Dinner was difficult. [p]Abendbrot war die Hölle.
154 I just couldn't bring myself to eat, because I couldn't deal with the bread and my mom. I just couldn't bring myself to eat, because I couldn't deal with the bread and my mom.[/p] Ich weiß nicht, was mich mehr gestört hat: das Brot oder Mom.[/p]
155 She was always so worried. [p]She was always so worried: [p]Sie war immer besorgt.
156 ‘Lisa, you forgot your homework, Lisa why won't you play with the other girls," ‘Lisa, you forgot your homework, Lisa why won't you play with the other girls, “Lisa, deine Hausaufgaben!, Lisa, warum warst du heute nicht bei den Mädels draußen?,
157 "Lisa why didn't Steffi invite you to her birthday, Lisa this, Lisa that.’ Lisa why didn't Steffi invite you to her birthday, Lisa this, Lisa that.’[/p] Lisa, warum hat dich Steffi nicht eingeladen?, Lisa dies, Lisa das.”[/p]
158 But I was fine! She just wouldn't listen. [p]But I was fine! She just wouldn't listen.[/p] [p]Mir ging gut, okay? Als ob sie das je interessiert hätte.[/p]
159 Yes, I didn't do homework, but my teachers didn't mind it as much with me [p]Yes, I didn't do homework, but my teachers didn't mind it as much with me [p]Natürlich habe ich keine Hausaufgaben gemacht, aber das hat in der Schule bei mir auch niemand' interessiert,
160 - which the other kids wouldn't shut up about. But like … , which the other kids wouldn't shut up about. But like … außer meine Klasse vielleicht, aber wer interessiert sich schon für die?
161 they also made fun of me reading school books and talking to my teachers during breaks. they also made fun of me reading school books and talking to my teachers during breaks. Vielleicht hätten die auch mal ein Buch in die Hand nehmen sollen statt sich darüber zu zerreißen, dass ich in der Pause lieber mit den Erwachsenen geredet habe.
162 But at least I could fucking talk to teachers and they had stuff to say. But at least I could fucking talk to teachers and they had stuff to say.[/p] Immerhin konnte man mit denen reden und die haben auch was erzählt.[/p]
163 Mr Thomas probably even understood me better than my own mom. [p]Mr Thomas probably even understood me better than my own mom.[/p] [p]Herr Thomas hat mich vermutlich besser verstanden, als meine eigene Mutter.[/p]
164 He said I was gifted. He said I just didn't need homework for good grades. [p]He said I was gifted. He said I just didn't need homework for good grades.[/p] [p]Er hat immer gesagt ich bin begabt, weil ich gute Noten auch ohne Hausaufgaben geschafft habe.[/p]
165 And he also made sure to always include extra credits. So my silly slip-ups wouldn't get me a B. [p]And he also made sure to always include extra credits. So my silly slip-ups wouldn't get me a B.[/p] [p]Und er hat immer Fleißaufgaben gehabt, damit ich auch mit Schusselfehlern eine Eins bekomme.[/p]
166 Moonlight trickled down through clouds and twigs as Dräven tapped through the night. [p]Moonlight trickled down through clouds and twigs as Dräven tapped through the night. [p]Das Mondlicht spielte mit Wolken und Geäst, da lief Dräven durch die Nacht.
167 He had been searching for a while and he knew a special someone must be hiding in the thicket. He had been searching for a while and he knew a special someone must be hiding in the thicket.[/p] Lang schon suchte er vergeblich, doch war er sich heute gewiss: jemand ganz besonderes hält sich zwischen Farnen und Gestrüpp versteckt.[/p]
168 When a familiar smell first led him to a few bronce hairs as fluffy as his tail, he didn't think much of it. [p]When a familiar smell first led him to a few bronce hairs as fluffy as his tail, he didn't think much of it. [p]Er dachte sich nichts dabei, als ihn neulich ein vertrauter Geruch zu einem Büschel Haare führte: Bronzen und so weich, wie sein eig'ner Schweif.
169 But then he saw paw-prints, that matched his own where he had not been. Would he finally find someone of his kind? But then he saw paw-prints, that matched his own where he had not been. Would he finally find someone of his kind?[/p] Doch dann Spuren, die den seinen glichen, wo er noch nicht gewesen war. Würde er endlich seinesgleichen finden?[/p]
170 He was sure of it, as the familiar scent has never been stronger than tonight. [p]He was sure of it, as the familiar scent has never been stronger than tonight.[/p] [p]Bestimmt, denn der vertraute Duft war heute Nacht so stark, wie nie..[/p]
171 When suddenly: Was that chatter? [p]When suddenly: Was that chatter?[/p] [p]Plötzlich: war das Keckern?[/p]
172 His wings rustled with joy over the familiar voice and Dräven decided to get a better look. [p]His wings rustled with joy over the familiar voice and Dräven decided to get a better look. [p]Seine Flügel raschelten vor Freude über die vertraute Stimme und Drävens Neugier war geweckt.
173 A few flaps and leaps brought him up a tree, to get a glimpse of his soon to be friend. A few flaps and leaps brought him up a tree, to get a glimpse of his soon to be friend.[/p] Flatternd sprang er in Wipfel, um einen Blick auf seinen baldigen Freund zu erhaschen.[/p]
174 But all he saw was a fox. [p]But all he saw was a fox.[/p] [p]Doch er sah nichts als einen Fuchs.[/p]
175 He didn't even want to bother it anymore. [p]He didn't even want to bother it anymore. [p]Er wollte sich dem Tier nicht einmal mehr nähern.
176 It would just scream and laugh at his wings of leafs, just like the trees crackled at his paws, that were no roots. It would just scream and laugh at his wings of leafs, just like the trees crackled at his paws, that were no roots. Es würde eh nur Kreischen vor Lachen über seine Flügel aus Blättern. Genau wie die Bäume sich geschüttelt haben über seine Pfoten, die keine Wurzeln sind.
177 With a small whimper, Dräven spread his wings, and slid away to at least find comfort by seeing his reflection in the nearby lake. With a small whimper, Dräven spread his wings, and slid away to at least find comfort by seeing his reflection in the nearby lake.[/p] Wimmernd schlug Dräven seine Flügel auf und glitt davon zu seinem Lieblingsplatz am See. Vielleicht vermochte ihn sein Spiegelbild zu trösten.[/p]
178 It took him a while to notice, how there was a sudden silence when the clouds broke: [p]It took him a while to notice, how there was a sudden silence when the clouds broke: [p]Dräven hätte fast nicht gemerkt, wie der Wald den Atem anhielt, als sich die Wolken teilten.
179 Northern lights danced through the sky to form wings, that met at a sleek body made of stars and clouds. Northern lights danced through the sky to form wings, that met at a sleek body made of stars and clouds.[/p] Nordlicht tanzte durch den Himmel und wurde zu Flügeln an einem schlanken Körper aus Sternenlicht und Wolken.[/p]
180 The whole forest held its breath as it stared into eyes of moonlight gazing down. [p]The whole forest held its breath as it stared into eyes of moonlight gazing down. [p]Der ganze Wald sah ehrfürchtig zu Augen aus Mondlicht hinauf, die verträumt den Blick erwiderten.
181 Dräven was moved to tears when he gazed back at it. He was sad for the dragon that was of the moon and the stars and the skies. [p]Dräven was moved to tears when he gazed back at it. He was sad for the dragon that was of the moon and the stars and the skies. [p]Dräven war zu Tränen gerührt, als er in hinauf sah. Voller Trauer um dem Drachen, der von Wolken, Sternen und Mondlicht war.
182 It must feel so lost in the universe. It must feel so lost in the universe.[/p] Er muss sich so verloren fühlen am Himmel.[/p]
183 But his tears were of joy: It was the first time Dräven saw another creature of many kinds. [p]But his tears were of joy: It was the first time Dräven saw another creature of many kinds.[/p] [p]Doch es waren Tränen der Freude. Denn es war das erste mal, dass Dräven ein anderes Viel-Wesen sah.[/p]
184 Why do i still have this junk lying around? its not like I want to do ju jutsu ever again. I just fucked it. [p]Why do i still have this junk lying around? its not like I want to do ju jutsu ever again. I just fucked it. Boar, warum hängt hier noch dieser Müll? Ich hab Jiu Jutsu einfach verkackt.
185 I mean I did enjoy it while it lasted. Being able to properly hit people was great. I mean I did enjoy it while it lasted. Being able to properly hit people was great. Ich meine … ich hatte Spaß damals. Leute gut Schlagen können ist großartig.
186 It gave me the confidence to intimidate students, that were begging to get folded and - as I only once actually got to do that - it also was a great vent for anger. It gave me the confidence to intimidate students, that were begging to get folded and - as I only once actually got to do that - it also was a great vent for anger.[/p] Es gab mir Selbstvertrauen. Ich konnte Leute einschüchtern, wenn sie darum gebettelt haben aufs Maul zu bekommen und weil ich das nur einmal tatsächlich getan habe, war es auch ein super Ventil.
187 I mean my tits just about killed me during warmup and the changing room really didn't need mirrors - thank you I know my hips are fat and disgusting - but at least there was Lukas. [p]I mean my tits just about killed me during warmup and the changing room really didn't need mirrors - thank you I know my hips are fat and disgusting - but at least there was Lukas.[/p] Ich meine … meine Titten waren die Hölle beim aufwärmen und die Umkleide hat wirklich keinen Spiegel gebraucht. Vielen Dank, ich brauche keine Erinnerung an meinen fetten Arsch. Aber wenigstens hatte ich Lukas.
188 He was such a huge nerd. He studied math in his third semester and could talk for hours about his passion. [p]He was such a huge nerd. He studied math in his third semester and could talk for hours about his passion. Er war so ein Nerd. Er konnte so gut reden. Über Mathe. Er war in seinem dritten Semester und konnte stundenlang erzählen.
189 Also: my math grades pretty much leaped for my final year in high school thanks to him. Also: my math grades pretty much leaped for my final year in high school thanks to him. Und ich glaube mein Mathe-Abi war bestimmt drei Punkte besser durch ihn.
190 He also helped me so much with jiu jitsu, as he properly floored me when I slipped up. He also helped me so much with jiu jitsu, as he properly floored me when I slipped up.[/p] Und ach bei Jui Jutsu … es hat mir so sehr geholfen, dass er mich einfach anständig hingelegt hat, wenn ich gefailed habe.
191 Also - unlike everyone else - he understood that I didn't want people to mind my chest. [p]Also - unlike everyone else - he understood that I didn't want people to mind my chest. Und er war der einzige, der wirklich verstanden hat, dass mir egal war, ob Leute mir an die Brüste kommen.
192 So Fighting for wins with him was actually rewarding even tho more often than not I ended up having to tap out. So Fighting for wins with him was actually rewarding even tho more often than not I ended up having to tap out. Mit ihm war Kämpfen so gut – auch wenn ich üblicherweise diejenige war, die abschlagen musste und nicht er.
193 We also had my first proper kiss. I thought I loved him. But now? We also had my first proper kiss. I thought I loved him. But now?[/p] Wir hatten auch meinen ersten richtigen Kuss. Ich war so verliebt, und jetzt?
194 He was weird that evening. Even more huggy and hyperactive than usual. [p]He was weird that evening. Even more huggy and hyperactive than usual.[/p] Es war so merkwürdig. Irgendwie noch hibbeliger und näher als so schon.
266
267
268
269
270
271
272
273
274
275
302
303
304
305

View File

@ -1,12 +1,12 @@
class_name CardBoard extends PanelContainer class_name CardBoard extends PanelContainer
#var area_dict = {
# "dropzone_content": [],
# "cards": [],
# "sticky_notes_in_list": [],
# "sticky_note_panels": []
#}
enum {NAVIGATE, ASSIGN, DRAG} enum {NAVIGATE, ASSIGN, DRAG}
enum Error {
OK,
OUT_OF_BOUNDS,
ILLEGAL_STATE,
MISSING
}
var focus_stickies:bool = true: var focus_stickies:bool = true:
set(stickies): set(stickies):
@ -43,7 +43,6 @@ var has_stage = false:
var dropzone_size: Vector2 var dropzone_size: Vector2
@export var dropzone_padding:int = 100 @export var dropzone_padding:int = 100
@onready var sticky_note_container = $HBoxContainer/ScrollContainer/VBoxContainer @onready var sticky_note_container = $HBoxContainer/ScrollContainer/VBoxContainer
@onready var board_of_devs = $"board of devs"
@onready var current_context:int = NAVIGATE: @onready var current_context:int = NAVIGATE:
set(context): set(context):
if current_context == ASSIGN and !context == ASSIGN: if current_context == ASSIGN and !context == ASSIGN:
@ -57,6 +56,7 @@ var dropzone_size: Vector2
# pass # pass
current_context = context current_context = context
@onready var instructions = $instructions_panel/HBoxContainer/cards_remaining @onready var instructions = $instructions_panel/HBoxContainer/cards_remaining
@onready var timer: Timer = $Timer
var mementos_collected: int = 0: var mementos_collected: int = 0:
set(mementos): set(mementos):
@ -110,7 +110,8 @@ var mementos_collected: int = 0:
if sticky_note_container.get_child(i).get_child_count() == 1: if sticky_note_container.get_child(i).get_child_count() == 1:
currently_active_node = sticky_note_container.get_child(i).get_child(0) currently_active_node = sticky_note_container.get_child(i).get_child(0)
var cache: Array = [] var last_save_dict: Dictionary
var text_recovery: Dictionary
signal board_completed signal board_completed
@ -121,14 +122,21 @@ func _ready():
dropzone_size = get_viewport_rect().size - Vector2(dropzone_padding + size_reference.minimum_size.x, dropzone_padding) dropzone_size = get_viewport_rect().size - Vector2(dropzone_padding + size_reference.minimum_size.x, dropzone_padding)
if get_parent() == get_tree().root: if get_parent() == get_tree().root:
populate_board(["c_void", 'c_joy', "p_wet", "p_effort"]) populate_board(["void", 'joy', "wet", "effort"])
populate_board(["c_fighting", 'c_hit', "p_girly", "p_vent"]) populate_board(["jui_jutsu", 'hit', "girly", "vent"])
mementos_collected = 2 mementos_collected = 2
has_stage = has_stage has_stage = has_stage
get_viewport().gui_focus_changed.connect(reclaim_lost_focus) get_viewport().gui_focus_changed.connect(reclaim_lost_focus)
#FIXME properly implement board recovery
#timer.timeout.connect(validate_board)
#timer.start()
#await get_tree().process_frame
#last_save_dict = get_save_dict()
func reclaim_lost_focus(): func reclaim_lost_focus():
if has_stage: if has_stage:
@ -140,34 +148,37 @@ func reclaim_lost_focus():
# currently_active_node.is_dragged = false # currently_active_node.is_dragged = false
# Will be used later to spawn Cards and Post-Its and remember them in the dictionary # Will be used later to spawn Cards and Post-Its and remember them in the dictionary
func populate_board(card_names: Array[String]): func populate_board(card_names: Array[StringName]):
mementos_collected += 1 mementos_collected += 1
var all_new:Dictionary = board_of_devs.get_cards_by_name_array(card_names) var all_new:Dictionary = HardCards.get_cards_by_name_array(card_names)
# spawning the cards and adding them to the dictionary # spawning the cards and adding them to the dictionary
for new_card in all_new["cards"]: for new_card in all_new["cards"]:
add_card(new_card) add_card(new_card, false)
for new_sticky_note in all_new["sticky_notes"]: # spawning a sticky note for new_sticky_note in all_new["sticky_notes"]: # spawning a sticky note
add_sticky_note(new_sticky_note) add_sticky_note(new_sticky_note, false)
#currently_active_node = area_dict["dropzone_content"][0] # set first Card as currently selected node by default #currently_active_node = area_dict["dropzone_content"][0] # set first Card as currently selected node by default
currently_active_node = dropzone.get_child(0) currently_active_node = dropzone.get_child(0)
func add_card(card: Card): func add_card(card: Card, reparent:bool = true):
card.reparent(self) if reparent:
card.reparent(self)
else:
add_child(card)
card.position = Vector2(randi_range(dropzone_padding, dropzone_size.x), randi_range(dropzone_padding, dropzone_size.y)) card.position = Vector2(randi_range(dropzone_padding, dropzone_size.x), randi_range(dropzone_padding, dropzone_size.y))
insert_area(dropzone, card) insert_area(dropzone, card)
card.set_owner(self) card.set_owner(self)
card.is_dragable = true card.is_dragable = true
func add_sticky_note(sticky: StickyNote): func add_sticky_note(sticky: StickyNote, reparent:bool = true):
var new_panel = StickyNotePanel.new() var new_panel = StickyNotePanel.new()
sticky_note_container.add_child(new_panel, true, Node.INTERNAL_MODE_DISABLED) sticky_note_container.add_child(new_panel, true, Node.INTERNAL_MODE_DISABLED)
#WARNING this for some reason would break the tweens #WARNING this for some reason would break the tweens
new_panel.set_owner(self) new_panel.set_owner(self)
sticky.current_handle = self sticky.current_handle = self
new_panel.attatch_sticky_note(sticky, self, false) new_panel.attatch_sticky_note(sticky, self, false, reparent)
# Checks if a Node is currently inside the dropzone # Checks if a Node is currently inside the dropzone
func is_in_dropzone(to_check: Node) -> bool: func is_in_dropzone(to_check: Node) -> bool:
@ -212,9 +223,10 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
return return
else: else:
area.attach_sticky_note(to_handle) area.attach_sticky_note(to_handle)
sticky_note_container.get_child(current_sticky_note_id).clear_if_empty() if sticky_note_container.get_child_count() > 0:
sticky_note_container.get_child(current_sticky_note_id).clear_if_empty()
current_context = NAVIGATE current_context = NAVIGATE
if is_board_complete(): emit_signal("board_completed") if is_board_complete(): board_completed.emit()
return return
else: else:
var i: int = 0 var i: int = 0
@ -234,7 +246,10 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
## Dropping Cards and Sticky Notes not causing a return condition above. ## Dropping Cards and Sticky Notes not causing a return condition above.
if not (to_handle is StickyNote and to_handle.is_sticky_note_attached()): if not (to_handle is StickyNote and to_handle.is_sticky_note_attached()):
insert_area(dropzone, to_handle) if to_handle.get_parent() is Card:
insert_area(to_handle.get_parent().remove_sticky_note(), to_handle)
else:
insert_area(dropzone, to_handle)
current_context = NAVIGATE current_context = NAVIGATE
focus_stickies = false focus_stickies = false
current_dropzone_id = dropzone.get_children().find(to_handle) current_dropzone_id = dropzone.get_children().find(to_handle)
@ -261,8 +276,9 @@ func is_board_complete() -> bool:
func is_board_lore() -> bool: func is_board_lore() -> bool:
for card in dropzone.get_children(): for card in dropzone.get_children():
if card.has_sticky_note_attached(): if card is Card:
if not card.current_sticky_note.is_in_group(card.name): return false if card.has_sticky_note_attached():
if not card.current_sticky_note.sticky_id.contains(card.card_id): return false
return true return true
# Mark area that was hovered over as currently selected # Mark area that was hovered over as currently selected
@ -294,6 +310,9 @@ func insert_area(parent: Control, node: Area2D):
while children[i].global_position.y < node.global_position.y and i+1 < children.size(): while children[i].global_position.y < node.global_position.y and i+1 < children.size():
i+=1 i+=1
parent.move_child(node, i) parent.move_child(node, i)
if node is StickyNote:
node.attached_to = self
# Takes the inputs for control inputs # Takes the inputs for control inputs
func _input(event): func _input(event):
@ -389,7 +408,6 @@ func on_sticky_panel_cleared():
if current_sticky_note_id == sticky_note_container.get_child_count() - 1: if current_sticky_note_id == sticky_note_container.get_child_count() - 1:
current_sticky_note_id -= 1 current_sticky_note_id -= 1
func get_save_dict() -> Dictionary: func get_save_dict() -> Dictionary:
var cards: Dictionary = {} var cards: Dictionary = {}
var stickies: Dictionary = {} var stickies: Dictionary = {}
@ -416,23 +434,92 @@ func get_save_dict() -> Dictionary:
"stickies": stickies "stickies": stickies
} }
func initialise_from_save(savegame: SaveGame): func initialise_from_save(savegame: SaveGame):
last_save_dict = savegame.board_state.duplicate()
if savegame.board_state == {}: return if savegame.board_state == {}: return
var cards: Dictionary = savegame.board_state["cards"] rebuild_from_savedict(savegame.board_state)
var stickies: Dictionary = savegame.board_state["stickies"]
var card_pile = board_of_devs.get_cards_by_name_array(cards.keys() + (stickies.keys())) func rebuild_from_savedict(board_state:Dictionary):
var cards: Dictionary = board_state["cards"]
var stickies: Dictionary = board_state["stickies"]
var card_pile = HardCards.get_cards_by_name_array(cards.keys() + (stickies.keys()))
for card:Card in card_pile["cards"]: for card:Card in card_pile["cards"]:
add_card(card) add_card(card)
card.transform.origin = cards[card.name] # Replacing position reference with card reference! Needed in next loop. card.transform.origin = cards[card.name] # Replacing position reference with card reference! Needed in next loop.
cards[card.name] = card cards[card.name] = card
text_recovery[card.name] = card.text
for sticky:StickyNote in card_pile["sticky_notes"]: for sticky:StickyNote in card_pile["sticky_notes"]:
if stickies[sticky.name] == -1.0: text_recovery[sticky.name] = sticky.text
if stickies[sticky.name] == -1:
add_sticky_note(sticky) add_sticky_note(sticky)
elif stickies[sticky.name] is String: elif stickies[sticky.name] is String:
cards[stickies[sticky.name]].attach_sticky_note(sticky) cards[stickies[sticky.name]].attach_sticky_note(sticky)
else: else:
insert_area(dropzone, sticky) insert_area(dropzone, sticky)
sticky.transform.origin = stickies[sticky.name] sticky.transform.origin = stickies[sticky.name]
func validate_board():
if current_context == NAVIGATE:
var needs_rebuild = false
for node in dropzone.get_children():
if node is Card:
match validate_card(node):
Error.OUT_OF_BOUNDS:
node.position = last_save_dict[node.name]
Error.ILLEGAL_STATE:
needs_rebuild = true
if node is StickyNote:
match validate_sticky(node):
Error.OUT_OF_BOUNDS:
node.position = last_save_dict[node.name]
Error.ILLEGAL_STATE:
needs_rebuild = true
for panel:StickyNotePanel in sticky_note_container.get_children():
if panel.attached_sticky_note != null:
match validate_sticky(panel.attached_sticky_note):
Error.OUT_OF_BOUNDS:
panel.attached_sticky_note.position = panel.ancor_position
Error.ILLEGAL_STATE:
needs_rebuild = true
# FIXME: currently, illegal temporary state exists a lot and needs to be rectified before this can be trusted.
if needs_rebuild and false:
for child in dropzone.get_children(): child.free()
for child in sticky_note_container.get_children(): child.free()
rebuild_from_savedict(last_save_dict)
current_dropzone_id = 0
current_sticky_note_id = 0
focus_stickies = false
current_context = NAVIGATE
else:
last_save_dict = get_save_dict()
func validate_sticky(note: StickyNote) -> CardBoard.Error:
if not get_viewport_rect().has_point(note.get_global_transform().origin):
return Error.OUT_OF_BOUNDS
if note.attached_to is StickyNotePanel:
if note.position != note.attached_to.ancor_position:
return Error.OUT_OF_BOUNDS
if (note.on_board and not is_in_dropzone(note)):
return Error.ILLEGAL_STATE
if not ((note.attached_to == self and dropzone.get_children().has(note)) or note.attached_to == note.get_parent()) or note.shift_tween != null:
return Error.ILLEGAL_STATE
return Error.OK
func validate_card(card: Card) -> CardBoard.Error:
if not is_in_dropzone(card):
return Error.OUT_OF_BOUNDS
if card.get_attached_sticky_note() != card.current_sticky_note:
#push_error("Card %s claims to have %s as current sticky note but has %s attached." % [card.name, card.current_sticky_note, card.get_attached_sticky_note()])
return Error.ILLEGAL_STATE
if not card.owner == self:
return Error.ILLEGAL_STATE
return CardBoard.Error.OK

View File

@ -0,0 +1,46 @@
[gd_resource type="SpriteFrames" load_steps=7 format=3 uid="uid://j7e7me3hl6xt"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="1_l4v2i"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"]
atlas = ExtResource("1_l4v2i")
region = Rect2(0, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("1_l4v2i")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("1_l4v2i")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("1_l4v2i")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("1_l4v2i")
region = Rect2(0, 880, 600, 440)
[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e7401")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

View File

@ -0,0 +1,95 @@
[gd_resource type="SpriteFrames" load_steps=14 format=3 uid="uid://bixem613olfie"]
[ext_resource type="Texture2D" uid="uid://c8ckkjmdegyis" path="res://logic-scenes/board/card-textures/postitsheet.png" id="1_c6eib"]
[sub_resource type="AtlasTexture" id="AtlasTexture_nj16s"]
atlas = ExtResource("1_c6eib")
region = Rect2(0, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_23tiq"]
atlas = ExtResource("1_c6eib")
region = Rect2(500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_aomh0"]
atlas = ExtResource("1_c6eib")
region = Rect2(1000, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_n3svg"]
atlas = ExtResource("1_c6eib")
region = Rect2(1500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_tfg7a"]
atlas = ExtResource("1_c6eib")
region = Rect2(0, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_dtics"]
atlas = ExtResource("1_c6eib")
region = Rect2(500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_e0ocs"]
atlas = ExtResource("1_c6eib")
region = Rect2(1000, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_bpwg2"]
atlas = ExtResource("1_c6eib")
region = Rect2(1500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_xaxol"]
atlas = ExtResource("1_c6eib")
region = Rect2(0, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_ifitb"]
atlas = ExtResource("1_c6eib")
region = Rect2(500, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_6slhe"]
atlas = ExtResource("1_c6eib")
region = Rect2(1000, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_4tk5m"]
atlas = ExtResource("1_c6eib")
region = Rect2(1500, 440, 500, 220)
[resource]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nj16s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_23tiq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aomh0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n3svg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tfg7a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dtics")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e0ocs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bpwg2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xaxol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ifitb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6slhe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4tk5m")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

View File

@ -1,7 +1,10 @@
@tool @tool
extends Area2D extends Area2D
class_name Card class_name Card
var card_id
#FIXME remove this legacy stuff without loosing the evil notes ...
var compatible_sticky_notes: Array[StickyNote] = [] var compatible_sticky_notes: Array[StickyNote] = []
@export var evil_sticky_notes: Array[StickyNote] = [] @export var evil_sticky_notes: Array[StickyNote] = []
var own_sticky_notes: Array[StickyNote] = [] var own_sticky_notes: Array[StickyNote] = []
@ -23,15 +26,9 @@ var transfor_arr: Array[Transform2D] = [
@export var text: String = "" : @export var text: String = "" :
set(value): set(value):
text = value text = value
if get_children() != [] or Engine.is_editor_hint(): _on_text_updated()
$Label.text = value var label:Label
var curr_frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation) var background_sprite: AnimatedSprite2D
$BackgroundSprite.frame = text.hash() % $BackgroundSprite.sprite_frames.get_frame_count($BackgroundSprite.animation)
$Label.rotation = deg_to_rad(transfor_arr[curr_frame].get_rotation())
$Label.position = transfor_arr[curr_frame].origin
if !Engine.is_editor_hint():
wiggle_pos = float(text.hash() % 100)
_handle_wiggle(0)
@export var wiggle_strength: float = 0.2 @export var wiggle_strength: float = 0.2
@export var wiggle_speed: float = 5 @export var wiggle_speed: float = 5
@export_range(1, 2) var scale_bump: float = 1.05 @export_range(1, 2) var scale_bump: float = 1.05
@ -64,8 +61,10 @@ var transfor_arr: Array[Transform2D] = [
@export var voice_line: AudioStream = null @export var voice_line: AudioStream = null
@export var is_dragable: bool = false @export var is_dragable: bool = false
@onready var diameter = $CollisionShape2D.shape.height @export var diameter = 336.0
@onready var sticky_note_anchor: Node2D = %StickyNoteAncor
var sticky_note_position: Vector2 = Vector2(-66, 83)
var collider: Shape2D
var is_dragged: bool = false: var is_dragged: bool = false:
set(dragged): set(dragged):
@ -75,35 +74,66 @@ var is_dragged: bool = false:
var is_mouse_entered: bool = false var is_mouse_entered: bool = false
var mouse_offset: Vector2 var mouse_offset: Vector2
func _ready(): func _init(card_name: String = "card", own_id:StringName = "-1") -> void:
if card_name != "void":
text = card_name
card_id = own_id
name = "c_%s" % card_name
func _ready():
input_event.connect(_on_input_event) input_event.connect(_on_input_event)
mouse_entered.connect(_on_mouse_entered) mouse_entered.connect(_on_mouse_entered)
mouse_exited.connect(_on_mouse_exited) mouse_exited.connect(_on_mouse_exited)
background_sprite = AnimatedSprite2D.new()
background_sprite.sprite_frames = preload("res://logic-scenes/board/card-textures/card-sprites.tres")
add_child(background_sprite, false, Node.INTERNAL_MODE_BACK)
label = Label.new()
label.theme_type_variation = "card_text"
add_child(label, false, Node.INTERNAL_MODE_BACK)
label.size = Vector2(273.0, 131.0)
label.position = Vector2(-135.0, -82.0)
label.autowrap_mode = TextServer.AUTOWRAP_WORD
var collision_shape: = CollisionShape2D.new()
collider = CapsuleShape2D.new()
collider.height = diameter
collider.radius = 110
collision_shape.shape = collider
add_child(collision_shape, false, Node.INTERNAL_MODE_BACK)
collision_shape.rotation = PI/2
_handle_wiggle(0) _handle_wiggle(0)
if not Engine.is_editor_hint() and is_inside_tree():
for sticky_note in self.get_children():
if sticky_note is StickyNote: self.own_sticky_notes.append(sticky_note as StickyNote)
for sticky_note in get_tree().get_nodes_in_group(name):
if sticky_note is StickyNote: self.compatible_sticky_notes.append(sticky_note as StickyNote)
compatible_sticky_notes.append_array(own_sticky_notes) _on_text_updated()
func _on_text_updated():
if is_node_ready():
var curr_frame = text.hash() % background_sprite.sprite_frames.get_frame_count(background_sprite.animation)
background_sprite.frame = curr_frame
background_sprite.scale = Vector2(0.6, 0.6)
if own_sticky_notes.size() == 2: if text == "":
own_sticky_notes[0].sibling = own_sticky_notes[1] if background_sprite.get_child_count() == 0:
own_sticky_notes[1].sibling = own_sticky_notes[0] background_sprite.add_child(load("res://logic-scenes/board/void_stuff.tscn").instantiate(), false, Node.INTERNAL_MODE_DISABLED)
background_sprite.clip_children = CanvasItem.CLIP_CHILDREN_AND_DRAW
else:
if background_sprite.get_child_count() > 0:
background_sprite.get_child(0).queue_free()
%BackgroundSprite.frame = text.hash() % %BackgroundSprite.sprite_frames.get_frame_count(%BackgroundSprite.animation) label.text = text
$Label.text = self.text
wiggle_pos = float(text.hash() % 100)
$Label.theme = State.current_main_theme
State.theme_changed.connect(func change_theme(new_theme): $Label.theme = new_theme) label.rotation = deg_to_rad(transfor_arr[curr_frame].get_rotation())
label.position = transfor_arr[curr_frame].origin
wiggle_pos = float(text.hash() % 100)
if not Engine.is_editor_hint(): if not Engine.is_editor_hint():
_handle_wiggle(0) _handle_wiggle(0)
func _process(delta: float) -> void: func _process(delta: float) -> void:
if highlighted: if highlighted:
@ -120,9 +150,6 @@ func _process(delta: float) -> void:
_move_card() _move_card()
func get_text() -> String:
return $Label.text
func _handle_wiggle(delta): func _handle_wiggle(delta):
wiggle_pos += delta * wiggle_speed * wiggle_intensity wiggle_pos += delta * wiggle_speed * wiggle_intensity
@ -141,12 +168,6 @@ func _input(event: InputEvent) -> void:
if event.button_index == MOUSE_BUTTON_LEFT and not event.pressed: if event.button_index == MOUSE_BUTTON_LEFT and not event.pressed:
is_dragged = false is_dragged = false
func _on_focus_entered():
print(self, "is focused")
func _on_focus_exited():
print(self, "is not focused")
func _on_mouse_entered(): func _on_mouse_entered():
is_mouse_entered = true is_mouse_entered = true
if not Input.is_action_pressed("mouse_left"): if not Input.is_action_pressed("mouse_left"):
@ -180,26 +201,26 @@ func _move_card():
position += (get_viewport().get_mouse_position() - position) - mouse_offset position += (get_viewport().get_mouse_position() - position) - mouse_offset
func has_sticky_note_attached() -> bool: func has_sticky_note_attached() -> bool:
return sticky_note_anchor.get_child_count() > 0 return get_child_count(false) > 0
func get_attached_sticky_note() -> StickyNote: func get_attached_sticky_note() -> StickyNote:
return null if not has_sticky_note_attached() else sticky_note_anchor.get_child(0) return null if not has_sticky_note_attached() else get_child(0)
func preview_sticky_note(sticky_note: StickyNote): func preview_sticky_note(sticky_note: StickyNote):
sticky_note.reparent(self.get_parent()) sticky_note.reparent(self.get_parent())
sticky_note.attached_to = self sticky_note.attached_to = self
sticky_note.tween_transform_to(Transform2D(0, sticky_note_anchor.global_position + 0 * Vector2(sticky_note.diameter, sticky_note.diameter))) sticky_note.tween_transform_to(Transform2D(0, global_position + sticky_note_position + 0 * Vector2(sticky_note.diameter, sticky_note.diameter)))
func attach_sticky_note(sticky_note: StickyNote) -> bool: func attach_sticky_note(sticky_note: StickyNote) -> bool:
if has_sticky_note_attached(): if has_sticky_note_attached():
return false return false
sticky_note.reparent(sticky_note_anchor) sticky_note.reparent(self)
sticky_note.position = Vector2.ZERO sticky_note.position = sticky_note_position
sticky_note.on_board = false sticky_note.on_board = false
current_sticky_note = sticky_note current_sticky_note = sticky_note
sticky_note.attached_to = self sticky_note.attached_to = self
if name == "c_hit" and sticky_note.name == "p_effort": if text == "hit" and sticky_note.text == "effort":
Steam.setAchievement("FIGHT_FOR_GOOD") Steam.setAchievement("FIGHT_FOR_GOOD")
Steam.storeStats() Steam.storeStats()
@ -212,7 +233,7 @@ func remove_sticky_note() -> StickyNote:
former_child.reparent(get_parent()) former_child.reparent(get_parent())
former_child.owner = self.owner former_child.owner = self.owner
former_child.on_board = true former_child.on_board = true
former_child.attached_to = null former_child.attached_to = owner
return former_child return former_child
func exchange_sticky_note_with(new_note: StickyNote) -> StickyNote: func exchange_sticky_note_with(new_note: StickyNote) -> StickyNote:
@ -227,7 +248,7 @@ func check_hover():
func reclaim_sticky_note(): func reclaim_sticky_note():
current_sticky_note.on_board = false current_sticky_note.on_board = false
current_sticky_note.tween_transform_to(sticky_note_anchor.global_transform) current_sticky_note.tween_transform_to(Transform2D(0, to_global(sticky_note_position)))
await current_sticky_note.transform_tween_finished await current_sticky_note.transform_tween_finished
current_sticky_note.reparent(self) current_sticky_note.reparent(self)
current_sticky_note.owner = self.owner current_sticky_note.owner = self.owner

View File

@ -1 +1 @@
uid://wv72dum1fe72 uid://2loic2eeec5b

View File

@ -1,89 +1,8 @@
[gd_scene load_steps=11 format=3 uid="uid://dy5rd437h5hsw"] [gd_scene load_steps=2 format=3 uid="uid://dy5rd437h5hsw"]
[ext_resource type="Script" uid="uid://wv72dum1fe72" path="res://logic-scenes/board/card.gd" id="1_emip0"] [ext_resource type="Script" uid="uid://2loic2eeec5b" path="res://logic-scenes/board/card.gd" id="1_emip0"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_ioijn"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/handwriting.theme" id="3_1x4uh"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_foovg"]
radius = 110.0
height = 336.0
[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("2_ioijn")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("2_ioijn")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("2_ioijn")
region = Rect2(0, 880, 600, 440)
[sub_resource type="SpriteFrames" id="SpriteFrames_ckivt"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e7401")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="card" type="Area2D"] [node name="card" type="Area2D"]
script = ExtResource("1_emip0") script = ExtResource("1_emip0")
text = "asdf"
metadata/type = "card" metadata/type = "card"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.0713516, 0.997451)
rotation = 1.5708
shape = SubResource("CapsuleShape2D_foovg")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="."]
unique_name_in_owner = true
clip_children = 2
scale = Vector2(0.6, 0.6)
sprite_frames = SubResource("SpriteFrames_ckivt")
frame = 1
[node name="Label" type="Label" parent="."]
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -126.0
offset_top = -77.0
offset_right = 128.0
offset_bottom = 88.0
grow_horizontal = 2
grow_vertical = 2
rotation = 0.00872665
theme = ExtResource("3_1x4uh")
theme_type_variation = &"card_text"
autowrap_mode = 3
[node name="StickyNoteAncor" type="Node2D" parent="."]
unique_name_in_owner = true
position = Vector2(-66, 83)

View File

@ -19,24 +19,32 @@ func _ready():
custom_minimum_size = Vector2(custom_minimum_size.x, 0) custom_minimum_size = Vector2(custom_minimum_size.x, 0)
var is_attatching: bool = false var is_attatching: bool = false
func attatch_sticky_note(attatchment: StickyNote, custom_owner: Node, tween:bool = true): func attatch_sticky_note(attatchment: StickyNote, custom_owner: Node, tween:bool = true, reparent:bool = true):
is_attatching = true is_attatching = true
attatchment.on_board = false attatchment.on_board = false
attached_sticky_note = attatchment attached_sticky_note = attatchment
attatchment.attached_to = self attatchment.attached_to = null
if tween: if tween:
await get_tree().process_frame await get_tree().process_frame
var height_tween: Tween = create_tween() var height_tween: Tween = create_tween()
height_tween.tween_property(self, "custom_minimum_size", minimum_size, 0.1) height_tween.tween_property(self, "custom_minimum_size", minimum_size, 0.1)
attatchment.tween_transform_to(Transform2D(0, get_screen_position() + ancor_position - Vector2(0, minimum_size.y))) attatchment.tween_transform_to(Transform2D(0, get_screen_position() + ancor_position - Vector2(0, minimum_size.y)))
await attatchment.transform_tween_finished await attatchment.transform_tween_finished
await get_tree().process_frame
attatchment.reparent(self)
attatchment.position = ancor_position
else: else:
custom_minimum_size = minimum_size custom_minimum_size = minimum_size
attatchment.reparent(self) if reparent:
attatchment.reparent(self)
else:
add_child(attatchment)
attatchment.position = ancor_position
is_attatching = false is_attatching = false
attatchment.owner = custom_owner attatchment.owner = custom_owner
attatchment.position = ancor_position attatchment.attached_to = self
attatchment.current_handle = custom_owner attatchment.current_handle = custom_owner
var is_gapped: bool = false var is_gapped: bool = false
func create_gap(): func create_gap():

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=10 format=3 uid="uid://bnskiyx1sksww"] [gd_scene load_steps=9 format=3 uid="uid://bnskiyx1sksww"]
[ext_resource type="Texture2D" uid="uid://bi3xqdknw5tpe" path="res://logic-scenes/board/board-texture/Cork002_2K_Color.png" id="1_8brxc"] [ext_resource type="Texture2D" uid="uid://bi3xqdknw5tpe" path="res://logic-scenes/board/board-texture/Cork002_2K_Color.png" id="1_8brxc"]
[ext_resource type="Shader" uid="uid://kyd37e0s6fdu" path="res://logic-scenes/board/physics-board.gdshader" id="1_ggnth"] [ext_resource type="Shader" uid="uid://kyd37e0s6fdu" path="res://logic-scenes/board/physics-board.gdshader" id="1_ggnth"]
[ext_resource type="Script" uid="uid://cqsor57nvowni" path="res://logic-scenes/board/card-board.gd" id="3_8v4c4"] [ext_resource type="Script" uid="uid://cqsor57nvowni" path="res://logic-scenes/board/card-board.gd" id="3_8v4c4"]
[ext_resource type="PackedScene" uid="uid://bvowj4l8dtceu" path="res://dev-util/board of devs.tscn" id="4_sskx2"]
[ext_resource type="Script" uid="uid://ddy8kb2hjvgss" path="res://logic-scenes/board/card collider.gd" id="6_wpxls"] [ext_resource type="Script" uid="uid://ddy8kb2hjvgss" path="res://logic-scenes/board/card collider.gd" id="6_wpxls"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_ttqei"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_ttqei"]
@ -49,11 +48,6 @@ horizontal_scroll_mode = 0
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/ScrollContainer"] [node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/ScrollContainer"]
layout_mode = 2 layout_mode = 2
[node name="board of devs" parent="." instance=ExtResource("4_sskx2")]
process_mode = 4
visible = false
layout_mode = 2
[node name="up" type="Control" parent="."] [node name="up" type="Control" parent="."]
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
@ -132,3 +126,5 @@ vertical_alignment = 1
[node name="VSeparator" type="VSeparator" parent="instructions_panel/HBoxContainer"] [node name="VSeparator" type="VSeparator" parent="instructions_panel/HBoxContainer"]
custom_minimum_size = Vector2(15, 0) custom_minimum_size = Vector2(15, 0)
layout_mode = 2 layout_mode = 2
[node name="Timer" type="Timer" parent="."]

View File

@ -2,6 +2,10 @@
extends Area2D extends Area2D
class_name StickyNote class_name StickyNote
var sticky_id
var parent_id
var sibling: StickyNote var sibling: StickyNote
var shift_tween: Tween var shift_tween: Tween
var modulate_tween: Tween var modulate_tween: Tween
@ -14,15 +18,18 @@ var attached_to: Node = null:
# cannot be explicitly typed, as this can be bnoth handled by picker and physics-board # cannot be explicitly typed, as this can be bnoth handled by picker and physics-board
var current_handle: Node var current_handle: Node
var position_locked: bool = false
signal transform_tween_finished signal transform_tween_finished
@export var text: String = "" : @export var text: String = "" :
set (value): set (value):
if is_inside_tree() or Engine.is_editor_hint(): if is_node_ready():
$Content/Label.text = value _on_text_updated()
$Content/BackgroundSprite.frame = text.hash() % $Content/BackgroundSprite.sprite_frames.get_frame_count($Content/BackgroundSprite.animation)
text = value text = value
var content: Node2D
var label: Label
var background_sprite: AnimatedSprite2D
@export var shift_by: Vector2 = Vector2(-32, 0) @export var shift_by: Vector2 = Vector2(-32, 0)
@export_color_no_alpha var highlight_color: Color = Color(1.5, 1.5, 1.5) @export_color_no_alpha var highlight_color: Color = Color(1.5, 1.5, 1.5)
@ -38,12 +45,12 @@ signal transform_tween_finished
modulate_tween = get_tree().create_tween() modulate_tween = get_tree().create_tween()
modulate_tween.tween_property(self, "modulate", highlight_color, 0.1) modulate_tween.tween_property(self, "modulate", highlight_color, 0.1)
shift_tween = get_tree().create_tween() shift_tween = get_tree().create_tween()
shift_tween.tween_property($Content, "position", shift_by, 0.2) shift_tween.tween_property(content, "position", shift_by, 0.2)
else: else:
modulate_tween = get_tree().create_tween() modulate_tween = get_tree().create_tween()
modulate_tween.tween_property(self, "modulate", Color(1, 1, 1), 0.3) modulate_tween.tween_property(self, "modulate", Color(1, 1, 1), 0.3)
shift_tween = get_tree().create_tween() shift_tween = get_tree().create_tween()
shift_tween.tween_property($Content, "position", Vector2.ZERO, 0.5) shift_tween.tween_property(content, "position", Vector2.ZERO, 0.5)
else: else:
if highlighted: if highlighted:
modulate = Color(1, 1, 1) modulate = Color(1, 1, 1)
@ -63,12 +70,48 @@ var is_dragged: bool = false:
var initial_drag_position: Vector2 var initial_drag_position: Vector2
var mouse_diff: Vector2 var mouse_diff: Vector2
@onready var diameter = $CollisionShape2D.shape.height @onready var diameter = 312.0
@export_range(1.0, 10.0) var bounce_speed: float = 8 @export_range(1.0, 10.0) var bounce_speed: float = 8
var on_board: bool = false var on_board: bool = false
func _init(sticky_name: String = "card", card_id: StringName = "-1", own_id:StringName = "-1") -> void:
text = sticky_name
parent_id = card_id
sticky_id = own_id
func _ready() -> void: func _ready() -> void:
if get_child_count() == 0:
content = Node2D.new()
add_child(content, false, Node.INTERNAL_MODE_BACK)
label = Label.new()
label.autowrap_mode = TextServer.AUTOWRAP_WORD
label.size = Vector2( 295.0, 97.0 )
label.position = Vector2( -52.0, -50.0 )
label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
#FIXME eventually replace with better theme handling
label.theme = State.current_main_theme
State.theme_changed.connect(func change_theme(new_theme): label.theme = new_theme)
content.add_child(label, false, Node.INTERNAL_MODE_BACK)
background_sprite = AnimatedSprite2D.new()
background_sprite.sprite_frames = preload("res://logic-scenes/board/card-textures/sticky-note_sprites.tres")
background_sprite.scale = Vector2(0.65, 0.65)
background_sprite.position = Vector2(99.5, 0)
content.add_child(background_sprite, false, Node.INTERNAL_MODE_FRONT)
var collision_shape := CollisionShape2D.new()
var capsule := CapsuleShape2D.new()
capsule.radius = 48.0
capsule.height = diameter
collision_shape.shape = capsule
add_child(collision_shape, false, Node.INTERNAL_MODE_FRONT)
collision_shape.position.x = 99.5
collision_shape.rotation = PI/2
label.theme_type_variation = "card_text"
else:
label = $Content/Label
background_sprite = $Content/BackgroundSprite
content = $Content
_on_text_updated()
input_event.connect(_on_input_event) input_event.connect(_on_input_event)
mouse_entered.connect(_on_mouse_entered) mouse_entered.connect(_on_mouse_entered)
@ -76,11 +119,11 @@ func _ready() -> void:
area_entered.connect(_on_area_enter) area_entered.connect(_on_area_enter)
area_exited.connect(_on_area_exit) area_exited.connect(_on_area_exit)
$Content/Label.text = self.text
$Content/BackgroundSprite.frame = text.hash() % $Content/BackgroundSprite.sprite_frames.get_frame_count($Content/BackgroundSprite.animation)
$Content/Label.theme = State.current_main_theme
State.theme_changed.connect(func change_theme(new_theme): $Content/Label.theme = new_theme) func _on_text_updated():
label.text = text
background_sprite.frame = text.hash() % background_sprite.sprite_frames.get_frame_count(background_sprite.animation)
func replace_with(sticky_note: StickyNote): func replace_with(sticky_note: StickyNote):
self.text = sticky_note.text self.text = sticky_note.text
@ -107,8 +150,9 @@ func _process(delta: float) -> void:
func _on_mouse_entered(): func _on_mouse_entered():
if not Input.is_action_pressed("mouse_left"): if not Input.is_action_pressed("mouse_left"):
highlighted = true highlighted = true
if "handle_hover" in current_handle: if current_handle != null:
current_handle.handle_hover(self) if "handle_hover" in current_handle:
current_handle.handle_hover(self)
func _on_mouse_exited(): func _on_mouse_exited():
if not is_dragged: if not is_dragged:
@ -136,7 +180,7 @@ func _on_area_exit(card: Area2D):
card.highlighted = false card.highlighted = false
if hovering_cards == []: if hovering_cards == []:
hover_pos_shift = 0 hover_pos_shift = 0
$Content.position = Vector2.ZERO content.position = Vector2.ZERO
elif card is StickyNote and is_sticky_note_in_panel(): elif card is StickyNote and is_sticky_note_in_panel():
attached_to.collapse_gap() attached_to.collapse_gap()
@ -160,7 +204,7 @@ func _move_sticky_note():
if (closest.position - position).length() > (closest.position - position).length(): if (closest.position - position).length() > (closest.position - position).length():
card = closest card = closest
closest.highlighted = true closest.highlighted = true
$Content.position = (closest.sticky_note_anchor.global_position - global_position) * hover_pos_shift content.position = (closest.sticky_note_anchor.global_position - global_position) * hover_pos_shift
func is_sticky_note_attached() -> bool: func is_sticky_note_attached() -> bool:
return attached_to is Card return attached_to is Card
@ -172,8 +216,11 @@ func tween_transform_to(target: Transform2D):
var transform_tween: Tween = create_tween() var transform_tween: Tween = create_tween()
transform_tween.tween_property(self, "transform", target, 0.25) transform_tween.tween_property(self, "transform", target, 0.25)
await transform_tween.finished await transform_tween.finished
emit_signal("transform_tween_finished") transform_tween_finished.emit()
func reset_drag(): func reset_drag():
if attached_to != null: if attached_to != null:
attached_to.reclaim_sticky_note() attached_to.reclaim_sticky_note()
func free() -> void:
assert(false)

View File

@ -1,107 +1,16 @@
[gd_scene load_steps=18 format=3 uid="uid://vkcdj8c3ytbq"] [gd_scene load_steps=5 format=3 uid="uid://vkcdj8c3ytbq"]
[ext_resource type="Script" uid="uid://r12efqgk6t4n" path="res://logic-scenes/board/sticky-note.gd" id="1_yvh5n"] [ext_resource type="Script" uid="uid://r12efqgk6t4n" path="res://logic-scenes/board/sticky-note.gd" id="1_yvh5n"]
[ext_resource type="Texture2D" uid="uid://c8ckkjmdegyis" path="res://logic-scenes/board/card-textures/postitsheet.png" id="2_j17jn"] [ext_resource type="SpriteFrames" uid="uid://bixem613olfie" path="res://logic-scenes/board/card-textures/sticky-note_sprites.tres" id="2_260t4"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/handwriting.theme" id="3_qmm0h"] [ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/handwriting.theme" id="3_qmm0h"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ml4q7"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_ml4q7"]
radius = 48.0 radius = 48.0
height = 312.0 height = 312.0
[sub_resource type="AtlasTexture" id="AtlasTexture_nj16s"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_23tiq"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_aomh0"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_n3svg"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 0, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_tfg7a"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_dtics"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_e0ocs"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_bpwg2"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 220, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_xaxol"]
atlas = ExtResource("2_j17jn")
region = Rect2(0, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_ifitb"]
atlas = ExtResource("2_j17jn")
region = Rect2(500, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_6slhe"]
atlas = ExtResource("2_j17jn")
region = Rect2(1000, 440, 500, 220)
[sub_resource type="AtlasTexture" id="AtlasTexture_4tk5m"]
atlas = ExtResource("2_j17jn")
region = Rect2(1500, 440, 500, 220)
[sub_resource type="SpriteFrames" id="SpriteFrames_2amsi"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nj16s")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_23tiq")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_aomh0")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_n3svg")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_tfg7a")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dtics")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_e0ocs")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_bpwg2")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xaxol")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ifitb")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_6slhe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4tk5m")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]
[node name="sticky-note" type="Area2D"] [node name="sticky-note" type="Area2D"]
script = ExtResource("1_yvh5n") script = ExtResource("1_yvh5n")
text = "card"
highlight_color = Color(1.2, 1.2, 1.2, 1) highlight_color = Color(1.2, 1.2, 1.2, 1)
metadata/type = "sticky-note" metadata/type = "sticky-note"
@ -115,8 +24,8 @@ shape = SubResource("CapsuleShape2D_ml4q7")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="Content"] [node name="BackgroundSprite" type="AnimatedSprite2D" parent="Content"]
position = Vector2(99.5, 0) position = Vector2(99.5, 0)
scale = Vector2(0.65, 0.65) scale = Vector2(0.65, 0.65)
sprite_frames = SubResource("SpriteFrames_2amsi") sprite_frames = ExtResource("2_260t4")
frame = 5 frame = 3
[node name="Label" type="Label" parent="Content"] [node name="Label" type="Label" parent="Content"]
anchors_preset = 8 anchors_preset = 8
@ -132,5 +41,6 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme = ExtResource("3_qmm0h") theme = ExtResource("3_qmm0h")
theme_type_variation = &"card_text" theme_type_variation = &"card_text"
text = "card"
vertical_alignment = 1 vertical_alignment = 1
autowrap_mode = 3 autowrap_mode = 3

View File

@ -6,6 +6,8 @@ input_name = "color"
[resource] [resource]
code = "shader_type canvas_item; code = "shader_type canvas_item;
render_mode blend_mix;
@ -20,7 +22,6 @@ void fragment() {
} }
" "
graph_offset = Vector2(-496.091, 53.946)
mode = 1 mode = 1
flags/light_only = false flags/light_only = false
nodes/fragment/2/node = SubResource("VisualShaderNodeInput_i5j4e") nodes/fragment/2/node = SubResource("VisualShaderNodeInput_i5j4e")

View File

@ -1,12 +1,10 @@
[gd_scene load_steps=21 format=3 uid="uid://dp4eps03igd3w"] [gd_scene load_steps=12 format=3 uid="uid://vqwep0whfb0o"]
[ext_resource type="Script" uid="uid://wv72dum1fe72" path="res://logic-scenes/board/card.gd" id="1_6ceun"] [ext_resource type="Script" uid="uid://2loic2eeec5b" path="res://logic-scenes/board/card.gd" id="1_6ceun"]
[ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_buevv"] [ext_resource type="Texture2D" uid="uid://sv0nhkkur1tt" path="res://logic-scenes/board/card-textures/cardsheet.png" id="2_buevv"]
[ext_resource type="Texture2D" uid="uid://kpmk21d8rlso" path="res://logic-scenes/board/particle_textures/star.png" id="3_8wu8j"] [ext_resource type="PackedScene" path="res://logic-scenes/board/void_stuff.tscn" id="3_ipd1f"]
[ext_resource type="Theme" uid="uid://b056fn288p8ha" path="res://logic-scenes/themes/handwriting.theme" id="3_mi4ah"]
[ext_resource type="Texture2D" uid="uid://bqilajx05t0eb" path="res://logic-scenes/board/particle_textures/void_nomotion.png" id="4_jam8u"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_foovg"] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_aqrbw"]
radius = 110.0 radius = 110.0
height = 336.0 height = 336.0
@ -37,111 +35,58 @@ func _process(delta):
else: position = initial_position else: position = initial_position
" "
[sub_resource type="AtlasTexture" id="AtlasTexture_ykk13"] [sub_resource type="AtlasTexture" id="AtlasTexture_aqrbw"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_l43eo"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_x2vcn"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_e7401"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_j7wh6"]
atlas = ExtResource("2_buevv") atlas = ExtResource("2_buevv")
region = Rect2(0, 880, 600, 440) region = Rect2(0, 880, 600, 440)
[sub_resource type="SpriteFrames" id="SpriteFrames_ckivt"] [sub_resource type="AtlasTexture" id="AtlasTexture_e20ok"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_onstk"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 440, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_mtvrf"]
atlas = ExtResource("2_buevv")
region = Rect2(600, 0, 600, 440)
[sub_resource type="AtlasTexture" id="AtlasTexture_inyug"]
atlas = ExtResource("2_buevv")
region = Rect2(0, 0, 600, 440)
[sub_resource type="SpriteFrames" id="SpriteFrames_cu2at"]
animations = [{ animations = [{
"frames": [{ "frames": [{
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_ykk13") "texture": SubResource("AtlasTexture_aqrbw")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_l43eo") "texture": SubResource("AtlasTexture_e20ok")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_x2vcn") "texture": SubResource("AtlasTexture_onstk")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_e7401") "texture": SubResource("AtlasTexture_mtvrf")
}, { }, {
"duration": 1.0, "duration": 1.0,
"texture": SubResource("AtlasTexture_j7wh6") "texture": SubResource("AtlasTexture_inyug")
}], }],
"loop": true, "loop": true,
"name": &"default", "name": &"default",
"speed": 5.0 "speed": 5.0
}] }]
[sub_resource type="Gradient" id="Gradient_v70nd"] [node name="c_void" type="Area2D"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.0529197, 0.191606, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.491329, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxq8p"]
gradient = SubResource("Gradient_v70nd")
[sub_resource type="Curve" id="Curve_q6cmf"]
_data = [Vector2(0, 0), 0.0, 3.16529, 0, 0, Vector2(0.241056, 0.191336), 0.132446, 0.132446, 0, 0, Vector2(1, 1), 3.94797, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_cg0w1"]
curve = SubResource("Curve_q6cmf")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_by44l"]
particle_flag_disable_z = true
emission_shape = 6
emission_ring_axis = Vector3(0, 0, 1)
emission_ring_height = 0.0
emission_ring_radius = 180.0
emission_ring_inner_radius = 185.0
emission_ring_cone_angle = 90.0
spread = 180.0
initial_velocity_min = -10.0
initial_velocity_max = 10.0
angular_velocity_min = -150.0
angular_velocity_max = -150.0
gravity = Vector3(0, 0, 0)
radial_accel_min = -20.0
radial_accel_max = -5.0
tangential_accel_min = 20.0
tangential_accel_max = 30.0
attractor_interaction_enabled = false
scale_min = 3.0
scale_max = 5.0
scale_curve = SubResource("CurveTexture_cg0w1")
color_ramp = SubResource("GradientTexture1D_xxq8p")
turbulence_noise_strength = 0.1
[sub_resource type="GDScript" id="GDScript_vjwk7"]
script/source = "extends GPUParticles2D
func _process(_delta):
self.visible = !State.reduce_motion
"
[sub_resource type="GDScript" id="GDScript_tgc0b"]
script/source = "extends Sprite2D
func _process(_delta):
self.visible = State.reduce_motion
"
[node name="card" type="Area2D"]
script = ExtResource("1_6ceun") script = ExtResource("1_6ceun")
text = "card"
metadata/type = "card" metadata/type = "card"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-0.0713516, 0.997451) position = Vector2(-0.0713516, 0.997451)
rotation = 1.5708 rotation = 1.5708
shape = SubResource("CapsuleShape2D_foovg") shape = SubResource("CapsuleShape2D_aqrbw")
[node name="Visual" type="Node2D" parent="."] [node name="Visual" type="Node2D" parent="."]
scale = Vector2(0.6, 0.6) scale = Vector2(0.6, 0.6)
@ -150,25 +95,10 @@ script = SubResource("GDScript_8bs16")
[node name="BackgroundSprite" type="AnimatedSprite2D" parent="Visual"] [node name="BackgroundSprite" type="AnimatedSprite2D" parent="Visual"]
unique_name_in_owner = true unique_name_in_owner = true
clip_children = 2 clip_children = 2
sprite_frames = SubResource("SpriteFrames_ckivt") sprite_frames = SubResource("SpriteFrames_cu2at")
frame = 1 frame = 1
[node name="GPUParticles2D" type="GPUParticles2D" parent="Visual/BackgroundSprite"] [node name="void_stuff" parent="Visual/BackgroundSprite" instance=ExtResource("3_ipd1f")]
amount = 500
process_material = SubResource("ParticleProcessMaterial_by44l")
texture = ExtResource("3_8wu8j")
lifetime = 2.5
speed_scale = 1.3
explosiveness = 0.2
randomness = 0.14
local_coords = true
script = SubResource("GDScript_vjwk7")
[node name="Sprite2D" type="Sprite2D" parent="Visual/BackgroundSprite"]
visible = false
scale = Vector2(0.4, 0.4)
texture = ExtResource("4_jam8u")
script = SubResource("GDScript_tgc0b")
[node name="StickyNoteAncor" type="Node2D" parent="Visual/BackgroundSprite"] [node name="StickyNoteAncor" type="Node2D" parent="Visual/BackgroundSprite"]
unique_name_in_owner = true unique_name_in_owner = true
@ -187,6 +117,4 @@ offset_right = 127.0
offset_bottom = 82.5 offset_bottom = 82.5
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
theme = ExtResource("3_mi4ah")
theme_type_variation = &"card_text"
autowrap_mode = 3 autowrap_mode = 3

View File

@ -0,0 +1,100 @@
[gd_scene load_steps=9 format=3 uid="uid://b2st6v25p0ley"]
[ext_resource type="Texture2D" uid="uid://kpmk21d8rlso" path="res://logic-scenes/board/particle_textures/star.png" id="1_kbpjt"]
[ext_resource type="Texture2D" uid="uid://bqilajx05t0eb" path="res://logic-scenes/board/particle_textures/void_nomotion.png" id="2_5si5k"]
[sub_resource type="GDScript" id="GDScript_kbpjt"]
script/source = "extends Node2D
@onready var particles = $GPUParticles2D
@onready var sprite = $Sprite2D
@onready var initial_position = position
@onready var parent
var noise_position = randf()
var noise: Noise = FastNoiseLite.new()
func _ready() -> void:
State.settings_changed.connect(_on_settings_updated)
parent = get_parent()
func _process(delta):
if not State.reduce_motion:
noise_position += delta * 10
var random_position = Vector2(noise.get_noise_1d(noise_position*2), noise.get_noise_1d(-noise_position))
random_position = random_position.normalized() * pow(random_position.length()*2, 3) * 5
parent.position = initial_position - random_position
parent.rotation = noise.get_noise_1d(noise_position*10) * random_position.length() * 0.01
particles.position = random_position
else: position = initial_position
func _on_settings_updated():
particles.visible = !State.reduce_motion
sprite.visible = State.reduce_motion
"
[sub_resource type="Gradient" id="Gradient_v70nd"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.0529197, 0.191606, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0.491329, 1, 1, 1, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_xxq8p"]
gradient = SubResource("Gradient_v70nd")
[sub_resource type="Curve" id="Curve_q6cmf"]
_data = [Vector2(0, 0), 0.0, 3.16529, 0, 0, Vector2(0.241056, 0.191336), 0.132446, 0.132446, 0, 0, Vector2(1, 1), 3.94797, 0.0, 0, 0]
point_count = 3
[sub_resource type="CurveTexture" id="CurveTexture_cg0w1"]
curve = SubResource("Curve_q6cmf")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_by44l"]
particle_flag_disable_z = true
emission_shape = 6
emission_ring_axis = Vector3(0, 0, 1)
emission_ring_height = 0.0
emission_ring_radius = 180.0
emission_ring_inner_radius = 185.0
emission_ring_cone_angle = 90.0
spread = 180.0
initial_velocity_min = -10.0
initial_velocity_max = 10.0
angular_velocity_min = -150.0
angular_velocity_max = -150.0
gravity = Vector3(0, 0, 0)
radial_accel_min = -20.0
radial_accel_max = -5.0
tangential_accel_min = 20.0
tangential_accel_max = 30.0
attractor_interaction_enabled = false
scale_min = 3.0
scale_max = 5.0
scale_curve = SubResource("CurveTexture_cg0w1")
color_ramp = SubResource("GradientTexture1D_xxq8p")
turbulence_noise_strength = 0.1
[node name="void_stuff" type="Node2D"]
script = SubResource("GDScript_kbpjt")
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
amount = 500
texture = ExtResource("1_kbpjt")
lifetime = 2.5
speed_scale = 1.3
explosiveness = 0.2
randomness = 0.14
local_coords = true
process_material = SubResource("ParticleProcessMaterial_by44l")
[node name="Sprite2D" type="Sprite2D" parent="."]
visible = false
scale = Vector2(0.4, 0.4)
texture = ExtResource("2_5si5k")

View File

@ -11,8 +11,6 @@ enum {
DONE DONE
} }
@onready var source_board:Control = $"board of devs"
var has_stage = false: var has_stage = false:
set(focus): set(focus):
if not focus == has_stage: if not focus == has_stage:
@ -78,12 +76,12 @@ func reset():
for player in anim_players: player.play("reveal") for player in anim_players: player.play("reveal")
func fill_card_slots(id: int): func fill_card_slots(id: int):
var new_cards = source_board.get_cards_by_scene_id(id) var new_cards = HardCards.get_cards_by_scene_id(id)
for i in range(new_cards.size()): for i in range(new_cards.size()):
$cards.get_child(i).remove_child($cards.get_child(i).get_child(1)) $cards.get_child(i).remove_child($cards.get_child(i).get_child(1))
var new_card:Card = new_cards[i] var new_card:Card = new_cards[i]
new_card.reparent($cards.get_child(i), false) $cards.get_child(i).add_child(new_card)
new_card.owner = self new_card.owner = self
new_card.connect("mouse_entered", Callable(self, "get_highlight")) new_card.connect("mouse_entered", Callable(self, "get_highlight"))
@ -93,8 +91,8 @@ func fill_card_slots(id: int):
func fill_post_slots(): func fill_post_slots():
var sticky_notes: Array[StickyNote] = [] var sticky_notes: Array[StickyNote] = []
for card in output: for card: Card in output:
sticky_notes.append_array(card.own_sticky_notes) sticky_notes.append_array(HardCards.get_children_of(card.card_id))
for note:StickyNote in sticky_notes: for note:StickyNote in sticky_notes:
note.current_handle = self note.current_handle = self
@ -124,7 +122,6 @@ func _input(event):
pick(curr_selection_id) pick(curr_selection_id)
elif event.is_action_pressed("skip"): elif event.is_action_pressed("skip"):
##fixme: using skip causes a lot of invalid state ##fixme: using skip causes a lot of invalid state
return
if selection_state == CARDS_SELECTED: if selection_state == CARDS_SELECTED:
transition() transition()
show_posts() show_posts()
@ -196,11 +193,12 @@ func transition():
fill_post_slots() fill_post_slots()
await anim_players[0].animation_finished await anim_players[0].animation_finished
show_posts() if selection_state != POSTS:
show_posts()
elif selection_state == POSTS_SELECTED: elif selection_state == POSTS_SELECTED:
var out_str:Array[String] = [] var out_str:Array[StringName] = []
for card in output: for card in output:
out_str.append(card.name) out_str.append(card.text)
cards_picked.emit(out_str) cards_picked.emit(out_str)
get_parent().get_parent().get_parent().dnd = false get_parent().get_parent().get_parent().dnd = false
selection_state = DONE selection_state = DONE
@ -209,7 +207,7 @@ func transition():
func show_posts(): func show_posts():
selection_state = POSTS selection_state = POSTS
for player:AnimationPlayer in anim_players: for player:AnimationPlayer in anim_players:
player.play("reset") player.play("RESET")
func handle_hover(new_highlight): func handle_hover(new_highlight):

View File

@ -1,9 +1,8 @@
[gd_scene load_steps=65 format=3 uid="uid://brk4hjdf2x81a"] [gd_scene load_steps=64 format=3 uid="uid://brk4hjdf2x81a"]
[ext_resource type="Script" uid="uid://bdb6n10apk1en" path="res://logic-scenes/card_picker/card_picker.gd" id="1_pjntm"] [ext_resource type="Script" uid="uid://bdb6n10apk1en" path="res://logic-scenes/card_picker/card_picker.gd" id="1_pjntm"]
[ext_resource type="PackedScene" uid="uid://dy5rd437h5hsw" path="res://logic-scenes/board/card.tscn" id="2_dqebt"] [ext_resource type="Script" uid="uid://2loic2eeec5b" path="res://logic-scenes/board/card.gd" id="2_f4sp4"]
[ext_resource type="PackedScene" uid="uid://vkcdj8c3ytbq" path="res://logic-scenes/board/sticky-note.tscn" id="3_ggbxq"] [ext_resource type="Script" uid="uid://r12efqgk6t4n" path="res://logic-scenes/board/sticky-note.gd" id="3_f4sp4"]
[ext_resource type="PackedScene" uid="uid://bvowj4l8dtceu" path="res://dev-util/board of devs.tscn" id="4_1kvte"]
[sub_resource type="Animation" id="Animation_dinvx"] [sub_resource type="Animation" id="Animation_dinvx"]
length = 0.001 length = 0.001
@ -1526,8 +1525,10 @@ libraries = {
&"": SubResource("AnimationLibrary_gdxmh") &"": SubResource("AnimationLibrary_gdxmh")
} }
[node name="card" parent="cards/card_1" instance=ExtResource("2_dqebt")] [node name="Card" type="Area2D" parent="cards/card_1"]
script = ExtResource("2_f4sp4")
text = "Slot 1" text = "Slot 1"
metadata/_custom_type_script = "uid://2loic2eeec5b"
[node name="card_2" type="Control" parent="cards"] [node name="card_2" type="Control" parent="cards"]
layout_mode = 2 layout_mode = 2
@ -1538,8 +1539,10 @@ libraries = {
&"": SubResource("AnimationLibrary_oxheu") &"": SubResource("AnimationLibrary_oxheu")
} }
[node name="card" parent="cards/card_2" instance=ExtResource("2_dqebt")] [node name="Card" type="Area2D" parent="cards/card_2"]
script = ExtResource("2_f4sp4")
text = "Slot 2" text = "Slot 2"
metadata/_custom_type_script = "uid://2loic2eeec5b"
[node name="card_3" type="Control" parent="cards"] [node name="card_3" type="Control" parent="cards"]
layout_mode = 2 layout_mode = 2
@ -1555,8 +1558,10 @@ libraries = {
&"": SubResource("AnimationLibrary_8blxm") &"": SubResource("AnimationLibrary_8blxm")
} }
[node name="card" parent="cards/card_3" instance=ExtResource("2_dqebt")] [node name="Card" type="Area2D" parent="cards/card_3"]
script = ExtResource("2_f4sp4")
text = "Slot 3" text = "Slot 3"
metadata/_custom_type_script = "uid://2loic2eeec5b"
[node name="sticky_notes" type="Panel" parent="."] [node name="sticky_notes" type="Panel" parent="."]
layout_mode = 2 layout_mode = 2
@ -1574,8 +1579,10 @@ libraries = {
} }
autoplay = "ini" autoplay = "ini"
[node name="sticky-note" parent="sticky_notes/sticky_note_1" instance=ExtResource("3_ggbxq")] [node name="StickyNote" type="Area2D" parent="sticky_notes/sticky_note_1"]
text = "Post 1" script = ExtResource("3_f4sp4")
text = "Slot 1"
metadata/_custom_type_script = "uid://r12efqgk6t4n"
[node name="sticky_note_2" type="Control" parent="sticky_notes"] [node name="sticky_note_2" type="Control" parent="sticky_notes"]
layout_mode = 2 layout_mode = 2
@ -1590,8 +1597,10 @@ libraries = {
} }
autoplay = "ini" autoplay = "ini"
[node name="sticky-note" parent="sticky_notes/sticky_note_2" instance=ExtResource("3_ggbxq")] [node name="StickyNote" type="Area2D" parent="sticky_notes/sticky_note_2"]
text = "Post 2" script = ExtResource("3_f4sp4")
text = "Slot 2"
metadata/_custom_type_script = "uid://r12efqgk6t4n"
[node name="sticky_note_3" type="Control" parent="sticky_notes"] [node name="sticky_note_3" type="Control" parent="sticky_notes"]
layout_mode = 2 layout_mode = 2
@ -1606,8 +1615,10 @@ libraries = {
} }
autoplay = "ini" autoplay = "ini"
[node name="sticky-note" parent="sticky_notes/sticky_note_3" instance=ExtResource("3_ggbxq")] [node name="StickyNote" type="Area2D" parent="sticky_notes/sticky_note_3"]
text = "Post 3" script = ExtResource("3_f4sp4")
text = "Slot 3"
metadata/_custom_type_script = "uid://r12efqgk6t4n"
[node name="sticky_note_4" type="Control" parent="sticky_notes"] [node name="sticky_note_4" type="Control" parent="sticky_notes"]
layout_mode = 2 layout_mode = 2
@ -1622,12 +1633,10 @@ libraries = {
} }
autoplay = "ini" autoplay = "ini"
[node name="sticky-note" parent="sticky_notes/sticky_note_4" instance=ExtResource("3_ggbxq")] [node name="StickyNote" type="Area2D" parent="sticky_notes/sticky_note_4"]
text = "Post 4" script = ExtResource("3_f4sp4")
text = "Slot 4"
[node name="board of devs" parent="." instance=ExtResource("4_1kvte")] metadata/_custom_type_script = "uid://r12efqgk6t4n"
visible = false
layout_mode = 2
[node name="thought_prompt" type="Control" parent="."] [node name="thought_prompt" type="Control" parent="."]
layout_mode = 2 layout_mode = 2