diff --git a/code/__DEFINES/loadout.dm b/code/__DEFINES/loadout.dm index b74bea7f1c2..4b6df1541fc 100644 --- a/code/__DEFINES/loadout.dm +++ b/code/__DEFINES/loadout.dm @@ -147,7 +147,7 @@ GLOBAL_LIST_INIT(medic_gear_listed_products, list( /obj/item/reagent_containers/hypospray/autoinjector/neuraline = list(CAT_MEDSUP, "Injector (Neuraline)", 14, "cyan"), /obj/item/healthanalyzer/gloves = list(CAT_MEDSUP, "Health scanner gloves", 2, "yellow"), /obj/item/defibrillator/gloves = list(CAT_MEDSUP, "Advanced medical gloves", 4, "yellow"), - /obj/item/defibrillator/advanced = list(CAT_FCSUP, "advanced emergency defibrillator", 4, "yellow"), + /obj/item/defibrillator/advanced = list(CAT_MEDSUP, "advanced emergency defibrillator", 4, "yellow"), /obj/item/tweezers_advanced = list(CAT_MEDSUP, "Advanced Tweezers", 8, "yellow"), /obj/effect/vendor_bundle/stretcher = list(CAT_MEDSUP, "Medivac Stretcher", 20, "yellow"), )) diff --git a/code/game/objects/items/defibrillator.dm b/code/game/objects/items/defibrillator.dm index 17607ec56b3..60bfee22b3a 100644 --- a/code/game/objects/items/defibrillator.dm +++ b/code/game/objects/items/defibrillator.dm @@ -2,7 +2,7 @@ name = "emergency defibrillator" desc = "A handheld emergency defibrillator, used to restore fibrillating patients. Can optionally bring people back from the dead." icon = 'icons/obj/items/defibrillator.dmi' - icon_state = "defib_full" + icon_state = "defib" item_state = "defib" flags_atom = CONDUCT flags_item = NOBLUDGEON @@ -10,23 +10,23 @@ force = 5 throwforce = 6 w_class = WEIGHT_CLASS_NORMAL - var/ready = FALSE ///wether readying is needed var/ready_needed = TRUE var/advanced = FALSE - var/damage_threshold = 8 //This is the maximum non-oxy damage the defibrillator will heal to get a patient above -100, in all categories - var/charge_cost = 66 //How much energy is used. + ///This is the maximum non-oxy damage the defibrillator will heal to get a patient above -100, in all categories + var/damage_threshold = 8 + /// How much energy is used + var/charge_cost = 66 var/obj/item/cell/dcell = null var/datum/effect_system/spark_spread/sparks - var/defib_cooldown = 0 //Cooldown for toggling the defib - + ///Cooldown for toggling the defib + var/defib_cooldown = 0 /obj/item/defibrillator/suicide_act(mob/user) user.visible_message(span_danger("[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide.")) return (FIRELOSS) - /obj/item/defibrillator/Initialize(mapload) . = ..() sparks = new @@ -35,7 +35,6 @@ set_dcell(new /obj/item/cell()) update_icon() - /obj/item/defibrillator/Destroy() QDEL_NULL(sparks) if(dcell) @@ -43,7 +42,6 @@ QDEL_NULL(dcell) return ..() - /obj/item/defibrillator/update_icon_state() icon_state = initial(icon_state) if(ready) @@ -59,12 +57,10 @@ else icon_state += "_empty" - /obj/item/defibrillator/examine(mob/user) . = ..() . += maybe_message_recharge_hint() - /** * Message user with a hint to recharge defibrillator * and how to do it if the battery is low. @@ -83,7 +79,6 @@ return return span_notice("[message] You can click-drag defibrillator on corpsman backpack to recharge it.") - /obj/item/defibrillator/attack_self(mob/living/carbon/human/user) if(!ready_needed) return @@ -111,7 +106,6 @@ playsound(get_turf(src), 'sound/items/defib_safetyOff.ogg', 30, 0) update_icon() - ///Wrapper to guarantee powercells are properly nulled and avoid hard deletes. /obj/item/defibrillator/proc/set_dcell(obj/item/cell/new_cell) if(dcell) @@ -120,7 +114,6 @@ if(dcell) RegisterSignal(dcell, COMSIG_QDELETING, PROC_REF(on_cell_deletion)) - ///Called by the deletion of the referenced powercell. /obj/item/defibrillator/proc/on_cell_deletion(obj/item/cell/source, force) SIGNAL_HANDLER @@ -189,7 +182,7 @@ user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Vital signs detected. Aborting.")) return - if((HAS_TRAIT(H, TRAIT_UNDEFIBBABLE ) && !issynth(H)) || H.suiciding) //synthetic species have no expiration date + if((HAS_TRAIT(H, TRAIT_UNDEFIBBABLE) && !issynth(H)) || H.suiciding) //synthetic species have no expiration date user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Patient is braindead. No remedy possible.")) return @@ -197,7 +190,7 @@ user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Patient's organs are too damaged to sustain life. Deliver patient to a MD for surgical intervention.")) return - if((H.wear_suit && H.wear_suit.flags_atom & CONDUCT)) + if((H.wear_suit && H.wear_suit.flags_atom & CONDUCT && !advanced)) user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Paddles registering >100,000 ohms, Possible cause: Suit or Armor interferring.")) return @@ -222,21 +215,18 @@ sparks.start() dcell.use(charge_cost) update_icon() - /* ORIGINAL - playsound(get_turf(src), 'sound/items/defib_release.ogg', 25, 1) - */ - playsound(get_turf(src), 'sound/items/defib_release.ogg', 30, 0) //RUTGMC EDIT + playsound(get_turf(src), 'sound/items/defib_release.ogg', 30, 0) user.visible_message(span_notice("[user] shocks [H] with the paddles."), span_notice("You shock [H] with the paddles.")) H.visible_message(span_danger("[H]'s body convulses a bit.")) defib_cooldown = world.time + 10 //1 second cooldown before you can shock again - if(H.wear_suit && advanced == FALSE && H.wear_suit.flags_atom & CONDUCT) + if(H.wear_suit && H.wear_suit.flags_atom & CONDUCT && !advanced) user.visible_message(span_warning("[icon2html(src, viewers(user))] \The [src] buzzes: Defibrillation failed: Paddles registering >100,000 ohms, Possible cause: Suit or Armor interferring.")) return var/datum/internal_organ/heart/heart = H.get_organ_slot(ORGAN_SLOT_HEART) - if(!issynth(H) && !isrobot(H) && heart && prob(90) && advanced == FALSE) + if(!issynth(H) && !isrobot(H) && heart && prob(90) && !advanced) heart.take_damage(5) //Allow the defibrillator to possibly worsen heart damage. Still rare enough to just be the "clone damage" of the defib if(HAS_TRAIT(H, TRAIT_UNDEFIBBABLE) || H.suiciding) @@ -310,7 +300,7 @@ H.handle_regular_hud_updates() H.updatehealth() //One more time, so it doesn't show the target as dead on HUDs H.dead_ticks = 0 //We reset the DNR time - H.initial_stage = 0 // RUTGMC ADDITION + H.initial_stage = 0 REMOVE_TRAIT(H, TRAIT_PSY_DRAINED, TRAIT_PSY_DRAINED) if(user.client) var/datum/personal_statistics/personal_statistics = GLOB.personal_statistics_list[user.ckey] @@ -328,12 +318,12 @@ /obj/item/defibrillator/civi name = "emergency defibrillator" desc = "A handheld emergency defibrillator, used to restore fibrillating patients. Can optionally bring people back from the dead. Appears to be a civillian model." - icon_state = "civ_defib_full" + icon_state = "civ_defib" item_state = "defib" /obj/item/defibrillator/gloves name = "advanced medical combat gloves" - desc = "Advanced medical gloves, these include small electrodes to defibrilate a patiant. No more bulky units!" + desc = "Advanced medical gloves, these include small electrodes to defibrilate a patiant. Ignores armor and doesn't deal any damage to the patient's heart!" icon_state = "defib_gloves" item_state = "defib_gloves" ready = TRUE @@ -354,7 +344,6 @@ max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE advanced = TRUE - /obj/item/defibrillator/gloves/equipped(mob/living/carbon/human/user, slot) . = ..() if(user.gloves == src) @@ -376,11 +365,10 @@ /obj/item/defibrillator/gloves/update_icon_state() return - /obj/item/defibrillator/advanced name = "advanced emergency defibrillator" - desc = "A handheld advanced emergency defibrillator, used to restore fibrillating patients. Can optionally bring people back from the dead." + desc = "A handheld advanced emergency defibrillator, used to restore fibrillating patients. at the cost of increased charge consumption." icon = 'icons/obj/items/defibrillator.dmi' - icon_state = "civ_defib_full" + icon_state = "civ_defib" + charge_cost = 100 advanced = TRUE - charge_cost = 100 //How much energy is used. diff --git a/code/game/objects/items/reagent_containers/food/snacks.dm b/code/game/objects/items/reagent_containers/food/snacks.dm index a874b400d33..68509c18ea7 100644 --- a/code/game/objects/items/reagent_containers/food/snacks.dm +++ b/code/game/objects/items/reagent_containers/food/snacks.dm @@ -34,7 +34,7 @@ if(reagents.total_volume) return - balloon_alert_to_viewers("eats \the [src]") + balloon_alert_to_viewers("eats \the [src]", ignored_mobs = M) usr.dropItemToGround(src) //so icons update :[ @@ -71,15 +71,15 @@ if(ishuman(H) && (H.species.species_flags & ROBOTIC_LIMBS)) balloon_alert(user, "can't eat food") return - if (fullness <= 50) + if(fullness <= 50) balloon_alert(user, "hungrily chews [src]") - if (fullness > 50 && fullness <= 150) + if(fullness > 50 && fullness <= 150) balloon_alert(user, "hungrily eats [src]") - if (fullness > 150 && fullness <= 350) + if(fullness > 150 && fullness <= 350) balloon_alert(user, "takes bite of [src]") - if (fullness > 350 && fullness <= 550) + if(fullness > 350 && fullness <= 550) balloon_alert(user, "unwillingly chews [src]") - if (fullness > 550) + if(fullness > 550) balloon_alert(user, "cannot eat more of [src]") return FALSE else @@ -87,7 +87,7 @@ if(ishuman(H) && (H.species.species_flags & ROBOTIC_LIMBS)) balloon_alert(user, "can't eat food") return - if (fullness <= 550) + if(fullness <= 550) balloon_alert_to_viewers("tries to feed [M]") else balloon_alert_to_viewers("tries to feed [M] but can't") diff --git a/code/modules/mob/living/living_health_procs.dm b/code/modules/mob/living/living_health_procs.dm index afef8182f18..73e629c7d0b 100644 --- a/code/modules/mob/living/living_health_procs.dm +++ b/code/modules/mob/living/living_health_procs.dm @@ -261,7 +261,7 @@ embedded.unembed_ourself() // shut down various types of badness - setStaminaLoss(0) + setStaminaLoss(-50) setToxLoss(0) setOxyLoss(0) setCloneLoss(0)