From 8cbd8d77333da7918fbfec7ca84237139422aacb Mon Sep 17 00:00:00 2001 From: Sidewinder 7 Date: Sun, 1 Mar 2020 18:22:25 -0800 Subject: [PATCH] created the new mask --- code/datums/syndicate_buylist.dm | 9 +++ code/modules/chemistry/Reagents-PoisonEtc.dm | 22 ++++--- code/obj/item/clothing/masks.dm | 68 ++++++++++++++++++++ 3 files changed, 91 insertions(+), 8 deletions(-) diff --git a/code/datums/syndicate_buylist.dm b/code/datums/syndicate_buylist.dm index 49441979..0a0daf15 100644 --- a/code/datums/syndicate_buylist.dm +++ b/code/datums/syndicate_buylist.dm @@ -439,6 +439,15 @@ This is basically useless for anyone but miners. job = list("Clown") blockedmode = list(/datum/game_mode/spy) +/datum/syndicate_buylist/traitor/clown_mask + name = "Clown Mask" + item = /obj/item/clothing/mask/gas/syndie_clown + cost = 5 + vr_allowed = 0 + desc = "A clown mask haunted by the souls of those who honked before. Only true clowns should attempt to wear this. It also functions like a gas mask." + job = list("Clown") + blockedmode = list(/datum/game_mode/spy, /datum/game_mode/revolution) + /datum/syndicate_buylist/traitor/fake_revolver name = "Funny-looking Revolver" item = /obj/item/storage/box/fakerevolver diff --git a/code/modules/chemistry/Reagents-PoisonEtc.dm b/code/modules/chemistry/Reagents-PoisonEtc.dm index 3f840a72..3c77a2e6 100644 --- a/code/modules/chemistry/Reagents-PoisonEtc.dm +++ b/code/modules/chemistry/Reagents-PoisonEtc.dm @@ -811,11 +811,14 @@ datum return else if (H.wear_mask) - boutput(M, "Your [H.wear_mask] melts away!") var/obj/item/clothing/mask/K = H.wear_mask - K.dropped(H) - H.u_equip(K) - qdel(K) + if ( !K.acid_proof ) + boutput(M, "Your [H.wear_mask] melts away!") + K.dropped(H) + H.u_equip(K) + qdel(K) + else + boutput(M, "Your [H.wear_mask] protects you from the acid!") melted = 1 if (H.head) boutput(M, "Your [H.head] melts into uselessness!") @@ -834,11 +837,14 @@ datum var/melted = 0 if (H.wear_mask && H.head) if (H.wear_mask) - boutput(M, "Your [H.wear_mask] melts away!") var/obj/item/clothing/mask/K = H.wear_mask - K.dropped(H) - H.u_equip(K) - qdel(K) + if ( !K.acid_proof ) + boutput(M, "Your [H.wear_mask] melts away!") + K.dropped(H) + H.u_equip(K) + qdel(K) + else + boutput(M, "Your [H.wear_mask] protects you from the acid!") melted = 1 if (H.head) boutput(M, "Your [H.head] melts into uselessness!") diff --git a/code/obj/item/clothing/masks.dm b/code/obj/item/clothing/masks.dm index f4b59de8..5889ca9f 100644 --- a/code/obj/item/clothing/masks.dm +++ b/code/obj/item/clothing/masks.dm @@ -10,6 +10,7 @@ compatible_species = list("human", "monkey", "werewolf") var/is_muzzle = 0 var/use_bloodoverlay = 1 + var/acid_proof = 0 //Is this mask immune to flouroacid? New() ..() @@ -188,6 +189,73 @@ item_state = "clown_hat" see_face = 0.0 +/obj/item/clothing/mask/gas/syndie_clown + name = "clown wig and mask" + desc = "I AM THE ONE WHO HONKS." + icon_state = "clown" + item_state = "clown_hat" + acid_proof = 1 + burn_possible = 0 + color_r = 1.0 + color_g = 1.0 + color_b = 1.0 + w_class = 2.0 + var/mob/living/carbon/human/victim + + equipped(var/mob/user, var/slot) + . = ..() + var/mob/living/carbon/human/H = user + if(istype(H) && slot == "mask") + if ( user.mind && user.mind.assigned_role=="Clown" && istraitor(user) ) + src.cant_other_remove = 1.0 + src.cant_self_remove = 0.0 + else + boutput (user, __red("[src] latches onto your face! It burns!")) + src.victim = H + src.cant_other_remove = 0.0 + src.cant_self_remove = 1.0 + src.victim.change_misstep_chance(25) + src.victim.emote("scream") + src.victim.TakeDamage("head",0,15,0,DAMAGE_BURN) + src.victim.changeStatus("stunned", 2.5 SECONDS) + processing_items.Add(src) + + unequipped(mob/user) + . = ..() + if ( src.victim ) + src.victim.change_misstep_chance(-25) + src.victim = null + if ( src in processing_items ) + processing_items.Remove(src) + + process() + if ( src.victim ) + if ( src.victim.health <= 0 ) + return + if ( prob(45) ) + boutput (src.victim, __red("[src] burns your face!")) + if ( prob(25) ) + src.victim.emote("scream") + src.victim.TakeDamage("head",0,3,0,DAMAGE_BURN) + if ( prob(20) ) + src.victim.take_brain_damage(3) + if ( prob(10) ) + src.victim.changeStatus("stunned", 2 SECONDS) + if ( prob(10) ) + src.victim.changeStatus("slowed", 4 SECONDS) + if ( prob(60) ) + src.victim.emote("laugh") + + afterattack(atom/target, mob/user, reach, params) + if ( reach <= 1 && user.mind && user.mind.assigned_role == "Clown" && istraitor(user) && istype(user,/mob/living/carbon/human) && istype(target,/mob/living/carbon/human) ) + var/mob/living/carbon/human/U = user + var/mob/living/carbon/human/T = target + if ( U.a_intent != INTENT_HELP && U.zone_sel.selecting == "head" && T.can_equip(src,T.slot_wear_mask) ) + U.visible_message(__red("[src] latches onto [T]'s face!"),__red("You slap [src] onto [T]'s face!'")) + logTheThing("combat",user,target,"forces [T] to wear [src] (cursed clown mask) at [log_loc(T)].") + U.u_equip(src) + T.equip_if_possible(src,T.slot_wear_mask) + /obj/item/clothing/mask/medical name = "medical mask" desc = "This mask does not work very well in low pressure environments."