Skip to content
Draft
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
12 changes: 8 additions & 4 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,14 @@
examine(user)
return TRUE

if (mods[ALT_CLICK])
var/turf/T = get_turf(src)
if(T && user.TurfAdjacent(T) && length(T.contents))
user.set_listed_turf(T)
if(mods[ALT_CLICK])

if(iscarbon(src))
return

var/turf/selected_tile = get_turf(src)
if(selected_tile && user.TurfAdjacent(selected_tile) && length(selected_tile.contents))
user.set_listed_turf(selected_tile)

return TRUE
return FALSE
Expand Down
55 changes: 37 additions & 18 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/mob/living/carbon/human/Initialize(mapload, new_species = null)
blood_type = pick(7;"O-", 38;"O+", 6;"A-", 34;"A+", 2;"B-", 9;"B+", 1;"AB-", 3;"AB+")
blood_type = pick(7;"O-", 38;"O+", 6;"A-", 34;"A+", 2;"B-", 9;"B+", 1;"AB-", 3;"AB+") // holy fuck, how did i actually miss this, not even i realized this while working on medical rework, im being genuine here
GLOB.human_mob_list += src
GLOB.alive_human_list += src
SShuman.processable_human_list += src
Expand All @@ -25,6 +25,14 @@
health_threshold_dead = -150
health_threshold_crit = -100

/mob/living/carbon/human/clicked(mob/user, list/mods)
if(..())
return TRUE
if(mods[ALT_CLICK] && ishuman(user))
check_for_injuries(user)
return TRUE
return FALSE

/mob/living/carbon/human/initialize_pass_flags(datum/pass_flags_container/PF)
..()
if (PF)
Expand Down Expand Up @@ -809,7 +817,9 @@
return

stethoscope.attack(src, user)

if(href_list["remove_splint"])
var/part_to_remove = href_list["remove_splint"]
remove_splints(user = usr, part = part_to_remove)
..()
return

Expand Down Expand Up @@ -1608,7 +1618,7 @@

// target = person whose splints are being removed
// user = person removing the splints
/mob/living/carbon/human/proc/remove_splints(mob/living/carbon/human/user)
/mob/living/carbon/human/proc/remove_splints(mob/living/carbon/human/user, part)
var/mob/living/carbon/human/target = src

if(!istype(user))
Expand All @@ -1627,9 +1637,10 @@
to_chat(user, SPAN_WARNING("You cannot remove splints without a hand."))
return
var/is_splint = FALSE
for(var/bodypart in list("l_leg","r_leg","l_arm","r_arm","r_hand","l_hand","r_foot","l_foot","chest","head","groin")) //check for any splints before do_after
var/obj/limb/l = target.get_limb(bodypart)
if(l && (l.status & LIMB_SPLINTED))
var/list/parts_to_check = part ? list(part) : list("l_leg","r_leg","l_arm","r_arm","r_hand","l_hand","r_foot","l_foot","chest","head","groin")
for(var/bodypart in parts_to_check) //check for any splints before do_after
var/obj/limb/limbus = target.get_limb(bodypart)
if(limbus && (limbus.status & LIMB_SPLINTED))
if(user == target)
if((bodypart in list("l_arm", "l_hand")) && (cur_hand == "l_hand"))
same_arm_side = TRUE
Expand All @@ -1642,10 +1653,16 @@

