Everything else through the door (#19358)

This commit is contained in:
Vi3trice
2022-10-13 21:56:58 +02:00
committed by GitHub
parent 2410930b2b
commit 59dfdba201
134 changed files with 200 additions and 200 deletions
+1 -1
View File
@@ -52,7 +52,7 @@
M.unEquip(src)
to_chat(M, "[src] wriggles out of your grip!")
to_chat(L, "You wriggle out of [M]'s grip!")
else if(istype(loc,/obj/item))
else if(isitem(loc))
to_chat(L, "You struggle free of [loc].")
forceMove(get_turf(src))
@@ -38,9 +38,9 @@
return 0
else
return 1
if(istype(other, /mob/living/carbon/human))
if(ishuman(other))
return 1
if(istype(other, /mob/living/simple_animal/slime))
if(isslime(other))
return 1
return ..()
@@ -64,7 +64,7 @@
if(owner.mind && !non_primary)//don't transfer if the owner does not have a mind.
B.transfer_identity(user)
if(istype(owner,/mob/living/carbon/human))
if(ishuman(owner))
var/mob/living/carbon/human/H = owner
H.update_hair()
@@ -75,7 +75,7 @@
name = "[initial(name)]"
var/brain_already_exists = 0
if(istype(target,/mob/living/carbon/human)) // No more IPC multibrain shenanigans
if(ishuman(target)) // No more IPC multibrain shenanigans
if(target.get_int_organ(/obj/item/organ/internal/brain))
brain_already_exists = 1
+3 -3
View File
@@ -61,7 +61,7 @@
if(I && I.force)
var/d = rand(round(I.force / 4), I.force)
if(istype(src, /mob/living/carbon/human))
if(ishuman(src))
var/mob/living/carbon/human/H = src
var/obj/item/organ/external/organ = H.get_organ("chest")
if(istype(organ))
@@ -708,7 +708,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
back = null
update_inv_back()
else if(I == wear_mask)
if(istype(src, /mob/living/carbon/human)) //If we don't do this hair won't be properly rebuilt.
if(ishuman(src)) //If we don't do this hair won't be properly rebuilt.
return
wear_mask = null
update_inv_wear_mask()
@@ -1067,7 +1067,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven
return FALSE
if(!(slipAny))
if(istype(src, /mob/living/carbon/human))
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(isobj(H.shoes) && H.shoes.flags & NOSLIP)
return FALSE
@@ -1,7 +1,7 @@
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(!skipcatch)
if(in_throw_mode && !HAS_TRAIT(src, TRAIT_HANDS_BLOCKED) && !restrained()) //Makes sure player is in throw mode
if(!istype(AM,/obj/item) || !isturf(AM.loc))
if(!isitem(AM) || !isturf(AM.loc))
return FALSE
if(get_active_hand())
return FALSE
@@ -379,7 +379,7 @@
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M, hudtype)
if(istype(M, /mob/living/carbon/human))
if(ishuman(M))
var/have_hudtypes = list()
var/mob/living/carbon/human/H = M
@@ -161,7 +161,7 @@ emp_act
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor)
for(var/bp in body_parts)
if(!bp) continue
if(bp && istype(bp ,/obj/item/clothing))
if(bp && isclothing(bp))
var/obj/item/clothing/C = bp
if(C.body_parts_covered & def_zone.body_part)
protection += C.armor.getRating(type)
@@ -187,24 +187,24 @@ emp_act
var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform)
for(var/bp in body_parts)
if(!bp) continue
if(bp && istype(bp ,/obj/item/clothing))
if(bp && isclothing(bp))
var/obj/item/clothing/C = bp
if(C.body_parts_covered & HEAD)
return 1
return 0
/mob/living/carbon/human/proc/check_reflect(def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance var of the object
if(wear_suit && istype(wear_suit, /obj/item/))
if(wear_suit && isitem(wear_suit))
var/obj/item/I = wear_suit
if(I.IsReflect(def_zone) == 1)
return 1
if(l_hand && istype(l_hand, /obj/item/))
if(l_hand && isitem(l_hand))
var/obj/item/I = l_hand
if(I.IsReflect(def_zone) == 1)
return 1
if(I.IsReflect(def_zone) == 2) //Toy swords
return 2
if(r_hand && istype(r_hand, /obj/item/))
if(r_hand && isitem(r_hand))
var/obj/item/I = r_hand
if(I.IsReflect(def_zone) == 1)
return 1
+3 -3
View File
@@ -44,7 +44,7 @@
if(times_fired % 2 == 1)
breathe() //Breathe every other tick, unless suffocating
else
if(istype(loc, /obj/))
if(isobj(loc))
var/obj/location_as_object = loc
location_as_object.handle_internal_lifeform(src, 0)
@@ -68,7 +68,7 @@
if(AmountLoseBreath())
if(prob(75))
emote("gasp")
if(istype(loc, /obj/))
if(isobj(loc))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
else
@@ -88,7 +88,7 @@
breath = loc.remove_air(breath_moles)
else //Breathe from loc as obj again
if(istype(loc, /obj/))
if(isobj(loc))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
@@ -274,7 +274,7 @@
var/scan_type
if(istype(M, /mob/living/silicon/robot))
scan_type = "robot"
else if(istype(M, /mob/living/carbon/human))
else if(ishuman(M))
scan_type = "prosthetics"
else
to_chat(user, "<span class='warning'>You can't analyze non-robotic things!</span>")
@@ -340,7 +340,7 @@
if(is_type_in_list(AM, pullable_drone_items))
..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such
else if(istype(AM,/obj/item))
else if(isitem(AM))
var/obj/item/O = AM
if(O.w_class > WEIGHT_CLASS_SMALL)
if(show_message)
@@ -93,7 +93,7 @@
return
if(emagged == 2) //Emag functions
if(istype(loc,/turf/simulated))
if(issimulatedturf(loc))
if(prob(10)) //Wets floors randomly
var/turf/simulated/T = loc
T.MakeSlippery()
@@ -238,7 +238,7 @@
start_maketile(target)
else if(istype(target, /turf/) && emagged < 2)
repair(target)
else if(emagged == 2 && istype(target,/turf/simulated/floor))
else if(emagged == 2 && isfloorturf(target))
var/turf/simulated/floor/F = target
anchored = TRUE
mode = BOT_REPAIRING
@@ -302,7 +302,7 @@
return result
/mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf)
if(istype(target_turf, /turf/space/))
if(isspaceturf(target_turf))
//Must be a hull breach or in bridge mode to continue.
if(!is_hull_breach(target_turf) && !targetdirection)
target = null
@@ -318,7 +318,7 @@
anchored = TRUE
if(istype(target_turf, /turf/space/)) //If we are fixing an area not part of pure space, it is
if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
mode = BOT_REPAIRING
update_icon(UPDATE_ICON_STATE)
@@ -370,7 +370,7 @@
//I'm sure someone will come along and ask why this is here... well people were dragging screen items onto the mule, and that was not cool.
//So this is a simple fix that only allows a selection of item types to be considered. Further narrowing-down is below.
if(!isitem(AM) && !ismachinery(AM) && !istype(AM, /obj/structure) && !ismob(AM))
if(!isitem(AM) && !ismachinery(AM) && !isstructure(AM) && !ismob(AM))
return
if(!isturf(AM.loc)) //To prevent the loading from stuff from someone's inventory or screen icons.
return
@@ -34,7 +34,7 @@
death()
else
visible_message("<span class='notice'>\The [name] avoids getting crushed.</span>")
else if(istype(AM, /obj/structure))
else if(isstructure(AM))
visible_message("<span class='notice'>As \the [AM] moved over \the [name], it was crushed.</span>")
death()
@@ -49,7 +49,7 @@
/mob/living/simple_animal/hostile/bear/Move()
..()
if(stat != DEAD)
if(loc && istype(loc,/turf/space))
if(loc && isspaceturf(loc))
icon_state = "bear"
else
icon_state = "bearfloor"
@@ -147,7 +147,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
faction |= "\ref[owner]"
/mob/living/simple_animal/hostile/mimic/copy/proc/CheckObject(obj/O)
if((isitem(O) || istype(O, /obj/structure)) && !is_type_in_list(O, GLOB.protected_objects))
if((isitem(O) || isstructure(O)) && !is_type_in_list(O, GLOB.protected_objects))
return 1
return 0
@@ -162,7 +162,7 @@ GLOBAL_LIST_INIT(protected_objects, list(/obj/structure/table, /obj/structure/ca
overlays = O.overlays
googly_eyes = image('icons/mob/mob.dmi',"googly_eyes")
overlays += googly_eyes
if(istype(O, /obj/structure) || ismachinery(O))
if(isstructure(O) || ismachinery(O))
health = (anchored * 50) + 50
destroy_objects = 1
if(O.density && O.anchored)
@@ -269,7 +269,7 @@
else if(ismachinery(O))
O.loc = C
large_cocoon = 1
else if(istype(O, /obj/structure) && !istype(O, /obj/structure/spider)) // can't wrap spiderlings/etc
else if(isstructure(O) && !istype(O, /obj/structure/spider)) // can't wrap spiderlings/etc
O.loc = C
large_cocoon = 1
for(var/mob/living/L in C.loc)
@@ -225,7 +225,7 @@
for(var/obj/O in can_see)
if(O.anchored)
continue
if(isitem(O) || istype(O, /obj/structure) || ismachinery(O))
if(isitem(O) || isstructure(O) || ismachinery(O))
if(!istype(O, /obj/item/paper))
cocoon_target = O
stop_automated_movement = TRUE
+3 -3
View File
@@ -161,7 +161,7 @@
var/mob/M = A
for(var/obj/O in M.contents)
listening_obj |= O
else if(istype(A, /obj))
else if(isobj(A))
var/obj/O = A
listening_obj |= O
for(var/obj/O in listening_obj)
@@ -286,7 +286,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
if(!istype(W)) return 0
for(var/slot in GLOB.slot_equipment_priority)
if(istype(W,/obj/item/storage/) && slot == slot_head) // Storage items should be put on the belt before the head
if(isstorage(W) && slot == slot_head) // Storage items should be put on the belt before the head
continue
if(equip_to_slot_if_possible(W, slot, FALSE, TRUE)) //del_on_fail = 0; disable_warning = 0
return 1
@@ -649,7 +649,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
set category = null
set src = usr
if(istype(loc,/obj/mecha)) return
if(ismecha(loc)) return
if(hand)
var/obj/item/W = l_hand
+1 -1
View File
@@ -1,5 +1,5 @@
/proc/issmall(A)
if(A && istype(A, /mob/living/carbon/human))
if(A && ishuman(A))
var/mob/living/carbon/human/H = A
if(H.dna.species && H.dna.species.is_small)
return 1