about summary refs log tree commit diff stats
path: root/data/maps/the_tenacious/rooms/Main Area.txtpb
blob: 18356e7538169248f6eac1fb214f295cfbfa989e (plain) (blame)
1
2
3
4
5
6
name: "Main Area"
keyholders {
  name: "K"
  path: "Components/KeyHolders/keyHolderK"
  key: "k"
}
mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
func on_map_load(root):
	var ap = global.get_node("Archipelago")

	# Teleport the direction panels when the stairs are there.
	var tpl_prefab = preload("res://objects/nodes/listeners/teleportListener.tscn")

	var dir1 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_1")
	var dir1_tpl = tpl_prefab.instantiate()
	dir1_tpl.target_path = dir1
	dir1_tpl.teleport_point = Vector3(59.5, 8, -6.5)
	dir1_tpl.teleport_rotate = Vector3(-45, 0, 0)
	dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
	dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
	dir1_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
	dir1.add_child.call_deferred(dir1_tpl)

	var dir2 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_2")
	var dir2_tpl = tpl_prefab.instantiate()
	dir2_tpl.target_path = dir2
	dir2_tpl.teleport_point = Vector3(59.5, 8, 6.5)
	dir2_tpl.teleport_rotate = Vector3(-45, -180, 0)
	dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
	dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
	dir2_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
	dir2.add_child.call_deferred(dir2_tpl)

	var dir3 = root.get_node("/root/scene/Panels/Castle Entrance/castle_direction_3")
	var dir3_tpl = tpl_prefab.instantiate()
	dir3_tpl.target_path = dir3
	dir3_tpl.teleport_point = Vector3(54, 8, 0)
	dir3_tpl.teleport_rotate = Vector3(-45, 90, 0)
	dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_south"))
	dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_north"))
	dir3_tpl.senders.append(NodePath("/root/scene/Panels/Castle Entrance/castle_west"))
	dir3.add_child.call_deferred(dir3_tpl)

	# Block off roof access in Daedalus.
	if not ap.daedalus_roof_access:
		_set_up_invis_wall(root, 75.5, 11, -24.5, 1, 10, 49)
		_set_up_invis_wall(root, 51.5, 11, -17, 16, 10, 1)
		_set_up_invis_wall(root, 46, 10, -9.5, 1, 10, 10)
		_set_up_invis_wall(root, 67.5, 11, 17, 16, 10, 1)
		_set_up_invis_wall(root, 50.5, 11, 14, 10, 10, 1)
		_set_up_invis_wall(root, 39, 10, 18.5, 1, 10, 22)
		_set_up_invis_wall(root, 20, 15, 18.5, 1, 10, 16)
		_set_up_invis_wall(root, 11.5, 15, 3, 32, 10, 1)
		_set_up_invis_wall(root, 11.5, 16, -20, 14, 20, 1)
		_set_up_invis_wall(root, 14, 16, -26.5, 1, 20, 4)
		_set_up_invis_wall(root, 28.5, 20.5, -26.5, 1, 15, 25)
		_set_up_invis_wall(root, 40.5, 20.5, -11, 30, 15, 1)
		_set_up_invis_wall(root, 50.5, 15, 5.5, 7, 10, 1)
		_set_up_invis_wall(root, 83.5, 33.5, 5.5, 1, 7, 11)
		_set_up_invis_wall(root, 83.5, 33.5, -5.5, 1, 7, 11)

		var warp_exit_prefab = preload("res://objects/nodes/exit.tscn")
		var warp_exit = warp_exit_prefab.instantiate()
		warp_exit.name = "roof_access_blocker_warp_exit"
		warp_exit.position = Vector3(58, 10, 0)
		warp_exit.rotation_degrees.y = 90
		root.get_node("/root/scene").add_child.call_deferred(warp_exit)

		var warp_enter_prefab = preload("res://objects/nodes/teleportAuto.tscn")
		var warp_enter = warp_enter_prefab.instantiate()
		warp_enter.target = warp_exit
		warp_enter.position = Vector3(76.5, 30, 1)
		warp_enter.scale = Vector3(4, 1.5, 1)
		warp_enter.rotation_degrees.y = 90
		root.get_node("/root/scene").add_child.call_deferred(warp_enter)


func _set_up_invis_wall(root, x, y, z, sx, sy, sz):
	var prefab = preload("res://objects/nodes/block.tscn")
	var newwall = prefab.instantiate()
	newwall.position.x = x
	newwall.position.y = y
	newwall.position.z = z
	newwall.scale.x = sz
	newwall.scale.y = sy
	newwall.scale.z = sx
	newwall.set_surface_override_material(0, preload("res://assets/materials/blackMatte.material"))
	newwall.visibility_range_end = 3
	newwall.visibility_range_end_margin = 1
	newwall.visibility_range_fade_mode = RenderingServer.VISIBILITY_RANGE_FADE_SELF
	newwall.skeleton = ".."
	root.get_node("/root/scene").add_child.call_deferred(newwall)