Merge pull request #10929 from Nicaragua1/robotic_arms_bots

Robotic l/r arms bots
This commit is contained in:
variableundefined
2019-02-27 22:54:37 +08:00
committed by GitHub
7 changed files with 27 additions and 24 deletions
@@ -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)
@@ -179,14 +179,10 @@
on = 0
visible_message("<span class='userdanger'>[src] blows apart!</span>")
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)
..()
@@ -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, "<span class='notice'>You add the robot arm to the bucket and sensor assembly. Beep boop!</span>")
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, "<span class='notice'>You add the robot arm to the odd looking toolbox assembly. Boop beep!</span>")
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, "<span class='notice'>You add the robot arm to [src]!</span>")
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, "<span class='warning'>You need to empty [src] out first!</span>")
@@ -593,5 +604,6 @@
return
to_chat(user, "<span class='notice'>You add the trombone to [src]! Heeeenk! </span>")
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)
@@ -388,14 +388,11 @@
on = 0
visible_message("<span class='userdanger'>[src] blows apart!</span>")
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)
@@ -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("<span class='boldannounce'>[src] blows apart!</span>")
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)
@@ -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)
@@ -418,23 +418,18 @@ Auto Patrol: []"},
return 0
/mob/living/simple_animal/bot/secbot/explode()
walk_to(src,0)
visible_message("<span class='userdanger'>[src] blows apart!</span>")
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)
..()