mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
Merge pull request #3230 from Donkie/foodmask
You can no longer eat/drink or consume pills while having a mask/helmet covering your mouth.
This commit is contained in:
@@ -76,6 +76,7 @@ BLIND // can't see anything
|
||||
icon = 'icons/obj/clothing/masks.dmi'
|
||||
body_parts_covered = HEAD
|
||||
slot_flags = SLOT_MASK
|
||||
var/alloweat = 0
|
||||
|
||||
|
||||
//Override this to modify speech like luchador masks.
|
||||
|
||||
@@ -224,30 +224,35 @@
|
||||
/obj/item/clothing/mask/gas/clown_hat
|
||||
name = "clown wig and mask"
|
||||
desc = "A true prankster's facial attire. A clown is incomplete without his wig and mask."
|
||||
alloweat = 1
|
||||
icon_state = "clown"
|
||||
item_state = "clown_hat"
|
||||
|
||||
/obj/item/clothing/mask/gas/sexyclown
|
||||
name = "sexy-clown wig and mask"
|
||||
desc = "A feminine clown mask for the dabbling crossdressers or female entertainers."
|
||||
alloweat = 1
|
||||
icon_state = "sexyclown"
|
||||
item_state = "sexyclown"
|
||||
|
||||
/obj/item/clothing/mask/gas/mime
|
||||
name = "mime mask"
|
||||
desc = "The traditional mime's mask. It has an eerie facial posture."
|
||||
alloweat = 1
|
||||
icon_state = "mime"
|
||||
item_state = "mime"
|
||||
|
||||
/obj/item/clothing/mask/gas/monkeymask
|
||||
name = "monkey mask"
|
||||
desc = "A mask used when acting as a monkey."
|
||||
alloweat = 1
|
||||
icon_state = "monkeymask"
|
||||
item_state = "monkeymask"
|
||||
|
||||
/obj/item/clothing/mask/gas/sexymime
|
||||
name = "sexy mime mask"
|
||||
desc = "A traditional female mime's mask."
|
||||
alloweat = 1
|
||||
icon_state = "sexymime"
|
||||
item_state = "sexymime"
|
||||
|
||||
@@ -264,4 +269,5 @@
|
||||
/obj/item/clothing/mask/gas/owl_mask
|
||||
name = "owl mask"
|
||||
desc = "Twoooo!"
|
||||
alloweat = 1
|
||||
icon_state = "owl"
|
||||
@@ -44,4 +44,27 @@
|
||||
for (var/datum/reagent/R in snack.reagents.reagent_list) //no reagents will be left behind
|
||||
data += "[R.id]([R.volume] units); " //Using IDs because SOME chemicals(I'm looking at you, chlorhydrate-beer) have the same names as other chemicals.
|
||||
return data
|
||||
else return "No reagents"
|
||||
else return "No reagents"
|
||||
|
||||
/obj/item/weapon/reagent_containers/proc/canconsume(mob/eater, mob/user)
|
||||
//Check for covering mask
|
||||
var/obj/item/clothing/cover = eater.get_item_by_slot(slot_wear_mask)
|
||||
|
||||
if(isnull(cover)) // No mask, do we have any helmet?
|
||||
cover = eater.get_item_by_slot(slot_head)
|
||||
else
|
||||
var/obj/item/clothing/mask/covermask = cover
|
||||
if(covermask.alloweat) // Specific cases, clownmask for example.
|
||||
return 1
|
||||
|
||||
if(!isnull(cover))
|
||||
if((cover.flags & HEADCOVERSMOUTH) || (cover.flags & MASKCOVERSMOUTH))
|
||||
var/who = (isnull(user) || eater == user) ? "your" : "their"
|
||||
|
||||
if(istype(cover, /obj/item/clothing/mask/))
|
||||
user << "<span class='notice'>You have to remove [who] mask first!</span>"
|
||||
else
|
||||
user << "<span class='notice'>You have to remove [who] helmet first!</span>"
|
||||
|
||||
return 0
|
||||
return 1
|
||||
@@ -29,6 +29,9 @@
|
||||
user << "<span class='warning'>None of [src] left, oh no!</span>"
|
||||
return 0
|
||||
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M << "<span class='notice'>You swallow some of contents of the [src].</span>"
|
||||
if(reagents.total_volume)
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
user << "<span class='alert'> None of [src] left, oh no!</span>"
|
||||
return 0
|
||||
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M << "<span class='notice'>You swallow a gulp of [src].</span>"
|
||||
if(reagents.total_volume)
|
||||
|
||||
@@ -46,6 +46,9 @@
|
||||
qdel(src)
|
||||
return 0
|
||||
if(istype(M, /mob/living/carbon))
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user) //If you're eating it yourself.
|
||||
var/fullness = M.nutrition + (M.reagents.get_reagent_amount("nutriment") * 25)
|
||||
if(wrapped)
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
return
|
||||
|
||||
attack(mob/M, mob/user, def_zone)
|
||||
if(!canconsume(M, user))
|
||||
return 0
|
||||
|
||||
if(M == user)
|
||||
M << "<span class='notice'>You swallow [src].</span>"
|
||||
M.unEquip(src) //icon update
|
||||
|
||||
Reference in New Issue
Block a user