Merge pull request #5111 from Zuhayr/master

Fixes
This commit is contained in:
Chinsky
2014-06-01 19:34:12 +04:00
6 changed files with 70 additions and 66 deletions

View File

@@ -17,6 +17,11 @@
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
for(var/mob/living/target in targets)
spawn(0)
if(target.buckled)
var/obj/structure/stool/bed/buckled_to = target.buckled.
buckled_to.unbuckle()
var/mobloc = get_turf(target.loc)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )
var/atom/movable/overlay/animation = new /atom/movable/overlay( mobloc )

View File

@@ -33,6 +33,9 @@ var/const/HOLOPAD_MODE = 0
name = "\improper AI holopad"
desc = "It's a floor-mounted device for projecting holographic images. It is activated remotely."
icon_state = "holopad0"
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
var/mob/living/silicon/ai/master//Which AI, if any, is controlling the object? Only one AI may control a hologram at any time.
var/last_request = 0 //to prevent request spam. ~Carn
var/holo_range = 5 // Change to change how far the AI can move away from the holopad before deactivating.

View File

@@ -458,36 +458,19 @@
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)
if(user != M)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src]",\
"\red You patch some dents on \the [M]'s [S.display_name]",\
"You hear a welder.")
else
user.visible_message("\red \The [user] patches some dents on their [S.display_name] with \the [src]",\
"\red You patch some dents on your [S.display_name]",\
"You hear a welder.")
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
if(H.getBruteLoss() > 0)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
user.visible_message("\red \The [user] patches some dents on \the [M] with \the [src]",\
"\red You patch some of the dents on \the [M].",\
"You hear a welder.")
H.heal_overall_damage(5,0)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
user << "Nothing to fix!"
if(S.brute_dam)
S.heal_damage(15,0,0,1)
user.visible_message("\red \The [user] patches some dents on \the [M]'s [S.display_name] with \the [src].")
return
else
user << "Nothing to fix!"
else
return ..()
return ..()

View File

@@ -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 third 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

View File

@@ -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)

View File

@@ -640,39 +640,19 @@ obj/structure/cable/proc/cableColor(var/colorC)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
return ..()
if(S.burn_dam > 0 && use(1))
S.heal_damage(0,15,0,1)
if(user != M)
user.visible_message("<span class='notice'>\The [user] repairs some burn damage on [M]'s [S.display_name] with \the [src]</span>",\
"<span class='notice'>\The [user] repairs some burn damage on your [S.display_name]</span>",\
"You hear wires being cut.")
else
user.visible_message("<span class='notice'>\The [user] repairs some burn damage on their [S.display_name] with \the [src]</span>",\
"<span class='notice'>You repair some burn damage on your [S.display_name]</span>",\
"You hear wires being cut.")
return
if(istype(M,/mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.flags & IS_SYNTHETIC)
if(H.getFireLoss() > 0)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
user.visible_message("<span class='notice'>\The [user] repairs some burn damage on [M] with \the [src]</span>",\
"<span class='notice'>You repair some of \the [M]'s burn damage.</span>",\
"You hear wires being cut.")
H.heal_overall_damage(0,5)
if(M == user)
user << "\red You can't repair damage to your own body - it's against OH&S."
return
user << "Nothing to fix!"
if(S.burn_dam > 0 && use(1))
S.heal_damage(0,15,0,1)
user.visible_message("\red \The [user] repairs some burn damage on \the [M]'s [S.display_name] with \the [src].")
return
else
user << "Nothing to fix!"
else
return ..()