From 5cc6367d861e1729f0df59a4528c8ab5f70eed43 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Sun, 6 Sep 2020 06:04:44 +0100 Subject: [PATCH 1/2] Adds blood volume warnings --- code/game/gamemodes/vampire/vampire.dm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 3caf860383d..6be8d051fe0 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -279,6 +279,7 @@ 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/blood_volume_warning = 9999 //Blood volume threshold for warnings if(owner.is_muzzled()) to_chat(owner, "[owner.wear_mask] prevents you from biting [H]!") draining = null @@ -295,9 +296,6 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha return old_bloodtotal = bloodtotal old_bloodusable = bloodusable - if(!H.blood_volume) - to_chat(owner, "They've got no blood left to give.") - break if(H.stat < DEAD) if(H.ckey || H.player_ghosted) //Requires ckey regardless if monkey or humanoid, or the body has been ghosted before it died blood = min(20, H.blood_volume) // if they have less than 20 blood, give them the remnant else they get 20 blood @@ -312,6 +310,17 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha to_chat(owner, "You have accumulated [bloodtotal] [bloodtotal > 1 ? "units" : "unit"] of blood[bloodusable != old_bloodusable ? ", and have [bloodusable] left to use" : ""].") check_vampire_upgrade() H.blood_volume = max(H.blood_volume - 25, 0) + //Blood level warnings (Code 'borrowed' from Fulp) + if(H.blood_volume) + if(H.blood_volume <= BLOOD_VOLUME_BAD && blood_volume_warning > BLOOD_VOLUME_BAD) + to_chat(owner, "Your victim's blood volume is dangerously low.") + else if(H.blood_volume <= BLOOD_VOLUME_OKAY && blood_volume_warning > BLOOD_VOLUME_OKAY) + to_chat(owner, "Your victim's blood is at an unsafe level.") + blood_volume_warning = H.blood_volume //Set to blood volume, so that you only get the message once + else + to_chat(owner, "You have bled your victim dry!") + break + if(ishuman(owner)) var/mob/living/carbon/human/V = owner if(!H.ckey && !H.player_ghosted)//Only runs if there is no ckey and the body has not being ghosted while alive From d4f266543da5a5636324d7427e678996907c540d Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Sun, 6 Sep 2020 06:05:22 +0100 Subject: [PATCH 2/2] Changes de-vampire message to 'userdanger' While draining, that is. --- code/game/gamemodes/vampire/vampire.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 6be8d051fe0..75748448527 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -292,7 +292,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha H.LAssailant = owner while(do_mob(owner, H, 50)) if(!(owner.mind in SSticker.mode.vampires)) - to_chat(owner, "Your fangs have disappeared!") + to_chat(owner, "Your fangs have disappeared!") return old_bloodtotal = bloodtotal old_bloodusable = bloodusable