Skip to content
Snippets Groups Projects
Commit fb060696 authored by Florian Schröder's avatar Florian Schröder
Browse files

Add Overcooked 1 layout files and minor code adjustments

Several Overcooked 1 layout files have been added along with changes in the counter mappings for the game simulator. This includes serving window character changes and addition of clean plate character mappings. Additionally, `overcooked_simulator/utils.py` has been modified to include a method that creates a basic layout grid. These changes help in enhancing and expanding the game simulator.
parent beea6895
No related branches found
No related tags found
1 merge request!54Resolve "More maps"
Pipeline #45842 passed
Showing
with 286 additions and 9 deletions
...@@ -81,10 +81,10 @@ def convert_words_to_chars(layout_chars_config: dict[str, str]) -> dict[str, str ...@@ -81,10 +81,10 @@ def convert_words_to_chars(layout_chars_config: dict[str, str]) -> dict[str, str
""" """
word_refs = { word_refs = {
"hash": "#", "hash": "#",
"space": " ", # "space": " ",
"dot": ".", "dot": ".",
"comma": ",", "comma": ",",
"semicolon": ";", # "semicolon": ";",
"colon": ":", "colon": ":",
"minus": "-", "minus": "-",
"exclamation": "!", "exclamation": "!",
...@@ -98,6 +98,7 @@ def convert_words_to_chars(layout_chars_config: dict[str, str]) -> dict[str, str ...@@ -98,6 +98,7 @@ def convert_words_to_chars(layout_chars_config: dict[str, str]) -> dict[str, str
"left": "<", "left": "<",
"pipe": "|", "pipe": "|",
"at": "@", "at": "@",
"wave": "~", # ~ is None / null in yaml
"ocurlybracket": "{", "ocurlybracket": "{",
"ccurlybracket": "}", "ccurlybracket": "}",
"osquarebracket": "[", "osquarebracket": "[",
...@@ -163,8 +164,11 @@ class CounterFactory: ...@@ -163,8 +164,11 @@ class CounterFactory:
"""A set of characters that represent counters for agents or free spaces.""" """A set of characters that represent counters for agents or free spaces."""
self.counter_classes: dict[str, Type] = dict( self.counter_classes: dict[str, Type] = dict(
inspect.getmembers( filter(
sys.modules["overcooked_simulator.counters"], inspect.isclass lambda k: issubclass(k[1], Counter),
inspect.getmembers(
sys.modules["overcooked_simulator.counters"], inspect.isclass
),
) )
) )
"""A dictionary of counter classes imported from the 'overcooked_simulator.counters' module.""" """A dictionary of counter classes imported from the 'overcooked_simulator.counters' module."""
...@@ -191,6 +195,8 @@ class CounterFactory: ...@@ -191,6 +195,8 @@ class CounterFactory:
assert self.can_map(c), f"Can't map counter char {c}" assert self.can_map(c), f"Can't map counter char {c}"
counter_class = None counter_class = None
if c == "@":
print("-")
if self.layout_chars_config[c] in self.item_info: if self.layout_chars_config[c] in self.item_info:
item_info = self.item_info[self.layout_chars_config[c]] item_info = self.item_info[self.layout_chars_config[c]]
if item_info.type == ItemType.Equipment and item_info.equipment: if item_info.type == ItemType.Equipment and item_info.equipment:
...@@ -221,7 +227,20 @@ class CounterFactory: ...@@ -221,7 +227,20 @@ class CounterFactory:
) )
if counter_class is None: if counter_class is None:
counter_class = self.counter_classes[self.layout_chars_config[c]] if self.layout_chars_config[c] in self.counter_classes:
counter_class = self.counter_classes[self.layout_chars_config[c]]
elif self.layout_chars_config[c] == "Plate":
return Counter(
pos=pos,
hook=self.hook,
occupied_by=Plate(
transitions=self.filter_item_info(
by_item_type=ItemType.Meal, add_effects=True
),
clean=True,
item_info=self.item_info[Plate.__name__],
),
)
kwargs = { kwargs = {
"pos": pos, "pos": pos,
"hook": self.hook, "hook": self.hook,
......
...@@ -18,15 +18,16 @@ meals: ...@@ -18,15 +18,16 @@ meals:
layout_chars: layout_chars:
_: Free _: Free
hash: Counter hash: Counter # #
A: Agent A: Agent
pipe: Extinguisher pipe: Extinguisher
P: PlateDispenser P: PlateDispenser
C: CuttingBoard C: CuttingBoard
X: Trashcan X: Trashcan
W: ServingWindow $: ServingWindow
S: Sink S: Sink
+: SinkAddon +: SinkAddon
at: Plate # @ just a clean plate on a counter
U: Pot # with Stove U: Pot # with Stove
Q: Pan # with Stove Q: Pan # with Stove
O: Peel # with Oven O: Peel # with Oven
...@@ -41,6 +42,15 @@ layout_chars: ...@@ -41,6 +42,15 @@ layout_chars:
G: Sausage # sausaGe G: Sausage # sausaGe
B: Bun B: Bun
M: Meat M: Meat
question: Counter # ? mushroom
: Counter
^: Counter
right: Counter
left: Counter
wave: Free # ~ Water
minus: Free # - Ice
dquote: Counter # " wall/truck
p: Counter # second plate return ??
orders: orders:
......
#QU#FO#TNLB# #QU#FO#TNLB#
#__________M #__________M
|__________K |__________K
W__________I $__________I
#__A_____A_D #__A_____A_D
C__________E C__________E
C__________G C__________G
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#____________________________________# #____________________________________#
#____________________________________# #____________________________________#
#____________________________________K #____________________________________K
W____________________________________I $____________________________________I
#____________________________________# #____________________________________#
#____________________________________# #____________________________________#
#__A_____A___________________________D #__A_____A___________________________D
......
###N####U####
#___________|
#___A___A___#
#___________S
##########__+
P___________#
$___________#
$___________X
###C#C###@@##
; seconds=150
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/1-1_(Overcooked!)
\ No newline at end of file
_##U#U#__###|X_#
______#____A___$
+_____@__@_____$
S________#_____P
____A____#______
_##C#C#__#T#N##_
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/1-2_(Overcooked!)
; pedestrians: down the middle road
_____________
___U#U##$$P|_
_#____#______
_@__A_#___A__
_@____#______
_@____#______
_X____#______
_#C#C##NT?___
_____________
; seconds=240
; plates={c:0, d:0}
; dirty_plates=false
; link: https://overcooked.fandom.com/wiki/1-3_(Overcooked!)
; moving counters
\ No newline at end of file
##S+####QQQQ#
T____###____|
M_A__###__A_#
B___________#
L____###____$
#____###____$
#____###____P
X____###____@
##C#C###@@@@#
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/1-4_(Overcooked!)
\ No newline at end of file
#####P$$|#####
#?NT#A_A_#S+##
#____________X
#_##########_#
#_##########_#
#_##########_#
#_#######@@@_#
#____________#
#C#C####U#U#U#
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/1-5_(Overcooked!)
\ No newline at end of file
##S+###@Q@Q@#
M___________#
T___________|
L___________$
#___________$
#___________P
X___________#
##C#C##Q#Q#B#
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/1-6_(Overcooked!)
; raising platforms based on earthquakes
\ No newline at end of file
_______________
__#QQQ#@@@#____
__#_______$____
__B_______$____
__#_______P____
_______________
__M__A____X____
__L_______#____
__T__A____C____
__#|###C###____
_______________
; seconds=240
; plates={c:0, d:0}
; dirty_plates=false
; link: https://overcooked.fandom.com/wiki/2-1_(Overcooked!)
; moving trucks: counters and ground are moving
\ No newline at end of file
#####P$$|#####
#####____#####
##S+#____#S+##
X____________X
#____________#
U___@__A_@___#
#___@____@___#
#___#_A__#___#
U___#____#___#
#___#____#___#
#?N##C##C##NT#
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/2-2_(Overcooked!)
; rats: steal ingredients + meals
\ No newline at end of file
>>>>>>>>>>>>>>>↓
^#_____##@____#↓
^+A____|#@_A__#↓
^S_____Q#C____$↓
^M_____###____$↓
^L_____Q#C____P↓
^B_____###____#↓
^T_____X#@____X↓
^<<<<<<<<<<<<<<<
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/2-3_(Overcooked!)
; conveyors
\ No newline at end of file
#@@@##C#C######
#_____________$
#___A_________$
#_____________P
####____###___#
X<<<<<<X>>>>>>X
#___###____####
Q_____________#
#________A____#
Q_____________#
##Q#+S#|##BTLM#
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/2-4_(Overcooked!)
\ No newline at end of file
~~~~~~~~~~~~~~~~
~~~~~~P$$~~~~~~~
~~~---------~~~~
~~~-----------~~
~~--#C#C|##----~
~---S#####IA---~
~---+#####K---~~
~---#FFF##F---~~
~~-A----@@@--~~~
~~-----------~~~
~~~~--------~~~~
~~~~~~~----~~~~~
~~~~~~~~~~~~~~~~
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/3-1_(Overcooked!)
; ice: accelerating
\ No newline at end of file
##$$####$$###
####P##______
______?______
______N______
U_____T_____U
X#####X______
U_____#_____U
______#______
__A___#__A___
@@@C#C#______
; seconds=240
; plates={c:0, d:0}
; dirty_plates=false
; link: https://overcooked.fandom.com/wiki/3-2_(Overcooked!)
; moving counters
\ No newline at end of file
__________""#NIK?TX##
__________""#__A____$
__________""#_______$
__________""#__A____P
__________""_________
C_________""________C
#_________""________#
C_________""________C
#|U#U#U@@####F@F@F|##
; seconds=240
; plates={c:0, d:0}
; dirty_plates=false
; link: https://overcooked.fandom.com/wiki/3-3_(Overcooked!)
; moving trucks: counters and ground are moving
\ No newline at end of file
##F#F#~~~~@@F##
X-----~~~-----#
#-A---~~~-----#
I-----~~~-----$
#-----~~~-----$
K-----~~~-----P
|--A-----------
#+S##~---#C#C##
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/3-4_(Overcooked!)
; ice, moving platforms, water
\ No newline at end of file
"""""#|#O#O#O#X#"""
_____#_________#"""
__#____________#"""
__####____##@@@####
__+_______#_______$
__S___A___#___A___$
__#_______#_______P
__#####C#C#____####
__#____________#"""
____"#_________#"""
"""""###DTE?G###"""
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/4-1_(Overcooked!)
; moving counters
\ No newline at end of file
#########|U#@@@#
##S+##C##______$
#______________$
C______________P
#______________#
#______###X#####
U______#######T#
#__A___________#
#___________A__#
N______________#
#########______?
################
; seconds=240
; plates={c:0, d:0}
; dirty_plates=true
; link: https://overcooked.fandom.com/wiki/4-2_(Overcooked!)
; link: https://www.trueachievements.com/game/Overcooked/walkthrough/6
; dark: only flashlight fov
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment