Allowed grenades to be stuffed into mouths and primed.

This commit is contained in:
Zuhayr
2015-12-22 13:19:50 +10:30
parent 35e2468c54
commit 8602f07d31
20 changed files with 62 additions and 35 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
usr << "You are unable to emote."
return
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
if(m_type == 2 && muzzled) return
var/input
@@ -8,7 +8,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
switch(act)
if ("me")
@@ -9,7 +9,7 @@
if(findtext(act,"s",-1) && !findtext(act,"_",-2))//Removes ending s's unless they are prefixed with a '_'
act = copytext(act,1,length(act))
var/muzzled = istype(src.wear_mask, /obj/item/clothing/mask/muzzle)
var/muzzled = is_muzzled()
//var/m_type = 1
for (var/obj/item/weapon/implant/I in src)
@@ -150,10 +150,14 @@
//mask
if(wear_mask && !skipmask)
var/descriptor = "on [T.his] face"
if(istype(wear_mask, /obj/item/weapon/grenade) && check_has_mouth())
descriptor = "in [T.his] mouth"
if(wear_mask.blood_DNA)
msg += "<span class='warning'>[T.He] [T.has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] on [T.his] face!</span>\n"
msg += "<span class='warning'>[T.He] [T.has] \icon[wear_mask] [wear_mask.gender==PLURAL?"some":"a"] [(wear_mask.blood_color != SYNTH_BLOOD_COLOUR) ? "blood" : "oil"]-stained [wear_mask.name] [descriptor]!</span>\n"
else
msg += "[T.He] [T.has] \icon[wear_mask] \a [wear_mask] on [T.his] face.\n"
msg += "[T.He] [T.has] \icon[wear_mask] \a [wear_mask] [descriptor].\n"
//eyes
if(glasses && !skipeyes)
@@ -1407,3 +1407,7 @@
return 0
return check_organ.can_feel_pain()
return !(species.flags & NO_PAIN)
/mob/living/carbon/human/is_muzzled()
return (wear_mask && (istype(wear_mask, /obj/item/clothing/mask/muzzle) || istype(src.wear_mask, /obj/item/weapon/grenade)))
@@ -118,6 +118,16 @@
if(I_HURT)
if(M.zone_sel.selecting == "mouth" && wear_mask && istype(wear_mask, /obj/item/weapon/grenade))
var/obj/item/weapon/grenade/G = wear_mask
if(!G.active)
visible_message("<span class='danger'>\The [M] pulls the pin from \the [src]'s [G.name]!</span>")
G.activate(M)
update_inv_wear_mask()
else
M << "<span class='warning'>\The [G] is already primed! Run!</span>"
return
if(!istype(H))
attack_generic(H,rand(1,3),"punched")
return
@@ -69,7 +69,10 @@
if(stripping)
visible_message("<span class='danger'>\The [user] is trying to remove \the [src]'s [target_slot.name]!</span>")
else
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
if(slot_to_strip == slot_wear_mask && istype(held, /obj/item/weapon/grenade))
visible_message("<span class='danger'>\The [user] is trying to put \a [held] in \the [src]'s mouth!</span>")
else
visible_message("<span class='danger'>\The [user] is trying to put \a [held] on \the [src]!</span>")
if(!do_after(user,HUMAN_STRIP_DELAY))
return
@@ -112,7 +112,7 @@ var/global/list/sparring_attack_cache = list()
/datum/unarmed_attack/bite/is_usable(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone)
if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
if (user.is_muzzled())
return 0
if (user == target && (zone == BP_HEAD || zone == O_EYES || zone == O_MOUTH))
return 0
@@ -788,7 +788,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/update_inv_wear_mask(var/update_icons=1)
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) ) && !(head && head.flags_inv & HIDEMASK))
if( wear_mask && ( istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory) || istype(wear_mask, /obj/item/weapon/grenade) ) && !(head && head.flags_inv & HIDEMASK))
wear_mask.screen_loc = ui_mask //TODO
var/image/standing
@@ -37,7 +37,7 @@
//This is used by both the whisper verb and human/say() to handle whispering
/mob/living/carbon/human/proc/whisper_say(var/message, var/datum/language/speaking = null, var/alt_name="", var/verb="whispers")
if (istype(src.wear_mask, /obj/item/clothing/mask/muzzle))
if (is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
return
+1 -4
View File
@@ -82,9 +82,6 @@ proc/get_radio_key_from_channel(var/channel)
/mob/living/proc/get_default_language()
return default_language
/mob/living/proc/is_muzzled()
return 0
/mob/living/proc/handle_speech_problems(var/message, var/verb)
var/list/returns[3]
var/speech_problem_flag = 0
@@ -167,7 +164,7 @@ proc/get_radio_key_from_channel(var/channel)
speaking.broadcast(src,trim(message))
return 1
verb = say_quote(message, speaking)
verb = say_quote(message, speaking)
if(is_muzzled())
src << "<span class='danger'>You're muzzled and cannot speak!</span>"
+4
View File
@@ -1131,3 +1131,7 @@ mob/proc/yank_out_object()
/mob/proc/isSynthetic()
return 0
/mob/proc/is_muzzled()
return 0
+1 -1
View File
@@ -213,7 +213,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
return 0
if(ishuman(user) && !(invocation_type in list(SpI_EMOTE, SpI_NONE)))
if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
if(user.is_muzzled())
user << "Mmmf mrrfff!"
return 0