Commit 3b7b285a authored by Julia Santos's avatar Julia Santos

Started coding movement, currently disabled. Added shovel to kitchen cabinet....

Started coding movement, currently disabled. Added shovel to kitchen cabinet. Can now fill tabo with water if the sink is clean.
parent 8f6fd4dd
......@@ -15,6 +15,7 @@ onready var dialogue = get_parent().get_node("UI/Dialogue Box/RichTextLabel")
onready var movementHandle = get_parent().get_node("UI/Movement Handler") # not a UI element, just the node that handles the left/right movement between rooms
onready var cutsceneHandler = get_parent().get_node("Cutscenes") # node that has all the cutscenes under it
onready var pathHandler = get_parent().get_node("Moxie/Path2D/PathFollow2D") # node that controls the room's path
#rooms
onready var bedroom = get_parent().get_node("Bedroom")
......@@ -86,6 +87,7 @@ func _start_lab(): # trying the lab the first time, adds the new quests
quests.add("Repot plants")
quests.add("Figure out what's making that noise & get rid of it")
quests.add("Feed Banana")
quests.add("Do Yoga")
newQuests = true
movementHandle.finishTutorial()
get_parent().get_node("Desk/Laptop").start()
......@@ -184,6 +186,7 @@ func _return_laundry_notepad(): # exiting laundry notebook puzzle
notepad.get_node("Quests").show()
notepad.get_node("Title").text = "To do"
notepad.get_node("Words").hide()
movementHandle.checkRoom()
# ----------------- Movement-related events (traversing between rooms, locking/unlocking, etc) -----------------
func _bathroom_enter(): # entering bathroom
......@@ -232,6 +235,7 @@ func _hallway_to_neighbor(): # moving from hallway to neighbor's living room
func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway
hallway.show()
neighborsRoom.hide()
movementHandle.checkRoom()
func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony
movementHandle.disableMovement()
......@@ -241,6 +245,7 @@ func _neighbor_to_balcony(): # moving from neighbor's living room to their balco
func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room
neighborsRoom.show()
neighborsBalcony.hide()
movementHandle.checkRoom()
# ----------------- Zooming in and out of specific views -----------------
func zoom_in(): # for close up perspectives without some UI
......@@ -258,6 +263,7 @@ func zoom_out(): # for returning from close up perspectives
#get_parent().get_node("UI/Movement Handler").check_arrows() # show arrows depending on situation
movementHandle.enableMovement()
deselect.show()
movementHandle.checkRoom()
func _laundry_basket(): # looking at the laundry basket view
bedroom.hide()
......
......@@ -6,6 +6,7 @@ extends StaticBody2D
onready var dialogueBox # the dialogue box node, with a RichTextLabel inside
onready var inventory # the inventory
onready var quests # the actual Quests node
onready var path
#variables that are editable in the Inspector
export(bool) var retrievable # check if this item can be placed in the inventory
......@@ -23,10 +24,11 @@ onready var texture # the texture of the items's sprite, for passing to inventor
func _ready():
texture = get_node("CollisionShape2D/Sprite").get_texture()
func passUI(inv, dia, que): #passes the inventory and dialogue box from the parent scene to the item in the instanced scene
func passUI(inv, dia, que, pa): #passes the inventory and dialogue box from the parent scene to the item in the instanced scene
inventory = inv
dialogueBox = dia
quests = que
path = pa
#print("Found " + dialogueBox.get_name())
func _input_event(viewport, event, shape_idx): # executes when clicked on
......@@ -45,6 +47,8 @@ func _input_event(viewport, event, shape_idx): # executes when clicked on
elif interactable: #for environment things that arent retrievable, and hands are empty
storeClick("Clicked on") # sends the data for mouse tracking
mouseInteraction()
if get_name() != "Return":
path.move(position.x)
#get_tree().set_input_as_handled()
func storeClick(method): # stores the mouse click data to data.save
......
......@@ -19,6 +19,9 @@ load_path = "res://.import/laundry door open.png-4b5301b83ad58821eec5d9f14596c64
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 18.1476, 15.0675 )
[sub_resource type="RectangleShape2D" id=8]
extents = Vector2( 24.0534, 14.1028 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 18.1476, 4.25272 )
......@@ -28,9 +31,6 @@ extents = Vector2( 10.1799, 3.6851 )
[sub_resource type="RectangleShape2D" id=5]
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 )
......@@ -105,6 +105,39 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Clothes" type="StaticBody2D" parent="."]
position = Vector2( 252.376, 456.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="Clothes"]
position = Vector2( 1.07745, 4.57318 )
scale = Vector2( 5, 5 )
shape = SubResource( 8 )
[node name="Sprite" type="Sprite" parent="Clothes/CollisionShape2D"]
position = Vector2( -0.830688, -5.5271 )
scale = Vector2( 0.051844, 0.051844 )
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="Buttons" type="StaticBody2D" parent="."]
position = Vector2( 433.485, 338.882 )
scale = Vector2( 0.829244, 0.829244 )
......@@ -212,39 +245,6 @@ __meta__ = {
"_edit_use_anchors_": false
}
[node name="Clothes" type="StaticBody2D" parent="."]
position = Vector2( 281.529, 506.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( 95.853, 523.599 )
scale = Vector2( 0.829244, 0.829244 )
......
......@@ -80,7 +80,7 @@ scale = Vector2( 0.264548, 0.403654 )
texture = ExtResource( 7 )
[node name="Plants" type="StaticBody2D" parent="."]
position = Vector2( 910.59, 339.239 )
position = Vector2( 453.418, 369.4 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
......@@ -88,7 +88,7 @@ __meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Plants"
flavorText = "Plants don't complain. So you gotta check on them every now and then. These are in terrible condition though, they're so dry!"
[node name="CollisionShape2D" type="CollisionShape2D" parent="Plants"]
position = Vector2( -16.8367, -2.11676 )
......@@ -101,15 +101,15 @@ scale = Vector2( 0.201448, 0.330516 )
texture = ExtResource( 4 )
[node name="Yoga mat" type="StaticBody2D" parent="."]
position = Vector2( 497.935, 341.617 )
position = Vector2( 939.233, 381.302 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 5 )
__meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "There it is!"
interactable = true
flavorText = "Why is the Living Room so crowded? It's like a jungle in here! I can barely move... I don't think I can do my yoga like this."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Yoga mat"]
position = Vector2( -16.8367, -2.11676 )
......@@ -122,7 +122,7 @@ scale = Vector2( 0.13548, 0.301834 )
texture = ExtResource( 2 )
[node name="Lab notes" type="StaticBody2D" parent="."]
position = Vector2( 953.401, 448.646 )
position = Vector2( 545.439, 442.296 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 10 )
......
......@@ -155,7 +155,7 @@ scale = Vector2( 0.0526986, 0.1 )
texture = ExtResource( 11 )
[node name="Neighbor to hallway" type="StaticBody2D" parent="."]
position = Vector2( -517.179, -42.3673 )
position = Vector2( -499.826, -30.3537 )
scale = Vector2( 0.829244, 0.829244 )
input_pickable = true
script = ExtResource( 9 )
......
......@@ -7,7 +7,7 @@
[ext_resource path="res://assets/Thesis Clickables/trail 1.png" type="Texture" id=5]
[ext_resource path="res://assets/Thesis Clickables/trail 2.png" type="Texture" id=6]
[ext_resource path="res://Item.gd" type="Script" id=7]
[ext_resource path="res://assets/Thesis Clickables/clothes pile.png" type="Texture" id=8]
[ext_resource path="res://assets/Thesis Clickables/placeholder.png" type="Texture" id=8]
[ext_resource path="res://Scripts/Laundry basket.gd" type="Script" id=9]
[ext_resource path="res://Scripts/Movement scripts/Bathroom door.gd" type="Script" id=10]
[ext_resource path="res://Scripts/Laptop.gd" type="Script" id=11]
......@@ -28,7 +28,7 @@ flags = 4
load_path = "res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 16.0697, 9.41678 )
extents = Vector2( 4.30936, 4.09181 )
[sub_resource type="RectangleShape2D" id=6]
extents = Vector2( 16.0423, 12.4535 )
......@@ -111,6 +111,7 @@ texture = ExtResource( 2 )
[node name="Terrarium" type="StaticBody2D" parent="."]
position = Vector2( 463.667, 393.29 )
z_index = 1
input_pickable = true
script = ExtResource( 12 )
__meta__ = {
......@@ -129,24 +130,24 @@ position = Vector2( -0.158142, -0.0184937 )
scale = Vector2( 0.222636, 0.101337 )
texture = SubResource( 4 )
[node name="Pile of clothes" type="StaticBody2D" parent="."]
position = Vector2( 6.41483, 285.765 )
[node name="Cellphone" type="StaticBody2D" parent="."]
position = Vector2( 18.3069, 301.225 )
input_pickable = true
script = ExtResource( 7 )
__meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Augh my back. That's a lot of clothes."
retrievable = true
flavorText = "I would've called it to find it but I always put it on silent. And I only have one phone."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Pile of clothes"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Cellphone"]
position = Vector2( 0.842377, -0.977234 )
scale = Vector2( 5, 5 )
shape = SubResource( 5 )
[node name="Sprite" type="Sprite" parent="Pile of clothes/CollisionShape2D"]
position = Vector2( -0.2771, -3.84143 )
scale = Vector2( 0.033227, 0.0334515 )
[node name="Sprite" type="Sprite" parent="Cellphone/CollisionShape2D"]
position = Vector2( -0.395996, 0.0830078 )
scale = Vector2( 0.0415515, 0.0393975 )
texture = ExtResource( 8 )
[node name="Laptop" type="StaticBody2D" parent="."]
......
......@@ -6,6 +6,7 @@ extends Node2D
onready var dialogueBox = get_parent().get_node("UI/Dialogue Box/RichTextLabel")
onready var inventory = get_parent().get_node("UI/Inventory")
onready var quests = get_parent().get_node("UI/To do/Quests")
onready var path = get_parent().get_node("Moxie/Path2D/PathFollow2D")
#variables that are editable in the Inspector
export(Array, NodePath) onready var items
......@@ -25,7 +26,7 @@ func _ready(): # Called when the node enters the scene tree for the first time.
func passUI(): # gives reference to the nodes to each item in the room
var totalItems = 0
for item in items:
get_node(item).passUI(inventory,dialogueBox, quests)
get_node(item).passUI(inventory,dialogueBox, quests, path)
totalItems = totalItems + 1
#print("Passed UI to " + get_node(item).get_name())
print(get_name() + ": Passed UI to " + str(totalItems) + " items")
......
......@@ -4,6 +4,7 @@ onready var rooms = [self.owner.get_node("Bedroom"), self.owner.get_node("Laundr
onready var current # index of the room Moxie is currently in
onready var left = get_parent().get_node("Left")
onready var right = get_parent().get_node("Right")
onready var moxiePath = get_parent().get_parent().get_node("Moxie/Path2D/PathFollow2D")
onready var tutorial = true
......@@ -21,6 +22,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
right.hide()
if current >= 1:
left.show()
checkRoom()
print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen
......@@ -32,6 +34,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr
left.hide()
if current < rooms.size() - 1:
right.show()
checkRoom()
print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func check_arrows():
......@@ -43,9 +46,15 @@ func check_arrows():
func disableMovement(): # disables right and left arrow movement
right.hide()
left.hide()
checkRoom()
func enableMovement(): # enables right and left arrow movement
check_arrows()
checkRoom()
func finishTutorial():
tutorial = false
func checkRoom():
moxiePath.set_path(rooms[current].get_name())
moxiePath.hardMove(0)
extends PathFollow2D
onready var target = 0
export(bool) onready var moving
# Called when the node enters the scene tree for the first time.
func _ready():
set_path("Bedroom")
pass
func set_path(room):
print("Checking path set")
var roomPath = "res://Paths/" + room + ".tres"
var dir = Directory.new()
if dir.file_exists(roomPath):
get_parent().set_curve(load(roomPath))
print("Found path set")
else:
print("Error finding room path")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if moving:
if offset < target:
offset += 10
elif offset > target:
offset -= 10
elif offset == target:
pass
func move(pt):
if moving:
target = stepify(pt,10)
func hardMove(offs):
if moving:
offset = offs
target = offs
[gd_scene load_steps=36 format=2]
[gd_scene load_steps=38 format=2]
[ext_resource path="res://Main rooms/Test room 1.tscn" type="PackedScene" id=1]
[ext_resource path="res://assets/189066690_228150108704696_3850052974465333899_n.png" type="Texture" id=2]
......@@ -29,6 +29,8 @@
[ext_resource path="res://Main rooms/Living room.tscn" type="PackedScene" id=27]
[ext_resource path="res://Cutscenes/Cutscene 2.tscn" type="PackedScene" id=28]
[ext_resource path="res://Cutscenes/Cutscene 2b.tscn" type="PackedScene" id=29]
[ext_resource path="res://MoxieSprite.gd" type="Script" id=30]
[ext_resource path="res://Paths/Bedroom.tres" type="Curve2D" id=31]
[sub_resource type="Animation" id=1]
resource_name = "Notepad open"
......@@ -64,7 +66,7 @@ bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
[node name="Bedroom" parent="." instance=ExtResource( 1 )]
script = ExtResource( 4 )
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes"), NodePath("Bathroom door"), NodePath("Terrarium") ]
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Cellphone"), NodePath("Bathroom door"), NodePath("Terrarium") ]
[node name="Sprite" parent="Bedroom/BG/CollisionShape2D" index="0"]
position = Vector2( 1.934, -0.980774 )
......@@ -108,7 +110,7 @@ items = [ NodePath("Mirror"), NodePath("Lab Note - Bathroom"), NodePath("Toilet"
[node name="Inside cabinet" parent="." instance=ExtResource( 21 )]
visible = false
script = ExtResource( 4 )
items = [ NodePath("Lab notes"), NodePath("Scissors"), NodePath("Nana\'s food"), NodePath("Return") ]
items = [ NodePath("Lab notes"), NodePath("Scissors"), NodePath("Nana\'s food"), NodePath("Return"), NodePath("Shovel") ]
[node name="Living room" parent="." instance=ExtResource( 27 )]
visible = false
......@@ -140,15 +142,40 @@ 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"), NodePath("../Laundry area/Laundry door"), NodePath("../Laundry - Notepad/Return"), NodePath("../Laundry - Notepad/Dialogue control"), NodePath("../Bedroom/Bathroom door"), NodePath("../Bathroom/Door - to Bedroom"), NodePath("../Living room/Balcony door"), NodePath("../Balcony/Door to living room"), NodePath("../Living room/Front door"), NodePath("../Hallway/Door to Moxie"), NodePath("../Hallway/Door to neighbor"), NodePath("../Neighbor\'s room/Neighbor to hallway"), NodePath("../Neighbor\'s balcony/Balcony to neighbor\'s room"), NodePath("../Neighbor\'s room/Neighbor to balcony"), NodePath("../Bedroom/Laptop"), NodePath("../Desk/Return"), NodePath("../Inside cabinet/Return"), NodePath("../Kitchen/Cabinet"), NodePath("../Desk/Laptop"), NodePath("../Bedroom/Terrarium"), NodePath("../Bathroom/Lab Note - Bathroom"), NodePath("../Inside cabinet/Lab notes"), NodePath("../Living room/Lab notes"), NodePath("../Bedroom/Pants"), NodePath("../Bedroom/Shirt"), NodePath("../Bedroom/Sando"), NodePath("../Bedroom/Towel"), NodePath("../Bathroom/Sink"), NodePath("../Bathroom/Toilet"), NodePath("../Bathroom/Mirror"), NodePath("../Bathroom/Mess on floor"), NodePath("../Hallway/Trash chute"), NodePath("../Neighbor\'s room/Ladder") ]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
[node name="Moxie" type="Control" parent="."]
margin_left = 513.815
margin_top = 370.076
margin_right = 553.815
margin_bottom = 410.076
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Path2D" type="Path2D" parent="Moxie"]
position = Vector2( 5.94604, 27.3518 )
curve = ExtResource( 31 )
__meta__ = {
"_edit_group_": true
}
[node name="PathFollow2D" type="PathFollow2D" parent="Moxie/Path2D"]
position = Vector2( -303.981, -3.4472 )
rotation = 0.28771
v_offset = -80.0
rotate = false
loop = false
script = ExtResource( 30 )
[node name="Sprite" type="Sprite" parent="Moxie/Path2D/PathFollow2D"]
position = Vector2( -58.278, -40.2653 )
rotation = -0.28771
scale = Vector2( 0.349515, 0.349515 )
texture = ExtResource( 2 )
[node name="Camera2D" type="Camera2D" parent="Moxie"]
[node name="Camera2D" type="Camera2D" parent="Moxie/Path2D/PathFollow2D/Sprite"]
visible = false
position = Vector2( 860.161, -240.572 )
scale = Vector2( 2.86111, 2.86111 )
current = true
[node name="UI" type="Control" parent="."]
margin_left = 214.0
......@@ -186,11 +213,11 @@ anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 13.0
margin_top = 16.0
margin_right = 113.0
margin_right = 265.0
margin_bottom = 116.0
mouse_filter = 2
custom_colors/default_color = Color( 0, 0, 0, 1 )
text = "To Do:"
text = "To Do: (click to expand)"
__meta__ = {
"_edit_use_anchors_": false
}
......
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, 386.948, 56.3363, 0, 0, 0, 0, 345.326, 52.7687, 0, 0, 0, 0, 291.812, 71.796, 0, 0, 0, 0, 247.811, 81.3097, 0, 0, 0, 0, 203.811, 87.2557, 0, 0, 0, 0, 120.566, 97.9586, 0, 0, 0, 0, 38.5109, 80.1205, 0, 0, 0, 0, -19.7603, 78.9313, 0, 0, 0, 0, -110.14, 82.4989, 0, 0, 0, 0, -188.628, 77.742, 0, 0, 0, 0, -226.682, 84.8773, 0, 0, 0, 0, -273.061, 84.8773, 0, 0, 0, 0, -325.386, 93.2018, 0, 0, 0, 0, -455.01, 87.2557 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -452.632, 53.9579, 0, 0, 0, 0, -309.927, 25.4169, 0, 0, 0, 0, -263.548, 20.6601, 0, 0, 0, 0, -201.709, 53.9579, 0, 0, 0, 0, -104.194, 58.7148, 0, 0, 0, 0, -0.732971, 56.3363, 0, 0, 0, 0, 48.0245, 88.4449, 0, 0, 0, 0, 108.674, 114.607, 0, 0, 0, 0, 160.999, 122.932, 0, 0, 0, 0, 250.19, 107.472, 0, 0, 0, 0, 308.461, 78.9312, 0, 0, 0, 0, 422.625, 65.85 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -451.866, 78.4294, 0, 0, 0, 0, -338.891, 84.3754, 0, 0, 0, 0, -185.484, 84.3754, 0, 0, 0, 0, -53.4815, 87.9431, 0, 0, 0, 0, 28.5738, 74.8618, 0, 0, 0, 0, 105.872, 98.6459, 0, 0, 0, 0, 171.279, 108.16, 0, 0, 0, 0, 281.875, 97.4567, 0, 0, 0, 0, 348.47, 71.2942, 0, 0, 0, 0, 385.336, 17.7798 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -303.981, 76.5528, 0, 0, 0, 0, -150.573, 102.715, 0, 0, 0, 0, -79.2206, 105.094, 0, 0, 0, 0, 18.2943, 105.094, 0, 0, 0, 0, 55.9256, 77.2402, 0, 0, 0, 0, 80.1331, 70.6068, 0, 0, 0, 0, 102.305, 68.9158, 0, 0, 0, 0, 178.837, 49.2011, 0, 0, 0, 0, 332.245, 36.1198, 0, 0, 0, 0, 398.841, 19.4709, 0, 0, 0, 0, 438.084, -18.5837 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -478.794, 175.257, 0, 0, 0, 0, -334.9, 178.825, 0, 0, 0, 0, -208.844, 172.879, 0, 0, 0, 0, -41.166, 171.689, 0, 0, 0, 0, 65.8626, 170.5, 0, 0, 0, 0, 143.161, 169.311, 0, 0, 0, 0, 241.865, 169.311, 0, 0, 0, 0, 348.894, 162.176, 0, 0, 0, 0, 410.733, 162.176, 0, 0, 0, 0, 466.625, 162.176 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -432.415, 130.067, 0, 0, 0, 0, -365.82, 118.175, 0, 0, 0, 0, -263.548, 133.635, 0, 0, 0, 0, -125.6, 133.635, 0, 0, 0, 0, 72.9979, 128.878, 0, 0, 0, 0, 175.27, 105.094, 0, 0, 0, 0, 247.811, 107.472, 0, 0, 0, 0, 335.813, 118.175, 0, 0, 0, 0, 477.328, 114.607 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -19.7603, 111.04, 0, 0, 0, 0, -103.005, 113.418, 0, 0, 0, 0, -129.167, 151.473, 0, 0, 0, 0, -244.52, 176.446 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -415.766, 126.5, 0, 0, 0, 0, -315.873, 125.31, 0, 0, 0, 0, -185.06, 128.878, 0, 0, 0, 0, -66.1393, 124.121, 0, 0, 0, 0, 37.3217, 124.121, 0, 0, 0, 0, 95.5928, 137.202, 0, 0, 0, 0, 122.945, 159.797, 0, 0, 0, 0, 201.432, 162.176, 0, 0, 0, 0, 339.38, 165.743, 0, 0, 0, 0, 473.761, 163.365 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -497.822, 109.851, 0, 0, 0, 0, -445.496, 102.715, 0, 0, 0, 0, -368.198, 92.0125, 0, 0, 0, 0, -293.278, 87.2557, 0, 0, 0, 0, -243.331, 105.094, 0, 0, 0, 0, -185.06, 116.986, 0, 0, 0, 0, -82.7883, 120.553, 0, 0, 0, 0, -30.4631, 116.986, 0, 0, 0, 0, 75.3763, 86.0665, 0, 0, 0, 0, 136.026, 44.4442, 0, 0, 0, 0, 206.189, 46.8227, 0, 0, 0, 0, 246.622, 56.3363, 0, 0, 0, 0, 293.001, 101.526, 0, 0, 0, 0, 341.759, 115.797, 0, 0, 0, 0, 415.49, 125.31, 0, 0, 0, 0, 454.733, 137.202 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -455.01, 77.742, 0, 0, 0, 0, -384.847, 68.2284, 0, 0, 0, 0, -303.981, 71.796, 0, 0, 0, 0, -250.466, 78.9312, 0, 0, 0, 0, -181.492, 77.742, 0, 0, 0, 0, -145.816, 74.1744 )
}
[gd_resource type="Curve2D" format=2]
[resource]
_data = {
"points": PoolVector2Array( 0, 0, 0, 0, -419.334, 132.446, 0, 0, 0, 0, -339.657, 136.013, 0, 0, 0, 0, -281.386, 141.959, 0, 0, 0, 0, -200.52, 149.094, 0, 0, 0, 0, -119.654, 141.959, 0, 0, 0, 0, -36.4092, 121.743, 0, 0, 0, 0, 13.5375, 127.689, 0, 0, 0, 0, 90.8359, 140.77, 0, 0, 0, 0, 188.351, 141.959, 0, 0, 0, 0, 314.407, 96.7694, 0, 0, 0, 0, 373.867, 30.1738 )
}
extends "res://Item.gd"
signal retrieved
onready var eventHandler
onready var clothesTexture = get_parent().get_node("Pile of clothes/CollisionShape2D/Sprite").get_texture()
# This script allows for the different pieces of clothing on the floor to be stacked, combining into one general pile of dirty clothes
......@@ -15,7 +14,7 @@ func passEvent(handler):
func pickup():
if (eventHandler.get_clothes() == 0):
inventory.add_item("Dirty clothes", clothesTexture)
inventory.add_item("Dirty clothes", load("res://.import/clothes pile.png-0e9642e1068a37424f7c246204716908.stex"))
dialogueBox.text = flavorText
queue_free()
inventory.unselect_all()
......
......@@ -20,8 +20,8 @@ func _ready():
connect("cook", get_parent().get_node("Energy handler"), "_cook")
connect("eat", get_parent().get_node("Energy handler"), "_eat")
func passUI(inv, dia, que):
.passUI(inv, dia, que)
func passUI(inv, dia, que, pa):
.passUI(inv, dia, que, pa)
get_parent().get_node("Energy handler").giveUI(dia)
func mouseInteraction():
......
......@@ -14,6 +14,7 @@ func objInteraction(selected): # when an object is used on it
var flavor = control.interaction(inventory.get_item_text(selected), self.get_name())
if inventory.get_item_text(selected) == "Oil":
dialogueBox.text = "That should stop the ladder from squeaking."
inventory.remove_item(selected)
emit_signal("oiled","Figure out what's making that noise & get rid of it")
flavorText = "D-do you hear that? I-Is that.... Silence...? Hay salamat!"
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
......
......@@ -22,8 +22,15 @@ func objInteraction(selected):
emit_signal("cleaned", "Cleaning mat")
clean = true
else: # trying to clean it again
dialogueBox.text = "I cleaned that already!"
dialogueBox.text = "Tap water's pretty clean around these parts."
elif inventory.get_item_text(selected) == "Tabo":
if clean:
inventory.add_item("Tabo with water", load("res://.import/placeholder item.png-cd6e4c1231156687d87915032ec4361d.stex"))
# replace this with a sprite of the tabo with water later
inventory.remove_item(selected)
dialogueBox.text = "Hydration."
else:
dialogueBox.text = "No way! I am not sticking my hand into that!"
elif typeof(flavor) != 0: #checks if there's coded flavor text for this interaction
dialogueBox.text = flavor
else:
......
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=14 format=2]
[ext_resource path="res://assets/Thesis Clickables/Lab Notes.png" type="Texture" id=1]
[ext_resource path="res://Item.gd" type="Script" id=2]
......@@ -7,17 +7,21 @@
[ext_resource path="res://Scripts/Dialogue control/Dialogue Control - Inside cabinet.gd" type="Script" id=5]
[ext_resource path="res://Scripts/Movement scripts/Return_cabinet.gd" type="Script" id=6]
[ext_resource path="res://Lab Note.gd" type="Script" id=7]
[ext_resource path="res://assets/placeholder.png" type="Texture" id=8]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 10.2686, 10.4499 )
[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 16.2132, 16.4708 )
extents = Vector2( 10.2686, 10.4499 )
[sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 16.2132, 16.4708 )
[sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 17.4279, 15.7667 )
[sub_resource type="StreamTexture" id=4]
[sub_resource type="StreamTexture" id=5]
flags = 4
load_path = "res://.import/return arrow.png-ba7c2fea6c5a220a249845f29bbe9177.stex"
......@@ -54,6 +58,24 @@ position = Vector2( 0.178162, -0.0184937 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 1 )
[node name="Shovel" type="StaticBody2D" parent="."]
position = Vector2( -118.542, -165.117 )
input_pickable = true
script = ExtResource( 2 )
__meta__ = {
"_edit_group_": true
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="Shovel"]
position = Vector2( -0.433167, 2.2196 )
scale = Vector2( 5, 5 )
shape = SubResource( 2 )
[node name="Sprite" type="Sprite" parent="Shovel/CollisionShape2D"]
position = Vector2( 0.178162, -0.0184937 )
scale = Vector2( 0.101337, 0.101337 )
texture = ExtResource( 8 )
[node name="Scissors" type="StaticBody2D" parent="."]
position = Vector2( -233.195, 101.987 )
input_pickable = true
......@@ -87,7 +109,7 @@ flavorText = "Finally, some food for Banana."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Nana\'s food"]
position = Vector2( -0.433167, 2.2196 )
scale = Vector2( 5, 5 )
shape = SubResource( 2 )
shape = SubResource( 3 )
[node name="Sprite" type="Sprite" parent="Nana\'s food/CollisionShape2D"]
position = Vector2( 0.178162, -0.0184937 )
......@@ -107,9 +129,9 @@ interactable = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="Return"]
position = Vector2( -2.31012, 0.749359 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
shape = SubResource( 4 )
[node name="Sprite" type="Sprite" parent="Return/CollisionShape2D"]
position = Vector2( -0.670166, 0.427979 )
scale = Vector2( 0.0395079, 0.0395079 )
texture = SubResource( 4 )
texture = SubResource( 5 )
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