[MIRROR] fixes not being able to clean microwaves (#28606)

* fixes not being able to clean microwaves (#84527)

## About The Pull Request
fixes not being able to clean microwaves

## Why It's Good For The Game
closes #84503

## Changelog
🆑
fix: fixes not being able to clean microwaves
/🆑

* fixes not being able to clean microwaves

---------

Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-07-04 10:53:01 +05:30
committed by GitHub
co-authored by Ben10Omintrix
parent 3baab9b4fd
commit f1b16bc5d7
@@ -367,8 +367,10 @@
return ITEM_INTERACT_SUCCESS
/obj/machinery/microwave/tool_act(mob/living/user, obj/item/tool, list/modifiers)
if(!tool.tool_behaviour)
return ..()
if(operating)
return ITEM_INTERACT_SKIP_TO_ATTACK // Don't use tools if we're dirty
return ITEM_INTERACT_SKIP_TO_ATTACK // Don't use tools if we're operating
if(dirty >= MAX_MICROWAVE_DIRTINESS)
return ITEM_INTERACT_SKIP_TO_ATTACK // Don't insert items if we're dirty
if(panel_open && is_wire_tool(tool))
@@ -376,15 +378,13 @@
return ITEM_INTERACT_SUCCESS
return ..()
/obj/machinery/microwave/attackby(obj/item/item, mob/living/user, params)
/obj/machinery/microwave/item_interaction(mob/living/user, obj/item/item, list/modifiers)
if(operating)
return
return NONE
if(broken > NOT_BROKEN)
if(IS_EDIBLE(item))
balloon_alert(user, "it's broken!")
return TRUE
return ..()
balloon_alert(user, "it's broken!")
return ITEM_INTERACT_BLOCKING
if(istype(item, /obj/item/stock_parts/power_store/cell) && cell_powered)
var/swapped = FALSE
@@ -396,27 +396,23 @@
swapped = TRUE
if(!user.transferItemToLoc(item, src))
update_appearance()
return TRUE
return ITEM_INTERACT_BLOCKING
cell = item
balloon_alert(user, "[swapped ? "swapped" : "inserted"] cell")
update_appearance()
return TRUE
return ITEM_INTERACT_SUCCESS
if(!anchored)
if(IS_EDIBLE(item))
balloon_alert(user, "not secured!")
return TRUE
return ..()
balloon_alert(user, "not secured!")
return ITEM_INTERACT_BLOCKING
if(dirty >= MAX_MICROWAVE_DIRTINESS) // The microwave is all dirty so can't be used!
if(IS_EDIBLE(item))
balloon_alert(user, "it's too dirty!")
return TRUE
return ..()
balloon_alert(user, "it's too dirty!")
return ITEM_INTERACT_BLOCKING
if(vampire_charging_capable && istype(item, /obj/item/modular_computer) && ingredients.len > 0)
balloon_alert(user, "max 1 device!")
return FALSE
return ITEM_INTERACT_BLOCKING
if(istype(item, /obj/item/storage))
var/obj/item/storage/tray = item
@@ -426,14 +422,14 @@
// Non-tray dumping requires a do_after
to_chat(user, span_notice("You start dumping out the contents of [item] into [src]..."))
if(!do_after(user, 2 SECONDS, target = tray))
return
return ITEM_INTERACT_BLOCKING
for(var/obj/tray_item in tray.contents)
if(!IS_EDIBLE(tray_item))
continue
if(ingredients.len >= max_n_of_items)
balloon_alert(user, "it's full!")
return TRUE
return ITEM_INTERACT_BLOCKING
if(tray.atom_storage.attempt_remove(tray_item, src))
loaded++
ingredients += tray_item
@@ -441,23 +437,21 @@
open(autoclose = 0.6 SECONDS)
to_chat(user, span_notice("You insert [loaded] items into \the [src]."))
update_appearance()
return
return ITEM_INTERACT_SUCCESS
if(item.w_class <= WEIGHT_CLASS_NORMAL && !istype(item, /obj/item/storage) && !user.combat_mode)
if(item.w_class <= WEIGHT_CLASS_NORMAL && !user.combat_mode)
if(ingredients.len >= max_n_of_items)
balloon_alert(user, "it's full!")
return TRUE
return ITEM_INTERACT_BLOCKING
if(!user.transferItemToLoc(item, src))
balloon_alert(user, "it's stuck to your hand!")
return FALSE
return ITEM_INTERACT_BLOCKING
ingredients += item
open(autoclose = 0.6 SECONDS)
user.visible_message(span_notice("[user] adds \a [item] to \the [src]."), span_notice("You add [item] to \the [src]."))
update_appearance()
return
return ..()
return ITEM_INTERACT_SUCCESS
/obj/machinery/microwave/attack_hand_secondary(mob/user, list/modifiers)
if(user.can_perform_action(src, ALLOW_SILICON_REACH))