diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index dbec1d42bbe..a0b6652f883 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,6 @@ 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) \ 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 0bf2288b411..2737781bd08 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -1,4 +1,5 @@ //Bot Construction +var/robot_arm = /obj/item/robot_parts/l_arm //Cleanbot assembly /obj/item/bucket_sensor @@ -22,6 +23,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) @@ -268,6 +270,7 @@ var/turf/T = get_turf(user.loc) var/mob/living/simple_animal/bot/floorbot/A = new /mob/living/simple_animal/bot/floorbot(T) A.name = created_name + A.robot_arm = W.type to_chat(user, "You add the robot arm to the odd looking toolbox assembly. Boop beep!") user.unEquip(src, 1) qdel(src) @@ -284,7 +287,10 @@ //Medbot Assembly /obj/item/storage/firstaid/attackby(obj/item/I, mob/user, params) if(!istype(I, /obj/item/robot_parts/l_arm) && !istype(I, /obj/item/robot_parts/r_arm)) - return ..() + return ..() + else + robot_arm = I.type + //Making a medibot! if(contents.len) @@ -292,7 +298,7 @@ return var/obj/item/firstaid_arm_assembly/A = new /obj/item/firstaid_arm_assembly(loc, med_bot_skin) - + A.req_one_access = req_one_access A.syndicate_aligned = syndicate_aligned A.treatment_oxy = treatment_oxy @@ -377,6 +383,7 @@ S.treatment_fire = treatment_fire S.treatment_tox = treatment_tox S.treatment_virus = treatment_virus + S.robot_arm = robot_arm else new /mob/living/simple_animal/bot/medbot/syndicate(T) //Syndicate medibots are a special case that have so many unique vars on them, it's not worth passing them through construction phases user.unEquip(src, 1) @@ -440,6 +447,7 @@ to_chat(user, "You add the robot arm to [src]!") name = "helmet/signaler/prox sensor/robot arm assembly" overlays += "hs_arm" + robot_arm = I.type qdel(I) else if((istype(I, /obj/item/melee/baton)) && (build_step >= 3)) @@ -450,6 +458,7 @@ var/mob/living/simple_animal/bot/secbot/S = new /mob/living/simple_animal/bot/secbot S.forceMove(get_turf(src)) S.name = created_name + S.robot_arm = robot_arm qdel(I) qdel(src) @@ -547,6 +556,8 @@ /obj/item/storage/box/clown/attackby(obj/item/W, mob/user, params) if(!istype(W, /obj/item/robot_parts/l_arm) && !istype(W, /obj/item/robot_parts/r_arm)) return ..() + else + robot_arm = W.type if(contents.len) to_chat(user, "You need to empty [src] out first!") @@ -593,5 +604,6 @@ return to_chat(user, "You add the trombone to [src]! Heeeenk! ") qdel(W) - new /mob/living/simple_animal/bot/honkbot(get_turf(loc)) + var/mob/living/simple_animal/bot/honkbot/A = new /mob/living/simple_animal/bot/honkbot(T) + A.robot_arm = robot_arm qdel(src) \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/bot/floorbot.dm b/code/modules/mob/living/simple_animal/bot/floorbot.dm index 68e64ee65ed..c22d37eed19 100644 --- a/code/modules/mob/living/simple_animal/bot/floorbot.dm +++ b/code/modules/mob/living/simple_animal/bot/floorbot.dm @@ -388,14 +388,11 @@ on = 0 visible_message("[src] blows apart!") var/turf/Tsec = get_turf(src) - var/obj/item/storage/toolbox/mechanical/N = new /obj/item/storage/toolbox/mechanical(Tsec) N.contents = list() - new /obj/item/assembly/prox_sensor(Tsec) - if(prob(50)) - new /obj/item/robot_parts/l_arm(Tsec) + drop_part(robot_arm, Tsec) while(amount)//Dumps the tiles into the appropriate sized stacks if(amount >= 16) diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 7f5c56151d5..958f493e309 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -278,15 +278,14 @@ else continue -/mob/living/simple_animal/bot/honkbot/explode() +/mob/living/simple_animal/bot/honkbot/explode() //doesn't drop cardboard nor its assembly, since its a very frail material. walk_to(src, 0) visible_message("[src] blows apart!") var/turf/Tsec = get_turf(src) - //doesn't drop cardboard nor its assembly, since its a very frail material. + new /obj/item/bikehorn(Tsec) + new /obj/item/assembly/prox_sensor(Tsec) if(prob(50)) - new /obj/item/robot_parts/r_arm(Tsec) - new /obj/item/bikehorn(Tsec) - new /obj/item/assembly/prox_sensor(Tsec) + drop_part(robot_arm, Tsec) new /obj/effect/decal/cleanable/blood/oil(loc) var/datum/effect_system/spark_spread/s = new s.set_up(3, 1, src) diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 1c7cb902be3..9507b91e4f0 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -591,7 +591,7 @@ new /obj/item/healthanalyzer(Tsec) if(prob(50)) - new /obj/item/robot_parts/l_arm(Tsec) + drop_part(robot_arm, Tsec) if(reagent_glass) reagent_glass.forceMove(Tsec) diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 2d41fda0894..14a72c43fac 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -418,23 +418,18 @@ Auto Patrol: []"}, return 0 /mob/living/simple_animal/bot/secbot/explode() - walk_to(src,0) visible_message("[src] blows apart!") var/turf/Tsec = get_turf(src) - var/obj/item/secbot_assembly/Sa = new /obj/item/secbot_assembly(Tsec) Sa.build_step = 1 Sa.overlays += "hs_hole" Sa.created_name = name new /obj/item/assembly/prox_sensor(Tsec) new /obj/item/melee/baton(Tsec) - if(prob(50)) - new /obj/item/robot_parts/l_arm(Tsec) - + drop_part(robot_arm, Tsec) do_sparks(3, 1, src) - new /obj/effect/decal/cleanable/blood/oil(loc) ..()