about summary refs log tree commit diff stats
path: root/data/maps/the_relentless/rooms
Commit message (Collapse)AuthorAgeFilesLines
* Changed how door location names are formattedStar Rauchenberger2025-08-307-7/+0
| | | | | | | | | | | | | | | | | | STANDARD type doors with at most four panels in the same map area and no other trigger objects will have their location names generated from the names of the panels used to open the door, similar to Lingo 1. Other door types will use the door's name. In either case, the name can be overridden using the new location_name field. Rooms can also set a panel_display_name field, which will be used in location names for doors, and is used to group panels into areas. Panels themselves can set display names, which differentiates their locations from other panels in the same area. Many maps were updated for this, but note that the_symbolic and the_unyielding have validator failures because of duplicate panel names. This won't matter until panelsanity is implemented.
* Converted puzzle symbols to an enumStar Rauchenberger2025-08-206-30/+30
|
* Added the_relentlessStar Rauchenberger2025-08-187-0/+264
href='#n59'>59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101






























                                                                                                  

                                                                                                    



































































                                                                           
extends "res://scripts/nodes/panel.gd"

var panel_logic = null
var symbol_solvable = true

var black = load("res://assets/materials/black.material")


func _ready():
	super._ready()

	var node_path = String(
		get_tree().get_root().get_node("scene").get_path_to(self).get_concatenated_names()
	)

	var gamedata = global.get_node("Gamedata")
	var panel_id = gamedata.get_panel_for_map_node_path(global.map, node_path)
	if panel_id != null:
		var ap = global.get_node("Archipelago")
		if ap.shuffle_symbols:
			if global.map == "the_entry" and node_path == "Panels/Entry/front_1":
				clue = "i"
				symbol = ""

				setField("clue", clue)
				setField("symbol", symbol)

		panel_logic = gamedata.objects.get_panels()[panel_id]
		checkSymbolSolvable()

		if not symbol_solvable:
			get_tree().get_root().get_node("scene/player").evaluate_solvability.connect(
				evaluateSolvability
			)


func checkSymbolSolvable():
	var old_solvable = symbol_solvable
	symbol_solvable = true

	if panel_logic == null:
		# There's no logic for this panel.
		return

	var ap = global.get_node("Archipelago")
	if not ap.shuffle_symbols:
		# Symbols aren't item-locked.
		return

	var gamedata = global.get_node("Gamedata")
	for symbol in panel_logic.get_symbols():
		var item_name = gamedata.kSYMBOL_ITEMS.get(symbol)
		var item_id = gamedata.objects.get_special_ids()[item_name]
		if ap.client.getItemAmount(item_id) < 1:
			symbol_solvable = false
			break

	if symbol_solvable != old_solvable:
		if symbol_solvable:
			setField("clue", clue)
			setField("symbol", symbol)
			setField("answer", answer)
		else:
			quad_mesh.surface_set_material(0, black)
			get_node("Hinge/clue").text = "missing"
			get_node("Hinge/answer").text = "symbols"


func checkSolvable(key):
	checkSymbolSolvable()
	if not symbol_solvable:
		return false

	return super.checkSolvable(key)


func evaluateSolvability():
	checkSolvable("")


func passedInput(key, skip_focus_check = false):
	if not symbol_solvable:
		return

	super.passedInput(key, skip_focus_check)


func focus():
	if not symbol_solvable:
		has_focus = false
		return

	super.focus()


func unfocus():
	if not symbol_solvable:
		has_focus = false
		return

	super.unfocus()