diff --git a/code/ATMOSPHERICS/atmospherics.dm b/code/ATMOSPHERICS/atmospherics.dm
index 093a8e544d..a5e1563972 100644
--- a/code/ATMOSPHERICS/atmospherics.dm
+++ b/code/ATMOSPHERICS/atmospherics.dm
@@ -16,7 +16,8 @@ Pipelines + Other Objects -> Pipe network
power_channel = ENVIRON
var/nodealert = 0
var/power_rating //the maximum amount of power the machine can use to do work, affects how powerful the machine is, in Watts
-
+
+ unacidable = TRUE
layer = ATMOS_LAYER
plane = PLATING_PLANE
diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
index 5291627786..c5fe955523 100644
--- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm
+++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm
@@ -6,6 +6,7 @@
icon = 'icons/obj/power.dmi'
icon_state = "circ-unassembled"
anchored = FALSE
+ unacidable = TRUE
pipe_flags = PIPING_DEFAULT_LAYER_ONLY|PIPING_ONE_PER_TURF
var/kinetic_efficiency = 0.04 //combined kinetic and kinetic-to-electric efficiency
diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm
index 228857a2dc..9a5eb65ba6 100644
--- a/code/game/machinery/OpTable.dm
+++ b/code/game/machinery/OpTable.dm
@@ -5,6 +5,7 @@
icon_state = "table2-idle"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 1
active_power_usage = 5
diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm
index c3be1bbf46..b785a42639 100644
--- a/code/game/machinery/Sleeper.dm
+++ b/code/game/machinery/Sleeper.dm
@@ -6,6 +6,7 @@
var/obj/machinery/sleeper/sleeper
anchored = TRUE //About time someone fixed this.
density = TRUE //VOREStation Edit - Big console
+ unacidable = TRUE
dir = 8
use_power = USE_POWER_IDLE
idle_power_usage = 40
@@ -89,6 +90,7 @@
icon_state = "sleeper_0"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
circuit = /obj/item/weapon/circuitboard/sleeper
var/mob/living/carbon/human/occupant = null
var/list/available_chemicals = list()
diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index bd8edfcd8a..c2170d5b7b 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -8,6 +8,7 @@
icon_state = "body_scanner_0"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
circuit = /obj/item/weapon/circuitboard/body_scanner
use_power = USE_POWER_IDLE
idle_power_usage = 60
@@ -547,6 +548,7 @@
dir = 8
density = FALSE
anchored = TRUE
+ unacidable = TRUE
circuit = /obj/item/weapon/circuitboard/scanner_console
var/printing = null
diff --git a/code/game/machinery/air_alarm.dm b/code/game/machinery/air_alarm.dm
index 6983be8b75..dd653d746a 100644
--- a/code/game/machinery/air_alarm.dm
+++ b/code/game/machinery/air_alarm.dm
@@ -36,6 +36,7 @@
layer = ABOVE_WINDOW_LAYER
vis_flags = VIS_HIDE // They have an emissive that looks bad in openspace due to their wall-mounted nature
anchored = TRUE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 80
active_power_usage = 1000 //For heating/cooling rooms. 1000 joules equates to about 1 degree every 2 seconds for a single tile of air.
diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm
index fd6d65d9fd..73cde92e1b 100644
--- a/code/game/machinery/computer/ai_core.dm
+++ b/code/game/machinery/computer/ai_core.dm
@@ -1,6 +1,7 @@
/obj/structure/AIcore
density = TRUE
anchored = FALSE
+ unacidable = TRUE
name = "\improper AI core"
icon = 'icons/mob/AI.dmi'
icon_state = "0"
diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm
index d6847d7cf4..60935a8472 100644
--- a/code/game/machinery/computer/computer.dm
+++ b/code/game/machinery/computer/computer.dm
@@ -4,6 +4,7 @@
icon_state = "computer"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 300
active_power_usage = 300
diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm
index 19ae206605..78f8569cb4 100644
--- a/code/game/machinery/cryopod.dm
+++ b/code/game/machinery/cryopod.dm
@@ -194,6 +194,7 @@
icon_state = "cryopod_0" //VOREStation Edit - New Icon
density = TRUE
anchored = TRUE
+ unacidable = TRUE
dir = WEST
var/base_icon_state = "cryopod_0" //VOREStation Edit - New Icon
diff --git a/code/game/machinery/fire_alarm.dm b/code/game/machinery/fire_alarm.dm
index d8d3fde222..a7e0da37f6 100644
--- a/code/game/machinery/fire_alarm.dm
+++ b/code/game/machinery/fire_alarm.dm
@@ -15,6 +15,7 @@ FIRE ALARM
var/timing = 0.0
var/lockdownbyai = 0
anchored = TRUE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 2
active_power_usage = 6
diff --git a/code/game/machinery/pipe/pipe_dispenser.dm b/code/game/machinery/pipe/pipe_dispenser.dm
index 0b4d054858..8827dc8782 100644
--- a/code/game/machinery/pipe/pipe_dispenser.dm
+++ b/code/game/machinery/pipe/pipe_dispenser.dm
@@ -5,6 +5,7 @@
icon_state = "pipe_d"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
var/unwrenched = 0
var/wait = 0
var/p_layer = PIPING_LAYER_REGULAR
diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm
index de35add336..a1d44b9838 100644
--- a/code/game/machinery/rechargestation.dm
+++ b/code/game/machinery/rechargestation.dm
@@ -5,6 +5,7 @@
icon_state = "borgcharger0"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
circuit = /obj/item/weapon/circuitboard/recharge_station
use_power = USE_POWER_IDLE
idle_power_usage = 50
diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm
index bc7c4fcebe..d1db08374a 100644
--- a/code/game/machinery/status_display.dm
+++ b/code/game/machinery/status_display.dm
@@ -17,6 +17,7 @@
name = "status display"
anchored = TRUE
density = FALSE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 10
circuit = /obj/item/weapon/circuitboard/status_display
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 654f0598c6..784a752bda 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -17,6 +17,7 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
/obj/machinery/telecomms
icon = 'icons/obj/stationobjs_vr.dmi' //VOREStation Add
+ unacidable = TRUE
var/list/links = list() // list of machines this machine is linked to
var/traffic = 0 // value increases as traffic increases
var/netspeed = 5 // how much traffic to lose per tick (50 gigabytes/second * netspeed)
diff --git a/code/game/machinery/turret_control.dm b/code/game/machinery/turret_control.dm
index ad55fe14a1..cb9226ad99 100644
--- a/code/game/machinery/turret_control.dm
+++ b/code/game/machinery/turret_control.dm
@@ -13,6 +13,7 @@
icon_state = "control_standby"
anchored = TRUE
density = FALSE
+ unacidable = TRUE
var/enabled = FALSE
var/lethal = FALSE
var/lethal_is_configurable = TRUE
diff --git a/code/game/mecha/mech_prosthetics.dm b/code/game/mecha/mech_prosthetics.dm
index 5a2906dfae..470ede8a0f 100644
--- a/code/game/mecha/mech_prosthetics.dm
+++ b/code/game/mecha/mech_prosthetics.dm
@@ -5,6 +5,7 @@
desc = "A machine used for construction of prosthetics."
density = TRUE
anchored = TRUE
+ unacidable = TRUE
use_power = USE_POWER_IDLE
idle_power_usage = 20
active_power_usage = 5000
diff --git a/code/game/objects/effects/alien/aliens.dm b/code/game/objects/effects/alien/aliens.dm
index 5882723311..c1d46415c8 100644
--- a/code/game/objects/effects/alien/aliens.dm
+++ b/code/game/objects/effects/alien/aliens.dm
@@ -164,6 +164,7 @@
icon_state = "weeds"
anchored = TRUE
density = FALSE
+ unacidable = TRUE
plane = TURF_PLANE
layer = ABOVE_TURF_LAYER
@@ -402,10 +403,13 @@
for(var/mob/O in hearers(src, null))
O.show_message("[src.target] collapses under its own weight into a puddle of goop and undigested debris!", 1)
- if(istype(target, /turf/simulated/wall)) // I hate turf code.
+ if(iswall(target)) //Gurgs : Spruced up corrosive acid
var/turf/simulated/wall/W = target
W.dismantle_wall(1)
- else
+ if(isfloor(target))
+ var/turf/simulated/floor/T = target
+ T.ex_act(1)
+ else if(isobj(target))
qdel(target)
qdel(src)
return
diff --git a/code/game/objects/items/devices/defib.dm b/code/game/objects/items/devices/defib.dm
index a98d984d17..782edc83f0 100644
--- a/code/game/objects/items/devices/defib.dm
+++ b/code/game/objects/items/devices/defib.dm
@@ -13,6 +13,7 @@
throwforce = 6
preserve_item = 1
w_class = ITEMSIZE_LARGE
+ unacidable = TRUE
origin_tech = list(TECH_BIO = 4, TECH_POWER = 2)
action_button_name = "Remove/Replace Paddles"
diff --git a/code/game/objects/structures/alien/alien.dm b/code/game/objects/structures/alien/alien.dm
index 31a609e5a5..6aa1ec5060 100644
--- a/code/game/objects/structures/alien/alien.dm
+++ b/code/game/objects/structures/alien/alien.dm
@@ -4,6 +4,7 @@
icon = 'icons/mob/alien.dmi'
layer = ABOVE_JUNK_LAYER
var/health = 50
+ unacidable = TRUE
/obj/structure/alien/proc/healthcheck()
if(health <=0)
diff --git a/code/game/objects/structures/cliff.dm b/code/game/objects/structures/cliff.dm
index 10413e3424..9ee6570247 100644
--- a/code/game/objects/structures/cliff.dm
+++ b/code/game/objects/structures/cliff.dm
@@ -33,6 +33,7 @@ two tiles on initialization, and which way a cliff is facing may change during m
opacity = FALSE
climbable = TRUE
climb_delay = 10 SECONDS
+ unacidable = TRUE
block_turf_edges = TRUE // Don't want turf edges popping up from the cliff edge.
plane = TURF_PLANE
diff --git a/code/game/objects/structures/ghost_pods/ghost_pods.dm b/code/game/objects/structures/ghost_pods/ghost_pods.dm
index f5b7756485..c77e00e13e 100644
--- a/code/game/objects/structures/ghost_pods/ghost_pods.dm
+++ b/code/game/objects/structures/ghost_pods/ghost_pods.dm
@@ -8,6 +8,7 @@
var/used = FALSE
var/busy = FALSE // Don't spam ghosts by spamclicking.
var/needscharger //For drone pods that want their pod to turn into a charger.
+ unacidable = TRUE
// Call this to get a ghost volunteer.
/obj/structure/ghost_pod/proc/trigger(var/alert, var/adminalert)
diff --git a/code/game/objects/structures/loot_piles.dm b/code/game/objects/structures/loot_piles.dm
index 4443fb6da3..a0737da55c 100644
--- a/code/game/objects/structures/loot_piles.dm
+++ b/code/game/objects/structures/loot_piles.dm
@@ -21,6 +21,7 @@ Loot piles can be depleted, if loot_depleted is turned on. Note that players wh
icon_state = "randompile"
density = FALSE
anchored = TRUE
+ unacidable = TRUE
var/list/icon_states_to_use = list() // List of icon states the pile can choose from on initialization. If empty or null, it will stay the initial icon_state.
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index f9f2287302..47f4aa26cf 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -20,6 +20,7 @@
var/obj/structure/m_tray/connected = null
var/list/occupants = list()
anchored = TRUE
+ unacidable = TRUE
/obj/structure/morgue/Destroy()
if(connected)
diff --git a/code/game/objects/structures/stasis_cage.dm b/code/game/objects/structures/stasis_cage.dm
index b9cae77fa3..b0c9034014 100644
--- a/code/game/objects/structures/stasis_cage.dm
+++ b/code/game/objects/structures/stasis_cage.dm
@@ -4,6 +4,7 @@
icon = 'icons/obj/storage_vr.dmi' //VOREStation Edit
icon_state = "critteropen"
density = TRUE
+ unacidable = TRUE
var/mob/living/simple_mob/contained
diff --git a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
index 697e8cffbc..c08a9d1951 100644
--- a/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
+++ b/code/game/objects/structures/stool_bed_chair_nest/alien_nests.dm
@@ -6,6 +6,7 @@
icon = 'icons/mob/alien.dmi'
icon_state = "nest"
var/health = 100
+ unacidable = TRUE
/obj/structure/bed/nest/update_icon()
return
diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm
index 9217d132bb..e68b33089a 100644
--- a/code/game/shuttle_engines.dm
+++ b/code/game/shuttle_engines.dm
@@ -1,6 +1,7 @@
/obj/structure/shuttle
name = "shuttle"
icon = 'icons/turf/shuttle_parts.dmi'
+ unacidable = TRUE
/obj/structure/shuttle/window
name = "shuttle window"
diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm
index c5b3de8eda..d7e8713edd 100644
--- a/code/game/turfs/flooring/flooring.dm
+++ b/code/game/turfs/flooring/flooring.dm
@@ -213,7 +213,7 @@ var/list/flooring_types
desc = "Gritty and unpleasant."
icon = 'icons/turf/flooring/asteroid.dmi'
icon_base = "asteroid"
- flags = TURF_REMOVE_SHOVEL
+ flags = TURF_REMOVE_SHOVEL | TURF_ACID_IMMUNE
build_type = null
footstep_sounds = list("human" = list(
'sound/effects/footstep/asteroid1.ogg',
@@ -554,7 +554,7 @@ var/list/flooring_types
icon = 'icons/turf/outdoors.dmi'
icon_base = "lava"
is_plating = TRUE
- flags = 0
+ flags = TURF_ACID_IMMUNE
footstep_sounds = list("human" = list(
'sound/effects/footstep/lava1.ogg',
'sound/effects/footstep/lava2.ogg',
diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm
index 71c25b0755..486e215325 100644
--- a/code/game/turfs/simulated/floor_types.dm
+++ b/code/game/turfs/simulated/floor_types.dm
@@ -76,6 +76,7 @@
icon = 'icons/turf/shuttle_white.dmi'
thermal_conductivity = 0.05
heat_capacity = 0
+ flags = TURF_ACID_IMMUNE
var/obj/landed_holder/landed_holder
var/interior_corner = 0
diff --git a/code/game/turfs/simulated/lava.dm b/code/game/turfs/simulated/lava.dm
index e44ac49a66..f7d0644819 100644
--- a/code/game/turfs/simulated/lava.dm
+++ b/code/game/turfs/simulated/lava.dm
@@ -15,6 +15,7 @@
can_build_into_floor = TRUE
can_dirty = FALSE
initial_flooring = /decl/flooring/lava // Defining this in case someone DOES step on lava and survive. Somehow.
+ flags = TURF_ACID_IMMUNE
/turf/simulated/floor/lava/outdoors
outdoors = OUTDOORS_YES
diff --git a/code/game/turfs/simulated/water.dm b/code/game/turfs/simulated/water.dm
index d1f0dd37dd..e986e085a5 100644
--- a/code/game/turfs/simulated/water.dm
+++ b/code/game/turfs/simulated/water.dm
@@ -9,6 +9,7 @@
edge_blending_priority = -1
movement_cost = 4
outdoors = OUTDOORS_YES
+ flags = TURF_ACID_IMMUNE
layer = WATER_FLOOR_LAYER
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index aa8d775b9b..4986701fcc 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -4,7 +4,7 @@
icon_state = "default"
dynamic_lighting = 0
plane = SPACE_PLANE
-
+ flags = TURF_ACID_IMMUNE
temperature = T20C
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
can_build_into_floor = TRUE
diff --git a/code/game/turfs/unsimulated.dm b/code/game/turfs/unsimulated.dm
index 39c217a006..0e8c5c98b6 100644
--- a/code/game/turfs/unsimulated.dm
+++ b/code/game/turfs/unsimulated.dm
@@ -3,6 +3,7 @@
oxygen = MOLES_O2STANDARD
nitrogen = MOLES_N2STANDARD
var/skip_init = TRUE // Don't call down the chain, apparently for performance when loading maps at runtime.
+ flags = TURF_ACID_IMMUNE
/turf/unsimulated/Initialize(mapload)
if(skip_init)
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index 9e8967732e..9a4fd1028e 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -5,6 +5,7 @@
icon_state = "off"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
var/active = 0
diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm
index bc8130d0e0..ddd4520bdf 100644
--- a/code/modules/economy/vending.dm
+++ b/code/modules/economy/vending.dm
@@ -13,6 +13,7 @@
icon_state = "generic"
anchored = TRUE
density = TRUE
+ unacidable = TRUE
clicksound = "button"
// Power
diff --git a/code/modules/food/kitchen/gibber.dm b/code/modules/food/kitchen/gibber.dm
index 737072ba55..d348715bc6 100644
--- a/code/modules/food/kitchen/gibber.dm
+++ b/code/modules/food/kitchen/gibber.dm
@@ -6,6 +6,7 @@
icon_state = "grinder"
density = TRUE
anchored = TRUE
+ unacidable = TRUE
req_access = list(access_kitchen,access_morgue)
var/operating = 0 //Is it on?
diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm
index f7c7194e9f..6ed48caded 100644
--- a/code/modules/food/kitchen/microwave.dm
+++ b/code/modules/food/kitchen/microwave.dm
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
/obj/machinery/microwave
name = "Microwave"
desc = "Studies are inconclusive on whether pressing your face against the glass is harmful."
@@ -616,3 +617,624 @@
var/obj/machinery/microwave/M = container
M.muck_finish()
. = ..()
+=======
+/obj/machinery/microwave
+ name = "Microwave"
+ desc = "Studies are inconclusive on whether pressing your face against the glass is harmful."
+ icon = 'icons/obj/kitchen.dmi'
+ icon_state = "mw"
+ layer = 2.9
+ density = TRUE
+ anchored = TRUE
+ unacidable = TRUE
+ use_power = USE_POWER_IDLE
+ idle_power_usage = 5
+ active_power_usage = 2000
+ clicksound = "button"
+ clickvol = "30"
+ flags = OPENCONTAINER | NOREACT
+ circuit = /obj/item/weapon/circuitboard/microwave
+ var/operating = 0 // Is it on?
+ var/dirty = 0 // = {0..100} Does it need cleaning?
+ var/broken = 0 // ={0,1,2} How broken is it???
+ var/circuit_item_capacity = 1 //how many items does the circuit add to max number of items
+ var/item_level = 0 // items microwave can handle, 0 foodstuff, 1 materials
+ var/global/list/acceptable_items // List of the items you can put in
+ var/global/list/available_recipes // List of the recipes you can use
+ var/global/list/acceptable_reagents // List of the reagents you can put in
+
+ var/global/max_n_of_items = 20
+ var/appliancetype = MICROWAVE
+ var/datum/looping_sound/microwave/soundloop
+
+
+//see code/modules/food/recipes_microwave.dm for recipes
+
+/*******************
+* Initialising
+********************/
+
+/obj/machinery/microwave/Initialize()
+ . = ..()
+
+ reagents = new/datum/reagents(100)
+ reagents.my_atom = src
+
+ default_apply_parts()
+
+ if(!available_recipes)
+ available_recipes = new
+ for(var/datum/recipe/typepath as anything in subtypesof(/datum/recipe))
+ if((initial(typepath.appliance) & appliancetype))
+ available_recipes += new typepath
+
+ acceptable_items = new
+ acceptable_reagents = new
+ for (var/datum/recipe/recipe in available_recipes)
+ for (var/item in recipe.items)
+ acceptable_items |= item
+ for (var/reagent in recipe.reagents)
+ acceptable_reagents |= reagent
+ // This will do until I can think of a fun recipe to use dionaea in -
+ // will also allow anything using the holder item to be microwaved into
+ // impure carbon. ~Z
+ acceptable_items |= /obj/item/weapon/holder
+ acceptable_items |= /obj/item/weapon/reagent_containers/food/snacks/grown
+ acceptable_items |= /obj/item/device/soulstone
+ acceptable_items |= /obj/item/weapon/fuel_assembly/supermatter
+
+ soundloop = new(list(src), FALSE)
+
+/obj/machinery/microwave/Destroy()
+ QDEL_NULL(soundloop)
+ return ..()
+
+/*******************
+* Item Adding
+********************/
+
+/obj/machinery/microwave/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ if(src.broken > 0)
+ if(src.broken == 2 && O.is_screwdriver()) // If it's broken and they're using a screwdriver
+ user.visible_message( \
+ "\The [user] starts to fix part of the microwave.", \
+ "You start to fix part of the microwave." \
+ )
+ playsound(src, O.usesound, 50, 1)
+ if (do_after(user,20 * O.toolspeed))
+ user.visible_message( \
+ "\The [user] fixes part of the microwave.", \
+ "You have fixed part of the microwave." \
+ )
+ src.broken = 1 // Fix it a bit
+ else if(src.broken == 1 && O.is_wrench()) // If it's broken and they're doing the wrench
+ user.visible_message( \
+ "\The [user] starts to fix part of the microwave.", \
+ "You start to fix part of the microwave." \
+ )
+ if (do_after(user,20 * O.toolspeed))
+ user.visible_message( \
+ "\The [user] fixes the microwave.", \
+ "You have fixed the microwave." \
+ )
+ src.icon_state = "mw"
+ src.broken = 0 // Fix it!
+ src.dirty = 0 // just to be sure
+ src.flags = OPENCONTAINER | NOREACT
+ else
+ to_chat(user, "It's broken!")
+ return 1
+
+ else if(src.dirty==100) // The microwave is all dirty so can't be used!
+ if(istype(O, /obj/item/weapon/reagent_containers/spray/cleaner) || istype(O, /obj/item/weapon/soap)) // If they're trying to clean it then let them
+ user.visible_message( \
+ "\The [user] starts to clean the microwave.", \
+ "You start to clean the microwave." \
+ )
+ if (do_after(user,20))
+ user.visible_message( \
+ "\The [user] has cleaned the microwave.", \
+ "You have cleaned the microwave." \
+ )
+ src.dirty = 0 // It's clean!
+ src.broken = 0 // just to be sure
+ src.icon_state = "mw"
+ src.flags = OPENCONTAINER | NOREACT
+ SStgui.update_uis(src)
+ else //Otherwise bad luck!!
+ to_chat(user, "It's dirty!")
+ return 1
+ else if(is_type_in_list(O,acceptable_items))
+ if(contents.len>=(max_n_of_items + component_parts.len + circuit_item_capacity)) //Adds component_parts to the maximum number of items. changed 1 to actually just be the circuit item capacity var.
+ to_chat(user, "This [src] is full of ingredients, you cannot put more.")
+ return 1
+ if(istype(O, /obj/item/stack) && O:get_amount() > 1) // This is bad, but I can't think of how to change it
+ var/obj/item/stack/S = O
+ new O.type (src)
+ S.use(1)
+ user.visible_message( \
+ "\The [user] has added one of [O] to \the [src].", \
+ "You add one of [O] to \the [src].")
+ return
+ else
+ // user.remove_from_mob(O) //This just causes problems so far as I can tell. -Pete - Man whoever you are, it's been years. o7
+ user.drop_from_inventory(O,src)
+ user.visible_message( \
+ "\The [user] has added \the [O] to \the [src].", \
+ "You add \the [O] to \the [src].")
+ SStgui.update_uis(src)
+ return
+ else if(istype(O,/obj/item/weapon/reagent_containers/glass) || \
+ istype(O,/obj/item/weapon/reagent_containers/food/drinks) || \
+ istype(O,/obj/item/weapon/reagent_containers/food/condiment) \
+ )
+ if (!O.reagents)
+ return 1
+ for (var/datum/reagent/R in O.reagents.reagent_list)
+ if (!(R.id in acceptable_reagents))
+ to_chat(user, "Your [O] contains components unsuitable for cookery.")
+ return 1
+ return
+ else if(istype(O,/obj/item/weapon/grab))
+ var/obj/item/weapon/grab/G = O
+ to_chat(user, "This is ridiculous. You can not fit \the [G.affecting] in this [src].")
+ return 1
+ else if(O.is_screwdriver())
+ default_deconstruction_screwdriver(user, O)
+ return
+ else if(O.is_crowbar())
+ if(default_deconstruction_crowbar(user, O))
+ return
+ else
+ user.visible_message( \
+ "\The [user] begins [src.anchored ? "unsecuring" : "securing"] the microwave.", \
+ "You attempt to [src.anchored ? "unsecure" : "secure"] the microwave."
+ )
+ if (do_after(user,20/O.toolspeed))
+ user.visible_message( \
+ "\The [user] [src.anchored ? "unsecures" : "secures"] the microwave.", \
+ "You [src.anchored ? "unsecure" : "secure"] the microwave."
+ )
+ src.anchored = !src.anchored
+ else
+ to_chat(user, "You decide not to do that.")
+ else if(default_part_replacement(user, O))
+ return
+ else
+ to_chat(user, "You have no idea what you can cook with this [O].")
+ ..()
+ SStgui.update_uis(src)
+
+/obj/machinery/microwave/tgui_state(mob/user)
+ return GLOB.tgui_physical_state
+
+/obj/machinery/microwave/attack_ai(mob/user as mob)
+ attack_hand(user)
+
+/obj/machinery/microwave/attack_hand(mob/user as mob)
+ user.set_machine(src)
+ tgui_interact(user)
+
+/*******************
+* Microwave Menu
+********************/
+/obj/machinery/microwave/tgui_interact(mob/user, datum/tgui/ui)
+ ui = SStgui.try_update_ui(user, src, ui)
+ if(!ui)
+ ui = new(user, src, "Microwave", name)
+ ui.open()
+
+/obj/machinery/microwave/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state)
+ var/list/data = ..()
+
+ data["broken"] = broken
+ data["operating"] = operating
+ data["dirty"] = dirty == 100
+ data["items"] = get_items_list()
+
+ return data
+
+/obj/machinery/microwave/proc/get_items_list()
+ var/list/data = list()
+
+ var/list/items_counts = list()
+ var/list/items_measures = list()
+ var/list/items_measures_p = list()
+ for(var/obj/O in ((contents - component_parts) - circuit))
+ var/display_name = O.name
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg))
+ items_measures[display_name] = "egg"
+ items_measures_p[display_name] = "eggs"
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu))
+ items_measures[display_name] = "tofu chunk"
+ items_measures_p[display_name] = "tofu chunks"
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat
+ items_measures[display_name] = "slab of meat"
+ items_measures_p[display_name] = "slabs of meat"
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket))
+ display_name = "Turnovers"
+ items_measures[display_name] = "turnover"
+ items_measures_p[display_name] = "turnovers"
+ if(istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat))
+ items_measures[display_name] = "fillet of meat"
+ items_measures_p[display_name] = "fillets of meat"
+ items_counts[display_name]++
+ for(var/O in items_counts)
+ var/N = items_counts[O]
+ if(!(O in items_measures))
+ data.Add(list(list(
+ "name" = capitalize(O),
+ "amt" = N,
+ "extra" = "[lowertext(O)][N > 1 ? "s" : ""]",
+ )))
+ else
+ data.Add(list(list(
+ "name" = capitalize(O),
+ "amt" = N,
+ "extra" = N == 1 ? items_measures[O] : items_measures_p[O],
+ )))
+
+ for(var/datum/reagent/R in reagents.reagent_list)
+ var/display_name = R.name
+ if(R.id == "capsaicin")
+ display_name = "Hotsauce"
+ if(R.id == "frostoil")
+ display_name = "Coldsauce"
+ data.Add(list(list(
+ "name" = display_name,
+ "amt" = R.volume,
+ "extra" = "unit[R.volume > 1 ? "s" : ""]"
+ )))
+
+ return data
+
+/obj/machinery/microwave/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
+ if(..())
+ return TRUE
+
+ if(operating)
+ return TRUE
+
+ switch(action)
+ if("cook")
+ cook()
+ return TRUE
+
+ if("dispose")
+ dispose()
+ return TRUE
+/*
+/obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu
+ var/dat = ""
+ if(src.broken > 0)
+ dat = {"Bzzzzttttt"}
+ else if(src.operating)
+ dat = {"Microwaving in progress!
Please wait...!"}
+ else if(src.dirty==100)
+ dat = {"This microwave is dirty!
Please clean it before use!"}
+ else
+ var/list/items_counts = new
+ var/list/items_measures = new
+ var/list/items_measures_p = new
+ for (var/obj/O in ((contents - component_parts) - circuit))
+ var/display_name = O.name
+ if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/egg))
+ items_measures[display_name] = "egg"
+ items_measures_p[display_name] = "eggs"
+ if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/tofu))
+ items_measures[display_name] = "tofu chunk"
+ items_measures_p[display_name] = "tofu chunks"
+ if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/meat)) //any meat
+ items_measures[display_name] = "slab of meat"
+ items_measures_p[display_name] = "slabs of meat"
+ if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/donkpocket))
+ display_name = "Turnovers"
+ items_measures[display_name] = "turnover"
+ items_measures_p[display_name] = "turnovers"
+ if (istype(O,/obj/item/weapon/reagent_containers/food/snacks/carpmeat))
+ items_measures[display_name] = "fillet of meat"
+ items_measures_p[display_name] = "fillets of meat"
+ items_counts[display_name]++
+ for (var/O in items_counts)
+ var/N = items_counts[O]
+ if (!(O in items_measures))
+ dat += {"[capitalize(O)]: [N] [lowertext(O)]\s
"}
+ else
+ if (N==1)
+ dat += {"[capitalize(O)]: [N] [items_measures[O]]
"}
+ else
+ dat += {"[capitalize(O)]: [N] [items_measures_p[O]]
"}
+
+ for (var/datum/reagent/R in reagents.reagent_list)
+ var/display_name = R.name
+ if (R.id == "capsaicin")
+ display_name = "Hotsauce"
+ if (R.id == "frostoil")
+ display_name = "Coldsauce"
+ dat += {"[display_name]: [R.volume] unit\s
"}
+
+ if (items_counts.len==0 && reagents.reagent_list.len==0)
+ dat = {"The microwave is empty
"}
+ else
+ dat = {"Ingredients:
[dat]"}
+ dat += {"