From ef807518acabb4e714b3695bac4320edc7853422 Mon Sep 17 00:00:00 2001 From: Nicaragua Date: Tue, 19 Feb 2019 17:46:00 -0300 Subject: [PATCH] Cleanbot now drops correct arm --- code/modules/mob/living/simple_animal/bot/bot.dm | 5 +++++ code/modules/mob/living/simple_animal/bot/cleanbot.dm | 6 +----- code/modules/mob/living/simple_animal/bot/construction.dm | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index dbec1d42bbe..d8fd3f7ca09 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -63,6 +63,7 @@ var/new_destination // pending new destination (waiting for beacon response) var/destination // destination description tag var/next_destination // the next destination in the patrol route + var/robot_arm = /obj/item/robot_parts/r_arm var/blockcount = 0 //number of times retried a blocked path var/awaiting_beacon = 0 // count of pticks awaiting a beacon response @@ -1106,3 +1107,7 @@ Pass a positive integer as an argument to override a bot's default speed. if(I) I.icon = null path.Cut(1, 2) + +/mob/living/simple_animal/bot/proc/drop_part(obj/item/drop_item, dropzone) + new drop_item(dropzone) + drop_item = null \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index b6cca5940e3..0c52b1517f3 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -179,14 +179,10 @@ on = 0 visible_message("[src] blows apart!") var/turf/Tsec = get_turf(src) - new /obj/item/reagent_containers/glass/bucket(Tsec) - new /obj/item/assembly/prox_sensor(Tsec) - if(prob(50)) - new /obj/item/robot_parts/l_arm(Tsec) - + drop_part(robot_arm, Tsec) do_sparks(3, 1, src) ..() diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 9c11a3d872c..59476262101 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -22,6 +22,7 @@ var/turf/T = get_turf(loc) var/mob/living/simple_animal/bot/cleanbot/A = new /mob/living/simple_animal/bot/cleanbot(T) A.name = created_name + A.robot_arm = W.type to_chat(user, "You add the robot arm to the bucket and sensor assembly. Beep boop!") user.unEquip(src, 1) qdel(src)