Commit bee8d4cd authored by littleredpanda14's avatar littleredpanda14

Uploaded Bathroom

parents
source_md5="e9e3aa84050045ad011ea475fb73b563"
dest_md5="4f1b9ed4db75aa6df3819628c9ed344d"
source_md5="ab9b97c8c6e707d42c91703ddf1df36a"
dest_md5="fd796273afd074bf6f887a8b2b892abd"
source_md5="0d3bfd8451d3ba07a3e13a1dc2aa2483"
dest_md5="425d6b9a8b5447289ad131e8c67e0176"
source_md5="13bdbb388fb0f22e0e13042f5c21f5ee"
dest_md5="ef329ebe9461d6519dd37230e390fe5c"
source_md5="e54959a47e24cdf3ea74cf7437f608f5"
dest_md5="307e5289fc8f513b547e896f982fbddc"
source_md5="3d7afa3be3dd537f5b25319dd1af389d"
dest_md5="4e99dcf121a44b70d612d26e2fd512b0"
source_md5="d61e38dd81f5ace53ff4f910658244f3"
dest_md5="f07193cb72703a1b0a1f7d444c4e4605"
source_md5="738212b5d5f9bedc06b358fb8f4fb831"
dest_md5="c32461af1efa3b7ee7fb26168e7c1a0b"
source_md5="1b2d6876e673e7430e69f29582d20f58"
dest_md5="4ffd4e7d09311f95b67576141d2c91dc"
source_md5="7792df985957a9aa167422c448060308"
dest_md5="52ab88c4e9d6df75a0cefbfa045d109c"
source_md5="7aa4beeb7c4387c7c88c76f4dcbb3b50"
dest_md5="19d2b550ee2aecf793e15e791e30e8a8"
source_md5="a819c944b40f54ec5e965ae44dfd2abb"
dest_md5="e8c7222a4bd688561652eb8061b2471c"
source_md5="d6dec260b39a3ae055a3a11976dbf03e"
dest_md5="9ecfb090ff445be93d7afb145cca43fc"
source_md5="44a98a2ac3754240f42d2efe47d509da"
dest_md5="f48500605271999b16ef1f19a2a6741d"
source_md5="47313fa4c47a9963fddd764e1ec6e4a8"
dest_md5="2ded9e7f9060e2b530aab678b135fc5b"
source_md5="eed3cfdbf75c263473fa166e7c28aceb"
dest_md5="f8c022ace7b486bcf8ae3230d94e1831"
source_md5="dd6f940e453b8115585edf34e19ddec6"
dest_md5="10eb25b88e26e8ce03460ac7e533e7ac"
source_md5="53128593c309ac156fd76446aa976add"
dest_md5="120d19d8e1351efa506bdd6a0ec560ec"
source_md5="b48fa356ea83ec302f96f41efa617905"
dest_md5="9403238337bb998b6ca1e2c00d0e85ce"
source_md5="f701bcbb277575e9448c2ac8fa48fa9b"
dest_md5="343fd1d89c83072c173dcdca04f43166"
source_md5="97b6930912b541fbd7bdafba972d265f"
dest_md5="3530bb7503a550893e0d0155b7c9361f"
source_md5="806cd7ca41856dddffb8d97bdc153bbb"
dest_md5="4f1b9ed4db75aa6df3819628c9ed344d"
source_md5="5474503868b8cc87defd603061b692d2"
dest_md5="83b12a26c1fc798ac75cef6caa4b9ebf"
source_md5="94d604a4945510e92efea9e954a4cdcf"
dest_md5="a42ed08643812c6d51f3589c382c3d18"
source_md5="da1b48ea031f060d05f8aeb0dc436c93"
dest_md5="133f9a4498710025979e7400c78211cc"
source_md5="ede7970a5291c9815316f1899bb161d9"
dest_md5="7da3fcb654095c01e8170dbf588b2470"
source_md5="85c76f9831ce045884fb3393d0cbc923"
dest_md5="a0049c5c0dd0d569ffee5477b149edad"
source_md5="72d5ce4d6efc4083d4e072a5079af483"
dest_md5="6a3c8b36920709d69db85c83231eb6bc"
source_md5="a129f6c2ac4dddd025246c253eced8a6"
dest_md5="e3b6f2c59bb5e446800bb510613e2f58"
source_md5="a9916fdd5a9720978868cfa4653fb57e"
dest_md5="5909e0a52f5a94d186f49dc802e9585b"
source_md5="a9916fdd5a9720978868cfa4653fb57e"
dest_md5="5909e0a52f5a94d186f49dc802e9585b"
source_md5="70d5f9dd7509f6000715331790d19ea2"
dest_md5="5b1b9386b7fa6a7e7dcb24540d3d4ce4"
source_md5="3128396862967a2f59f89ff673b48e42"
dest_md5="05446937f9ba5b8a4dec06a51deb04a3"
source_md5="67d57f625076726b6d6dffb3619a5786"
dest_md5="f8cea8f6bc8f366b777ddc2a62bdd84a"
source_md5="d4e9c4116d3ceadaea22077faf38f1cc"
dest_md5="5e5528505b7a4652f0ab8c6726214c29"
source_md5="a1d7574e9d337d77b799e9ac79344559"
dest_md5="3fabcb81dd9cffabcd3d94963931cc23"
source_md5="731ddb36548b8a0b7fee0aeb9f4d4570"
dest_md5="31157a498d21acfbdbe32d2a887b166e"
source_md5="aa0b1105880602fe5028989199b7ba02"
dest_md5="7ca56a67e23dfdbfcde032d2f2d97561"
source_md5="12c8ba1e15792f0b8d97a8cf995c5f84"
dest_md5="0ba64068799150b8c38886dce6636acc"
source_md5="64712d5f0c78d355a78e904364a0beaf"
dest_md5="6d2835d7c07f0312818fe2edd10d1b23"
source_md5="b1c37c395a84aac78203945c74553840"
dest_md5="c7a20d8fbda6d8678d181b74dff7d44d"
source_md5="17c800a3dfa7b0d815d5ad42478e8d60"
dest_md5="3874c82e290fc94195c2e7cdeb6eed85"
source_md5="65b9c1afa5f7feece50f78936afdbc20"
dest_md5="85e2c20b2a27b573d917f0a26e7fd249"
source_md5="9355838c0fc842089a22b66b68e86f43"
dest_md5="e50bd77b1671c7d5758e678d796a67e2"
source_md5="ac0879fd78c0a0a523ce44d285c8e8f7"
dest_md5="a24a48a0d5d72b7febe9ce1cc5067d49"
extends TextureButton
# Called when the node enters the scene tree for the first time.
func _ready():
var funcName = "_pressed" + self.get_name()
connect("pressed", get_parent().get_node("Movement Handler"), funcName)
pass # Replace with function body.
extends Sprite
onready var inventory = get_parent().get_node("ItemList")
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func _input(event):
if event is InputEventMouseButton:
if event.button_index == BUTTON_LEFT and event.pressed:
print("Unselected")
inventory.unselect_all()
func passUI(inv, dia):
inventory = inv
print("Found " + inventory.get_name())
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=15 format=2]
[ext_resource path="res://Dialogue Contro - Bathrooml.gd" type="Script" id=1]
[ext_resource path="res://assets/room zoom out.png" type="Texture" id=2]
[ext_resource path="res://assets/placeholder.png" type="Texture" id=3]
[ext_resource path="res://Item.gd" type="Script" id=4]
[ext_resource path="res://assets/placeholder item.png" type="Texture" id=5]
[sub_resource type="RectangleShape2D" id=1]
[sub_resource type="RectangleShape2D" id=2]
[sub_resource type="RectangleShape2D" id=3]
[sub_resource type="RectangleShape2D" id=4]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 69.006, 185 )
[sub_resource type="RectangleShape2D" id=6]
[sub_resource type="RectangleShape2D" id=7]
[sub_resource type="RectangleShape2D" id=8]
[sub_resource type="RectangleShape2D" id=9]
[node name="Bathroom" type="Node2D"]
[node name="BG" type="Sprite" parent="."]
position = Vector2( 640, 257 )
texture = ExtResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="Mirror" type="StaticBody2D" parent="."]
position = Vector2( 529.891, 258.782 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Fun to write on. I should wipe this down, though."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Mirror"]
shape = SubResource( 1 )
[node name="Sprite" type="Sprite" parent="Mirror/CollisionShape2D"]
position = Vector2( 87.9999, -76.5 )
scale = Vector2( 1.58, 1.405 )
texture = ExtResource( 3 )
[node name="Label" type="Label" parent="Mirror/CollisionShape2D"]
margin_left = 5.0
margin_top = -5.0
margin_right = 57.0
margin_bottom = 22.0
text = "MIRROR"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Lab Note - Bathroom" type="StaticBody2D" parent="."]
position = Vector2( 535, 103 )
scale = Vector2( 0.842056, 0.913043 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "My lab notes! I wonder how it got there."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Lab Note - Bathroom"]
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="Lab Note - Bathroom/CollisionShape2D"]
position = Vector2( -15, 3.99999 )
scale = Vector2( 0.55, 0.56 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Lab Note - Bathroom/CollisionShape2D"]
margin_left = -58.0
margin_top = -38.0
margin_right = 76.0
margin_bottom = 31.0
text = "LAB NOTE"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Toilet" type="StaticBody2D" parent="."]
position = Vector2( 932, 384 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Toilet. A little clogged. No way am I sticking my hand in that."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Toilet"]
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Toilet/CollisionShape2D"]
position = Vector2( -10, 4.99999 )
scale = Vector2( 0.9, 1.31 )
texture = ExtResource( 3 )
[node name="Label" type="Label" parent="Toilet/CollisionShape2D"]
margin_left = -52.0
margin_top = -66.0
margin_right = 44.0
margin_bottom = 14.0
text = "TOILET"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Sink" type="StaticBody2D" parent="."]
position = Vector2( 545, 430 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Sink. Stinky. Sinky. Do I have anything to clean this up with?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Sink"]
shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Sink/CollisionShape2D"]
position = Vector2( 66, -7 )
scale = Vector2( 1.95, 0.93 )
texture = ExtResource( 3 )
[node name="Label" type="Label" parent="Sink/CollisionShape2D"]
margin_top = -59.0
margin_right = 49.0
margin_bottom = 14.0
text = "SINK"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Door - to Bedroom" type="StaticBody2D" parent="."]
position = Vector2( 1162, 175 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Door - to Bedroom"]
position = Vector2( 30, 65 )
shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Door - to Bedroom/CollisionShape2D"]
visible = false
texture = ExtResource( 3 )
[node name="Plunger" type="StaticBody2D" parent="."]
position = Vector2( 1057, 422 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "Smells like rubber."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Plunger"]
shape = SubResource( 6 )
[node name="Sprite" type="Sprite" parent="Plunger/CollisionShape2D"]
position = Vector2( 7.49999, 0 )
scale = Vector2( 0.405, 1 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Plunger/CollisionShape2D"]
margin_left = -23.0
margin_top = -58.0
margin_right = 43.0
margin_bottom = 14.0
text = "PLUNGER"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Bobby Pins" type="StaticBody2D" parent="."]
position = Vector2( 284, 426 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "Good for holding my hair up or picking into small spaces."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Bobby Pins"]
shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Bobby Pins/CollisionShape2D"]
position = Vector2( 16.5, 33.5 )
scale = Vector2( 0.835, 0.525 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Bobby Pins/CollisionShape2D"]
margin_right = 79.0
margin_bottom = 14.0
text = "BOBBY PINS"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Trash" type="StaticBody2D" parent="."]
position = Vector2( 1138, 424 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "Ew."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Trash"]
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Trash/CollisionShape2D"]
position = Vector2( 18.5, 43.5 )
scale = Vector2( 0.395, 0.565 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Trash/CollisionShape2D"]
margin_right = 40.0
margin_bottom = 14.0
text = "TRASH"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Tabo" type="StaticBody2D" parent="."]
position = Vector2( 912, 210 )
script = ExtResource( 4 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "Hydration."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Tabo"]
shape = SubResource( 9 )
[node name="Sprite" type="Sprite" parent="Tabo/CollisionShape2D"]
position = Vector2( 5.5, 14 )
scale = Vector2( 0.405, 0.37 )
texture = ExtResource( 5 )
[node name="Label" type="Label" parent="Tabo/CollisionShape2D"]
margin_right = 40.0
margin_bottom = 14.0
rect_scale = Vector2( 1.08777, 3.19456 )
text = "TABO"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue Control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
extends Button
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Laundry basket":
match selected:
"Shirt", "Towel", "Pants", "Sando":
return "Into the basket you go."
"Placeholder 2":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on 2"
"Placeholder 3":
return "Using Placeholder 3 on 2"
"Placeholder 3":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on 3"
"Placeholder 2":
return "Using Placeholder 1 on 3"
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Placeholder A":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on A"
"Placeholder 2":
return "Using Placeholder 2 on A"
"Placeholder 3":
return "Using Placeholder 3 on A"
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends Control
signal notebook_laundry
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Laundry door":
match selected:
"To do list":
emit_signal("notebook_laundry")
return ""
"Towel", "Shirt", "Pants", "Sando":
return "I'm not sure how to start this."
_:
"The groceries are still in the way."
"Groceries":
match selected:
"Stool":
return "This apartment was made for tall people. Sigh.\n(You put your groceries away on the shelf.)"
func passEvent(handler):
connect("notebook_laundry", handler, "_enter_notebook_laundry")
extends Control
onready var drawer = false #if soap drawer is open
onready var soap = false # if soap is being poured
onready var door = false # if washing machine door is open
onready var clothes_in = false # if clothes are in the machine
onready var clothes = get_parent().get_node("Clothes")
signal laundry_finished
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func checkWin():
print("Checked win")
if clothes_in and soap and !drawer and !door:
emit_signal("laundry_finished")
print("Should win")
return "For my next trick, I will make this pile of laundry disappear! I think that's good for now."
else:
print("Should continue")
return "Closed"
func passEvent(handler):
print("Handler laundry passed")
connect("laundry_finished", handler, "_laundry_finished")
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Washing machine door":
match selected:
"Look":
return "The door to the washing machine"
"Open":
get_parent().get_node(clicked +"/CollisionShape2D/Sprite").visible = true
door = true
return "Open."
"Close":
get_parent().get_node(clicked +"/CollisionShape2D/Sprite").visible = false
door = false
if clothes_in:
clothes.hide()
return checkWin()
else:
return checkWin()
_:
return "That doesn't really make sense."
"Drawer":
match selected:
"Look":
return "The little drawer for the soap"
"Open":
get_parent().get_node(clicked +"/CollisionShape2D/Sprite").visible = true
drawer = true
return "Open."
"Close":
get_parent().get_node(clicked +"/CollisionShape2D/Sprite").visible = false
drawer = false
if soap:
get_parent().get_node("Soap/CollisionShape2D/Sprite2").visible = false
get_parent().get_node("Soap/CollisionShape2D/Sprite").visible = true
return checkWin()
else:
return checkWin()
_:
return "That doesn't really make sense."
"Soap":
match selected:
"Look":
return "Vanilla flavored detergent. I mean, scented."
"Put in":
if drawer:
get_parent().get_node(clicked +"/CollisionShape2D/Sprite").visible = false
get_parent().get_node(clicked +"/CollisionShape2D/Sprite2").visible = true
soap = true
return "Soap loaded."
else:
return "I don't have anywhere to put it."
_:
return "That doesn't really make sense."
"Clothes":
match selected:
"Look":
return "A pile of clothes."
"Put in":
if door:
clothes.scale = Vector2(0.4,0.4)
clothes.position = Vector2(512.081,420.95)
clothes_in = true
#x 502.081, y 420.95
return "In you go."
else:
return "I don't have anywhere to put it."
_:
return "That doesn't really make sense."
extends Control
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Laundry basket":
match selected:
"Shirt", "Towel", "Pants", "Sando":
return "Into the basket you go."
"Placeholder 2":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on 2"
"Placeholder 3":
return "Using Placeholder 3 on 2"
"Placeholder 3":
match selected:
"Placeholder 1":
return "Using Placeholder 1 on 3"
"Placeholder 2":
return "Using Placeholder 1 on 3"
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
extends Control
signal eaten
#UI elements
onready var dialogue
onready var energy_bar
#ingredients
onready var bread = get_parent().get_node("Bread")
onready var egg = get_parent().get_node("Egg")
onready var granola = get_parent().get_node("Granola bar")
onready var vienna = get_parent().get_node("Vienna sausage")
onready var eat = get_parent().get_node("Eat")
onready var cook = get_parent().get_node("Cook")
# an array containing all of the selected ingredients
onready var ingredients = []
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func giveUI(dia): #passes dialogue box node
dialogue = dia
func passEvent(handler): # retrieves energy bar from event handler
energy_bar = handler.give_energy_bar()
connect("eaten",handler,"_eaten")
func _selected_ing(ingredient): # when an ingredient is selected
ingredients.append(ingredient)
print(ingredients.size())
print(ingredients)
updateUI()
func _unselected_ing(ingredient): # when an ingredient is unselected
ingredients.erase(ingredient)
if ingredients.size() == 0: # reset flavor text
dialogue.text = ""
print(ingredients.size())
print(ingredients)
updateUI()
func updateUI(): # whenever there's a change in selections
if ingredients.size() >= 1 and ingredients[0] != "Granola bar": # if anything aside from the granola bar is selected, as it can't be cooked in a recipe
granola.interactable = false
granola.modulate = Color("#616161") # turn grey
eat.hide()
match ingredients.size():
0: # reset if none is selected
granola.interactable = true
granola.modulate = Color("#ffffff")
eat.hide()
cook.hide()
1: # flavor text and options for singular ingredients
if ingredients[0] != "Egg":
eat.show()
var flavor = get_parent().get_node(ingredients[0]).flavorText
dialogue.text = flavor
match ingredients[0]:
"Bread", "Granola bar":
cook.hide()
"Egg", "Vienna sausage":
cook.show()
2: # variations on sandwich, or a non-recipe
if ingredients.has("Bread"):
if ingredients.has("Egg"):
dialogue.text = "An egg sandwich. Requires 15 energy and gives 34 energy."
elif ingredients.has("Vienna sausage"):
dialogue.text = "A sausage sandwich. Requires 12 energy and gives 30 energy."
cook.show()
else:
dialogue.text = "I don't think this makes a meal together."
cook.hide()
3: # a full sandwich
dialogue.text = "An egg and sausage sandwich. Requires 20 energy and gives 40 energy."
cook.show()
func clearFridge(): # clear out the consumed ingredients
for ing in ingredients:
get_parent().get_node(ing).queue_free()
ingredients.clear()
updateUI()
dialogue.text = "Delicious!"
func cook():
match ingredients.size():
1:
match ingredients[0]:
"Egg":
energy_bar.value += 12
"Vienna sausage":
energy_bar.value += 10
2:
if ingredients.has("Bread"):
if ingredients.has("Egg"):
energy_bar.value += 17
elif ingredients.has("Vienna sausage"):
energy_bar.value += 14
3:
energy_bar.value += 20
emit_signal("eaten")
clearFridge()
cook.hide()
func eat():
match ingredients[0]:
"Vienna sausage":
energy_bar.value += 12
"Bread":
energy_bar.value += 8
"Granola bar":
energy_bar.value += 10
emit_signal("eaten")
clearFridge()
extends Node2D
#UI elements
onready var notepad = get_parent().get_node("UI/To do")
onready var moxie = get_parent().get_node("Moxie")
onready var left = get_parent().get_node("UI/Left")
onready var right = get_parent().get_node("UI/Right")
onready var inventory = get_parent().get_node("UI/Inventory")
onready var deselect = get_parent().get_node("UI/Button")
onready var energy = get_parent().get_node("UI/Energy bar")
onready var dialogue = get_parent().get_node("UI/Dialogue Box/RichTextLabel")
#rooms
onready var bedroom = get_parent().get_node("Bedroom")
onready var kitchen = get_parent().get_node("Kitchen")
onready var laundryBasket = get_parent().get_node("Laundry basket")
onready var laundryArea = get_parent().get_node("Laundry area")
onready var laundryNotepad = get_parent().get_node("Laundry - Notepad")
onready var fridge = get_parent().get_node("Fridge")
#functioning stuff
onready var quests = notepad.get_node("Quests")
onready var groceries = false #if groceries were put away
#items in the rooms that need access to the event handler
export(Array, NodePath) onready var eventItems
# Called when the node enters the scene tree for the first time.
func _ready():
notepad.hide()
for item in eventItems:
get_node(item).passEvent(self)
connect_stools()
func zoom_in(): # for close up perspectives without some UI
moxie.hide()
inventory.hide()
left.hide()
right.hide()
deselect.hide()
func zoom_out(): # for returning from close up perspectives
moxie.show()
inventory.show()
get_parent().get_node("UI/Movement Handler").check_arrows() # show arrows depending on situation
deselect.show()
func _get_notebook(): # when To Do list is retrieved for the first time
notepad.show()
right.show()
_return_laundry()
quests.add("Eat")
func _laundry_basket(): # looking at the laundry basket view
bedroom.hide()
laundryBasket.show()
zoom_in()
func _return_laundry(): # returning from laundry basket view
laundryBasket.hide()
bedroom.show()
zoom_out()
func _open_fridge(): # looking into the fridge
kitchen.hide()
fridge.show()
zoom_in()
notepad.hide()
func _return_fridge(): # returning from fridge view
fridge.hide()
kitchen.show()
zoom_out()
notepad.show()
func connect_stools(): # connecting the two instances of the stool so that one disappears when the other is retrieved
get_parent().get_node("Laundry area/Stool").giveStool(get_parent().get_node("Kitchen/Stool"))
get_parent().get_node("Kitchen/Stool").giveStool(get_parent().get_node("Laundry area/Stool"))
func _groceries_put_away(): # when the groceries are put away
fridge.get_node("Granola bar").show()
groceries = true
laundryArea.get_node("Laundry door").flavorText = "I think I'm still missing something..."
func give_energy_bar(): # returns energy bar node
return energy
func _enter_notebook_laundry():
if groceries:
dialogue.text = "Alright, lets do this!"
laundryArea.hide()
laundryNotepad.show()
zoom_in()
notepad._open_UI()
notepad.get_node("Quests").hide()
notepad.get_node("Title").text = "Words"
var notepad_words = notepad.get_node("Words")
notepad_words.show()
notepad_words.add_item("Open")
notepad_words.add_item("Close")
notepad_words.add_item("Turn on")
notepad_words.add_item("Put in")
notepad_words.add_item("Look")
else:
dialogue.text = "The groceries are still in the way."
func _laundry_finished():
print("Finished laundry")
quests.finishQuest("Do laundry")
func _return_laundry_notepad():
zoom_out()
laundryArea.show()
laundryNotepad.hide()
notepad._open_UI()
notepad.get_node("Quests").show()
notepad.get_node("Title").text = "To do"
notepad.get_node("Words").hide()
notepad.get_node("Words").clear()
func _eaten():
quests.finishQuest("Eat")
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment