Merge pull request #10242 from Ghommie/Ghommie-cit483
Ports "Refactors can_see_reagents"
This commit is contained in:
@@ -977,3 +977,14 @@
|
||||
if(combatmode)
|
||||
toggle_combat_mode(TRUE, TRUE)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/can_see_reagents()
|
||||
. = ..()
|
||||
if(.) //No need to run through all of this if it's already true.
|
||||
return
|
||||
if(isclothing(head))
|
||||
var/obj/item/clothing/H = head
|
||||
if(H.clothing_flags & SCAN_REAGENTS)
|
||||
return TRUE
|
||||
if(isclothing(wear_mask) && (wear_mask.clothing_flags & SCAN_REAGENTS))
|
||||
return TRUE
|
||||
|
||||
@@ -117,7 +117,8 @@
|
||||
|
||||
/mob/living/carbon/human/can_use_guns(obj/item/G)
|
||||
. = ..()
|
||||
|
||||
if(!.)
|
||||
return
|
||||
if(G.trigger_guard == TRIGGER_GUARD_NORMAL)
|
||||
if(HAS_TRAIT(src, TRAIT_CHUNKYFINGERS))
|
||||
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
|
||||
@@ -126,7 +127,13 @@
|
||||
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
|
||||
return FALSE
|
||||
|
||||
return .
|
||||
/mob/living/carbon/human/can_see_reagents()
|
||||
. = ..()
|
||||
if(.) //No need to run through all of this if it's already true.
|
||||
return
|
||||
if(isclothing(glasses) && (glasses.clothing_flags & SCAN_REAGENTS))
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
/mob/living/carbon/human/transfer_blood_dna(list/blood_dna)
|
||||
..()
|
||||
|
||||
@@ -275,6 +275,15 @@
|
||||
/mob/living/simple_animal/drone/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
|
||||
return 0 //So they don't die trying to fix wiring
|
||||
|
||||
/mob/living/simple_animal/drone/can_see_reagents()
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(isclothing(head))
|
||||
var/obj/item/clothing/H = head
|
||||
if(H.clothing_flags & SCAN_REAGENTS)
|
||||
return TRUE
|
||||
|
||||
/mob/living/simple_animal/drone/generate_mob_holder()
|
||||
var/obj/item/clothing/head/mob_holder/holder = new(get_turf(src), src, "[visualAppearence]_hat", null, null, null, TRUE)
|
||||
return holder
|
||||
|
||||
@@ -811,26 +811,6 @@ GLOBAL_VAR_INIT(exploit_warn_spam_prevention, 0)
|
||||
/mob/proc/can_interact_with(atom/A)
|
||||
return IsAdminGhost(src) || Adjacent(A)
|
||||
|
||||
//Can the mob see reagents inside of containers?
|
||||
/mob/proc/can_see_reagents()
|
||||
if(stat == DEAD) //Ghosts and such can always see reagents
|
||||
return 1
|
||||
if(has_unlimited_silicon_privilege) //Silicons can automatically view reagents
|
||||
return 1
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.head && istype(H.head, /obj/item/clothing))
|
||||
var/obj/item/clothing/CL = H.head
|
||||
if(CL.scan_reagents)
|
||||
return 1
|
||||
if(H.wear_mask && H.wear_mask.scan_reagents)
|
||||
return 1
|
||||
if(H.glasses && istype(H.glasses, /obj/item/clothing))
|
||||
var/obj/item/clothing/CL = H.glasses
|
||||
if(CL.scan_reagents)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//Can the mob use Topic to interact with machines
|
||||
/mob/proc/canUseTopic(atom/movable/M, be_close=FALSE, no_dextery=FALSE, no_tk=FALSE)
|
||||
return
|
||||
|
||||
@@ -532,3 +532,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(!held_item)
|
||||
return
|
||||
return held_item.GetID()
|
||||
|
||||
//Can the mob see reagents inside of containers?
|
||||
/mob/proc/can_see_reagents()
|
||||
return stat == DEAD || has_unlimited_silicon_privilege //Dead guys and silicons can always see reagents
|
||||
|
||||
Reference in New Issue
Block a user