Merge pull request #6742 from VOREStation/aro-vchatspeed

VChat Improvements
This commit is contained in:
Novacat
2020-03-03 16:16:50 -05:00
committed by GitHub
13 changed files with 376 additions and 302 deletions
+32 -32
View File
@@ -31,21 +31,21 @@
/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("<font color='blue'>[user] starts applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
"<font color='blue'>You start applying medication to the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
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("<font color='blue'>[user] applies some [tool] to [target]'s bone in [affected.name]</font>", \
"<font color='blue'>You apply some [tool] to [target]'s bone in [affected.name] with \the [tool].</font>")
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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
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
@@ -71,26 +71,26 @@
/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("<font color='blue'>[user] is beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>" , \
"<font color='blue'>You are beginning to set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
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("<font color='blue'>[user] sets the bone in [target]'s [affected.name] in place with \the [tool].</font>", \
"<font color='blue'>You set the bone in [target]'s [affected.name] in place with \the [tool].</font>")
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]<font color='red'> in the WRONG place with \the [tool].</font>", \
"You set the bone in [target]'s [affected.name]<font color='red'> in the WRONG place with \the [tool].</font>")
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("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
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)
///////////////////////////////////////////////////////////////
@@ -116,20 +116,20 @@
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("<font color='blue'>[user] is beginning to piece together [target]'s skull with \the [tool].</font>" , \
"<font color='blue'>You are beginning to piece together [target]'s skull with \the [tool].</font>")
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("<font color='blue'>[user] sets [target]'s skull with \the [tool].</font>" , \
"<font color='blue'>You set [target]'s skull with \the [tool].</font>")
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("<font color='red'>[user]'s hand slips, damaging [target]'s face with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, damaging [target]'s face with \the [tool]!</font>")
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
@@ -161,21 +161,21 @@
/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("<font color='blue'>[user] starts to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You start to finish mending the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
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("<font color='blue'>[user] has mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
"<font color='blue'>You have mended the damaged bones in [target]'s [affected.name] with \the [tool].</font>" )
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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
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
@@ -203,19 +203,19 @@
/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("<font color='blue'>[user] starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>" , \
"<font color='blue'>You starts repairing the damaged bones in [target]'s [affected.name] with \the [tool].</font>")
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("<font color='blue'>[user] sets the bone in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You sets [target]'s bone in [affected.name] with \the [tool].</font>")
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("<font color='red'>[user]'s hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, damaging the bone in [target]'s [affected.name] with \the [tool]!</font>")
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)
+21 -21
View File
@@ -50,8 +50,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] has cut [target]'s [affected.encased] open with \the [tool].</font>", \
"<font color='blue'>You have cut [target]'s [affected.encased] open with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] has cut [target]'s [affected.encased] open with \the [tool].</span>", \
"<span class='notice'>You have cut [target]'s [affected.encased] open with \the [tool].</span>")
affected.open = 2.5
/datum/surgery_step/open_encased/saw/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -59,8 +59,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, cracking [target]'s [affected.encased] with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, cracking [target]'s [affected.encased] with \the [tool]!</span>" )
affected.createwound(CUT, 20)
affected.fracture()
@@ -100,8 +100,8 @@
if (!hasorgans(target))
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='blue'>[user] forces open [target]'s [affected.encased] with \the [tool].</font>"
var/self_msg = "<font color='blue'>You force open [target]'s [affected.encased] with \the [tool].</font>"
var/msg = "<span class='notice'>[user] forces open [target]'s [affected.encased] with \the [tool].</span>"
var/self_msg = "<span class='notice'>You force open [target]'s [affected.encased] with \the [tool].</span>"
user.visible_message(msg, self_msg)
affected.open = 3
@@ -111,8 +111,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='red'>[user]'s hand slips, cracking [target]'s [affected.encased]!</font>"
var/self_msg = "<font color='red'>Your hand slips, cracking [target]'s [affected.encased]!</font>"
var/msg = "<span class='danger'>[user]'s hand slips, cracking [target]'s [affected.encased]!</span>"
var/self_msg = "<span class='danger'>Your hand slips, cracking [target]'s [affected.encased]!</span>"
user.visible_message(msg, self_msg)
affected.createwound(BRUISE, 20)
@@ -154,8 +154,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='blue'>[user] bends [target]'s [affected.encased] back into place with \the [tool].</font>"
var/self_msg = "<font color='blue'>You bend [target]'s [affected.encased] back into place with \the [tool].</font>"
var/msg = "<span class='notice'>[user] bends [target]'s [affected.encased] back into place with \the [tool].</span>"
var/self_msg = "<span class='notice'>You bend [target]'s [affected.encased] back into place with \the [tool].</span>"
user.visible_message(msg, self_msg)
affected.open = 2.5
@@ -165,15 +165,15 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='red'>[user]'s hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
var/self_msg = "<font color='red'>Your hand slips, bending [target]'s [affected.encased] the wrong way!</font>"
var/msg = "<span class='danger'>[user]'s hand slips, bending [target]'s [affected.encased] the wrong way!</span>"
var/self_msg = "<span class='danger'>Your hand slips, bending [target]'s [affected.encased] the wrong way!</span>"
user.visible_message(msg, self_msg)
affected.createwound(BRUISE, 20)
affected.fracture()
/*if (prob(40)) //TODO: ORGAN REMOVAL UPDATE.
user.visible_message("<font color='red'> A rib pierces the lung!</font>")
user.visible_message("<span class='danger'> A rib pierces the lung!</span>")
target.rupture_lung()*/
///////////////////////////////////////////////////////////////
@@ -212,8 +212,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='blue'>[user] applied \the [tool] to [target]'s [affected.encased].</font>"
var/self_msg = "<font color='blue'>You applied \the [tool] to [target]'s [affected.encased].</font>"
var/msg = "<span class='notice'>[user] applied \the [tool] to [target]'s [affected.encased].</span>"
var/self_msg = "<span class='notice'>You applied \the [tool] to [target]'s [affected.encased].</span>"
user.visible_message(msg, self_msg)
affected.open = 2
@@ -252,8 +252,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] has cut [target]'s [affected.encased] wide open with \the [tool].</font>", \
"<font color='blue'>You have cut [target]'s [affected.encased] wide open with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] has cut [target]'s [affected.encased] wide open with \the [tool].</span>", \
"<span class='notice'>You have cut [target]'s [affected.encased] wide open with \the [tool].</span>")
affected.open = 3
/datum/surgery_step/open_encased/advancedsaw_open/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
@@ -261,8 +261,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
user.visible_message("<font color='red'>[user]'s hand slips, searing [target]'s [affected.encased] with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, searing [target]'s [affected.encased] with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, searing [target]'s [affected.encased] with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, searing [target]'s [affected.encased] with \the [tool]!</span>" )
affected.createwound(CUT, 20)
affected.createwound(BURN, 15)
@@ -302,8 +302,8 @@
return
var/obj/item/organ/external/affected = target.get_organ(target_zone)
var/msg = "<font color='blue'>[user] sealed \the [target]'s [affected.encased] with \the [tool].</font>"
var/self_msg = "<font color='blue'>You sealed \the [target]'s [affected.encased] with \the [tool].</font>"
var/msg = "<span class='notice'>[user] sealed \the [target]'s [affected.encased] with \the [tool].</span>"
var/self_msg = "<span class='notice'>You sealed \the [target]'s [affected.encased] with \the [tool].</span>"
user.visible_message(msg, self_msg)
affected.open = 2
+18 -18
View File
@@ -41,14 +41,14 @@
..()
/datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has cut open [target]'s face and neck with \the [tool].</font>" , \
"<font color='blue'> You have cut open[target]'s face and neck with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has cut open [target]'s face and neck with \the [tool].</span>" , \
"<span class='notice'> You have cut open[target]'s face and neck with \the [tool].</span>",)
target.op_stage.face = 1
/datum/surgery_step/generic/cut_face/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("<font color='red'>[user]'s hand slips, slicing [target]'s throat wth \the [tool]!</font>" , \
"<font color='red'>Your hand slips, slicing [target]'s throat wth \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, slicing [target]'s throat wth \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, slicing [target]'s throat wth \the [tool]!</span>" )
affected.createwound(CUT, 60)
target.AdjustLosebreath(10)
@@ -75,13 +75,13 @@
..()
/datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] mends [target]'s vocal cords with \the [tool].</font>", \
"<font color='blue'>You mend [target]'s vocal cords with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] mends [target]'s vocal cords with \the [tool].</span>", \
"<span class='notice'>You mend [target]'s vocal cords with \the [tool].</span>")
target.op_stage.face = 2
/datum/surgery_step/face/mend_vocal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='red'>[user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!</font>", \
"<font color='red'>Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, clamping [target]'s trachea shut for a moment with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, clamping [user]'s trachea shut for a moment with \the [tool]!</span>")
target.AdjustLosebreath(10)
///////////////////////////////////////////////////////////////
@@ -108,14 +108,14 @@
..()
/datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] pulls the skin on [target]'s face back in place with \the [tool].</font>", \
"<font color='blue'>You pull the skin on [target]'s face back in place with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] pulls the skin on [target]'s face back in place with \the [tool].</span>", \
"<span class='notice'>You pull the skin on [target]'s face back in place with \the [tool].</span>")
target.op_stage.face = 3
/datum/surgery_step/face/fix_face/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("<font color='red'>[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing skin on [target]'s face with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, tearing skin on [target]'s face with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing skin on [target]'s face with \the [tool]!</span>")
target.apply_damage(10, BRUTE, affected, sharp=1, sharp=1)
///////////////////////////////////////////////////////////////
@@ -137,14 +137,14 @@
return ..() && target.op_stage.face > 0
/datum/surgery_step/face/cauterize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>" , \
"<font color='blue'>You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] is beginning to cauterize the incision on [target]'s face and neck with \the [tool].</span>" , \
"<span class='notice'>You are beginning to cauterize the incision on [target]'s face and neck with \the [tool].</span>")
..()
/datum/surgery_step/face/cauterize/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("<font color='blue'>[user] cauterizes the incision on [target]'s face and neck with \the [tool].</font>", \
"<font color='blue'>You cauterize the incision on [target]'s face and neck with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] cauterizes the incision on [target]'s face and neck with \the [tool].</span>", \
"<span class='notice'>You cauterize the incision on [target]'s face and neck with \the [tool].</span>")
affected.open = 0
affected.status &= ~ORGAN_BLEEDING
if (target.op_stage.face == 3)
@@ -154,6 +154,6 @@
/datum/surgery_step/face/cauterize/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("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>", \
"<font color='red'>Your hand slips, leaving a small burn on [target]'s face with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, leaving a small burn on [target]'s face with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, leaving a small burn on [target]'s face with \the [tool]!</span>")
target.apply_damage(4, BURN, affected)
+36 -36
View File
@@ -53,8 +53,8 @@
/datum/surgery_step/generic/cut_open/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("<font color='blue'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have made an incision on [target]'s [affected.name] with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has made an incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have made an incision on [target]'s [affected.name] with \the [tool].</span>",)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
@@ -64,8 +64,8 @@
/datum/surgery_step/generic/cut_open/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("<font color='red'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>", \
"<font color='red'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, slicing open [target]'s [affected.name] in the wrong place with \the [tool]!</span>")
affected.createwound(CUT, 10)
///////////////////////////////////////////////////////////////
@@ -98,8 +98,8 @@
/datum/surgery_step/generic/cut_with_laser/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("<font color='blue'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has made a bloodless incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have made a bloodless incision on [target]'s [affected.name] with \the [tool].</span>",)
//Could be cleaner ...
affected.open = 1
@@ -109,8 +109,8 @@
/datum/surgery_step/generic/cut_with_laser/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("<font color='red'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips as the blade sputters, searing a long gash in [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(CUT, 7.5)
affected.createwound(BURN, 12.5)
@@ -142,8 +142,8 @@
/datum/surgery_step/generic/incision_manager/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("<font color='blue'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have constructed a prepared incision on and within [target]'s [affected.name] with \the [tool].</span>",)
affected.open = 1
if(istype(target) && target.should_have_organ(O_HEART))
@@ -155,8 +155,8 @@
/datum/surgery_step/generic/incision_manager/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("<font color='red'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand jolts as the system sparks, ripping a gruesome hole in [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(CUT, 20)
affected.createwound(BURN, 15)
@@ -188,15 +188,15 @@
/datum/surgery_step/generic/clamp_bleeders/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("<font color='blue'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] clamps bleeders in [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You clamp bleeders in [target]'s [affected.name] with \the [tool].</span>")
affected.organ_clamp()
spread_germs_to_organ(affected, user)
/datum/surgery_step/generic/clamp_bleeders/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("<font color='red'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</font>",)
user.visible_message("<span class='danger'>[user]'s hand slips, tearing blood vessals and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing blood vessels and causing massive bleeding in [target]'s [affected.name] with \the [tool]!</span>",)
affected.createwound(CUT, 10)
///////////////////////////////////////////////////////////////
@@ -235,27 +235,27 @@
/datum/surgery_step/generic/retract_skin/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)
var/msg = "<font color='blue'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</font>"
var/self_msg = "<font color='blue'>You keep the incision open on [target]'s [affected.name] with \the [tool].</font>"
var/msg = "<span class='notice'>[user] keeps the incision open on [target]'s [affected.name] with \the [tool].</span>"
var/self_msg = "<span class='notice'>You keep the incision open on [target]'s [affected.name] with \the [tool].</span>"
if (target_zone == BP_TORSO)
msg = "<font color='blue'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</font>"
self_msg = "<font color='blue'>You keep the ribcage open on [target]'s torso with \the [tool].</font>"
msg = "<span class='notice'>[user] keeps the ribcage open on [target]'s torso with \the [tool].</span>"
self_msg = "<span class='notice'>You keep the ribcage open on [target]'s torso with \the [tool].</span>"
if (target_zone == BP_GROIN)
msg = "<font color='blue'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</font>"
self_msg = "<font color='blue'>You keep the incision open on [target]'s lower abdomen with \the [tool].</font>"
msg = "<span class='notice'>[user] keeps the incision open on [target]'s lower abdomen with \the [tool].</span>"
self_msg = "<span class='notice'>You keep the incision open on [target]'s lower abdomen with \the [tool].</span>"
user.visible_message(msg, self_msg)
affected.open = 2
/datum/surgery_step/generic/retract_skin/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)
var/msg = "<font color='red'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
var/self_msg = "<font color='red'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</font>"
var/msg = "<span class='danger'>[user]'s hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</span>"
var/self_msg = "<span class='danger'>Your hand slips, tearing the edges of the incision on [target]'s [affected.name] with \the [tool]!</span>"
if (target_zone == BP_TORSO)
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</font>"
msg = "<span class='danger'>[user]'s hand slips, damaging several organs in [target]'s torso with \the [tool]!</span>"
self_msg = "<span class='danger'>Your hand slips, damaging several organs in [target]'s torso with \the [tool]!</span>"
if (target_zone == BP_GROIN)
msg = "<font color='red'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
self_msg = "<font color='red'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</font>"
msg = "<span class='danger'>[user]'s hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</span>"
self_msg = "<span class='danger'>Your hand slips, damaging several organs in [target]'s lower abdomen with \the [tool]!</span>"
user.visible_message(msg, self_msg)
target.apply_damage(12, BRUTE, affected, sharp=1)
@@ -288,16 +288,16 @@
/datum/surgery_step/generic/cauterize/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("<font color='blue'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] cauterizes the incision on [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You cauterize the incision on [target]'s [affected.name] with \the [tool].</span>")
affected.open = 0
affected.germ_level = 0
affected.status &= ~ORGAN_BLEEDING
/datum/surgery_step/generic/cauterize/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("<font color='red'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, leaving a small burn on [target]'s [affected.name] with \the [tool]!</span>")
target.apply_damage(3, BURN, affected)
///////////////////////////////////////////////////////////////
@@ -333,13 +333,13 @@
/datum/surgery_step/generic/amputate/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("<font color='blue'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</font>", \
"<font color='blue'>You amputate [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] amputates [target]'s [affected.name] at the [affected.amputation_point] with \the [tool].</span>", \
"<span class='notice'>You amputate [target]'s [affected.name] with \the [tool].</span>")
affected.droplimb(1,DROPLIMB_EDGE)
/datum/surgery_step/generic/amputate/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("<font color='red'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, sawing through the bone in [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, sawwing through the bone in [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(CUT, 30)
affected.fracture()
+20 -20
View File
@@ -37,8 +37,8 @@
/datum/surgery_step/cavity/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("<font color='red'>[user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(CUT, 20)
///////////////////////////////////////////////////////////////
@@ -70,8 +70,8 @@
/datum/surgery_step/cavity/make_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</font>", \
"<font color='blue'>You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</font>" )
user.visible_message("<span class='notice'>[user] makes some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</span>", \
"<span class='notice'>You make some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].</span>" )
///////////////////////////////////////////////////////////////
// Cavity Closing Surgery
@@ -104,8 +104,8 @@
/datum/surgery_step/cavity/close_space/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>", \
"<font color='blue'> You mend[target]'s [get_cavity(affected)] cavity walls with \the [tool].</font>" )
user.visible_message("<span class='notice'>[user] mends [target]'s [get_cavity(affected)] cavity walls with \the [tool].</span>", \
"<span class='notice'> You mend[target]'s [get_cavity(affected)] cavity walls with \the [tool].</span>" )
///////////////////////////////////////////////////////////////
// Item Implantation Surgery
@@ -133,18 +133,18 @@
/datum/surgery_step/cavity/place_item/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("<font color='blue'>[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
"<font color='blue'>You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" ) //Nobody will probably ever see this, but I made these two blue. ~CK
user.visible_message("<span class='notice'>[user] starts putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>", \
"<span class='notice'>You start putting \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>" ) //Nobody will probably ever see this, but I made these two blue. ~CK
target.custom_pain("The pain in your chest is living hell!",1)
..()
/datum/surgery_step/cavity/place_item/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/chest/affected = target.get_organ(target_zone)
user.visible_message("<font color='blue'>[user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>", \
"<font color='blue'>You put \the [tool] inside [target]'s [get_cavity(affected)] cavity.</font>" )
user.visible_message("<span class='notice'>[user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>", \
"<span class='notice'>You put \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>" )
if (tool.w_class > get_max_wclass(affected)/2 && prob(50) && (affected.robotic < ORGAN_ROBOT))
to_chat(user, "<font color='red'> You tear some blood vessels trying to fit such a big object in this cavity.</font>")
to_chat(user, "<span class='danger'> You tear some blood vessels trying to fit such a big object in this cavity.</span>")
var/datum/wound/internal_bleeding/I = new (10)
affected.wounds += I
affected.owner.custom_pain("You feel something rip in your [affected.name]!", 1)
@@ -179,8 +179,8 @@
/datum/surgery_step/cavity/implant_removal/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("<font color='blue'>[user] starts poking around inside [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You start poking around inside [target]'s [affected.name] with \the [tool].</font>" )
user.visible_message("<span class='notice'>[user] starts poking around inside [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You start poking around inside [target]'s [affected.name] with \the [tool].</span>" )
target.custom_pain("The pain in your [affected.name] is living hell!",1)
..()
@@ -203,8 +203,8 @@
find_prob +=50
if (prob(find_prob))
user.visible_message("<font color='blue'>[user] takes something out of incision on [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='blue'>You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]!</font>" )
user.visible_message("<span class='notice'>[user] takes something out of incision on [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='notice'>You take [obj] out of incision on [target]'s [affected.name]s with \the [tool]!</span>" )
affected.implants -= obj
BITSET(target.hud_updateflag, IMPLOYAL_HUD)
@@ -226,11 +226,11 @@
imp.implanted = 0
else if(istype(tool,/obj/item/device/nif)){var/obj/item/device/nif/N = tool;N.unimplant(target)} //VOREStation Add - NIF support
else
user.visible_message("<font color='blue'>[user] removes \the [tool] from [target]'s [affected.name].</font>", \
"<font color='blue'>There's something inside [target]'s [affected.name], but you just missed it this time.</font>" )
user.visible_message("<span class='notice'>[user] removes \the [tool] from [target]'s [affected.name].</span>", \
"<span class='notice'>There's something inside [target]'s [affected.name], but you just missed it this time.</span>" )
else
user.visible_message("<font color='blue'>[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.</font>", \
"<font color='blue'>You could not find anything inside [target]'s [affected.name].</font>" )
user.visible_message("<span class='notice'>[user] could not find anything inside [target]'s [affected.name], and pulls \the [tool] out.</span>", \
"<span class='notice'>You could not find anything inside [target]'s [affected.name].</span>" )
/datum/surgery_step/cavity/implant_removal/fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
..()
@@ -240,7 +240,7 @@
fail_prob += 100 - tool_quality(tool)
if (prob(fail_prob))
var/obj/item/weapon/implant/imp = affected.implants[1]
user.visible_message("<font color='red'> Something beeps inside [target]'s [affected.name]!</font>")
user.visible_message("<span class='danger'> Something beeps inside [target]'s [affected.name]!</span>")
playsound(imp.loc, 'sound/items/countdown.ogg', 75, 1, -3)
spawn(25)
imp.activate()
+24 -24
View File
@@ -41,14 +41,14 @@
..()
/datum/surgery_step/brainstem/mend_vessels/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has mended the blood vessels on [target]'s brainstem with \the [tool].</font>" , \
"<font color='blue'> You have mended the blood vessels on [target]'s brainstem with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has mended the blood vessels on [target]'s brainstem with \the [tool].</span>" , \
"<span class='notice'> You have mended the blood vessels on [target]'s brainstem with \the [tool].</span>",)
target.op_stage.brainstem = 1
/datum/surgery_step/brainstem/mend_vessels/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("<font color='red'>[user]'s hand slips, tearing at [target]'s brainstem with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, tearing at [target]'s brainstem with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, tearing at [target]'s brainstem with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, tearing at [target]'s brainstem with \the [tool]!</span>" )
affected.createwound(PIERCE, 10)
target.AdjustParalysis(10)
@@ -79,16 +79,16 @@
/datum/surgery_step/brainstem/drill_vertebrae/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("<font color='blue'>[user] has drilled around [target]'s brainstem with \the [tool].</font>" , \
"<font color='blue'> You have drilled around [target]'s brainstem with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has drilled around [target]'s brainstem with \the [tool].</span>" , \
"<span class='notice'> You have drilled around [target]'s brainstem with \the [tool].</span>",)
target.AdjustParalysis(10) //We're getting Invasive here. This only ticks down when the person is alive, so it's a good side-effect for this step. Rattling the braincase with a drill is not optimal.
target.op_stage.brainstem = 2
affected.fracture() //Does not apply damage, simply breaks it if it wasn't already. Doesn't stop a defib on its own.
/datum/surgery_step/brainstem/drill_vertebrae/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("<font color='red'>[user]'s hand slips, shredding [target]'s brainstem with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, shredding [target]'s brainstem with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, shredding [target]'s brainstem with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, shredding [target]'s brainstem with \the [tool]!</span>" )
affected.createwound(PIERCE, 10)
target.AdjustParalysis(15)
spawn()
@@ -119,15 +119,15 @@
..()
/datum/surgery_step/brainstem/clean_chips/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has cleaned around [target]'s brainstem with \the [tool].</font>" , \
"<font color='blue'> You have cleaned around [target]'s brainstem with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has cleaned around [target]'s brainstem with \the [tool].</span>" , \
"<span class='notice'> You have cleaned around [target]'s brainstem with \the [tool].</span>",)
target.AdjustParalysis(10) //Still invasive.
target.op_stage.brainstem = 3
/datum/surgery_step/brainstem/clean_chips/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("<font color='red'>[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, gouging [target]'s brainstem with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, gouging [target]'s brainstem with \the [tool]!</span>" )
affected.createwound(CUT, 5)
target.AdjustParalysis(10)
spawn()
@@ -158,16 +158,16 @@
..()
/datum/surgery_step/brainstem/mend_cord/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has fused [target]'s spinal cord with \the [tool].</font>" , \
"<font color='blue'> You have fused [target]'s spinal cord with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has fused [target]'s spinal cord with \the [tool].</span>" , \
"<span class='notice'> You have fused [target]'s spinal cord with \the [tool].</span>",)
target.op_stage.brainstem = 4
target.AdjustParalysis(5)
target.add_modifier(/datum/modifier/franken_sickness, 20 MINUTES)
/datum/surgery_step/brainstem/mend_cord/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("<font color='red'>[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, tearing at [target]'s spinal cord with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, tearing at [target]'s spinal cord with \the [tool]!</span>" )
affected.createwound(PIERCE, 5)
target.AdjustParalysis(20)
spawn()
@@ -197,15 +197,15 @@
..()
/datum/surgery_step/brainstem/mend_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has mended [target]'s vertebrae with \the [tool].</font>" , \
"<font color='blue'> You have mended [target]'s vertebrae with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has mended [target]'s vertebrae with \the [tool].</span>" , \
"<span class='notice'> You have mended [target]'s vertebrae with \the [tool].</span>",)
target.can_defib = 1
target.op_stage.brainstem = 5
/datum/surgery_step/brainstem/mend_vertebrae/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("<font color='red'>[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, tearing at [target]'s spinal cord with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, tearing at [target]'s spinal cord with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, tearing at [target]'s spinal cord with \the [tool]!</span>" )
affected.createwound(PIERCE, 5)
target.AdjustParalysis(15)
spawn()
@@ -236,15 +236,15 @@
..()
/datum/surgery_step/brainstem/realign_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] has realigned the tissues in [target]'s skull back into place with \the [tool].</font>" , \
"<font color='blue'> You have realigned the tissues in [target]'s skull back into place with \the [tool].</font>",)
user.visible_message("<span class='notice'>[user] has realigned the tissues in [target]'s skull back into place with \the [tool].</span>" , \
"<span class='notice'> You have realigned the tissues in [target]'s skull back into place with \the [tool].</span>",)
target.AdjustParalysis(5) //I n v a s i v e
target.op_stage.brainstem = 0 //The cycle begins anew.
/datum/surgery_step/brainstem/realign_tissue/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("<font color='red'>[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!</font>" , \
"<font color='red'>Your hand slips, gouging [target]'s brainstem with \the [tool]!</font>" )
user.visible_message("<span class='danger'>[user]'s hand slips, gouging [target]'s brainstem with \the [tool]!</span>" , \
"<span class='danger'>Your hand slips, gouging [target]'s brainstem with \the [tool]!</span>" )
affected.createwound(CUT, 5)
target.AdjustParalysis(30)
spawn()
+12 -12
View File
@@ -43,8 +43,8 @@
/datum/surgery_step/fix_vein/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("<font color='blue'>[user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have patched the damaged vein in [target]'s [affected.name] with \the [tool].</span>")
for(var/datum/wound/W in affected.wounds) if(W.internal)
affected.wounds -= W
@@ -53,8 +53,8 @@
/datum/surgery_step/fix_vein/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("<font color='red'>[user]'s hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>" , \
"<font color='red'>Your hand slips, smearing [tool] in the incision in [target]'s [affected.name]!</font>")
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>")
affected.take_damage(5, 0)
///////////////////////////////////////////////////////////////
@@ -96,14 +96,14 @@
/datum/surgery_step/fix_dead_tissue/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("<font color='blue'>[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>", \
"<font color='blue'>You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] has cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</span>", \
"<span class='notice'>You have cut away necrotic tissue in [target]'s [affected.name] with \the [tool].</span>")
affected.open = 3
/datum/surgery_step/fix_dead_tissue/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("<font color='red'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>", \
"<font color='red'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, slicing an artery inside [target]'s [affected.name] with \the [tool]!</span>")
affected.createwound(CUT, 20, 1)
///////////////////////////////////////////////////////////////
@@ -164,8 +164,8 @@
affected.status &= ~ORGAN_DEAD
affected.owner.update_icons_body()
user.visible_message("<font color='blue'>[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name].</font>", \
"<font color='blue'>You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</font>")
user.visible_message("<span class='notice'>[user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name].</span>", \
"<span class='notice'>You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].</span>")
/datum/surgery_step/treat_necrosis/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)
@@ -177,8 +177,8 @@
var/trans = container.reagents.trans_to_mob(target, container.amount_per_transfer_from_this, CHEM_BLOOD)
user.visible_message("<font color='red'>[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>" , \
"<font color='red'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</span>" , \
"<span class='danger'>Your hand slips, applying [trans] units of the solution to the wrong place in [target]'s [affected.name] with the [tool]!</span>")
//no damage or anything, just wastes medicine
+12 -12
View File
@@ -29,13 +29,13 @@
"You start cutting through [target]'s flesh with \the [tool].")
/datum/surgery_step/slime/cut_flesh/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] cuts through [target]'s flesh with \the [tool].</font>", \
"<font color='blue'>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</font>")
user.visible_message("<span class='notice'>[user] cuts through [target]'s flesh with \the [tool].</span>", \
"<span class='notice'>You cut through [target]'s flesh with \the [tool], revealing its silky innards.</span>")
target.core_removal_stage = 1
/datum/surgery_step/slime/cut_flesh/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing [target]'s flesh with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, tearing [target]'s flesh with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing [target]'s flesh with \the [tool]!</span>")
@@ -57,13 +57,13 @@
"You start cutting [target]'s silky innards apart with \the [tool].")
/datum/surgery_step/slime/cut_innards/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='blue'>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</font>", \
"<font color='blue'>You cut [target]'s innards apart with \the [tool], exposing the cores.</font>")
user.visible_message("<span class='notice'>[user] cuts [target]'s innards apart with \the [tool], exposing the cores.</span>", \
"<span class='notice'>You cut [target]'s innards apart with \the [tool], exposing the cores.</span>")
target.core_removal_stage = 2
/datum/surgery_step/slime/cut_innards/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
user.visible_message("<font color='red'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</font>", \
"<font color='red'>Your hand slips, tearing [target]'s innards with \the [tool]!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, tearing [target]'s innards with \the [tool]!</span>", \
"<span class='danger'>Your hand slips, tearing [target]'s innards with \the [tool]!</span>")
@@ -85,8 +85,8 @@
/datum/surgery_step/slime/saw_core/end_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
target.cores--
user.visible_message("<font color='blue'>[user] cuts out one of [target]'s cores with \the [tool].</font>",, \
"<font color='blue'>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</font>")
user.visible_message("<span class='notice'>[user] cuts out one of [target]'s cores with \the [tool].</span>",, \
"<span class='notice'>You cut out one of [target]'s cores with \the [tool]. [target.cores] cores left.</span>")
if(target.cores >= 0)
new target.coretype(target.loc)
@@ -96,5 +96,5 @@
/datum/surgery_step/slime/saw_core/fail_step(mob/living/user, mob/living/simple_mob/slime/target, target_zone, obj/item/tool)
var/datum/gender/T = gender_datums[user.get_visible_gender()]
user.visible_message("<font color='red'>[user]'s hand slips, causing [T.him] to miss the core!</font>", \
"<font color='red'>Your hand slips, causing you to miss the core!</font>")
user.visible_message("<span class='danger'>[user]'s hand slips, causing [T.him] to miss the core!</span>", \
"<span class='danger'>Your hand slips, causing you to miss the core!</span>")
+7 -20
View File
@@ -31,6 +31,11 @@ body.inverted {
cursor: pointer;
}
.inputbox {
width: 5em !important;
padding: 0.1em !important;
}
.icon-left-open-outline:hover, .icon-right-open-outline:hover, .icon-cancel-circled-outline:hover {
color: red;
}
@@ -46,25 +51,6 @@ body.inverted {
}
}
/* The chat message display classes */
#messagebox div { display: none; } /* Hide messages by default */
#messagebox.vc_showall div { display: block; } /* Unless we have vc_showall */
#messagebox.vc_localchat .vc_localchat { display: block; }
#messagebox.vc_radio .vc_radio { display: block; }
#messagebox.vc_warnings .vc_warnings { display: block; }
#messagebox.vc_info .vc_info { display: block; }
#messagebox.vc_deadchat .vc_deadchat { display: block; }
#messagebox.vc_globalooc .vc_globalooc { display: block; }
#messagebox.vc_looc .vc_looc { display: block; }
#messagebox.vc_adminpm .vc_adminpm { display: block; }
#messagebox.vc_adminchat .vc_adminchat { display: block; }
#messagebox.vc_modchat .vc_modchat { display: block; }
#messagebox.vc_eventchat .vc_eventchat { display: block; }
#messagebox.vc_system .vc_system { display: block; }
#messagebox.vc_nif .vc_nif { display: block; } /* VOREStation Add */
/* SS13 Styles */
#messagebox {font-family: Verdana, sans-serif;}
@@ -188,7 +174,7 @@ h1.alert, h2.alert {color: #000000;}
img.icon {vertical-align: middle; max-height: 1em;}
img.icon.bigicon {max-height: 32px;}
/* Zoom levels */
/* Zoom levels - Replaced with arbitrary font sizes
.zoom_normal {
font-size: 0.9em;
line-height: 1.35;
@@ -201,6 +187,7 @@ img.icon.bigicon {max-height: 32px;}
font-size: 0.8em;
line-height: 1.2;
}
*/
/* Debug Logs */
.debug_error {color:#FF0000; font-weight:bold}
+59 -38
View File
@@ -21,11 +21,11 @@
<p>VChat is still loading. If you see this for a very long time, try the OOC 'Reload VChat' verb, or reconnecting.</p>
<p>Sometimes if you're still caching resources, it will take longer than usual.</p>
</div>
<div id="app" @mouseup="on_mouseup" style="display: none;">
<div id="app" @mouseup="on_mouseup" style="display: none;" :class="{ inverted: inverted }">
<!-- Top menu -->
<div id="topmenu" class="ui top fixed menu" :class="{ inverted: inverted }">
<div v-for="(tab,index) in tabs" class="item" :class="{ active: tab.active, inverted: inverted }" @click="switchtab(tab)" @click.ctrl="editmode">
<div v-for="(tab,index) in tabs" class="item" :class="{ active: tab.active }" @click="switchtab(tab)" @click.ctrl="editmode">
<i v-show="editing && !tab.immutable && index >= 2" class="icon-left-open-outline" @click.stop.prevent="movetab(tab,-1)" title="Move tab left"></i>
{{tab.name}}
<i v-show="editing && !tab.immutable" class="icon-cancel-circled-outline" @click.stop.prevent="deltab(tab)" title="Delete tab"></i>
@@ -34,11 +34,11 @@
</div>
<div class="right menu">
<div class="item" :class="{ inverted: inverted }" @click="newtab" title="New Tab"><i class="icon-folder-add"></i></div>
<div class="item" :class="{ inverted: inverted }" @click="pause" title="Pause Autoscroll">
<div class="item" @click="newtab" title="New Tab"><i class="icon-folder-add"></i></div>
<div class="item" @click="pause" title="Pause Autoscroll">
<i class="icon-pause-outline" :class="{ blinkwarn: paused }"></i>
</div>
<div class="item" :class="{ inverted: inverted }" @click="editmode" title="Edit Mode">
<div class="item" @click="editmode" title="Edit Mode">
<i class="icon-cog-outline" :class="{ blinkwarn: editing }"></i>
</div>
<div class="item"><span class="ui circular label" title="VChat Latency (Not exactly network latency)" :class="ping_classes">{{latency}}ms</span></div>
@@ -49,7 +49,7 @@
<!-- Editor box -->
<div id="contentbox">
<div v-show="editing" id="editbox" class="ui segment" :class="{ inverted: inverted }">
<div class="ui internally celled grid">
<div class="ui internally celled grid" :class="{ inverted: inverted }">
<div class="row">
<div class="sixteen wide column">
<div class="ui center aligned header" :class="{ inverted: inverted }">
@@ -67,9 +67,9 @@
<h5>Messages to display:</h5>
<div class="ui form">
<div class="grouped fields">
<div class="field" v-for="type in type_table">
<div class="field" v-for="type in type_table" :title="type.tooltip">
<div v-show="!type.admin || is_admin" class="ui slider checkbox" :class="{ inverted: inverted, disabled: type.required || active_tab.immutable, checked: type.required || active_tab.immutable }">
<input type="checkbox" id="type.becomes" :value="type.becomes" v-model="active_tab.classes" :disabled="type.required || active_tab.immutable" :checked="type.required || active_tab.immutable"><label :for="type.becomes">{{type.pretty}}</label>
<input type="checkbox" id="type.becomes" :value="type.becomes" v-model="active_tab.categories" :disabled="type.required || active_tab.immutable" :checked="type.required || active_tab.immutable"><label :for="type.becomes">{{type.pretty}}</label>
</div>
</div>
</div>
@@ -78,6 +78,7 @@
</div>
<div class="eight wide column">
<h3>Global Settings</h3>
<p>Clicking anywhere in VChat saves your settings.</p>
<div class="ui form" :class="{ inverted: inverted }">
<div class="grouped fields">
<div class="field">
@@ -85,11 +86,6 @@
<input type="checkbox" id="darkmode" v-model="inverted"><label for="darkmode">Dark Mode</label>
</div>
</div>
<div class="field">
<div class="ui slider checkbox" :class="{ inverted: inverted }">
<input type="checkbox" id="combining" v-model="crushing"><label for="combining">Combine Messages</label>
</div>
</div>
<div class="field">
<div class="ui slider checkbox" :class="{ inverted: inverted }">
<input type="checkbox" id="combining" v-model="animated"><label for="animated">Animate Messages</label>
@@ -97,57 +93,82 @@
</div>
</div>
<div class="inline fields">
<label>Font Size</label>
<div class="field">
<label>Combine Messages</label>
<div class="field" title="Combine no messages together.">
<div class="ui radio checkbox">
<input type="radio" id="fssmall" name="fontsize" v-model="fontsize" value="zoom_less">
<label for="fssmall">Small</label>
<input type="radio" id="cnone" name="crushing" v-model.number="crushing" value="0">
<label for="cnone">None</label>
</div>
</div>
<div class="field">
<div class="field" title="Try to combine the newest and last message.">
<div class="ui radio checkbox">
<input type="radio" id="fsstd" name="fontsize" v-model="fontsize" value="zoom_normal">
<label for="fsstd">Standard</label>
<input type="radio" id="cone" name="crushing" v-model.number="crushing" value="1">
<label for="cone">One</label>
</div>
</div>
<div class="field">
<div class="field" title="Try to combine the newest and last 3 messages.">
<div class="ui radio checkbox">
<input type="radio" id="fslarge" name="fontsize" v-model="fontsize" value="zoom_more">
<label for="fslarge">Large</label>
<input type="radio" id="cthree" name="crushing" v-model.number="crushing" value="3">
<label for="cthree">Three</label>
</div>
</div>
</div>
<div class="inline fields">
<div class="field">
<label># Shown Messages</label>
<input :class="{ inverted: inverted }" type="number" name="showingnum" placeholder="200" title="Will affect performance!" v-model.lazy.number="showingnum" required style="width: 5em; padding: 0.1em;">
<div class="field" title="Font size (Min 0.2, Max 5, Default 0.9)">
<label>Font Scale</label>
<input class="inputbox" type="number" name="fontsize" placeholder="0.9" v-model.lazy.number="fontsize" required>
</div>
</div>
<div class="inline fields">
<div class="field" title="Line height % (Min 100, Max 200, Default 130)">
<label>Line Height %</label>
<input class="inputbox" type="number" name="lineheight" placeholder="130" v-model.lazy.number="lineheight" required>
</div>
</div>
<div class="inline fields">
<div class="field" title="Hides messages for performance (Min 50, Max 2000, Default 200)">
<label># Stored Messages</label>
<input class="inputbox" type="number" name="showingnum" placeholder="200" v-model.lazy.number="showingnum" required>
</div>
</div>
</div>
<button class="ui button" :class="{ inverted: inverted }" @click="save_chatlog">Export Chatlog</button>
<button class="ui button" @click="save_chatlog">Export Chatlog</button>
</div>
</div>
</div>
</div>
<!-- Messages box -->
<div v-show="!editing" id="messagebox" class="ui segment" :class="active_classes" @click="click_message">
<div v-show="messages.length > showingnum" class="vc_system">
<span class='notice'>[ {{messages.length - showingnum}} previous messages hidden due to display settings. ]</span>
</div>
<div v-show="!editing" id="messagebox" class="ui segment" @click="click_message" :class="{ inverted: inverted }" :style="{fontSize: fontsize+'em', lineHeight: lineheight+'%'}">
<transition-group name="msgsanim" tag="span" :css="animated">
<div v-for="message in shown_messages" :class="[message.category, fontsize]" :key="message.id">
<span v-html="message.content"></span>
<span v-show="message.repeats > 1" class="ui grey circular label">x{{message.repeats}}</span>
</div>
<!-- We're filtering -->
<template v-if="current_categories.length">
<div v-show="unshown_messages > 0" key="hidewarn1"><span class='notice'>[ {{unshown_messages}} previous messages archived for performance. ]</span></div>
<div v-for="message in shown_messages" :key="message.id">
<span v-html="message.content"></span>
<span v-show="message.repeats > 1" class="ui grey circular label">x{{message.repeats}}</span>
</div>
</template>
<!-- We're not filtering, messages go directly to dom -->
<template v-else>
<div v-show="archived_messages.length > 0" key="hidewarn2"><span class='notice'>[ {{archived_messages.length}} previous messages archived for performance. ]</span></div>
<div v-for="message in messages" :key="message.id">
<span v-html="message.content"></span>
<span v-show="message.repeats > 1" class="ui grey circular label">x{{message.repeats}}</span>
</div>
</template>
</transition-group>
</div>
</div>
<!--
Tab: {{active_tab}}<br>
Classes: {{active_classes}}<br>
Fontsize: {{fontsize}}<br>
<div class="ui segment">
active_tab: {{active_tab}}<br>
current_categories: {{current_categories}}<br>
messages.length: {{messages.length}}<br>
archived_messages.length: {{archived_messages.length}}<br>
shown_messages.length: {{shown_messages.length}}<br>
</div>
-->
+129 -61
View File
@@ -24,10 +24,10 @@
//Options for vchat
var vchat_opts = {
crush_messages: 3, //How many messages back should we try to combine if crushing is on
pingThisOften: 10000, //ms
pingDropsAllowed: 2,
cookiePrefix: "vst-" //If you're another server, you can change this if you want.
cookiePrefix: "vst-", //If you're another server, you can change this if you want.
alwaysShow: ["vc_looc", "vc_system"] //Categories to always display on every tab
};
var DARKMODE_COLORS = {
@@ -115,10 +115,12 @@ function start_vue() {
el: '#app',
data: {
messages: [], //List o messages from byond
shown_messages: [], //Used on filtered tabs, but not "Main" because it has 0len categories list, which bypasses filtering for speed
unshown_messages: 0, //How many messages in archive would be shown but aren't
archived_messages: [], //Too old to show
tabs: [ //Our tabs
{name: "Main", classes: ["vc_showall"], immutable: true, active: true}
{name: "Main", categories: [], immutable: true, active: true}
],
always_show: ["vc_looc", "vc_system"], //Classes to always display on every tab
unread_messages: {}, //Message categories that haven't been looked at since we got one of them
editing: false, //If we're in settings edit mode
paused: false, //Autoscrolling
@@ -128,17 +130,19 @@ function start_vue() {
//Settings
inverted: false, //Dark mode
crushing: true, //Combine similar messages
crushing: 3, //Combine similar messages
animated: false, //Small CSS animations for new messages
fontsize: 0.9, //Font size nudging
lineheight: 130,
showingnum: 200, //How many messages to show
animated: true, //Small CSS animations for new messages
fontsize: "zoom_normal", //Font size nudging
//The table to map game css classes to our vchat classes
//The table to map game css classes to our vchat categories
type_table: [
{
matches: ".say, .emote",
becomes: "vc_localchat",
pretty: "Local Chat",
tooltip: "In-character local messages (say, emote, etc)",
required: false,
admin: false
},
@@ -146,6 +150,7 @@ function start_vue() {
matches: ".alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster",
becomes: "vc_radio",
pretty: "Radio Comms",
tooltip: "All departments of radio messages",
required: false,
admin: false
},
@@ -153,6 +158,7 @@ function start_vue() {
matches: ".notice, .adminnotice, .info, .sinister, .cult",
becomes: "vc_info",
pretty: "Notices",
tooltip: "Non-urgent messages from the game and items",
required: false,
admin: false
},
@@ -160,6 +166,7 @@ function start_vue() {
matches: ".critical, .danger, .userdanger, .warning, .italics",
becomes: "vc_warnings",
pretty: "Warnings",
tooltip: "Urgent messages from the game and items",
required: false,
admin: false
},
@@ -167,6 +174,7 @@ function start_vue() {
matches: ".deadsay",
becomes: "vc_deadchat",
pretty: "Deadchat",
tooltip: "All of deadchat",
required: false,
admin: false
},
@@ -174,6 +182,7 @@ function start_vue() {
matches: ".ooc:not(.looc)",
becomes: "vc_globalooc",
pretty: "Global OOC",
tooltip: "The bluewall of global OOC messages",
required: false,
admin: false
},
@@ -182,6 +191,7 @@ function start_vue() {
matches: ".nif",
becomes: "vc_nif",
pretty: "NIF Messages",
tooltip: "Messages from the NIF itself and people inside",
required: false,
admin: false
},
@@ -190,6 +200,7 @@ function start_vue() {
matches: ".pm",
becomes: "vc_adminpm",
pretty: "Admin PMs",
tooltip: "Messages to/from admins ('adminhelps')",
required: false,
admin: false
},
@@ -197,6 +208,7 @@ function start_vue() {
matches: ".admin_channel",
becomes: "vc_adminchat",
pretty: "Admin Chat",
tooltip: "ASAY messages",
required: false,
admin: true
},
@@ -204,6 +216,7 @@ function start_vue() {
matches: ".mod_channel",
becomes: "vc_modchat",
pretty: "Mod Chat",
tooltip: "MSAY messages",
required: false,
admin: true
},
@@ -211,6 +224,7 @@ function start_vue() {
matches: ".event_channel",
becomes: "vc_eventchat",
pretty: "Event Chat",
tooltip: "ESAY messages",
required: false,
admin: true
},
@@ -218,38 +232,18 @@ function start_vue() {
matches: ".ooc.looc, .ooc .looc", //Dumb game
becomes: "vc_looc",
pretty: "Local OOC",
tooltip: "Local OOC messages, always enabled",
required: true
},
{
matches: ".boldannounce",
becomes: "vc_system",
pretty: "System Messages",
tooltip: "Messages from your client, always enabled",
required: true
}
],
},
created: function() {
/*Dog mode
setTimeout(function(){
document.body.className += " woof";
},5000);
*/
/* Stress test
var varthis = this;
setInterval( function() {
if(varthis.messages.length > 10000) {
return;
}
var stringymessages = JSON.stringify(varthis.messages);
var unstringy = JSON.parse(stringymessages);
unstringy.forEach( function(message) {
message.id = ++vchat_state.lastId;
varthis.messages.push(message);
});
varthis.internal_message("Now have " + varthis.messages.length + " messages in array.");
}, 10000);
*/
},
mounted: function() {
//Load our settings
this.load_settings();
@@ -284,22 +278,50 @@ function start_vue() {
animated: function (newSetting) {
set_storage("animated",newSetting);
},
fontsize: function (newSetting) {
fontsize: function (newSetting, oldSetting) {
if(isNaN(newSetting)) { //Numbers only
this.fontsize = oldSetting;
return;
}
if(newSetting < 0.2) {
this.fontsize = 0.2;
} else if(newSetting > 5) {
this.fontsize = 5;
}
set_storage("fontsize",newSetting);
},
lineheight: function (newSetting, oldSetting) {
if(!isFinite(newSetting)) { //Integers only
this.lineheight = oldSetting;
return;
}
if(newSetting < 100) {
this.lineheight = 100;
} else if(newSetting > 200) {
this.lineheight = 200;
}
set_storage("lineheight",newSetting);
},
showingnum: function (newSetting, oldSetting) {
if(!isFinite(newSetting)) {
if(!isFinite(newSetting)) { //Integers only
this.showingnum = oldSetting;
return;
}
newSetting = Math.floor(newSetting);
if(newSetting <= 50) {
if(newSetting < 50) {
this.showingnum = 50;
} else if(newSetting > 2000) {
this.showingnum = 2000;
}
set_storage("showingnum",this.showingnum);
this.attempt_archive();
},
current_categories: function(newSetting, oldSetting) {
if(newSetting.length) {
this.apply_filter(newSetting);
}
}
},
computed: {
@@ -311,14 +333,6 @@ function start_vue() {
});
return tab;
},
//Which classes does the active tab need?
active_classes: function() {
let classarray = this.active_tab.classes;
let classtext = classarray.toString(); //Convert to a string
let classproper = classtext.replace(/,/g," ");
if(this.inverted) classproper += " inverted";
return classproper; //Swap commas for spaces
},
//What color does the latency pip get?
ping_classes: function() {
if(this.latency === 0) { return "grey"; }
@@ -327,11 +341,11 @@ function start_vue() {
else if(this.latency <= 400) { return "yellow"; }
else { return "red"; }
},
shown_messages: function() {
if(this.messages.length <= this.showingnum) {
return this.messages;
current_categories: function() {
if(this.active_tab == this.tabs[0]) {
return []; //Everything, no filtering, special case for speed.
} else {
return this.messages.slice(-1*this.showingnum);
return this.active_tab.categories.concat(vchat_opts.alwaysShow);
}
}
},
@@ -339,10 +353,14 @@ function start_vue() {
//Load the chat settings
load_settings: function() {
this.inverted = get_storage("darkmode", false);
this.crushing = get_storage("crushing", true);
this.crushing = get_storage("crushing", 3);
this.animated = get_storage("animated", false);
this.fontsize = get_storage("fontsize", 0.9);
this.lineheight = get_storage("lineheight", 130);
this.showingnum = get_storage("showingnum", 200);
this.animated = get_storage("animated", true);
this.fontsize = get_storage("fontsize", 'zoom_normal');
if(isNaN(this.crushing)){this.crushing = 3;} //This used to be a bool (03-02-2020)
if(isNaN(this.fontsize)){this.fontsize = 0.9;} //This used to be a string (03-02-2020)
},
//Change to another tab
switchtab: function(tab) {
@@ -350,9 +368,11 @@ function start_vue() {
this.active_tab.active = false;
tab.active = true;
tab.classes.forEach( function(cls) {
tab.categories.forEach( function(cls) {
this.unread_messages[cls] = 0;
}, this);
this.apply_filter(this.current_categories);
},
//Toggle edit mode
editmode: function() {
@@ -366,7 +386,7 @@ function start_vue() {
newtab: function() {
this.tabs.push({
name: "New Tab",
classes: this.always_show.slice(),
categories: [],
immutable: false,
active: false
});
@@ -406,17 +426,17 @@ function start_vue() {
tab_unread_count: function(tab) {
var unreads = 0;
var thisum = this.unread_messages;
tab.classes.find( function(cls){
tab.categories.find( function(cls){
if(thisum[cls]) {
unreads += thisum[cls];
}
});
return unreads;
},
tab_unread_classes: function(tab) {
tab_unread_categories: function(tab) {
var unreads = false;
var thisum = this.unread_messages;
tab.classes.find( function(cls){
tab.categories.find( function(cls){
if(thisum[cls]) {
unreads = true;
return true;
@@ -425,6 +445,39 @@ function start_vue() {
return { red: unreads, grey: !unreads};
},
attempt_archive: function() {
var wiggle = 20; //Wiggle room to prevent hysterisis effects. Slice off 20 at a time.
//Pushing out old messages
if(this.messages.length > this.showingnum) {//Time to slice off old messages
var too_old = this.messages.splice(0,wiggle); //We do a few at a time to avoid doing it too often
Array.prototype.push.apply(this.archived_messages, too_old); //ES6 adds spread operator. I'd use it if I could.
}/*
//Pulling back old messages
} else if(this.messages.length < (this.showingnum - wiggle)) { //Sigh, repopulate old messages
var too_new = this.archived_messages.splice(this.messages.length - (this.showingnum - wiggle));
Array.prototype.shift.apply(this.messages, too_new);
}
*/
},
apply_filter: function(cat_array) {
//Clean up the array
this.shown_messages.splice(0);
this.unshown_messages = 0;
//For each message, try to find it's category in the categories we're showing
this.messages.forEach( function(msg){
if(cat_array.indexOf(msg.category) > -1) { //Returns the position in the array, and -1 for not found
this.shown_messages.push(msg);
}
}, this);
//For each message, try to find it's category in the categories we're showing
this.archived_messages.forEach( function(msg){
if(cat_array.indexOf(msg.category) > -1) { //Returns the position in the array, and -1 for not found
this.unshown_messages++;
}
}, this);
},
//Push a new message into our array
add_message: function(message) {
//IE doesn't support the 'class' syntactic sugar so we're left making our own object.
@@ -434,18 +487,13 @@ function start_vue() {
content: message.message,
repeats: 1
};
//Get a category
newmessage.category = this.get_category(newmessage.content);
if(!this.active_tab.classes.some(function(cls) { return (cls == newmessage.category || cls == "vc_showall"); })) {
if (isNaN(this.unread_messages[newmessage.category])) {
this.unread_messages[newmessage.category] = 0;
}
this.unread_messages[newmessage.category] += 1;
}
//Try to crush it with one of the last few
if(this.crushing) {
let crushwith = this.messages.slice(-(vchat_opts.crush_messages));
let crushwith = this.messages.slice(-(this.crushing));
for (let i = crushwith.length - 1; i >= 0; i--) {
let oldmessage = crushwith[i];
if(oldmessage.content == newmessage.content) {
@@ -455,8 +503,19 @@ function start_vue() {
}
}
//Unread indicator and insertion into current tab shown messages if sensible
if(this.current_categories.length && (this.current_categories.indexOf(newmessage.category) < 0)) { //Not in the current categories
if (isNaN(this.unread_messages[newmessage.category])) {
this.unread_messages[newmessage.category] = 0;
}
this.unread_messages[newmessage.category] += 1;
} else if(this.current_categories.length) { //Is in the current categories
this.shown_messages.push(newmessage);
}
//Append to vue's messages
newmessage.id = ++vchat_state.lastId;
this.attempt_archive();
this.messages.push(newmessage);
},
//Push an internally generated message into our array
@@ -518,7 +577,10 @@ function start_vue() {
},
save_chatlog: function() {
var textToSave = "<html><head><style>"+this.ext_styles+"</style></head><body>";
this.messages.forEach( function(message) {
var messagesToSave = this.archived_messages.concat(this.messages);
messagesToSave.forEach( function(message) {
textToSave += message.content;
if(message.repeats > 1) {
textToSave += "(x"+message.repeats+")";
@@ -676,10 +738,14 @@ function get_localstorage(key, deffo) {
//localstorage only stores strings.
if(value === "null" || value === null) {
value = deffo;
//Coerce bools back into their native forms
} else if(value === "true") {
value = true;
} else if(value === "false") {
value = false;
//Coerce numbers back into numerical form
} else if(!isNaN(value)) {
value = +value;
}
return value;
}
@@ -708,6 +774,8 @@ function get_cookie(key, deffo) {
right = true;
} else if(right === "false") {
right = false;
} else if(!isNaN(right)) {
right = +right;
}
cookie_object[left] = right; //Stick into object
});
+6 -6
View File
@@ -1,5 +1,3 @@
#define BACKLOG_LENGTH 20 MINUTES
//The 'V' is for 'VORE' but you can pretend it's for Vue.js if you really want.
//These are sent to the client via browse_rsc() in advance so the HTML can access them.
@@ -124,10 +122,14 @@ GLOBAL_DATUM_INIT(iconCache, /savefile, new("data/iconCache.sav")) //Cache of ic
//Perform DB shenanigans
/datum/chatOutput/proc/load_database()
set waitfor = FALSE
var/list/results = vchat_get_messages(owner.ckey, world.time - BACKLOG_LENGTH)
var/list/results = vchat_get_messages(owner.ckey) //If there's bad performance on reconnects, look no further
for(var/list/message in results)
var/count = 10
to_chat_immediate(owner, message["time"], message["message"])
CHECK_TICK
count++
if(count >= 10)
count = 0
CHECK_TICK
//It din work
/datum/chatOutput/proc/become_broken()
@@ -325,5 +327,3 @@ var/to_chat_src
var/list/tojson = list("time" = time, "message" = message);
target << output(jsEncode(tojson), "htmloutput:putmessage")
#undef BACKLOG_LENGTH
-2
View File
@@ -83,8 +83,6 @@ GLOBAL_DATUM(vchatdb, /database)
//Byond is so great half the time it doesn't delete the file
var/cleanup = "DROP TABLE IF EXISTS messages"
vchat_exec_update(cleanup)
cleanup = "VACUUM"
vchat_exec_update(cleanup)
//Messages table
var/tabledef = "CREATE TABLE messages(\