diff --git a/src/dev-util/hardcoded_cards.gd b/src/dev-util/hardcoded_cards.gd index dce69bd..6bd19b1 100644 --- a/src/dev-util/hardcoded_cards.gd +++ b/src/dev-util/hardcoded_cards.gd @@ -2,24 +2,24 @@ 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", []] + "c_out_of_world": ["p_unique", "p_few_friends", []], + "c_rejection": ["p_finding_friends", "p_laughed_at", []], + "c_confusion": ["p_inner_conflict", "p_outer_conflict", []] }, { - "homework": ["good_grades", "upset_peers", []], - "teachers": ["volunteering", "becoming_teacher", []], - "joy": ["worried_mother", "thomas_gifted", []] + "c_homework": ["p_good_grades", "p_upset_peers", []], + "c_teachers": ["p_volunteering", "p_becoming_teacher", []], + "c_joy": ["p_worried_mother", "p_thomas_gifted", []] }, { - "comic_heroes": ["effort", "agent_q", []], - "boy_stuff": ["pretending", "girls", []], - "teasing": ["stubborn", "good_intended", ["thomas_gifted"]] + "c_comic_heroes": ["p_effort", "p_agent_q", []], + "c_boy_stuff": ["p_pretending", "girls", []], + "c_teasing": ["p_stubborn", "p_good_intended", ["p_thomas_gifted"]] }, { - "jui_jutsu": ["body", "girly", []], - "void": ["wet", "stop", []], - "hit": ["confidence", "vent", ["becoming_teacher"]] + "c_jui_jutsu": ["p_body", "p_girly", []], + "c_void": ["p_wet", "p_stop", []], + "c_hit": ["p_confidence", "p_vent", ["p_becoming_teacher"]] }, ] diff --git a/src/dev-util/savegame.gd b/src/dev-util/savegame.gd index 9ce2ea5..19ac7f1 100644 --- a/src/dev-util/savegame.gd +++ b/src/dev-util/savegame.gd @@ -93,6 +93,19 @@ func read_save_file(): if dict[key].begins_with("("): dict[key] = parse_vec_from_string(dict[key]) + var cards: Dictionary[StringName, Variant] + var stickies: Dictionary[StringName, Variant] + + for cardname:String in board_state["cards"]: + cards[StringName(cardname)] = board_state["cards"][cardname] + for sticky_name:String in board_state["stickies"]: + stickies[StringName(sticky_name)] = board_state["stickies"][sticky_name] + + board_state = { + "cards": cards, + "stickies": stickies + } + is_valid = are_types_valid \ and current_room >= 0 \ and current_room < State.rooms.keys().size() \ diff --git a/src/internationalisation.csv b/src/internationalisation.csv index e5d0713..cd6f505 100644 --- a/src/internationalisation.csv +++ b/src/internationalisation.csv @@ -162,43 +162,43 @@ Exploring social service year.,Exploring social service year.,Während des FSJ., Transitioning to university.,Transitioning to university.,Übergang zur Universität.,,, Exploring dorm room.,Exploring dorm room.,Während des Studiums.,,, Ending,Ending,Ende,,, -homework,"I never put in much effort for homework, ","Ich habe mir nie Mühe bei Hausaufgaben gegeben, ",,, -good_grades,but at least I get good grades.,aber zumindest waren meine Noten gut.,,, -upset_peers,my peers were upset about that.,meine Klasse war deswegen sauer.,,, -teachers,"I like my teachers more than my classmates, ","Ich komm mit meinen Lehrern besser klar, als mit meiner Klasse, ",,, -volunteering,doing voluntary social service at my school would be great.,vielleicht sollte ich ein FSJ vor dem Studium machen.,,, -becoming_teacher,Maybe I want to become a teacher.,vielleicht sollte ich Lehrerin werden.,,, -joy,"I can put ages into things I enjoy, ","Ich versinke in Dingen, die mir Freude machen,",,, -worried_mother,my mother would be worried about that.,meiner Mutter macht das Sorgen.,,, -thomas_gifted,Mr. Thomas thinks that makes me gifted.,Herr Thomas denkt das macht mich begabt.,,, -comic_heroes,"Comic heroes are my role models, ","Comic Helden sind meine Vorbilder,",,, -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!",,, -agent_q,and I want to be like Agent Q!,"Ich will so sein, wie Agent Q!",,, -boy_stuff,"I like boy stuff, ","Ich mag Jungs Kram,",,, -pretending,yet they think I'm just pretending.,aber die denken ich tu einfach nur so.,,, -girls,and girls don't get that.,und Mädchen verstehen das einfach nicht!,,, -teasing,"When Jojo got bullied for trying, I pretty much exploded","Ich bin ausgerastet, weil Jojo für ihre Mühe gemobbt wurde,",,, -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.",,, -good_intended,I will always stand up for the good intended!,"ich werde immer für Menschen einstehen, die das Richtige wollen!",,, -jui_jutsu,"I stopped doing jiu-jitsu, ","Ich habe mit Jiu Jitsu aufgehört,",,, -body,my body just didn't feel right.,mein Körper hat sich falsch anfefühlt.,,, -girly,I just hate being treated like a girl.,ich hasse es wie ein Mädchen behandelt zu werden.,,, -hit,"I know how to properly hit people, ","Ich weiß, wie man ordentlich zuschlägt, ",,, -confidence,that gives me a lot of confidence.,das gibt mir viel Selbstvertrauen.,,, -vent,and that's a great vent.,ich kann da gut Frust ablassen.,,, +c_homework,"I never put in much effort for homework, ","Ich habe mir nie Mühe bei Hausaufgaben gegeben, ",,, +p_good_grades,but at least I get good grades.,aber zumindest waren meine Noten gut.,,, +p_upset_peers,my peers were upset about that.,meine Klasse war deswegen sauer.,,, +c_teachers,"I like my teachers more than my classmates, ","Ich komm mit meinen Lehrern besser klar, als mit meiner Klasse, ",,, +p_volunteering,doing voluntary social service at my school would be great.,vielleicht sollte ich ein FSJ vor dem Studium machen.,,, +p_becoming_teacher,Maybe I want to become a teacher.,vielleicht sollte ich Lehrerin werden.,,, +c_joy,"I can put ages into things I enjoy, ","Ich versinke in Dingen, die mir Freude machen,",,, +p_worried_mother,my mother would be worried about that.,meiner Mutter macht das Sorgen.,,, +p_thomas_gifted,Mr. Thomas thinks that makes me gifted.,Herr Thomas denkt das macht mich begabt.,,, +c_comic_heroes,"Comic heroes are my role models, ","Comic Helden sind meine Vorbilder,",,, +p_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!",,, +p_agent_q,and I want to be like Agent Q!,"Ich will so sein, wie Agent Q!",,, +c_boy_stuff,"I like boy stuff, ","Ich mag Jungs Kram,",,, +p_pretending,yet they think I'm just pretending.,aber die denken ich tu einfach nur so.,,, +p_girls,and girls don't get that.,und Mädchen verstehen das einfach nicht!,,, +c_teasing,"When Jojo got bullied for trying, I pretty much exploded","Ich bin ausgerastet, weil Jojo für ihre Mühe gemobbt wurde,",,, +p_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.",,, +p_good_intended,I will always stand up for the good intended!,"ich werde immer für Menschen einstehen, die das Richtige wollen!",,, +c_jui_jutsu,"I stopped doing jiu-jitsu, ","Ich habe mit Jiu Jitsu aufgehört,",,, +p_body,my body just didn't feel right.,mein Körper hat sich falsch anfefühlt.,,, +p_girly,I just hate being treated like a girl.,ich hasse es wie ein Mädchen behandelt zu werden.,,, +c_hit,"I know how to properly hit people, ","Ich weiß, wie man ordentlich zuschlägt, ",,, +p_confidence,that gives me a lot of confidence.,das gibt mir viel Selbstvertrauen.,,, +p_vent,and that's 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 -wet,"I was wet, so I must have been into it?","Ich war feucht, also hab ich es wohl gewollt?",,,This line on itself should seem like a intrusive thought on it’s own without the contect above. +p_wet,"I was wet, so I must have been into it?","Ich war feucht, also hab ich es wohl gewollt?",,,This line on itself should seem like a intrusive thought on it’s own without the contect above. "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 -stop,I didn’t say stop.,Ich habe nicht Stopp gesagt.,,,This line on itself should seem like a intrusive thought on it’s own without the contect above. -out_of_world,I feel like I am not from of this world,Ich fühl mich wie von einer anderen Welt,,, -unique,I like being unique like that,ich mag es so besonders zu sein.,,, -few_friends,I am thankful for the few friends that get me,"gut, dass ich ein paar Freunde habe, die das verstehen.",,, -rejection,I fear being rejected,"Ich habe Angst, ausgeschlossen zu werden",,, -finding_friends,that makes it hard to find friends,darum fällt mir Freunde finden schwer.,,, -laughed_at,I'm afraid I will just get laughed at,"was, wenn ich deswegen ausgelacht werde?",,, -confusion,I am just too many things at once,Ich bin zu viel gleichzeitig.,,, -inner_conflict,it is just so overwhealming for me,das ist einfach überfordernd für mich.,,, -outer_conflict,this is just too much for others,das ist einfach überfordernd für andere.,,, +p_stop,I didn’t say stop.,Ich habe nicht Stopp gesagt.,,,This line on itself should seem like a intrusive thought on it’s own without the contect above. +c_out_of_world,I feel like I am not from of this world,Ich fühl mich wie von einer anderen Welt,,, +p_unique,I like being unique like that,ich mag es so besonders zu sein.,,, +p_few_friends,I am thankful for the few friends that get me,"gut, dass ich ein paar Freunde habe, die das verstehen.",,, +c_rejection,I fear being rejected,"Ich habe Angst, ausgeschlossen zu werden",,, +p_finding_friends,that makes it hard to find friends,darum fällt mir Freunde finden schwer.,,, +p_laughed_at,I'm afraid I will just get laughed at,"was, wenn ich deswegen ausgelacht werde?",,, +c_confusion,I am just too many things at once,Ich bin zu viel gleichzeitig.,,, +p_inner_conflict,it is just so overwhealming for me,das ist einfach überfordernd für mich.,,, +p_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.","[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. ",,, "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]",,, diff --git a/src/internationalisation.de.translation b/src/internationalisation.de.translation index 2de3407..0a21d23 100644 Binary files a/src/internationalisation.de.translation and b/src/internationalisation.de.translation differ diff --git a/src/internationalisation.en.translation b/src/internationalisation.en.translation index 4212744..ba1c044 100644 Binary files a/src/internationalisation.en.translation and b/src/internationalisation.en.translation differ diff --git a/src/internationalisation.es.translation b/src/internationalisation.es.translation index 8a35017..a84ef0b 100644 Binary files a/src/internationalisation.es.translation and b/src/internationalisation.es.translation differ diff --git a/src/internationalisation.ja.translation b/src/internationalisation.ja.translation index c41f1a3..5062097 100644 Binary files a/src/internationalisation.ja.translation and b/src/internationalisation.ja.translation differ diff --git a/src/internationalisation.notes.translation b/src/internationalisation.notes.translation index 8510462..6e199fc 100644 Binary files a/src/internationalisation.notes.translation and b/src/internationalisation.notes.translation differ diff --git a/src/logic-scenes/board/card-board.gd b/src/logic-scenes/board/card-board.gd index 2ee4272..ff8f1c2 100644 --- a/src/logic-scenes/board/card-board.gd +++ b/src/logic-scenes/board/card-board.gd @@ -10,6 +10,7 @@ enum Error { var focus_stickies:bool = true: set(stickies): + if not is_node_ready(): return if stickies and sticky_note_container.get_child_count() == 0: return # this messes things up if called unneeded. @@ -86,32 +87,34 @@ var mementos_collected: int = 0: @onready var current_dropzone_id: int = 0: set(new_id): - if new_id > dropzone.get_child_count() - 1: current_dropzone_id = 0 - elif new_id < 0: current_dropzone_id = dropzone.get_child_count() - 1 - else: current_dropzone_id = new_id - if current_context == ASSIGN and not focus_stickies: - while not dropzone.get_child(current_dropzone_id) is Card: current_dropzone_id = (current_dropzone_id + 1) % dropzone.get_child_count() - dropzone.get_child(current_dropzone_id).preview_sticky_note(currently_active_node) + if is_node_ready(): + if new_id > dropzone.get_child_count() - 1: current_dropzone_id = 0 + elif new_id < 0: current_dropzone_id = dropzone.get_child_count() - 1 + else: current_dropzone_id = new_id + if current_context == ASSIGN and not focus_stickies: + while not dropzone.get_child(current_dropzone_id) is Card: current_dropzone_id = (current_dropzone_id + 1) % dropzone.get_child_count() + dropzone.get_child(current_dropzone_id).preview_sticky_note(currently_active_node) - elif not focus_stickies: - currently_active_node = dropzone.get_child(current_dropzone_id) + elif not focus_stickies: + currently_active_node = dropzone.get_child(current_dropzone_id) @onready var current_sticky_note_id: int = 0: set(new_id): - if sticky_note_container.get_child_count() <= 1: return - elif new_id > sticky_note_container.get_child_count() - 1: current_sticky_note_id = 0 - elif new_id < 0: current_sticky_note_id = sticky_note_container.get_child_count() - 1 - else: current_sticky_note_id = new_id - if current_context == ASSIGN: - _return_sticky_notes_to_panels() - currently_active_node.preview_sticky_note(sticky_note_container.get_child(current_sticky_note_id).attached_sticky_note) - else: - if sticky_note_container.get_child(current_sticky_note_id).get_child_count() == 1: - currently_active_node = sticky_note_container.get_child(current_sticky_note_id).get_child(0) + if is_node_ready(): + if sticky_note_container.get_child_count() <= 1: return + elif new_id > sticky_note_container.get_child_count() - 1: current_sticky_note_id = 0 + elif new_id < 0: current_sticky_note_id = sticky_note_container.get_child_count() - 1 + else: current_sticky_note_id = new_id + if current_context == ASSIGN: + _return_sticky_notes_to_panels() + currently_active_node.preview_sticky_note(sticky_note_container.get_child(current_sticky_note_id).attached_sticky_note) else: - for i in range(sticky_note_container.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) + if sticky_note_container.get_child(current_sticky_note_id).get_child_count() == 1: + currently_active_node = sticky_note_container.get_child(current_sticky_note_id).get_child(0) + else: + for i in range(sticky_note_container.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) var last_save_dict: Dictionary var text_recovery: Dictionary @@ -125,10 +128,10 @@ func _ready(): dropzone_size = get_viewport_rect().size - Vector2(dropzone_padding + size_reference.minimum_size.x, dropzone_padding) if get_parent() == get_tree().root: - populate_board(["void", 'joy', "wet", "effort"]) - populate_board(["jui_jutsu", 'hit', "girly", "vent"]) - populate_board(["comic_heroes", 'teasing', "agent_q", "good_intended"]) - populate_board(["out_of_world", 'confusion', "outer_conflict", "unique"]) + populate_board(["c_void", 'c_joy', "p_wet", "p_effort"]) + populate_board(["c_jui_jutsu", 'c_hit', "p_girly", "p_vent"]) + populate_board(["c_comic_heroes", 'c_teasing', "p_agent_q", "p_good_intended"]) + populate_board(["c_out_of_world", 'c_confusion', "p_outer_conflict", "p_unique"]) mementos_collected = 2 has_stage = has_stage @@ -466,20 +469,20 @@ func initialise_from_save(savegame: SaveGame): rebuild_from_savedict(savegame.board_state) func rebuild_from_savedict(board_state:Dictionary): - var cards: Dictionary = board_state["cards"] - var stickies: Dictionary = board_state["stickies"] + var cards: Dictionary[StringName, Variant] = board_state["cards"] + var stickies: Dictionary[StringName, Variant] = board_state["stickies"] var card_pile = HardCards.get_cards_by_name_array(cards.keys() + (stickies.keys())) for card:Card in card_pile["cards"]: - add_card(card) - card.transform.origin = cards[card.name] # Replacing position reference with card reference! Needed in next loop. + add_card(card, false) + card.transform.origin = cards[card.name]# Replacing position reference with card reference! Needed in next loop. cards[card.name] = card text_recovery[card.name] = card.text for sticky:StickyNote in card_pile["sticky_notes"]: text_recovery[sticky.name] = sticky.text if stickies[sticky.name] == -1: - add_sticky_note(sticky) + add_sticky_note(sticky, false) elif stickies[sticky.name] is String: cards[stickies[sticky.name]].attach_sticky_note(sticky) else: diff --git a/src/logic-scenes/board/card.gd b/src/logic-scenes/board/card.gd index 85e4389..d573458 100644 --- a/src/logic-scenes/board/card.gd +++ b/src/logic-scenes/board/card.gd @@ -75,10 +75,10 @@ var is_mouse_entered: bool = false var mouse_offset: Vector2 func _init(card_name: String = "card", own_id:StringName = "-1") -> void: - if card_name != "void": + if card_name != "c_void": text = card_name card_id = own_id - name = "c_%s" % card_name + name = card_name func _ready(): diff --git a/src/logic-scenes/board/sticky-note.gd b/src/logic-scenes/board/sticky-note.gd index 0f12fc2..b39c6e4 100644 --- a/src/logic-scenes/board/sticky-note.gd +++ b/src/logic-scenes/board/sticky-note.gd @@ -74,10 +74,11 @@ var mouse_diff: Vector2 @export_range(1.0, 10.0) var bounce_speed: float = 8 var on_board: bool = false -func _init(sticky_name: String = "card", card_id: StringName = "-1", own_id:StringName = "-1") -> void: +func _init(sticky_name: String = "sticky_note", card_id: StringName = "-1") -> void: + name = sticky_name text = sticky_name parent_id = card_id - sticky_id = own_id + sticky_id = StringName( "%s.%s" % [parent_id, sticky_name] ) func _ready() -> void: if get_child_count() == 0: