Makes cursed heart more tolerable

This commit is contained in:
Artur
2021-01-07 22:27:13 +02:00
parent d100fe1d58
commit f5dc7d5c01
2 changed files with 16 additions and 3 deletions

View File

@@ -2,6 +2,7 @@
#define AB_CHECK_STUN 2
#define AB_CHECK_LYING 4
#define AB_CHECK_CONSCIOUS 8
#define AB_CHECK_ALIVE 16
/datum/action
var/name = "Generic Action"
@@ -115,6 +116,9 @@
if(check_flags & AB_CHECK_CONSCIOUS)
if(owner.stat)
return FALSE
if(check_flags & AB_CHECK_ALIVE)
if(owner.stat == DEAD)
return FALSE
return TRUE
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)

View File

@@ -114,7 +114,7 @@ obj/item/organ/heart/slime
var/last_pump = 0
var/add_colour = TRUE //So we're not constantly recreating colour datums
var/pump_delay = 30 //you can pump 1 second early, for lag, but no more (otherwise you could spam heal)
var/blood_loss = 100 //600 blood is human default, so 5 failures (below 122 blood is where humans die because reasons?)
var/blood_loss = 50 //600 blood is human default, so 5 failures (below 122 blood is where humans die because reasons?)
//How much to heal per pump, negative numbers would HURT the player
var/heal_brute = 0
@@ -123,7 +123,11 @@ obj/item/organ/heart/slime
/obj/item/organ/heart/cursed/attack(mob/living/carbon/human/H, mob/living/carbon/human/user, obj/target)
if(H == user && istype(H))
if(NOBLOOD in H.dna.species.species_traits)
to_chat(user, "<span class='danger'>[src] refuses to become one with [H]")
return
playsound(user,'sound/effects/singlebeat.ogg',40,1)
user.temporarilyRemoveItemFromInventory(src, TRUE)
Insert(user)
@@ -137,6 +141,8 @@ obj/item/organ/heart/slime
if(world.time > (last_pump + pump_delay))
if(ishuman(owner) && owner.client) //While this entire item exists to make people suffer, they can't control disconnects.
var/mob/living/carbon/human/H = owner
if(NOBLOOD in H.dna.species.species_traits) //Otherwise people without will be eternally stuck red
return
if(H.dna && !(NOBLOOD in H.dna.species.species_traits))
H.blood_volume = max(H.blood_volume - blood_loss, 0)
to_chat(H, "<span class = 'userdanger'>You have to keep pumping your blood!</span>")
@@ -156,6 +162,8 @@ obj/item/organ/heart/slime
return ..()
/datum/action/item_action/organ_action/cursed_heart
check_flags = AB_CHECK_ALIVE //We wanna be able to do this always, else thisll just stupidly kill whoever has it
required_mobility_flags = NONE
name = "Pump your blood"
//You are now brea- pumping blood manually
@@ -175,7 +183,8 @@ obj/item/organ/heart/slime
var/mob/living/carbon/human/H = owner
if(istype(H))
if(H.dna && !(NOBLOOD in H.dna.species.species_traits))
H.blood_volume = min(H.blood_volume + cursed_heart.blood_loss*0.5, BLOOD_VOLUME_MAXIMUM)
if(H.blood_volume < BLOOD_VOLUME_NORMAL) //We don't need to go too high, otherwise we get annoying messages.
H.blood_volume = min(H.blood_volume + cursed_heart.blood_loss * 0.5, BLOOD_VOLUME_MAXIMUM)
H.remove_client_colour(/datum/client_colour/cursed_heart_blood)
cursed_heart.add_colour = TRUE
H.adjustBruteLoss(-cursed_heart.heal_brute)
@@ -184,7 +193,7 @@ obj/item/organ/heart/slime
/datum/client_colour/cursed_heart_blood
priority = 100 //it's an indicator you're dieing, so it's very high priority
priority = 100 //it's an indicator you're dying, so it's very high priority
colour = "red"
/obj/item/organ/heart/cybernetic