Merge pull request #2344 from VOREStation/Cameron653-patch-2

Vampire Stuff
This commit is contained in:
Spades
2017-10-21 23:29:34 -04:00
committed by GitHub
2 changed files with 17 additions and 17 deletions
@@ -41,10 +41,19 @@
var/effective_dose = dose
if(issmall(M)) effective_dose *= 2
var/is_vampire = 0 //VOREStation Edit START
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.species.gets_food_nutrition == 1)
H.nutrition += removed
is_vampire = 1 //VOREStation Edit END
if(effective_dose > 5)
M.adjustToxLoss(removed)
if(is_vampire == 0) //VOREStation Edit.
M.adjustToxLoss(removed) //VOREStation Edit.
if(effective_dose > 15)
M.adjustToxLoss(removed)
if(is_vampire == 0) //VOREStation Edit.
M.adjustToxLoss(removed) //VOREStation Edit.
if(data && data["virus2"])
var/list/vlist = data["virus2"]
if(vlist.len)
@@ -169,4 +178,3 @@
/datum/reagent/fuel/touch_mob(var/mob/living/L, var/amount)
if(istype(L))
L.adjust_fire_stacks(amount / 10) // Splashing people with welding fuel to make them easy to ignite!
@@ -1,24 +1,16 @@
/obj/item/weapon/reagent_containers/blood/update_icon()
var/percent = round((reagents.total_volume / volume) * 100)
if(percent >= 0 && percent <= 9)
icon_state = "empty"
item_state = "bloodpack_empty"
else if(percent >= 10 && percent <= 50)
icon_state = "half"
item_state = "bloodpack_half"
else if(percent >= 51 && percent < INFINITY)
icon_state = "full"
item_state = "bloodpack_full"
/obj/item/weapon/reagent_containers/blood/attack_self(mob/living/user as mob)
if(user.a_intent == I_HURT)
if(reagents.total_volume && volume)
var/reagent_to_remove = reagents.get_master_reagent_id()
switch(reagents.get_master_reagent_id())
if("blood")
user.show_message("<span class='warning'>You sink your fangs into \the [src] and suck the blood out of it!</span>")
user.visible_message("<font color='red'>[user] sinks their fangs into \the [src] and drains it!</font>")
user.nutrition += volume*5
reagents.clear_reagents()
var/blood_to_remove = volume*0.1 //10%
if(blood_to_remove < 80)
blood_to_remove = volume //This is to prevent people from spamming it.
reagents.remove_reagent(reagent_to_remove, blood_to_remove)
update_icon()
return
else
@@ -28,4 +20,4 @@
user.show_message("<span class='warning'>You take a look at \the [src] and notice it has nothing in it!</span>")
return
else
return
return