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

DANCING FIRE :fire::fire::fire:

parent 49af5c5f
No related branches found
No related tags found
2 merge requests!49Resolve "Fire Fire Everywhere 🔥🔥🔥🔥🔥🔥🔥🔥",!47Resolve "Burnt Meals and Ingredients"
Pipeline #45548 passed
......@@ -188,7 +188,7 @@ BurntCookedPatty:
BurntChips:
type: Waste
seconds: 5.0
seconds: 1.0
needs: [ Chips ]
equipment: Basket
......@@ -220,7 +220,7 @@ BurntPizza:
Fire:
type: Effect
seconds: 10.0
seconds: 1.0
needs: [ BurntCookedPatty, BurntChips, BurntFriedFish, BurntTomatoSoup, BurntOnionSoup, BurntPizza ]
manager: FireManager
effect_type: Unusable
......
......@@ -65,6 +65,9 @@ class Visualizer:
self.player_colors = []
self.config = config
self.fire_state = 0
self.fire_time_steps = 8
def create_player_colors(self, n) -> None:
hue_values = np.linspace(0, 1, n + 1)
......@@ -332,6 +335,12 @@ class Visualizer:
item_key += "Plate"
if item_key.startswith("Burnt"):
item_key = item_key.replace("Burnt", "")
if item_key == "Fire":
item_key = (
f"{item_key}{int(self.fire_state/self.fire_time_steps)+1}"
)
self.draw_thing(
pos=pos,
parts=self.config[item_key]["parts"],
......@@ -472,6 +481,8 @@ class Visualizer:
Args: state: The game state returned by the environment.
"""
global FIRE_STATE
for counter in counters:
self.draw_counter(screen, counter, grid_size)
......@@ -499,6 +510,8 @@ class Visualizer:
3,
)
FIRE_STATE = (self.fire_state + 1) % (3 * self.fire_time_steps)
def draw_orders(
self, screen, state, grid_size, width, height, screen_margin, config
):
......
overcooked_simulator/gui_2d_vis/images/fire2.png

27.2 KiB

overcooked_simulator/gui_2d_vis/images/fire3.png

22.9 KiB

......@@ -140,6 +140,25 @@ Fire:
path: images/fire.png
size: 1
Fire1:
parts:
- type: image
path: images/fire.png
size: 1.0
Fire2:
parts:
- type: image
path: images/fire2.png
size: 1.0
Fire3:
parts:
- type: image
path: images/fire3.png
size: 1.0
# Items
Tomato:
parts:
......
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