mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
[MIRROR] some istype to macros (#9802)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
73486c399b
commit
ed79946ade
@@ -44,7 +44,7 @@
|
||||
var/can_rename_areas_in = AREA_STATION // Only station areas can be reanamed
|
||||
|
||||
/obj/item/blueprints/attack_self(mob/M as mob)
|
||||
if (!istype(M,/mob/living/carbon/human))
|
||||
if (!ishuman(M))
|
||||
to_chat(M, "This stack of blue paper means nothing to you.") //monkeys cannot into projecting
|
||||
return
|
||||
interact()
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
to_chat(ui.user, span_notice("[icon2html(src, ui.user.client)] Sent message to [istype(comm, /obj/item/communicator) ? comm.owner : comm.name], <b>\"[text]\"</b> (<a href='byond://?src=\ref[src];action=Reply;target=\ref[exonet.get_atom_from_address(comm.exonet.address)]'>Reply</a>)"))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
|
||||
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
|
||||
if(isnewplayer(M) || M.forbid_seeing_deadchat)
|
||||
continue
|
||||
if(exonet.get_atom_from_address(their_address) == M)
|
||||
continue
|
||||
|
||||
@@ -214,7 +214,7 @@ var/global/list/obj/item/communicator/all_communicators = list()
|
||||
// Description: Sets up the exonet datum, gives the device an address, and then gets a node reference. Afterwards, populates the device
|
||||
// list.
|
||||
/obj/item/communicator/proc/initialize_exonet(mob/user)
|
||||
if(!user || !istype(user, /mob/living))
|
||||
if(!user || !isliving(user))
|
||||
return
|
||||
if(!exonet)
|
||||
exonet = new(src)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
log_pda("(DCOMM: [src]) sent \"[text_message]\" to [chosen_communicator]", src)
|
||||
for(var/mob/M in player_list)
|
||||
if(M.stat == DEAD && M.client?.prefs?.read_preference(/datum/preference/toggle/ghost_ears))
|
||||
if(istype(M, /mob/new_player) || M.forbid_seeing_deadchat)
|
||||
if(isnewplayer(M) || M.forbid_seeing_deadchat)
|
||||
continue
|
||||
if(M == src)
|
||||
continue
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
. = ..()
|
||||
if(active)
|
||||
. += "It's a holographic warrant for '[active.fields["namewarrant"]]'."
|
||||
if(in_range(user, src) || istype(user, /mob/observer/dead))
|
||||
if(in_range(user, src) || isobserver(user))
|
||||
show_content(user) //Opens a browse window, not chatbox related
|
||||
else
|
||||
. += span_notice("You have to go closer if you want to read it.")
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
|
||||
/obj/item/personal_shield_generator/process()
|
||||
if(!bcell) //They removed the battery midway.
|
||||
if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
|
||||
if(ishuman(loc)) //We on someone? Tell them it turned off.
|
||||
var/mob/living/carbon/human/user = loc
|
||||
to_chat(user, span_warning("The shield deactivates! An error message pops up on screen: 'Cell missing. Cell replacement required.'"))
|
||||
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
|
||||
@@ -312,7 +312,7 @@
|
||||
|
||||
if(shield_active)
|
||||
if(bcell.rigged) //They turned it back on after it was rigged to go boom.
|
||||
if(istype(loc, /mob/living/carbon/human)) //Deactivate the shield, first. You're not getting reduced damage...
|
||||
if(ishuman(loc)) //Deactivate the shield, first. You're not getting reduced damage...
|
||||
var/mob/living/carbon/human/user = loc
|
||||
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell Reactor Critically damaged. Cell replacement required.'"))
|
||||
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
|
||||
@@ -333,7 +333,7 @@
|
||||
|
||||
if(bcell.charge < generator_hit_cost || bcell.charge < generator_active_cost) //Out of charge...
|
||||
shield_active = 0
|
||||
if(istype(loc, /mob/living/carbon/human)) //We on someone? Tell them it turned off.
|
||||
if(ishuman(loc)) //We on someone? Tell them it turned off.
|
||||
var/mob/living/carbon/human/user = loc
|
||||
to_chat(user, span_warning("The shield deactivates, an error message popping up on screen: 'Cell out of charge.'"))
|
||||
user.remove_modifiers_of_type(/datum/modifier/shield_projection)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
//..()
|
||||
if(usr.stat || usr.restrained())
|
||||
return
|
||||
if(((istype(usr, /mob/living/carbon/human) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
|
||||
if(((ishuman(usr) && ((!( ticker ) || (ticker && ticker.mode != "monkey")) && usr.contents.Find(src))) || (usr.contents.Find(master) || (in_range(src, usr) && istype(loc, /turf)))))
|
||||
usr.set_machine(src)
|
||||
if(href_list["freq"])
|
||||
var/new_frequency = sanitize_frequency(frequency + text2num(href_list["freq"]))
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
/obj/item/radio/electropack/attack_self(mob/user as mob, flag1)
|
||||
|
||||
if(!istype(user, /mob/living/carbon/human))
|
||||
if(!ishuman(user))
|
||||
return
|
||||
user.set_machine(src)
|
||||
var/dat = {"<TT>
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
/obj/item/radio/headset/mob_headset/afterattack(var/atom/movable/target, mob/living/user, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
if(istype(target,/mob/living/simple_mob))
|
||||
if(isanimal(target))
|
||||
var/mob/living/simple_mob/M = target
|
||||
if(!M.mob_radio)
|
||||
user.drop_item()
|
||||
|
||||
@@ -418,7 +418,7 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
jobname = JOB_CYBORG
|
||||
|
||||
// --- Personal AI (pAI) ---
|
||||
else if (istype(M, /mob/living/silicon/pai))
|
||||
else if (ispAI(M))
|
||||
jobname = "Personal AI"
|
||||
|
||||
// --- Unidentifiable mob ---
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
dat += span_boldnotice("Subject died [DisplayTimeText(tdelta)] ago - resuscitation may be possible!")
|
||||
dat += "<br>"
|
||||
//VOREStation edit/addition ends
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
if(ishuman(M) && mode == 1)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
dat += span_notice("Localized Damage, Brute/Burn:")
|
||||
|
||||
@@ -301,7 +301,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
if(!istype(target))
|
||||
return
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.resleeve_lock && stored_mind.loaded_from_ckey != H.resleeve_lock)
|
||||
to_chat(usr,span_warning("\The [H] is protected from impersonation!"))
|
||||
@@ -348,7 +348,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
|
||||
spark_system.set_up(5, 0, src.loc)
|
||||
spark_system.start()
|
||||
playsound(src, "sparks", 50, 1)
|
||||
if(istype(src.loc,/mob/living))
|
||||
if(isliving(src.loc))
|
||||
var/mob/living/L = src.loc
|
||||
L.unEquip(src)
|
||||
src.forceMove(get_turf(src))
|
||||
|
||||
@@ -255,7 +255,7 @@ This device records all warnings given and teleport events for admin review in c
|
||||
if(!teleport_checks(target,user))
|
||||
return //The checks proc can send them a message if it wants.
|
||||
|
||||
if(istype(target, /mob/living))
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(!L.stat)
|
||||
if(L != user)
|
||||
@@ -270,7 +270,7 @@ This device records all warnings given and teleport events for admin review in c
|
||||
power_source.use(charge_cost)
|
||||
|
||||
//Unbuckle taur riders
|
||||
if(istype(target, /mob/living))
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(LAZYLEN(L.buckled_mobs))
|
||||
var/datum/riding/R = L.riding_datum
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
qdel(src)
|
||||
|
||||
/atom/movable/proc/end_fall(var/crushing = FALSE)
|
||||
if(istype(src, /mob/living))
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.vore_selected && L.can_be_drop_pred && L.drop_vore)
|
||||
for(var/mob/living/P in loc)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if(do_after(user, pick_time * D.lock_difficulty))
|
||||
to_chat(user, span_notice("Success!"))
|
||||
D.locked = FALSE
|
||||
else if(istype(A,/mob/living/carbon/human)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
|
||||
else if(ishuman(A)) //you can pick your friends, and you can pick your nose, but you can't pick your friend's nose
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(user.zone_sel.selecting == BP_HEAD)
|
||||
if(H == user)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
balloon_alert(user, "Not enough [uses_charge ? "charge" : "items"] left to use that!") // CHOMPEdit - Balloon Alerts
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
@@ -395,7 +395,7 @@
|
||||
if(..())
|
||||
return 1
|
||||
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
if (ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
|
||||
var/limb = affecting.name
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
else
|
||||
balloon_alert(user, "All [R]'s systems are nominal.") // CHOMPEdit - Balloon Alerts
|
||||
|
||||
if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
|
||||
if (ishuman(M)) //Repairing robolimbs
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
if(!S)
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
user.visible_message(span_warning("[user] presses the big red button."), span_notice("You press the button, it plays a loud noise!"), span_notice("The button clicks loudly."))
|
||||
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
|
||||
for(var/mob/M in range(10, src)) // Checks range
|
||||
if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
|
||||
sleep(2) // Short delay to match up with the explosion sound
|
||||
shake_camera(M, 2, 1)
|
||||
else
|
||||
@@ -876,7 +876,7 @@
|
||||
icon_state = "tastybread"
|
||||
|
||||
/obj/item/toy/snake_popper/attack(mob/living/M as mob, mob/user as mob)
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
if(ishuman(M))
|
||||
if(!popped)
|
||||
to_chat(user, span_warning("A snake popped out of [src]!"))
|
||||
if(real == 0)
|
||||
@@ -1031,7 +1031,7 @@
|
||||
|
||||
/obj/item/toy/desk/MouseDrop(mob/user as mob) // Code from Paper bin, so you can still pick up the deck
|
||||
if((user == usr && (!( user.restrained() ) && (!( user.stat ) && (user.contents.Find(src) || in_range(src, user))))))
|
||||
if(!istype(user, /mob/living/simple_mob))
|
||||
if(!isanimal(user))
|
||||
if(!user.get_active_hand()) //if active hand is empty
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
|
||||
@@ -76,7 +76,7 @@ AI MODULES
|
||||
comp.current.show_laws()
|
||||
to_chat(user, "Upload complete. The robot's laws have been modified.")
|
||||
|
||||
else if(istype(AM, /mob/living/silicon/robot))
|
||||
else if(isrobot(AM))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
if(R.stat == DEAD)
|
||||
to_chat(user, span_warning("Law Upload Error: Unit is nonfunctional."))
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
set category = "Object"
|
||||
set src in view(usr, 1)
|
||||
set name = "Print Data"
|
||||
if(usr.stat || !(istype(usr,/mob/living/carbon/human)))
|
||||
if(usr.stat || !(ishuman(usr)))
|
||||
to_chat(usr, "No.")
|
||||
return
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
force = 3
|
||||
attack_verb = list("hit", "poked", "prodded")
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/bananapeel/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src.name]",4)
|
||||
/*
|
||||
@@ -28,7 +28,7 @@
|
||||
/obj/item/soap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
if(isliving(AM))
|
||||
var/mob/living/M = AM
|
||||
M.slip("the [src.name]",3)
|
||||
|
||||
@@ -83,5 +83,5 @@
|
||||
/obj/item/bikehorn/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(istype(AM, /mob/living))
|
||||
if(isliving(AM))
|
||||
playsound(src, honk_sound, 50, 1)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return buf.dna.SetUIValue(real_block,val)
|
||||
|
||||
/obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
||||
if(istype(M,/mob/living))
|
||||
if(isliving(M))
|
||||
var/mob/living/L = M
|
||||
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
|
||||
L.apply_damage(max(2,L.getCloneLoss()), CLONE)
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
if (istype(target, /turf/simulated/wall))
|
||||
var/turf/simulated/wall/W = target
|
||||
W.dismantle_wall(1,1,1)
|
||||
else if(istype(target, /mob/living))
|
||||
else if(isliving(target))
|
||||
target.ex_act(2) // c4 can't gib mobs anymore.
|
||||
else
|
||||
target.ex_act(1)
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
. += "There is about [src.amount] square units of paper left!"
|
||||
|
||||
/obj/item/wrapping_paper/attack(mob/target as mob, mob/user as mob)
|
||||
if (!istype(target, /mob/living/carbon/human)) return
|
||||
if (!ishuman(target)) return
|
||||
var/mob/living/carbon/human/H = target
|
||||
|
||||
if (istype(H.wear_suit, /obj/item/clothing/suit/straight_jacket) || H.stat)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
else if(H.ear_damage >= 5)
|
||||
to_chat(H, span_danger("Your ears start to ring!"))
|
||||
H.deaf_loop.start() // CHOMPStation Add: Ear Ringing/Deafness
|
||||
if(istype(L, /mob/living/silicon/robot))
|
||||
if(isrobot(L))
|
||||
var/mob/living/silicon/robot/R = L
|
||||
if(L.client)
|
||||
if(prob(50))
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/obj/item/handcuffs/proc/can_place(var/mob/target, var/mob/user)
|
||||
if(user == target)
|
||||
return 1
|
||||
if(istype(user, /mob/living/silicon/robot))
|
||||
if(isrobot(user))
|
||||
if(user.Adjacent(target))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -441,7 +441,7 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
/obj/item/implant/loyalty/handle_implant(mob/M, target_zone = BP_TORSO)
|
||||
. = ..(M, target_zone)
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
if(!ishuman(M))
|
||||
. = FALSE
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/antagonist/antag_data = get_antag_data(H.mind.special_role)
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
if (malfunction)
|
||||
return
|
||||
|
||||
if(istype(imp_in, /mob/living))
|
||||
if(isliving(imp_in))
|
||||
var/mob/living/H = imp_in
|
||||
if(findtext(msg,"implant-toggle"))
|
||||
active = !active
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
|
||||
/obj/item/implant/sizecontrol/emp_act(severity)
|
||||
if(istype(imp_in, /mob/living))
|
||||
if(isliving(imp_in))
|
||||
var/newsize = pick(RESIZE_HUGE,RESIZE_BIG,RESIZE_NORMAL,RESIZE_SMALL,RESIZE_TINY,RESIZE_A_HUGEBIG,RESIZE_A_BIGNORMAL,RESIZE_A_NORMALSMALL,RESIZE_A_SMALLTINY)
|
||||
var/mob/living/H = imp_in
|
||||
H.resize(newsize)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
|
||||
/obj/machinery/implantchair/Topic(href, href_list)
|
||||
if((get_dist(src, usr) <= 1) || istype(usr, /mob/living/silicon/ai))
|
||||
if((get_dist(src, usr) <= 1) || isAI(usr))
|
||||
if(href_list["implant"])
|
||||
if(src.occupant)
|
||||
injecting = 1
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
to_chat(user, span_warning("You can't store \the [A.name] in this!"))
|
||||
c.scanned = null
|
||||
return
|
||||
if(istype(A.loc,/mob/living/carbon/human))
|
||||
if(ishuman(A.loc))
|
||||
var/mob/living/carbon/human/H = A.loc
|
||||
H.remove_from_mob(A)
|
||||
else if(istype(A.loc,/obj/item/storage))
|
||||
|
||||
@@ -92,7 +92,7 @@ Protectiveness | Armor %
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(span_danger("\The [src] [material.destruction_desc]!"))
|
||||
if(istype(loc, /mob/living))
|
||||
if(isliving(loc))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
if(material.shard_type == SHARD_SHARD) // Wearing glass armor is a bad idea.
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
/obj/item/material/proc/shatter(var/consumed)
|
||||
var/turf/T = get_turf(src)
|
||||
T.visible_message(span_danger("\The [src] [material.destruction_desc]!"))
|
||||
if(istype(loc, /mob/living))
|
||||
if(isliving(loc))
|
||||
var/mob/living/M = loc
|
||||
M.drop_from_inventory(src)
|
||||
playsound(src, "shatter", 70, 1)
|
||||
|
||||
@@ -155,11 +155,11 @@
|
||||
if(user.a_intent)
|
||||
switch(user.a_intent)
|
||||
if(I_HURT)
|
||||
if(prob(10) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
if(prob(10) && ishuman(target) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
to_chat(target, span_warning("\The [src] rips at your hands!"))
|
||||
ranged_disarm(target)
|
||||
if(I_DISARM)
|
||||
if(prob(min(90, force * 3)) && istype(target, /mob/living/carbon/human) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
if(prob(min(90, force * 3)) && ishuman(target) && (user.zone_sel in list(BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND)))
|
||||
ranged_disarm(target)
|
||||
else
|
||||
target.visible_message(span_danger("\The [src] sends \the [target] stumbling away."))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/obj/item/material/star/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(material.radioactivity>0 && istype(hit_atom,/mob/living))
|
||||
if(material.radioactivity>0 && isliving(hit_atom))
|
||||
var/mob/living/M = hit_atom
|
||||
M.adjustToxLoss(rand(20,40))
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
else
|
||||
activate(user)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
@@ -170,7 +170,7 @@
|
||||
cut_overlays() //So that it doesn't keep stacking overlays non-stop on top of each other
|
||||
if(active)
|
||||
add_overlay(blade_overlay)
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
@@ -459,7 +459,7 @@
|
||||
/obj/item/melee/energy/blade/process()
|
||||
if(!creator || loc != creator || !creator.item_is_in_hands(src))
|
||||
// Tidy up a bit.
|
||||
if(istype(loc,/mob/living))
|
||||
if(isliving(loc))
|
||||
var/mob/living/carbon/human/host = loc
|
||||
if(istype(host))
|
||||
for(var/obj/item/organ/external/organ in host.organs)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
defend_chance = 0
|
||||
|
||||
/obj/item/melee/hammer/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone, var/attack_modifier)
|
||||
if(istype(target,/mob/living/carbon/human))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(prob(50))
|
||||
var/obj/item/organ/external/affecting = H.get_organ(hit_zone)
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
/obj/item/mop_deploy/process()
|
||||
if(!creator || loc != creator || !creator.item_is_in_hands(src))
|
||||
// Tidy up a bit.
|
||||
if(istype(loc,/mob/living))
|
||||
if(isliving(loc))
|
||||
var/mob/living/carbon/human/host = loc
|
||||
if(istype(host))
|
||||
for(var/obj/item/organ/external/organ in host.organs)
|
||||
|
||||
@@ -323,7 +323,7 @@ var/list/tape_roll_applications = list()
|
||||
add_fingerprint(M)
|
||||
if(!allowed(M)) //only select few learn art of not crumpling the tape
|
||||
to_chat(M, span_warning("You are not supposed to go past \the [src]..."))
|
||||
if(M.a_intent == I_HELP && !(istype(M, /mob/living/simple_mob)))
|
||||
if(M.a_intent == I_HELP && !(isanimal(M)))
|
||||
return FALSE
|
||||
crumple()
|
||||
return ..()
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if (usr.stat || usr.restrained() || src.loc != usr)
|
||||
return
|
||||
var/mob/living/carbon/human/H = usr
|
||||
if (!( istype(H, /mob/living/carbon/human)))
|
||||
if (!ishuman(H))
|
||||
return 1
|
||||
if ((usr == src.loc || (in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
playsound(src, 'sound/weapons/saberoff.ogg', 50, 1)
|
||||
to_chat(user, span_notice("\The [src] can now be concealed."))
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
@@ -197,7 +197,7 @@
|
||||
set_light(0)
|
||||
item_state = "[icon_state]"
|
||||
|
||||
if(istype(usr,/mob/living/carbon/human))
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
@@ -257,7 +257,7 @@
|
||||
slot_flags = null
|
||||
to_chat(user, span_notice("[src] can now be concealed."))
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
to_chat(user, "You [on ? "enable" : "disable"] the shield light.")
|
||||
update_flashlight(user)
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
@@ -512,7 +512,7 @@
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(!istype(src.loc, /mob/living))
|
||||
if(!isliving(src.loc))
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/H = usr
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
if(!Adjacent(user)) //Can only check the contents of ore bags if you can physically reach them.
|
||||
return .
|
||||
|
||||
if(istype(user, /mob/living))
|
||||
if(isliving(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
. += span_notice("It holds:")
|
||||
|
||||
@@ -708,7 +708,7 @@
|
||||
max_storage_space = max(total_storage_space,max_storage_space) //Prevents spawned containers from being too small for their contents.
|
||||
|
||||
/obj/item/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
if(!isliving(src.loc))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
force = 3//not so robust now
|
||||
attack_verb = list("hit", "punched")
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
@@ -296,7 +296,7 @@ var/list/global/tank_gauge_cache = list()
|
||||
var/can_open_valve
|
||||
if(location.wear_mask && (location.wear_mask.item_flags & AIRTIGHT))
|
||||
can_open_valve = 1
|
||||
else if(istype(location,/mob/living/carbon/human))
|
||||
else if(ishuman(location))
|
||||
var/mob/living/carbon/human/H = location
|
||||
if(H.head && (H.head.item_flags & AIRTIGHT))
|
||||
can_open_valve = 1
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
toolspeed = 2 //It is now used in surgery as a not awful, but probably dangerous option, due to speed.
|
||||
|
||||
/obj/item/tape_roll/proc/can_place(var/mob/living/carbon/human/H, var/mob/user)
|
||||
if(istype(user, /mob/living/silicon/robot) || user == H)
|
||||
if(isrobot(user) || user == H)
|
||||
return TRUE
|
||||
|
||||
for (var/obj/item/grab/G in H.grabbed_by)
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
setWelding(0)
|
||||
else //Only start fires when its on and has enough fuel to actually keep working
|
||||
var/turf/location = src.loc
|
||||
if(istype(location, /mob/living))
|
||||
if(isliving(location))
|
||||
var/mob/living/M = location
|
||||
if(M.item_is_in_hands(src))
|
||||
location = get_turf(M)
|
||||
@@ -322,7 +322,7 @@
|
||||
return 1
|
||||
var/safety = user.eyecheck()
|
||||
safety = between(-1, safety + eye_safety_modifier, 2)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/internal/eyes/E = H.internal_organs_by_name[O_EYES]
|
||||
if(!E)
|
||||
@@ -508,7 +508,7 @@
|
||||
|
||||
/obj/item/weldingtool/tubefed/process()
|
||||
if(mounted_pack)
|
||||
if(!istype(mounted_pack.loc,/mob/living/carbon/human))
|
||||
if(!ishuman(mounted_pack.loc))
|
||||
mounted_pack.return_nozzle()
|
||||
else
|
||||
var/mob/living/carbon/human/H = mounted_pack.loc
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
return
|
||||
|
||||
/obj/item/weldpack/attack_hand(mob/user as mob)
|
||||
if(istype(user, /mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/wearer = user
|
||||
if(wearer.back == src)
|
||||
if(nozzle && nozzle_attached)
|
||||
|
||||
Reference in New Issue
Block a user