diff --git a/code/WorkInProgress/Chemistry-Reagents.dm b/code/WorkInProgress/Chemistry-Reagents.dm index 27e45610497..02850f849c2 100644 --- a/code/WorkInProgress/Chemistry-Reagents.dm +++ b/code/WorkInProgress/Chemistry-Reagents.dm @@ -1017,7 +1017,7 @@ datum id = "arithrazine" description = "Arithrazine is an unstable medication used for the most extreme cases of radiation poisoning." reagent_state = LIQUID - on_mob_life(var/mob/M) + on_mob_life(var/mob/living/M) if(!M) M = holder.my_atom M:radiation = 0 if(M:toxloss) M:toxloss-- diff --git a/code/datums/recipe.dm b/code/datums/recipe.dm index 46712f05995..a121092addb 100644 --- a/code/datums/recipe.dm +++ b/code/datums/recipe.dm @@ -114,7 +114,7 @@ var/N_i = (recipe.items)?(recipe.items.len):0 var/N_r = (recipe.reagents)?(recipe.reagents.len):0 if (N_i > i_count || (N_i== i_count && N_r > r_count )) - r_count = recipe.reagents.len - i_count = recipe.items.len + r_count = N_r + i_count = N_i . = recipe return . diff --git a/code/game/objects/items/weapons/guns_ammo.dm b/code/game/objects/items/weapons/guns_ammo.dm index ca60db75073..86e602f0af5 100644 --- a/code/game/objects/items/weapons/guns_ammo.dm +++ b/code/game/objects/items/weapons/guns_ammo.dm @@ -442,17 +442,26 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/li return /obj/item/weapon/gun/detectiverevolver/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob, flag) - - var/detective = ((istype(user:w_uniform, /obj/item/clothing/under/det) || !istype(user, /mob/living/carbon/human)) && istype(user:head, /obj/item/clothing/head/det_hat) && istype(user:wear_suit, /obj/item/clothing/suit/det_suit)) - if (flag) return - if ((istype(user, /mob/living/carbon/monkey)) && ticker.mode != "monkey") - usr << "\red You don't have the dexterity to do this!" - return + + var/detective = 0 + + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + detective = (istype(H.w_uniform, /obj/item/clothing/under/det) && \ + istype(H.head, /obj/item/clothing/head/det_hat) && \ + istype(H.wear_suit, /obj/item/clothing/suit/det_suit)) + else if (istype(user, /mob/living/carbon/monkey)) + if (ticker.mode != "monkey") + user << "\red You don't have the dexterity to do this!" + return + detective = 1 + if(!detective) usr << "\red You just don't feel cool enough to use this gun looking like that." return + src.add_fingerprint(user) if (src.bullets < 1) user.show_message("\red *click* *click*", 2) @@ -487,19 +496,23 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/li return /obj/item/weapon/gun/detectiverevolver/attack(mob/M as mob, mob/living/user as mob) - src.add_fingerprint(user) - var/mob/living/carbon/human/H = user - var/detective - if(!istype(H)) - detective = 0 - else - detective = (istype(H.w_uniform, /obj/item/clothing/under/det) && istype(H.head, /obj/item/clothing/head/det_hat) && istype(H.wear_suit, /obj/item/clothing/suit/det_suit)) - -// ******* Check - + var/detective = 0 + + if (istype(user, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + detective = (istype(H.w_uniform, /obj/item/clothing/under/det) && \ + istype(H.head, /obj/item/clothing/head/det_hat) && \ + istype(H.wear_suit, /obj/item/clothing/suit/det_suit)) + else if (istype(user, /mob/living/carbon/monkey)) + if (ticker.mode != "monkey") + user << "\red You don't have the dexterity to do this!" + return + detective = 1 + if(!detective) - usr << "\red You just don't feel cool enough to use this gun looking like that." + user << "\red You just don't feel cool enough to use this gun looking like that." return + src.add_fingerprint(user) ..() /* if ((istype(H, /mob/living/carbon/human) && istype(H, /obj/item/clothing/head) && H.flags & 8 && prob(80)))