Makes vampires more containable

This commit is contained in:
Alffd
2017-10-14 23:55:05 -04:00
parent 8dbed0ede4
commit 59b20f8f33
9 changed files with 143 additions and 22 deletions
+5
View File
@@ -88,3 +88,8 @@
#define BLOCKHAIR 32768 // temporarily removes the user's hair, facial and otherwise.
#define ONESIZEFITSALL 1 // determines if something can be worn by a fatty or not.
//flags for muzzle speech blocking
#define MUTE_NONE 0 // Does not mute you.
#define MUTE_MUFFLE 1 // Muffles everything you say "MHHPHHMMM!!!
#define MUTE_ALL 2 // Completely mutes you.
+4
View File
@@ -275,6 +275,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
var/blood = 0
var/old_bloodtotal = 0 //used to see if we increased our blood total
var/old_bloodusable = 0 //used to see if we increased our blood usable
var/muzzle = H.is_muzzled()
if(muzzle)
to_chat(owner, "<span class='warning'>[muzzle] prevents you from biting [H]!</span>")
return
owner.create_attack_log("<font color='red'>Bit [H] ([H.ckey]) in the neck and draining their blood</font>")
H.create_attack_log("<font color='orange'>Has been bit in the neck by [owner] ([owner.ckey])</font>")
log_attack("[owner] ([owner.ckey]) bit [H] ([H.ckey]) in the neck")
+2 -1
View File
@@ -951,7 +951,8 @@
icon_deny = "sec-deny"
req_access_txt = "1"
products = list(/obj/item/weapon/restraints/handcuffs = 8,/obj/item/weapon/restraints/handcuffs/cable/zipties = 8,/obj/item/weapon/grenade/flashbang = 4,/obj/item/device/flash = 5,
/obj/item/weapon/reagent_containers/food/snacks/donut = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7)
/obj/item/weapon/reagent_containers/food/snacks/donut = 12,/obj/item/weapon/storage/box/evidence = 6,/obj/item/device/flashlight/seclite = 4,/obj/item/weapon/restraints/legcuffs/bola/energy = 7,
/obj/item/clothing/mask/muzzle/safety = 4)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/weapon/storage/fancy/donut_box = 2,/obj/item/device/hailer = 5)
/obj/machinery/vending/hydronutrients
+70 -2
View File
@@ -8,7 +8,9 @@
gas_transfer_coefficient = 0.90
put_on_delay = 20
var/resist_time = 0 //deciseconds of how long you need to gnaw to get rid of the gag, 0 to make it impossible to remove
var/mute = 1 // 1 - completely mutes you, 0 - muffles everything you say "MHHPHHMMM!!!"
var/mute = MUTE_ALL
var/security_lock = FALSE // Requires brig access to remove 0 - Remove as normal
var/locked = FALSE //Indicates if a mask is locked, should always start as 0.
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi'
@@ -18,7 +20,65 @@
/obj/item/clothing/mask/muzzle/attack_hand(mob/user as mob)
if(user.wear_mask == src && !user.IsAdvancedToolUser())
return 0
else if(security_lock && locked)
if(do_unlock(user))
visible_message("<span class='danger'>[user] unlocks their [src.name].</span>", \
"<span class='userdanger'>[user] unlocks their [src.name].</span>")
..()
return 1
/obj/item/clothing/mask/muzzle/proc/do_break()
if(security_lock)
security_lock = FALSE
locked = FALSE
flags &= ~NODROP
desc += " This one appears to be broken."
return TRUE
else
return FALSE
/obj/item/clothing/mask/muzzle/proc/do_unlock(mob/living/carbon/human/user)
if(istype(user.get_inactive_hand(), /obj/item/weapon/card/emag))
to_chat(user, "<span class='warning'>The lock vibrates as the card forces its locking system open.</span>")
do_break()
return TRUE
else if(access_brig in user.get_access())
to_chat(user, "<span class='warning'>The muzzle unlocks with a click.</span>")
locked = FALSE
flags &= ~NODROP
return TRUE
to_chat(user, "<span class='warning'>You must be wearing a security ID card or have one in your inactive hand to remove the muzzle.</span>")
return FALSE
/obj/item/clothing/mask/muzzle/proc/do_lock(mob/living/carbon/human/user)
if(security_lock)
locked = TRUE
flags |= NODROP
return TRUE
return FALSE
/obj/item/clothing/mask/muzzle/Topic(href, href_list)
..()
if(href_list["locked"])
var/mob/living/carbon/wearer = locate(href_list["locked"])
var/success = 0
if(ishuman(usr))
visible_message("<span class='danger'>[usr] tries to [locked ? "unlock" : "lock"] [wearer]'s [name].</span>", \
"<span class='userdanger'>[usr] tries to [locked ? "unlock" : "lock"] [wearer]'s [name].</span>")
if(do_mob(usr, wearer, POCKET_STRIP_DELAY))
if(locked)
success = do_unlock(usr)
else
success = do_lock(usr)
if(success)
visible_message("<span class='danger'>[usr] [locked ? "locks" : "unlocks"] [wearer]'s [name].</span>", \
"<span class='userdanger'>[usr] [locked ? "locks" : "unlocks"] [wearer]'s [name].</span>")
if(usr.machine == wearer && in_range(src, usr))
wearer.show_inv(usr)
else
to_chat(usr, "You lack the ability to manipulate the lock.")
/obj/item/clothing/mask/muzzle/gag
name = "gag"
@@ -33,7 +93,7 @@
item_state = null
w_class = WEIGHT_CLASS_TINY
resist_time = 150
mute = 0
mute = MUTE_MUFFLE
species_fit = list("Vox", "Unathi", "Tajaran", "Vulpkanin", "Grey")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/mask.dmi',
@@ -53,6 +113,14 @@
qdel(src) // This makes sure it gets deleted AFTER all that has to be done is done.
user.emote("scream")
/obj/item/clothing/mask/muzzle/safety
name = "safety muzzle"
desc = "A muzzle designed to prevent biting."
mute = MUTE_NONE
security_lock = TRUE
locked = FALSE
/obj/item/clothing/mask/surgical
name = "sterile mask"
desc = "A sterile mask designed to help prevent the spread of diseases."
@@ -135,6 +135,11 @@ var/const/MAX_ACTIVE_TIME = 400
if(target.wear_mask)
if(prob(20))
return 0
if(istype(target.wear_mask, /obj/item/clothing/mask/muzzle))
var/obj/item/clothing/mask/muzzle/S = target.wear_mask
if(S.do_break())
target.visible_message("<span class='danger'>[src] spits acid onto [S] melting the lock!</span>", \
"<span class='userdanger'>[src] spits acid onto [S] melting the lock!</span>")
var/obj/item/clothing/W = target.wear_mask
if(W.flags & NODROP)
return 0
+7
View File
@@ -625,6 +625,13 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[UID()];item=[slot_wear_mask]'>[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "<font color=grey>Empty</font>"]</A></td></tr>"
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
var/obj/item/clothing/mask/muzzle/M = wear_mask
if(M.security_lock)
dat += "&nbsp;<A href='?src=[M.UID()];locked=\ref[src]'>[M.locked ? "Disable Lock" : "Set Lock"]</A>"
dat += "</td></tr><tr><td>&nbsp;</td></tr>"
if(handcuffed)
dat += "<tr><td><B>Handcuffed:</B> <A href='?src=[UID()];item=[slot_handcuffed]'>Remove</A></td></tr>"
if(legcuffed)
@@ -455,7 +455,14 @@
if(slot_wear_mask in obscured)
dat += "<tr><td><font color=grey><B>Mask:</B></font></td><td><font color=grey>Obscured</font></td></tr>"
else
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[UID()];item=[slot_wear_mask]'>[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "<font color=grey>Empty</font>"]</A></td></tr>"
dat += "<tr><td><B>Mask:</B></td><td><A href='?src=[UID()];item=[slot_wear_mask]'>[(wear_mask && !(wear_mask.flags&ABSTRACT)) ? wear_mask : "<font color=grey>Empty</font>"]</A>"
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
var/obj/item/clothing/mask/muzzle/M = wear_mask
if(M.security_lock)
dat += "&nbsp;<A href='?src=[M.UID()];locked=\ref[src]'>[M.locked ? "Disable Lock" : "Set Lock"]</A>"
dat += "</td></tr><tr><td>&nbsp;</td></tr>"
if(!issmall(src))
if(slot_glasses in obscured)
+2 -2
View File
@@ -163,10 +163,10 @@ proc/get_radio_key_from_channel(var/channel)
if(is_muzzled())
var/obj/item/clothing/mask/muzzle/G = wear_mask
if(G.mute) //if the mask is supposed to mute you completely or just muffle you
if(G.mute == MUTE_ALL) //if the mask is supposed to mute you completely or just muffle you
to_chat(src, "<span class='danger'>You're muzzled and cannot speak!</span>")
return
else
else if(G.mute == MUTE_MUFFLE)
message = muffledspeech(message)
verb = "mumbles"
@@ -357,22 +357,46 @@
M.SetConfused(0)
return
if(ishuman(M) && M.mind && M.mind.vampire && !M.mind.vampire.get_ability(/datum/vampire_passive/full) && prob(80))
switch(current_cycle)
if(1 to 4)
to_chat(M, "<span class = 'warning'>Something sizzles in your veins!</span>")
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
if(5 to 12)
to_chat(M, "<span class = 'danger'>You feel an intense burning inside of you!</span>")
M.adjustFireLoss(1)
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
if(13 to INFINITY)
to_chat(M, "<span class = 'danger'>You suddenly ignite in a holy fire!</span>")
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class = 'danger'>[] suddenly bursts into flames!<span>", M), 1)
M.fire_stacks = min(5,M.fire_stacks + 3)
M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire
M.adjustFireLoss(3) //Hence the other damages... ain't I a bastard?
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
var/mob/living/carbon/V = M
if(M.mind.vampire.bloodusable)
M.Stuttering(1)
M.Jitter(30)
M.adjustStaminaLoss(5)
if(prob(20))
M.emote("scream")
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
M.mind.vampire.bloodusable = max(M.mind.vampire.bloodusable - 20,0)
if(M.mind.vampire.bloodusable)
V.vomit(0,1)
else
holder.remove_reagent(id, volume)
V.vomit(0,0)
return
else
switch(current_cycle)
if(1 to 4)
to_chat(M, "<span class = 'warning'>Something sizzles in your veins!</span>")
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
if(5 to 12)
to_chat(M, "<span class = 'danger'>You feel an intense burning inside of you!</span>")
M.adjustFireLoss(1)
M.Stuttering(1)
M.Jitter(20)
if(prob(20))
M.emote("scream")
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
if(13 to INFINITY)
to_chat(M, "<span class = 'danger'>You suddenly ignite in a holy fire!</span>")
for(var/mob/O in viewers(M, null))
O.show_message(text("<span class = 'danger'>[] suddenly bursts into flames!<span>", M), 1)
M.fire_stacks = min(5,M.fire_stacks + 3)
M.IgniteMob() //Only problem with igniting people is currently the commonly availible fire suits make you immune to being on fire
M.adjustFireLoss(3) //Hence the other damages... ain't I a bastard?
M.Stuttering(1)
M.Jitter(30)
if(prob(40))
M.emote("scream")
M.mind.vampire.nullified = max(5, M.mind.vampire.nullified + 2)
..()