Merge pull request #5366 from Citadel-Station-13/upstream-merge-35296
[MIRROR] Heart Disease 2: Electric Boogaloo
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/datum/round_event_control/heart_attack
|
||||
name = "Random Heart Attack"
|
||||
typepath = /datum/round_event/heart_attack
|
||||
weight = 20
|
||||
max_occurrences = 2
|
||||
earliest_start = 12000
|
||||
min_players = 40 // To avoid shafting lowpop
|
||||
|
||||
/datum/round_event/heart_attack/start()
|
||||
var/list/heart_attack_contestants = list()
|
||||
for(var/mob/living/carbon/H in shuffle(GLOB.player_list))
|
||||
if(!H.client || H.stat == DEAD || H.InCritical() || !H.can_heartattack() || H.has_status_effect(STATUS_EFFECT_EXERCISED) || (/datum/disease/heart_failure in H.viruses) || H.undergoing_cardiac_arrest())
|
||||
continue
|
||||
if(H.satiety <= -100)
|
||||
heart_attack_contestants[H] = 1.15
|
||||
else
|
||||
heart_attack_contestants[H] = 1
|
||||
|
||||
if(LAZYLEN(heart_attack_contestants))
|
||||
var/mob/living/carbon/C = pickweight(heart_attack_contestants)
|
||||
var/datum/disease/D = new /datum/disease/heart_failure
|
||||
C.ForceContractDisease(D)
|
||||
notify_ghosts("[C] is beginning to have a heart attack!", enter_link="<a href=?src=[REF(C)];orbit=1>(Click to orbit)</a>", source=C, action=NOTIFY_ORBIT)
|
||||
@@ -8,9 +8,10 @@
|
||||
var/list/hit_sounds = list('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg',\
|
||||
'sound/weapons/punch1.ogg', 'sound/weapons/punch2.ogg', 'sound/weapons/punch3.ogg', 'sound/weapons/punch4.ogg')
|
||||
|
||||
/obj/structure/punching_bag/attack_hand(mob/user as mob)
|
||||
flick("[icon_state]2", src)
|
||||
playsound(src.loc, pick(src.hit_sounds), 25, 1, -1)
|
||||
/obj/structure/punching_bag/attack_hand(mob/living/user)
|
||||
flick("[icon_state]2", src)
|
||||
playsound(src.loc, pick(src.hit_sounds), 25, 1, -1)
|
||||
user.apply_status_effect(STATUS_EFFECT_EXERCISED)
|
||||
|
||||
/obj/structure/stacklifter
|
||||
name = "Weight Machine"
|
||||
@@ -49,6 +50,7 @@
|
||||
var/finishmessage = pick("You feel stronger!","You feel like you can take on the world!","You feel robust!","You feel indestructible!")
|
||||
icon_state = "fitnesslifter"
|
||||
to_chat(user, finishmessage)
|
||||
user.apply_status_effect(STATUS_EFFECT_EXERCISED)
|
||||
|
||||
/obj/structure/weightlifter
|
||||
name = "Weight Machine"
|
||||
@@ -94,3 +96,4 @@
|
||||
icon_state = "fitnessweight"
|
||||
cut_overlay(swole_overlay)
|
||||
to_chat(user, "[finishmessage]")
|
||||
user.apply_status_effect(STATUS_EFFECT_EXERCISED)
|
||||
@@ -467,6 +467,9 @@
|
||||
/mob/living/carbon/proc/can_heartattack()
|
||||
if(dna && dna.species && (NOBLOOD in dna.species.species_traits)) //not all carbons have species!
|
||||
return FALSE
|
||||
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
|
||||
if(!heart || heart.synthetic)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/undergoing_cardiac_arrest()
|
||||
|
||||
@@ -149,6 +149,7 @@
|
||||
name = "cybernetic heart"
|
||||
desc = "An electronic device designed to mimic the functions of an organic human heart. Offers no benefit over an organic heart other than being easy to make."
|
||||
icon_state = "heart-c"
|
||||
synthetic = TRUE
|
||||
|
||||
/obj/item/organ/heart/cybernetic/emp_act()
|
||||
Stop()
|
||||
@@ -156,6 +157,7 @@
|
||||
/obj/item/organ/heart/freedom
|
||||
name = "heart of freedom"
|
||||
desc = "This heart pumps with the passion to give... something freedom."
|
||||
synthetic = TRUE //the power of freedom prevents heart attacks
|
||||
var/min_next_adrenaline = 0
|
||||
|
||||
/obj/item/organ/heart/freedom/on_life()
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
name = "cybernetic liver"
|
||||
icon_state = "liver-c"
|
||||
desc = "An electronic device designed to mimic the functions of a human liver. It has no benefits over an organic liver, but is easy to produce."
|
||||
synthetic = TRUE
|
||||
|
||||
/obj/item/organ/liver/cybernetic/upgraded
|
||||
name = "upgraded cybernetic liver"
|
||||
|
||||
@@ -359,6 +359,7 @@
|
||||
name = "cybernetic lungs"
|
||||
desc = "A cybernetic version of the lungs found in traditional humanoid entities. It functions the same as an organic lung and is merely meant as a replacement."
|
||||
icon_state = "lungs-c"
|
||||
synthetic = TRUE
|
||||
|
||||
/obj/item/organ/lungs/cybernetic/emp_act()
|
||||
owner.losebreath = 20
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/vital = 0
|
||||
//Was this organ implanted/inserted/etc, if true will not be removed during species change.
|
||||
var/external = FALSE
|
||||
var/synthetic = FALSE // To distinguish between organic and synthetic organs
|
||||
|
||||
|
||||
/obj/item/organ/proc/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
|
||||
Reference in New Issue
Block a user