Skip to content

Commit

Permalink
Update hev_suit.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
konushi committed Nov 29, 2023
1 parent ac43e54 commit ea78990
Showing 1 changed file with 52 additions and 52 deletions.
104 changes: 52 additions & 52 deletions modular_ss220/clothing/code/hev_suit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,58 +146,58 @@
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/shok.ogg', 3 SECONDS)

// //Morphine
// /obj/item/clothing/suit/space/hev/proc/administer_morphine()
// if(!owner.reagents)
// return
// if(!COOLDOWN_FINISHED(src, next_morphine))
// return

// if((flags & emagged) && emag_doses_left < 0)
// owner.reagents.add_reagent(/datum/reagent/medicine/morphine, 1.5)
// owner.reagents.add_reagent(/datum/reagent/medicine/epinephrine 1.5)
// SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
// add_queue('modular_ss220/aesthetics_sounds/sound/hev/morphine_shot.ogg',2 SECONDS)
// else
// owner.reagents.add_reagent(/datum/reagent/medicine/stimulants, 5)
// SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
// add_queue('modular_ss220/aesthetics_sounds/sound/hev/wound_sterilized.ogg',2 SECONDS)
// emag_doses_left--
// if(emag_doses_left <= 0)
// to_chat(owner, span_warning("\The [name] seems to have run out of stimulants..."))

// COOLDOWN_START(src, next_morphine, MORPHINE_INJECTION_DELAY)
// return TRUE

// /obj/item/clothing/suit/space/hev/proc/handle_damage(mob/M, damage, damagetype, def_zone)

// var/health_percent = owner.health / owner.maxHealth

// if(!COOLDOWN_FINISHED(src, next_damage_notify))
// return

// if(damage < 5 || owner.maxHealth <= 0)
// return

// for(var/k in funny_signals)
// RegisterSignal(M, k, funny_signals[k])
// if(health_percent > 0.50 && !prob(damage * 4))
// switch(health_percent)
// if(0.76 to INFINITY)
// return
// if(0.51 to 0.75)
// SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_2.ogg')
// add_queue('modular_ss220/aesthetics_sounds/sound/hev/health_dropping2.ogg',2 SECONDS)
// COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
// if(0.26 to 0.50)
// SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
// add_queue('modular_ss220/aesthetics_sounds/sound/hev/health_critical.ogg',3 SECONDS)
// COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
// else
// SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
// add_queue('modular_ss220/aesthetics_sounds/sound/hev/near_death.ogg',3 SECONDS)
// COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
// administer_morphine()
//Morphine
/obj/item/clothing/suit/space/hev/proc/administer_morphine()
if(!owner.reagents)
return
if(!COOLDOWN_FINISHED(src, next_morphine))
return

if((flags & emagged) && emag_doses_left < 0)
owner.reagents.add_reagent(/datum/reagent/medicine/morphine, 1.5)
owner.reagents.add_reagent(/datum/reagent/medicine/epinephrine, 1.5)
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/morphine_shot.ogg',2 SECONDS)
else
owner.reagents.add_reagent(/datum/reagent/medicine/stimulants, 5)
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/wound_sterilized.ogg',2 SECONDS)
emag_doses_left--
if(emag_doses_left <= 0)
to_chat(owner, span_warning("\The [name] seems to have run out of stimulants..."))

COOLDOWN_START(src, next_morphine, MORPHINE_INJECTION_DELAY)
return TRUE

/obj/item/clothing/suit/space/hev/proc/handle_damage(mob/M, damage, damagetype, def_zone)

var/health_percent = owner.health / owner.maxHealth

if(!COOLDOWN_FINISHED(src, next_damage_notify))
return

if(damage < 5 || owner.maxHealth <= 0)
return

for(var/k in funny_signals)
RegisterSignal(M, k, funny_signals[k])
if(health_percent > 0.50 && !prob(damage * 4))
switch(health_percent)
if(0.76 to INFINITY)
return
if(0.51 to 0.75)
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_2.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/health_dropping2.ogg',2 SECONDS)
COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
if(0.26 to 0.50)
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/health_critical.ogg',3 SECONDS)
COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
else
SOUND_BEEP('modular_ss220/aesthetics_sounds/sound/hev/beep_3.ogg')
add_queue('modular_ss220/aesthetics_sounds/sound/hev/near_death.ogg',3 SECONDS)
COOLDOWN_START(src, next_damage_notify, 5 SECONDS)
administer_morphine()

//Helmet
/obj/item/clothing/head/helmet/hev_helmet
Expand Down

0 comments on commit ea78990

Please sign in to comment.