Changes how clumsy checks are handled (#6299)

This pr adds the is_clumsy check, that checks if the mob has the mutation or if they are drunk enough. This fixes a bug where mobs would still have the clumsy mutation due to drinking.
This commit is contained in:
Alberyk
2019-04-14 19:45:45 +03:00
committed by Erki
parent 0cc7d1388e
commit aa70b6cffb
28 changed files with 57 additions and 33 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
var/last_used = 0 //last world.time it was used.
/obj/item/device/flash/proc/clown_check(var/mob/user)
if(user && (CLUMSY in user.mutations) && prob(50))
if(user && (user.is_clumsy()) && prob(50))
to_chat(user, "<span class='warning'>\The [src] slips out of your hand.</span>")
user.drop_from_inventory(src)
return 0
@@ -48,7 +48,7 @@
add_fingerprint(user)
if(on && user.zone_sel.selecting == "eyes")
if(((CLUMSY in user.mutations) || (DUMB in user.mutations)) && prob(50)) //too dumb to use flashlight properly
if(((user.is_clumsy()) || (DUMB in user.mutations)) && prob(50)) //too dumb to use flashlight properly
return ..() //just hit them in the head
var/mob/living/carbon/human/H = M //mob has protective eyewear
@@ -284,7 +284,7 @@
/obj/item/device/flashlight/glowstick/attack_self(var/mob/living/user)
if(((CLUMSY in user.mutations)) && prob(50))
if(((user.is_clumsy())) && prob(50))
to_chat(user, "<span class='notice'>You break \the [src] apart, spilling its contents everywhere!</span>")
fuel = 0
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
+2 -2
View File
@@ -33,7 +33,7 @@ BREATH ANALYZER
return
/proc/health_scan_mob(var/mob/living/M, var/mob/living/user, var/visible_msg, var/ignore_clumsiness, var/show_limb_damage = TRUE)
if ( ((CLUMSY in user.mutations) || (DUMB in user.mutations)) && prob(50))
if ( ((user.is_clumsy()) || (DUMB in user.mutations)) && prob(50))
to_chat(user, text("<span class='warning'>You try to analyze the floor's vitals!</span>"))
for(var/mob/O in viewers(M, null))
O.show_message("<span class='warning'>\The [user] has analyzed the floor's vitals!</span>", 1)
@@ -419,7 +419,7 @@ BREATH ANALYZER
to_chat(user,"<span class='warning'>You can't find a way to use \the [src] on [H]!</span>")
return
if ( ((CLUMSY in user.mutations) || (DUMB in user.mutations)) && prob(20))
if ( ((user.is_clumsy()) || (DUMB in user.mutations)) && prob(20))
to_chat(user,"<span class='danger'>Your hand slips from clumsiness!</span>")
eyestab(H,user)
to_chat(user,"<span class='danger'>Alert: No breathing detected.</span>")