diff --git a/code/modules/food_and_drinks/machinery/microwave.dm b/code/modules/food_and_drinks/machinery/microwave.dm
index 80db6715b7a..a5576f4ebd6 100644
--- a/code/modules/food_and_drinks/machinery/microwave.dm
+++ b/code/modules/food_and_drinks/machinery/microwave.dm
@@ -3,8 +3,9 @@
/obj/machinery/microwave//SKYRAT EDIT - ICON OVERRIDEN BY AESTHETICS - SEE MODULE
name = "microwave oven"
desc = "Cooks and boils stuff."
- icon = 'icons/obj/kitchen.dmi'
- icon_state = "mw"
+ icon = 'icons/obj/machines/microwave.dmi'
+ icon_state = "map_icon"
+ appearance_flags = KEEP_TOGETHER | LONG_GLIDE | PIXEL_SCALE
layer = BELOW_OBJ_LAYER
density = TRUE
circuit = /obj/item/circuitboard/machine/microwave
@@ -16,6 +17,7 @@
var/dirty = 0 // 0 to 100 // Does it need cleaning?
var/dirty_anim_playing = FALSE
var/broken = 0 // 0, 1 or 2 // How broken is it???
+ var/open = FALSE
var/max_n_of_items = 10
var/efficiency = 0
var/datum/looping_sound/microwave/soundloop
@@ -31,11 +33,14 @@
/obj/machinery/microwave/Initialize(mapload)
. = ..()
+
wires = new /datum/wires/microwave(src)
create_reagents(100)
soundloop = new(src, FALSE)
set_on_table()
+ update_appearance(UPDATE_ICON)
+
/obj/machinery/microwave/Destroy()
eject()
if(wires)
@@ -91,23 +96,94 @@
"[span_notice("- Capacity: [max_n_of_items] items.")]\n"+\
span_notice("- Cook time reduced by [(efficiency - 1) * 25]%.")
+#define MICROWAVE_INGREDIENT_OVERLAY_SIZE 24
+
+/obj/machinery/microwave/update_overlays()
+ // When this is the nth ingredient, whats its pixel_x?
+ var/static/list/ingredient_shifts = list(
+ // SKYRAT EDIT CHANGE START - All values offset by -3 from original
+ -3,
+ 0,
+ -6,
+ 1,
+ -7,
+ -1,
+ -5,
+ // SKYRAT EDIT CHANGE END
+ )
+
+ . = ..()
+
+ // All of these will use a full icon state instead
+ if (panel_open || dirty == 100 || broken || dirty_anim_playing)
+ return .
+
+ var/ingredient_count = 0
+
+ for (var/atom/movable/ingredient as anything in ingredients)
+ var/image/ingredient_overlay = image(ingredient, src)
+
+ var/icon/ingredient_icon = icon(ingredient.icon, ingredient.icon_state)
+
+ ingredient_overlay.transform = ingredient_overlay.transform.Scale(
+ MICROWAVE_INGREDIENT_OVERLAY_SIZE / ingredient_icon.Width(),
+ MICROWAVE_INGREDIENT_OVERLAY_SIZE / ingredient_icon.Height(),
+ )
+
+ ingredient_overlay.pixel_y = -4
+ ingredient_overlay.layer = FLOAT_LAYER
+ ingredient_overlay.plane = FLOAT_PLANE
+ ingredient_overlay.blend_mode = BLEND_INSET_OVERLAY
+ ingredient_overlay.pixel_x = ingredient_shifts[(ingredient_count % ingredient_shifts.len) + 1]
+
+ ingredient_count += 1
+
+ . += ingredient_overlay
+
+ var/border_icon_state
+ var/door_icon_state
+
+ if (open)
+ door_icon_state = "door_open"
+ border_icon_state = "mwo"
+ else if (operating)
+ door_icon_state = "door_on"
+ border_icon_state = "mw1"
+ else
+ door_icon_state = "door_off"
+ border_icon_state = "mw"
+
+ . += mutable_appearance(
+ icon,
+ door_icon_state,
+ alpha = ingredients.len > 0 ? 128 : 255,
+ )
+
+ . += border_icon_state
+
+ if (!open)
+ . += "door_handle"
+
+ return .
+
+#undef MICROWAVE_INGREDIENT_OVERLAY_SIZE
+
/obj/machinery/microwave/update_icon_state()
- if(broken)
+ if (broken)
icon_state = "mwb"
- return ..()
- if(dirty_anim_playing)
+ else if (dirty_anim_playing)
icon_state = "mwbloody1"
- return ..()
- if(dirty == 100)
- icon_state = "mwbloody"
- return ..()
- if(operating)
- icon_state = "mw1"
- return ..()
- if(panel_open)
+ else if (dirty == 100)
+ icon_state = open ? "mwbloodyo" : "mwbloody"
+ else if(operating)
+ icon_state = "back_on"
+ else if(open)
+ icon_state = "back_open"
+ else if(panel_open)
icon_state = "mw-o"
- return ..()
- icon_state = "mw"
+ else
+ icon_state = "back_off"
+
return ..()
/obj/machinery/microwave/wrench_act(mob/living/user, obj/item/tool)
@@ -205,6 +281,7 @@
ingredients += O
user.visible_message(span_notice("[user] adds \a [O] to \the [src]."), span_notice("You add [O] to \the [src]."))
+ update_appearance()
return
..()
@@ -251,7 +328,7 @@
var/atom/movable/AM = i
AM.forceMove(drop_location())
ingredients.Cut()
- flick("[dirty == 100 ? "mwbloodyo" : "mwo"]", src)
+ open()
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
@@ -379,8 +456,16 @@
/obj/machinery/microwave/proc/after_finish_loop()
set_light(0)
soundloop.stop()
+ open()
+
+/obj/machinery/microwave/proc/open()
+ open = TRUE
+ update_appearance()
+ addtimer(CALLBACK(src, .proc/close), 0.8 SECONDS)
+
+/obj/machinery/microwave/proc/close()
+ open = FALSE
update_appearance()
- flick("[dirty == 100 ? "mwbloodyo" : "mwo"]", src)
/// Go on top of a table if we're anchored & not varedited
/obj/machinery/microwave/proc/set_on_table()
diff --git a/html/changelogs/AutoChangeLog-pr-16678.yml b/html/changelogs/AutoChangeLog-pr-16678.yml
new file mode 100644
index 00000000000..39126b75b6d
--- /dev/null
+++ b/html/changelogs/AutoChangeLog-pr-16678.yml
@@ -0,0 +1,4 @@
+author: "OrionTheFox"
+delete-after: True
+changes:
+ - imageadd: "You can now see food inside the microwave. (Skyrat edition!)"
diff --git a/icons/obj/kitchen.dmi b/icons/obj/kitchen.dmi
index cda61478481..d7b58d51f32 100644
Binary files a/icons/obj/kitchen.dmi and b/icons/obj/kitchen.dmi differ
diff --git a/icons/obj/machines/microwave.dmi b/icons/obj/machines/microwave.dmi
new file mode 100644
index 00000000000..427a5d9daae
Binary files /dev/null and b/icons/obj/machines/microwave.dmi differ
diff --git a/modular_skyrat/modules/aesthetics/kitchen/kitchen.dm b/modular_skyrat/modules/aesthetics/kitchen/kitchen.dm
index 46df4f7b642..b97494f75ea 100644
--- a/modular_skyrat/modules/aesthetics/kitchen/kitchen.dm
+++ b/modular_skyrat/modules/aesthetics/kitchen/kitchen.dm
@@ -1,6 +1,3 @@
-/obj/machinery/microwave
- icon = 'modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi'
-
/obj/structure/kitchenspike_frame
icon = 'modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi'
@@ -21,3 +18,7 @@
/obj/machinery/gibber
icon = 'modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi'
+
+//Different icon file, but it will still go in the kitchen folder!!!
+/obj/machinery/microwave
+ icon = 'modular_skyrat/modules/aesthetics/kitchen/microwave.dmi'
diff --git a/modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi b/modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi
index ac892336b5b..748e0d8ea28 100644
Binary files a/modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi and b/modular_skyrat/modules/aesthetics/kitchen/kitchen.dmi differ
diff --git a/modular_skyrat/modules/aesthetics/kitchen/microwave.dmi b/modular_skyrat/modules/aesthetics/kitchen/microwave.dmi
new file mode 100644
index 00000000000..d5560e1bc07
Binary files /dev/null and b/modular_skyrat/modules/aesthetics/kitchen/microwave.dmi differ