Skip to content
Snippets Groups Projects
Commit 87ba0c35 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Added pot in stove constructor, and pot viz

parent 661c5024
No related branches found
No related tags found
1 merge request!10Resolve "Pot and stove and cooking tomato soup"
Pipeline #41494 passed
...@@ -14,6 +14,7 @@ from overcooked_simulator.game_items import ( ...@@ -14,6 +14,7 @@ from overcooked_simulator.game_items import (
ProgressibleItem, ProgressibleItem,
Plate, Plate,
Tomato, Tomato,
Pot,
) )
...@@ -202,6 +203,10 @@ class Trash(Counter): ...@@ -202,6 +203,10 @@ class Trash(Counter):
class Stove(Counter): class Stove(Counter):
def __init__(self, pos: npt.NDArray[float], occupied_by: Optional[Item] = ...):
if occupied_by is ...:
occupied_by = Pot()
super().__init__(pos, occupied_by)
def pick_up(self): def pick_up(self):
pass pass
......
...@@ -13,7 +13,7 @@ from overcooked_simulator.counters import ( ...@@ -13,7 +13,7 @@ from overcooked_simulator.counters import (
ServingWindow, ServingWindow,
Stove, Stove,
) )
from overcooked_simulator.game_items import ProgressibleItem, Plate, Item from overcooked_simulator.game_items import ProgressibleItem, Plate, Item, Pot
from overcooked_simulator.game_items import Tomato from overcooked_simulator.game_items import Tomato
from overcooked_simulator.overcooked_environment import Action from overcooked_simulator.overcooked_environment import Action
from overcooked_simulator.simulation_runner import Simulator from overcooked_simulator.simulation_runner import Simulator
...@@ -32,7 +32,7 @@ BACKGROUND_LINES_COLOR = (200, 200, 200) ...@@ -32,7 +32,7 @@ BACKGROUND_LINES_COLOR = (200, 200, 200)
KNIFE_COLOR = (120, 120, 120) KNIFE_COLOR = (120, 120, 120)
PLATE_RETURN_COLOR = (170, 170, 240) PLATE_RETURN_COLOR = (170, 170, 240)
BOARD_COLOR = (239, 193, 151) BOARD_COLOR = (239, 193, 151)
POT_COLOR = (220, 220, 220) POT_COLOR = (180, 180, 180)
# STOVE_COLOR = (60, 60, 60) # STOVE_COLOR = (60, 60, 60)
# STOVE_HEATING_PLATE_COLOR = (252, 123, 73) # STOVE_HEATING_PLATE_COLOR = (252, 123, 73)
...@@ -223,7 +223,7 @@ class PyGameGUI: ...@@ -223,7 +223,7 @@ class PyGameGUI:
self.draw_item(pos, item.holds) self.draw_item(pos, item.holds)
if isinstance(item, Pot): if isinstance(item, Pot):
pot_size = 20 pot_size = 15
pygame.draw.circle(self.screen, GREY, pos, pot_size) pygame.draw.circle(self.screen, GREY, pos, pot_size)
if isinstance(item, ProgressibleItem) and not item.finished: if isinstance(item, ProgressibleItem) and not item.finished:
...@@ -319,7 +319,6 @@ class PyGameGUI: ...@@ -319,7 +319,6 @@ class PyGameGUI:
) )
pygame.draw.rect(self.screen, BLACK, stove_rect) pygame.draw.rect(self.screen, BLACK, stove_rect)
pygame.draw.circle(self.screen, RED, center=counter.pos, radius=10) pygame.draw.circle(self.screen, RED, center=counter.pos, radius=10)
if counter.occupied_by is not None: if counter.occupied_by is not None:
if isinstance(counter.occupied_by, list): if isinstance(counter.occupied_by, list):
for i, o in enumerate(counter.occupied_by): for i, o in enumerate(counter.occupied_by):
......
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