Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Cooperative Cuisine Environment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Social Cognitive Systems
CoCoSy
Cooperative Cuisine Environment
Commits
b882e83d
Commit
b882e83d
authored
1 year ago
by
Fabian Heinrich
Browse files
Options
Downloads
Patches
Plain Diff
Docstrings, removed prints
parent
4fcb40b3
No related branches found
No related tags found
1 merge request
!3
Resolve "Interaction with objects"
Pipeline
#41363
passed
1 year ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
overcooked_simulator/counters.py
+4
-14
4 additions, 14 deletions
overcooked_simulator/counters.py
overcooked_simulator/game_items.py
+0
-1
0 additions, 1 deletion
overcooked_simulator/game_items.py
with
4 additions
and
15 deletions
overcooked_simulator/counters.py
+
4
−
14
View file @
b882e83d
...
@@ -69,29 +69,19 @@ class CuttingBoard(Counter):
...
@@ -69,29 +69,19 @@ class CuttingBoard(Counter):
self
.
occupied_by
.
progress
()
self
.
occupied_by
.
progress
()
def
start_progress
(
self
):
def
start_progress
(
self
):
"""
Starts the cutting process.
"""
self
.
progressing
=
True
self
.
progressing
=
True
def
pause_progress
(
self
):
def
pause_progress
(
self
):
"""
Pauses the cutting process
"""
self
.
progressing
=
False
self
.
progressing
=
False
def
drop_off
(
self
,
item
):
if
self
.
occupied_by
is
None
:
self
.
occupied_by
=
item
def
can_drop_off
(
self
,
item
):
return
self
.
occupied_by
is
None
def
pick_up
(
self
):
return_to_player
=
self
.
occupied_by
self
.
occupied_by
=
None
return
return_to_player
def
interact_start
(
self
):
def
interact_start
(
self
):
print
(
"
START
"
)
"""
Handles player interaction, starting to hold key down.
"""
self
.
start_progress
()
self
.
start_progress
()
def
interact_stop
(
self
):
def
interact_stop
(
self
):
print
(
"
STOP
"
)
"""
Handles player interaction, stopping to hold key down.
"""
self
.
pause_progress
()
self
.
pause_progress
()
def
__repr__
(
self
):
def
__repr__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
overcooked_simulator/game_items.py
+
0
−
1
View file @
b882e83d
...
@@ -15,7 +15,6 @@ class ProgressibleItem(HoldableItem):
...
@@ -15,7 +15,6 @@ class ProgressibleItem(HoldableItem):
def
progress
(
self
):
def
progress
(
self
):
"""
Progresses the item process as long as it is not finished.
"""
"""
Progresses the item process as long as it is not finished.
"""
print
(
"
PROGRESSING ITEM
"
)
if
self
.
progressed_steps
>=
self
.
steps_needed
:
if
self
.
progressed_steps
>=
self
.
steps_needed
:
self
.
finished
=
True
self
.
finished
=
True
self
.
progressed_steps
=
0
self
.
progressed_steps
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment