From 231d225fdcf3d11ff83587ac09c145aa7bca0e9a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 12 Dec 2023 12:01:29 -0500 Subject: More panels --- randomizer/generator.gd | 257 +++++++++++++++++++++++++++++++++++++++++------- randomizer/load.gd | 69 ++++++++++++- 2 files changed, 284 insertions(+), 42 deletions(-) diff --git a/randomizer/generator.gd b/randomizer/generator.gd index 22ab178..e04d0e3 100644 --- a/randomizer/generator.gd +++ b/randomizer/generator.gd @@ -2,6 +2,7 @@ extends Node var panel_mapping = [] var gen_seed +var is_set_seed = false var _generated_puzzles var _answer_by_id @@ -11,6 +12,8 @@ var _puzzle_by_id var _rng var _flags = 0 var _total_generated = 0 +var _hint_by_path = {} +var _answer_by_path = {} var _unique_pool = "" var _answers_by_unique_pool = {} @@ -55,9 +58,9 @@ const kPuzzleTypes = [ kPurpleMiddle ] -const kMustReuseAnswer = 1 >> 0 -const kObscureHint = 1 >> 1 -const kShortAnswer = 1 >> 2 +const kMustReuseAnswer = 1 +const kObscureHint = 2 +const kShortAnswer = 4 signal generator_status @@ -77,8 +80,10 @@ func generate(chosen_seed): var seed_rng = RandomNumberGenerator.new() seed_rng.randomize() gen_seed = seed_rng.randi_range(0, 999999) + is_set_seed = false else: gen_seed = int(chosen_seed) + is_set_seed = true _rng = RandomNumberGenerator.new() _rng.seed = gen_seed @@ -88,6 +93,8 @@ func generate(chosen_seed): _answers_by_type = {} _answers_by_length = {} _puzzle_by_id = [] + _hint_by_path = {} + _answer_by_path = {} var openable_answers = [] for puzzle_type in kPuzzleTypes: @@ -137,7 +144,9 @@ func generate(chosen_seed): ) _setUniquePool("seeker") + _setFlag(kObscureHint) _setPanel("Heteronym Room/Panel_entrance_entrance", open_answer_id, open_answer_id) + _clearFlag(kObscureHint) _setUniquePool("traveled") _setPanel("Synonym Room/Panel_open_open", open_answer_id, open_answer_id) @@ -170,6 +179,14 @@ func generate(chosen_seed): open_answer_id ) + _setUniquePool("scientific") + _setPanel("Chemistry Room/Panel_open", open_answer_id, open_answer_id) + _setPanel( + "Chemistry Room/Panel_close", + _pickRandom(_puzzle_by_id[open_answer_id][1][kBlackBottom]), + open_answer_id + ) + # Start generating puzzles that need to have reused solutions. _setFlag(kMustReuseAnswer) @@ -241,6 +258,7 @@ func generate(chosen_seed): _gSingle("Naps Room/Panel_even_ordinary", kDoubleBlackBottom) _setUniquePool("unchallenged") + _gSingle("Challenge Room/Panel_singed_singsong", kPurpleMiddle) _gSingle("Challenge Room/Panel_nevertrusted_maladjusted", kPurpleMiddle) _gSingle("Challenge Room/Panel_writer_songwriter", kBlueMiddle) _gSingle("Challenge Room/Panel_lobs_lobster", kBlueMiddle) @@ -419,12 +437,57 @@ func generate(chosen_seed): "Double Room/Panel_descend_rhyme", kPurpleTop, "Double Room/Panel_descend_ant", kBlackBottom ) + _setUniquePool("fearless") + _gSingle("Naps Room/Panel_naps_span", kBlackMiddle) + _gSingle("Naps Room/Panel_funny_enough", kBlackTop) + _gSingle("Naps Room/Panel_team_meet", kBlackTop) + _gSingle("Naps Room/Panel_teem_meat", kBlackTop) + _gSingle("Naps Room/Panel_eat_tea", kBlackTop) + _gSingle("Naps Room/Panel_came_make", kBlackTop) + _gSingle("Naps Room/Panel_same_mace", kBlackTop) + _gSingle("Naps Room/Panel_safe_face", kBlackTop) + _gSingle("Naps Room/Panel_might_time", kBlackTop) + + _setUniquePool("unchallenged") + _setFlag(kObscureHint) + _gSingle("Challenge Room/Panel_challenge_challenge", kWhiteMiddle) + _gSingle("Challenge Room/Panel_welcome_welcome", kWhiteMiddle) + _clearFlag(kObscureHint) + _writePanel("Entry Room/Panel_return_return", "%s back" % _answer_by_path["Challenge Room/Panel_welcome_welcome"], "%s back" % _answer_by_path["Challenge Room/Panel_welcome_welcome"]) + _gSingle("Challenge Room/Panel_corner_corn", kRedMiddle) + _gSingle("Challenge Room/Panel_realeyes_realize", kWhiteTop) + _gSingle("Challenge Room/Panel_double_anagram_1", kYellowMiddle) + _gSingle("Challenge Room/Panel_double_anagram_2", kYellowMiddle) + _gSingle("Challenge Room/Panel_double_anagram_3", kYellowMiddle) + _gSingle("Challenge Room/Panel_double_anagram_4", kYellowMiddle) + _gSingle("Challenge Room/Panel_double_anagram_5", kYellowMiddle) + _gSingle("Challenge Room/Panel_double_anagram_6", kYellowMiddle) + + _setUniquePool("ecstatic") + _gSingle("Smiley Room/Panel_anagram_7_1", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_7_2", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_7_3", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_7_4", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_8_1", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_8_2", kYellowTop) + _gSingle("Smiley Room/Panel_anagram_8_3", kYellowTop) + + _setUniquePool("red") + _gSingle("Hangry Room/Panel_red_top_1", kRedTop) + _gSingle("Hangry Room/Panel_red_top_2", kRedTop) + _gSingle("Hangry Room/Panel_red_top_3", kRedTop) + _gSingle("Hangry Room/Panel_red_top_4", kRedTop) + _gSingle("Hangry Room/Panel_red_mid_1", kRedMiddle) + _gSingle("Hangry Room/Panel_red_mid_3", kRedMiddle) + _gStack2("Hangry Room/Panel_red_mid_4", kRedMiddle, "Hangry Room/Panel_red_bot_4", kRedBottom) + _gStack2("Hangry Room/Panel_red_mid_5", kRedMiddle, "Hangry Room/Panel_red_bot_5", kRedBottom) + _clearUniquePool() _gSingle("Entry Room/Panel_hidden_hidden", kWhiteMiddle) _gPaired("Shuffle Room/Panel_sword_words", "Shuffle Room/Panel_words_sword", kYellowMiddle) _gPaired("Shuffle Room/Panel_turn_runt", "Shuffle Room/Panel_turn_runt2", kYellowMiddle) - _gCohinted("Shuffle Room/Panel_lost_lots", "Shuffle Room/Panel_lost_slot", kYellowMiddle) + _gPaired("Shuffle Room/Panel_lost_lots", "Shuffle Room/Panel_lost_slot", kYellowMiddle) _gDouble("Shuffle Room/Panel_amen_mean", "Shuffle Room/Panel_name_mean", kYellowMiddle) _gSingle("Shuffle Room/Panel_corner", kYellowTop) _gSingle("Shuffle Room/Panel_gel", kYellowTop) @@ -437,8 +500,9 @@ func generate(chosen_seed): _gCopy("Shuffle Room/Panel_left_left", "Shuffle Room/Panel_left_left_2") _gCopy("Shuffle Room/Panel_right_right", "Shuffle Room/Panel_right_right_2") _gCopy("Shuffle Room/Panel_middle_middle", "Shuffle Room/Panel_middle_middle_2") - _gSingle("Shuffle Room/Panel_shortcuts", kWhiteMiddle) - _gSingle("Shuffle Room/Panel_tower", kWhiteMiddle) + _gSingle("Shuffle Room/Panel_shortcuts", kYellowMiddle) + _gSingle("Shuffle Room/Panel_tower", kYellowMiddle) + _gPaired("Shuffle Room/Panel_far_far", "Shuffle Room/Panel_near_near", kWhiteMiddle) _gSingle("Maze Room/Panel_reflow_flower", kYellowMiddle) @@ -447,12 +511,10 @@ func generate(chosen_seed): _gPaired("Appendix Room/Panel_night_knight", "Appendix Room/Panel_knight_night", kBlueMiddle) _gPaired("Appendix Room/Panel_bee_be", "Appendix Room/Panel_new_knew", kRedMiddle) _gSingle("Appendix Room/Panel_fore_for", kRedMiddle) - _gCohinted( - "Appendix Room/Panel_trusted_trust", "Appendix Room/Panel_trusted_rusted", kRedMiddle - ) - _gCohinted("Appendix Room/Panel_rust_trust", "Appendix Room/Panel_rust_crust", kBlueMiddle) + _gPaired("Appendix Room/Panel_trusted_trust", "Appendix Room/Panel_trusted_rusted", kRedMiddle) + _gPaired("Appendix Room/Panel_rust_trust", "Appendix Room/Panel_rust_crust", kBlueMiddle) _gSingle("Appendix Room/Panel_encrusted_rust", kRedMiddle) - _gCohinted( + _gPaired( "Appendix Room/Panel_adjust_readjust", "Appendix Room/Panel_adjust_adjusted", kBlueMiddle ) @@ -464,6 +526,65 @@ func generate(chosen_seed): _gSingle("Painting Room/Panel_any_many", kBlueMiddle) _gSingle("Painting Room/Panel_man_many", kBlueMiddle) _clearFlag(kShortAnswer) + _writePanel("Painting Room/Panel_order_onepathmanyturns", "order", "%s road %s turns" % [_answer_by_path["Painting Room/Panel_eon_one"], _answer_by_path["Painting Room/Panel_any_many"]]) + + _gStack2("Ceiling Room/Panel_blue_top_1", kBlueTop, "Ceiling Room/Panel_red_bot_1", kRedBottom) + _gStack2( + "Ceiling Room/Panel_red_mid_2", kRedMiddle, "Ceiling Room/Panel_blue_bot_2", kBlueBottom + ) + _gStack2( + "Ceiling Room/Panel_blue_mid_3", kBlueMiddle, "Ceiling Room/Panel_red_bot_3", kRedBottom + ) + _gStack2("Ceiling Room/Panel_red_top_4", kRedTop, "Ceiling Room/Panel_blue_mid_4", kBlueMiddle) + _gStack2( + "Ceiling Room/Panel_yellow_top_5", kYellowTop, "Ceiling Room/Panel_blue_bot_5", kBlueBottom + ) + _gStack2( + "Ceiling Room/Panel_blue_top_6", kBlueTop, "Ceiling Room/Panel_yellow_mid_6", kYellowMiddle + ) + # gen_.GeneratePanelStack("", {}, "Panel_blue_mid_7", kBlue, "Panel_yellow_bot_7", kYellow); + _gStack2( + "Ceiling Room/Panel_yellow_mid_8", + kYellowMiddle, + "Ceiling Room/Panel_black_bot_8", + kBlackBottom + ) + # gen_.GeneratePanelStack("Panel_black_top_9", kBlack, "", {}, "Panel_yellow_bot_9", kYellow); + _gStack2( + "Ceiling Room/Panel_yellow_top_10", + kYellowTop, + "Ceiling Room/Panel_black_bot_10", + kBlackBottom + ) + _gStack2( + "Ceiling Room/Panel_black_top_11", + kBlackTop, + "Ceiling Room/Panel_yellow_mid_11", + kYellowMiddle + ) + _gStack2( + "Ceiling Room/Panel_black_top_12", kBlackTop, "Ceiling Room/Panel_red_bot_12", kRedBottom + ) + _gStack2( + "Ceiling Room/Panel_red_top_13", kRedTop, "Ceiling Room/Panel_black_bot_13", kBlackBottom + ) + _gStack2( + "Ceiling Room/Panel_black_mid_14", kBlackMiddle, "Ceiling Room/Panel_red_bot_14", kRedBottom + ) + _gStack2( + "Ceiling Room/Panel_black_top_15", kBlackTop, "Ceiling Room/Panel_red_mid_15", kRedMiddle + ) + #gen_.GenerateSinglePanel("Panel_answer_1", kBottom, kRed); + #_gSingle("Ceiling Room/Panel_answer_2", kBlackTop) + _setFlag(kShortAnswer) + _gSingle("Ceiling Room/Panel_answer_3", kBlueMiddle) + _clearFlag(kShortAnswer) + _gSingle("Ceiling Room/Panel_answer_4", kBlackTop) + _writePanel("Countdown Panels/Panel_artistic_artistic", "", "the art %s %s" % [_answer_by_path["Ceiling Room/Panel_answer_3"], _answer_by_path["Ceiling Room/Panel_answer_4"]]) + + _gQuadruple("Hallway Room/Panel_castle_1", "Hallway Room/Panel_castle_2", "Hallway Room/Panel_castle_3", "Hallway Room/Panel_castle_4", kBlueBottom) + _gQuadruple("Hallway Room/Panel_counterclockwise_1", "Hallway Room/Panel_counterclockwise_2", "Hallway Room/Panel_counterclockwise_3", "Hallway Room/Panel_counterclockwise_4", kBlueMiddle) + _gQuadruple("Hallway Room/Panel_transformation_1", "Hallway Room/Panel_transformation_2", "Hallway Room/Panel_transformation_3", "Hallway Room/Panel_transformation_4", kBlueTop) _gExactLength("Backside Room/Panel_one_one", kWhiteMiddle, 1) _gExactLength("Backside Room/Panel_two_two", kWhiteMiddle, 2) @@ -472,6 +593,19 @@ func generate(chosen_seed): _gExactLength("Backside Room/Panel_three_three_2", kWhiteMiddle, 3) _gExactLength("Backside Room/Panel_three_three_3", kWhiteMiddle, 3) + _gSingle("Color Arrow Room/Panel_red_near", kWhiteMiddle) + _gSingle("Color Arrow Room/Panel_blue_near", kWhiteMiddle) + _gSingle("Color Arrow Room/Panel_yellow_near", kWhiteMiddle) + _gSingle("Color Arrow Room/Panel_orange_near", kWhiteMiddle) + _gSingle("Color Arrow Room/Panel_purple_near", kWhiteMiddle) + _gSingle("Color Arrow Room/Panel_green_near", kWhiteMiddle) + _gCopyHidden("Color Arrow Room/Panel_red_near", "Color Arrow Room/Panel_red_afar") + _gCopyHidden("Color Arrow Room/Panel_blue_near", "Color Arrow Room/Panel_blue_afar") + _gCopyHidden("Color Arrow Room/Panel_yellow_near", "Color Arrow Room/Panel_yellow_afar") + _gCopyHidden("Color Arrow Room/Panel_orange_near", "Color Arrow Room/Panel_orange_afar") + _gCopyHidden("Color Arrow Room/Panel_purple_near", "Color Arrow Room/Panel_purple_afar") + _gCopyHidden("Color Arrow Room/Panel_green_near", "Color Arrow Room/Panel_green_afar") + _setFlag(kObscureHint) _gSingle("Entry Room/Panel_forward_forward", kWhiteMiddle) _gSingle("Entry Room/Panel_between_between", kWhiteMiddle) @@ -487,7 +621,6 @@ func generate(chosen_seed): _gSingle("Shuffle Room/Panel_crossroads_crossroads", kWhiteMiddle) _gSingle("Shuffle Room/Panel_corner_corner", kWhiteMiddle) _gSingle("Shuffle Room/Panel_hollow_hollow", kWhiteMiddle) - _gPaired("Shuffle Room/Panel_far_far", "Shuffle Room/Panel_near_near", kWhiteMiddle) _gSingle("Maze Room/Panel_trace_trace", kWhiteMiddle) @@ -561,6 +694,14 @@ func generate(chosen_seed): print("%s: %s? %s!" % puzzle) +func apply(scene): + var panels_parent = scene.get_node("Panels") + for puzzle in panel_mapping: + var panel = panels_parent.get_node(puzzle[0]) + panel.text = puzzle[1] + panel.answer = puzzle[2] + + func _pickRandom(set): var id = _rng.randi_range(0, set.size() - 1) return set[id] @@ -628,10 +769,34 @@ func _gDouble(panel1_path, panel2_path, puzzle_type): _setPanel(panel2_path, hint2_id, answer_id) +func _gQuadruple(panel1_path, panel2_path, panel3_path, panel4_path, puzzle_type): + var pre_choices = _filterBestPuzzles(_answers_by_type[puzzle_type]) + var puzzle_choices = [] + for word_id in pre_choices: + if _puzzle_by_id[word_id][1][puzzle_type].size() > 3: + puzzle_choices.append(word_id) + if puzzle_choices.empty(): + print("No possible puzzles for panel %s" % panel1_path) + else: + var answer_id = _pickRandom(puzzle_choices) + var hint_choices = _puzzle_by_id[answer_id][1][puzzle_type].duplicate() + var hint1_id = _pickRandom(hint_choices) + hint_choices.erase(hint1_id) + var hint2_id = _pickRandom(hint_choices) + hint_choices.erase(hint2_id) + var hint3_id = _pickRandom(hint_choices) + hint_choices.erase(hint3_id) + var hint4_id = _pickRandom(hint_choices) + _setPanel(panel1_path, hint1_id, answer_id) + _setPanel(panel2_path, hint2_id, answer_id) + _setPanel(panel3_path, hint3_id, answer_id) + _setPanel(panel4_path, hint4_id, answer_id) + + func _gPaired(panel1_path, panel2_path, puzzle_type): var needed_type = puzzle_type if puzzle_type == kWhiteMiddle: - needed_type = kBlackMiddle + needed_type = kBlackBottom var puzzle_choices = _filterBestPuzzles(_answers_by_type[needed_type]) if puzzle_choices.empty(): print("No possible puzzles for panel %s" % panel1_path) @@ -647,10 +812,6 @@ func _gPaired(panel1_path, panel2_path, puzzle_type): _setPanel(panel2_path, answer_id, hint_id) -func _gCohinted(panel1_path, panel2_path, puzzle_type): - pass - - func _gStack2(panel1_path, puzzle_type1, panel2_path, puzzle_type2): if puzzle_type1 == kWhiteMiddle or puzzle_type2 == kWhiteMiddle: if puzzle_type1 == kWhiteMiddle: @@ -678,17 +839,15 @@ func _gStack2(panel1_path, puzzle_type1, panel2_path, puzzle_type2): func _gCopy(panel1_path, panel2_path): - for thing in panel_mapping: - if thing[0] == panel1_path: - panel_mapping.append([panel2_path, thing[1], thing[2]]) - return + _writePanel(panel2_path, _hint_by_path[panel1_path], _answer_by_path[panel1_path]) func _gCopyAnswer(panel1_path, panel2_path): - for thing in panel_mapping: - if thing[0] == panel1_path: - panel_mapping.append([panel2_path, thing[2], thing[2]]) - return + _writePanel(panel2_path, _answer_by_path[panel1_path], _answer_by_path[panel1_path]) + + +func _gCopyHidden(panel1_path, panel2_path): + _writePanel(panel2_path, "?".repeat(_answer_by_path[panel1_path].length()), _answer_by_path[panel1_path]) func _gExactLength(panel_path, puzzle_type, answer_length): @@ -709,15 +868,17 @@ func _gExactLength(panel_path, puzzle_type, answer_length): func _filterBestPuzzles(input): - var not_uniqued = [] - if _unique_pool == "": - not_uniqued = input - elif _answers_by_unique_pool.has(_unique_pool): - for word_id in input: - if not _answers_by_unique_pool[_unique_pool].has(word_id): - not_uniqued.append(word_id) - else: - not_uniqued = input + var acceptable = [] + for word_id in input: + if ( + _unique_pool != "" + and _answers_by_unique_pool.has(_unique_pool) + and _answers_by_unique_pool[_unique_pool].has(word_id) + ): + continue + if _isFlag(kShortAnswer) and _answer_by_id[word_id].length() > 4: + continue + acceptable.append(word_id) #if _isFlag(kMustReuseAnswer): # var possible = [] # for word_id in not_uniqued: @@ -725,11 +886,11 @@ func _filterBestPuzzles(input): # possible.append(word_id) # not_uniqued = possible var result = [] - for word_id in not_uniqued: + for word_id in acceptable: if _needs_reuse.has(word_id): result.append(word_id) if result.empty(): - for word_id in not_uniqued: + for word_id in acceptable: result.append(word_id) if _possible_reuse.has(word_id): result.append(word_id) @@ -739,10 +900,32 @@ func _filterBestPuzzles(input): func _setPanel(panel_path, hint_id, answer_id): if _unique_pool != "": _answers_by_unique_pool[_unique_pool].append(answer_id) - panel_mapping.append([panel_path, _answer_by_id[hint_id], _answer_by_id[answer_id]]) + + var hint_text = _answer_by_id[hint_id] + if _isFlag(kObscureHint): + var numToObscure = 1 + if hint_text.length()/3 > 0: + numToObscure = _rng.randi_range(1, hint_text.length()/3) + var iota = range(0, hint_text.length()) + var order = [] + while not iota.empty(): + var i = _rng.randi_range(0, iota.size() - 1) + order.append(iota[i]) + iota.remove(i) + for i in range(0, numToObscure): + if hint_text[order[i]] != " " and hint_text[order[i]] != "-": + hint_text[order[i]] = "?" + + _writePanel(panel_path, hint_text, _answer_by_id[answer_id]) if not _isFlag(kMustReuseAnswer): if _needs_reuse.has(answer_id): _needs_reuse.erase(answer_id) _possible_reuse.append(answer_id) + + +func _writePanel(panel_path, hint, answer): + panel_mapping.append([panel_path, hint, answer]) + _hint_by_path[panel_path] = hint + _answer_by_path[panel_path] = answer _total_generated += 1 emit_signal("generator_status", "Generating puzzles... (%d/?)" % _total_generated) diff --git a/randomizer/load.gd b/randomizer/load.gd index 727e368..9fcd038 100644 --- a/randomizer/load.gd +++ b/randomizer/load.gd @@ -5,14 +5,73 @@ func _load(): global._print("Hooked Load Start") var randomizer = global.get_node("Randomizer") + var panels_parent = $Panels + + # Hide the countdown true panels. + for child in $CountdownPanels.get_children(): + if child.is_class("Spatial"): + child.get_node(child.replace_with).translation.y -= 100.0 # Apply the randomized panels. - var panels_parent = $Panels - for puzzle in randomizer.generator.panel_mapping: - var panel = panels_parent.get_node(puzzle[0]) - panel.text = puzzle[1] - panel.answer = puzzle[2] + randomizer.generator.apply(self) + + # Write static panels. + set_static_panel("Entry Room/Panel_hi_hi", "hi") + if randomizer.generator.is_set_seed: + set_static_panel("Entry Room/Panel_write_write", "set seed") + else: + set_static_panel("Entry Room/Panel_write_write", "random seed") + set_static_panel("Entry Room/Panel_same_same", str(randomizer.generator.gen_seed)) + set_static_panel("Entry Room/Panel_type_type", "version") + set_static_panel("Entry Room/Panel_this_this", randomizer.my_version) + set_static_panel("Entry Room/Panel_hi_high", "goode", "good") + set_static_panel("Entry Room/Panel_low_low", "serendipity", "luck") + set_static_panel("Shuffle Room/Panel_secret_secret", "trans rights", "human rights") + set_static_panel("Color Arrow Room/Panel_me", "me", "hatkirby") + + # HOT CRUSTS should be at eye-level, have a yellow block behind it, and + # not vanish when solved. + var hotcrusts = panels_parent.get_node("Shuffle Room/Panel_shortcuts") + hotcrusts.translation.y = 1.5 + hotcrusts.get_node("Viewport/GUI/Panel/TextEdit").disconnect( + "answer_correct", hotcrusts, "handle_correct" + ) + + set_gridmap_tile(-20.5, 1.5, -79.5, "MeshInstance9") + + # TRANS RIGHTS should be bottom white, like it used to be. + var trans_rights = panels_parent.get_node("Shuffle Room/Panel_secret_secret") + trans_rights.translation.y = 0.5 + + # Move LOW/LOW back to where it used to be. + var panel_low = panels_parent.get_node("Entry Room/Panel_low_low") + var sign_low = $Decorations/PanelSign/sign21 + panel_low.translation = sign_low.translation + panel_low.rotation = sign_low.rotation + sign_low.queue_free() + + # Require LOW/LOW for opening the second door. + get_node("Doors/Entry Room Area Doors/Door_hi_high").panels.append("../../../Panels/Entry Room/Panel_low_low") + get_node("Doors/Entry Room Area Doors/Door_hi_high")._ready() # Proceed with the rest of the load. global._print("Hooked Load End") ._load() + + +func set_static_panel(name, question, answer = ""): + if answer == "": + answer = question + + var node = self.get_node("Panels").get_node(name) + + node.text = question + node.answer = answer + + +func set_gridmap_tile(x, y, z, tile): + var gridmap = self.get_node("GridMap") + var mesh_library = gridmap.mesh_library + var mapvec = gridmap.world_to_map(gridmap.to_local(Vector3(x, y, z))) + + gridmap.set_cell_item(mapvec.x, mapvec.y, mapvec.z, mesh_library.find_item_by_name(tile)) -- cgit 1.4.1