Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
To Do Break Down
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
breakdown
To Do Break Down
Commits
1ef837d6
Commit
1ef837d6
authored
Jan 19, 2022
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More edits on the new inventory, mostly dealing with bugs regarding selecting/deselecting items
parent
4a2608c5
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
74 additions
and
25 deletions
+74
-25
Dialogue arrow.gd
Dialogue arrow.gd
+3
-0
Event Handler.gd
Event Handler.gd
+17
-1
ItemList.gd
ItemList.gd
+13
-0
Balcony.tscn
Main rooms/Balcony.tscn
+1
-0
Laundry area.tscn
Main rooms/Laundry area.tscn
+2
-2
Living room - Notepad.tscn
Main rooms/Living room - Notepad.tscn
+2
-2
Movement.gd
Movement.gd
+3
-0
Multi.tscn
Multi.tscn
+1
-1
Granola bar.gd
Scripts/Granola bar.gd
+0
-1
Groceries.gd
Scripts/Groceries.gd
+0
-1
Inventory UI.gd
Scripts/Inventory UI.gd
+29
-0
Ladder.gd
Scripts/Ladder.gd
+0
-1
Laundry door.gd
Scripts/Laundry door.gd
+0
-1
Mess on floor.gd
Scripts/Mess on floor.gd
+0
-1
Mirror.gd
Scripts/Mirror.gd
+0
-1
Balcony door.gd
Scripts/Movement scripts/Balcony door.gd
+0
-1
Cabinet.gd
Scripts/Movement scripts/Cabinet.gd
+0
-1
Neighbor.gd
Scripts/Neighbor.gd
+2
-2
Other balcony.gd
Scripts/Other balcony.gd
+0
-1
Other plants.gd
Scripts/Other plants.gd
+0
-1
Plants.gd
Scripts/Plants.gd
+0
-1
Sink.gd
Scripts/Sink.gd
+0
-1
Terrarium.gd
Scripts/Terrarium.gd
+0
-1
Toilet.gd
Scripts/Toilet.gd
+0
-1
Trash chute.gd
Scripts/Trash chute.gd
+0
-1
Yoga mat.gd
Scripts/Yoga mat.gd
+0
-1
Be Vietnam.tres
assets/Fonts/Be Vietnam.tres
+1
-1
No files found.
Dialogue arrow.gd
View file @
1ef837d6
...
...
@@ -32,6 +32,7 @@ func getDialogue(sceneName):
sceneProgress = 0
hide()
dim.hide()
inventory.enable()
elif sceneName == "First Nana pass":
match sceneProgress:
0:
...
...
@@ -53,10 +54,12 @@ func getDialogue(sceneName):
sceneProgress = 0
dim.hide()
hide()
inventory.enable()
elif sceneName == "Nana again":
dialogue = "Brodie: OF COURSE, ALWAYS."
get_parent().get_node("Neighbor").move()
inventory.remove_item_name("Nana")
dim.hide()
hide()
inventory.enable()
return dialogue
Event Handler.gd
View file @
1ef837d6
...
...
@@ -76,7 +76,7 @@ func _groceries_put_away(): # when the groceries are put away
laundryArea.get_node("Laundry door").flavorText = "I think I'm still missing something..."
inventory.add_item("Oil", load("res://.import/Oil.png-29f84e969418d0f4084115c5ce859866.stex"))
inventory.add_item("Cleaning mat", load("res://.import/cleaning materials.png-9e1abb8a1d84afe3085c773f150c7347.stex"))
inventory.add_item("Laundry detergent",load("res://.import/
laundry detergent.png-79948b488e3c228ce282a9186c4bcf0c
.stex"))
inventory.add_item("Laundry detergent",load("res://.import/
soap.png-93c3e5ae993592d84ef303c214def992
.stex"))
func _eaten(): # completing first "Eat" quest
quests.finishQuest("Eat")
...
...
@@ -161,19 +161,23 @@ func getPlungered():
return plungerUsed
# ----------------- Cutscene initiators -----------------
func _start_cutscene_1():
inventory.unselect_all()
cutsceneHandler.get_node("1").show()
cutsceneHandler.get_node("1/Scene control").start()
func _start_cutscene_2():
if !quests.hasQuest("Eat") and !quests.hasQuest("Do laundry"):
inventory.unselect_all()
cutsceneHandler.get_node("2").show()
cutsceneHandler.get_node("2/Scene control").start()
func _start_cutscene_2b():
inventory.unselect_all()
cutsceneHandler.get_node("2b").show()
cutsceneHandler.get_node("2b/Scene control").start()
func _start_cutscene_3():
inventory.unselect_all()
cutsceneHandler.get_node("3").show()
cutsceneHandler.get_node("3/Scene control").start()
...
...
@@ -269,21 +273,25 @@ func _bathroom_enter(): # entering bathroom
bedroom.hide()
bathroom.show()
movementHandle.disableMovement()
inventory.unselect_all()
func _bathroom_exit(): # exiting bathroom
bathroom.hide()
bedroom.show()
movementHandle.enableMovement()
inventory.unselect_all()
func _balcony_enter(): # entering balcony
movementHandle.disableMovement()
balcony.show()
livingRoom.hide()
inventory.unselect_all()
func _balcony_exit(): # exiting balcony
movementHandle.enableMovement()
balcony.hide()
livingRoom.show()
inventory.unselect_all()
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
...
...
@@ -296,6 +304,7 @@ func _living_to_hallway(): # moving from living room to hallway, if there's a re
canFrontDoor = true
dialogue.text = "What is that noise? Sounds like my neighbor's trying to break down their walls."
dialogue.playText()
inventory.unselect_all()
else:
dialogue.text = "You know, my philosophy has always been, 'If there's no reason to leave my apartment, why leave?'"
dialogue.playText()
...
...
@@ -304,26 +313,31 @@ func _hallway_to_living(): # moving from hallway to moxie's living room
movementHandle.enableMovement()
hallway.hide()
livingRoom.show()
inventory.unselect_all()
func _hallway_to_neighbor(): # moving from hallway to neighbor's living room
movementHandle.disableMovement()
hallway.hide()
neighborsRoom.show()
inventory.unselect_all()
func _neighbor_to_hallway(): # moving from neighbor's living room to the hallway
hallway.show()
neighborsRoom.hide()
movementHandle.checkRoom()
inventory.unselect_all()
func _neighbor_to_balcony(): # moving from neighbor's living room to their balcony
movementHandle.disableMovement()
neighborsRoom.hide()
neighborsBalcony.show()
inventory.unselect_all()
func _balcony_to_neighbor(): # moving from neighbor's balcony to their living room
neighborsRoom.show()
neighborsBalcony.hide()
movementHandle.checkRoom()
inventory.unselect_all()
# ----------------- Zooming in and out of specific views -----------------
func zoom_in(): # for close up perspectives without some UI
...
...
@@ -333,6 +347,7 @@ func zoom_in(): # for close up perspectives without some UI
right.hide()
deselect.hide()
movementHandle.disableMovement()
inventory.unselect_all()
func zoom_out(): # for returning from close up perspectives
moxie.show()
...
...
@@ -342,6 +357,7 @@ func zoom_out(): # for returning from close up perspectives
movementHandle.enableMovement()
deselect.show()
movementHandle.checkRoom()
inventory.unselect_all()
func _laundry_basket(): # looking at the laundry basket view
bedroom.hide()
...
...
ItemList.gd
View file @
1ef837d6
...
...
@@ -23,6 +23,7 @@ func remove_item_name(toRemove):
var index = hasItem(toRemove)
if index != -1:
remove_item(index)
UI.updateUI()
func remove_item(idx):
.remove_item(idx)
...
...
@@ -36,3 +37,15 @@ func add_item(text, icon=null, selectable=true):
func updateUI():
UI.updateUI()
func unselect_all():
.unselect_all()
UI.unselect_all()
func disable():
unselect_all()
UI.disableAll()
func enable():
unselect_all()
UI.enableAll()
Main rooms/Balcony.tscn
View file @
1ef837d6
...
...
@@ -111,6 +111,7 @@ __meta__ = {
}
[node name="h" type="CollisionShape2D" parent="Repotted plants"]
visible = false
position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 )
shape = SubResource( 3 )
...
...
Main rooms/Laundry area.tscn
View file @
1ef837d6
...
...
@@ -9,7 +9,7 @@
[ext_resource path="res://assets/Thesis Clickables/groceries.png" type="Texture" id=7]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 35.8254, 3
8.2746
)
extents = Vector2( 35.8254, 3
2.6971
)
[sub_resource type="StreamTexture" id=2]
flags = 4
...
...
@@ -49,7 +49,7 @@ interactable = true
flavorText = "I can't get in there. These bags are in the way..."
[node name="Hitbox" type="CollisionShape2D" parent="Laundry door"]
position = Vector2(
5.806, -53.211
2 )
position = Vector2(
9.22073, -81.667
2 )
scale = Vector2( 5, 5 )
z_index = -1
shape = SubResource( 1 )
...
...
Main rooms/Living room - Notepad.tscn
View file @
1ef837d6
...
...
@@ -10,7 +10,7 @@
[ext_resource path="res://assets/Thesis Clickables/soil (pour).png" type="Texture" id=9]
[ext_resource path="res://assets/Thesis Clickables/pot.png" type="Texture" id=12]
[sub_resource type="RectangleShape2D" id=
7
]
[sub_resource type="RectangleShape2D" id=
1
]
extents = Vector2( 26.4732, 26.6968 )
[sub_resource type="RectangleShape2D" id=2]
...
...
@@ -70,7 +70,7 @@ texture = ExtResource( 12 )
visible = false
position = Vector2( -16.8367, -2.11676 )
scale = Vector2( 5, 5 )
shape = SubResource(
7
)
shape = SubResource(
1
)
disabled = true
[node name="Plant" type="StaticBody2D" parent="."]
...
...
Movement.gd
View file @
1ef837d6
...
...
@@ -5,6 +5,7 @@ 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 inventory = get_parent().get_node("Inventory")
onready var tutorial = true
...
...
@@ -23,6 +24,7 @@ func _pressedRight(): # when right arrow is clicked, move to the next adjacent s
if current >= 1:
left.show()
checkRoom()
inventory.unselect_all()
print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func _pressedLeft(): # when left arrow is clicked, move to the next adjacent screen
...
...
@@ -35,6 +37,7 @@ func _pressedLeft(): # when left arrow is clicked, move to the next adjacent scr
if current < rooms.size() - 1:
right.show()
checkRoom()
inventory.unselect_all()
print("Currently in room " + str(current) + ": " + rooms[current].get_name())
func check_arrows():
...
...
Multi.tscn
View file @
1ef837d6
...
...
@@ -569,7 +569,7 @@ anims/Dialogue = SubResource( 11 )
margin_left = 27.0
margin_top = 19.0
margin_right = 522.0
margin_bottom = 7
3
.0
margin_bottom = 7
6
.0
custom_fonts/normal_font = ExtResource( 37 )
visible_characters = 0
percent_visible = 0.0
...
...
Scripts/Granola bar.gd
View file @
1ef837d6
...
...
@@ -22,7 +22,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func canEatGranola():
...
...
Scripts/Groceries.gd
View file @
1ef837d6
...
...
@@ -13,7 +13,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all()
dialogueBox.playText()
if inventory.get_item_text(selected)=="Stool":
inventory.remove_item(selected)
...
...
Scripts/Inventory UI.gd
View file @
1ef837d6
...
...
@@ -2,6 +2,8 @@ extends Control
onready var inventory = get_parent().get_node("Inventory")
onready var firstIndex = 0
onready var items = [get_node("1"), get_node("2"), get_node("3"), get_node("4"), get_node("5")]
onready var left = get_parent().get_node("Inventory control/Inventory left")
onready var right = get_parent().get_node("Inventory control/Inventory right")
# Called when the node enters the scene tree for the first time.
func _ready():
...
...
@@ -39,6 +41,33 @@ func _on_Inventory_left_pressed():
firstIndex = firstIndex - 5
updateUI()
func disableAll():
var j = 0
while j < 5:
#items[j].set_pressed(false)
items[j].set_disabled(true)
j = j + 1
print("disabling inventory")
left.set_disabled(true)
right.set_disabled(true)
func enableAll():
var j = 0
while j < 5:
items[j].set_disabled(false)
items[j].set_pressed(false)
j = j + 1
print("enabling inventory")
left.set_disabled(false)
right.set_disabled(false)
func unselect_all():
var j = 0
while j < 5:
items[j].set_pressed(false) #unselects everything
j = j + 1
updateUI()
func disableRest(num):
var j = 0
while j < 5:
...
...
Scripts/Ladder.gd
View file @
1ef837d6
...
...
@@ -25,5 +25,4 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = "Brodie: Um... What are you doing?"
get_parent().get_node("Dialogue arrow").setScene("Intro")
get_parent().get_node("Dialogue arrow").show()
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Laundry door.gd
View file @
1ef837d6
...
...
@@ -45,6 +45,5 @@ func objInteraction(selected): # when an object is used on it
else:
dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText()
inventory.unselect_all() #unselect item
Scripts/Mess on floor.gd
View file @
1ef837d6
...
...
@@ -30,7 +30,6 @@ func objInteraction(selected):
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func mouseInteraction():
...
...
Scripts/Mirror.gd
View file @
1ef837d6
...
...
@@ -39,7 +39,6 @@ func objInteraction(selected):
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func gotNote(): # once lab note has been retrieved
...
...
Scripts/Movement scripts/Balcony door.gd
View file @
1ef837d6
...
...
@@ -32,7 +32,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func outerLock():
...
...
Scripts/Movement scripts/Cabinet.gd
View file @
1ef837d6
...
...
@@ -32,5 +32,4 @@ func objInteraction(selected):
dialogueBox.text = "Food, you are now free from your prison. You're welcome."
unlocked = true
inventory.remove_item(selected)
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Neighbor.gd
View file @
1ef837d6
...
...
@@ -23,14 +23,15 @@ func mouseInteraction():
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) == "Nana":
if !hadNana:
inventory.disable()
dialogueBox.text = "Moxie: Hey Brodie! Have you met Nana?"
dialogueArrow.setScene("First Nana pass")
dialogueArrow.show()
hadNana = true
else:
inventory.disable()
dialogueBox.text = "Moxie: Hey, could you hold Nana for me for a sec?"
dialogueArrow.setScene("Nana again")
dialogueArrow.show()
...
...
@@ -39,7 +40,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func doesHaveNana():
...
...
Scripts/Other balcony.gd
View file @
1ef837d6
...
...
@@ -16,6 +16,5 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Other plants.gd
View file @
1ef837d6
...
...
@@ -20,5 +20,4 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Plants.gd
View file @
1ef837d6
...
...
@@ -37,4 +37,3 @@ func objInteraction(selected): # when an object is used on it
else:
dialogueBox.text = "No flavor text found" #can replace this later!
dialogueBox.playText()
inventory.unselect_all() #unselect item
Scripts/Sink.gd
View file @
1ef837d6
...
...
@@ -35,5 +35,4 @@ func objInteraction(selected):
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Terrarium.gd
View file @
1ef837d6
...
...
@@ -36,5 +36,4 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Toilet.gd
View file @
1ef837d6
...
...
@@ -32,4 +32,3 @@ func objInteraction(selected): # when an object is used on it
else: # if they try to use the plunger on a clean toilet
dialogueBox.text = "I can't make it any LESS unclogged.."
dialogueBox.playText()
inventory.unselect_all() #unselect item
Scripts/Trash chute.gd
View file @
1ef837d6
...
...
@@ -20,6 +20,5 @@ func objInteraction(selected):
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
Scripts/Yoga mat.gd
View file @
1ef837d6
...
...
@@ -23,7 +23,6 @@ func objInteraction(selected): # when an object is used on it
dialogueBox.text = flavor
else:
dialogueBox.text = "No flavor text found" #can replace this later!
inventory.unselect_all() #unselect item
dialogueBox.playText()
func canYoga():
...
...
assets/Fonts/Be Vietnam.tres
View file @
1ef837d6
...
...
@@ -3,5 +3,5 @@
[ext_resource path="res://assets/Fonts/BeVietnamPro-Medium.ttf" type="DynamicFontData" id=1]
[resource]
size = 1
5
size = 1
4
font_data = ExtResource( 1 )
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment