diff --git a/code/modules/food/kitchen/microwave.dm b/code/modules/food/kitchen/microwave.dm index bab265f004b..a46a73c08c8 100644 --- a/code/modules/food/kitchen/microwave.dm +++ b/code/modules/food/kitchen/microwave.dm @@ -14,6 +14,7 @@ clickvol = "30" flags = OPENCONTAINER | NOREACT circuit = /obj/item/weapon/circuitboard/microwave + var/obj/item/device/paicard/paicard = null 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??? @@ -22,7 +23,7 @@ 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 @@ -36,7 +37,7 @@ /obj/machinery/microwave/Initialize() . = ..() - + reagents = new/datum/reagents(100) reagents.my_atom = src @@ -47,7 +48,7 @@ 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) @@ -180,6 +181,9 @@ to_chat(user, "You decide not to do that.") else if(default_part_replacement(user, O)) return + else if(istype(O, /obj/item/device/paicard)) + if(!paicard) + insertpai(user) else to_chat(user, "You have no idea what you can cook with this [O].") ..() @@ -192,6 +196,10 @@ attack_hand(user) /obj/machinery/microwave/attack_hand(mob/user as mob) + if(user.a_intent == I_GRAB) + if(paicard) + ejectpai(user) + return user.set_machine(src) tgui_interact(user) @@ -211,7 +219,7 @@ data["operating"] = operating data["dirty"] = dirty == 100 data["items"] = get_items_list() - + return data /obj/machinery/microwave/proc/get_items_list() @@ -220,6 +228,11 @@ var/list/items_counts = list() var/list/items_measures = list() var/list/items_measures_p = list() + var/list/working_list = contents + working_list -= component_parts + working_list -= circuit + if(paicard) + working_list -= paicard 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)) @@ -283,7 +296,7 @@ if("dispose") dispose() return TRUE -/* +/* /obj/machinery/microwave/interact(mob/user as mob) // The microwave Menu var/dat = "" if(src.broken > 0) @@ -390,7 +403,7 @@ cooked = fail() cooked.forceMove(src.loc) return - + //Making multiple copies of a recipe var/halftime = round(recipe.time*4/10/2) // VOREStation Edit - Quicker Microwaves (Undone during Auroraport, left note in case of reversion, was round(recipe.time/20/2)) if(!wzhzhzh(halftime)) @@ -483,7 +496,7 @@ icon_state = "mw" SStgui.update_uis(src) soundloop.stop() - + /obj/machinery/microwave/proc/stop() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) operating = FALSE // Turn it off again aferwards @@ -558,7 +571,7 @@ if(!do_after(usr, 1 SECONDS, target = src)) return - + if(operating) to_chat(usr, "You can't do that, [src] door is locked!") return @@ -594,7 +607,7 @@ /obj/item/weapon/holder ) result = /obj/effect/decal/cleanable/blood/gibs - + /datum/recipe/splat/before_cook(obj/container) if(istype(container, /obj/machinery/microwave)) var/obj/machinery/microwave/M = container @@ -617,3 +630,34 @@ var/obj/machinery/microwave/M = container M.muck_finish() . = ..() + +//VoreEdit, Living Microwave. Living Microwave. +/obj/machinery/microwave/proc/insertpai(mob/user, obj/item/device/paicard/card) + //var/obj/item/paicard/card = I + var/mob/living/silicon/pai/AI = card.pai + if(paicard) + to_chat(user, span_notice("This bot is already under PAI Control!")) + return + if(!istype(card)) // TODO: Add sleevecard support. + return + if(!card.pai) + to_chat(user, span_notice("This card does not currently have a personality!")) + return + paicard = card + user.unEquip(card) + card.forceMove(src) + //src.ckey = AI.ckey + name = AI.name + //ooc_notes = AI.ooc_notes + to_chat(src, span_notice("You feel a tingle in your circuits as your systems interface with \the [initial(src.name)].")) + +/obj/machinery/microwave/proc/ejectpai(mob/user) + if(paicard) + var/mob/living/silicon/pai/AI = paicard.pai + //AI.ckey = src.ckey + paicard.forceMove(src.loc) + paicard = null + name = initial(src.name) + to_chat(AI, span_notice("You feel a tad claustrophobic as your mind closes back into your card, ejecting from \the [initial(src.name)].")) + if(user) + to_chat(user, span_notice("You eject the card from \the [initial(src.name)].")) \ No newline at end of file diff --git a/code/modules/mob/living/bot/bot.dm b/code/modules/mob/living/bot/bot.dm index 3b4c0230eb4..77fcb8efbd7 100644 --- a/code/modules/mob/living/bot/bot.dm +++ b/code/modules/mob/living/bot/bot.dm @@ -76,6 +76,23 @@ spawn(0) handleAI() +/mob/living/bot/examine(mob/user) + . = ..() + if(health < maxHealth) + if(health > maxHealth/3) + . += "[src]'s parts look loose." + else + . += "[src]'s parts look very loose!" + else + . += "[src] is in pristine condition." + . += span_notice("Its maintenance panel is [open ? "open" : "closed"].") + . += span_info("You can use a screwdriver to [open ? "close" : "open"] it.")) + . += span_notice("Its control panel is [locked ? "locked" : "unlocked"].") + if(paicard) + . += span_notice("It has a pAI device installed.") + if(open) + . += span_info("You can use a crowbar to remove it.")) + /mob/living/bot/updatehealth() if(status_flags & GODMODE) health = getMaxHealth() @@ -144,6 +161,9 @@ to_chat(user, span_notice("You slot the card into \the [initial(src.name)].")) else to_chat(user, span_notice("You must open the panel first!")) + else if(O.is_crowbar()) + if(open) + ejectpai(user) else ..() @@ -209,6 +229,12 @@ if(LAZYLEN(can_go)) if(step_towards(src, pick(can_go))) return + if((locate(/mob/living/bot) in loc) && !pulledby) // Same as above, but we also don't want to have bots ontop of bots. Cleanbots shouldn't stack >:( + var/turf/my_turf = get_turf(src) + var/list/can_go = my_turf.CardinalTurfsWithAccess(botcard) + if(LAZYLEN(can_go)) + if(step_towards(src, pick(can_go))) + return handleIdle() /mob/living/bot/proc/handleRegular() @@ -489,18 +515,6 @@ if(user) to_chat(user, span_notice("You eject the card from \the [initial(src.name)].")) -/mob/living/bot/verb/eject() - set name = "Eject pAI" - set category = "Object" - set src in oview(1) - - if(usr.stat) return - - if(open) - ejectpai(usr) - else - to_chat(usr, span_notice("You must open the panel first!")) - /mob/living/bot/verb/bot_nom(var/mob/living/T in oview(1)) set name = "Bot Nom" set category = "Bot Commands" @@ -515,4 +529,8 @@ set category = "Bot Commands" set desc = "Eject your card, return to smole." - return ejectpai() \ No newline at end of file + return ejectpai() + +/mob/living/bot/Login() + no_vore = FALSE // ROBOT VORE + init_vore() // ROBOT VORE \ No newline at end of file