Commit 4d56fd84 authored by Julia Santos's avatar Julia Santos

Added laundry notepad section

parent 22686a7e
source_md5="a819c944b40f54ec5e965ae44dfd2abb"
dest_md5="e8c7222a4bd688561652eb8061b2471c"
source_md5="65b9c1afa5f7feece50f78936afdbc20"
dest_md5="85e2c20b2a27b573d917f0a26e7fd249"
extends Control
signal notebook_laundry
# Called when the node enters the scene tree for the first time.
func _ready():
......@@ -7,8 +8,16 @@ func _ready():
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
match clicked:
"Laundry door":
return "The groceries are still in the way."
match selected:
"To do list":
emit_signal("notebook_laundry")
return ""
_:
"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:
print("Should win")
return "For my next trick, I will make this pile of laundry disappear! I think that's good for now."
emit_signal("laundry_finished")
else:
print("Should continue")
return "Closed"
func passEvent(handler):
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."
......@@ -7,17 +7,19 @@ 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
......@@ -76,7 +78,40 @@ func connect_stools(): # connecting the two instances of the stool so that one d
func _groceries_put_away(): # when the groceries are put away
fridge.get_node("Granola bar").show()
laundryArea.get_node("Laundry door").flavorText = "Open sesame!"
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():
quests.remove(quests.find("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()
extends "res://Item.gd"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func overrideInventory(inv):
inventory = inv
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=19 format=2]
[ext_resource path="res://assets/Placeholder BGs/laundry drawer open.png" type="Texture" id=1]
[ext_resource path="res://assets/Placeholder BGs/laundry all close.png" type="Texture" id=2]
[ext_resource path="res://assets/Thesis Clickables/soap.png" type="Texture" id=3]
[ext_resource path="res://Dialogue control - Laundry notepad.gd" type="Script" id=4]
[ext_resource path="res://Item - Notepad.gd" type="Script" id=5]
[ext_resource path="res://assets/Thesis Clickables/drawer.png" type="Texture" id=6]
[ext_resource path="res://assets/Thesis Clickables/washing machine.png" type="Texture" id=7]
[ext_resource path="res://assets/Thesis Clickables/soap pour.png" type="Texture" id=8]
[ext_resource path="res://assets/Thesis Clickables/clothes pile.png" type="Texture" id=9]
[ext_resource path="res://Return_laundry_notepad.gd" type="Script" id=10]
[ext_resource path="res://assets/Thesis Clickables/return arrow.png" type="Texture" id=11]
[sub_resource type="StreamTexture" id=1]
flags = 4
load_path = "res://.import/laundry door open.png-4b5301b83ad58821eec5d9f14596c644.stex"
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 18.1476, 18.9374 )
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 18.1476, 4.25272 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 10.1799, 3.6851 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 6.41233, 8.96647 )
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 23.0798, 13.6335 )
[sub_resource type="RectangleShape2D" id=7]
extents = Vector2( 15.414, 13.6335 )
[node name="Laundry - Notepad" type="Node2D"]
[node name="laundry all closed" type="Sprite" parent="."]
position = Vector2( 507.904, 303.285 )
scale = Vector2( 0.833181, 0.83318 )
texture = ExtResource( 2 )
__meta__ = {
"_edit_lock_": true
}
[node name="laundry door open" type="Sprite" parent="."]
visible = false
position = Vector2( 507.904, 303.285 )
scale = Vector2( 0.833181, 0.83318 )
texture = SubResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="laundry drawer open" type="Sprite" parent="."]
visible = false
position = Vector2( 507.904, 303.285 )
scale = Vector2( 0.833181, 0.83318 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="laundry drawer open2" type="Sprite" parent="."]
visible = false
position = Vector2( 507.904, 303.285 )
scale = Vector2( 0.833181, 0.83318 )
texture = ExtResource( 1 )
__meta__ = {
"_edit_lock_": true
}
[node name="Washing machine door" type="StaticBody2D" parent="."]
position = Vector2( 501.376, 426.681 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Washing machine door"]
position = Vector2( 1.07745, 0.955444 )
scale = Vector2( 5, 5 )
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="Washing machine door/CollisionShape2D"]
visible = false
position = Vector2( -9.19508, -2.97264 )
scale = Vector2( 0.200696, 0.200696 )
texture = ExtResource( 7 )
[node name="Label" type="Label" parent="Washing machine door"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Buttons" type="StaticBody2D" parent="."]
position = Vector2( 500.485, 318.882 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Buttons"]
position = Vector2( 1.07745, 0.955444 )
scale = Vector2( 5, 5 )
shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Buttons/CollisionShape2D"]
visible = false
position = Vector2( -9.19508, -2.97264 )
scale = Vector2( 0.200696, 0.200696 )
texture = ExtResource( 7 )
[node name="Label" type="Label" parent="Buttons"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Drawer" type="StaticBody2D" parent="."]
position = Vector2( 564.616, 280.38 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Drawer"]
position = Vector2( -2.33716, 0.955444 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Drawer/CollisionShape2D"]
visible = false
position = Vector2( -14.4847, -7.3775 )
scale = Vector2( 0.199722, 0.199722 )
texture = ExtResource( 6 )
[node name="Label" type="Label" parent="Drawer"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Soap" type="StaticBody2D" parent="."]
position = Vector2( 495.724, 239.782 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Soap"]
position = Vector2( 2.21564, -2.45926 )
scale = Vector2( 5, 5 )
shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Soap/CollisionShape2D"]
position = Vector2( -1.2373, 0.66748 )
scale = Vector2( 0.0213467, 0.0213467 )
texture = ExtResource( 3 )
[node name="Sprite2" type="Sprite" parent="Soap/CollisionShape2D"]
visible = false
position = Vector2( 7.78718, 0.237717 )
scale = Vector2( 0.0226359, 0.0226359 )
texture = ExtResource( 8 )
[node name="Label" type="Label" parent="Soap"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Clothes" type="StaticBody2D" parent="."]
position = Vector2( 367.529, 500.41 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Clothes"]
position = Vector2( -2.89487, 2.65125 )
scale = Vector2( 5, 5 )
shape = SubResource( 6 )
[node name="Sprite" type="Sprite" parent="Clothes/CollisionShape2D"]
position = Vector2( -0.34314, -5.59302 )
scale = Vector2( 0.050221, 0.050221 )
texture = ExtResource( 9 )
[node name="Label" type="Label" parent="Clothes"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Return" type="StaticBody2D" parent="."]
position = Vector2( 123.853, 521.599 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 10 )
__meta__ = {
"_edit_group_": true
}
interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Return"]
position = Vector2( -2.89487, 2.65125 )
scale = Vector2( 5, 5 )
shape = SubResource( 7 )
[node name="Sprite" type="Sprite" parent="Return/CollisionShape2D"]
position = Vector2( -1.10974, 0.0285645 )
scale = Vector2( 0.0338674, 0.0338674 )
texture = ExtResource( 11 )
[node name="Label" type="Label" parent="Return"]
visible = false
margin_left = -74.0
margin_top = -27.7054
margin_right = 84.0
margin_bottom = 3.29462
text = "Groceries
"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Dialogue control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
......@@ -26,7 +26,7 @@ extents = Vector2( 15.4169, 13.9691 )
[node name="Laundry area" type="Node2D"]
[node name="BG" type="Sprite" parent="."]
[node name="BG - regular" type="Sprite" parent="."]
position = Vector2( 518.958, 300.969 )
scale = Vector2( 0.825827, 0.825827 )
texture = ExtResource( 1 )
......@@ -47,8 +47,10 @@ position = Vector2( 322.984, 296.426 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 2 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "I can't get in there. These bags are in the way..."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Laundry door"]
position = Vector2( 5.63037, -53.6798 )
......@@ -83,7 +85,6 @@ __meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Gotta put these away before they go bad or I trip on them. But legs... Too short... Can't reach pantry shelves... Why did I put them so high up anyway?"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Groceries"]
position = Vector2( 4.11099, 2.53656 )
......@@ -116,7 +117,6 @@ __meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "A sturdy stool."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Stool"]
position = Vector2( 1.25211, 0.295086 )
......
extends StaticBody2D
# 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 "res://Main.gd"
# Called when the node enters the scene tree for the first time.
func _ready():
inventory = get_parent().get_node("UI/To do/Words")
passUI()
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
[gd_scene load_steps=22 format=2]
[gd_scene load_steps=25 format=2]
[ext_resource path="res://Test room 1.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2]
......@@ -17,6 +17,8 @@
[ext_resource path="res://To do UI.gd" type="Script" id=15]
[ext_resource path="res://To do hitbox.gd" type="Script" id=16]
[ext_resource path="res://Fridge.tscn" type="PackedScene" id=17]
[ext_resource path="res://Laundry - Notepad.tscn" type="PackedScene" id=18]
[ext_resource path="res://Main - Notepad.gd" type="Script" id=19]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.984314, 0.847059, 0.435294, 1 )
......@@ -24,10 +26,12 @@ bg_color = Color( 0.984314, 0.847059, 0.435294, 1 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 143.453, 196.701 )
[sub_resource type="StyleBoxFlat" id=3]
bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
[sub_resource type="StyleBoxEmpty" id=3]
[sub_resource type="StyleBoxFlat" id=4]
bg_color = Color( 0.466667, 0.631373, 0.168627, 1 )
[sub_resource type="StyleBoxFlat" id=5]
bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Node2D" type="Node2D"]
......@@ -57,10 +61,15 @@ visible = false
script = ExtResource( 4 )
items = [ NodePath("Bread"), NodePath("Egg"), NodePath("Granola bar"), NodePath("Vienna sausage"), NodePath("Return"), NodePath("Cook"), NodePath("Eat") ]
[node name="Laundry - Notepad" parent="." instance=ExtResource( 18 )]
visible = false
script = ExtResource( 19 )
items = [ NodePath("Washing machine door"), NodePath("Drawer"), NodePath("Soap"), NodePath("Clothes"), NodePath("Return") ]
[node name="Event Handler" type="Node2D" parent="."]
position = Vector2( 460.602, 18.6417 )
script = ExtResource( 12 )
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler") ]
eventItems = [ NodePath("../Laundry basket/To do list"), NodePath("../Bedroom/Laundry basket"), NodePath("../Laundry basket/Return"), NodePath("../Fridge/Return"), NodePath("../Kitchen/Fridge"), NodePath("../Laundry area/Groceries"), NodePath("../Fridge/Energy handler"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return") ]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
......@@ -82,9 +91,9 @@ __meta__ = {
}
[node name="To do" type="Panel" parent="UI"]
margin_left = 474.79
margin_left = 474.699
margin_top = 140.82
margin_right = 761.79
margin_right = 761.699
margin_bottom = 533.82
custom_styles/panel = SubResource( 1 )
script = ExtResource( 15 )
......@@ -123,7 +132,24 @@ script = ExtResource( 11 )
__meta__ = {
"_edit_use_anchors_": false
}
quests = PoolStringArray( "Do Lab", "Laundry" )
quests = PoolStringArray( "Do laundry" )
[node name="Words" type="ItemList" parent="UI/To do"]
anchor_right = 0.267
margin_left = 58.0
margin_top = 47.0
margin_right = 165.371
margin_bottom = 154.0
rect_clip_content = false
custom_styles/bg = SubResource( 3 )
custom_colors/font_color_selected = Color( 0, 0, 0, 1 )
custom_colors/font_color = Color( 0, 0, 0, 1 )
custom_constants/vseparation = 10
custom_constants/hseparation = 20
max_columns = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Inventory" type="ItemList" parent="UI"]
margin_left = -201.361
......@@ -214,8 +240,8 @@ margin_left = -197.122
margin_top = -367.765
margin_right = 235.878
margin_bottom = -325.765
custom_styles/fg = SubResource( 3 )
custom_styles/bg = SubResource( 4 )
custom_styles/fg = SubResource( 4 )
custom_styles/bg = SubResource( 5 )
value = 50.0
percent_visible = false
__meta__ = {
......@@ -229,3 +255,4 @@ __meta__ = {
[editable path="Laundry basket"]
[editable path="Laundry area"]
[editable path="Fridge"]
[editable path="Laundry - Notepad"]
extends "res://Item.gd"
signal returnLaundry
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
func passEvent(handler):
connect("returnLaundry", handler, "_return_laundry_notepad")
func mouseInteraction():
emit_signal("returnLaundry")
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/drawer.png-76040f8c09c11ec32d13aebda6e0b436.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Thesis Clickables/drawer.png"
dest_files=[ "res://.import/drawer.png-76040f8c09c11ec32d13aebda6e0b436.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/washing machine.png-611786a63ca1e8a8bff88f51a64152e3.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Thesis Clickables/washing machine.png"
dest_files=[ "res://.import/washing machine.png-611786a63ca1e8a8bff88f51a64152e3.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
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