Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _maps/RandomRuins/SpaceRuins/dangerous_research.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -1063,7 +1063,7 @@
/area/ruin/space/has_grav/dangerous_research/lab)
"oJ" = (
/obj/structure/closet/crate/medical,
/obj/item/stack/medical/suture/emergency,
/obj/item/stack/medical/suture/ekit,
/obj/item/stack/medical/gauze/twelve,
/obj/item/reagent_containers/hypospray/medipen/blood_loss,
/obj/effect/spawner/random/medical/injector,
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/NebulaStation/NebulaStation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -8302,7 +8302,7 @@
/obj/effect/turf_decal/tile/blue/anticorner/contrasted,
/obj/structure/table/glass,
/obj/item/stack/medical/mesh,
/obj/item/stack/medical/suture/emergency,
/obj/item/stack/medical/suture/ekit,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/turf/open/floor/iron/white,
Expand Down
4 changes: 2 additions & 2 deletions _maps/map_files/NorthStar/north_star.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -54524,7 +54524,7 @@
/area/station/science/breakroom)
"nWM" = (
/obj/structure/table,
/obj/item/stack/medical/suture/emergency,
/obj/item/stack/medical/suture/ekit,
/obj/effect/turf_decal/stripes/corner{
dir = 8
},
Expand Down Expand Up @@ -71110,7 +71110,7 @@
/turf/open/floor/iron/white/textured,
/area/station/medical/office)
"ssx" = (
/obj/item/stack/medical/suture/emergency,
/obj/item/stack/medical/suture/ekit,
/obj/item/stack/medical/gauze/improvised{
pixel_y = 12
},
Expand Down
7 changes: 7 additions & 0 deletions code/__DEFINES/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#define COMSIG_CARBON_PAIN_GAINED "pain_gain"
/// Sent when a carbon loses pain. (source = mob/living/carbon/human, obj/item/bodypart/affected_bodypart, amount, type)
#define COMSIG_CARBON_PAIN_LOST "pain_loss"
/// Sent when a temperature pack is applied to a mob. (source = obj/item/temperature_pack)
#define COMISG_TEMPERATURE_PACK_ENABLED "temperature_pack_enabled"
/// Sent when a temperature pack runs out of juice. (source = obj/item/temperature_pack)
#define COMSIG_TEMPERATURE_PACK_EXPIRED "temp_pack_expired"

Expand Down Expand Up @@ -134,6 +136,11 @@
/// Calculates oxyloss cap
#define MAX_OXYLOSS(maxHealth) (maxHealth * 2)

// Frozen item temperature pack defaults
#define FROZEN_ITEM_PAIN_RATE 0.1 // so cold that it barely heals
#define FROZEN_ITEM_PAIN_MODIFIER 0.25
#define FROZEN_ITEM_TEMPERATURE_CHANGE -2 KELVIN

// Some source defines for pain and consciousness
// Consciousness ones are human readable because of laziness (they are shown in cause of death)
#define PAINSHOCK "traumatic shock"
Expand Down
4 changes: 4 additions & 0 deletions code/datums/elements/frozen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
RegisterSignal(target, COMSIG_MOVABLE_THROW_LANDED, PROC_REF(shatter_on_landed))
RegisterSignal(target, COMSIG_MOVABLE_IMPACT, PROC_REF(shatter_on_throw))
RegisterSignal(target, COMSIG_OBJ_UNFREEZE, PROC_REF(on_unfreeze))
// NON-MODULE CHANGE
target.AddElement(/datum/element/temperature_pack, FROZEN_ITEM_PAIN_RATE, FROZEN_ITEM_PAIN_MODIFIER, FROZEN_ITEM_TEMPERATURE_CHANGE)

/datum/element/frozen/Detach(datum/source, ...)
var/obj/obj_source = source
Expand All @@ -39,6 +41,8 @@ GLOBAL_LIST_INIT(freon_color_matrix, list("#2E5E69", "#60A2A8", "#A1AFB1", rgb(0
obj_source.name = replacetext(obj_source.name, "frozen ", "")
obj_source.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, GLOB.freon_color_matrix)
obj_source.alpha += 25
// NON-MODULE CHANGE
obj_source.RemoveElement(/datum/element/temperature_pack, FROZEN_ITEM_PAIN_RATE, FROZEN_ITEM_PAIN_MODIFIER, FROZEN_ITEM_TEMPERATURE_CHANGE)

if (isorgan(source))
var/obj/item/organ/organ = source
Expand Down
22 changes: 11 additions & 11 deletions code/game/objects/items/stacks/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -349,17 +349,20 @@
icon_state = "brutepack"
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
righthand_file = 'icons/mob/inhands/equipment/medical_righthand.dmi'
heal_brute = 40
heal_brute = 25
self_delay = 4 SECONDS
other_delay = 2 SECONDS
grind_results = list(/datum/reagent/medicine/c2/libital = 10)
grind_results = list(/datum/reagent/medicine/c2/libital = 3)
merge_type = /obj/item/stack/medical/bruise_pack
can_inject_flags = INJECT_CHECK_IGNORE_SPECIES

/obj/item/stack/medical/bruise_pack/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is bludgeoning [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!"))
return BRUTELOSS

/obj/item/stack/medical/bruise_pack/ekit
amount = 2

/obj/item/stack/medical/gauze
name = "medical gauze"
desc = "A roll of elastic cloth, perfect for stabilizing all kinds of wounds, from cuts and burns, to broken bones. "
Expand Down Expand Up @@ -592,14 +595,8 @@
merge_type = /obj/item/stack/medical/suture
heal_sound = 'maplestation_modules/sound/items/snip.ogg'

/obj/item/stack/medical/suture/emergency
name = "emergency sutures"
desc = "A value pack of cheap sutures, not very good at repairing damage, but still decent at stopping bleeding."
singular_name = "emergency suture"
heal_brute = 5
amount = 5
max_amount = 5
merge_type = /obj/item/stack/medical/suture/emergency
/obj/item/stack/medical/suture/ekit
amount = 4

/obj/item/stack/medical/suture/medicated
name = "medicated sutures"
Expand Down Expand Up @@ -627,14 +624,17 @@
heal_burn = 5
flesh_regeneration = 5
sanitization = 1
grind_results = list(/datum/reagent/medicine/c2/lenturi = 10)
grind_results = list(/datum/reagent/medicine/c2/lenturi = 3)
merge_type = /obj/item/stack/medical/ointment
can_inject_flags = INJECT_CHECK_IGNORE_SPECIES

/obj/item/stack/medical/ointment/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] is squeezing [src] into [user.p_their()] mouth! [user.p_do(TRUE)]n't [user.p_they()] know that stuff is toxic?"))
return TOXLOSS

/obj/item/stack/medical/ointment/ekit
amount = 4

/obj/item/stack/medical/mesh
name = "regenerative mesh"
desc = "A bacteriostatic mesh used to dress burns."
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/stacks/stack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,8 @@

/obj/item/stack/update_name(updates)
. = ..()
maptext = (ismob(loc) || loc?.atom_storage) ? MAPTEXT("<font color='white'>[amount]</font>") : ""
if(max_amount != 1)
maptext = (ismob(loc) || loc?.atom_storage) ? MAPTEXT("<font color='white'>[amount]</font>") : ""
if(!singular_name)
return
if(amount > 1)
Expand Down
25 changes: 14 additions & 11 deletions code/game/objects/items/storage/medkit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@
return
var/static/items_inside = list(
/obj/item/stack/medical/gauze = 1,
/obj/item/stack/medical/bruise_pack = 1,
/obj/item/stack/medical/suture = 1,
/obj/item/stack/medical/bruise_pack = 2,
/obj/item/stack/medical/mesh = 2,
/obj/item/reagent_containers/hypospray/medipen = 1,
/obj/item/reagent_containers/hypospray/medipen/morphine = 1,
Expand All @@ -121,13 +120,15 @@
return
var/static/items_inside = list(
/obj/item/healthanalyzer/simple = 1,
/obj/item/hemostat/tweezers = 1,
/obj/item/stack/medical/gauze = 1,
/obj/item/stack/medical/suture/emergency = 1,
/obj/item/stack/medical/ointment = 1,
/obj/item/reagent_containers/hypospray/medipen/ekit = 2,
/obj/item/reagent_containers/hypospray/medipen/emergency_painkiller = 1,
/obj/item/storage/pill_bottle/iron = 1,
/obj/item/stack/medical/bruise_pack/ekit = 1,
/obj/item/stack/medical/ointment/ekit = 1,
/obj/item/temperature_pack/cold = 1,
/obj/item/shock_blanket/emergency = 1,
/obj/item/reagent_containers/hypospray/medipen/ekit = 1,
/obj/item/reagent_containers/hypospray/medipen/blood_loss = 1,
/obj/item/reagent_containers/hypospray/medipen/emergency_painkiller = 1,
)
generate_items_inside(items_inside,src)

Expand Down Expand Up @@ -222,12 +223,12 @@
if(empty)
return
var/static/items_inside = list(
/obj/item/storage/pill_bottle/multiver/less = 1,
/obj/item/reagent_containers/syringe/syriniver = 3,
/obj/item/storage/pill_bottle/multiver/less = 1,
/obj/item/storage/pill_bottle/potassiodide = 1,
/obj/item/reagent_containers/hypospray/medipen/penacid = 1,
/obj/item/healthanalyzer/simple/disease = 1,
)
)
generate_items_inside(items_inside,src)

/obj/item/storage/medkit/o2
Expand All @@ -249,9 +250,11 @@
return
var/static/items_inside = list(
/obj/item/reagent_containers/syringe/convermol = 3,
/obj/item/storage/pill_bottle/iron = 1,
/obj/item/reagent_containers/hypospray/medipen/blood_loss = 1,
/obj/item/reagent_containers/hypospray/medipen/salbutamol = 1,
/obj/item/reagent_containers/hypospray/medipen = 1,
/obj/item/storage/pill_bottle/iron = 1)
)
generate_items_inside(items_inside,src)

/obj/item/storage/medkit/brute
Expand All @@ -273,8 +276,8 @@
return
var/static/list/items_inside = list(
/obj/item/reagent_containers/pill/patch/libital = 3,
/obj/item/stack/medical/gauze = 1,
/obj/item/storage/pill_bottle/probital = 1,
/obj/item/stack/medical/suture = 1,
/obj/item/reagent_containers/hypospray/medipen/salacid = 1,
/obj/item/reagent_containers/hypospray/medipen/brute_painkiller = 1,
)
Expand Down
2 changes: 0 additions & 2 deletions code/modules/cargo/packs/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@
/obj/item/reagent_containers/cup/bottle/morphine,
/obj/item/reagent_containers/cup/bottle/toxin,
/obj/item/reagent_containers/cup/beaker/large,
/obj/item/reagent_containers/pill/insulin,
/obj/item/stack/medical/gauze,
/obj/item/storage/box/bandages,
/obj/item/storage/box/beakers,
Expand All @@ -105,7 +104,6 @@
/obj/item/defibrillator/loaded,
/obj/item/reagent_containers/blood/o_minus,
/obj/item/storage/pill_bottle/mining,
/obj/item/reagent_containers/pill/neurine,
/obj/item/stack/medical/bone_gel = 2,
/obj/item/vending_refill/medical,
/obj/item/vending_refill/drugs,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/reagents/reagent_containers/hypospray.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
ignore_flags = 1 //so you can medipen through spacesuits
reagent_flags = DRAWABLE
flags_1 = null
list_reagents = list(/datum/reagent/medicine/epinephrine = 10, /datum/reagent/toxin/formaldehyde = 3, /datum/reagent/medicine/coagulant = 2)
list_reagents = list(/datum/reagent/medicine/epinephrine = 12.5, /datum/reagent/toxin/formaldehyde = 2.5)
custom_price = PAYCHECK_CREW
custom_premium_price = PAYCHECK_COMMAND
var/label_examine = TRUE
Expand Down
3 changes: 3 additions & 0 deletions code/modules/reagents/reagent_containers/pill.dm
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
list_reagents = list(/datum/reagent/medicine/mutadone = 50)
rename_with_volume = TRUE

/obj/item/reagent_containers/pill/mutadone/less
list_reagents = list(/datum/reagent/medicine/mutadone = 5)

/obj/item/reagent_containers/pill/salicylic
name = "salicylic acid pill"
desc = "Used to dull pain."
Expand Down
9 changes: 9 additions & 0 deletions code/modules/surgery/surgery_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,15 @@
icon = 'icons/mob/silicon/robot_items.dmi'
icon_state = "toolkit_medborg_hemostat"

/obj/item/hemostat/tweezers
name = "tweezers"
desc = "Precision instrument for grasping small objects."
toolspeed = 1.5

/obj/item/hemostat/tweezers/Initialize(mapload)
. = ..()
transform = transform.Scale(0.5, 0.5)

/obj/item/cautery
name = "cautery"
desc = "This stops bleeding."
Expand Down
23 changes: 10 additions & 13 deletions code/modules/vending/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,23 @@
panel_type = "panel11"
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?;Ping!"
products = list(
/obj/item/reagent_containers/pill/patch/libital = 5,
/obj/item/reagent_containers/pill/patch/aiuri = 5,
/obj/item/reagent_containers/syringe/convermol = 2,
/obj/item/reagent_containers/pill/insulin = 5,
/obj/item/reagent_containers/cup/bottle/multiver = 2,
/obj/item/reagent_containers/cup/bottle/syriniver = 2,
/obj/item/reagent_containers/cup/bottle/epinephrine = 3,
/obj/item/reagent_containers/cup/bottle/morphine = 4,
/obj/item/reagent_containers/cup/bottle/multiver = 2,
/obj/item/reagent_containers/cup/bottle/potass_iodide = 1,
/obj/item/reagent_containers/cup/bottle/salglu_solution = 3,
/obj/item/reagent_containers/cup/bottle/syriniver = 2,
/obj/item/reagent_containers/cup/bottle/toxin = 3,
/obj/item/reagent_containers/syringe/antiviral = 6,
/obj/item/reagent_containers/medigel/libital = 2,
/obj/item/reagent_containers/medigel/aiuri = 2,
/obj/item/reagent_containers/medigel/libital = 2,
/obj/item/reagent_containers/medigel/sterilizine = 1,
)
contraband = list(
/obj/item/reagent_containers/pill/tox = 3,
/obj/item/reagent_containers/pill/morphine = 4,
/obj/item/reagent_containers/pill/multiver = 6,
/obj/item/reagent_containers/pill/insulin = 6,
/obj/item/reagent_containers/pill/mutadone/less = 3,
/obj/item/reagent_containers/pill/neurine = 3,
/obj/item/reagent_containers/pill/patch/aiuri = 5,
/obj/item/reagent_containers/pill/patch/libital = 5,
/obj/item/reagent_containers/syringe/antiviral = 6,
/obj/item/reagent_containers/syringe/convermol = 2,
)
premium = list(
/obj/item/reagent_containers/medigel/synthflesh = 2,
Expand Down
42 changes: 20 additions & 22 deletions maplestation_modules/code/datums/elements/temperature_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
src.pain_modifier_on_limb = pain_modifier_on_limb
src.temperature_change = temperature_change

RegisterSignal(target, COMSIG_ITEM_ATTACK_SECONDARY, PROC_REF(try_apply_to_limb))
RegisterSignal(target, COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY, PROC_REF(try_apply_to_limb))
RegisterSignal(target, COMSIG_ATOM_EXAMINE, PROC_REF(get_examine_text))

/datum/element/temperature_pack/Detach(obj/target)
. = ..()
UnregisterSignal(target, list(
COMSIG_ITEM_ATTACK_SECONDARY,
COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY,
COMSIG_ATOM_EXAMINE,
))

Expand All @@ -45,52 +45,50 @@
/**
* Try to apply [source] item onto [target] mob from [user].
*/
/datum/element/temperature_pack/proc/try_apply_to_limb(obj/item/source, atom/target, mob/user, params)
/datum/element/temperature_pack/proc/try_apply_to_limb(obj/item/source, mob/user, atom/target, params)
SIGNAL_HANDLER

. = SECONDARY_ATTACK_CALL_NORMAL // Normal operations
if(!isliving(target))
return NONE

if(!ishuman(target))
return

var/mob/living/carbon/human/target_mob = target
var/mob/living/target_mob = target
var/targeted_zone = target_mob.zone_selected

if(!target_mob.pain_controller)
return
return NONE
if(target_mob.stat == DEAD)
target_mob.balloon_alert(user, "[target_mob.p_theyre()] dead!")
return

. = SECONDARY_ATTACK_CONTINUE_CHAIN // Past this point, no afterattacks
return ITEM_INTERACT_BLOCKING

for(var/datum/status_effect/temperature_pack/pre_existing_effect in target_mob.status_effects)
if(pre_existing_effect.pressed_item == source)
return
return ITEM_INTERACT_BLOCKING // Already applying this item
if(pre_existing_effect.targeted_zone == targeted_zone)
target_mob.balloon_alert(user, "something's pressed there!")
return

. = SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN // And past THIS point, no attack
return ITEM_INTERACT_BLOCKING // Already an effect on this limb

INVOKE_ASYNC(src, PROC_REF(apply_to_limb), source, target, user, targeted_zone)
return ITEM_INTERACT_SUCCESS

/**
* Actually apply [parent] temperature pack to [targeted_zone] limb on [target] mob from [user].
*/
/datum/element/temperature_pack/proc/apply_to_limb(obj/item/parent, mob/living/carbon/target, mob/user, targeted_zone)
/datum/element/temperature_pack/proc/apply_to_limb(obj/item/parent, mob/living/target, mob/user, targeted_zone)
var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(targeted_zone)
if(!targeted_bodypart)
target.balloon_alert(user, "no [parse_zone(targeted_zone)]!")
return
if(!IS_ORGANIC_LIMB(targeted_bodypart))
target.balloon_alert(user, "not organic!")
return
if(!do_after(user, 0.5 SECONDS, target))
return

var/obj/item/bodypart/targeted_bodypart = target.get_bodypart(targeted_zone)
user.visible_message(
span_notice("[user] press [parent] against [target == user ? "[target.p_their()]" : "[target]'s" ] [targeted_bodypart.plaintext_zone]."),
span_notice("You press [parent] against [target == user ? "your" : "[target]'s" ] [targeted_bodypart.plaintext_zone].")
)

var/selected_effect = temperature_change > 0 \
? /datum/status_effect/temperature_pack/heat \
: /datum/status_effect/temperature_pack/cold
var/selected_effect = temperature_change > 0 ? /datum/status_effect/temperature_pack/heat : /datum/status_effect/temperature_pack/cold

target.apply_status_effect(
selected_effect,
Expand Down
Loading