mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +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
@@ -40,7 +40,7 @@
|
||||
T = safepick(oview(1,src))
|
||||
if(!melee_can_hit)
|
||||
return
|
||||
if(istype(T, /mob/living))
|
||||
if(isliving(T))
|
||||
var/mob/living/M = T
|
||||
if(src.occupant.a_intent == I_HURT || istype(src.occupant, /mob/living/carbon/brain)) //Brains cannot change intents; Exo-piloting brains lack any form of physical feedback for control, limiting the ability to 'play nice'.
|
||||
playsound(src, 'sound/weapons/heavysmash.ogg', 50, 1)
|
||||
|
||||
@@ -91,11 +91,11 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/dynhitby(atom/movable/A)
|
||||
if(!action_checks(A))
|
||||
return chassis.dynhitby(A)
|
||||
if(prob(chassis.deflect_chance*deflect_coeff) || istype(A, /mob/living) || istype(A, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(prob(chassis.deflect_chance*deflect_coeff) || isliving(A) || istype(A, /obj/item/mecha_parts/mecha_tracking))
|
||||
chassis.occupant_message(span_notice("The [A] bounces off the armor."))
|
||||
chassis.visible_message("The [A] bounces off the [chassis] armor")
|
||||
chassis.log_append_to_last("Armor saved.")
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.take_organ_damage(10)
|
||||
else if(istype(A, /obj))
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
O.anchored = initial(O.anchored)
|
||||
|
||||
//attacking
|
||||
else if(istype(target,/mob/living))
|
||||
else if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
if(M.stat>1) return
|
||||
if(chassis.occupant.a_intent == I_HURT || istype(chassis.occupant,/mob/living/carbon/brain)) //No tactile feedback for brains
|
||||
@@ -156,7 +156,7 @@
|
||||
else
|
||||
chassis.occupant_message(span_warning("[target] is firmly secured."))
|
||||
|
||||
else if(istype(target,/mob/living))
|
||||
else if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
if(M.stat>1) return
|
||||
if(chassis.occupant.a_intent == I_HURT)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
target.apply_damage(drill_force, BRUTE)
|
||||
return
|
||||
|
||||
else if(istype(target, /mob/living/simple_mob))
|
||||
else if(isanimal(target))
|
||||
var/mob/living/simple_mob/S = target
|
||||
if(target.stat == DEAD)
|
||||
if(S.meat_amount > 0)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
playsound(src, 'sound/effects/bang.ogg', 30, 1, 30)
|
||||
chassis.occupant_message(span_warning("You emit a high-pitched noise from the mech."))
|
||||
for(var/mob/living/carbon/M in ohearers(6, chassis))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
if(ishuman(M))
|
||||
var/ear_safety = 0
|
||||
ear_safety = M.get_ear_protection()
|
||||
if(ear_safety > 0)
|
||||
|
||||
@@ -1060,7 +1060,7 @@
|
||||
else
|
||||
temp_deflect_chance = round(ArmC.get_efficiency() * ArmC.deflect_chance + (defence_mode ? 25 : 0))
|
||||
|
||||
if(istype(user,/mob/living/carbon/human))
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.species.can_shred(user))
|
||||
if(!prob(temp_deflect_chance))
|
||||
@@ -1125,7 +1125,7 @@
|
||||
src.occupant_message(span_notice("\The [A] bounces off the armor."))
|
||||
src.visible_message("\The [A] bounces off \the [src] armor")
|
||||
src.log_append_to_last("Armor saved.")
|
||||
if(istype(A, /mob/living))
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.take_organ_damage(10)
|
||||
else if(istype(A, /obj))
|
||||
@@ -1607,7 +1607,7 @@
|
||||
|
||||
/*
|
||||
/obj/mecha/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
if(!istype(user, /mob/living/silicon/ai))
|
||||
if(!isAI(user))
|
||||
return
|
||||
var/output = {"<b>Assume direct control over [src]?</b>
|
||||
<a href='byond://?src=\ref[src];ai_take_control=\ref[user];duration=3000'>Yes</a><br>
|
||||
@@ -2128,7 +2128,7 @@
|
||||
for(var/atom/ID in list(H.get_active_hand(), H.wear_id, H.belt))
|
||||
if(src.check_access(ID,src.internals_req_access))
|
||||
return 1
|
||||
else if(istype(H, /mob/living/silicon/robot))
|
||||
else if(isrobot(H))
|
||||
var/mob/living/silicon/robot/R = H
|
||||
if(src.check_access(R.idcard,src.internals_req_access))
|
||||
return 1
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
if(internal_damage&MECHA_INT_CONTROL_LOST)
|
||||
target = safepick(oview(1,src))
|
||||
if(!melee_can_hit || !istype(target, /atom)) return
|
||||
if(istype(target, /mob/living))
|
||||
if(isliving(target))
|
||||
var/mob/living/M = target
|
||||
if(src.occupant.a_intent == I_HURT)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
if(damtype == "brute")
|
||||
step_away(M,src,15)
|
||||
|
||||
if(istype(target, /mob/living/carbon/human))
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
// if (M.health <= 0) return
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
|
||||
if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes.
|
||||
to_chat(usr, span_warning("You are physically incapable of emptying the ore box."))
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user