about summary refs log tree commit diff stats
path: root/Archipelago/player.gd
blob: 244d9a8f5174d7a8df4f3532942fb19791fa76f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
extends "res://scripts/player.gd"

var april_fools = false


func _ready():
	var date = Time.get_date_dict_from_system()
	if date["month"] == 4 && date["day"] == 1:
		april_fools = true


func _solving():
	._solving()

	var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects")
	effects_node.enter_solve_mode()


func _solvingEnd():
	._solvingEnd()

	var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects")
	effects_node.exit_solve_mode()


func _unhandled_input(event):
	._unhandled_input(event)

	if event is InputEventKey:
		if event.pressed and event.scancode == KEY_P:
			var effects_node = get_tree().get_root().get_node("Spatial/AP_Effects")
			effects_node.skip_puzzle()


func rotate_y(amount):
	if april_fools:
		.rotate_y(-amount)
	else:
		.rotate_y(amount)