diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 34c0b809c421..389c835d1f4e 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -861,8 +861,7 @@ GENETICS SCANNER if (!isslime(M)) to_chat(user, "This device can only scan slimes!") return - var/mob/living/simple_animal/slime/T = M - slime_scan(T, user) + slime_scan(M, user) /proc/slime_scan(mob/living/simple_animal/slime/T, mob/living/user) var/output = "Slime scan results:" diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index 1f01f1f5eb02..2006262b6d43 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -19,6 +19,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) . = ..() if (mapload) GLOB.monkey_recyclers += src + locate_camera_console() /obj/machinery/monkey_recycler/Destroy() GLOB.monkey_recyclers -= src @@ -28,6 +29,15 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) connected.Cut() return ..() +/obj/machinery/monkey_recycler/proc/locate_camera_console() + if(length(connected)) + return // we're already connected! + for(var/obj/machinery/computer/camera_advanced/xenobio/xeno_camera in GLOB.machines) + if(get_area(xeno_camera) == get_area(loc)) + xeno_camera.connected_recycler = src + connected |= xeno_camera + break + /obj/machinery/monkey_recycler/RefreshParts() //Ranges from 0.2 to 0.8 per monkey recycled cube_production = 0 for(var/obj/item/stock_parts/manipulator/B in component_parts) @@ -75,6 +85,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) to_chat(user, "The monkey is attached to something.") return qdel(target) + target = null //we sleep in this proc, clear reference NOW to_chat(user, "You stuff the monkey into the machine.") playsound(src.loc, 'sound/machines/juicer.ogg', 50, 1) var/offset = prob(50) ? -2 : 2 diff --git a/code/modules/mob/living/simple_animal/slime/death.dm b/code/modules/mob/living/simple_animal/slime/death.dm index 5cac0c630c1f..e23a0383c75a 100644 --- a/code/modules/mob/living/simple_animal/slime/death.dm +++ b/code/modules/mob/living/simple_animal/slime/death.dm @@ -1,6 +1,10 @@ /mob/living/simple_animal/slime/death(gibbed) if(stat == DEAD) return + + if(buckled) + Feedstop(silent = TRUE) //releases ourselves from the mob we fed on. + if(!gibbed) if(is_adult) var/mob/living/simple_animal/slime/M = new(loc, colour) @@ -18,9 +22,6 @@ update_name() return - if(buckled) - Feedstop(silent = TRUE) //releases ourselves from the mob we fed on. - stat = DEAD cut_overlays() diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index d93993bf1fab..d4e1cee0d0b4 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -170,6 +170,9 @@ to_chat(src, "I must be conscious to do this...") return + if(istype(loc, /obj/machinery/computer/camera_advanced/xenobio)) + return //no you cannot split while you're in the matrix (this prevents GC issues and slimes disappearing) + var/list/babies = list() var/new_nutrition = round(nutrition * 0.9) var/new_powerlevel = round(powerlevel / 4) @@ -187,7 +190,7 @@ M.set_nutrition(new_nutrition) //Player slimes are more robust at spliting. Once an oversight of poor copypasta, now a feature! M.powerlevel = new_powerlevel if(i != 1) - step_away(M,src) + step_away(M, get_turf(src)) M.Friends = Friends.Copy() babies += M M.mutation_chance = clamp(mutation_chance+(rand(5,-5)),0,100) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index 5bf1aa858db8..d0b8446f506c 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -353,6 +353,7 @@ ++Friends[user] else Friends[user] = 1 + RegisterSignal(user, COMSIG_PARENT_QDELETING, PROC_REF(clear_friend)) to_chat(user, "You feed the slime the plasma. It chirps happily.") var/obj/item/stack/sheet/mineral/plasma/S = W S.use(1) @@ -416,6 +417,10 @@ visible_message("The mutated core shudders, and collapses into a puddle, unable to maintain its form.") qdel(src) +/mob/living/simple_animal/slime/proc/clear_friend(mob/living/friend) + UnregisterSignal(friend, COMSIG_PARENT_QDELETING) + Friends -= friend + /mob/living/simple_animal/slime/proc/apply_water() adjustBruteLoss(rand(15,20)) if(!client)