Commit 66f2a6e8 authored by Julia Santos's avatar Julia Santos

Made it so that moxie was in a different position for each room

parent 3de1862f
...@@ -264,6 +264,7 @@ func _plants_finished(): ...@@ -264,6 +264,7 @@ func _plants_finished():
#quests.finishQuest("Repot plants") #quests.finishQuest("Repot plants")
livingRoom.get_node("Plants").interactable = false livingRoom.get_node("Plants").interactable = false
livingRoom.get_node("Plants").retrievable = true livingRoom.get_node("Plants").retrievable = true
livingRoom.get_node("Yoga mat").interactable = true
livingRoom.get_node("Plants").flavorText = "Time to bring these outside for some sunlight!" livingRoom.get_node("Plants").flavorText = "Time to bring these outside for some sunlight!"
livingRoom.get_node("Plants/Hitbox/Sprite").set_texture(load("res://.import/potted plant (repotted).png-3dc208dea4408a6b19d704a770115b80.stex")) livingRoom.get_node("Plants/Hitbox/Sprite").set_texture(load("res://.import/potted plant (repotted).png-3dc208dea4408a6b19d704a770115b80.stex"))
inventory.remove_item_name("Pot") inventory.remove_item_name("Pot")
...@@ -287,24 +288,28 @@ func _bathroom_enter(): # entering bathroom ...@@ -287,24 +288,28 @@ func _bathroom_enter(): # entering bathroom
bathroom.show() bathroom.show()
movementHandle.disableMovement() movementHandle.disableMovement()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Bathroom")
func _bathroom_exit(): # exiting bathroom func _bathroom_exit(): # exiting bathroom
bathroom.hide() bathroom.hide()
bedroom.show() bedroom.show()
movementHandle.enableMovement() movementHandle.enableMovement()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Bedroom")
func _balcony_enter(): # entering balcony func _balcony_enter(): # entering balcony
movementHandle.disableMovement() movementHandle.disableMovement()
balcony.show() balcony.show()
livingRoom.hide() livingRoom.hide()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Balcony")
func _balcony_exit(): # exiting balcony func _balcony_exit(): # exiting balcony
movementHandle.enableMovement() movementHandle.enableMovement()
balcony.hide() balcony.hide()
livingRoom.show() livingRoom.show()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Living Room")
func _living_to_hallway(): # moving from living room to hallway, if there's a reason to func _living_to_hallway(): # moving from living room to hallway, if there's a reason to
if ((inventory.hasItem("Trash") != -1) || foundBanana): # either Moxie has to take out the trash or has to look for Banana if ((inventory.hasItem("Trash") != -1) || foundBanana): # either Moxie has to take out the trash or has to look for Banana
...@@ -318,6 +323,7 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re ...@@ -318,6 +323,7 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re
dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls." dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls."
dialogue.playText() dialogue.playText()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Hallway")
else: else:
dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'" dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'"
dialogue.playText() dialogue.playText()
...@@ -327,30 +333,35 @@ func _hallway_to_living(): # moving from hallway to moxie's living room ...@@ -327,30 +333,35 @@ func _hallway_to_living(): # moving from hallway to moxie's living room
hallway.hide() hallway.hide()
livingRoom.show() livingRoom.show()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Living room")
func _hallway_to_neighbor(): # moving from hallway to neighbor's living room func _hallway_to_neighbor(): # moving from hallway to neighbor's living room
movementHandle.disableMovement() movementHandle.disableMovement()
hallway.hide() hallway.hide()
neighborsRoom.show() neighborsRoom.show()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Neighbor's room")
func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway
hallway.show() hallway.show()
neighborsRoom.hide() neighborsRoom.hide()
movementHandle.checkRoom() movementHandle.checkRoom()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Hallway")
func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony
movementHandle.disableMovement() movementHandle.disableMovement()
neighborsRoom.hide() neighborsRoom.hide()
neighborsBalcony.show() neighborsBalcony.show()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Neighbor's balcony")
func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room
neighborsRoom.show() neighborsRoom.show()
neighborsBalcony.hide() neighborsBalcony.hide()
movementHandle.checkRoom() movementHandle.checkRoom()
inventory.unselect_all() inventory.unselect_all()
movementHandle.getRoomPosition("Neighbor's room")
# ----------------- Zooming in and out of specific views ----------------- # ----------------- Zooming in and out of specific views -----------------
func zoom_in(): # for close up perspectives without some UI func zoom_in(): # for close up perspectives without some UI
......
extends "res://Item.gd" extends "res://Item.gd"
signal retrieved signal retrieved
onready var num = 1
onready var eventHandler onready var eventHandler
# This script is a general use script for the different lab notes, signals to the event handler to add another note to the count # This script is a general use script for the different lab notes, signals to the event handler to add another note to the count
# This script also allows for the lab notes to stack instead of showing up in the inventory one by one # This script also allows for the lab notes to stack instead of showing up in the inventory one by one
...@@ -13,12 +14,21 @@ func passEvent(handler): ...@@ -13,12 +14,21 @@ func passEvent(handler):
connect("retrieved", handler,"_add_lab_note") connect("retrieved", handler,"_add_lab_note")
func pickup(): func pickup():
if (eventHandler.get_lab_notes() == 0): # if this is the first lab note, add a generic lab note item to inventory if (eventHandler.get_lab_notes() == 0): # if this is the first lab note, add a generic lab note item to inventory
inventory.add_item("Lab Notes", texture) inventory.add_item("Lab Notes", texture)
else:
num += 1
if get_name() == "Lab Note - Bathroom": # if this is specifically the lab note in the bathroom, signal to the mirror that it's been taken if get_name() == "Lab Note - Bathroom": # if this is specifically the lab note in the bathroom, signal to the mirror that it's been taken
get_parent().get_node("Mirror").gotNote() get_parent().get_node("Mirror").gotNote()
#var tooltip = "Lab Notes (" + str(num) + ")"
#inventory.set_item_tooltip(inventory.hasItem("Lab Notes"), tooltip)
#inventory.updateUI()
#print("LAB NOTES: " + str(num))
dialogueBox.text = flavorText dialogueBox.text = flavorText
dialogueBox.playText() dialogueBox.playText()
queue_free() queue_free()
inventory.unselect_all() inventory.unselect_all()
emit_signal("retrieved") emit_signal("retrieved")
...@@ -20,10 +20,10 @@ extents = Vector2( 38.7144, 50.0827 ) ...@@ -20,10 +20,10 @@ extents = Vector2( 38.7144, 50.0827 )
extents = Vector2( 22.9422, 35.1795 ) extents = Vector2( 22.9422, 35.1795 )
[sub_resource type="RectangleShape2D" id=3] [sub_resource type="RectangleShape2D" id=3]
extents = Vector2( 20.5876, 32.5145 ) extents = Vector2( 13.704, 29.6463 )
[sub_resource type="RectangleShape2D" id=4] [sub_resource type="RectangleShape2D" id=4]
extents = Vector2( 13.704, 29.6463 ) extents = Vector2( 20.5876, 32.5145 )
[sub_resource type="RectangleShape2D" id=5] [sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 13.704, 13.2977 ) extents = Vector2( 13.704, 13.2977 )
...@@ -85,57 +85,56 @@ position = Vector2( 0.143784, -0.788452 ) ...@@ -85,57 +85,56 @@ position = Vector2( 0.143784, -0.788452 )
scale = Vector2( 0.264548, 0.403654 ) scale = Vector2( 0.264548, 0.403654 )
texture = ExtResource( 7 ) texture = ExtResource( 7 )
[node name="Plants" type="StaticBody2D" parent="."] [node name="Yoga mat" type="StaticBody2D" parent="."]
position = Vector2( 666.708, 363.902 ) position = Vector2( 725.911, 363.812 )
scale = Vector2( 0.829244, 0.829244 ) scale = Vector2( 0.829244, 0.829244 )
input_pickable = true input_pickable = true
script = ExtResource( 11 ) script = ExtResource( 5 )
__meta__ = { __meta__ = {
"_edit_group_": true "_edit_group_": true
} }
interactable = true flavorText = "Yoga always calms me down. But I can't do that now, I have things to do!"
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="h" type="CollisionShape2D" parent="Plants"] [node name="h" type="CollisionShape2D" parent="Yoga mat"]
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 3 ) shape = SubResource( 3 )
disabled = true disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Plants"] [node name="Hitbox" type="CollisionPolygon2D" parent="Yoga mat"]
position = Vector2( -18.9858, 3.26251 ) position = Vector2( -17.5516, -1.03979 )
scale = Vector2( 0.25, 0.25 ) scale = Vector2( 0.2, 0.2 )
polygon = PoolVector2Array( 129, -596.7, 145, -568.7, 145, -558.1, 132.9, -494.8, 195.5, -559.8, 208, -554.7, 208, -548.8, 235, -479.9, 235, -473, 239.1, -416.1, 274.9, -432, 288.9, -432, 308, -407.4, 308, -389.5, 269.4, -263, 265.4, -263, 206.9, -201.4, 250.9, -195.5, 309, -209.7, 309, -194.9, 294, -127, 289.1, -127, 226, -66, 220, -66, 145.9, -54.1, 228.8, -3, 233.9, -3, 325, 32.1, 325, 38.1, 346, 91.1, 346, 101.8, 333.5, 178, 329.2, 178, 305, 212.3, 305, 216, 231.1, 566, 224.6, 566, 189.5, 585, 182, 585, 73.5, 596, -35.8, 596, -189, 572.6, -189, 564.2, -267.9, 205.2, -307, 158.6, -307, 152.7, -316.9, 97, -311, 97, -287, 32, -282, 32, -171, -42, -167.2, -42, 0.299988, -84.3, -130, -100.1, -130, -104.5, -246, -177.5, -246, -181.7, -275, -222.8, -275, -229, -279.1, -268, -268.3, -268, -221.4, -281.4, -278, -357.7, -278, -363, -300.6, -459, -285.2, -459, -214.7, -433.4, -232, -470.8, -232, -478.4, -228.3, -527, -218.7, -527, -172, -533.5, -172, -525.6, -125.6, -485.8, -110.7, -498.8, -104.1, -495.7, -91, -553, -85.8, -553, -65.8, -571, -56.1, -571, -26, -543.4, -26, -537, -16.7, -497.2, 41.9, -579, 45.1, -579, 78, -600, 129, -600 ) polygon = PoolVector2Array( 116, -578.8, 116, -573.6, 171, -526.6, 171, -516, 173, 523, 167.1, 523, 135.1, 567, 129.3, 567, 25.3, 594, -22.1, 594, -127, 570, -127, 565, -169, 521, -169, 304, -168, -532, -161.3, -532, -121.3, -574, -115.3, -574, -31, -593, -31, -597.3 )
[node name="Sprite" type="Sprite" parent="Plants/Hitbox"] [node name="Sprite" type="Sprite" parent="Yoga mat/Hitbox"]
texture = ExtResource( 4 ) texture = ExtResource( 2 )
[node name="Yoga mat" type="StaticBody2D" parent="."] [node name="Plants" type="StaticBody2D" parent="."]
position = Vector2( 357.495, 393.178 ) position = Vector2( 666.708, 363.902 )
scale = Vector2( 0.829244, 0.829244 ) scale = Vector2( 0.829244, 0.829244 )
input_pickable = true input_pickable = true
script = ExtResource( 5 ) script = ExtResource( 11 )
__meta__ = { __meta__ = {
"_edit_group_": true "_edit_group_": true
} }
interactable = true interactable = true
flavorText = "Yoga always calms me down. But I can't do that now, I have things to do!" 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! There's something behind here too.."
[node name="h" type="CollisionShape2D" parent="Yoga mat"] [node name="h" type="CollisionShape2D" parent="Plants"]
visible = false visible = false
position = Vector2( -16.8367, -2.11676 ) position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 ) scale = Vector2( 5, 5 )
shape = SubResource( 4 ) shape = SubResource( 4 )
disabled = true disabled = true
[node name="Hitbox" type="CollisionPolygon2D" parent="Yoga mat"] [node name="Hitbox" type="CollisionPolygon2D" parent="Plants"]
position = Vector2( -17.5516, -1.03979 ) position = Vector2( -18.9858, 3.26251 )
scale = Vector2( 0.2, 0.2 ) scale = Vector2( 0.25, 0.25 )
polygon = PoolVector2Array( 116, -578.8, 116, -573.6, 171, -526.6, 171, -516, 173, 523, 167.1, 523, 135.1, 567, 129.3, 567, 25.3, 594, -22.1, 594, -127, 570, -127, 565, -169, 521, -169, 304, -168, -532, -161.3, -532, -121.3, -574, -115.3, -574, -31, -593, -31, -597.3 ) polygon = PoolVector2Array( 129, -596.7, 145, -568.7, 145, -558.1, 132.9, -494.8, 195.5, -559.8, 208, -554.7, 208, -548.8, 235, -479.9, 235, -473, 239.1, -416.1, 274.9, -432, 288.9, -432, 308, -407.4, 308, -389.5, 269.4, -263, 265.4, -263, 206.9, -201.4, 250.9, -195.5, 309, -209.7, 309, -194.9, 294, -127, 289.1, -127, 226, -66, 220, -66, 145.9, -54.1, 228.8, -3, 233.9, -3, 325, 32.1, 325, 38.1, 346, 91.1, 346, 101.8, 333.5, 178, 329.2, 178, 305, 212.3, 305, 216, 231.1, 566, 224.6, 566, 189.5, 585, 182, 585, 73.5, 596, -35.8, 596, -189, 572.6, -189, 564.2, -267.9, 205.2, -307, 158.6, -307, 152.7, -316.9, 97, -311, 97, -287, 32, -282, 32, -171, -42, -167.2, -42, 0.299988, -84.3, -130, -100.1, -130, -104.5, -246, -177.5, -246, -181.7, -275, -222.8, -275, -229, -279.1, -268, -268.3, -268, -221.4, -281.4, -278, -357.7, -278, -363, -300.6, -459, -285.2, -459, -214.7, -433.4, -232, -470.8, -232, -478.4, -228.3, -527, -218.7, -527, -172, -533.5, -172, -525.6, -125.6, -485.8, -110.7, -498.8, -104.1, -495.7, -91, -553, -85.8, -553, -65.8, -571, -56.1, -571, -26, -543.4, -26, -537, -16.7, -497.2, 41.9, -579, 45.1, -579, 78, -600, 129, -600 )
[node name="Sprite" type="Sprite" parent="Yoga mat/Hitbox"] [node name="Sprite" type="Sprite" parent="Plants/Hitbox"]
texture = ExtResource( 2 ) texture = ExtResource( 4 )
[node name="Lab notes" type="StaticBody2D" parent="."] [node name="Lab notes" type="StaticBody2D" parent="."]
position = Vector2( 706.182, 402.594 ) position = Vector2( 706.182, 402.594 )
......
...@@ -237,6 +237,7 @@ __meta__ = { ...@@ -237,6 +237,7 @@ __meta__ = {
[node name="Neighbor" type="StaticBody2D" parent="."] [node name="Neighbor" type="StaticBody2D" parent="."]
position = Vector2( -12.2481, -11.2662 ) position = Vector2( -12.2481, -11.2662 )
scale = Vector2( 1.07, 1.07 )
input_pickable = true input_pickable = true
script = ExtResource( 7 ) script = ExtResource( 7 )
__meta__ = { __meta__ = {
......
...@@ -6,12 +6,14 @@ onready var left = get_parent().get_node("Left") ...@@ -6,12 +6,14 @@ onready var left = get_parent().get_node("Left")
onready var right = get_parent().get_node("Right") onready var right = get_parent().get_node("Right")
onready var moxiePath = get_parent().get_parent().get_node("Moxie/Path2D/PathFollow2D") onready var moxiePath = get_parent().get_parent().get_node("Moxie/Path2D/PathFollow2D")
onready var inventory = get_parent().get_node("Inventory") onready var inventory = get_parent().get_node("Inventory")
onready var moxie = get_parent().get_parent().get_node("Moxie")
onready var tutorial = true onready var tutorial = true
func _ready(): # Called when the node enters the scene tree for the first time. func _ready(): # Called when the node enters the scene tree for the first time.
current = 0 current = 0
rooms[1].hide() #still not sure we need to do this but just in case rooms[1].hide() #still not sure we need to do this but just in case
moxie.rect_position = Vector2(319.068,446.06)
# hide = room is not only invisible, but is no longer rendered # hide = room is not only invisible, but is no longer rendered
func _pressedRight(): # when right arrow is clicked, move to the next adjacent screen func _pressedRight(): # when right arrow is clicked, move to the next adjacent screen
...@@ -25,6 +27,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s ...@@ -25,6 +27,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
left.show() left.show()
checkRoom() checkRoom()
inventory.unselect_all() inventory.unselect_all()
#getRoomPosition(rooms[current].get_name())
print("Currently in room " + str(current) + ": " + rooms[current].get_name()) print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen
...@@ -38,6 +41,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr ...@@ -38,6 +41,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr
right.show() right.show()
checkRoom() checkRoom()
inventory.unselect_all() inventory.unselect_all()
#getRoomPosition(rooms[current].get_name())
print("Currently in room " + str(current) + ": " + rooms[current].get_name()) print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func check_arrows(): func check_arrows():
...@@ -61,7 +65,41 @@ func finishTutorial(): ...@@ -61,7 +65,41 @@ func finishTutorial():
func checkRoom(): func checkRoom():
moxiePath.set_path(rooms[current].get_name()) moxiePath.set_path(rooms[current].get_name())
moxiePath.hardMove(0) moxiePath.hardMove(0)
getRoomPosition(rooms[current].get_name())
func setRoom(num): func setRoom(num):
current = num current = num
check_arrows() check_arrows()
func getRoomPosition(room):
match room:
"Bedroom":
moxie.rect_position = Vector2(319.068,446.06)
moxie.rect_scale.x = 1
"Bathroom":
moxie.rect_position = Vector2(337.321, 426.305)
moxie.rect_scale.x = 1
"Laundry area":
moxie.rect_position = Vector2(246.073, 441.235)
moxie.rect_scale.x = 1
"Kitchen":
moxie.rect_position = Vector2(214.671,455.377)
moxie.rect_scale.x = 1
"Living room":
moxie.rect_position = Vector2(416.517, 456.003)
moxie.rect_scale.x = 1
"Hallway":
moxie.rect_position = Vector2(441.404, 390.95)
moxie.rect_scale.x = 1
"Balcony":
moxie.rect_position = Vector2(245.397, 504.086)
moxie.rect_scale.x = 1
"Neighbor's room":
moxie.rect_position = Vector2(723.533, 426.261)
moxie.rect_scale.x = -1
"Neighbor's balcony":
moxie.rect_position = Vector2(607.568, 395.148)
moxie.rect_scale.x = -1
_:
print("Could not find location for "+ room)
...@@ -139,6 +139,18 @@ items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Tow ...@@ -139,6 +139,18 @@ items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Tow
[node name="BG" parent="Bedroom" index="1"] [node name="BG" parent="Bedroom" index="1"]
position = Vector2( 193.188, 294.197 ) position = Vector2( 193.188, 294.197 )
[node name="Pants" parent="Bedroom" index="7"]
position = Vector2( 67.6401, 460.802 )
[node name="Shirt" parent="Bedroom" index="8"]
position = Vector2( 206.846, 435.997 )
[node name="Sando" parent="Bedroom" index="9"]
position = Vector2( 305.529, 422.197 )
[node name="Towel" parent="Bedroom" index="10"]
position = Vector2( 432.333, 432.172 )
[node name="Desk" parent="." instance=ExtResource( 26 )] [node name="Desk" parent="." instance=ExtResource( 26 )]
visible = false visible = false
script = ExtResource( 4 ) script = ExtResource( 4 )
...@@ -216,16 +228,27 @@ script = ExtResource( 12 ) ...@@ -216,16 +228,27 @@ 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"), NodePath("../Living room - Notepad/Return"), NodePath("../Living room/Plants"), NodePath("../Living room - Notepad/Dialogue control"), NodePath("../Balcony/Other plants"), NodePath("../Living room/Yoga mat"), NodePath("../Neighbor\'s balcony/Other balcony"), NodePath("../Kitchen/Granola bar") ] 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"), NodePath("../Living room - Notepad/Return"), NodePath("../Living room/Plants"), NodePath("../Living room - Notepad/Dialogue control"), NodePath("../Balcony/Other plants"), NodePath("../Living room/Yoga mat"), NodePath("../Neighbor\'s balcony/Other balcony"), NodePath("../Kitchen/Granola bar") ]
[node name="Moxie" type="Control" parent="."] [node name="Moxie" type="Control" parent="."]
margin_left = 513.815 margin_left = 303.56
margin_top = 370.076 margin_top = 438.895
margin_right = 553.815 margin_right = 303.56
margin_bottom = 410.076 margin_bottom = 438.895
__meta__ = { __meta__ = {
"_edit_group_": true,
"_edit_use_anchors_": false "_edit_use_anchors_": false
} }
[node name="Sprite" type="Sprite" parent="Moxie"]
position = Vector2( -59.655, -100.15 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 2 )
[node name="Camera2D" type="Camera2D" parent="Moxie/Sprite"]
visible = false
position = Vector2( 860.161, -240.572 )
scale = Vector2( 2.86111, 2.86111 )
[node name="Path2D" type="Path2D" parent="Moxie"] [node name="Path2D" type="Path2D" parent="Moxie"]
position = Vector2( 8.88391, 53.6094 ) position = Vector2( 288.783, -41.5559 )
curve = ExtResource( 31 ) curve = ExtResource( 31 )
__meta__ = { __meta__ = {
"_edit_group_": true "_edit_group_": true
...@@ -239,17 +262,6 @@ rotate = false ...@@ -239,17 +262,6 @@ rotate = false
loop = false loop = false
script = ExtResource( 30 ) script = ExtResource( 30 )
[node name="Sprite" type="Sprite" parent="Moxie/Path2D/PathFollow2D"]
position = Vector2( -58.278, -40.2653 )
rotation = -0.28771
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 2 )
[node name="Camera2D" type="Camera2D" parent="Moxie/Path2D/PathFollow2D/Sprite"]
visible = false
position = Vector2( 860.161, -240.572 )
scale = Vector2( 2.86111, 2.86111 )
[node name="UI" type="Control" parent="."] [node name="UI" type="Control" parent="."]
margin_left = 214.0 margin_left = 214.0
margin_top = 387.0 margin_top = 387.0
...@@ -264,6 +276,7 @@ __meta__ = { ...@@ -264,6 +276,7 @@ __meta__ = {
"anims/Notepad open" = SubResource( 1 ) "anims/Notepad open" = SubResource( 1 )
[node name="To do" type="StaticBody2D" parent="UI"] [node name="To do" type="StaticBody2D" parent="UI"]
visible = false
position = Vector2( 458.436, 104.779 ) position = Vector2( 458.436, 104.779 )
z_index = 1 z_index = 1
input_pickable = true input_pickable = true
...@@ -480,6 +493,7 @@ __meta__ = { ...@@ -480,6 +493,7 @@ __meta__ = {
} }
[node name="Inventory right" type="TextureButton" parent="UI/Inventory control"] [node name="Inventory right" type="TextureButton" parent="UI/Inventory control"]
visible = false
margin_left = 65.2903 margin_left = 65.2903
margin_top = 11.3307 margin_top = 11.3307
margin_right = 84.2903 margin_right = 84.2903
...@@ -491,6 +505,7 @@ __meta__ = { ...@@ -491,6 +505,7 @@ __meta__ = {
} }
[node name="Inventory left" type="TextureButton" parent="UI/Inventory control"] [node name="Inventory left" type="TextureButton" parent="UI/Inventory control"]
visible = false
margin_left = 28.9565 margin_left = 28.9565
margin_top = 38.3624 margin_top = 38.3624
margin_right = 47.9565 margin_right = 47.9565
...@@ -503,6 +518,7 @@ __meta__ = { ...@@ -503,6 +518,7 @@ __meta__ = {
} }
[node name="Deselect" type="Button" parent="UI/Inventory control"] [node name="Deselect" type="Button" parent="UI/Inventory control"]
visible = false
margin_left = 39.5535 margin_left = 39.5535
margin_top = 16.442 margin_top = 16.442
margin_right = 56.5535 margin_right = 56.5535
...@@ -598,6 +614,7 @@ __meta__ = { ...@@ -598,6 +614,7 @@ __meta__ = {
} }
[node name="Cutscenes" type="Node2D" parent="."] [node name="Cutscenes" type="Node2D" parent="."]
visible = false
z_index = 2 z_index = 2
[node name="0" parent="Cutscenes" instance=ExtResource( 42 )] [node name="0" parent="Cutscenes" instance=ExtResource( 42 )]
......
...@@ -10,6 +10,15 @@ func _ready(): ...@@ -10,6 +10,15 @@ func _ready():
updateUI() updateUI()
func updateUI(): func updateUI():
if (inventory.get_item_count() > firstIndex + 5):
right.visible = true
else:
right.visible = false
if firstIndex != 0:
left.visible = true
else:
left.visible = false
if firstIndex >= inventory.get_item_count() and firstIndex != 0: if firstIndex >= inventory.get_item_count() and firstIndex != 0:
firstIndex = firstIndex - 5 firstIndex = firstIndex - 5
var i = 0 var i = 0
...@@ -17,6 +26,9 @@ func updateUI(): ...@@ -17,6 +26,9 @@ func updateUI():
if firstIndex + i < inventory.get_item_count(): if firstIndex + i < inventory.get_item_count():
items[i].set_disabled(false) items[i].set_disabled(false)
items[i].set_button_icon(inventory.get_item_icon(firstIndex + i)) items[i].set_button_icon(inventory.get_item_icon(firstIndex + i))
#if inventory.get_item_text(firstIndex+i) == "Lab Notes":
#items[i].set_tooltip(inventory.get_item_tooltip(firstIndex+i))
#else:
items[i].set_tooltip(inventory.get_item_text(firstIndex+i)) items[i].set_tooltip(inventory.get_item_text(firstIndex+i))
else: else:
items[i].set_button_icon(null) items[i].set_button_icon(null)
......
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