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
54154a3a
Commit
54154a3a
authored
1 year ago
by
Florian Schröder
Browse files
Options
Downloads
Patches
Plain Diff
only combine items on the sink addon
parent
340b1d8b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!20
Resolve "Plate washing cycle"
Pipeline
#42401
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
+3
-7
3 additions, 7 deletions
overcooked_simulator/counters.py
overcooked_simulator/game_content/layouts/basic.layout
+2
-2
2 additions, 2 deletions
overcooked_simulator/game_content/layouts/basic.layout
with
5 additions
and
9 deletions
overcooked_simulator/counters.py
+
3
−
7
View file @
54154a3a
...
...
@@ -362,7 +362,7 @@ class SinkAddon(Counter):
self
.
occupied_by
=
deque
(
occupied_by
)
if
occupied_by
else
deque
()
def
can_drop_off
(
self
,
item
:
Item
)
->
bool
:
return
not
self
.
occupied_by
or
self
.
occupied_by
[
-
1
].
can_combine
(
item
)
return
self
.
occupied_by
and
self
.
occupied_by
[
-
1
].
can_combine
(
item
)
def
drop_off
(
self
,
item
:
Item
)
->
Item
|
None
:
"""
Takes the thing dropped of by the player.
...
...
@@ -370,14 +370,10 @@ class SinkAddon(Counter):
Args:
item: The item to be placed on the counter.
Returns:
TODO Return information, whether the score is affected (Serving Window?)
Returns:
"""
if
not
self
.
occupied_by
:
self
.
occupied_by
.
append
(
item
)
elif
self
.
occupied_by
[
-
1
].
can_combine
(
item
):
return
self
.
occupied_by
[
-
1
].
combine
(
item
)
return
None
return
self
.
occupied_by
[
-
1
].
combine
(
item
)
def
add_clean_plate
(
self
,
plate
:
Plate
):
self
.
occupied_by
.
appendleft
(
plate
)
...
...
This diff is collapsed.
Click to expand it.
overcooked_simulator/game_content/layouts/basic.layout
+
2
−
2
View file @
54154a3a
...
...
@@ -4,8 +4,8 @@ _#_______M_______
_#_______#_______
_W_______________
_#__A__A_________
_
B
_______________
_
B
_______#_______
_
C
_______________
_
C
_______#_______
_#_______X_______
_#P#S+#S+#_______
_________________
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