Fixes #970, fixes #953 (#978)

This commit is contained in:
NanakoAC
2016-09-21 05:04:23 +01:00
committed by skull132
parent a28ffd844d
commit 4c0ce0acc3
5 changed files with 36 additions and 31 deletions

View File

@@ -280,20 +280,6 @@
return
..()
/mob/living/silicon/robot/drone/Bump(var/atom/movable/AM, yes)
if(istype(AM,/obj/machinery/door)) // check for doors first as that will be most common
return ..(AM,yes)
if(!(istype(AM,/obj/item/pipe) || istype(AM,/obj/structure/disposalconstruct)))
if(istype(AM,/obj/item)) //Would this even be possible? Someone try to activate that message
var/obj/item/O = AM
if(O.w_class > can_pull_size)
src << "<span class='warning'>You are too small to push that.</span>"
return 0
else if(istype(AM,/obj))
return 0
..(AM,yes)
/mob/living/silicon/robot/drone/add_robot_verbs()
src.verbs |= silicon_subsystems

View File

@@ -678,7 +678,7 @@
else
if( !(istype(W, /obj/item/device/robotanalyzer) || istype(W, /obj/item/device/healthanalyzer)) )
if(W.force && !(istype(W, /obj/item/device/robotanalyzer) || istype(W, /obj/item/device/healthanalyzer)) )
spark_system.start()
return ..()

View File

@@ -1072,7 +1072,13 @@ var/list/wierd_mobs_inclusive = list( /mob/living/simple_animal/construct,
)
/mob/living/proc/find_type()
/mob/proc/find_type()
if (istype(src, /mob/living))
var/mob/living/L = src
return L.find_type()
return 0
/mob/living/find_type()
//This function returns a bitfield indicating what type(s) the passed mob is.
//Synthetic and wierd are exclusive from organic. We assume it's organic if it's not either of those
//var/mob/living/test = src

View File

@@ -25,9 +25,9 @@
/obj/item/weapon/reagent_containers/attack_self(mob/user as mob)
return
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
/obj/item/weapon/reagent_containers/attack(mob/M as mob, mob/user as mob, def_zone)
if(can_operate(M))//Checks if mob is lying down on table for surgery
if(do_surgery(M, user, src))
if(do_surgery(M, user, src))
return
/obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user, flag)
@@ -66,6 +66,8 @@
user << "<span class='notice'>[target] is full.</span>"
return 1
var/contained = reagentlist()
target.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been splashed with [name] by [user.name] ([user.ckey]). Reagents: [contained]</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used the [name] to splash [target.name] ([target.key]). Reagents: [contained]</font>")
@@ -73,6 +75,11 @@
user.visible_message("<span class='danger'>[target] has been splashed with something by [user]!", "<span class = 'notice'>You splash the solution onto [target].</span>")
reagents.splash(target, reagents.total_volume)
if (istype(target, /mob/living/silicon/robot))
var/mob/living/silicon/robot/R = target
R.spark_system.start()
return 1
/obj/item/weapon/reagent_containers/proc/self_feed_message(var/mob/user)
@@ -95,9 +102,13 @@
user << "<span class='notice'>\The [src] is empty.</span>"
return 1
var/types = target.find_type()
var/mob/living/carbon/human/H
if(istype(target, /mob/living/carbon/human))
H = target
if(target == user)
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if (H)
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>You have a monitor for a head, where do you think you're going to put that?</span>"
return 1
@@ -111,13 +122,15 @@
reagents.trans_to_mob(user, amount_per_transfer_from_this, CHEM_INGEST)
feed_sound(user)
return 1
else
if(istype(target, /mob/living/carbon/human))
var/mob/living/carbon/human/H = target
if(H.species.flags & IS_SYNTHETIC)
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
return
else if (types & TYPE_SYNTHETIC)
if(H && (H.species.flags & IS_SYNTHETIC))
H << "<span class='notice'>They have a monitor for a head, where do you think you're going to put that?</span>"
return 1
standard_splash_mob(user, target)
return 0
else
if (H)
var/obj/item/blocked = H.check_mouth_coverage()
if(blocked)
user << "<span class='warning'>\The [blocked] is in the way!</span>"
@@ -153,4 +166,4 @@
var/trans = reagents.trans_to(target, amount_per_transfer_from_this)
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
return 1
return 1

View File

@@ -16,11 +16,11 @@
attack_self(mob/user as mob)
return
attack(mob/M as mob, mob/user as mob, def_zone)
if(standard_feed_mob(user, M))
return
attack(mob/M as mob, mob/user as mob, def_zone)
if (user.a_intent == I_HURT)
return standard_splash_mob(user, M)
return standard_feed_mob(user, M)
return 0
afterattack(obj/target, mob/user, proximity)
if(!proximity) return