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
4f068991
Commit
4f068991
authored
1 year ago
by
Florian Schröder
Browse files
Options
Downloads
Patches
Plain Diff
remove code in comments
parent
898ea8e0
No related branches found
No related tags found
1 merge request
!19
Resolve "Add recipe yaml check + visualize recipes"
Pipeline
#43956
canceled
1 year ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
overcooked_simulator/game_items.py
+0
-108
0 additions, 108 deletions
overcooked_simulator/game_items.py
with
0 additions
and
108 deletions
overcooked_simulator/game_items.py
+
0
−
108
View file @
4f068991
...
...
@@ -134,31 +134,6 @@ class CookingEquipment(Item):
ingredients
<=
recipe
[
"
recipe
"
]
for
recipe
in
self
.
transitions
.
values
()
)
"""
def can_combine(self, other):
if other is Non
# TODO remove when content ready and content list is implemented
if isinstance(self.content, Item):
return False
e:
return False
if self.content is None:
if isinstance(other, CookingEquipment):
return other.can_release_content()
# TODO check other is start of a meal, create meal
if isinstance(other, Meal) and
"
Plate
"
in self.name:
return not other.steps_needed or other.finished
return self.item_info.can_start_meal([other])
if self.content.can_combine(other):
return True
if isinstance(other, CookingEquipment) and other.content:
other = other.content
return self.item_info.can_start_meal(
[other]
+ ([self.content] if self.content.progressed_steps else self.content.parts)
)
"""
def
combine
(
self
,
other
):
return_value
=
None
if
isinstance
(
other
,
CookingEquipment
):
...
...
@@ -187,43 +162,6 @@ e:
self
.
content_ready
=
None
return
return_value
"""
def combine(self, other):
if self.content is None:
if isinstance(other, CookingEquipment):
self.content = other.release()
return other
if isinstance(other, Meal) and
"
Plate
"
in self.name:
self.content = other
return
# find starting meal for other
self.content = self.item_info.start_meal([other])
return
if not self.content.can_combine(other):
if isinstance(other, CookingEquipment) and other.content:
content = other.release()
self.content = self.item_info.start_meal(
[content]
+ (
[self.content]
if self.content.progressed_steps
else self.content.parts
)
)
return other
else:
self.content = self.item_info.start_meal(
[other]
+ (
[self.content]
if self.content.progressed_steps
else self.content.parts
)
)
return
self.content.combine(other)
"""
def
can_progress
(
self
)
->
bool
:
return
self
.
active_transition
is
not
None
...
...
@@ -260,41 +198,6 @@ e:
self
.
active_transition
=
None
# class Meal(Item):
# def __init__(self, parts=None, *args, **kwargs):
# super().__init__(*args, **kwargs)
# self.parts = [] if parts is None else parts
# # self.rules ...
#
# def can_combine(self, other) -> bool:
# if other and not self.finished:
# satisfied = [False for _ in range(len(self.parts))]
# for n in self.item_info.needs:
# for i, p in enumerate(self.parts):
# if not satisfied[i] and p.name == n:
# satisfied[i] = True
# break
# else:
# if n == other.name:
# return True
# return False
#
# def combine(self, other):
# self.parts.append(other)
#
# def can_progress(self) -> bool:
# return self.item_info.steps_needed and len(self.item_info.needs) == len(
# self.parts
# )
#
# def finished_call(self):
# super().finished_call()
#
# @property
# def extra_repr(self):
# return self.parts
class
Plate
(
CookingEquipment
):
def
__init__
(
self
,
transitions
,
clean
,
content
=
None
,
*
args
,
**
kwargs
):
self
.
clean
=
clean
...
...
@@ -309,17 +212,6 @@ class Plate(CookingEquipment):
def
progress
(
self
,
equipment
:
str
,
percent
:
float
):
Item
.
progress
(
self
,
equipment
,
percent
)
# def progress(self, equipment: str, percent: float):
# """Progresses the item process as long as it is not finished."""
# if self.progressed_steps >= self.steps_needed:
# self.finished = True
# self.finished_call()
# if not self.finished:
# self.progressed_steps += 1
# def can_progress(self, counter_type="Sink") -> bool:
# return not self.clean
def
create_name
(
self
):
return
"
Plate
"
if
self
.
clean
else
"
DirtyPlate
"
...
...
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