about summary refs log tree commit diff stats
path: root/CMakeLists.txt
blob: e76d0db59a188444fb91b6b21ec8e859f382f8e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
cmake_minimum_required(VERSION 3.28)

project(lingo2_archipelago)

add_subdirectory(proto)
add_subdirectory(tools/util)
add_subdirectory(tools/assign_ids)
add_subdirectory(tools/datapacker)
add_subdirectory(tools/validator)
DD; font-weight: bold } /* Literal.Number.Integer.Long */
extends "res://scripts/nodes/painting.gd"

var item_id


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

	print("node: %s" % node_path)

	var gamedata = global.get_node("Gamedata")
	var door_id = gamedata.get_door_for_map_node_path(global.map, node_path)
	if door_id != null:
		print("door_id: %d" % door_id)

		var ap = global.get_node("Archipelago")
		item_id = ap.get_item_id_for_door(door_id)

		if item_id != null:
			self.senders = []
			self.senderGroup = []
			self.nested = false
			self.complete_at = 0
			self.max_length = 0
			self.excludeSenders = []

			call_deferred("_readier")

	super._ready()


func _readier():
	var ap = global.get_node("Archipelago")

	if ap.has_item(item_id):
		handleTriggered()