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
73b2eaca
Commit
73b2eaca
authored
Oct 09, 2021
by
Julia Santos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added quest success to laundry and eating food
parent
4d56fd84
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
3 deletions
+30
-3
Dialogue control - Laundry notepad.gd
Dialogue control - Laundry notepad.gd
+2
-1
Energy handler.gd
Energy handler.gd
+5
-0
Event Handler.gd
Event Handler.gd
+5
-1
Laundry area.tscn
Laundry area.tscn
+3
-0
Multi.tscn
Multi.tscn
+4
-1
Quests.gd
Quests.gd
+11
-0
No files found.
Dialogue control - Laundry notepad.gd
View file @
73b2eaca
...
...
@@ -12,14 +12,15 @@ func _ready():
func checkWin():
print("Checked win")
if clothes_in and soap and !drawer and !door:
emit_signal("laundry_finished")
print("Should win")
return "For my next trick, I will make this pile of laundry disappear! I think that's good for now."
emit_signal("laundry_finished")
else:
print("Should continue")
return "Closed"
func passEvent(handler):
print("Handler laundry passed")
connect("laundry_finished", handler, "_laundry_finished")
func interaction(selected, clicked): #selected = item in inventory, clicked = item in environment
...
...
Energy handler.gd
View file @
73b2eaca
extends Control
signal eaten
#UI elements
onready var dialogue
onready var energy_bar
...
...
@@ -24,6 +26,7 @@ func giveUI(dia): #passes dialogue box node
func passEvent(handler): # retrieves energy bar from event handler
energy_bar = handler.give_energy_bar()
connect("eaten",handler,"_eaten")
func _selected_ing(ingredient): # when an ingredient is selected
ingredients.append(ingredient)
...
...
@@ -98,6 +101,7 @@ func cook():
energy_bar.value += 14
3:
energy_bar.value += 20
emit_signal("eaten")
clearFridge()
cook.hide()
...
...
@@ -109,4 +113,5 @@ func eat():
energy_bar.value += 8
"Granola bar":
energy_bar.value += 10
emit_signal("eaten")
clearFridge()
Event Handler.gd
View file @
73b2eaca
...
...
@@ -104,7 +104,8 @@ func _enter_notebook_laundry():
dialogue.text = "The groceries are still in the way."
func _laundry_finished():
quests.remove(quests.find("Do laundry"))
print("Finished laundry")
quests.finishQuest("Do laundry")
func _return_laundry_notepad():
zoom_out()
...
...
@@ -115,3 +116,6 @@ func _return_laundry_notepad():
notepad.get_node("Title").text = "To do"
notepad.get_node("Words").hide()
notepad.get_node("Words").clear()
func _eaten():
quests.finishQuest("Eat")
Laundry area.tscn
View file @
73b2eaca
...
...
@@ -51,6 +51,7 @@ __meta__ = {
"_edit_group_": true
}
interactable = true
flavorText = "Something's in the way."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Laundry door"]
position = Vector2( 5.63037, -53.6798 )
...
...
@@ -85,6 +86,7 @@ __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 )
...
...
@@ -117,6 +119,7 @@ __meta__ = {
"_edit_group_": true
}
retrievable = true
flavorText = "A sturdy stool."
[node name="CollisionShape2D" type="CollisionShape2D" parent="Stool"]
position = Vector2( 1.25211, 0.295086 )
...
...
Multi.tscn
View file @
73b2eaca
...
...
@@ -40,6 +40,9 @@ bg_color = Color( 0.145098, 0.145098, 0.164706, 1 )
script = ExtResource( 4 )
items = [ NodePath("Pants"), NodePath("Shirt"), NodePath("Sando"), NodePath("Towel"), NodePath("Laundry basket"), NodePath("Laptop"), NodePath("Pile of clothes") ]
[node name="Laundry basket" parent="Bedroom" index="1"]
position = Vector2( 492.444, 254.362 )
[node name="Kitchen" parent="." instance=ExtResource( 8 )]
visible = false
script = ExtResource( 4 )
...
...
@@ -69,7 +72,7 @@ items = [ NodePath("Washing machine door"), NodePath("Drawer"), NodePath("Soap")
[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"), NodePath("../Laundry area/Dialogue control"), NodePath("../Laundry - Notepad/Return") ]
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")
, NodePath("../Laundry - Notepad/Dialogue control")
]
[node name="Moxie" type="Sprite" parent="."]
position = Vector2( 214.135, 386.725 )
...
...
Quests.gd
View file @
73b2eaca
...
...
@@ -13,5 +13,16 @@ func add(q):
quests.append(q)
showQuests()
func finishQuest(q):
var index = 0
print("trying to find quest to remove " + q)
for quest in quests:
if quest == q:
quests.remove(index)
print("Quest found, will remove")
showQuests()
index += 1
func showQuests():
text = "- " + quests.join("\n- ") # prints all quests on the notepad
#print(quests.join("\n- "))
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