var/msg = "" // Have to use this because there are issues with the to_chat macros and text macros and quotation marks
if(is_splint)
if(user == target)
user.visible_message(SPAN_NOTICE("[user] starts to remove the [part ? "splint on their [target.get_limb(part).display_name]" : "splints"]."),
SPAN_NOTICE("You start to remove the [part ? "splint on your [target.get_limb(part).display_name]" : "splints"]."))
else
user.visible_message(SPAN_NOTICE("[user] starts to remove \the [target]'s [part ? "splint on their [target.get_limb(part).display_name]" : "splints"]."),
SPAN_NOTICE("You start to remove \the [target]'s [part ? "splint on their [target.get_limb(part).display_name]" : "splints"]."))
if(do_after(user, HUMAN_STRIP_DELAY * user.get_skill_duration_multiplier(SKILL_MEDICAL), INTERRUPT_ALL, BUSY_ICON_GENERIC, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
var/can_reach_splints = TRUE
var/can_reach_splints = TRUE // redundant now that the space suit thing is commented out, but i cba to remove it
var/amount_removed = 0
for(var/bodypart in list("l_leg","r_leg","l_arm","r_arm","r_hand","l_hand","r_foot","l_foot","chest","head","groin")) // make sure the splints still exist before removing
for(var/bodypart in parts_to_check) // make sure the splints still exist before removing
var/obj/limb/target_limb = target.get_limb(bodypart)
if(target_limb && (target_limb.status & LIMB_SPLINTED))
if(user == target)
Expand All @@ -1662,12 +1679,12 @@
else
to_chat(user, SPAN_WARNING("There are no splints to remove."))
return
if(wear_suit && istype(wear_suit,/obj/item/clothing/suit/space))
var/obj/item/clothing/suit/space/suit = target.wear_suit
if(LAZYLEN(suit.supporting_limbs))
msg = "[user == target ? "your":"\proper [target]'s"]"
to_chat(user, SPAN_WARNING("You cannot remove the splints, [msg] [suit] is supporting some of the breaks."))
can_reach_splints = FALSE
//if(wear_suit && istype(wear_suit,/obj/item/clothing/suit/space))
// var/obj/item/clothing/suit/space/suit = target.wear_suit
// if(LAZYLEN(suit.supporting_limbs))
// msg = "[user == target ? "your":"\proper [target]'s"]"
// to_chat(user, SPAN_WARNING("You cannot remove the splints, [msg] [suit] is supporting some of the breaks."))
// can_reach_splints = FALSE
if(can_reach_splints)
var/obj/item/stack/medical/splint/new_splint = new(user.loc)
new_splint.amount = 0 //we checked that we have at least one bodypart splinted, so we can create it no prob. Also we need amount to be 0
Expand All @@ -1687,12 +1704,14 @@
if(new_splint.amount == 0)
qdel(new_splint) //we only removed nano splints
msg = "[user == target ? "their own":"\proper [target]'s"]"
target.visible_message(SPAN_NOTICE("[user] removes [msg] [amount_removed>1 ? "splints":"splint"]."),
SPAN_NOTICE("Your [amount_removed>1 ? "splints are":"splint is"] removed."))
target.visible_message(SPAN_NOTICE("[user] removes [msg] [part ? "splint on their [target.get_limb(part).display_name]" : (amount_removed > 1 ? "splints" : "splint")]."),
SPAN_NOTICE("Your [part ? "splint on your [target.get_limb(part).display_name] is" : (amount_removed > 1 ? "splints are" : "splint is")] removed."))
target.update_med_icon()
user.put_in_hands(new_splint)
else if(user == target)
to_chat(user, SPAN_NOTICE("You stop trying to remove your [part ? "splint on your [target.get_limb(part).display_name]" : "splints"]."))
else
msg = "[user == target ? "your":"\proper [target]'s"]"
to_chat(user, SPAN_NOTICE("You stop trying to remove [msg] splints."))
to_chat(user, SPAN_NOTICE("You stop trying to remove \the [target]'s [part ? "splint on their [target.get_limb(part).display_name]" : "splints"]."))
else
if(same_arm_side)
to_chat(user, SPAN_WARNING("You need to use the opposite hand to remove the splints on your arm and hand!"))
Expand Down
73 changes: 47 additions & 26 deletions code/modules/mob/living/carbon/human/human_attackhand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

if(INTENT_GRAB)
if(attacking_mob == src)
check_for_injuries()
check_for_injuries(src)
return 1

if(anchored)
Expand Down Expand Up @@ -117,7 +117,7 @@

if(INTENT_DISARM)
if(attacking_mob == src)
check_for_injuries()
check_for_injuries(src)
return 1

attacking_mob.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [key_name(src)]</font>")
Expand Down Expand Up @@ -193,7 +193,7 @@
/mob/living/carbon/human/help_shake_act(mob/living/carbon/mob)
//Target is us
if(src == mob)
check_for_injuries()
check_for_injuries(src)
return

//Target is not us
Expand Down Expand Up @@ -245,21 +245,26 @@

playsound(loc, 'sound/weapons/thudswoosh.ogg', 25, 1, 7)

/mob/living/carbon/human/proc/check_for_injuries()
var/t_him = "it"
switch(gender)
if(MALE)
t_him = "him"
if(FEMALE)
t_him = "her"
if(PLURAL)
t_him = "them"
/mob/living/carbon/human/proc/check_for_injuries(mob/living/carbon/human/checker)
if(!checker)
return

visible_message(SPAN_NOTICE("[src] examines [t_him]self."),
SPAN_NOTICE("You check yourself for injuries."), null, 3)
if(checker == src) // this probably would be better off in a separate, universal proc so itll be easier for everyone involved i think
var/pronoun = "itself"
switch(gender)
if(MALE)
pronoun = "himself"
if(FEMALE)
pronoun = "herself"
if(PLURAL)
pronoun = "themself"
visible_message(SPAN_NOTICE("[src] examines [pronoun] for injuries."),
SPAN_NOTICE("You check yourself for injuries."), null, 3)
else
checker.visible_message(SPAN_NOTICE("[checker] examines [src]."), SPAN_NOTICE("You check [src] for injuries."), null, 3)

var/list/limb_message = list()
for(var/obj/limb/org in limbs)
for(var/obj/limb/org as anything in limbs)
var/list/status = list()
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
Expand Down Expand Up @@ -318,21 +323,37 @@
status += "OK"

var/postscript
if(org.status & LIMB_UNCALIBRATED_PROSTHETIC)
postscript += " (NONFUNCTIONAL)"
if(org.status & LIMB_BROKEN)
postscript += " (BROKEN)"
if(checker == src) // obviously it wont come off as obvious to other people, unless its dislocated or w/e
if(org.status & LIMB_UNCALIBRATED_PROSTHETIC)
postscript += " <b>(NONFUNCTIONAL)</b>"
if(org.status & LIMB_BROKEN)
postscript += " <b>(BROKEN)</b>"

if(org.status & LIMB_SPLINTED_INDESTRUCTIBLE)
postscript += " (NANOSPLINTED)"
postscript += " <b>(<a href='byond://?src=\ref[src];remove_splint=[org.name]'><span class='corp_label_red'>NANOSPLINTED</a>)</b>"
else if(org.status & LIMB_SPLINTED)
postscript += " (SPLINTED)"
postscript += " <b>(<a href='byond://?src=\ref[src];remove_splint=[org.name]'><span class='corp_label_red'>SPLINTED</a>)</b>"

//for(var/datum/effects/bleeding/arterial/art_bleed in org.bleeding_effects_list)
// postscript += " <b>It is bleeding profusely.</b>"
for(var/datum/effects/bleeding/internal/int_bleed in org.bleeding_effects_list)
postscript += " <b>The skin looks to be discolored.</b>"

//if(org.status & LIMB_DISLOCATED)
// postscript += " <b>(DISLOCATED)</b>" //href this to undislocate obviously with tarkovmed integrity
//if(org.status & LIMB_CONSTRICTED)
// postscript += " <b>(<a href='byond://?src=\ref[src];remove_tourniquet=[org.name]'><span class='corp_label_red'>CONSTRICTED</a>)</b>"
postscript = replacetext(postscript, " <b>The skin looks to be discolored.</b>", "")
postscript = replacetext(postscript, " <b>It is bleeding profusely.</b>", "")
if(org.status & LIMB_THIRD_DEGREE_BURNS)
postscript += " (SEVERE BURN)"
postscript += "<b>(SEVERE BURN)</b>"
if(org.status & LIMB_ESCHAR)
postscript += " (ESCHAR)"
postscript += " <b>(ESCHAR)</b>"


if(postscript)
limb_message += "\t My [org.display_name] is [SPAN_WARNING("[english_list(status, final_comma_text = ",")].[SPAN_BOLD(postscript)]")]"
limb_message += "\t [checker == src ? "My" : "[src]'s"] [org.display_name] is [SPAN_WARNING("[english_list(status, final_comma_text = ",")].[postscript]")]"
else
limb_message += "\t My [org.display_name] is [status[1] == "OK" ? SPAN_NOTICE("OK.") : SPAN_WARNING("[english_list(status, final_comma_text = ",")].")]"
to_chat(src, boxed_message(limb_message.Join("\n")))
limb_message += "\t [checker == src ? "My" : "[src]'s"] [org.display_name] is [status[1] == "OK" ? SPAN_NOTICE("OK.") : SPAN_WARNING("[english_list(status, final_comma_text = ",")].")]"
limb_message += "\t \n<span class = 'deptradio'>Medical actions: <a href='byond://?src=\ref[src];check_status=1'>\[Check Status\]</a>\n"
to_chat(checker, boxed_message(limb_message.Join("<br>")))