Drones fixes.

This commit is contained in:
Zuhayr
2014-06-01 20:51:58 +09:30
committed by ZomgPonies
parent 777e31e222
commit 73d9498361
2 changed files with 45 additions and 12 deletions
@@ -15,7 +15,6 @@
// We need to keep track of a few module items so we don't need to do list operations
// every time we need them. These get set in New() after the module is chosen.
var/obj/item/stack/sheet/metal/cyborg/stack_metal = null
var/obj/item/stack/sheet/wood/cyborg/stack_wood = null
var/obj/item/stack/sheet/glass/cyborg/stack_glass = null
@@ -25,6 +24,8 @@
//Used for self-mailing.
var/mail_destination = 0
//Used for pulling.
/mob/living/silicon/robot/drone/New()
..()
@@ -58,7 +59,6 @@
updatename()
updateicon()
//Redefining some robot procs...
/mob/living/silicon/robot/drone/updatename()
real_name = "maintenance drone ([rand(100,999)])"
@@ -101,10 +101,27 @@
return emote(copytext(message,2))
else if(length(message) >= 2)
if(copytext(message, 1 ,3) == ":b" || copytext(message, 1 ,3) == ":B")
if(!is_component_functioning("comms"))
src << "\red Your binary communications component isn't functional."
return
robot_talk(trim(copytext(message,3)))
else if(copytext(message, 1 ,3) == ":d" || copytext(message, 1 ,3) == ":d")
if(!is_component_functioning("radio"))
src << "\red Your radio transmitter isn't functional."
return
for (var/mob/living/S in living_mob_list)
if(istype(S, /mob/living/silicon/robot/drone))
S << "<i><span class='game say'>Drone Talk, <span class='name'>[name]</span><span class='message'> transmits, \"[message]\"</span></span></i>"
for (var/mob/M in dead_mob_list)
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain))
M << "<i><span class='game say'>Drone Talk, <span class='name'>[name]</span><span class='message'> transmits, \"[message]\"</span></span></i>"
else
var/list/listeners = hearers(5,src)
@@ -309,16 +326,24 @@
src << "<b>If a crewmember has noticed you, <i>you are probably breaking your first law</i></b>."
/mob/living/silicon/robot/drone/Bump(atom/movable/AM as mob|obj, yes)
if (!yes || istype(AM,/mob/living)) return
if (!yes || (!istype(AM,/obj/machinery/door) && !istype(AM,/obj/machinery/recharge_station)) ) return
..()
if (istype(AM, /obj/machinery/recharge_station))
var/obj/machinery/recharge_station/F = AM
F.move_inside()
return
/mob/living/silicon/robot/drone/Bumped(AM as mob|obj)
return
/mob/living/silicon/robot/drone/start_pulling(var/atom/movable/AM)
src << "<span class='warning'>You are too small to pull anything.</span>"
return
if(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct))
..()
else if(istype(AM,/obj/item))
var/obj/item/O = AM
if(O.w_class > 2)
src << "<span class='warning'>You are too small to pull that.</span>"
return
else
..()
else
src << "<span class='warning'>You are too small to pull that.</span>"
return
@@ -1,4 +1,4 @@
//Simple borg hand.
s//Simple borg hand.
//Limited use.
/obj/item/weapon/gripper
name = "magnetic gripper"
@@ -53,9 +53,12 @@
wrapped = null
//update_icon()
/obj/item/weapon/gripper/afterattack(atom/target, mob/user as mob)
/obj/item/weapon/gripper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
if(!target) //Target is invalid.
/obj/item/weapon/gripper/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
if(!target || !flag) //Target is invalid or we are not adjacent.
return
//There's some weirdness with items being lost inside the arm. Trying to fix all cases. ~Z
@@ -139,7 +142,12 @@
"plastic" = 0
)
/obj/item/weapon/matter_decompiler/afterattack(atom/target, mob/user as mob)
/obj/item/weapon/matter_decompiler/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
return
/obj/item/weapon/matter_decompiler/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
if(!flag) return //Not adjacent.
//We only want to deal with using this on turfs. Specific items aren't important.
var/turf/T = get_turf(target)