mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-17 13:42:44 +00:00
* Better notifications * Add buttons to del/move tabs in edit mode * Add a <span> to emotes * Fix duplicate IDs in VChat and add more logging * VChat: Redone chat output in Vue.js * Ported tg asset cache * VChat DME Update * Replace \image macro with bicon() * NanoUI Subsystem Fixes Don't do this, the asset subsystem does this for you * Allow narrate/globalnarrate shenanigans Allows HTML if your entire thing is HTML * Disable bicon() icon object cache, and create text tag cache * Ore Scanner is written incorrectly Only revealed by vchat * Fixes 2 VChat bugs * Underline links in VChat * Fix LOOC color * VChat Improvements Hopefully, anyway. - Arbitrary font size setting - Line height setting - Multiple crush settings - Rewrote how tabs work hopefully for performance - Hidden messages are actually put elsewhere - Attempts to correct chat backlog restore on rejoin * Surgery steps to use <span> * Some VChat Tweaks - Chat remains between client reconnects if your client didn't close (so things like using the reconnect button, or autoreconnects at round end when that feels like working) - The client doesn't send pings to the server, the server sends pings to the client. This fixes AFK measurements for AFK kick purposes. - Turn latency indicator into a green/red indicator to show if you're connected, and when clicked will perform a one-time ping (and block doing it again for 10 seconds). It will display '?ms' if it never got a reply, or '999ms' if it did, but it was over 1s. * Include date in filename for VChat log save * Merge pull request #6767 from Cyantime/patch-2 Change chat export naming scheme * Adds VChat tab saving Saves every time you enter/exit edit mode. Persists between rounds, VChat reloads via verb, etc. * Fix chat exporting when someone has used unicode Only affects clients still using 512 * Use CLIENT_FROM_VAR for ease of code reading * Update code/modules/client/asset_cache.dm Co-Authored-By: Novacat <35587478+Novacat@users.noreply.github.com> * Fix runtime when client disconnects before vchat loads * Fix polaris version of command reports * Fix LOOC color in oldchat * Put some styles in various adminpm messages * Round info and advanced who spans * Fix missing tag-end * Maybe fix images for linux and statpanel but also doom everyone Co-authored-by: ShadowLarkens <ShadowLarkens@users.noreply.github.com> Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
221 lines
11 KiB
Plaintext
221 lines
11 KiB
Plaintext
//Procedures in this file: Fracture repair surgery
|
|
//////////////////////////////////////////////////////////////////
|
|
// BONE SURGERY //
|
|
//////////////////////////////////////////////////////////////////
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
// Bone Glue Surgery
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
/datum/surgery_step/glue_bone
|
|
allowed_tools = list(
|
|
/obj/item/weapon/surgical/bonegel = 100
|
|
)
|
|
|
|
allowed_procs = list(IS_SCREWDRIVER = 75)
|
|
|
|
can_infect = 1
|
|
blood_level = 1
|
|
|
|
min_duration = 50
|
|
max_duration = 60
|
|
|
|
/datum/surgery_step/glue_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
if (!hasorgans(target))
|
|
return 0
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if(coverage_check(user, target, affected, tool))
|
|
return 0
|
|
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
|
|
|
/datum/surgery_step/glue_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if (affected.stage == 0)
|
|
user.visible_message("<span class='notice'>[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</span>" , \
|
|
"<span class='notice'>You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</span>")
|
|
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
|
..()
|
|
|
|
/datum/surgery_step/glue_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] applies some [tool] to [target]'s bone in [affected.name]</span>", \
|
|
"<span class='notice'>You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].</span>")
|
|
affected.stage = 1
|
|
|
|
/datum/surgery_step/glue_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='danger'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>" , \
|
|
"<span class='danger'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>")
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
// Bone Setting Surgery
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
/datum/surgery_step/set_bone
|
|
allowed_tools = list(
|
|
/obj/item/weapon/surgical/bonesetter = 100
|
|
)
|
|
|
|
allowed_procs = list(IS_WRENCH = 75)
|
|
|
|
min_duration = 60
|
|
max_duration = 70
|
|
|
|
/datum/surgery_step/set_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
if (!hasorgans(target))
|
|
return 0
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if(coverage_check(user, target, affected, tool))
|
|
return 0
|
|
return affected && affected.organ_tag != BP_HEAD && !(affected.robotic >= ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
|
|
|
|
/datum/surgery_step/set_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</span>" , \
|
|
"<span class='notice'>You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</span>")
|
|
target.custom_pain("The pain in your [affected.name] is going to make you pass out!", 50)
|
|
..()
|
|
|
|
/datum/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if (affected.status & ORGAN_BROKEN)
|
|
user.visible_message("<span class='notice'>[user] sets the bone in [target]'s [affected.name] in place with \the [tool].</span>", \
|
|
"<span class='notice'>You set the bone in [target]'s [affected.name] in place with \the [tool].</span>")
|
|
affected.stage = 2
|
|
else
|
|
user.visible_message("[user] sets the bone in [target]'s [affected.name]<span class='danger'> in the WRONG place with \the [tool].</span>", \
|
|
"You set the bone in [target]'s [affected.name]<span class='danger'> in the WRONG place with \the [tool].</span>")
|
|
affected.fracture()
|
|
|
|
/datum/surgery_step/set_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='danger'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>" , \
|
|
"<span class='danger'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>")
|
|
affected.createwound(BRUISE, 5)
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
// Skull Mending Surgery
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
/datum/surgery_step/mend_skull
|
|
allowed_tools = list(
|
|
/obj/item/weapon/surgical/bonesetter = 100
|
|
)
|
|
|
|
allowed_procs = list(IS_WRENCH = 75)
|
|
|
|
min_duration = 60
|
|
max_duration = 70
|
|
|
|
/datum/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
if (!hasorgans(target))
|
|
return 0
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if(coverage_check(user, target, affected, tool))
|
|
return 0
|
|
return affected && affected.organ_tag == BP_HEAD && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 1
|
|
|
|
/datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
user.visible_message("<span class='notice'>[user] is beginning to piece together [target]'s skull with \the [tool].</span>" , \
|
|
"<span class='notice'>You are beginning to piece together [target]'s skull with \the [tool].</span>")
|
|
..()
|
|
|
|
/datum/surgery_step/mend_skull/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] sets [target]'s skull with \the [tool].</span>" , \
|
|
"<span class='notice'>You set [target]'s skull with \the [tool].</span>")
|
|
affected.stage = 2
|
|
|
|
/datum/surgery_step/mend_skull/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='danger'>[user]'s hand slips, damaging [target]'s face with \the [tool]!</span>" , \
|
|
"<span class='danger'>Your hand slips, damaging [target]'s face with \the [tool]!</span>")
|
|
var/obj/item/organ/external/head/h = affected
|
|
h.createwound(BRUISE, 10)
|
|
h.disfigured = 1
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
// Bone Fixing Surgery
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
/datum/surgery_step/finish_bone
|
|
allowed_tools = list(
|
|
/obj/item/weapon/surgical/bonegel = 100
|
|
)
|
|
|
|
allowed_procs = list(IS_SCREWDRIVER = 75)
|
|
|
|
can_infect = 1
|
|
blood_level = 1
|
|
|
|
min_duration = 50
|
|
max_duration = 60
|
|
|
|
/datum/surgery_step/finish_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
if (!hasorgans(target))
|
|
return 0
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if(coverage_check(user, target, affected, tool))
|
|
return 0
|
|
return affected && affected.open >= 2 && !(affected.robotic >= ORGAN_ROBOT) && affected.stage == 2
|
|
|
|
/datum/surgery_step/finish_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</span>", \
|
|
"<span class='notice'>You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</span>")
|
|
..()
|
|
|
|
/datum/surgery_step/finish_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] has mended the damaged bones in [target]'s [affected.name] with \the [tool].</span>" , \
|
|
"<span class='notice'>You have mended the damaged bones in [target]'s [affected.name] with \the [tool].</span>" )
|
|
affected.status &= ~ORGAN_BROKEN
|
|
affected.stage = 0
|
|
|
|
/datum/surgery_step/finish_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='danger'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>" , \
|
|
"<span class='danger'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</span>")
|
|
|
|
///////////////////////////////////////////////////////////////
|
|
// Bone Clamp Surgery
|
|
///////////////////////////////////////////////////////////////
|
|
|
|
/datum/surgery_step/clamp_bone
|
|
allowed_tools = list(
|
|
/obj/item/weapon/surgical/bone_clamp = 100
|
|
)
|
|
|
|
can_infect = 1
|
|
blood_level = 1
|
|
|
|
min_duration = 70
|
|
max_duration = 90
|
|
|
|
/datum/surgery_step/clamp_bone/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
if (!hasorgans(target))
|
|
return 0
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if(coverage_check(user, target, affected, tool))
|
|
return 0
|
|
return affected && (affected.robotic < ORGAN_ROBOT) && affected.open >= 2 && affected.stage == 0
|
|
|
|
/datum/surgery_step/clamp_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
if (affected.stage == 0)
|
|
user.visible_message("<span class='notice'>[user] starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</span>" , \
|
|
"<span class='notice'>You starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</span>")
|
|
target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50)
|
|
..()
|
|
|
|
/datum/surgery_step/clamp_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='notice'>[user] sets the bone in [target]'s [affected.name] with \the [tool].</span>", \
|
|
"<span class='notice'>You sets [target]'s bone in [affected.name] with \the [tool].</span>")
|
|
affected.status &= ~ORGAN_BROKEN
|
|
|
|
/datum/surgery_step/clamp_bone/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
|
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
|
user.visible_message("<span class='danger'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>" , \
|
|
"<span class='danger'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</span>")
|
|
affected.createwound(BRUISE, 5) |