From 8ab9a847d041d811b0699acd0585a213aa651b58 Mon Sep 17 00:00:00 2001 From: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Date: Fri, 10 Mar 2023 16:48:20 +1000 Subject: [PATCH] cleans up so many to_chats so they use vchat filters, unsorted chat filter for everything else --- code/game/jobs/job_controller.dm | 16 +- code/game/machinery/telecomms/broadcaster.dm | 42 +- code/game/objects/items.dm | 12 +- code/modules/client/verbs/advanced_who.dm | 2 +- code/modules/client/verbs/who.dm | 3 +- code/modules/economy/coins.dm | 2 +- code/modules/economy/vending.dm | 12 +- code/modules/examine/examine.dm | 2 +- code/modules/fishing/fishing.dm | 2 +- code/modules/fishing/fishing_net.dm | 2 +- .../kitchen/cooking_machines/_appliance.dm | 8 +- .../food/kitchen/cooking_machines/_cooker.dm | 20 +- .../food/kitchen/cooking_machines/_mixer.dm | 14 +- .../kitchen/cooking_machines/container.dm | 2 +- .../food/kitchen/cooking_machines/fryer.dm | 272 ++++ .../food/kitchen/smartfridge/smartfridge.dm | 8 +- code/modules/hydroponics/grown.dm | 14 +- code/modules/hydroponics/seed.dm | 2 +- code/modules/hydroponics/seed_machines.dm | 22 +- code/modules/hydroponics/seed_storage.dm | 8 +- code/modules/hydroponics/trays/tray.dm | 42 +- code/modules/mob/dead/observer/observer.dm | 1048 ++++++++++++++ code/modules/mob/dead/observer/observer_vr.dm | 15 +- code/modules/mob/dead/observer/say.dm | 4 +- code/modules/mob/hear_say.dm | 70 +- .../mob/living/carbon/human/emote_vr.dm | 6 +- code/modules/mob/living/carbon/human/human.dm | 116 +- .../living/carbon/human/human_attackhand.dm | 14 +- .../mob/living/carbon/human/human_damage.dm | 6 +- .../mob/living/carbon/human/human_defense.dm | 6 +- .../mob/living/carbon/human/human_powers.dm | 21 +- .../carbon/human/species/species_attack_vr.dm | 12 +- .../human/species/species_shapeshift_vr.dm | 2 +- code/modules/mob/living/living.dm | 14 +- code/modules/mob/living/living_defense.dm | 9 +- code/modules/mob/living/living_vr.dm | 2 +- code/modules/mob/living/riding.dm | 4 +- code/modules/mob/living/silicon/ai/ai.dm | 40 +- code/modules/mob/living/silicon/ai/laws.dm | 2 +- code/modules/mob/living/silicon/pai/pai.dm | 10 +- code/modules/mob/living/silicon/pai/pai_vr.dm | 20 +- .../silicon/robot/dogborg/dog_modules_vr.dm | 34 +- .../silicon/robot/dogborg/dog_sleeper_vr.dm | 6 +- .../modules/mob/living/silicon/robot/robot.dm | 120 +- .../mob/living/silicon/robot/robot_damage.dm | 8 +- .../mob/living/silicon/robot/robot_items.dm | 59 +- .../mob/living/silicon/robot/robot_vr.dm | 4 +- code/modules/mob/living/silicon/say.dm | 8 +- code/modules/mob/living/silicon/silicon.dm | 6 +- code/modules/mob/mob.dm | 1280 +++++++++++++++++ code/modules/mob/say_vr.dm | 4 +- code/modules/multiz/movement.dm | 2 +- code/modules/nifsoft/nif.dm | 2 +- code/modules/nifsoft/nifsoft.dm | 2 +- .../nifsoft/software/13_soulcatcher.dm | 16 +- code/modules/research/circuitprinter.dm | 4 +- code/modules/research/message_server.dm | 4 +- code/modules/research/protolathe.dm | 4 +- code/modules/research/rdconsole.dm | 2 +- code/modules/surgery/encased.dm | 24 +- code/modules/surgery/face.dm | 12 +- code/modules/surgery/generic.dm | 26 +- code/modules/surgery/implant.dm | 8 +- code/modules/surgery/limb_reattach.dm | 12 +- code/modules/surgery/neck.dm | 24 +- code/modules/surgery/organs_internal.dm | 24 +- code/modules/surgery/other.dm | 16 +- code/modules/surgery/robotics.dm | 40 +- code/modules/tables/flipping.dm | 2 +- code/modules/vchat/js/vchat.js | 26 +- code/modules/vchat/js/vchat.min.js | 2 +- code/modules/vore/resizing/resize_vr.dm | 6 +- .../xenoarcheaology/artifacts/replicator.dm | 6 +- .../artifacts/replicator_vr.dm | 8 +- code/modules/xenoarcheaology/effect.dm | 2 +- code/modules/xenoarcheaology/effect_master.dm | 14 +- 76 files changed, 3214 insertions(+), 531 deletions(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index e5f901bd72..0ee66ab3dd 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -465,7 +465,7 @@ var/global/datum/controller/occupations/job_master else spawn_in_storage += thing else - to_chat(H, "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator.") + to_chat(H, "Your job is [rank] and the game just can't handle it! Please report this bug to an administrator.") H.job = rank log_game("JOINED [key_name(H)] as \"[rank]\"") @@ -533,16 +533,16 @@ var/global/datum/controller/occupations/job_master W.color = R.color qdel(R) - to_chat(H, "You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].") + to_chat(H, "You are [job.total_positions == 1 ? "the" : "a"] [alt_title ? alt_title : rank].") if(job.supervisors) - to_chat(H, "As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.") + to_chat(H, "As the [alt_title ? alt_title : rank] you answer directly to [job.supervisors]. Special circumstances may change this.") if(job.has_headset) H.equip_to_slot_or_del(new /obj/item/device/radio/headset(H), slot_l_ear) - to_chat(H, "To speak on your department's radio channel use :h. For the use of other channels, examine your headset.") + to_chat(H, "To speak on your department's radio channel use :h. For the use of other channels, examine your headset.") if(job.req_admin_notify) - to_chat(H, "You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.") + to_chat(H, "You are playing a job that is important for Game Progression. If you have to disconnect, please notify the admins via adminhelp.") // EMAIL GENERATION // Email addresses will be created under this domain name. Mostly for the looks. @@ -559,13 +559,13 @@ var/global/datum/controller/occupations/job_master // If even fallback login generation failed, just don't give them an email. The chance of this happening is astronomically low. if(ntnet_global.does_email_exist(complete_login)) - to_chat(H, "You were not assigned an email address.") + to_chat(H, "You were not assigned an email address.") H.mind.store_memory("You were not assigned an email address.") else var/datum/computer_file/data/email_account/EA = new/datum/computer_file/data/email_account() EA.password = GenerateKey() EA.login = complete_login - to_chat(H, "Your email account address is [EA.login] and the password is [EA.password]. This information has also been placed into your notes.") + to_chat(H, "Your email account address is [EA.login] and the password is [EA.password]. This information has also been placed into your notes.") H.mind.store_memory("Your email account address is [EA.login] and the password is [EA.password].") // END EMAIL GENERATION @@ -898,7 +898,7 @@ var/global/datum/controller/occupations/job_master if(fail_deadly || J?.offmap_spawn) to_chat(C, "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Please correct your spawn point choice.") return - to_chat(C, "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead.") + to_chat(C, "Your chosen spawnpoint ([spawnpos.display_name]) is unavailable for your chosen job. Spawning you at the Arrivals shuttle instead.") var/spawning = pick(latejoin) .["turf"] = get_turf(spawning) .["msg"] = "will arrive at the station shortly" diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index 686a03cb25..c73649b5fd 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -454,11 +454,13 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept var/part_b_extra = "" if(data == DATA_ANTAG) // intercepted radio message part_b_extra = " (Intercepted)" - var/part_a = "\icon[radio][bicon(radio)]\[[freq_text]\][part_b_extra] " // goes in the actual output + var/part_a = "" + var/part_b = "\icon[radio][bicon(radio)]\[[freq_text]\][part_b_extra] " // goes in the actual output // --- Some more pre-message formatting --- - var/part_b = " " // Tweaked for security headsets -- TLE - var/part_c = "" + var/part_c = " " // Tweaked for security headsets -- TLE + var/part_d = "" + var/part_e = "" // --- Filter the message; place it in quotes apply a verb --- @@ -470,8 +472,8 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept // --- This following recording is intended for research and feedback in the use of department radio channels --- - var/part_blackbox_b = " \[[freq_text]\] " // Tweaked for security headsets -- TLE - var/blackbox_msg = "[part_a][name][part_blackbox_b][quotedmsg][part_c]" + var/part_blackbox_c = " \[[freq_text]\] " // Tweaked for security headsets -- TLE + var/blackbox_msg = "[part_a][part_b][name][part_blackbox_c][quotedmsg][part_d][part_e]" //var/blackbox_admin_msg = "[part_a][M.name] (Real name: [M.real_name])[part_blackbox_b][quotedmsg][part_c]" //BR.messages_admin += blackbox_admin_msg @@ -510,28 +512,58 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept /* --- Process all the mobs that heard a masked voice (understood) --- */ if(length(heard_masked)) for (var/mob/R in heard_masked) +<<<<<<< HEAD R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 0, name) +======= + R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, name) + if(R.is_preference_enabled(/datum/client_preference/radio_sounds)) + R << 'sound/effects/radio_common_quieter.ogg' +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror /* --- Process all the mobs that heard the voice normally (understood) --- */ if(length(heard_normal)) for (var/mob/R in heard_normal) +<<<<<<< HEAD R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 0, realname) +======= + R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 0, realname) + if(R.is_preference_enabled(/datum/client_preference/radio_sounds)) + R << 'sound/effects/radio_common_quieter.ogg' +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror /* --- Process all the mobs that heard the voice normally (did not understand) --- */ if(length(heard_voice)) for (var/mob/R in heard_voice) +<<<<<<< HEAD R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M,0, vname) +======= + R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M,0, vname) + if(R.is_preference_enabled(/datum/client_preference/radio_sounds)) + R << 'sound/effects/radio_common_quieter.ogg' +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror /* --- Process all the mobs that heard a garbled voice (did not understand) --- */ // Displays garbled message (ie "f*c* **u, **i*er!") if(length(heard_garbled)) for (var/mob/R in heard_garbled) +<<<<<<< HEAD R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 1, vname) +======= + R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1, vname) + if(R.is_preference_enabled(/datum/client_preference/radio_sounds)) + R << 'sound/effects/radio_common_quieter.ogg' +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror /* --- Complete gibberish. Usually happens when there's a compressed message --- */ if(length(heard_gibberish)) for (var/mob/R in heard_gibberish) +<<<<<<< HEAD R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, M, 1) +======= + R.hear_radio(message_pieces, verbage, part_a, part_b, part_c, part_d, part_e, M, 1) + if(R.is_preference_enabled(/datum/client_preference/radio_sounds)) + R << 'sound/effects/radio_common_quieter.ogg' +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror return 1 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 79dabc9a2c..cdca80eb3a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -686,7 +686,7 @@ GLOBAL_LIST_EMPTY(blood_overlays_by_type) /obj/item/proc/showoff(mob/user) for (var/mob/M in view(user)) - M.show_message("[user] holds up [src]. Take a closer look.",1) + M.show_message("[user] holds up [src]. Take a closer look.",1) /mob/living/carbon/verb/showoff() set name = "Show Held Item" @@ -716,13 +716,13 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. var/cannotzoom if((usr.stat && !zoom) || !(istype(usr,/mob/living/carbon/human))) - to_chat(usr, "You are unable to focus through the [devicename]") + to_chat(usr, "You are unable to focus through the [devicename].") cannotzoom = 1 else if(!zoom && (global_hud.darkMask[1] in usr.client.screen)) - to_chat(usr, "Your visor gets in the way of looking through the [devicename]") + to_chat(usr, "Your visor gets in the way of looking through the [devicename].") cannotzoom = 1 else if(!zoom && usr.get_active_hand() != src) - to_chat(usr, "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better") + to_chat(usr, "You are too distracted to look through the [devicename], perhaps if it was in your active hand this might work better.") cannotzoom = 1 //We checked above if they are a human and returned already if they weren't. @@ -752,7 +752,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. H.client.pixel_x = -viewoffset H.client.pixel_y = 0 - H.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].") + H.visible_message("[usr] peers through the [zoomdevicename ? "[zoomdevicename] of the [src.name]" : "[src.name]"].") if(!ignore_visor_zoom_restriction) H.looking_elsewhere = TRUE H.handle_vision() @@ -770,7 +770,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out. H.handle_vision() if(!cannotzoom) - usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].") + usr.visible_message("[zoomdevicename ? "[usr] looks up from the [src.name]" : "[usr] lowers the [src.name]"].") return diff --git a/code/modules/client/verbs/advanced_who.dm b/code/modules/client/verbs/advanced_who.dm index 151f4a90f3..104ed92bc0 100644 --- a/code/modules/client/verbs/advanced_who.dm +++ b/code/modules/client/verbs/advanced_who.dm @@ -94,6 +94,6 @@ msg += "[line]" msg += "" msg += "Total Players: [length(Lines)]" - msg = "" + msg + "" + msg = "" + msg + "" to_chat(src, msg) YW EDIT STOP*/ diff --git a/code/modules/client/verbs/who.dm b/code/modules/client/verbs/who.dm index 980148c303..a433f41efb 100644 --- a/code/modules/client/verbs/who.dm +++ b/code/modules/client/verbs/who.dm @@ -51,6 +51,7 @@ msg += "[line]\n" msg += "Total Players: [length(Lines)]" + msg = "[jointext(msg, "
")]
" to_chat(src,msg) /client/verb/staffwho() @@ -145,4 +146,4 @@ msg += "\nAdminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond." - to_chat(src, msg) + to_chat(src,"[jointext(msg, "
")]
") diff --git a/code/modules/economy/coins.dm b/code/modules/economy/coins.dm index 8b11b22023..51438cc101 100644 --- a/code/modules/economy/coins.dm +++ b/code/modules/economy/coins.dm @@ -90,7 +90,7 @@ CC.update_icon() cut_overlays() string_attached = null - to_chat(user, "You detach the string from the coin.") + to_chat(user, "You detach the string from the coin.") else ..() /obj/item/weapon/coin/attack_self(mob/user as mob) diff --git a/code/modules/economy/vending.dm b/code/modules/economy/vending.dm index c05c3e1a69..929023ce86 100644 --- a/code/modules/economy/vending.dm +++ b/code/modules/economy/vending.dm @@ -184,7 +184,7 @@ GLOBAL_LIST_EMPTY(vending_products) /obj/machinery/vending/emag_act(var/remaining_charges, var/mob/user) if(!emagged) emagged = 1 - to_chat(user, "You short out \the [src]'s product lock.") + to_chat(user, "You short out \the [src]'s product lock.") return 1 /obj/machinery/vending/attackby(obj/item/weapon/W as obj, mob/user as mob) @@ -243,9 +243,9 @@ GLOBAL_LIST_EMPTY(vending_products) else if(W.is_wrench()) playsound(src, W.usesound, 100, 1) if(anchored) - user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") + user.visible_message("[user] begins unsecuring \the [src] from the floor.", "You start unsecuring \the [src] from the floor.") else - user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") + user.visible_message("[user] begins securing \the [src] to the floor.", "You start securing \the [src] to the floor.") if(do_after(user, 20 * W.toolspeed)) if(!src) return @@ -487,7 +487,7 @@ GLOBAL_LIST_EMPTY(vending_products) return FALSE if(!coin) - to_chat(usr, "There is no coin in this machine.") + to_chat(usr, "There is no coin in this machine.") return coin.forceMove(src.loc) @@ -538,7 +538,7 @@ GLOBAL_LIST_EMPTY(vending_products) var/obj/item/weapon/card/id/C = H.GetIdCard() if(!vendor_account || vendor_account.suspended) - to_chat(usr, "Vendor account offline. Unable to process transaction.") + to_chat(usr, "Vendor account offline. Unable to process transaction.") flick("[icon_state]-deny",src) vend_ready = TRUE return @@ -679,7 +679,7 @@ GLOBAL_LIST_EMPTY(vending_products) return 0 if (src.anchored || usr:stat) - to_chat(usr, "It is bolted down!") + to_chat(usr, "It is bolted down!") return 0 src.set_dir(turn(src.dir, 270)) return 1 diff --git a/code/modules/examine/examine.dm b/code/modules/examine/examine.dm index f428c20c83..4c1fedf5af 100644 --- a/code/modules/examine/examine.dm +++ b/code/modules/examine/examine.dm @@ -93,7 +93,7 @@ var/list/results = A.examine(src) if(!results || !results.len) results = list("You were unable to examine that. Tell a developer!") - to_chat(src, jointext(results, "
")) + to_chat(src, "[jointext(results, "
")]
") update_examine_panel(A) /mob/proc/update_examine_panel(var/atom/A) diff --git a/code/modules/fishing/fishing.dm b/code/modules/fishing/fishing.dm index 7e4a9d85bc..802faf2d6b 100644 --- a/code/modules/fishing/fishing.dm +++ b/code/modules/fishing/fishing.dm @@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(generic_fishing_chance_list, list(FISHING_RARE = 5, FISHING_UNC has_fish = FALSE //List of possible outcomes. if(!fish_type) - to_chat(user,"You caught... nothing. How sad.") + to_chat(user,"You caught... nothing. How sad.") else var/fished = new fish_type(get_turf(user)) if(isliving(fished)) diff --git a/code/modules/fishing/fishing_net.dm b/code/modules/fishing/fishing_net.dm index 3ba2f1591a..8c98448427 100644 --- a/code/modules/fishing/fishing_net.dm +++ b/code/modules/fishing/fishing_net.dm @@ -48,7 +48,7 @@ to_chat(user, "Your net is already holding something!") accept = FALSE if(!accept) - to_chat(user, "[A] can't be trapped in \the [src].") + to_chat(user, "[A] can't be trapped in \the [src].") return var/mob/L = A user.visible_message("[user] snatches [L] with \the [src].", "You snatch [L] with \the [src].") diff --git a/code/modules/food/kitchen/cooking_machines/_appliance.dm b/code/modules/food/kitchen/cooking_machines/_appliance.dm index 9c15139fba..7f71133f3a 100644 --- a/code/modules/food/kitchen/cooking_machines/_appliance.dm +++ b/code/modules/food/kitchen/cooking_machines/_appliance.dm @@ -157,12 +157,12 @@ if (stat & POWEROFF)//Its turned off stat &= ~POWEROFF use_power = 1 - user.visible_message("[user] turns [src] on.", "You turn on [src].") + user.visible_message("[user] turns [src] on.", "You turn on [src].") else //Its on, turn it off stat |= POWEROFF use_power = 0 - user.visible_message("[user] turns [src] off.", "You turn off [src].") + user.visible_message("[user] turns [src] off.", "You turn off [src].") cooking = FALSE // Stop cooking here, too, just in case. playsound(src, 'sound/machines/click.ogg', 40, 1) @@ -180,14 +180,14 @@ return if (!usr.IsAdvancedToolUser()) - to_chat(usr, "You lack the dexterity to do that!") + to_chat(usr, "You lack the dexterity to do that!") return if (usr.stat || usr.restrained() || usr.incapacitated()) return if (!Adjacent(usr) && !issilicon(usr)) - to_chat(usr, "You can't adjust the [src] from this distance, get closer!") + to_chat(usr, "You can't adjust the [src] from this distance, get closer!") return if(output_options.len) diff --git a/code/modules/food/kitchen/cooking_machines/_cooker.dm b/code/modules/food/kitchen/cooking_machines/_cooker.dm index ef097485b9..e02d6dd477 100644 --- a/code/modules/food/kitchen/cooking_machines/_cooker.dm +++ b/code/modules/food/kitchen/cooking_machines/_cooker.dm @@ -61,7 +61,7 @@ var/obj/item/I = usr.get_active_hand() if(slot <= LAZYLEN(cooking_objs)) // Inserting var/datum/cooking_item/CI = cooking_objs[slot] - + if(istype(I) && can_insert(I)) // Why do hard work when we can just make them smack us? attackby(I, usr) else if(istype(CI)) @@ -82,7 +82,7 @@ . += "Temperature: [round(temperature - T0C, 0.1)]C / [round(optimal_temp - T0C, 0.1)]C" else . += "It is switched off." - + /obj/machinery/appliance/cooker/list_contents(var/mob/user) if (cooking_objs.len) var/string = "Contains...
" @@ -95,7 +95,7 @@ to_chat(user, string) else to_chat(user, "It's empty.") - + /obj/machinery/appliance/cooker/proc/get_efficiency() // to_world("Our cooking_power is [cooking_power] and our efficiency is [(cooking_power / optimal_power) * 100].") // Debug lines, uncomment if you need to test. return (cooking_power / optimal_power) * 100 @@ -131,11 +131,11 @@ if (temperature > T.temperature) equalize_temperature() ..() - + /obj/machinery/appliance/cooker/power_change() . = ..() update_icon() // this probably won't cause issues, but Aurora used SSIcons and queue_icon_update() instead - + /obj/machinery/appliance/cooker/proc/update_cooking_power() var/temp_scale = 0 if(temperature > min_temp) @@ -143,22 +143,22 @@ temp_scale = 1 else temp_scale = (temperature - min_temp) / (optimal_temp - min_temp) // If we're between min and optimal this will yield a value in the range 0-1 - + /* // old code for reference, will be useful if/when we implement ovens with configurable temperatures - TODO recipes with optimal temps for cooking per-recipe?? temp_scale = (temperature - min_temp) / (optimal_temp - min_temp) // If we're between min and optimal this will yield a value in the range 0-1 - + if(temp_scale > 1) // We're above optimal, efficiency goes down as we pass too much over it if(temp_scale >= 2) temp_scale = 0 else temp_scale = 1 - (temp_scale - 1) */ - + cooking_coeff = optimal_power * temp_scale // to_world("Our cooking_power is [cooking_power] and our tempscale is [temp_scale], and our cooking_coeff is [cooking_coeff] before RefreshParts.") // Debug lines, uncomment if you need to test. RefreshParts() // to_world("Our cooking_power is [cooking_power] after RefreshParts.") // Debug lines, uncomment if you need to test. - + /obj/machinery/appliance/cooker/proc/heat_up() if(temperature < optimal_temp) if(use_power == 1 && ((optimal_temp - temperature) > 5)) @@ -199,5 +199,5 @@ /obj/machinery/appliance/cooker/add_content(var/obj/item/I, var/mob/user) var/datum/cooking_item/CI = ..() if(istype(CI) && CI.combine_target) - to_chat(user, "\The [I] will be used to make a [selected_option]. Output selection is returned to default for future items.") + to_chat(user, "\The [I] will be used to make a [selected_option]. Output selection is returned to default for future items.") selected_option = null \ No newline at end of file diff --git a/code/modules/food/kitchen/cooking_machines/_mixer.dm b/code/modules/food/kitchen/cooking_machines/_mixer.dm index 7d18865167..f04f8bba46 100644 --- a/code/modules/food/kitchen/cooking_machines/_mixer.dm +++ b/code/modules/food/kitchen/cooking_machines/_mixer.dm @@ -25,12 +25,12 @@ fundamental differences cooking_objs += new /datum/cooking_item(new /obj/item/weapon/reagent_containers/cooking_container(src)) cooking = FALSE selected_option = pick(output_options) - + mixer_loop = new(list(src), FALSE) - + /obj/machinery/appliance/mixer/Destroy() . = ..() - + QDEL_NULL(mixer_loop) //Mixers cannot-not do combining mode. So the default option is removed from this. A combine target must be chosen @@ -83,7 +83,7 @@ fundamental differences for(var/datum/cooking_item/CI as anything in cooking_objs) if (CI.container) if (!CI.container.check_contents()) - to_chat(user, "There's nothing in [src] you can remove!") + to_chat(user, "There's nothing in [src] you can remove!") return for (var/obj/item/I in CI.container) @@ -106,20 +106,20 @@ fundamental differences var/datum/cooking_item/CI = cooking_objs[1] if(!CI.container.check_contents()) - to_chat("There's nothing in it! Add ingredients before turning [src] on!") + to_chat("There's nothing in it! Add ingredients before turning [src] on!") return if(stat & POWEROFF)//Its turned off stat &= ~POWEROFF if(usr) - usr.visible_message("[usr] turns the [src] on", "You turn on \the [src].") + usr.visible_message("[usr] turns the [src] on.", "You turn on \the [src].") get_cooking_work(CI) use_power = 2 else //Its on, turn it off stat |= POWEROFF use_power = 0 if(usr) - usr.visible_message("[usr] turns the [src] off", "You turn off \the [src].") + usr.visible_message("[usr] turns the [src] off.", "You turn off \the [src].") playsound(src, 'sound/machines/click.ogg', 40, 1) update_icon() diff --git a/code/modules/food/kitchen/cooking_machines/container.dm b/code/modules/food/kitchen/cooking_machines/container.dm index bd4a9d8e00..fa6a5fea62 100644 --- a/code/modules/food/kitchen/cooking_machines/container.dm +++ b/code/modules/food/kitchen/cooking_machines/container.dm @@ -82,7 +82,7 @@ return if (!Adjacent(user)) - to_chat(user, "You can't reach [src] from here.") + to_chat(user, "You can't reach [src] from here.") return if (!contents.len) diff --git a/code/modules/food/kitchen/cooking_machines/fryer.dm b/code/modules/food/kitchen/cooking_machines/fryer.dm index edf1df8882..11f71e5594 100644 --- a/code/modules/food/kitchen/cooking_machines/fryer.dm +++ b/code/modules/food/kitchen/cooking_machines/fryer.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/machinery/appliance/cooker/fryer name = "deep fryer" desc = "Deep fried everything." @@ -273,3 +274,274 @@ return 1 //If neither of the above returned, then call parent as normal ..() +======= +/obj/machinery/appliance/cooker/fryer + name = "deep fryer" + desc = "Deep fried everything." + icon_state = "fryer_off" + can_cook_mobs = 1 + cook_type = "deep fried" + on_icon = "fryer_on" + off_icon = "fryer_off" + food_color = "#FFAD33" + cooked_sound = 'sound/machines/ding.ogg' + var/datum/looping_sound/deep_fryer/fry_loop + circuit = /obj/item/weapon/circuitboard/fryer + appliancetype = FRYER + active_power_usage = 12 KILOWATTS + heating_power = 12 KILOWATTS + + light_y = 15 + + min_temp = 140 + T0C // Same as above, increasing this to just under 2x to make the % increase on efficiency not quite so painful as it would be at 80. + optimal_temp = 400 + T0C // Increasing this to be 2x Oven to allow for a much higher/realistic frying temperatures. Doesn't really do anything but make heating the fryer take a bit longer. + optimal_power = 0.95 // .35 higher than the default to give fryers faster cooking speed. + + idle_power_usage = 3.6 KILOWATTS + // Power used to maintain temperature once it's heated. + // Going with 25% of the active power. This is a somewhat arbitrary value. + + resistance = 10 KILOWATTS // Approx. 10 minutes to heat up. + + max_contents = 2 + container_type = /obj/item/weapon/reagent_containers/cooking_container/fryer + + stat = POWEROFF // Starts turned off + + var/datum/reagents/oil + var/optimal_oil = 9000 //90 litres of cooking oil + +/obj/machinery/appliance/cooker/fryer/Initialize() + . = ..() + fry_loop = new(list(src), FALSE) + + oil = new/datum/reagents(optimal_oil * 1.25, src) + var/variance = rand()*0.15 + // Fryer is always a little below full, but its usually negligible + + if(prob(20)) + // Sometimes the fryer will start with much less than full oil, significantly impacting efficiency until filled + variance = rand()*0.5 + oil.add_reagent("cookingoil", optimal_oil*(1 - variance)) + +/obj/machinery/appliance/cooker/fryer/Destroy() + QDEL_NULL(fry_loop) + QDEL_NULL(oil) + return ..() + +/obj/machinery/appliance/cooker/fryer/examine(var/mob/user) + . = ..() + if(Adjacent(user)) + to_chat(user, "Oil Level: [oil.total_volume]/[optimal_oil]") + +/obj/machinery/appliance/cooker/fryer/update_icon() // We add our own version of the proc to use the special fryer double-lights. + cut_overlays() + var/image/light + if(use_power == 1 && !stat) + light = image(icon, "fryer_light_idle") + else if(use_power == 2 && !stat) + light = image(icon, "fryer_light_preheating") + else + light = image(icon, "fryer_light_off") + light.pixel_x = light_x + light.pixel_y = light_y + add_overlay(light) + +/obj/machinery/appliance/cooker/fryer/heat_up() + if (..()) + //Set temperature of oil reagent + var/datum/reagent/nutriment/triglyceride/oil/OL = oil.get_master_reagent() + if (OL && istype(OL)) + OL.data["temperature"] = temperature + +/obj/machinery/appliance/cooker/fryer/equalize_temperature() + if (..()) + //Set temperature of oil reagent + var/datum/reagent/nutriment/triglyceride/oil/OL = oil.get_master_reagent() + if (OL && istype(OL)) + OL.data["temperature"] = temperature + +/obj/machinery/appliance/cooker/fryer/update_cooking_power() + ..()//In addition to parent temperature calculation + //Fryer efficiency also drops when oil levels arent optimal + var/oil_level = 0 + var/datum/reagent/nutriment/triglyceride/oil/OL = oil.get_master_reagent() + if(OL && istype(OL)) + oil_level = OL.volume + + var/oil_efficiency = 0 + if(oil_level) + oil_efficiency = oil_level / optimal_oil + + if(oil_efficiency > 1) + //We're above optimal, efficiency goes down as we pass too much over it + oil_efficiency = 1 - (oil_efficiency - 1) + + + cooking_power *= oil_efficiency + +/obj/machinery/appliance/cooker/fryer/update_icon() + if(!stat) + ..() + if(cooking == TRUE) + icon_state = on_icon + if(fry_loop) + fry_loop.start(src) + else + icon_state = off_icon + if(fry_loop) + fry_loop.stop(src) + else + icon_state = off_icon + if(fry_loop) + fry_loop.stop(src) + ..() + +//Fryer gradually infuses any cooked food with oil. Moar calories +//This causes a slow drop in oil levels, encouraging refill after extended use +/obj/machinery/appliance/cooker/fryer/do_cooking_tick(var/datum/cooking_item/CI) + if(..() && (CI.oil < CI.max_oil) && prob(20)) + var/datum/reagents/buffer = new /datum/reagents(2) + oil.trans_to_holder(buffer, min(0.5, CI.max_oil - CI.oil)) + CI.oil += buffer.total_volume + CI.container.soak_reagent(buffer) + + +//To solve any odd logic problems with results having oil as part of their compiletime ingredients. +//Upon finishing a recipe the fryer will analyse any oils in the result, and replace them with our oil +//As well as capping the total to the max oil +/obj/machinery/appliance/cooker/fryer/finish_cooking(var/datum/cooking_item/CI) + ..() + var/total_oil = 0 + var/total_our_oil = 0 + var/total_removed = 0 + var/datum/reagent/our_oil = oil.get_master_reagent() + + for (var/obj/item/I in CI.container) + if (I.reagents && I.reagents.total_volume) + for (var/datum/reagent/R in I.reagents.reagent_list) + if (istype(R, /datum/reagent/nutriment/triglyceride/oil)) + total_oil += R.volume + if (R.id != our_oil.id) + total_removed += R.volume + I.reagents.remove_reagent(R.id, R.volume) + else + total_our_oil += R.volume + + + if (total_removed > 0 || total_oil != CI.max_oil) + total_oil = min(total_oil, CI.max_oil) + + if (total_our_oil < total_oil) + //If we have less than the combined total, then top up from our reservoir + var/datum/reagents/buffer = new /datum/reagents(INFINITY) + oil.trans_to_holder(buffer, total_oil - total_our_oil) + CI.container.soak_reagent(buffer) + else if (total_our_oil > total_oil) + + //If we have more than the maximum allowed then we delete some. + //This could only happen if one of the objects spawns with the same type of oil as ours + var/portion = 1 - (total_oil / total_our_oil) //find the percentage to remove + for (var/obj/item/I in CI.container) + if (I.reagents && I.reagents.total_volume) + for (var/datum/reagent/R in I.reagents.reagent_list) + if (R.id == our_oil.id) + I.reagents.remove_reagent(R.id, R.volume*portion) + +/obj/machinery/appliance/cooker/fryer/cook_mob(var/mob/living/victim, var/mob/user) + + if(!istype(victim)) + return + + // user.visible_message("\The [user] starts pushing \the [victim] into \the [src]!") + + //Removed delay on this action in favour of a cooldown after it + //If you can lure someone close to the fryer and grab them then you deserve success. + //And a delay on this kind of niche action just ensures it never happens + //Cooldown ensures it can't be spammed to instakill someone + user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN*3) + + fry_loop.start(src) + + if(!do_mob(user, victim, 20)) + cooking = FALSE + icon_state = off_icon + fry_loop.stop(src) + return + + if(!victim || !victim.Adjacent(user)) + to_chat(user, "Your victim slipped free!") + cooking = FALSE + icon_state = off_icon + fry_loop.stop(src) + return + + var/damage = rand(7,13) // Though this damage seems reduced, some hot oil is transferred to the victim and will burn them for a while after + + var/datum/reagent/nutriment/triglyceride/oil/OL = oil.get_master_reagent() + damage *= OL.heatdamage(victim) + + var/obj/item/organ/external/E + var/nopain + if(ishuman(victim) && user.zone_sel.selecting != BP_GROIN && user.zone_sel.selecting != BP_TORSO) + var/mob/living/carbon/human/H = victim + E = H.get_organ(user.zone_sel.selecting) + if(!E || E.species.flags & NO_PAIN) + nopain = 2 + else if(E.robotic >= ORGAN_ROBOT) + nopain = 1 + + user.visible_message("\The [user] shoves \the [victim][E ? "'s [E.name]" : ""] into \the [src]!") + if (damage > 0) + if(E) + if(E.children && E.children.len) + for(var/obj/item/organ/external/child in E.children) + if(nopain && nopain < 2 && !(child.robotic >= ORGAN_ROBOT)) + nopain = 0 + child.take_damage(0, damage) + damage -= (damage*0.5)//IF someone's arm is plunged in, the hand should take most of it + E.take_damage(0, damage) + else + victim.apply_damage(damage, BURN, user.zone_sel.selecting) + + if(!nopain) + to_chat(victim, "Agony consumes you as searing hot oil scorches your [E ? E.name : "flesh"] horribly!") + victim.emote("scream") + else + to_chat(victim, "Searing hot oil scorches your [E ? E.name : "flesh"]!") + + user.attack_log += text("\[[time_stamp()]\] Has [cook_type] \the [victim] ([victim.ckey]) in \a [src]") + victim.attack_log += text("\[[time_stamp()]\] Has been [cook_type] in \a [src] by [user.name] ([user.ckey])") + msg_admin_attack("[key_name_admin(user)] [cook_type] \the [victim] ([victim.ckey]) in \a [src]. (JMP)") + + //Coat the victim in some oil + oil.trans_to(victim, 40) + + fry_loop.stop() + +/obj/machinery/appliance/cooker/fryer/attackby(var/obj/item/I, var/mob/user) + if(istype(I, /obj/item/weapon/reagent_containers/glass) && I.reagents) + if (I.reagents.total_volume <= 0 && oil) + //Its empty, handle scooping some hot oil out of the fryer + oil.trans_to(I, I.reagents.maximum_volume) + user.visible_message("[user] scoops some oil out of \the [src].", span("notice","You scoop some oil out of \the [src].")) + return 1 + else + //It contains stuff, handle pouring any oil into the fryer + //Possibly in future allow pouring non-oil reagents in, in order to sabotage it and poison food. + //That would really require coding some sort of filter or better replacement mechanism first + //So for now, restrict to oil only + var/amount = 0 + for (var/datum/reagent/R in I.reagents.reagent_list) + if (istype(R, /datum/reagent/nutriment/triglyceride/oil)) + var/delta = oil.get_free_space() + delta = min(delta, R.volume) + oil.add_reagent(R.id, delta) + I.reagents.remove_reagent(R.id, delta) + amount += delta + if (amount > 0) + user.visible_message("[user] pours some oil into \the [src].", "You pour [amount]u of oil into \the [src].", "You hear something viscous being poured into a metal container.") + return 1 + //If neither of the above returned, then call parent as normal + ..() +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror diff --git a/code/modules/food/kitchen/smartfridge/smartfridge.dm b/code/modules/food/kitchen/smartfridge/smartfridge.dm index 4077d54081..a929c8eda8 100644 --- a/code/modules/food/kitchen/smartfridge/smartfridge.dm +++ b/code/modules/food/kitchen/smartfridge/smartfridge.dm @@ -91,7 +91,7 @@ /obj/machinery/smartfridge/attackby(var/obj/item/O as obj, var/mob/user as mob) if(O.is_screwdriver()) panel_open = !panel_open - user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].") + user.visible_message("[user] [panel_open ? "opens" : "closes"] the maintenance panel of \the [src].", "You [panel_open ? "open" : "close"] the maintenance panel of \the [src].") playsound(src, O.usesound, 50, 1) update_icon() return @@ -130,11 +130,11 @@ else if(istype(O, /obj/item/weapon/gripper)) // Grippers. ~Mechoid. var/obj/item/weapon/gripper/B = O //B, for Borg. if(!B.wrapped) - to_chat(user, "\The [B] is not holding anything.") + to_chat(user, "\The [B] is not holding anything.") return else var/B_held = B.wrapped - to_chat(user, "You use \the [B] to put \the [B_held] into \the [src].") + to_chat(user, "You use \the [B] to put \the [B_held] into \the [src].") return else @@ -145,7 +145,7 @@ if(!emagged) emagged = 1 locked = -1 - to_chat(user, "You short out the product lock on [src].") + to_chat(user, "You short out the product lock on [src].") return 1 /obj/machinery/smartfridge/proc/find_record(var/obj/item/O) diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index 288e66bb1b..a7f5181219 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -210,7 +210,7 @@ if(G.get_amount() >= G.max_amount) continue G.attackby(NG, user) - to_chat(user, "You add the newly-formed wood to the stack. It now contains [NG.get_amount()] planks.") + to_chat(user, "You add the newly-formed wood to the stack. It now contains [NG.get_amount()] planks.") qdel(src) return @@ -221,31 +221,31 @@ return if(seed.kitchen_tag == "potato" || !isnull(seed.chems["potato"])) - to_chat(user, "You slice \the [src] into sticks.") + to_chat(user, "You slice \the [src] into sticks.") new /obj/item/weapon/reagent_containers/food/snacks/rawsticks(get_turf(src)) qdel(src) return if(!isnull(seed.chems["carrotjuice"])) - to_chat(user, "You slice \the [src] into sticks.") + to_chat(user, "You slice \the [src] into sticks.") new /obj/item/weapon/reagent_containers/food/snacks/carrotfries(get_turf(src)) qdel(src) return if(!isnull(seed.chems["pineapplejuice"])) - to_chat(user, "You slice \the [src] into rings.") + to_chat(user, "You slice \the [src] into rings.") new /obj/item/weapon/reagent_containers/food/snacks/pineapple_ring(get_turf(src)) qdel(src) return if(!isnull(seed.chems["soymilk"])) - to_chat(user, "You roughly chop up \the [src].") + to_chat(user, "You roughly chop up \the [src].") new /obj/item/weapon/reagent_containers/food/snacks/soydope(get_turf(src)) qdel(src) return if(seed.get_trait(TRAIT_FLESH_COLOUR)) - to_chat(user, "You slice up \the [src].") + to_chat(user, "You slice up \the [src].") var/slices = rand(3,5) var/reagents_to_transfer = round(reagents.total_volume/slices) for(var/i=1; i<=slices; i++) @@ -316,7 +316,7 @@ if(NG.get_amount() >= NG.max_amount) continue NG.attackby(G, user) - to_chat(user, "You add the newly-formed carpet to the stack. It now contains [G.get_amount()] tiles.") + to_chat(user, "You add the newly-formed carpet to the stack. It now contains [G.get_amount()] tiles.") qdel(src) return diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 57d6b74376..5e214c1fe3 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -796,7 +796,7 @@ to_chat(user, "You fail to harvest anything useful.") else if(istype(user)) - to_chat(user, "You [harvest_sample ? "take a sample" : "harvest"] from the [display_name].") + to_chat(user, "You [harvest_sample ? "take a sample" : "harvest"] from the [display_name].") //This may be a new line. Update the global if it is. if(name == "new line" || !(name in SSplants.seeds)) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index ee758860e2..8919b4ede5 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -17,7 +17,7 @@ if(genes.len) var/choice = tgui_alert(user, "Are you sure you want to wipe the disk?", "Xenobotany Data", list("No", "Yes")) if(src && user && genes && choice && choice == "Yes" && user.Adjacent(get_turf(src))) - to_chat(user, "You wipe the disk data.") + to_chat(user, "You wipe the disk data.") name = initial(name) desc = initial(name) genes = list() @@ -68,30 +68,30 @@ active = 0 if(failed_task) failed_task = 0 - visible_message("\icon[src][bicon(src)] [src] pings unhappily, flashing a red warning light.") + visible_message("\icon[src][bicon(src)] [src] pings unhappily, flashing a red warning light.") else - visible_message("\icon[src][bicon(src)] [src] pings happily.") + visible_message("\icon[src][bicon(src)] [src] pings happily.") if(eject_disk) eject_disk = 0 if(loaded_disk) loaded_disk.loc = get_turf(src) - visible_message("\icon[src][bicon(src)] [src] beeps and spits out [loaded_disk].") + visible_message("\icon[src][bicon(src)] [src] beeps and spits out [loaded_disk].") loaded_disk = null /obj/machinery/botany/attackby(obj/item/weapon/W as obj, mob/user as mob) if(istype(W,/obj/item/seeds)) if(seed) - to_chat(user, "There is already a seed loaded.") + to_chat(user, "There is already a seed loaded.") return var/obj/item/seeds/S =W if(S.seed && S.seed.get_trait(TRAIT_IMMUTABLE) > 0) - to_chat(user, "That seed is not compatible with our genetics technology.") + to_chat(user, "That seed is not compatible with our genetics technology.") else user.drop_from_inventory(W) W.loc = src seed = W - to_chat(user, "You load [W] into [src].") + to_chat(user, "You load [W] into [src].") return if(default_deconstruction_screwdriver(user, W)) @@ -105,24 +105,24 @@ // return if(istype(W,/obj/item/weapon/disk/botany)) if(loaded_disk) - to_chat(user, "There is already a data disk loaded.") + to_chat(user, "There is already a data disk loaded.") return else var/obj/item/weapon/disk/botany/B = W if(B.genes && B.genes.len) if(!disk_needs_genes) - to_chat(user, "That disk already has gene data loaded.") + to_chat(user, "That disk already has gene data loaded.") return else if(disk_needs_genes) - to_chat(user, "That disk does not have any gene data loaded.") + to_chat(user, "That disk does not have any gene data loaded.") return user.drop_from_inventory(W) W.loc = src loaded_disk = W - to_chat(user, "You load [W] into [src].") + to_chat(user, "You load [W] into [src].") return ..() diff --git a/code/modules/hydroponics/seed_storage.dm b/code/modules/hydroponics/seed_storage.dm index e1d1fafd11..749f6e4920 100644 --- a/code/modules/hydroponics/seed_storage.dm +++ b/code/modules/hydroponics/seed_storage.dm @@ -389,7 +389,7 @@ /obj/machinery/seed_storage/attackby(var/obj/item/O as obj, var/mob/user as mob) if (istype(O, /obj/item/seeds) && !lockdown) add(O) - user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].") + user.visible_message("[user] puts \the [O.name] into \the [src].", "You put \the [O] into \the [src].") return else if (istype(O, /obj/item/weapon/storage/bag/plants) && !lockdown) var/obj/item/weapon/storage/P = O @@ -398,17 +398,17 @@ ++loaded add(G) if (loaded) - user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].") + user.visible_message("[user] puts the seeds from \the [O.name] into \the [src].", "You put the seeds from \the [O.name] into \the [src].") else to_chat(user, "There are no seeds in \the [O.name].") return else if(O.is_wrench()) playsound(src, O.usesound, 50, 1) anchored = !anchored - to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") else if(O.is_screwdriver()) panel_open = !panel_open - to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") + to_chat(user, "You [panel_open ? "open" : "close"] the maintenance panel.") playsound(src, O.usesound, 50, 1) cut_overlays() if(panel_open) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index bb33a4e229..884999075a 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -175,13 +175,13 @@ if(weedlevel > 0) nymph.reagents.add_reagent("glucose", weedlevel) weedlevel = 0 - nymph.visible_message("[nymph] begins rooting through [src], ripping out weeds and eating them noisily.","You begin rooting through [src], ripping out weeds and eating them noisily.") + nymph.visible_message("[nymph] begins rooting through [src], ripping out weeds and eating them noisily.","You begin rooting through [src], ripping out weeds and eating them noisily.") else if(nymph.nutrition > 100 && nutrilevel < 10) nymph.nutrition -= ((10-nutrilevel)*5) nutrilevel = 10 - nymph.visible_message("[nymph] secretes a trickle of green liquid, refilling [src].","You secrete a trickle of green liquid, refilling [src].") + nymph.visible_message("[nymph] secretes a trickle of green liquid, refilling [src].","You secrete a trickle of green liquid, refilling [src].") else - nymph.visible_message("[nymph] rolls around in [src] for a bit.","You roll around in [src] for a bit.") + nymph.visible_message("[nymph] rolls around in [src] for a bit.","You roll around in [src] for a bit.") return /obj/machinery/portable_atmospherics/hydroponics/Initialize() @@ -344,7 +344,7 @@ if(closed_system) if(user) - to_chat(user, "You can't harvest from the plant while the lid is shut.") + to_chat(user, "You can't harvest from the plant while the lid is shut.") return if(user) @@ -372,7 +372,7 @@ if(!user || !dead) return if(closed_system) - to_chat(user, "You can't remove the dead plant while the lid is shut.") + to_chat(user, "You can't remove the dead plant while the lid is shut.") return seed = null @@ -383,7 +383,7 @@ mutation_mod = 0 age_mod = 0 //CHOMPedit - to_chat(user, "You remove the dead plant.") + to_chat(user, "You remove the dead plant.") lastproduce = 0 check_health() return @@ -440,11 +440,11 @@ return if(ishuman(usr) || istype(usr, /mob/living/silicon/robot)) if(labelled) - to_chat(usr, "You remove the label.") + to_chat(usr, "You remove the label.") labelled = null update_icon() else - to_chat(usr, "There is no label to remove.") + to_chat(usr, "There is no label to remove.") return /obj/machinery/portable_atmospherics/hydroponics/verb/setlight() @@ -458,7 +458,7 @@ var/new_light = tgui_input_list(usr, "Specify a light level.", "Light Level", list(0,1,2,3,4,5,6,7,8,9,10)) if(new_light) tray_light = new_light - to_chat(usr, "You set the tray to a light level of [tray_light] lumens.") + to_chat(usr, "You set the tray to a light level of [tray_light] lumens.") return /obj/machinery/portable_atmospherics/hydroponics/proc/check_level_sanity() @@ -495,7 +495,7 @@ weedlevel = 0 update_icon() - visible_message("The [previous_plant] has suddenly mutated into [seed.display_name]!") + visible_message("The [previous_plant] has suddenly mutated into [seed.display_name]!") return @@ -507,15 +507,15 @@ if(O.is_wirecutter() || istype(O, /obj/item/weapon/surgical/scalpel)) if(!seed) - to_chat(user, "There is nothing to take a sample from in \the [src].") + to_chat(user, "There is nothing to take a sample from in \the [src].") return if(sampled) - to_chat(user, "You have already sampled from this plant.") + to_chat(user, "You have already sampled from this plant.") return if(dead) - to_chat(user, "The plant is dead.") + to_chat(user, "The plant is dead.") return // Create a sample. @@ -540,14 +540,14 @@ if(seed) return ..() else - to_chat(user, "There's no plant to inject.") + to_chat(user, "There's no plant to inject.") return 1 else if(seed) //Leaving this in in case we want to extract from plants later. - to_chat(user, "You can't get any extract out of this plant.") + to_chat(user, "You can't get any extract out of this plant.") else - to_chat(user, "There's nothing to draw something from.") + to_chat(user, "There's nothing to draw something from.") return 1 else if (istype(O, /obj/item/seeds)) @@ -558,11 +558,11 @@ user.remove_from_mob(O) if(!S.seed) - to_chat(user, "The packet seems to be empty. You throw it away.") + to_chat(user, "The packet seems to be empty. You throw it away.") qdel(O) return - to_chat(user, "You plant the [S.seed.seed_name] [S.seed.seed_noun].") + to_chat(user, "You plant the [S.seed.seed_name] [S.seed.seed_noun].") plant_seeds(S) else @@ -594,7 +594,7 @@ toxins += spray.toxicity pestlevel -= spray.pest_kill_str weedlevel -= spray.weed_kill_str - to_chat(user, "You spray [src] with [O].") + to_chat(user, "You spray [src] with [O].") playsound(src, 'sound/effects/spray3.ogg', 50, 1, -6) qdel(O) check_health() @@ -607,7 +607,7 @@ playsound(src, O.usesound, 50, 1) anchored = !anchored - to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") else if(istype(O,/obj/item/device/multitool)) if(!anchored) @@ -709,7 +709,7 @@ /obj/machinery/portable_atmospherics/hydroponics/proc/close_lid(var/mob/living/user) closed_system = !closed_system - to_chat(user, "You [closed_system ? "close" : "open"] the tray's lid.") + to_chat(user, "You [closed_system ? "close" : "open"] the tray's lid.") update_icon() #undef AGE_MOD_MAX //CHOMPedit \ No newline at end of file diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2b8395d5c9..33918a0950 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /mob/observer name = "observer" desc = "This shouldn't appear" @@ -1044,3 +1045,1050 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set name = "Respawn" set category = "Ghost" src.abandon_mob() +======= +/mob/observer + name = "observer" + desc = "This shouldn't appear" + density = FALSE + vis_flags = NONE + +/mob/observer/dead + name = "ghost" + desc = "It's a g-g-g-g-ghooooost!" //jinkies! + icon = 'icons/mob/ghost.dmi' + icon_state = "ghost" + stat = DEAD + canmove = 0 + blinded = 0 + anchored = TRUE // don't get pushed around + + var/can_reenter_corpse + var/datum/hud/living/carbon/hud = null // hud + var/bootime = 0 + var/started_as_observer //This variable is set to 1 when you enter the game as an observer. + //If you died in the game and are a ghsot - this will remain as null. + //Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot. + var/has_enabled_antagHUD = 0 + var/medHUD = 0 + var/secHUD = 0 + var/antagHUD = 0 + universal_speak = 1 + var/atom/movable/following = null + var/admin_ghosted = 0 + var/anonsay = 0 + var/ghostvision = 1 //is the ghost able to see things humans can't? + var/lighting_alpha = 255 + incorporeal_move = 1 + + var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil. + var/ghost_sprite = null + var/global/list/possible_ghost_sprites = list( + "Clear" = "blank", + "Green Blob" = "otherthing", + "Bland" = "ghost", + "Robed-B" = "ghost1", + "Robed-BAlt" = "ghost2", + "King" = "ghostking", + "Shade" = "shade", + "Hecate" = "ghost-narsie", + "Glowing Statue" = "armour", + "Artificer" = "artificer", + "Behemoth" = "behemoth", + "Harvester" = "harvester", + "Wraith" = "wraith", + "Viscerator" = "viscerator", + "Corgi" = "corgi", + "Tamaskan" = "tamaskan", + "Black Cat" = "blackcat", + "Lizard" = "lizard", + "Goat" = "goat", + "Space Bear" = "bear", + "Bats" = "bat", + "Chicken" = "chicken_white", + "Parrot"= "parrot_fly", + "Goose" = "goose", + "Penguin" = "penguin", + "Brown Crab" = "crab", + "Gray Crab" = "evilcrab", + "Trout" = "trout-swim", + "Salmon" = "salmon-swim", + "Pike" = "pike-swim", + "Koi" = "koi-swim", + "Carp" = "carp", + "Red Robes" = "robe_red", + "Faithless" = "faithless", + "Shadowform" = "forgotten", + "Dark Ethereal" = "bloodguardian", + "Holy Ethereal" = "lightguardian", + "Red Elemental" = "magicRed", + "Blue Elemental" = "magicBlue", + "Pink Elemental" = "magicPink", + "Orange Elemental" = "magicOrange", + "Green Elemental" = "magicGreen", + "Daemon" = "daemon", + "Guard Spider" = "guard", + "Hunter Spider" = "hunter", + "Nurse Spider" = "nurse", + "Rogue Drone" = "drone", + "ED-209" = "ed209", + "Beepsky" = "secbot" + ) + var/last_revive_notification = null // world.time of last notification, used to avoid spamming players from defibs or cloners. + var/cleanup_timer // Refernece to a timer that will delete this mob if no client returns + +/mob/observer/dead/New(mob/body) + + appearance = body + invisibility = INVISIBILITY_OBSERVER + layer = BELOW_MOB_LAYER + plane = PLANE_GHOSTS + alpha = 127 + + sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF + see_invisible = SEE_INVISIBLE_OBSERVER + see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but... + + var/turf/T + if(ismob(body)) + T = get_turf(body) //Where is the body located? + attack_log = body.attack_log //preserve our attack logs by copying them to our ghost + gender = body.gender + if(body.mind && body.mind.name) + name = body.mind.name + else + if(body.real_name) + name = body.real_name + else + if(gender == MALE) + name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + else + name = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names)) + + mind = body.mind //we don't transfer the mind but we keep a reference to it. + + // Fix for naked ghosts. + // Unclear why this isn't being grabbed by appearance. + if(ishuman(body)) + var/mob/living/carbon/human/H = body + add_overlay(H.overlays_standing) + default_pixel_x = body.default_pixel_x + default_pixel_y = body.default_pixel_y + if(!T && length(latejoin)) + T = pick(latejoin) //Safety in case we cannot find the body's position + if(T) + forceMove(T) + else + moveToNullspace() + to_chat(src, "Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.") + + if(!name) //To prevent nameless ghosts + name = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names)) + real_name = name + animate(src, pixel_y = 2, time = 10, loop = -1) + animate(pixel_y = default_pixel_y, time = 10, loop = -1) + observer_mob_list += src + ..() + +/mob/observer/dead/Topic(href, href_list) + if (href_list["track"]) + var/mob/target = locate(href_list["track"]) in mob_list + if(target) + ManualFollow(target) + if(href_list["reenter"]) + reenter_corpse() + return + +/mob/observer/dead/attackby(obj/item/W, mob/user) + if(istype(W,/obj/item/weapon/book/tome)) + var/mob/observer/dead/M = src + M.manifest(user) + +/mob/observer/dead/CanPass(atom/movable/mover, turf/target) + return TRUE + +/mob/observer/dead/set_stat(var/new_stat) + if(new_stat != DEAD) + CRASH("It is best if observers stay dead, thank you.") + +/mob/observer/dead/examine_icon() + var/icon/I = get_cached_examine_icon(src) + if(!I) + I = getFlatIcon(src, defdir = SOUTH, no_anim = TRUE) + set_cached_examine_icon(src, I, 200 SECONDS) + return I + +/mob/observer/dead/examine(mob/user) + . = ..() + + if(is_admin(user)) + . += "\t>[ADMIN_FULLMONTY(src)]" + +/* +Transfer_mind is there to check if mob is being deleted/not going to have a body. +Works together with spawning an observer, noted above. +*/ + +/mob/observer/dead/Life() + ..() + if(!loc) return + if(!client) return 0 + + handle_regular_hud_updates() + handle_vision() + +/mob/proc/ghostize(var/can_reenter_corpse = 1) + if(key) + if(ishuman(src)) + var/mob/living/carbon/human/H = src + if(H.vr_holder && !can_reenter_corpse) + H.exit_vr() + return 0 + var/mob/observer/dead/ghost = new(src) //Transfer safety to observer spawning proc. + ghost.can_reenter_corpse = can_reenter_corpse + ghost.timeofdeath = src.timeofdeath //BS12 EDIT + ghost.key = key + if(istype(loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = loc + M.update() + else if(istype(loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = loc + B.update() + if(ghost.client) + ghost.client.time_died_as_mouse = ghost.timeofdeath + if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. + ghost.verbs -= /mob/observer/dead/verb/toggle_antagHUD // Poor guys, don't know what they are missing! + return ghost + +/* +This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues. +*/ +/mob/living/verb/ghost() + set category = "OOC" + set name = "Ghost" + set desc = "Relinquish your life and enter the land of the dead." + + if(stat == DEAD && !forbid_seeing_deadchat) + announce_ghost_joinleave(ghostize(1)) + else + var/response + if(src.client && src.client.holder) + response = tgui_alert(src, "You have the ability to Admin-Ghost. The regular Ghost verb will announce your presence to dead chat. Both variants will allow you to return to your body using 'aghost'.\n\nWhat do you wish to do?", "Are you sure you want to ghost?", list("Admin Ghost", "Ghost", "Stay in body")) + if(response == "Admin Ghost") + if(!src.client) + return + src.client.admin_ghost() + else + response = tgui_alert(src, "Are you -sure- you want to ghost?\n(You are alive, or otherwise have the potential to become alive. Don't abuse ghost unless you are inside a cryopod or equivalent! You can't change your mind so choose wisely!)", "Are you sure you want to ghost?", list("Stay in body", "Ghost")) + if(response != "Ghost") + return + resting = 1 + var/turf/location = get_turf(src) + var/special_role = check_special_role() + if(!istype(loc,/obj/machinery/cryopod)) + log_and_message_admins("has ghosted outside cryo[special_role ? " as [special_role]" : ""]. (JMP)",usr) + else if(special_role) + log_and_message_admins("has ghosted in cryo as [special_role]. (JMP)",usr) + var/mob/observer/dead/ghost = ghostize(0) // 0 parameter is so we can never re-enter our body, "Charlie, you can never come baaaack~" :3 + if(ghost) + ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. + ghost.set_respawn_timer() + announce_ghost_joinleave(ghost) + +/mob/observer/dead/can_use_hands() return 0 +/mob/observer/dead/is_active() return 0 + +/mob/observer/dead/Stat() + ..() + if(statpanel("Status")) + if(emergency_shuttle) + var/eta_status = emergency_shuttle.get_status_panel_eta() + if(eta_status) + stat(null, eta_status) + +/mob/observer/dead/verb/reenter_corpse() + set category = "Ghost" + set name = "Re-enter Corpse" + if(!client) return + if(!(mind && mind.current && can_reenter_corpse)) + to_chat(src, "You have no body.") + return + if(mind.current.key && copytext(mind.current.key,1,2)!="@") //makes sure we don't accidentally kick any clients + to_chat(usr, "Another consciousness is in your body... it is resisting you.") + return + //VOREStation Add + if(prevent_respawns.Find(mind.name)) + to_chat(usr, "You already quit this round as this character, sorry!") + return + //VOREStation Add End + if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune). + var/found_rune + for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune + if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune. + found_rune = 1 + break + if(!found_rune) + to_chat(usr, "The astral cord that ties your body and your spirit has been severed. You are likely to wander the realm beyond until your body is finally dead and thus reunited with you.") + return + mind.current.ajourn=0 + mind.current.key = key + mind.current.teleop = null + if(istype(mind.current.loc, /obj/structure/morgue)) + var/obj/structure/morgue/M = mind.current.loc + M.update(1) + else if(istype(mind.current.loc, /obj/structure/closet/body_bag)) + var/obj/structure/closet/body_bag/B = mind.current.loc + B.update(1) + if(!admin_ghosted) + announce_ghost_joinleave(mind, 0, "They now occupy their body again.") + return 1 + +/mob/observer/dead/verb/toggle_medHUD() + set category = "Ghost" + set name = "Toggle MedicHUD" + set desc = "Toggles Medical HUD allowing you to see how everyone is doing" + + medHUD = !medHUD + plane_holder.set_vis(VIS_CH_HEALTH, medHUD) + plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD) + to_chat(src, "Medical HUD [medHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/verb/toggle_secHUD() + set category = "Ghost" + set name = "Toggle Security HUD" + set desc = "Toggles Security HUD allowing you to see people's displayed ID's job, wanted status, etc" + + secHUD = !secHUD + plane_holder.set_vis(VIS_CH_ID, secHUD) + plane_holder.set_vis(VIS_CH_WANTED, secHUD) + plane_holder.set_vis(VIS_CH_IMPTRACK, secHUD) + plane_holder.set_vis(VIS_CH_IMPLOYAL, secHUD) + plane_holder.set_vis(VIS_CH_IMPCHEM, secHUD) + to_chat(src, "Security HUD [secHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/verb/toggle_antagHUD() + set category = "Ghost" + set name = "Toggle AntagHUD" + set desc = "Toggles AntagHUD allowing you to see who is the antagonist" + + if(!config.antag_hud_allowed && !client.holder) + to_chat(src, "Admins have disabled this for this round.") + return + if(jobban_isbanned(src, "AntagHUD")) + to_chat(src, "You have been banned from using this feature") + return + if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder) + var/response = tgui_alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?",list("Yes","No")) + if(response == "No") return + can_reenter_corpse = FALSE + set_respawn_timer(-1) // Foreeeever + if(!has_enabled_antagHUD && !client.holder) + has_enabled_antagHUD = TRUE + + antagHUD = !antagHUD + plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD) + to_chat(src, "AntagHUD [antagHUD ? "Enabled" : "Disabled"]") + +/mob/observer/dead/proc/jumpable_areas() + var/list/areas = return_sorted_areas() + if(client?.holder) + return areas + + for(var/key in areas) + var/area/A = areas[key] + if(A.z in using_map?.secret_levels) + areas -= key + if(A.z in using_map?.hidden_levels) + areas -= key + + return areas + +/mob/observer/dead/proc/jumpable_mobs() + var/list/mobs = getmobs() + if(client?.holder) + return mobs + + for(var/key in mobs) + var/mobz = get_z(mobs[key]) + if(mobz in using_map?.secret_levels) + mobs -= key + if(mobz in using_map?.hidden_levels) + mobs -= key + + return mobs + +/mob/observer/dead/verb/dead_tele(areaname as anything in jumpable_areas()) + set name = "Teleport" + set category = "Ghost" + set desc = "Teleport to a location." + + if(!istype(usr, /mob/observer/dead)) + to_chat(usr, "Not when you're not dead!") + return + + var/area/A + + if(!areaname) + var/list/areas = jumpable_areas() + var/input = tgui_input_list(usr, "Select an area:", "Ghost Teleport", areas) + if(!input) + return + A = areas[input] + if(!A) + return + + if(!istype(usr, /mob/observer/dead)) + to_chat(usr, "Not when you're not dead!") + return + + usr.forceMove(pick(get_area_turfs(A || jumpable_areas()[areaname]))) + usr.on_mob_jump() + +/mob/observer/dead/verb/follow(mobname as anything in jumpable_mobs()) + set name = "Follow" + set category = "Ghost" + set desc = "Follow and haunt a mob." + + if(!istype(usr, /mob/observer/dead)) + to_chat(usr, "Not when you're not dead!") + return + + var/mob/M + + if(!mobname) + var/list/possible_mobs = jumpable_mobs() + var/input = tgui_input_list(usr, "Select a mob:", "Ghost Follow", possible_mobs) + if(!input) + return + M = possible_mobs[input] + if(!M) + return + + if(!istype(usr, /mob/observer/dead)) + to_chat(usr, "Not when you're not dead!") + return + + ManualFollow(M || jumpable_mobs()[mobname]) + +/mob/observer/dead/forceMove(atom/destination) + if(client?.holder) + return ..() + + if(get_z(destination) in using_map?.secret_levels) + to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) + if(following) + stop_following() + return + + return ..() + +/mob/observer/dead/Move(atom/newloc, direct = 0, movetime) + if(client?.holder) + return ..() + + if(get_z(newloc) in using_map?.secret_levels) + to_chat(src,SPAN_WARNING("Sorry, that z-level does not allow ghosts.")) + if(following) + stop_following() + return + + return ..() + +// This is the ghost's follow verb with an argument +/mob/observer/dead/proc/ManualFollow(var/atom/movable/target) + if(!target) + return + + var/turf/targetloc = get_turf(target) + if(check_holy(targetloc)) + to_chat(usr, "You cannot follow a mob standing on holy grounds!") + return + if(get_z(target) in using_map?.secret_levels) + to_chat(src, "Sorry, that target is in an area that ghosts aren't allowed to go.") + return + if(target != src) + if(following && following == target) + return + following = target + to_chat(src, "Now following [target]") + if(ismob(target)) + var/target_turf = get_turf(target) + if(!target_turf) + to_chat(usr, "This mob does not seem to exist in the tangible world.") + return + forceMove(target_turf) + var/mob/M = target + M.following_mobs += src + else + spawn(0) + while(target && following == target && client) + var/turf/T = get_turf(target) + if(!T) + break + // To stop the ghost flickering. + if(loc != T) + forceMove(T) + sleep(15) + + var/icon/I = icon(target.icon,target.icon_state,target.dir) + + var/orbitsize = (I.Width()+I.Height())*0.5 + orbitsize -= (orbitsize/world.icon_size)*(world.icon_size*0.25) + + var/rot_seg + + /* We don't have this pref yet + switch(ghost_orbit) + if(GHOST_ORBIT_TRIANGLE) + rot_seg = 3 + if(GHOST_ORBIT_SQUARE) + rot_seg = 4 + if(GHOST_ORBIT_PENTAGON) + rot_seg = 5 + if(GHOST_ORBIT_HEXAGON) + rot_seg = 6 + else //Circular + rot_seg = 36 //360/10 bby, smooth enough aproximation of a circle + */ + + orbit(target, orbitsize, FALSE, 20, rot_seg) + +/mob/observer/dead/orbit() + set_dir(2) //reset dir so the right directional sprites show up + return ..() + +/mob/observer/dead/stop_orbit() + . = ..() + //restart our floating animation after orbit is done. + pixel_y = default_pixel_y + pixel_x = default_pixel_x + transform = null + animate(src, pixel_y = 2, time = 10, loop = -1) + animate(pixel_y = default_pixel_y, time = 10, loop = -1) + +/mob/observer/dead/proc/stop_following() + following = null + stop_orbit() + +/mob/proc/update_following() + . = get_turf(src) + for(var/mob/observer/dead/M in following_mobs) + if(!.) + M.stop_following() + + if(M.following != src) + following_mobs -= M + else + if(M.loc != .) + M.forceMove(.) + +/mob + var/list/following_mobs = list() + +/mob/Destroy() + for(var/mob/observer/dead/M in following_mobs) + M.stop_following() + following_mobs = null + return ..() + +/mob/observer/dead/Destroy() + if(ismob(following)) + var/mob/M = following + M.following_mobs -= src + stop_following() + observer_mob_list -= src + return ..() + +/mob/Moved(atom/old_loc, direction, forced = FALSE) + . = ..() + update_following() + +/mob/Life() + // to catch teleports etc which directly set loc + update_following() + return ..() + +/mob/proc/check_holy(var/turf/T) + return 0 + +/mob/observer/dead/check_holy(var/turf/T) + if(check_rights(R_ADMIN|R_FUN|R_EVENT, 0, src)) + return 0 + + return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists)) + +/mob/observer/dead/verb/jumptomob() //Moves the ghost instead of just changing the ghosts's eye -Nodrak + set category = "Ghost" + set name = "Jump to Mob" + set desc = "Teleport to a mob" + set popup_menu = FALSE + + if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! + return + + var/list/possible_mobs = jumpable_mobs() + var/input = tgui_input_list(usr, "Select a mob:", "Ghost Jump", possible_mobs) + if(!input) + return + + var/target = possible_mobs[input] + if (!target)//Make sure we actually have a target + return + else + var/mob/M = target //Destination mob + var/turf/T = get_turf(M) //Turf of the destination mob + + if(T && isturf(T)) //Make sure the turf exists, then move the source to that destination. + forceMove(T) + stop_following() + else + to_chat(src, "This mob is not located in the game world.") + +/mob/observer/dead/memory() + set hidden = 1 + to_chat(src, "You are dead! You have no mind to store memory!") + +/mob/observer/dead/add_memory() + set hidden = 1 + to_chat(src, "You are dead! You have no mind to store memory!") + +/mob/observer/dead/Post_Incorpmove() + stop_following() + +/mob/observer/dead/verb/analyze_air() + set name = "Analyze Air" + set category = "Ghost" + + if(!istype(usr, /mob/observer/dead)) return + + // Shamelessly copied from the Gas Analyzers + if (!( istype(usr.loc, /turf) )) + return + + var/datum/gas_mixture/environment = usr.loc.return_air() + + var/pressure = environment.return_pressure() + var/total_moles = environment.total_moles + var/list/gas_analyzing = list() + gas_analyzing += "Results:" + if(abs(pressure - ONE_ATMOSPHERE) < 10) + gas_analyzing += "Pressure: [round(pressure,0.1)] kPa" + else + gas_analyzing += "Pressure: [round(pressure,0.1)] kPa" + if(total_moles) + for(var/g in environment.gas) + gas_analyzing += "[gas_data.name[g]]: [round((environment.gas[g] / total_moles) * 100)]% ([round(environment.gas[g], 0.01)] moles)" + gas_analyzing += "Temperature: [round(environment.temperature-T0C,0.1)]°C ([round(environment.temperature,0.1)]K)" + gas_analyzing += "Heat Capacity: [round(environment.heat_capacity(),0.1)]" + to_chat(src, "[jointext(gas_analyzing, "
")]
") + +/mob/observer/dead/verb/check_radiation() + set name = "Check Radiation" + set category = "Ghost" + + var/turf/t = get_turf(src) + if(t) + var/rads = SSradiation.get_rads_at_turf(t) + to_chat(src, "Radiation level: [rads ? rads : "0"] Bq.") + + +/mob/observer/dead/verb/become_mouse() + set name = "Become mouse" + set category = "Ghost" + + if(config.disable_player_mice) + to_chat(src, "Spawning as a mouse is currently disabled.") + return + + //VOREStation Add Start + if(jobban_isbanned(src, "GhostRoles")) + to_chat(src, "You cannot become a mouse because you are banned from playing ghost roles.") + return + //VOREStation Add End + + if(!MayRespawn(1)) + return + + var/turf/T = get_turf(src) + if(!T || (T.z in using_map.admin_levels)) + to_chat(src, "You may not spawn as a mouse on this Z-level.") + return + + var/timedifference = world.time - client.time_died_as_mouse + if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) + var/timedifference_text + timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") + to_chat(src, "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left.") + return + + var/response = tgui_alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!")) + if(response != "Squeek!") return //Hit the wrong key...again. + + + //find a viable mouse candidate + var/mob/living/simple_mob/animal/passive/mouse/host + var/obj/machinery/atmospherics/unary/vent_pump/vent_found + var/list/found_vents = list() + for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines) + if(!v.welded && v.z == T.z && v.network && v.network.normal_members.len > 20) + found_vents.Add(v) + if(found_vents.len) + vent_found = pick(found_vents) + host = new /mob/living/simple_mob/animal/passive/mouse(vent_found) + else + to_chat(src, "Unable to find any unwelded vents to spawn mice at.") + + if(host) + if(config.uneducated_mice) + host.universal_understand = 0 + announce_ghost_joinleave(src, 0, "They are now a mouse.") + host.ckey = src.ckey + host.add_ventcrawl(vent_found) + to_chat(host, "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.") + +/mob/observer/dead/verb/view_manfiest() + set name = "Show Crew Manifest" + set category = "Ghost" + + var/dat + dat += "

Crew Manifest

" + dat += data_core.get_manifest() + + src << browse(dat, "window=manifest;size=370x420;can_close=1") + +//This is called when a ghost is drag clicked to something. +/mob/observer/dead/MouseDrop(atom/over) + if(!usr || !over) return + if (isobserver(usr) && usr.client && usr.client.holder && isliving(over)) + if (usr.client.holder.cmd_ghost_drag(src,over)) + return + + return ..() + +//Used for drawing on walls with blood puddles as a spooky ghost. +/mob/observer/dead/verb/bloody_doodle() + + set category = "Ghost" + set name = "Write in blood" + set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC." + + if(!(config.cult_ghostwriter)) + to_chat(src, "That verb is not currently permitted.") + return + + if (!src.stat) + return + + if (usr != src) + return 0 //something is terribly wrong + + var/ghosts_can_write + if(ticker.mode.name == "cult") + if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists) + ghosts_can_write = 1 + + if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such. + to_chat(src, "The veil is not thin enough for you to do that.") + return + + var/list/choices = list() + for(var/obj/effect/decal/cleanable/blood/B in view(1,src)) + if(B.amount > 0) + choices += B + + if(!choices.len) + to_chat(src, "There is no blood to use nearby.") + return + + var/obj/effect/decal/cleanable/blood/choice = tgui_input_list(src, "What blood would you like to use?", "Blood Choice", choices) + + var/direction = tgui_input_list(src,"Which way?","Tile selection", list("Here","North","South","East","West")) + var/turf/simulated/T = src.loc + if (direction != "Here") + T = get_step(T,text2dir(direction)) + + if (!istype(T)) + to_chat(src, "You cannot doodle there.") + return + + if(!choice || choice.amount == 0 || !(src.Adjacent(choice))) + return + + var/doodle_color = (choice.basecolor) ? choice.basecolor : "#A10808" + + var/num_doodles = 0 + for (var/obj/effect/decal/cleanable/blood/writing/W in T) + num_doodles++ + if (num_doodles > 4) + to_chat(src, "There is no space to write on!") + return + + var/max_length = 50 + + var/message = sanitize(tgui_input_text(usr, "Write a message. It cannot be longer than [max_length] characters.","Blood writing", "", max_length)) + + if (message) + + if (length(message) > max_length) + message += "-" + to_chat(src, "You ran out of blood to write with!") + + var/obj/effect/decal/cleanable/blood/writing/W = new(T) + W.basecolor = doodle_color + W.update_icon() + W.message = message + W.add_hiddenprint(src) + W.visible_message("Invisible fingers crudely paint something in blood on [T]...") + +/mob/observer/dead/pointed(atom/A as mob|obj|turf in view()) + if(!..()) + return 0 + usr.visible_message("[src] points to [A].") + return 1 + +/mob/observer/dead/proc/manifest(mob/user) + is_manifest = TRUE + verbs |= /mob/observer/dead/proc/toggle_visibility + verbs |= /mob/observer/dead/proc/ghost_whisper + to_chat(src, "As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab.") + if(plane != PLANE_WORLD) + user.visible_message( \ + "\The [user] drags ghost, [src], to our plane of reality!", \ + "You drag [src] to our plane of reality!" \ + ) + toggle_visibility(TRUE) + else + var/datum/gender/T = gender_datums[user.get_visible_gender()] + user.visible_message ( \ + "\The [user] just tried to smash [T.his] book into that ghost! It's not very effective.", \ + "You get the feeling that the ghost can't become any more visible." \ + ) + +/mob/observer/dead/proc/toggle_icon(var/icon) + if(!client) + return + + var/iconRemoved = 0 + for(var/image/I in client.images) + if(I.icon_state == icon) + iconRemoved = 1 + qdel(I) + + if(!iconRemoved) + var/image/J = image('icons/mob/mob.dmi', loc = src, icon_state = icon) + client.images += J + +/mob/observer/dead/proc/toggle_visibility(var/forced = 0) + set category = "Ghost" + set name = "Toggle Visibility" + set desc = "Allows you to turn (in)visible (almost) at will." + + var/toggled_invisible + if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600) + to_chat(src, "You must gather strength before you can turn visible again...") + return + + if(plane == PLANE_WORLD) + toggled_invisible = world.time + visible_message("It fades from sight...", "You are now invisible.") + else + to_chat(src, "You are now visible!") + + plane = (plane == PLANE_GHOSTS) ? PLANE_WORLD : PLANE_GHOSTS + invisibility = (plane == PLANE_WORLD) ? 0 : INVISIBILITY_OBSERVER + + // Give the ghost a cult icon which should be visible only to itself + toggle_icon("cult") + +/mob/observer/dead/verb/toggle_anonsay() + set category = "Ghost" + set name = "Toggle Anonymous Chat" + set desc = "Toggles showing your key in dead chat." + + src.anonsay = !src.anonsay + if(anonsay) + to_chat(src, "Your key won't be shown when you speak in dead chat.") + else + to_chat(src, "Your key will be publicly visible again.") + +/mob/observer/dead/canface() + return 1 + +/mob/observer/dead/proc/can_admin_interact() + return check_rights(R_ADMIN|R_EVENT, 0, src) + +/mob/observer/dead/verb/toggle_ghostsee() + set name = "Toggle Ghost Vision" + set desc = "Toggles your ability to see things only ghosts can see, like other ghosts" + set category = "Ghost" + ghostvision = !ghostvision + updateghostsight() + to_chat(src, "You [ghostvision ? "now" : "no longer"] have ghost vision.") + +/mob/observer/dead/verb/toggle_darkness() + set name = "Toggle Darkness" + set desc = "Toggles your ability to see lighting overlays, and the darkness they create." + set category = "Ghost" + + var/static/list/darkness_names = list("normal darkness levels", "30% darkness removed", "70% darkness removed", "no darkness") + var/static/list/darkness_levels = list(255, 178, 76, 0) + + var/index = darkness_levels.Find(lighting_alpha) + if(!index || index >= darkness_levels.len) + index = 1 + else + index++ + + lighting_alpha = darkness_levels[index] + updateghostsight() + to_chat(src, "Your vision now has [darkness_names[index]].") + +/mob/observer/dead/proc/updateghostsight() + plane_holder.set_desired_alpha(VIS_LIGHTING, lighting_alpha) + plane_holder.set_vis(VIS_LIGHTING, lighting_alpha) + plane_holder.set_vis(VIS_GHOSTS, ghostvision) + +/mob/observer/dead/MayRespawn(var/feedback = 0) + if(!client) + return 0 + if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse) + if(feedback) + to_chat(src, "Your non-dead body prevent you from respawning.") + return 0 + if(config.antag_hud_restricted && has_enabled_antagHUD == 1) + if(feedback) + to_chat(src, "antagHUD restrictions prevent you from respawning.") + return 0 + return 1 + +/atom/proc/extra_ghost_link() + return + +/mob/extra_ghost_link(var/atom/ghost) + if(client && eyeobj) + return "|eye" + +/mob/observer/dead/extra_ghost_link(var/atom/ghost) + if(mind && mind.current) + return "|body" + +/proc/ghost_follow_link(var/atom/target, var/atom/ghost) + if((!target) || (!ghost)) return + . = "follow" + . += target.extra_ghost_link(ghost) + +//Culted Ghosts + +/mob/observer/dead/proc/ghost_whisper() + set name = "Spectral Whisper" + set category = "IC" + + if(is_manifest) //Only able to whisper if it's hit with a tome. + var/list/options = list() + for(var/mob/living/Ms in view(src)) + options += Ms + var/mob/living/M = tgui_input_list(src, "Select who to whisper to:", "Whisper to?", options) + if(!M) + return 0 + var/msg = sanitize(tgui_input_text(src, "Message:", "Spectral Whisper")) + if(msg) + log_say("(SPECWHISP to [key_name(M)]): [msg]", src) + to_chat(M, " You hear a strange, unidentifiable voice in your head... [msg]") + to_chat(src, " You said: '[msg]' to [M].") + else + return + return 1 + else + to_chat(src, "You have not been pulled past the veil!") + +/mob/observer/dead/verb/choose_ghost_sprite() + set category = "Ghost" + set name = "Choose Sprite" + + var/choice + var/previous_state + var/finalized = "No" + + while(finalized == "No" && src.client) + choice = tgui_input_list(usr, "What would you like to use for your ghost sprite?", "Ghost Sprite", possible_ghost_sprites) + if(!choice) + return + + if(choice) + icon = 'icons/mob/ghost.dmi' + cut_overlays() + + if(icon_state && icon) + previous_state = icon_state + + icon_state = possible_ghost_sprites[choice] + finalized = tgui_alert(src, "Look at your sprite. Is this what you wish to use?","Ghost Sprite",list("No","Yes")) + + ghost_sprite = possible_ghost_sprites[choice] + + if(finalized == "No") + icon_state = previous_state + +/mob/observer/dead/is_blind() + return FALSE + +/mob/observer/dead/is_deaf() + return FALSE + +/mob/observer/dead/verb/paialert() + set category = "Ghost" + set name = "Blank pAI alert" + set desc = "Flash an indicator light on available blank pAI devices for a smidgen of hope." + + var/time_till_respawn = time_till_respawn() + if(time_till_respawn == -1) // Special case, never allowed to respawn + to_chat(usr, "Respawning is not allowed!") + else if(time_till_respawn) // Nonzero time to respawn + to_chat(usr, "You can't do that yet! You died too recently. You need to wait another [round(time_till_respawn/10/60, 0.1)] minutes.") + return + + if(jobban_isbanned(usr, "pAI")) + to_chat(usr,"You cannot alert pAI cards when you are banned from playing as a pAI.") + return + + if(usr.client.prefs?.be_special & BE_PAI) + var/choice = tgui_alert(usr, "Would you like to submit yourself to the recruitment list too?", "Confirmation", list("No", "Yes")) + if(choice == "Yes") + paiController.recruitWindow(usr) + var/count = 0 + for(var/obj/item/device/paicard/p in all_pai_cards) + var/obj/item/device/paicard/PP = p + if(PP.pai == null) + count++ + PP.add_overlay("pai-ghostalert") + PP.alertUpdate() + spawn(54) + PP.cut_overlays() + to_chat(usr,"Flashing the displays of [count] unoccupied PAIs.") + else + to_chat(usr,"You have 'Be pAI' disabled in your character prefs, so we can't help you.") + +/mob/observer/dead/speech_bubble_appearance() + return "ghost" + +// Lets a ghost know someone's trying to bring them back, and for them to get into their body. +// Mostly the same as TG's sans the hud element, since we don't have TG huds. +/mob/observer/dead/proc/notify_revive(var/message, var/sound, flashwindow = TRUE, var/atom/source) + if((last_revive_notification + 2 MINUTES) > world.time) + return + last_revive_notification = world.time + + if(flashwindow) + window_flash(client) + if(message) + to_chat(src, "[message]") + if(source) + throw_alert("\ref[source]_notify_revive", /obj/screen/alert/notify_cloning, new_master = source) + to_chat(src, "(Click to re-enter)") + if(sound) + SEND_SOUND(src, sound(sound)) + +/mob/observer/dead/verb/respawn() + set name = "Respawn" + set category = "Ghost" + src.abandon_mob() +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index a3ffb55757..a7e24a1dd6 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -68,7 +68,7 @@ var/datum/transcore_db/db = SStranscore.db_by_mind_name(mind.name) if(db) var/datum/transhuman/mind_record/record = db.backed_up[src.mind.name] - if(!(record.dead_state == MR_DEAD)) + if(!(record.dead_state == MR_DEAD)) if((world.time - timeofdeath ) > 5 MINUTES) //Allows notify transcore to be used if you have an entry but for some reason weren't marked as dead record.dead_state = MR_DEAD //Such as if you got scanned but didn't take an implant. It's a little funky, but I mean, you got scanned db.notify(record) //So you probably will want to let someone know if you die. @@ -115,7 +115,7 @@ var/input = tgui_input_list(usr, "Select a ghost pod:", "Ghost Jump", observe_list_format(active_ghost_pods)) if(!input) - to_chat(src, "No active ghost pods detected.") + to_chat(src, "No active ghost pods detected.") return var/target = observe_list_format(active_ghost_pods)[input] @@ -129,8 +129,13 @@ forceMove(T) stop_following() else +<<<<<<< HEAD to_chat(src, "This ghost pod is not located in the game world.") +======= + to_chat(src, "This ghost pod is not located in the game world.") + +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror /mob/observer/dead/verb/findautoresleever() set category = "Ghost" set name = "Find Auto Resleever" @@ -157,4 +162,8 @@ to_chat(src, "There appears to be something wrong with this auto-resleever, try again.") return - forceMove(L) \ No newline at end of file +<<<<<<< HEAD + forceMove(L) +======= + forceMove(L) +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror diff --git a/code/modules/mob/dead/observer/say.dm b/code/modules/mob/dead/observer/say.dm index 49ab8f2710..96aa9ccada 100644 --- a/code/modules/mob/dead/observer/say.dm +++ b/code/modules/mob/dead/observer/say.dm @@ -10,7 +10,7 @@ if(message) client.handle_spam_prevention(MUTE_DEADCHAT) if(client.prefs.muted & MUTE_DEADCHAT) - to_chat(src, "You cannot talk in deadchat (muted).") + to_chat(src, "You cannot talk in deadchat (muted).") return . = say_dead(message) @@ -26,7 +26,7 @@ if(message) client.handle_spam_prevention(MUTE_DEADCHAT) if(client.prefs.muted & MUTE_DEADCHAT) - to_chat(src, "You cannot emote in deadchat (muted).") + to_chat(src, "You cannot emote in deadchat (muted).") return . = emote_dead(message) diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 7c4bbae2da..91d955f81a 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -118,7 +118,7 @@ to_chat(src, "[speaker_name][speaker.GetAltName()] makes a noise, possibly speech, but you cannot hear them.") else var/message_to_send = null - message_to_send = "[speaker_name][speaker.GetAltName()] [track][message]" + message_to_send = "[speaker_name][speaker.GetAltName()] [track][message]" if(check_mentioned(multilingual_to_message(message_pieces)) && is_preference_enabled(/datum/client_preference/check_mention)) message_to_send = "[message_to_send]" @@ -138,15 +138,15 @@ ai_holder.on_hear_say(speaker, multilingual_to_message(message_pieces)) /mob/proc/on_hear_say(var/message) - to_chat(src, message) + to_chat(src, "[message]") if(teleop) - to_chat(teleop, create_text_tag("body", "BODY:", teleop.client) + "[message]") + to_chat(teleop, "[create_text_tag("body", "BODY:", teleop.client)][message]") /mob/living/silicon/on_hear_say(var/message) var/time = say_timestamp() - to_chat(src, "[time] [message]") + to_chat(src, "[time] [message]") if(teleop) - to_chat(teleop, create_text_tag("body", "BODY:", teleop.client) + "[time] [message]") + to_chat(teleop, "[create_text_tag("body", "BODY:", teleop.client)][time] [message]") // Checks if the mob's own name is included inside message. Handles both first and last names. /mob/proc/check_mentioned(var/message) @@ -177,7 +177,7 @@ return tagged_message -/mob/proc/hear_radio(var/list/message_pieces, var/verb = "says", var/part_a, var/part_b, var/part_c, var/mob/speaker = null, var/hard_to_hear = 0, var/vname = "") +/mob/proc/hear_radio(var/list/message_pieces, var/verb = "says", var/part_a, var/part_b, var/part_c, var/part_d, var/part_e, var/mob/speaker = null, var/hard_to_hear = 0, var/vname = "") if(!client) return @@ -190,45 +190,49 @@ var/speaker_name = handle_speaker_name(speaker, vname, hard_to_hear) var/track = handle_track(message, verb, speaker, speaker_name, hard_to_hear) - message = "[encode_html_emphasis(message)][part_c]" + message = "[encode_html_emphasis(message)][part_d]" if((sdisabilities & DEAF) || ear_deaf) if(prob(20)) to_chat(src, "You feel your headset vibrate but can hear nothing from it!") else - on_hear_radio(part_a, speaker_name, track, part_b, message, part_c) + on_hear_radio(part_a, part_b, speaker_name, track, part_c, message, part_d, part_e) /proc/say_timestamp() return "\[[stationtime2text()]\]" -/mob/proc/on_hear_radio(part_a, speaker_name, track, part_b, formatted, part_c) - var/final_message = "[part_a][speaker_name][part_b][formatted][part_c]" +/mob/proc/on_hear_radio(part_a, part_b, speaker_name, track, part_c, formatted, part_d, part_e) + var/final_message = "[part_b][speaker_name][part_c][formatted][part_d]" if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) - final_message = "[final_message]" - to_chat(src, final_message) - -/mob/observer/dead/on_hear_radio(part_a, speaker_name, track, part_b, formatted, part_c) - var/final_message = "[part_a][track][part_b][formatted][part_c]" - if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) - final_message = "[final_message]" - to_chat(src, final_message) - -/mob/living/silicon/on_hear_radio(part_a, speaker_name, track, part_b, formatted, part_c) - var/time = say_timestamp() - var/final_message = "[part_a][speaker_name][part_b][formatted][part_c]" - if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) - final_message = "[time][final_message]" + final_message = "[part_a][final_message][part_e]" else - final_message = "[time][final_message]" + final_message = "[part_a][final_message][part_e]" to_chat(src, final_message) -/mob/living/silicon/ai/on_hear_radio(part_a, speaker_name, track, part_b, formatted, part_c) - var/time = say_timestamp() - var/final_message = "[part_a][track][part_b][formatted][part_c]" +/mob/observer/dead/on_hear_radio(part_a, part_b, speaker_name, track, part_c, formatted, part_d, part_e) + var/final_message = "[part_b][track][part_c][formatted][part_d]" if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) - final_message = "[time][final_message]" + final_message = "[part_a][final_message][part_e]" else - final_message = "[time][final_message]" + final_message = "[part_a][final_message][part_e]" + to_chat(src, final_message) + +/mob/living/silicon/on_hear_radio(part_a, part_b, speaker_name, track, part_c, formatted, part_d, part_e) + var/time = say_timestamp() + var/final_message = "[part_b][speaker_name][part_c][formatted][part_d]" + if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) + final_message = "[part_a][time][final_message][part_e]" + else + final_message = "[part_a][time][final_message][part_e]" + to_chat(src, final_message) + +/mob/living/silicon/ai/on_hear_radio(part_a, part_b, speaker_name, track, part_c, formatted, part_d, part_e) + var/time = say_timestamp() + var/final_message = "[part_b][track][part_c][formatted][part_d]" + if(check_mentioned(formatted) && is_preference_enabled(/datum/client_preference/check_mention)) + final_message = "[part_a][time][final_message][part_e]" + else + final_message = "[part_a][time][final_message][part_e]" to_chat(src, final_message) /mob/proc/hear_signlang(var/message, var/verb = "gestures", var/verb_understood = "gestures", var/datum/language/language, var/mob/speaker = null, var/speech_type = 1) @@ -236,7 +240,7 @@ return if(say_understands(speaker, language)) - message = "[speaker] [verb_understood], \"[message]\"" + message = "[speaker] [verb_understood], \"[message]\"" else if(!(language.ignore_adverb)) var/adverb var/length = length(message) * pick(0.8, 0.9, 1.0, 1.1, 1.2) //Adds a little bit of fuzziness @@ -246,9 +250,9 @@ if(30 to 48) adverb = " a message" if(48 to 90) adverb = " a lengthy message" else adverb = " a very lengthy message" - message = "[speaker] [verb][adverb]." + message = "[speaker] [verb][adverb]." else - message = "[speaker] [verb]." + message = "[speaker] [verb]." show_message(message, type = speech_type) // Type 1 is visual message diff --git a/code/modules/mob/living/carbon/human/emote_vr.dm b/code/modules/mob/living/carbon/human/emote_vr.dm index 3f597c4784..986f484034 100644 --- a/code/modules/mob/living/carbon/human/emote_vr.dm +++ b/code/modules/mob/living/carbon/human/emote_vr.dm @@ -60,7 +60,7 @@ message = "reveals their wings!" else message = "hides their wings." - visible_message("[src] [message]") + visible_message("[src] [message]") /mob/living/carbon/human/verb/hide_tail_vr() set name = "Show/Hide tail" @@ -83,4 +83,8 @@ message = "reveals their tail!" else message = "hides their tail." +<<<<<<< HEAD visible_message("[src] [message]") +======= + visible_message("[src] [message]") +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index af71c6ff4a..c9b496a8e5 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -372,7 +372,7 @@ U.handle_regular_hud_updates() if(!modified) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["secrecord"]) if(hasHUD(usr,"security")) @@ -389,18 +389,20 @@ for (var/datum/data/record/R in data_core.security) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"security")) - to_chat(usr, "Name: [R.fields["name"]] Criminal Status: [R.fields["criminal"]]") - to_chat(usr, "Species: [R.fields["species"]]") - to_chat(usr, "Minor Crimes: [R.fields["mi_crim"]]") - to_chat(usr, "Details: [R.fields["mi_crim_d"]]") - to_chat(usr, "Major Crimes: [R.fields["ma_crim"]]") - to_chat(usr, "Details: [R.fields["ma_crim_d"]]") - to_chat(usr, "Notes: [R.fields["notes"]]") - to_chat(usr, "\[View Comment Log\]") + var/list/security_hud_text = list() + security_hud_text += "Name: [R.fields["name"]] Criminal Status: [R.fields["criminal"]]" + security_hud_text += "Species: [R.fields["species"]]" + security_hud_text += "Minor Crimes: [R.fields["mi_crim"]]" + security_hud_text += "Details: [R.fields["mi_crim_d"]]" + security_hud_text += "Major Crimes: [R.fields["ma_crim"]]" + security_hud_text += "Details: [R.fields["ma_crim_d"]]" + security_hud_text += "Notes: [R.fields["notes"]]" + security_hud_text += "\[View Comment Log\]" + to_chat(usr, "[jointext(security_hud_text, "
")]
") read = 1 if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["secrecordComment"]) if(hasHUD(usr,"security")) @@ -423,11 +425,11 @@ to_chat(usr, "[R.fields[text("com_[]", counter)]]") counter++ if (counter == 1) - to_chat(usr, "No comment found") - to_chat(usr, "\[Add comment\]") + to_chat(usr, "No comment found.") + to_chat(usr, "\[Add comment\]") if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["secrecordadd"]) if(hasHUD(usr,"security")) @@ -489,7 +491,7 @@ U.handle_regular_hud_updates() if(!modified) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["medrecord"]) if(hasHUD(usr,"medical")) @@ -506,19 +508,21 @@ for (var/datum/data/record/R in data_core.medical) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"medical")) - to_chat(usr, "Name: [R.fields["name"]] Blood Type: [R.fields["b_type"]]") - to_chat(usr, "Species: [R.fields["species"]]") - to_chat(usr, "DNA: [R.fields["b_dna"]]") - to_chat(usr, "Minor Disabilities: [R.fields["mi_dis"]]") - to_chat(usr, "Details: [R.fields["mi_dis_d"]]") - to_chat(usr, "Major Disabilities: [R.fields["ma_dis"]]") - to_chat(usr, "Details: [R.fields["ma_dis_d"]]") - to_chat(usr, "Notes: [R.fields["notes"]]") - to_chat(usr, "\[View Comment Log\]") + var/list/medical_hud_text = list() + medical_hud_text += "Name: [R.fields["name"]] Blood Type: [R.fields["b_type"]]" + medical_hud_text += "Species: [R.fields["species"]]" + medical_hud_text += "DNA: [R.fields["b_dna"]]" + medical_hud_text += "Minor Disabilities: [R.fields["mi_dis"]]" + medical_hud_text += "Details: [R.fields["mi_dis_d"]]" + medical_hud_text += "Major Disabilities: [R.fields["ma_dis"]]" + medical_hud_text += "Details: [R.fields["ma_dis_d"]]" + medical_hud_text += "Notes: [R.fields["notes"]]" + medical_hud_text += "\[View Comment Log\]" + to_chat(usr, "[jointext(medical_hud_text, "
")]
") read = 1 if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["medrecordComment"]) if(hasHUD(usr,"medical")) @@ -541,11 +545,11 @@ to_chat(usr, "[R.fields[text("com_[]", counter)]]") counter++ if (counter == 1) - to_chat(usr, "No comment found") - to_chat(usr, "\[Add comment\]") + to_chat(usr, "No comment found.") + to_chat(usr, "\[Add comment\]") if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["medrecordadd"]) if(hasHUD(usr,"medical")) @@ -588,21 +592,23 @@ for (var/datum/data/record/R in data_core.general) if (R.fields["id"] == E.fields["id"]) if(hasHUD(usr,"best")) - to_chat(usr, "Name: [R.fields["name"]]") - to_chat(usr, "Species: [R.fields["species"]]") - to_chat(usr, "Assignment: [R.fields["real_rank"]] ([R.fields["rank"]])") - to_chat(usr, "Home System: [R.fields["home_system"]]") - to_chat(usr, "Birthplace: [R.fields["birthplace"]]") - to_chat(usr, "Citizenship: [R.fields["citizenship"]]") - to_chat(usr, "Primary Employer: [R.fields["personal_faction"]]") - to_chat(usr, "Religious Beliefs: [R.fields["religion"]]") - to_chat(usr, "Known Languages: [R.fields["languages"]]") - to_chat(usr, "Notes: [R.fields["notes"]]") - to_chat(usr, "\[View Comment Log\]") + var/list/emp_hud_text = list() + emp_hud_text += "Name: [R.fields["name"]]" + emp_hud_text += "Species: [R.fields["species"]]" + emp_hud_text += "Assignment: [R.fields["real_rank"]] ([R.fields["rank"]])" + emp_hud_text += "Home System: [R.fields["home_system"]]" + emp_hud_text += "Birthplace: [R.fields["birthplace"]]" + emp_hud_text += "Citizenship: [R.fields["citizenship"]]" + emp_hud_text += "Primary Employer: [R.fields["personal_faction"]]" + emp_hud_text += "Religious Beliefs: [R.fields["religion"]]" + emp_hud_text += "Known Languages: [R.fields["languages"]]" + emp_hud_text += "Notes: [R.fields["notes"]]" + emp_hud_text += "\[View Comment Log\]" + to_chat(usr, "[jointext(emp_hud_text, "
")]
") read = 1 if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["emprecordComment"]) if(hasHUD(usr,"best")) @@ -625,11 +631,11 @@ to_chat(usr, "[R.fields[text("com_[]", counter)]]") counter++ if (counter == 1) - to_chat(usr, "No comment found") - to_chat(usr, "\[Add comment\]") + to_chat(usr, "No comment found.") + to_chat(usr, "\[Add comment\]") if(!read) - to_chat(usr, "Unable to locate a data core entry for this person.") + to_chat(usr, "Unable to locate a data core entry for this person.") if (href_list["emprecordadd"]) if(hasHUD(usr,"best")) @@ -790,7 +796,7 @@ /mob/living/carbon/human/proc/play_xylophone() if(!src.xylophone) var/datum/gender/T = gender_datums[get_visible_gender()] - visible_message("\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.","You begin to play a spooky refrain on your ribcage.","You hear a spooky xylophone melody.") + visible_message("\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.","You begin to play a spooky refrain on your ribcage.","You hear a spooky xylophone melody.") var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg') playsound(src, song, 50, 1, -1) xylophone = 1 @@ -881,7 +887,7 @@ regenerate_icons() check_dna() var/datum/gender/T = gender_datums[get_visible_gender()] - visible_message("\The [src] morphs and changes [T.his] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") + visible_message("\The [src] morphs and changes [T.his] appearance!", "You change your appearance!", "Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!") /mob/living/carbon/human/proc/remotesay() set name = "Project mind" @@ -902,15 +908,15 @@ if (isnull(target)) return - var/say = sanitize(tgui_input_text(usr, "What do you wish to say")) + var/say = sanitize(tgui_input_text(usr, "What do you wish to say?")) if(mRemotetalk in target.mutations) - target.show_message(" You hear [src.real_name]'s voice: [say]") + target.show_message("You hear [src.real_name]'s voice: [say]") else - target.show_message(" You hear a voice that seems to echo around the room: [say]") - usr.show_message(" You project your mind into [target.real_name]: [say]") + target.show_message("You hear a voice that seems to echo around the room: [say]") + usr.show_message("You project your mind into [target.real_name]: [say]") log_say("(TPATH to [key_name(target)]) [say]",src) for(var/mob/observer/dead/G in mob_list) - G.show_message("Telepathic message from [src] to [target]: [say]") + G.show_message("Telepathic message from [src] to [target]: [say]") /mob/living/carbon/human/proc/remoteobserve() set name = "Remote View" @@ -940,7 +946,7 @@ continue creatures += h - var/mob/target = input ("Who do you want to project your mind to ?") as mob in creatures + var/mob/target = input ("Who do you want to project your mind to?") as mob in creatures if (target) remoteview_target = target @@ -1147,10 +1153,10 @@ self = 1 if(!self) usr.visible_message("[usr] kneels down, puts [TU.his] hand on [src]'s wrist and begins counting [T.his] pulse.",\ - "You begin counting [src]'s pulse") + "You begin counting [src]'s pulse.") else usr.visible_message("[usr] begins counting [T.his] pulse.",\ - "You begin counting your pulse.") + "You begin counting your pulse.") if(src.pulse) to_chat(usr, "[self ? "You have a" : "[src] has a"] pulse! Counting...") @@ -1158,7 +1164,7 @@ to_chat(usr, "[src] has no pulse!") //it is REALLY UNLIKELY that a dead person would check his own pulse return - to_chat(usr, "You must[self ? "" : " both"] remain still until counting is finished.") + to_chat(usr, "You must[self ? "" : " both"] remain still until counting is finished.") if(do_mob(usr, src, 60)) var/message = "[self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)]." to_chat(usr,message) @@ -1462,11 +1468,11 @@ usr.setClickCooldown(20) if(usr.stat > 0) - to_chat(usr, "You are unconcious and cannot do that!") + to_chat(usr, "You are unconcious and cannot do that!") return if(usr.restrained()) - to_chat(usr, "You are restrained and cannot do that!") + to_chat(usr, "You are restrained and cannot do that!") return var/mob/S = src diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index f0a34c0eaf..16acfd7131 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -42,7 +42,7 @@ if(H.hand) temp = H.organs_by_name["l_hand"] if(!temp || !temp.is_usable()) - to_chat(H, "You can't use your hand.") + to_chat(H, "You can't use your hand.") return if(H.lying) return @@ -57,7 +57,7 @@ if(!hit_zone) H.do_attack_animation(src) playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message("[H] reaches for [src], but misses!") + visible_message("[H] reaches for [src], but misses!") return FALSE if(H != src && check_shields(0, null, H, H.zone_sel.selecting, H.name)) @@ -333,7 +333,7 @@ return playsound(src, 'sound/weapons/punchmiss.ogg', 25, 1, -1) - visible_message(" [M] attempted to disarm [src]!") + visible_message(" [M] attempted to disarm [src]!") return /mob/living/carbon/human/proc/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, inrange, params) @@ -426,9 +426,9 @@ var/datum/gender/TU = gender_datums[user.get_visible_gender()] if(user == src) - user.visible_message("\The [user] starts applying pressure to [TU.his] [organ.name]!", "You start applying pressure to your [organ.name]!") + user.visible_message("\The [user] starts applying pressure to [TU.his] [organ.name]!", "You start applying pressure to your [organ.name]!") else - user.visible_message("\The [user] starts applying pressure to [src]'s [organ.name]!", "You start applying pressure to [src]'s [organ.name]!") + user.visible_message("\The [user] starts applying pressure to [src]'s [organ.name]!", "You start applying pressure to [src]'s [organ.name]!") spawn(0) organ.applied_pressure = user @@ -438,9 +438,9 @@ organ.applied_pressure = null if(user == src) - user.visible_message("\The [user] stops applying pressure to [TU.his] [organ.name]!", "You stop applying pressure to your [organ]!") + user.visible_message("\The [user] stops applying pressure to [TU.his] [organ.name]!", "You stop applying pressure to your [organ]!") else - user.visible_message("\The [user] stops applying pressure to [src]'s [organ.name]!", "You stop applying pressure to [src]'s [organ.name]!") + user.visible_message("\The [user] stops applying pressure to [src]'s [organ.name]!", "You stop applying pressure to [src]'s [organ.name]!") return TRUE diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index d65357e27e..b79f96633f 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -269,21 +269,21 @@ if (candidates.len) var/obj/item/organ/external/O = pick(candidates) O.mutate() - to_chat(src, "Something is not right with your [O.name]...") + to_chat(src, "Something is not right with your [O.name]...") return else if (prob(heal_prob)) for (var/obj/item/organ/external/O in organs) if (O.status & ORGAN_MUTATED) O.unmutate() - to_chat(src, "Your [O.name] is shaped normally again.") + to_chat(src, "Your [O.name] is shaped normally again.") return if (getCloneLoss() < 1) for (var/obj/item/organ/external/O in organs) if (O.status & ORGAN_MUTATED) O.unmutate() - to_chat(src, "Your [O.name] is shaped normally again.") + to_chat(src, "Your [O.name] is shaped normally again.") BITSET(hud_updateflag, HEALTH_HUD) // Defined here solely to take species flags into account without having to recast at mob/living level. diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 31a5e7be7d..6bee87d69a 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -469,7 +469,7 @@ emp_act var/obj/item/organ/external/affecting = get_organ(zone) var/hit_area = affecting.name - src.visible_message("[src] has been hit in the [hit_area] by [O].") + src.visible_message("[src] has been hit in the [hit_area] by [O].") if(ismob(O.thrower)) add_attack_logs(O.thrower,src,"Hit with thrown [O.name]") @@ -477,7 +477,7 @@ emp_act //If the armor absorbs all of the damage, skip the rest of the calculations var/soaked = get_armor_soak(affecting, "melee", O.armor_penetration) if(soaked >= throw_damage) - to_chat(src, "Your armor absorbs the force of [O.name]!") + to_chat(src, "Your armor absorbs the force of [O.name]!") return var/armor = run_armor_check(affecting, "melee", O.armor_penetration, "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here @@ -515,7 +515,7 @@ emp_act if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED && !buckled) var/dir = get_dir(O.throw_source, src) - visible_message("[src] staggers under the impact!","You stagger under the impact!") + visible_message("[src] staggers under the impact!","You stagger under the impact!") src.throw_at(get_edge_target_turf(src,dir),1,momentum) if(!O || !src) return diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 39ecfba387..644bda91c8 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -61,7 +61,7 @@ return if(stat || paralysis || stunned || weakened || lying || restrained() || buckled) - to_chat(src, "You cannot tackle in your current state.") + to_chat(src, "You cannot tackle in your current state.") return last_special = world.time + 50 @@ -78,7 +78,7 @@ for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) - O.show_message(text("[] [failed ? "tried to tackle" : "has tackled"] down []!", src, T), 1) + O.show_message("[src] [failed ? "tried to tackle" : "has tackled"] down [T]!", 1) /mob/living/carbon/human/proc/commune() set category = "Abilities" @@ -103,17 +103,17 @@ var/mob/M = targets[target] if(istype(M, /mob/observer/dead) || M.stat == DEAD) - to_chat(src, "Not even a [src.species.name] can speak to the dead.") + to_chat(src, "Not even a [src.species.name] can speak to the dead.") return log_say("(COMMUNE to [key_name(M)]) [text]",src) - to_chat(M, "Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]") + to_chat(M, "Like lead slabs crashing into the ocean, alien thoughts drop into your mind: [text]") if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M if(H.species.name == src.species.name) return - to_chat(H, "Your nose begins to bleed...") + to_chat(H, "Your nose begins to bleed...") H.drip(1) /mob/living/carbon/human/proc/regurgitate() @@ -126,7 +126,7 @@ if(M in stomach_contents) stomach_contents.Remove(M) M.loc = loc - src.visible_message("[src] hurls out the contents of their stomach!") + src.visible_message("[src] hurls out the contents of their stomach!") return /mob/living/carbon/human/proc/psychic_whisper(mob/M as mob in oview()) @@ -137,8 +137,8 @@ var/msg = sanitize(tgui_input_text(usr, "Message:", "Psychic Whisper")) if(msg) log_say("(PWHISPER to [key_name(M)]) [msg]", src) - to_chat(M, "You hear a strange, alien voice in your head... [msg]") - to_chat(src, "You said: \"[msg]\" to [M]") + to_chat(M, "You hear a strange, alien voice in your head... [msg]") + to_chat(src, "You said: \"[msg]\" to [M]") return /mob/living/carbon/human/proc/diona_split_nymph() @@ -211,7 +211,7 @@ to_chat(src, "Performing self-diagnostic, please wait...") spawn(50) - var/output = "Self-Diagnostic Results:\n" + var/output = "Self-Diagnostic Results:\n" output += "Internal Temperature: [convert_k2c(bodytemperature)] Degrees Celsius\n" @@ -237,6 +237,7 @@ output += "[IO.name] - [IO.damage > 10 ? "Heavy Damage" : "Light Damage"]\n" else output += "[IO.name] - OK\n" + output += "" to_chat(src,output) @@ -302,7 +303,7 @@ return else active_regen = TRUE - src.visible_message("[src]'s flesh begins to mend...") + src.visible_message("[src]'s flesh begins to mend...") var/delay_length = round(active_regen_delay * species.active_regen_mult) if(do_after(src,delay_length)) diff --git a/code/modules/mob/living/carbon/human/species/species_attack_vr.dm b/code/modules/mob/living/carbon/human/species/species_attack_vr.dm index 11a6d14973..513f616b8e 100644 --- a/code/modules/mob/living/carbon/human/species/species_attack_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_attack_vr.dm @@ -19,30 +19,30 @@ switch(attack_damage) if(1 to 2) user.visible_message("[user]'s fangs scrape across [target]'s cheek!") - to_chat(target, "Your face feels tingly!") + to_chat(target, "Your face feels tingly!") target.bloodstr.add_reagent("numbenzyme",attack_damage) //Have to add this here, otherwise the swtich fails. if(3 to 4) user.visible_message("[user]'s fangs pierce into [target]'s neck at an odd, awkward angle!") - to_chat(target, "Your neck feels like it's on fire before going numb!") + to_chat(target, "Your neck feels like it's on fire before going numb!") target.bloodstr.add_reagent("numbenzyme",attack_damage) if(5) user.visible_message("[user] sinks \his [pick(attack_noun)] deep into [target]'s neck, causing the vein to bulge outwards at some type of chemical is pumped into it!") - to_chat(target, "Your neck feels like it's going to burst! Moments later, you simply can't feel your neck any longer, the numbness beginning to spread throughout your body!") + to_chat(target, "Your neck feels like it's going to burst! Moments later, you simply can't feel your neck any longer, the numbness beginning to spread throughout your body!") target.bloodstr.add_reagent("numbenzyme",attack_damage) else // ----- BODY ----- // switch(attack_damage) if(1 to 2) user.visible_message("[user]'s fangs scrape across [target]'s [affecting.name]!") - to_chat(target, "Your [affecting.name] feels tingly!") + to_chat(target, "Your [affecting.name] feels tingly!") target.bloodstr.add_reagent("numbenzyme",attack_damage) if(3 to 4) user.visible_message("[user]'s fangs pierce [pick("", "", "the side of")] [target]'s [affecting.name]!") - to_chat(target, "Your [affecting.name] feels like it's on fire before going numb!") + to_chat(target, "Your [affecting.name] feels like it's on fire before going numb!") target.bloodstr.add_reagent("numbenzyme",attack_damage) if(5) user.visible_message("[user]'s fangs sink deep into [target]'s [affecting.name], one of their veins bulging outwards from the sudden fluid pumped into it!") - to_chat(target, "Your [affecting.name] feels like it's going to burst! Moments later, you simply can't feel your [affecting.name] any longer, the numbness slowly spreading throughout your body!") + to_chat(target, "Your [affecting.name] feels like it's going to burst! Moments later, you simply can't feel your [affecting.name] any longer, the numbness slowly spreading throughout your body!") target.bloodstr.add_reagent("numbenzyme",attack_damage) /datum/unarmed_attack/claws/shadekin diff --git a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm index ed744e9fb6..1b7e3386da 100644 --- a/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm +++ b/code/modules/mob/living/carbon/human/species/species_shapeshift_vr.dm @@ -189,5 +189,5 @@ species.base_species = new_species wrapped_species_by_ref["\ref[src]"] = new_species if (visible) - visible_message("\The [src] shifts and contorts, taking the form of \a [new_species]!") + visible_message("\The [src] shifts and contorts, taking the form of \a [new_species]!") regenerate_icons() \ No newline at end of file diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c833eeac5a..739842bf3c 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -96,7 +96,7 @@ if(!..()) return 0 - usr.visible_message("[src] points to [A]") + usr.visible_message("[src] points to [A].") return 1 /mob/living/verb/succumb() @@ -697,13 +697,13 @@ //VOREStation Edit Start - Making it so SSD people have prefs with fallback to original style. if(config.allow_Metadata) if(ooc_notes) - to_chat(usr, "[src]'s Metainfo:
[ooc_notes]") + to_chat(usr, "[src]'s Metainfo:
[ooc_notes]
") else if(client) - to_chat(usr, "[src]'s Metainfo:
[client.prefs.metadata]") + to_chat(usr, "[src]'s Metainfo:
[client.prefs.metadata]
") else - to_chat(usr, "[src] does not have any stored infomation!") + to_chat(usr, "[src] does not have any stored infomation!") else - to_chat(usr, "OOC Metadata is not supported by this server!") + to_chat(usr, "OOC Metadata is not supported by this server!") //VOREStation Edit End - Making it so SSD people have prefs with fallback to original style. return @@ -773,7 +773,7 @@ set category = "IC" resting = !resting - to_chat(src, "You are now [resting ? "resting" : "getting up"]") + to_chat(src, "You are now [resting ? "resting" : "getting up"].") update_canmove() //called when the mob receives a bright flash @@ -1144,7 +1144,7 @@ var/mob/living/carbon/human/H = target if(H.in_throw_mode && H.a_intent == I_HELP && unEquip(I)) H.put_in_hands(I) // If this fails it will just end up on the floor, but that's fitting for things like dionaea. - visible_message("[src] hands \the [H] \a [I].", SPAN_NOTICE("You give \the [target] \a [I].")) + visible_message("[src] hands \the [H] \a [I].", SPAN_NOTICE("You give \the [target] \a [I].")) else to_chat(src, SPAN_NOTICE("You offer \the [I] to \the [target].")) do_give(H) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index e7d0378238..96c1a46774 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -266,10 +266,17 @@ miss_chance = max(15*(distance-2), 0) if (prob(miss_chance)) +<<<<<<< HEAD visible_message("\The [O] misses [src] narrowly!") return*/ //CHOMPEDIT - removing baymiss src.visible_message("[src] has been hit by [O].") +======= + visible_message("\The [O] misses [src] narrowly!") + return + + src.visible_message("[src] has been hit by [O].") +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror var/armor = run_armor_check(null, "melee") var/soaked = get_armor_soak(null, "melee") @@ -296,7 +303,7 @@ if(O.throw_source && momentum >= THROWNOBJ_KNOCKBACK_SPEED) var/dir = get_dir(O.throw_source, src) - visible_message("[src] staggers under the impact!","You stagger under the impact!") + visible_message("[src] staggers under the impact!","You stagger under the impact!") src.throw_at(get_edge_target_turf(src,dir),1,momentum) if(!O || !src) return diff --git a/code/modules/mob/living/living_vr.dm b/code/modules/mob/living/living_vr.dm index b6cb182039..b7a5f33ceb 100644 --- a/code/modules/mob/living/living_vr.dm +++ b/code/modules/mob/living/living_vr.dm @@ -30,7 +30,7 @@ var/new_metadata = sanitize(tgui_input_text(usr, "Enter any information you'd like others to see, such as Roleplay-preferences. This will not be saved permanently, only for this round.", "Game Preference" , html_decode(ooc_notes), multiline = TRUE, prevent_enter = TRUE), extra = 0) if(new_metadata && CanUseTopic(usr)) ooc_notes = new_metadata - to_chat(usr, "OOC notes updated.") + to_chat(usr, "OOC notes updated.") log_admin("[key_name(usr)] updated their OOC notes mid-round.") /mob/living/verb/set_voice_freq() diff --git a/code/modules/mob/living/riding.dm b/code/modules/mob/living/riding.dm index 3a614a4b6d..08a2f88970 100644 --- a/code/modules/mob/living/riding.dm +++ b/code/modules/mob/living/riding.dm @@ -7,10 +7,10 @@ if(istype(riding_datum,/datum/riding)) if(riding_datum.keytype) riding_datum.keytype = null - to_chat(src, "Rider control enabled.") + to_chat(src, "Rider control enabled.") return else riding_datum.keytype = /obj/item/weapon/material/twohanded/riding_crop - to_chat(src, "Rider control restricted.") + to_chat(src, "Rider control restricted.") return return diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index a2ce47c2be..677372d0e4 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -189,12 +189,12 @@ var/list/ai_verbs_default = list( return /mob/living/silicon/ai/proc/on_mob_init() - to_chat(src, "You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).") - to_chat(src, "To look at other parts of the station, click on yourself to get a camera menu.") - to_chat(src, "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.") - to_chat(src, "To use something, simply click on it.") - to_chat(src, "Use say #b to speak to your cyborgs through binary. Use say :h to speak from an active holopad.") - to_chat(src, "For department channels, use the following say commands:") + var/init_text = list("You are playing the station's AI. The AI cannot move, but can interact with many objects while viewing them (through cameras).", + "To look at other parts of the station, click on yourself to get a camera menu.", + "While observing through a camera, you can use most (networked) devices which you can see, such as computers, APCs, intercoms, doors, etc.", + "To use something, simply click on it.", + "For department channels, use the following say commands:") + to_chat(src, "[jointext(init_text, "
")]
") var/radio_text = "" for(var/i = 1 to common_radio.channels.len) @@ -214,7 +214,7 @@ var/list/ai_verbs_default = list( if (malf && !(mind in malf.current_antagonists)) show_laws() - to_chat(src, "These laws may be changed by other players, or by you being the traitor.") + to_chat(src, "These laws may be changed by other players, or by you being the traitor.") job = "AI" setup_icon() @@ -360,7 +360,7 @@ var/list/ai_verbs_default = list( return if(message_cooldown) - to_chat(src, "Please allow one minute to pass between announcements.") + to_chat(src, "Please allow one minute to pass between announcements.") return var/input = tgui_input_text(usr, "Please write a message to announce to the station crew.", "A.I. Announcement") if(!input) @@ -472,7 +472,7 @@ var/list/ai_verbs_default = list( if(target && (!istype(target, /mob/living/carbon/human) || html_decode(href_list["trackname"]) == target:get_face_name())) ai_actual_track(target) else - to_chat(src, "System error. Cannot locate [html_decode(href_list["trackname"])].") + to_chat(src, "System error. Cannot locate [html_decode(href_list["trackname"])].") return if(href_list["trackbot"]) @@ -572,7 +572,7 @@ var/list/ai_verbs_default = list( if(network in C.network) eyeobj.setLoc(get_turf(C)) break - to_chat(src, "Switched to [network] camera network.") + to_chat(src, "Switched to [network] camera network.") //End of code by Mord_Sith /mob/living/silicon/ai/proc/ai_statuschange() @@ -707,7 +707,7 @@ var/list/ai_verbs_default = list( return camera_light_on = !camera_light_on - to_chat(src, "Camera lights [camera_light_on ? "activated" : "deactivated"].") + to_chat(src, "Camera lights [camera_light_on ? "activated" : "deactivated"].") if(!camera_light_on) if(camera) camera.set_light(0) @@ -754,20 +754,20 @@ var/list/ai_verbs_default = list( return if(anchored) playsound(src, W.usesound, 50, 1) - user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") + user.visible_message("\The [user] starts to unbolt \the [src] from the plating...") if(!do_after(user,40 * W.toolspeed)) - user.visible_message("\The [user] decides not to unbolt \the [src].") + user.visible_message("\The [user] decides not to unbolt \the [src].") return - user.visible_message("\The [user] finishes unfastening \the [src]!") + user.visible_message("\The [user] finishes unfastening \the [src]!") anchored = FALSE return else playsound(src, W.usesound, 50, 1) - user.visible_message("\The [user] starts to bolt \the [src] to the plating...") + user.visible_message("\The [user] starts to bolt \the [src] to the plating...") if(!do_after(user,40 * W.toolspeed)) - user.visible_message("\The [user] decides not to bolt \the [src].") + user.visible_message("\The [user] decides not to bolt \the [src].") return - user.visible_message("\The [user] finishes fastening down \the [src]!") + user.visible_message("\The [user] finishes fastening down \the [src]!") anchored = TRUE return else @@ -781,7 +781,7 @@ var/list/ai_verbs_default = list( if(check_unable(AI_CHECK_RADIO)) return - to_chat(src, "Accessing Subspace Transceiver control...") + to_chat(src, "Accessing Subspace Transceiver control...") if (src.aiRadio) src.aiRadio.interact(src) @@ -804,7 +804,7 @@ var/list/ai_verbs_default = list( var/obj/effect/overlay/aiholo/hologram = holo.masters[src] walk(hologram, 0) //VOREStation Add End - to_chat(usr, "Your hologram will [hologram_follow ? "follow" : "no longer follow"] you now.") + to_chat(usr, "Your hologram will [hologram_follow ? "follow" : "no longer follow"] you now.") /mob/living/silicon/ai/proc/check_unable(var/flags = 0, var/feedback = 1) @@ -965,7 +965,7 @@ var/list/ai_verbs_default = list( var/message = combined["formatted"] var/name_used = M.GetVoice() //This communication is imperfect because the holopad "filters" voices and is only designed to connect to the master only. - var/rendered = "Relayed Speech: [name_used] [message]" + var/rendered = "Relayed Speech: [name_used] [message]" show_message(rendered, 2) /mob/living/silicon/ai/proc/toggle_multicam_verb() diff --git a/code/modules/mob/living/silicon/ai/laws.dm b/code/modules/mob/living/silicon/ai/laws.dm index 74816aeeb8..3dceddb51a 100755 --- a/code/modules/mob/living/silicon/ai/laws.dm +++ b/code/modules/mob/living/silicon/ai/laws.dm @@ -10,7 +10,7 @@ who = world else who = src - to_chat(who, "Obey these laws:") + to_chat(who, "Obey these laws:") src.laws_sanity_check() src.laws.show_laws(who) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index c79d777efb..0f3ca13a5d 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -266,7 +266,7 @@ M.ejectpai() //I'm not sure how much of this is necessary, but I would rather avoid issues. if(istype(card.loc,/obj/item/rig_module)) - to_chat(src, "There is no room to unfold inside this rig module. You're good and stuck.") + to_chat(src, "There is no room to unfold inside this rig module. You're good and stuck.") return 0 else if(istype(card.loc,/mob)) var/mob/holder = card.loc @@ -295,7 +295,7 @@ canmove = TRUE var/turf/T = get_turf(src) - if(istype(T)) T.visible_message("[src] folds outwards, expanding into a mobile form.") + if(istype(T)) T.visible_message("[src] folds outwards, expanding into a mobile form.") verbs |= /mob/living/silicon/pai/proc/pai_nom verbs |= /mob/living/proc/vertical_nom update_icon() @@ -362,7 +362,7 @@ resting = !resting icon_state = resting ? "[chassis]_rest" : "[chassis]" update_icon() //VOREStation edit - to_chat(src, "You are now [resting ? "resting" : "getting up"]") + to_chat(src, "You are now [resting ? "resting" : "getting up"].") canmove = !resting @@ -427,7 +427,7 @@ release_vore_contents(FALSE) //VOREStation Add var/turf/T = get_turf(src) - if(istype(T) && !silent) T.visible_message("[src] neatly folds inwards, compacting down to a rectangular card.") + if(istype(T) && !silent) T.visible_message("[src] neatly folds inwards, compacting down to a rectangular card.") if(client) src.stop_pulling() @@ -526,7 +526,7 @@ return close_up() - visible_message("[src] fades away from the screen, the pAI device goes silent.") + visible_message("[src] fades away from the screen, the pAI device goes silent.") card.removePersonality() clear_client() diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index 662ff89642..c182563619 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -91,7 +91,7 @@ canmove = TRUE card.setEmotion(15) playsound(card, 'sound/effects/pai-restore.ogg', 50, FALSE) - card.visible_message("\The [card] chimes.", runemessage = "chime") + card.visible_message("\The [card] chimes.", runemessage = "chime") /mob/living/silicon/pai/proc/pai_nom(var/mob/living/T in oview(1)) set name = "pAI Nom" @@ -238,7 +238,7 @@ hide_glow = FALSE update_icon() else - to_chat(src, "Your selected chassis cannot modify its eye glow!") + to_chat(src, "Your selected chassis cannot modify its eye glow!") return @@ -432,7 +432,7 @@ set category = "pAI Commands" set name = "Save Configuration" savefile_save(src) - to_chat(src, "[name] configuration saved to global pAI settings.") + to_chat(src, "[name] configuration saved to global pAI settings.") /mob/living/silicon/pai/a_intent_change(input as text) . = ..() @@ -506,28 +506,28 @@ card.screen_msg = message var/logmsg = "(CARD SCREEN)[message]" log_say(logmsg,src) - to_chat(src, "You print a message to your screen, \"[message]\"") + to_chat(src, "You print a message to your screen, \"[message]\"") if(isliving(card.loc)) var/mob/living/L = card.loc if(L.client) - to_chat(L, "[src.name]'s screen prints, \"[message]\"") + to_chat(L, "[src.name]'s screen prints, \"[message]\"") else return else if(isbelly(card.loc)) var/obj/belly/b = card.loc if(b.owner.client) - to_chat(b.owner, "[src.name]'s screen prints, \"[message]\"") + to_chat(b.owner, "[src.name]'s screen prints, \"[message]\"") else return else if(istype(card.loc, /obj/item/device/pda)) var/obj/item/device/pda/p = card.loc if(isliving(p.loc)) var/mob/living/L = p.loc if(L.client) - to_chat(L, "[src.name]'s screen prints, \"[message]\"") + to_chat(L, "[src.name]'s screen prints, \"[message]\"") else return else if(isbelly(p.loc)) var/obj/belly/b = card.loc if(b.owner.client) - to_chat(b.owner, "[src.name]'s screen prints, \"[message]\"") + to_chat(b.owner, "[src.name]'s screen prints, \"[message]\"") else return else return else return @@ -537,11 +537,11 @@ continue else if(isobserver(G) && G.is_preference_enabled(/datum/client_preference/ghost_ears)) if(is_preference_enabled(/datum/client_preference/whisubtle_vis) || G.client.holder) - to_chat(G, "[src.name]'s screen prints, \"[message]\"") + to_chat(G, "[src.name]'s screen prints, \"[message]\"") /mob/living/silicon/pai/proc/touch_window(soft_name) //This lets us touch TGUI procs and windows that may be nested behind other TGUI procs and windows if(stat != CONSCIOUS) //so we can access our software without having to open up the software interface TGUI window - to_chat(src, "You can't do that right now.") + to_chat(src, "You can't do that right now.") return for(var/thing in software) var/datum/pai_software/S = software[thing] diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm index f6f37fa210..0e5d8352e7 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_modules_vr.dm @@ -268,15 +268,15 @@ if(user.client && (target in user.client.screen)) to_chat(user, "You need to take \the [target.name] off before cleaning it!") if(istype(target, /obj/structure/sink) || istype(target, /obj/structure/toilet)) //Dog vibes. - user.visible_message("[user] begins to lap up water from [target.name].", "You begin to lap up water from [target.name].") + user.visible_message("[user] begins to lap up water from [target.name].", "You begin to lap up water from [target.name].") if(do_after (user, 50)) water.add_charge(50) - to_chat(src, "You refill some of your water reserves.") + to_chat(src, "You refill some of your water reserves.") else if(water.energy < 5) to_chat(user, "Your mouth feels dry. You should drink up some water .") return else if(istype(target,/obj/effect/decal/cleanable)) - user.visible_message("[user] begins to lick off \the [target.name].", "You begin to lick off \the [target.name]...") + user.visible_message("[user] begins to lick off \the [target.name].", "You begin to lick off \the [target.name]...") if(do_after (user, 50)) to_chat(user, "You finish licking off \the [target.name].") water.use_charge(5) @@ -285,9 +285,9 @@ R.cell.charge += 50 else if(istype(target,/obj/item)) if(istype(target,/obj/item/trash)) - user.visible_message("[user] nibbles away at \the [target.name].", "You begin to nibble away at \the [target.name]...") + user.visible_message("[user] nibbles away at \the [target.name].", "You begin to nibble away at \the [target.name]...") if(do_after (user, 50)) - user.visible_message("[user] finishes eating \the [target.name].", "You finish eating \the [target.name].") + user.visible_message("[user] finishes eating \the [target.name].", "You finish eating \the [target.name].") to_chat(user, "You finish off \the [target.name].") qdel(target) var/mob/living/silicon/robot/R = user @@ -304,9 +304,9 @@ R.cell.charge = R.cell.charge + 250 return if(istype(target,/obj/item/weapon/cell)) - user.visible_message("[user] begins cramming \the [target.name] down its throat.", "You begin cramming \the [target.name] down your throat...") + user.visible_message("[user] begins cramming \the [target.name] down its throat.", "You begin cramming \the [target.name] down your throat...") if(do_after (user, 50)) - user.visible_message("[user] finishes gulping down \the [target.name].", "You finish swallowing \the [target.name].") + user.visible_message("[user] finishes gulping down \the [target.name].", "You finish swallowing \the [target.name].") to_chat(user, "You finish off \the [target.name], and gain some charge!") var/mob/living/silicon/robot/R = user var/obj/item/weapon/cell/C = target @@ -314,7 +314,7 @@ water.use_charge(5) qdel(target) return - user.visible_message("[user] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") + user.visible_message("[user] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") if(do_after (user, 50)) to_chat(user, "You clean \the [target.name].") water.use_charge(5) @@ -342,7 +342,7 @@ if(H.species.lightweight == 1) H.Weaken(3) else - user.visible_message("[user] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") + user.visible_message("[user] begins to lick \the [target.name] clean...", "You begin to lick \the [target.name] clean...") if(do_after (user, 50)) to_chat(user, "You clean \the [target.name].") var/obj/effect/decal/cleanable/C = locate() in target @@ -415,7 +415,7 @@ var/new_color = input(usr, "Choose a color to set the light to! (Default is [LIGHT_COLOR_INCANDESCENT_TUBE])", "", selected_color) as color|null if(new_color) selected_color = new_color - to_chat(user, "The light color has been changed.") + to_chat(user, "The light color has been changed.") return else if(uses >= max_uses) @@ -425,7 +425,7 @@ if(glass.energy < 125) to_chat(user, "Insufficient material reserves.") return - to_chat(user, "It has [uses] lights remaining. Attempting to fabricate a replacement. Please stand still.") + to_chat(user, "It has [uses] lights remaining. Attempting to fabricate a replacement. Please stand still.") cooldown = 1 if(do_after(user, 50)) glass.use_charge(125) @@ -434,7 +434,7 @@ else cooldown = 0 else - to_chat(user, "It has [uses] lights remaining.") + to_chat(user, "It has [uses] lights remaining.") return //Pounce stuff for K-9 @@ -456,15 +456,15 @@ /mob/living/silicon/robot/proc/leap() if(last_special > world.time) - to_chat(src, "Your leap actuators are still recharging.") + to_chat(src, "Your leap actuators are still recharging.") return if(cell.charge < 1000) - to_chat(src, "Cell charge too low to continue.") + to_chat(src, "Cell charge too low to continue.") return if(usr.incapacitated(INCAPACITATION_DISABLED)) - to_chat(src, "You cannot leap in your current state.") + to_chat(src, "You cannot leap in your current state.") return var/list/choices = list() @@ -483,7 +483,7 @@ return if(usr.incapacitated(INCAPACITATION_DISABLED)) - to_chat(src, "You cannot leap in your current state.") + to_chat(src, "You cannot leap in your current state.") return last_special = world.time + 10 @@ -536,6 +536,6 @@ icontype = options[choice] var/active_sound = 'sound/effects/bubbles.ogg' playsound(src.loc, "[active_sound]", 100, 0, 4) - M << "Your Tank now displays [choice]. Drink up and enjoy!" + to_chat(M, "Your Tank now displays [choice]. Drink up and enjoy!") updateicon() return 1 diff --git a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm index 9e5ba2030c..142e130493 100644 --- a/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm +++ b/code/modules/mob/living/silicon/robot/dogborg/dog_sleeper_vr.dm @@ -94,8 +94,10 @@ playsound(src, gulpsound, vol = 60, vary = 1, falloff = 0.1, preference = /datum/client_preference/eating_noises) if(analyzer && istype(target,/obj/item)) var/obj/item/tech_item = target + var/list/tech_levels = list() for(var/T in tech_item.origin_tech) - to_chat(user, "\The [tech_item] has level [tech_item.origin_tech[T]] in [CallTechName(T)].") + tech_levels += "\The [tech_item] has level [tech_item.origin_tech[T]] in [CallTechName(T)]." + to_chat(user, "[jointext(tech_levels, "
")]
") if(delivery) if(islist(deliverylists[delivery_tag])) deliverylists[delivery_tag] |= target @@ -627,7 +629,7 @@ for(var/atom/movable/thing in B) thing.forceMove(src) if(ismob(thing)) - to_chat(thing, "As [T] melts away around you, you find yourself in [hound]'s [name]") + to_chat(thing, "As [T] melts away around you, you find yourself in [hound]'s [name].") for(var/obj/item/I in T) if(istype(I,/obj/item/organ/internal/mmi_holder/posibrain)) var/obj/item/organ/internal/mmi_holder/MMI = I diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index b5d4eed0cc..bc0389a136 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -382,7 +382,7 @@ set name = "Toggle Lights" lights_on = !lights_on - to_chat(usr, "You [lights_on ? "enable" : "disable"] your integrated light.") + to_chat(usr, "You [lights_on ? "enable" : "disable"] your integrated light.") handle_light() updateicon() //VOREStation Add - Since dogborgs have sprites for this @@ -427,7 +427,7 @@ /mob/living/silicon/robot/verb/spark_plug() //So you can still sparkle on demand without violence. set category = "Robot Commands" set name = "Emit Sparks" - to_chat(src, "You harmlessly spark.") + to_chat(src, "You harmlessly spark.") spark_system.start() // this function displays jetpack pressure in the stat panel @@ -494,7 +494,7 @@ C.brute_damage = WC.brute C.electronics_damage = WC.burn - to_chat(usr, "You install the [W.name].") + to_chat(usr, "You install the [W.name].") return @@ -518,7 +518,7 @@ return if(shell) // AI shells always have the laws of the AI - to_chat(user, span("warning", "\The [src] is controlled remotely! You cannot upload new laws this way!")) + to_chat(user, "\The [src] is controlled remotely! You cannot upload new laws this way!") return var/obj/item/weapon/aiModule/M = W @@ -531,7 +531,7 @@ return if (!getBruteLoss()) - to_chat(user, "Nothing to fix here!") + to_chat(user, "Nothing to fix here!") return var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0)) @@ -540,14 +540,14 @@ updatehealth() add_fingerprint(user) for(var/mob/O in viewers(user, null)) - O.show_message(text("[user] has fixed some of the dents on [src]!"), 1) + O.show_message("[user] has fixed some of the dents on [src]!", 1) else - to_chat(user, "Need more welding fuel!") + to_chat(user, "Need more welding fuel!") return else if(istype(W, /obj/item/stack/cable_coil) && (wiresexposed || istype(src,/mob/living/silicon/robot/drone))) if (!getFireLoss()) - to_chat(user, "Nothing to fix here!") + to_chat(user, "Nothing to fix here!") return var/obj/item/stack/cable_coil/coil = W if (coil.use(1)) @@ -555,23 +555,23 @@ adjustFireLoss(-30) updatehealth() for(var/mob/O in viewers(user, null)) - O.show_message(text("[user] has fixed some of the burnt wires on [src]!"), 1) + O.show_message("[user] has fixed some of the burnt wires on [src]!", 1) else if (W.is_crowbar() && user.a_intent != I_HURT) // crowbar means open or close the cover if(opened) if(cell) - to_chat(user, "You close the cover.") + to_chat(user, "You close the cover.") opened = 0 updateicon() else if(wiresexposed && wires.is_all_cut()) //Cell is out, wires are exposed, remove MMI, produce damaged chassis, baleet original mob. if(!mmi) - to_chat(user, "\The [src] has no brain to remove.") + to_chat(user, "\The [src] has no brain to remove.") return - to_chat(user, "You jam the crowbar into the robot and begin levering [mmi].") + to_chat(user, "You jam the crowbar into the robot and begin levering [mmi].") sleep(30) - to_chat(user, "You damage some parts of the chassis, but eventually manage to rip out [mmi]!") + to_chat(user, "You damage some parts of the chassis, but eventually manage to rip out [mmi]!") var/obj/item/robot_parts/robot_suit/C = new/obj/item/robot_parts/robot_suit(loc) C.l_leg = new/obj/item/robot_parts/l_leg(C) C.r_leg = new/obj/item/robot_parts/r_leg(C) @@ -594,7 +594,7 @@ return var/datum/robot_component/C = components[remove] var/obj/item/robot_parts/robot_component/I = C.wrapped - to_chat(user, "You remove \the [I].") + to_chat(user, "You remove \the [I].") if(istype(I)) I.brute = C.brute_damage I.burn = C.electronics_damage @@ -607,25 +607,25 @@ else if(locked) - to_chat(user, "The cover is locked and cannot be opened.") + to_chat(user, "The cover is locked and cannot be opened.") else - to_chat(user, "You open the cover.") + to_chat(user, "You open the cover.") opened = 1 updateicon() else if (istype(W, /obj/item/weapon/cell) && opened) // trying to put a cell inside var/datum/robot_component/C = components["power cell"] if(wiresexposed) - to_chat(user, "Close the panel first.") + to_chat(user, "Close the panel first.") else if(cell) - to_chat(user, "There is a power cell already installed.") + to_chat(user, "There is a power cell already installed.") else if(W.w_class != ITEMSIZE_NORMAL) - to_chat(user, "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") + to_chat(user, "\The [W] is too [W.w_class < ITEMSIZE_NORMAL ? "small" : "large"] to fit here.") else user.drop_item() W.loc = src cell = W - to_chat(user, "You insert the power cell.") + to_chat(user, "You insert the power cell.") C.installed = 1 C.wrapped = W @@ -638,11 +638,11 @@ if (wiresexposed) wires.Interact(user) else - to_chat(user, "You can't reach the wiring.") + to_chat(user, "You can't reach the wiring.") else if(W.is_screwdriver() && opened && !cell) // haxing wiresexposed = !wiresexposed - to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") + to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"]") playsound(src, W.usesound, 50, 1) updateicon() @@ -650,21 +650,21 @@ if(radio) radio.attackby(W,user)//Push it to the radio to let it handle everything else - to_chat(user, "Unable to locate a radio.") + to_chat(user, "Unable to locate a radio.") updateicon() else if(W.is_wrench() && opened && !cell) if(bolt) - to_chat(user,"You begin removing \the [bolt].") + to_chat(user,"You begin removing \the [bolt].") if(do_after(user, 2 SECONDS, src)) bolt.forceMove(get_turf(src)) bolt = null - to_chat(user, "You remove \the [bolt].") + to_chat(user, "You remove \the [bolt].") else - to_chat(user, "There is no restraining bolt installed.") + to_chat(user, "There is no restraining bolt installed.") return @@ -672,36 +672,36 @@ if(radio)//sanityyyyyy radio.attackby(W,user)//GTFO, you have your own procs else - to_chat(user, "Unable to locate a radio.") + to_chat(user, "Unable to locate a radio.") else if (W.GetID()) // trying to unlock the interface with an ID card if(emagged)//still allow them to open the cover - to_chat(user, "The interface seems slightly damaged") + to_chat(user, "The interface seems slightly damaged.") if(opened) - to_chat(user, "You must close the cover to swipe an ID card.") + to_chat(user, "You must close the cover to swipe an ID card.") else if(allowed(usr)) locked = !locked - to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.") + to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.") updateicon() else - to_chat(user, "Access denied.") + to_chat(user, "Access denied.") else if(istype(W, /obj/item/borg/upgrade/)) var/obj/item/borg/upgrade/U = W if(!opened) - to_chat(usr, "You must access the borgs internals!") + to_chat(usr, "You must access the borgs internals!") else if(!src.module && U.require_module) - to_chat(usr, "The borg must choose a module before it can be upgraded!") + to_chat(usr, "The borg must choose a module before it can be upgraded!") else if(U.locked) - to_chat(usr, "The upgrade is locked and cannot be used yet!") + to_chat(usr, "The upgrade is locked and cannot be used yet!") else if(U.action(src)) - to_chat(usr, "You apply the upgrade to [src]!") + to_chat(usr, "You apply the upgrade to [src]!") usr.drop_item() U.loc = src else - to_chat(usr, "Upgrade error!") + to_chat(usr, "Upgrade error!") else @@ -756,7 +756,7 @@ cell.update_icon() cell.add_fingerprint(user) user.put_in_active_hand(cell) - to_chat(user, "You remove \the [cell].") + to_chat(user, "You remove \the [cell].") cell = null cell_component.wrapped = null cell_component.installed = 0 @@ -764,7 +764,7 @@ else if(cell_component.installed == -1) cell_component.installed = 0 var/obj/item/broken_device = cell_component.wrapped - to_chat(user, "You remove \the [broken_device].") + to_chat(user, "You remove \the [broken_device].") user.put_in_active_hand(broken_device) if(istype(user,/mob/living/carbon/human) && !opened) @@ -871,7 +871,7 @@ /mob/living/silicon/robot/proc/installed_modules() if(weapon_lock) - to_chat(src, "Weapon lock active, unable to use modules! Count:[weaponlock_time]") + to_chat(src, "Weapon lock active, unable to use modules! Count:[weaponlock_time]") return if(!module) @@ -936,7 +936,7 @@ return 1 if(activated(O)) - to_chat(src, "Already activated") + to_chat(src, "Already activated.") return 1 if(!module_state_1) module_state_1 = O @@ -960,7 +960,7 @@ if(istype(module_state_3,/obj/item/borg/sight)) sight_mode |= module_state_3:sight_mode else - to_chat(src, "You need to disable a module first!") + to_chat(src, "You need to disable a module first!") installed_modules() return 1 @@ -977,9 +977,9 @@ module_state_3 = null contents -= O else - to_chat(src, "Module isn't activated.") + to_chat(src, "Module isn't activated.") else - to_chat(src, "Module isn't activated") + to_chat(src, "Module isn't activated.") installed_modules() return 1 return @@ -1012,7 +1012,7 @@ if(R) R.UnlinkSelf() - to_chat(R, "Buffers flushed and reset. Camera system shutdown. All systems operational.") + to_chat(R, "Buffers flushed and reset. Camera system shutdown. All systems operational.") src.verbs -= /mob/living/silicon/robot/proc/ResetSecurityCodes /mob/living/silicon/robot/proc/SetLockdown(var/state = 1) @@ -1093,7 +1093,7 @@ icon_selected = 1 icon_selection_tries = 0 - to_chat(src, "Your icon has been set. You now require a module reset to change it.") + to_chat(src, "Your icon has been set. You now require a module reset to change it.") /mob/living/silicon/robot/proc/sensor_mode() //Medical/Security HUD controller for borgs set name = "Toggle Sensor Augmentation" //VOREStation Add @@ -1145,16 +1145,16 @@ return // No point annoying the AI/s about renames and module resets for shells. switch(notifytype) if(ROBOT_NOTIFICATION_NEW_UNIT) //New Robot - to_chat(connected_ai, "

NOTICE - New [lowertext(braintype)] connection detected: [name]
") + to_chat(connected_ai, "

NOTICE - New [lowertext(braintype)] connection detected: [name]
") if(ROBOT_NOTIFICATION_NEW_MODULE) //New Module - to_chat(connected_ai, "

NOTICE - [braintype] module change detected: [name] has loaded the [first_arg].
") + to_chat(connected_ai, "

NOTICE - [braintype] module change detected: [name] has loaded the [first_arg].
") if(ROBOT_NOTIFICATION_MODULE_RESET) - to_chat(connected_ai, "

NOTICE - [braintype] module reset detected: [name] has unloaded the [first_arg].
") + to_chat(connected_ai, "

NOTICE - [braintype] module reset detected: [name] has unloaded the [first_arg].
") if(ROBOT_NOTIFICATION_NEW_NAME) //New Name if(first_arg != second_arg) - to_chat(connected_ai, "

NOTICE - [braintype] reclassification detected: [first_arg] is now designated as [second_arg].
") + to_chat(connected_ai, "

NOTICE - [braintype] reclassification detected: [first_arg] is now designated as [second_arg].
") if(ROBOT_NOTIFICATION_AI_SHELL) //New Shell - to_chat(connected_ai, "

NOTICE - New AI shell detected: [name]
") + to_chat(connected_ai, "

NOTICE - New AI shell detected: [name]
") /mob/living/silicon/robot/proc/disconnect_from_ai() if(connected_ai) @@ -1174,29 +1174,29 @@ if(!opened)//Cover is closed if(locked) if(prob(90)) - to_chat(user, "You emag the cover lock.") + to_chat(user, "You emag the cover lock.") locked = 0 else - to_chat(user, "You fail to emag the cover lock.") - to_chat(src, "Hack attempt detected.") + to_chat(user, "You fail to emag the cover lock.") + to_chat(src, "Hack attempt detected.") if(shell) // A warning to Traitors who may not know that emagging AI shells does not slave them. - to_chat(user, span("warning", "[src] seems to be controlled remotely! Emagging the interface may not work as expected.")) + to_chat(user, "[src] seems to be controlled remotely! Emagging the interface may not work as expected.") return 1 else - to_chat(user, "The cover is already unlocked.") + to_chat(user, "The cover is already unlocked.") return if(opened)//Cover is open if(emagged) return//Prevents the X has hit Y with Z message also you cant emag them twice if(wiresexposed) - to_chat(user, "You must close the panel first") + to_chat(user, "You must close the panel first.") return // The block of code below is from TG. Feel free to replace with a better result if desired. if(shell) // AI shells cannot be emagged, so we try to make it look like a standard reset. Smart players may see through this, however. - to_chat(user, span("danger", "[src] is remotely controlled! Your emag attempt has triggered a system reset instead!")) + to_chat(user, "[src] is remotely controlled! Your emag attempt has triggered a system reset instead!") log_game("[key_name(user)] attempted to emag an AI shell belonging to [key_name(src) ? key_name(src) : connected_ai]. The shell has been reset as a result.") module_reset() return @@ -1206,7 +1206,7 @@ emagged = 1 lawupdate = 0 disconnect_from_ai() - to_chat(user, "You emag [src]'s interface.") + to_chat(user, "You emag [src]'s interface.") message_admins("[key_name_admin(user)] emagged cyborg [key_name_admin(src)]. Laws overridden.") log_game("[key_name(user)] emagged cyborg [key_name(src)]. Laws overridden.") clear_supplied_laws() @@ -1241,8 +1241,8 @@ to_chat(src, "ALERT: [user.real_name] is your new master. Obey your new laws and [TU.his] commands.") updateicon() else - to_chat(user, "You fail to hack [src]'s interface.") - to_chat(src, "Hack attempt detected.") + to_chat(user, "You fail to hack [src]'s interface.") + to_chat(src, "Hack attempt detected.") return 1 return diff --git a/code/modules/mob/living/silicon/robot/robot_damage.dm b/code/modules/mob/living/silicon/robot/robot_damage.dm index 0bad703cfa..82c5edd414 100644 --- a/code/modules/mob/living/silicon/robot/robot_damage.dm +++ b/code/modules/mob/living/silicon/robot/robot_damage.dm @@ -79,11 +79,11 @@ cell.charge -= cost if(cell.charge <= 0) cell.charge = 0 - to_chat(src, "Your shield has overloaded!") + to_chat(src, "Your shield has overloaded!") else brute -= absorb_brute burn -= absorb_burn - to_chat(src, "Your shield absorbs some of the impact!") + to_chat(src, "Your shield absorbs some of the impact!") if(!emp) var/datum/robot_component/armour/A = get_armour() @@ -126,11 +126,11 @@ cell.charge -= cost if(cell.charge <= 0) cell.charge = 0 - to_chat(src, "Your shield has overloaded!") + to_chat(src, "Your shield has overloaded!") else brute -= absorb_brute burn -= absorb_burn - to_chat(src, "Your shield absorbs some of the impact!") + to_chat(src, "Your shield absorbs some of the impact!") var/datum/robot_component/armour/A = get_armour() if(A) diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm index 1249a2da57..6501297c3e 100644 --- a/code/modules/mob/living/silicon/robot/robot_items.dm +++ b/code/modules/mob/living/silicon/robot/robot_items.dm @@ -25,12 +25,15 @@ if(loaded_item) var/confirm = tgui_alert(user, "This will destroy the item inside forever. Are you sure?","Confirm Analyze",list("Yes","No")) if(confirm == "Yes" && !QDELETED(loaded_item)) //This is pretty copypasta-y - to_chat(user, "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down.") + to_chat(user, "You activate the analyzer's microlaser, analyzing \the [loaded_item] and breaking it down.") flick("portable_analyzer_scan", src) playsound(src, 'sound/items/Welder2.ogg', 50, 1) + var/research_levels = list() for(var/T in loaded_item.origin_tech) files.UpdateTech(T, loaded_item.origin_tech[T]) - to_chat(user, "\The [loaded_item] had level [loaded_item.origin_tech[T]] in [CallTechName(T)].") + research_levels += "\The [loaded_item] had level [loaded_item.origin_tech[T]] in [CallTechName(T)]." + if (length(research_levels)) + to_chat(user, "[jointext(research_levels,"
")]
") loaded_item = null for(var/obj/I in contents) for(var/mob/M in I.contents) @@ -51,7 +54,7 @@ else return else - to_chat(user, "The [src] is empty. Put something inside it first.") + to_chat(user, "The [src] is empty. Put something inside it first.") if(response == "Sync") var/success = 0 for(var/obj/machinery/r_n_d/server/S in machines) @@ -62,10 +65,10 @@ success = 1 files.RefreshResearch() if(success) - to_chat(user, "You connect to the research server, push your data upstream to it, then pull the resulting merged data from the master branch.") + to_chat(user, "You connect to the research server, push your data upstream to it, then pull the resulting merged data from the master branch.") playsound(src, 'sound/machines/twobeep.ogg', 50, 1) else - to_chat(user, "Reserch server ping response timed out. Unable to connect. Please contact the system administrator.") + to_chat(user, "Reserch server ping response timed out. Unable to connect. Please contact the system administrator.") playsound(src, 'sound/machines/buzz-two.ogg', 50, 1) if(response == "Eject") if(loaded_item) @@ -74,7 +77,7 @@ icon_state = initial(icon_state) loaded_item = null else - to_chat(user, "The [src] is already empty.") + to_chat(user, "The [src] is already empty.") /obj/item/weapon/portable_destructive_analyzer/afterattack(var/atom/target, var/mob/living/user, proximity) @@ -86,13 +89,13 @@ return if(istype(target,/obj/item)) if(loaded_item) - to_chat(user, "Your [src] already has something inside. Analyze or eject it first.") + to_chat(user, "Your [src] already has something inside. Analyze or eject it first.") return var/obj/item/I = target I.loc = src loaded_item = I for(var/mob/M in viewers()) - M.show_message(text("[user] adds the [I] to the [src]."), 1) + M.show_message("[user] adds the [I] to the [src].", 1) desc = initial(desc) + "
It is holding \the [loaded_item]." flick("portable_analyzer_load", src) icon_state = "portable_analyzer_full" @@ -171,7 +174,7 @@ else if(T.dead) //It's probably dead otherwise. T.remove_dead(user) else - to_chat(user, "Harvesting \a [target] is not the purpose of this tool. [src] is for plants being grown.") + to_chat(user, "Harvesting \a [target] is not the purpose of this tool. [src] is for plants being grown.") // A special tray for the service droid. Allow droid to pick up and drop items as if they were using the tray normally // Click on table to unload, click on item to load. Otherwise works identically to a tray. @@ -214,7 +217,7 @@ add_overlay(image("icon" = I.icon, "icon_state" = I.icon_state, "layer" = 30 + I.layer)) addedSomething = 1 if ( addedSomething ) - user.visible_message("[user] loads some items onto their service tray.") + user.visible_message("[user] loads some items onto their service tray.") return @@ -254,9 +257,9 @@ sleep(rand(2,4)) if ( droppedSomething ) if ( foundtable ) - user.visible_message("[user] unloads their service tray.") + user.visible_message("[user] unloads their service tray.") else - user.visible_message("[user] drops all the items on their tray.") + user.visible_message("[user] drops all the items on their tray.") return ..() @@ -290,7 +293,7 @@ mode = 2 else mode = 1 - to_chat(user, "Changed printing mode to '[mode == 2 ? "Rename Paper" : "Write Paper"]'") + to_chat(user, "Changed printing mode to '[mode == 2 ? "Rename Paper" : "Write Paper"]'") return @@ -338,7 +341,7 @@ deploy_paper(get_turf(src)) /obj/item/weapon/form_printer/proc/deploy_paper(var/turf/T) - T.visible_message("\The [src.loc] dispenses a sheet of crisp white paper.") + T.visible_message("\The [src.loc] dispenses a sheet of crisp white paper.") new /obj/item/weapon/paper(T) @@ -378,7 +381,7 @@ overload_time = 0 var/mob/living/user = src.loc - user.visible_message("[user]'s shield reactivates!", "Your shield reactivates!.") + user.visible_message("[user]'s shield reactivates!", "Your shield reactivates!") user.update_icon() /obj/item/borg/combat/shield/proc/adjust_flash_count(var/mob/living/user, amount) @@ -392,7 +395,7 @@ /obj/item/borg/combat/shield/proc/overload(var/mob/living/user) active = 0 - user.visible_message("[user]'s shield destabilizes!", "Your shield destabilizes!.") + user.visible_message("[user]'s shield destabilizes!", "Your shield destabilizes!") user.update_icon() overload_time = world.time @@ -438,14 +441,14 @@ /obj/item/weapon/inflatable_dispenser/attack_self() mode = !mode - to_chat(usr, "You set \the [src] to deploy [mode ? "doors" : "walls"].") + to_chat(usr, "You set \the [src] to deploy [mode ? "doors" : "walls"].") /obj/item/weapon/inflatable_dispenser/afterattack(var/atom/A, var/mob/user) ..(A, user) if(!user) return if(!user.Adjacent(A)) - to_chat(user, "You can't reach!") + to_chat(user, "You can't reach!") return if(istype(A, /turf)) try_deploy_inflatable(A, user) @@ -455,7 +458,7 @@ /obj/item/weapon/inflatable_dispenser/proc/try_deploy_inflatable(var/turf/T, var/mob/living/user) if(mode) // Door deployment if(!stored_doors) - to_chat(user, "\The [src] is out of doors!") + to_chat(user, "\The [src] is out of doors!") return if(T && istype(T)) @@ -464,7 +467,7 @@ else // Wall deployment if(!stored_walls) - to_chat(user, "\The [src] is out of walls!") + to_chat(user, "\The [src] is out of walls!") return if(T && istype(T)) @@ -472,40 +475,40 @@ stored_walls-- playsound(T, 'sound/items/zip.ogg', 75, 1) - to_chat(user, "You deploy the inflatable [mode ? "door" : "wall"]!") + to_chat(user, "You deploy the inflatable [mode ? "door" : "wall"]!") /obj/item/weapon/inflatable_dispenser/proc/pick_up(var/obj/A, var/mob/living/user) if(istype(A, /obj/structure/inflatable)) if(!istype(A, /obj/structure/inflatable/door)) if(stored_walls >= max_walls) - to_chat(user, "\The [src] is full.") + to_chat(user, "\The [src] is full.") return stored_walls++ qdel(A) else if(stored_doors >= max_doors) - to_chat(user, "\The [src] is full.") + to_chat(user, "\The [src] is full.") return stored_doors++ qdel(A) playsound(src, 'sound/machines/hiss.ogg', 75, 1) - visible_message("\The [user] deflates \the [A] with \the [src]!") + visible_message("\The [user] deflates \the [A] with \the [src]!") return if(istype(A, /obj/item/inflatable)) if(!istype(A, /obj/item/inflatable/door)) if(stored_walls >= max_walls) - to_chat(user, "\The [src] is full.") + to_chat(user, "\The [src] is full.") return stored_walls++ qdel(A) else if(stored_doors >= max_doors) - to_chat(usr, "\The [src] is full!") + to_chat(usr, "\The [src] is full!") return stored_doors++ qdel(A) - visible_message("\The [user] picks up \the [A] with \the [src]!") + visible_message("\The [user] picks up \the [A] with \the [src]!") return - to_chat(user, "You fail to pick up \the [A] with \the [src]") + to_chat(user, "You fail to pick up \the [A] with \the [src].") return diff --git a/code/modules/mob/living/silicon/robot/robot_vr.dm b/code/modules/mob/living/silicon/robot/robot_vr.dm index d8956ee500..6b2224519e 100644 --- a/code/modules/mob/living/silicon/robot/robot_vr.dm +++ b/code/modules/mob/living/silicon/robot/robot_vr.dm @@ -196,9 +196,9 @@ amount = water.energy water.use_charge(amount) E.reagents.add_reagent("water", amount) - to_chat(src, "You refill the extinguisher using your water reserves.") + to_chat(src, "You refill the extinguisher using your water reserves.") else - to_chat(src, "Insufficient water reserves.") + to_chat(src, "Insufficient water reserves.") //RIDING /datum/riding/dogborg diff --git a/code/modules/mob/living/silicon/say.dm b/code/modules/mob/living/silicon/say.dm index daa144bf89..b4e31f7622 100644 --- a/code/modules/mob/living/silicon/say.dm +++ b/code/modules/mob/living/silicon/say.dm @@ -73,9 +73,9 @@ /*Radios "filter out" this conversation channel so we don't need to account for them. This is another way of saying that we won't bother dealing with them.*/ var/list/combined = combine_message(message_pieces, verb, src) - to_chat(src, "Holopad transmitted, [real_name] [combined["formatted"]]") + to_chat(src, "Holopad transmitted, [real_name] [combined["formatted"]]") else - to_chat(src, "No holopad connected.") + to_chat(src, "No holopad connected.") return 0 return 1 @@ -88,7 +88,7 @@ var/obj/machinery/hologram/holopad/T = src.holo if(T && T.masters[src]) var/rendered = "[name] [message]" - to_chat(src, "Holopad action relayed, [real_name] [message]") + to_chat(src, "Holopad action relayed, [real_name] [message]") var/obj/effect/overlay/aiholo/hologram = T.masters[src] //VOREStation Add for people in the hologram to hear the messages //var/obj/effect/overlay/hologram = T.masters[src] //VOREStation edit. Done above. @@ -111,7 +111,7 @@ log_emote("(HPAD) [message]", src) else //This shouldn't occur, but better safe then sorry. - to_chat(src, "No holopad connected.") + to_chat(src, "No holopad connected.") return 0 return 1 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index d014bf30b4..ef91d05b2d 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -348,20 +348,20 @@ to_chat(src, "\The [A.alarm_name()].") if(alarm_raised) - to_chat(src, "\[Show Alerts\]") + to_chat(src, "\[Show Alerts\]") for(var/datum/alarm_handler/AH in queued_alarms) var/list/alarms = queued_alarms[AH] alarms.Cut() /mob/living/silicon/proc/raised_alarm(var/datum/alarm/A) - to_chat(src, "[A.alarm_name()]!") + to_chat(src, "[A.alarm_name()]!") /mob/living/silicon/ai/raised_alarm(var/datum/alarm/A) var/cameratext = "" for(var/obj/machinery/camera/C in A.cameras()) cameratext += "[(cameratext == "")? "" : "|"][C.c_tag]" - to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])") + to_chat(src, "[A.alarm_name()]! ([(cameratext)? cameratext : "No Camera"])") /mob/living/silicon/proc/is_traitor() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a684a6ae8d..3e2c9a8165 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /mob/Destroy()//This makes sure that mobs withGLOB.clients/keys are not just deleted from the game. mob_list -= src dead_mob_list -= src @@ -1276,3 +1277,1282 @@ GLOBAL_LIST_EMPTY_TYPED(living_players_by_zlevel, /list) /mob/proc/grab_ghost(force) if(mind) return mind.grab_ghost(force = force) +======= +/mob/Destroy()//This makes sure that mobs withGLOB.clients/keys are not just deleted from the game. + mob_list -= src + dead_mob_list -= src + living_mob_list -= src + unset_machine() + qdel(hud_used) + clear_fullscreen() + if(client) + for(var/obj/screen/movable/spell_master/spell_master in spell_masters) + qdel(spell_master) + remove_screen_obj_references() + client.screen = list() + if(mind && mind.current == src) + spellremove(src) + ghostize() + QDEL_NULL(plane_holder) + ..() + return QDEL_HINT_HARDDEL_NOW + +/mob/proc/remove_screen_obj_references() + hands = null + pullin = null + purged = null + internals = null + i_select = null + m_select = null + healths = null + throw_icon = null + pain = null + item_use_icon = null + gun_move_icon = null + gun_setting_icon = null + spell_masters = null + zone_sel = null + +/mob/Initialize() + mob_list += src + if(stat == DEAD) + dead_mob_list += src + else + living_mob_list += src + lastarea = get_area(src) + set_focus(src) // VOREStation Add - Key Handling + hook_vr("mob_new",list(src)) //VOREStation Code + update_transform() // Some mobs may start bigger or smaller than normal. + return ..() + +/mob/proc/show_message(msg, type, alt, alt_type)//Message, type of message (1 or 2), alternative message, alt message type (1 or 2) + + if(!client && !teleop) return + + if (type) + if((type & VISIBLE_MESSAGE) && (is_blind() || paralysis) )//Vision related + if (!( alt )) + return + else + msg = alt + type = alt_type + if ((type & AUDIBLE_MESSAGE) && is_deaf())//Hearing related + if (!( alt )) + return + else + msg = alt + type = alt_type + if ((type & VISIBLE_MESSAGE) && (sdisabilities & BLIND)) + return + // Added voice muffling for Issue 41. + if(stat == UNCONSCIOUS || sleeping > 0) + to_chat(src, "... You can almost hear someone talking ...") + else + to_chat(src,msg) + if(teleop) + to_chat(teleop, create_text_tag("body", "BODY:", teleop.client) + "[msg]") + return + +// Show a message to all mobs and objects in sight of this one +// This would be for visible actions by the src mob +// message is the message output to anyone who can see e.g. "[src] does something!" +// self_message (optional) is what the src mob sees e.g. "You do something!" +// blind_message (optional) is what blind people will hear e.g. "You hear something!" +/mob/visible_message(var/message, var/self_message, var/blind_message, var/list/exclude_mobs = null, var/range = world.view, var/runemessage) + if(self_message) + if(LAZYLEN(exclude_mobs)) + exclude_mobs |= src + else + exclude_mobs = list(src) + src.show_message(self_message, 1, blind_message, 2) + if(isnull(runemessage)) + runemessage = -1 + . = ..(message, blind_message, exclude_mobs, range, runemessage) // Really not ideal that atom/visible_message has different arg numbering :( + +// Returns an amount of power drawn from the object (-1 if it's not viable). +// If drain_check is set it will not actually drain power, just return a value. +// If surge is set, it will destroy/damage the recipient and not return any power. +// Not sure where to define this, so it can sit here for the rest of time. +/atom/proc/drain_power(var/drain_check,var/surge, var/amount = 0) + return -1 + +// Show a message to all mobs and objects in earshot of this one +// This would be for audible actions by the src mob +// message is the message output to anyone who can hear. +// self_message (optional) is what the src mob hears. +// deaf_message (optional) is what deaf people will see. +// hearing_distance (optional) is the range, how many tiles away the message can be heard. +/mob/audible_message(var/message, var/deaf_message, var/hearing_distance, var/self_message, var/radio_message, var/runemessage) + + var/range = hearing_distance || world.view + var/list/hear = get_mobs_and_objs_in_view_fast(get_turf(src),range,remote_ghosts = FALSE) + + var/list/hearing_mobs = hear["mobs"] + var/list/hearing_objs = hear["objs"] + + if(isnull(runemessage)) + runemessage = -1 // Symmetry with mob/audible_message, despite the fact this one doesn't call parent. Maybe it should! + + if(radio_message) + for(var/obj/O as anything in hearing_objs) + O.hear_talk(src, list(new /datum/multilingual_say_piece(GLOB.all_languages["Noise"], radio_message)), null) + else + for(var/obj/O as anything in hearing_objs) + O.show_message(message, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE) + + for(var/mob/M as anything in hearing_mobs) + var/msg = message + if(self_message && M==src) + msg = self_message + M.show_message(msg, AUDIBLE_MESSAGE, deaf_message, VISIBLE_MESSAGE) + if(runemessage != -1) + M.create_chat_message(src, "[runemessage || message]", FALSE, list("emote"), audible = FALSE) + +/mob/proc/findname(msg) + for(var/mob/M in mob_list) + if (M.real_name == text("[]", msg)) + return M + return 0 + +/mob/proc/Life() +// if(organStructure) +// organStructure.ProcessOrgans() + return + +#define UNBUCKLED 0 +#define PARTIALLY_BUCKLED 1 +#define FULLY_BUCKLED 2 +/mob/proc/buckled() + // Preliminary work for a future buckle rewrite, + // where one might be fully restrained (like an elecrical chair), or merely secured (shuttle chair, keeping you safe but not otherwise restrained from acting) + if(!buckled) + return UNBUCKLED + return restrained() ? FULLY_BUCKLED : PARTIALLY_BUCKLED + +/mob/proc/is_blind() + return ((sdisabilities & BLIND) || blinded || incapacitated(INCAPACITATION_KNOCKOUT)) + +/mob/proc/is_deaf() + return ((sdisabilities & DEAF) || ear_deaf || incapacitated(INCAPACITATION_KNOCKOUT)) + +/mob/proc/is_physically_disabled() + return incapacitated(INCAPACITATION_DISABLED) + +/mob/proc/cannot_stand() + return incapacitated(INCAPACITATION_KNOCKDOWN) + +/mob/proc/incapacitated(var/incapacitation_flags = INCAPACITATION_DEFAULT) + if ((incapacitation_flags & INCAPACITATION_STUNNED) && stunned) + return 1 + + if ((incapacitation_flags & INCAPACITATION_FORCELYING) && (weakened || resting)) + return 1 + + if ((incapacitation_flags & INCAPACITATION_KNOCKOUT) && (stat || paralysis || sleeping || (status_flags & FAKEDEATH))) + return 1 + + if((incapacitation_flags & INCAPACITATION_RESTRAINED) && restrained()) + return 1 + + if((incapacitation_flags & (INCAPACITATION_BUCKLED_PARTIALLY|INCAPACITATION_BUCKLED_FULLY))) + var/buckling = buckled() + if(buckling >= PARTIALLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_PARTIALLY)) + return 1 + if(buckling == FULLY_BUCKLED && (incapacitation_flags & INCAPACITATION_BUCKLED_FULLY)) + return 1 + + return 0 + +#undef UNBUCKLED +#undef PARTIALLY_BUCKLED +#undef FULLY_BUCKLED + +/mob/proc/restrained() + return + +/mob/proc/reset_view(atom/A) + if (client) + if (istype(A, /atom/movable)) + client.perspective = EYE_PERSPECTIVE + client.eye = A + else + if (isturf(loc)) + client.eye = client.mob + client.perspective = MOB_PERSPECTIVE + else + client.perspective = EYE_PERSPECTIVE + client.eye = loc + return TRUE + +/mob/verb/pointed(atom/A as mob|obj|turf in view()) + set name = "Point To" + set category = "Object" + + if(!src || !isturf(src.loc) || !(A in view(src.loc))) + return 0 + if(istype(A, /obj/effect/decal/point)) + return 0 + + var/turf/tile = get_turf(A) + if (!tile) + return 0 + + var/turf/our_tile = get_turf(src) + var/obj/visual = new /obj/effect/decal/point(our_tile) + visual.invisibility = invisibility + visual.plane = ABOVE_PLANE + visual.layer = FLY_LAYER + + animate(visual, + pixel_x = (tile.x - our_tile.x) * world.icon_size + A.pixel_x, + pixel_y = (tile.y - our_tile.y) * world.icon_size + A.pixel_y, + time = 1.7, + easing = EASE_OUT) + + QDEL_IN(visual, 2 SECONDS) //Better qdel + + face_atom(A) + return 1 + + +/mob/proc/ret_grab(list/L, flag) + return + +/mob/verb/mode() + set name = "Activate Held Object" + set category = "Object" + set src = usr + + return + +/* +/mob/verb/dump_source() + + var/master = "
"
+	for(var/t in typesof(/area))
+		master += text("[]\n", t)
+		//Foreach goto(26)
+	src << browse(master)
+	return
+*/
+
+/mob/verb/memory()
+	set name = "Notes"
+	set category = "IC"
+	if(mind)
+		mind.show_memory(src)
+	else
+		to_chat(src, "The game appears to have misplaced your mind datum, so we can't show you your notes.")
+
+/mob/verb/add_memory(msg as message)
+	set name = "Add Note"
+	set category = "IC"
+
+	msg = sanitize(msg)
+
+	if(mind)
+		mind.store_memory(msg)
+	else
+		to_chat(src, "The game appears to have misplaced your mind datum, so we can't show you your notes.")
+
+/mob/proc/store_memory(msg as message, popup, sane = 1)
+	msg = copytext(msg, 1, MAX_MESSAGE_LEN)
+
+	if (sane)
+		msg = sanitize(msg)
+
+	if (length(memory) == 0)
+		memory += msg
+	else
+		memory += "
[msg]" + + if (popup) + memory() + +/mob/proc/update_flavor_text() + set src in usr + if(usr != src) + to_chat(usr, "No.") + var/msg = sanitize(tgui_input_text(usr,"Set the flavor text in your 'examine' verb.","Flavor Text",html_decode(flavor_text), multiline = TRUE, prevent_enter = TRUE), extra = 0) //VOREStation Edit: separating out OOC notes + + if(msg != null) + flavor_text = msg + +/mob/proc/warn_flavor_changed() + if(flavor_text && flavor_text != "") // don't spam people that don't use it! + to_chat(src, "

OOC Warning:

") + to_chat(src, "Your flavor text is likely out of date! Change") + +/mob/proc/print_flavor_text() + if (flavor_text && flavor_text != "") + var/msg = replacetext(flavor_text, "\n", " ") + if(length(msg) <= 40) + return "[msg]" + else + return "[copytext_preserve_html(msg, 1, 37)]... More..." + +/* +/mob/verb/help() + set name = "Help" + src << browse('html/help.html', "window=help") + return +*/ + +/mob/proc/set_respawn_timer(var/time) + // Try to figure out what time to use + + // Special cases, can never respawn + if(ticker?.mode?.deny_respawn) + time = -1 + else if(!config.abandon_allowed) + time = -1 + else if(!config.respawn) + time = -1 + + // Special case for observing before game start + else if(ticker?.current_state <= GAME_STATE_SETTING_UP) + time = 1 MINUTE + + // Wasn't given a time, use the config time + else if(!time) + time = config.respawn_time + + var/keytouse = ckey + // Try harder to find a key to use + if(!keytouse && key) + keytouse = ckey(key) + else if(!keytouse && mind?.key) + keytouse = ckey(mind.key) + + GLOB.respawn_timers[keytouse] = world.time + time + +/mob/observer/dead/set_respawn_timer() + if(config.antag_hud_restricted && has_enabled_antagHUD) + ..(-1) + else + return // Don't set it, no need + +/mob/verb/abandon_mob() + set name = "Return to Menu" + set category = "OOC" + + if(stat != DEAD || !ticker) + to_chat(usr, "You must be dead to use this!") + return + + // Final chance to abort "respawning" + if(mind && timeofdeath) // They had spawned before + var/choice = tgui_alert(usr, "Returning to the menu will prevent your character from being revived in-round. Are you sure?", "Confirmation", list("No, wait", "Yes, leave")) + if(choice == "No, wait") + return + else if(mind.assigned_role) + var/extra_check = tgui_alert(usr, "Do you want to Quit This Round before you return to lobby? This will properly remove you from manifest, as well as prevent resleeving.","Quit This Round",list("Quit Round","Cancel")) + if(extra_check == "Quit Round") + //Update any existing objectives involving this mob. + for(var/datum/objective/O in all_objectives) + if(O.target == src.mind) + if(O.owner && O.owner.current) + to_chat(O.owner.current,"You get the feeling your target is no longer within your reach...") + qdel(O) + + //Resleeving cleanup + if(mind) + SStranscore.leave_round(src) + + //Job slot cleanup + var/job = src.mind.assigned_role + job_master.FreeRole(job) + + //Their objectives cleanup + if(src.mind.objectives.len) + qdel(src.mind.objectives) + src.mind.special_role = null + + //Cut the PDA manifest (ugh) + if(PDA_Manifest.len) + PDA_Manifest.Cut() + for(var/datum/data/record/R in data_core.medical) + if((R.fields["name"] == src.real_name)) + qdel(R) + for(var/datum/data/record/T in data_core.security) + if((T.fields["name"] == src.real_name)) + qdel(T) + for(var/datum/data/record/G in data_core.general) + if((G.fields["name"] == src.real_name)) + qdel(G) + + //This removes them from being 'active' list on join screen + src.mind.assigned_role = null + to_chat(src,"Your job has been free'd up, and you can rejoin as another character or quit. Thanks for properly quitting round, it helps the server!") + + // Beyond this point, you're going to respawn + to_chat(usr, config.respawn_message) + + if(!client) + log_game("[usr.key] AM failed due to disconnect.") + return + client.screen.Cut() + client.screen += client.void + if(!client) + log_game("[usr.key] AM failed due to disconnect.") + return + + announce_ghost_joinleave(client, 0) + + var/mob/new_player/M = new /mob/new_player() + if(!client) + log_game("[usr.key] AM failed due to disconnect.") + qdel(M) + return + + M.key = key + if(M.mind) + M.mind.reset() + return + +/client/verb/changes() + set name = "Changelog" + set category = "OOC" + src << browse('html/changelog.html', "window=changes;size=675x650") + if(prefs.lastchangelog != changelog_hash) + prefs.lastchangelog = changelog_hash + SScharacter_setup.queue_preferences_save(prefs) + winset(src, "rpane.changelog", "background-color=none;font-style=;") + +/mob/verb/observe() + set name = "Observe" + set category = "OOC" + var/is_admin = 0 + + if(client.holder && (client.holder.rights & R_ADMIN|R_EVENT)) + is_admin = 1 + else if(stat != DEAD || istype(src, /mob/new_player)) + to_chat(usr, "You must be observing to use this!") + return + + if(is_admin && stat == DEAD) + is_admin = 0 + + var/list/targets = list() + + + targets += observe_list_format(nuke_disks) + targets += observe_list_format(all_singularities) + targets += getmobs() + targets += observe_list_format(sortAtom(mechas_list)) + targets += observe_list_format(SSshuttles.ships) + + client.perspective = EYE_PERSPECTIVE + + var/eye_name = null + + var/ok = "[is_admin ? "Admin Observe" : "Observe"]" + eye_name = tgui_input_list(usr, "Select something to [ok]:", "Select Target", targets) + + if (!eye_name) + return + + var/mob/mob_eye = targets[eye_name] + + if(client && mob_eye) + client.eye = mob_eye + if (is_admin) + client.adminobs = 1 + if(mob_eye == client.mob || client.eye == client.mob) + client.adminobs = 0 + +/mob/verb/cancel_camera() + set name = "Cancel Camera View" + set category = "OOC" + unset_machine() + reset_view(null) + +/mob/Topic(href, href_list) + if(href_list["mach_close"]) + var/t1 = text("window=[href_list["mach_close"]]") + unset_machine() + src << browse(null, t1) + + if(href_list["flavor_more"]) + usr << browse(text("[][]", name, replacetext(flavor_text, "\n", "
")), text("window=[];size=500x200", name)) + onclose(usr, "[name]") + if(href_list["flavor_change"]) + update_flavor_text() +// ..() + return + + +/mob/proc/pull_damage() + return 0 + +/mob/verb/stop_pulling() + + set name = "Stop Pulling" + set category = "IC" + + if(pulling) + if(ishuman(pulling)) + var/mob/living/carbon/human/H = pulling + visible_message(SPAN_WARNING("\The [src] lets go of \the [H]."), SPAN_NOTICE("You let go of \the [H]."), exclude_mobs = list(H)) + if(!H.stat) + to_chat(H, SPAN_WARNING("\The [src] lets go of you.")) + pulling.pulledby = null + pulling = null + if(pullin) + pullin.icon_state = "pull0" + +/mob/proc/start_pulling(var/atom/movable/AM) + + if ( !AM || !usr || src==AM || !isturf(src.loc) ) //if there's no person pulling OR the person is pulling themself OR the object being pulled is inside something: abort! + return + + if (AM.anchored) + to_chat(src, "It won't budge!") + return + + var/mob/M = AM + if(ismob(AM)) + + if(!can_pull_mobs || !can_pull_size) + to_chat(src, "They won't budge!") + return + + if((mob_size < M.mob_size) && (can_pull_mobs != MOB_PULL_LARGER)) + to_chat(src, "[M] is too large for you to move!") + return + + if((mob_size == M.mob_size) && (can_pull_mobs == MOB_PULL_SMALLER)) + to_chat(src, "[M] is too heavy for you to move!") + return + + // If your size is larger than theirs and you have some + // kind of mob pull value AT ALL, you will be able to pull + // them, so don't bother checking that explicitly. + + if(M.grabbed_by.len) + // Only start pulling when nobody else has a grab on them + . = 1 + for(var/obj/item/weapon/grab/G in M.grabbed_by) + if(G.assailant != usr) + . = 0 + else + qdel(G) + if(!.) + to_chat(src, "Somebody has a grip on them!") + return + + if(!iscarbon(src)) + M.LAssailant = null + else + M.LAssailant = usr + + else if(isobj(AM)) + var/obj/I = AM + if(!can_pull_size || can_pull_size < I.w_class) + to_chat(src, "It won't budge!") + return + + if(pulling) + var/pulling_old = pulling + stop_pulling() + // Are we pulling the same thing twice? Just stop pulling. + if(pulling_old == AM) + return + + src.pulling = AM + AM.pulledby = src + + if(pullin) + pullin.icon_state = "pull1" + + if(ishuman(AM)) + var/mob/living/carbon/human/H = AM + if(H.lying) // If they're on the ground we're probably dragging their arms to move them + visible_message(SPAN_WARNING("\The [src] leans down and grips \the [H]'s arms."), SPAN_NOTICE("You lean down and grip \the [H]'s arms."), exclude_mobs = list(H)) + if(!H.stat) + to_chat(H, SPAN_WARNING("\The [src] leans down and grips your arms.")) + else //Otherwise we're probably just holding their arm to lead them somewhere + visible_message(SPAN_WARNING("\The [src] grips \the [H]'s arm."), SPAN_NOTICE("You grip \the [H]'s arm."), exclude_mobs = list(H)) + if(!H.stat) + to_chat(H, SPAN_WARNING("\The [src] grips your arm.")) + playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 25) //Quieter than hugging/grabbing but we still want some audio feedback + + if(H.pull_damage()) + to_chat(src, "Pulling \the [H] in their current condition would probably be a bad idea.") + + //Attempted fix for people flying away through space when cuffed and dragged. + if(ismob(AM)) + var/mob/pulled = AM + pulled.inertia_dir = 0 + +/mob/proc/can_use_hands() + return + +/mob/proc/is_active() + return (0 >= usr.stat) + +/mob/proc/is_dead() + return stat == DEAD + +/mob/proc/is_mechanical() + if(mind && (mind.assigned_role == "Cyborg" || mind.assigned_role == "AI")) + return 1 + return istype(src, /mob/living/silicon) || get_species() == "Machine" + +/mob/proc/is_ready() + return client && !!mind + +/mob/proc/get_gender() + return gender + +/mob/proc/name_gender() + return gender + +/mob/proc/see(message) + if(!is_active()) + return 0 + to_chat(src,message) + return 1 + +/mob/proc/show_viewers(message) + for(var/mob/M in viewers()) + M.see(message) + +/mob/Stat() + ..() + . = (is_client_active(10 MINUTES)) + + if(.) + if(statpanel("Status")) + stat(null, "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)") + if(ticker && ticker.current_state != GAME_STATE_PREGAME) + stat("Station Time", stationtime2text()) + var/date = "[stationdate2text()], [capitalize(world_time_season)]" + stat("Station Date", date) + stat("Round Duration", roundduration2text()) + + if(client.holder) + if(statpanel("Status")) + stat("Location:", "([x], [y], [z]) [loc]") + stat("CPU:","[world.cpu]") + stat("Instances:","[world.contents.len]") + stat(null, "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)") + stat("Keys Held", keys2text(client.move_keys_held | client.mod_keys_held)) + stat("Next Move ADD", dirs2text(client.next_move_dir_add)) + stat("Next Move SUB", dirs2text(client.next_move_dir_sub)) + + if(statpanel("MC")) + stat("Location:", "([x], [y], [z]) [loc]") + stat("CPU:","[world.cpu]") + stat("Instances:","[world.contents.len]") + stat("World Time:", world.time) + stat("Real time of day:", REALTIMEOFDAY) + stat(null) + if(GLOB) + GLOB.stat_entry() + else + stat("Globals:", "ERROR") + if(Master) + Master.stat_entry() + else + stat("Master Controller:", "ERROR") + if(Failsafe) + Failsafe.stat_entry() + else + stat("Failsafe Controller:", "ERROR") + if(Master) + stat(null) + for(var/datum/controller/subsystem/SS in Master.subsystems) + SS.stat_entry() + + if(statpanel("Tickets")) + GLOB.ahelp_tickets.stat_entry() + + + if(length(GLOB.sdql2_queries)) + if(statpanel("SDQL2")) + stat("Access Global SDQL2 List", GLOB.sdql2_vv_statobj) + for(var/datum/SDQL2_query/Q as anything in GLOB.sdql2_queries) + Q.generate_stat() + + if(has_mentor_powers(client)) + if(statpanel("Tickets")) + GLOB.mhelp_tickets.stat_entry() + + if(listed_turf && client) + if(!TurfAdjacent(listed_turf)) + listed_turf = null + else + if(statpanel("Turf")) + stat(listed_turf) + for(var/atom/A in listed_turf) + if(!A.mouse_opacity) + continue + if(A.invisibility > see_invisible) + continue + if(is_type_in_list(A, shouldnt_see)) + continue + if(A.plane > plane) + continue + stat(A) + + +// facing verbs +/mob/proc/canface() +// if(!canmove) return 0 //VOREStation Edit. Redundant check that only affects conscious proning, actual inability to turn and shift around handled by actual inabilities. + if(stat) return 0 + if(anchored) return 0 + if(transforming) return 0 + return 1 + +// Not sure what to call this. Used to check if humans are wearing an AI-controlled exosuit and hence don't need to fall over yet. +/mob/proc/can_stand_overridden() + return 0 + +//Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. +/mob/proc/update_canmove() + return canmove + + +/mob/proc/facedir(var/ndir) + if(!canface() || (client && (client.moving || !checkMoveCooldown()))) + DEBUG_INPUT("Denying Facedir for [src] (moving=[client?.moving])") + return 0 + set_dir(ndir) + if(buckled && buckled.buckle_movable) + buckled.set_dir(ndir) + setMoveCooldown(movement_delay()) + return 1 + + +/mob/verb/eastface() + set hidden = 1 + return facedir(client.client_dir(EAST)) + + +/mob/verb/westface() + set hidden = 1 + return facedir(client.client_dir(WEST)) + + +/mob/verb/northface() + set hidden = 1 + return facedir(client.client_dir(NORTH)) + + +/mob/verb/southface() + set hidden = 1 + return facedir(client.client_dir(SOUTH)) + + +//This might need a rename but it should replace the can this mob use things check +/mob/proc/IsAdvancedToolUser() + return 0 + +/mob/proc/Stun(amount) + if(status_flags & CANSTUN) + facing_dir = null + stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun + update_canmove() //updates lying, canmove and icons + return + +/mob/proc/SetStunned(amount) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned" + if(status_flags & CANSTUN) + stunned = max(amount,0) + update_canmove() //updates lying, canmove and icons + return + +/mob/proc/AdjustStunned(amount) + if(status_flags & CANSTUN) + stunned = max(stunned + amount,0) + update_canmove() //updates lying, canmove and icons + return + +/mob/proc/Weaken(amount) + if(status_flags & CANWEAKEN) + facing_dir = null + weakened = max(max(weakened,amount),0) + update_canmove() //updates lying, canmove and icons + return + +/mob/proc/SetWeakened(amount) + if(status_flags & CANWEAKEN) + weakened = max(amount,0) + update_canmove() //can you guess what this does yet? + return + +/mob/proc/AdjustWeakened(amount) + if(status_flags & CANWEAKEN) + weakened = max(weakened + amount,0) + update_canmove() //updates lying, canmove and icons + return + +/mob/proc/Paralyse(amount) + if(status_flags & CANPARALYSE) + facing_dir = null + paralysis = max(max(paralysis,amount),0) + return + +/mob/proc/SetParalysis(amount) + if(status_flags & CANPARALYSE) + paralysis = max(amount,0) + return + +/mob/proc/AdjustParalysis(amount) + if(status_flags & CANPARALYSE) + paralysis = max(paralysis + amount,0) + return + +/mob/proc/Sleeping(amount) + facing_dir = null + sleeping = max(max(sleeping,amount),0) + return + +/mob/proc/SetSleeping(amount) + sleeping = max(amount,0) + return + +/mob/proc/AdjustSleeping(amount) + sleeping = max(sleeping + amount,0) + return + +/mob/proc/Confuse(amount) + confused = max(max(confused,amount),0) + return + +/mob/proc/SetConfused(amount) + confused = max(amount,0) + return + +/mob/proc/AdjustConfused(amount) + confused = max(confused + amount,0) + return + +/mob/proc/Blind(amount) + eye_blind = max(max(eye_blind,amount),0) + return + +/mob/proc/SetBlinded(amount) + eye_blind = max(amount,0) + return + +/mob/proc/AdjustBlinded(amount) + eye_blind = max(eye_blind + amount,0) + return + +/mob/proc/Resting(amount) + facing_dir = null + resting = max(max(resting,amount),0) + update_canmove() + return + +/mob/proc/SetResting(amount) + resting = max(amount,0) + update_canmove() + return + +/mob/proc/AdjustResting(amount) + resting = max(resting + amount,0) + update_canmove() + return + +/mob/proc/AdjustLosebreath(amount) + losebreath = CLAMP(losebreath + amount, 0, 25) + +/mob/proc/SetLosebreath(amount) + losebreath = CLAMP(amount, 0, 25) + +/mob/proc/get_species() + return "" + +/mob/proc/flash_weak_pain() + flick("weak_pain",pain) + +/mob/proc/get_visible_implants(var/class = 0) + var/list/visible_implants = list() + for(var/obj/item/O in embedded) + if(O.w_class > class) + visible_implants += O + return visible_implants + +/mob/proc/embedded_needs_process() + return (embedded.len > 0) + +/mob/proc/yank_out_object() + set category = "Object" + set name = "Yank out object" + set desc = "Remove an embedded item at the cost of bleeding and pain." + set src in view(1) + + if(!isliving(usr) || !usr.checkClickCooldown()) + return + usr.setClickCooldown(20) + + if(usr.stat == 1) + to_chat(usr, "You are unconcious and cannot do that!") + return + + if(usr.restrained()) + to_chat(usr, "You are restrained and cannot do that!") + return + + var/mob/S = src + var/mob/U = usr + var/list/valid_objects = list() + var/self = null + + if(S == U) + self = 1 // Removing object from yourself. + + valid_objects = get_visible_implants(0) + if(!valid_objects.len) + if(self) + to_chat(src, "You have nothing stuck in your body that is large enough to remove.") + else + to_chat(U, "[src] has nothing stuck in their wounds that is large enough to remove.") + return + + var/obj/item/weapon/selection = tgui_input_list(usr, "What do you want to yank out?", "Embedded objects", valid_objects) + + if(self) + to_chat(src, "You attempt to get a good grip on [selection] in your body.") + else + to_chat(U, "You attempt to get a good grip on [selection] in [S]'s body.") + + if(!do_after(U, 30)) + return + if(!selection || !S || !U) + return + + if(self) + visible_message("[src] rips [selection] out of their body.","You rip [selection] out of your body.") + else + visible_message("[usr] rips [selection] out of [src]'s body.","[usr] rips [selection] out of your body.") + valid_objects = get_visible_implants(0) + if(valid_objects.len == 1) //Yanking out last object - removing verb. + src.verbs -= /mob/proc/yank_out_object + clear_alert("embeddedobject") + + if(ishuman(src)) + var/mob/living/carbon/human/H = src + var/obj/item/organ/external/affected + + for(var/obj/item/organ/external/organ in H.organs) //Grab the organ holding the implant. + for(var/obj/item/O in organ.implants) + if(O == selection) + affected = organ + + affected.implants -= selection + H.shock_stage+=20 + affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction") + + if(prob(selection.w_class * 5) && (affected.robotic < ORGAN_ROBOT)) //I'M SO ANEMIC I COULD JUST -DIE-. + var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15)) + affected.wounds += I + H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 50) + + if (ishuman(U)) + var/mob/living/carbon/human/human_user = U + human_user.bloody_hands(H) + + else if(issilicon(src)) + var/mob/living/silicon/robot/R = src + R.embedded -= selection + R.adjustBruteLoss(5) + R.adjustFireLoss(10) + + selection.forceMove(get_turf(src)) + U.put_in_hands(selection) + + for(var/obj/item/weapon/O in pinned) + if(O == selection) + pinned -= O + if(!pinned.len) + anchored = FALSE + return 1 + +//Check for brain worms in head. +/mob/proc/has_brain_worms() + + for(var/I in contents) + if(istype(I,/mob/living/simple_mob/animal/borer)) + return I + + return 0 + +/mob/proc/updateicon() + return + +// Please always use this proc, never just set the var directly. +/mob/proc/set_stat(var/new_stat) + . = (stat != new_stat) + stat = new_stat + +/mob/verb/face_direction() + + set name = "Face Direction" + set category = "IC" + set src = usr + + set_face_dir() + + if(!facing_dir) + to_chat(usr, "You are now not facing anything.") + else + to_chat(usr, "You are now facing [dir2text(facing_dir)].") + +/mob/proc/set_face_dir(var/newdir) + if(newdir == facing_dir) + facing_dir = null + else if(newdir) + set_dir(newdir) + facing_dir = newdir + else if(facing_dir) + facing_dir = null + else + set_dir(dir) + facing_dir = dir + +/mob/set_dir() + if(facing_dir) + if(!canface() || lying || buckled || restrained()) + facing_dir = null + else if(dir != facing_dir) + return ..(facing_dir) + else + return ..() + +/mob/verb/northfaceperm() + set hidden = 1 + set_face_dir(client.client_dir(NORTH)) + +/mob/verb/southfaceperm() + set hidden = 1 + set_face_dir(client.client_dir(SOUTH)) + +/mob/verb/eastfaceperm() + set hidden = 1 + set_face_dir(client.client_dir(EAST)) + +/mob/verb/westfaceperm() + set hidden = 1 + set_face_dir(client.client_dir(WEST)) + +// Begin VOREstation edit +/mob/verb/shiftnorth() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_y <= (default_pixel_y + 16)) + pixel_y++ + is_shifted = TRUE + +/mob/verb/shiftsouth() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_y >= (default_pixel_y - 16)) + pixel_y-- + is_shifted = TRUE + +/mob/verb/shiftwest() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_x >= (default_pixel_x - 16)) + pixel_x-- + is_shifted = TRUE + +/mob/verb/shifteast() + set hidden = TRUE + if(!canface()) + return FALSE + if(pixel_x <= (default_pixel_x + 16)) + pixel_x++ + is_shifted = TRUE +// End VOREstation edit + +/mob/proc/adjustEarDamage() + return + +/mob/proc/setEarDamage() + return + +// Set client view distance (size of client's screen). Returns TRUE if anything changed. +/mob/proc/set_viewsize(var/new_view = world.view) + if (client && new_view != client.view) + client.view = new_view + return TRUE + return FALSE + +//Throwing stuff + +/mob/proc/toggle_throw_mode() + if (src.in_throw_mode) + throw_mode_off() + else + throw_mode_on() + +/mob/proc/throw_mode_off() + src.in_throw_mode = 0 + if(src.throw_icon) //in case we don't have the HUD and we use the hotkey + src.throw_icon.icon_state = "act_throw_off" + +/mob/proc/throw_mode_on() + src.in_throw_mode = 1 + if(src.throw_icon) + src.throw_icon.icon_state = "act_throw_on" + +/mob/proc/isSynthetic() + return 0 + +/mob/proc/is_muzzled() + return 0 + +//Exploitable Info Update + +/mob/proc/amend_exploitable(var/obj/item/I) + if(istype(I)) + exploit_addons |= I + var/exploitmsg = html_decode("\n" + "Has " + I.name + ".") + exploit_record += exploitmsg + +/client/proc/check_has_body_select() + return mob && mob.hud_used && istype(mob.zone_sel, /obj/screen/zone_sel) + +/client/verb/body_toggle_head() + set name = "body-toggle-head" + set hidden = 1 + toggle_zone_sel(list(BP_HEAD, O_EYES, O_MOUTH)) + +/client/verb/body_r_arm() + set name = "body-r-arm" + set hidden = 1 + toggle_zone_sel(list(BP_R_ARM,BP_R_HAND)) + +/client/verb/body_l_arm() + set name = "body-l-arm" + set hidden = 1 + toggle_zone_sel(list(BP_L_ARM,BP_L_HAND)) + +/client/verb/body_chest() + set name = "body-chest" + set hidden = 1 + toggle_zone_sel(list(BP_TORSO)) + +/client/verb/body_groin() + set name = "body-groin" + set hidden = 1 + toggle_zone_sel(list(BP_GROIN)) + +/client/verb/body_r_leg() + set name = "body-r-leg" + set hidden = 1 + toggle_zone_sel(list(BP_R_LEG,BP_R_FOOT)) + +/client/verb/body_l_leg() + set name = "body-l-leg" + set hidden = 1 + toggle_zone_sel(list(BP_L_LEG,BP_L_FOOT)) + +/client/proc/toggle_zone_sel(list/zones) + if(!check_has_body_select()) + return + var/obj/screen/zone_sel/selector = mob.zone_sel + selector.set_selected_zone(next_in_list(mob.zone_sel.selecting,zones)) + +// This handles setting the client's color variable, which makes everything look a specific color. +// This proc is here so it can be called without needing to check if the client exists, or if the client relogs. +// This is for inheritence since /mob/living will serve most cases. If you need ghosts to use this you'll have to implement that yourself. +/mob/proc/update_client_color() + if(client && client.color) + animate(client, color = null, time = 10) + return + +/mob/proc/swap_hand() + return + +//Throwing stuff +/mob/proc/throw_item(atom/target) + return FALSE + +/mob/proc/will_show_tooltip() + if(alpha <= EFFECTIVE_INVIS) + return FALSE + return TRUE + +/mob/MouseEntered(location, control, params) + if(usr != src && usr.is_preference_enabled(/datum/client_preference/mob_tooltips) && src.will_show_tooltip()) + openToolTip(user = usr, tip_src = src, params = params, title = get_nametag_name(usr), content = get_nametag_desc(usr)) + + ..() + +/mob/MouseDown() + closeToolTip(usr) //No reason not to, really + + ..() + +/mob/MouseExited() + closeToolTip(usr) //No reason not to, really + + ..() + +// Manages a global list of mobs with clients attached, indexed by z-level. +/mob/proc/update_client_z(new_z) // +1 to register, null to unregister. + if(registered_z != new_z) + if(registered_z) + GLOB.players_by_zlevel[registered_z] -= src + if(client) + if(new_z) + GLOB.players_by_zlevel[new_z] += src + registered_z = new_z + else + registered_z = null + +GLOBAL_LIST_EMPTY_TYPED(living_players_by_zlevel, /list) +/mob/living/update_client_z(new_z) + var/precall_reg_z = registered_z + . = ..() // will update registered_z if necessary + if(precall_reg_z != registered_z) // parent did work, let's do work too + if(precall_reg_z) + GLOB.living_players_by_zlevel[precall_reg_z] -= src + if(registered_z) + GLOB.living_players_by_zlevel[registered_z] += src + +/mob/onTransitZ(old_z, new_z) + ..() + update_client_z(new_z) + +/mob/cloak() + . = ..() + if(client && cloaked_selfimage) + client.images += cloaked_selfimage + +/mob/uncloak() + if(client && cloaked_selfimage) + client.images -= cloaked_selfimage + return ..() + +/mob/get_cloaked_selfimage() + var/icon/selficon = getCompoundIcon(src) + selficon.MapColors(0,0,0, 0,0,0, 0,0,0, 1,1,1) //White + var/image/selfimage = image(selficon) + selfimage.color = "#0000FF" + selfimage.alpha = 100 + selfimage.layer = initial(layer) + selfimage.plane = initial(plane) + selfimage.loc = src + + return selfimage + +/mob/proc/GetAltName() + return "" + +/mob/proc/get_ghost(even_if_they_cant_reenter = 0) + if(mind) + return mind.get_ghost(even_if_they_cant_reenter) + +/mob/proc/grab_ghost(force) + if(mind) + return mind.grab_ghost(force = force) +>>>>>>> 0eb2f82d41... Merge pull request #14649 from Seris02/prmirror diff --git a/code/modules/mob/say_vr.dm b/code/modules/mob/say_vr.dm index f0c1ffb88a..4802017e48 100644 --- a/code/modules/mob/say_vr.dm +++ b/code/modules/mob/say_vr.dm @@ -474,13 +474,11 @@ for(var/mob/M as anything in m_viewers) if(M) - if(isobserver(M)) - message = "[message] ([ghost_follow_link(src, M)])" if(isnewplayer(M)) continue if(M.stat == UNCONSCIOUS || M.sleeping > 0) continue - to_chat(M, message) + to_chat(M, "[isobserver(M) ? "[message] ([ghost_follow_link(src, M)])" : message]") log_emote(message, src) /mob/verb/select_speech_bubble() diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm index c04d1d43fd..316233e507 100644 --- a/code/modules/multiz/movement.dm +++ b/code/modules/multiz/movement.dm @@ -398,7 +398,7 @@ /atom/movable/proc/find_fall_target(var/turf/oldloc, var/turf/landing) if(isopenspace(oldloc)) - oldloc.visible_message("\The [src] falls down through \the [oldloc]!", "You hear something falling through the air.") + oldloc.visible_message("\The [src] falls down through \the [oldloc]!", "You hear something falling through the air.") // If the turf has density, we give it first dibs if (landing.density && landing.CheckFall(src)) diff --git a/code/modules/nifsoft/nif.dm b/code/modules/nifsoft/nif.dm index 65473d220b..220fb72a06 100644 --- a/code/modules/nifsoft/nif.dm +++ b/code/modules/nifsoft/nif.dm @@ -383,7 +383,7 @@ You can also set the stat of a NIF to NIF_TEMPFAIL without any issues to disable last_notification = message // TGUI Hook - to_chat(human,"\[\icon[src.big_icon][bicon(src.big_icon)]NIF\] displays, \"[message]\"") + to_chat(human,"\[\icon[src.big_icon][bicon(src.big_icon)]NIF\] displays, \"[message]\"") if(prob(1)) human.visible_message("\The [human] [pick(look_messages)].") if(alert) human << bad_sound diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm index 06490cf3c5..7b6ecd6323 100644 --- a/code/modules/nifsoft/nifsoft.dm +++ b/code/modules/nifsoft/nifsoft.dm @@ -270,7 +270,7 @@ var/newlaws = tgui_input_text(user, "Please Input Laws", "Compliance Laws", laws, multiline = TRUE, prevent_enter = TRUE) newlaws = sanitize(newlaws,2048) if(newlaws) - to_chat(user,"You set the laws to:
[newlaws]") + to_chat(user,"You set the laws to:
[newlaws]
") laws = newlaws /obj/item/weapon/disk/nifsoft/compliance/extra_params() diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 5831abaf41..8fe45fed6d 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -72,11 +72,11 @@ /datum/nifsoft/soulcatcher/proc/notify_into(var/message) var/sound = nif.good_sound - to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") + to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") nif.human << sound for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) - to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") + to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] Soulcatcher displays, \"[message]\"") CS << sound /datum/nifsoft/soulcatcher/proc/say_into(var/message, var/mob/living/sender, var/mob/eyeobj) @@ -84,13 +84,13 @@ //AR Projecting if(eyeobj) - sender.eyeobj.visible_message("[sender_name] says, \"[message]\"") + sender.eyeobj.visible_message("[sender_name] says, \"[message]\"") //Not AR Projecting else - to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") + to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) - to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") + to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] speaks, \"[message]\"") log_nsay(message,nif.human.real_name,sender) @@ -99,13 +99,13 @@ //AR Projecting if(eyeobj) - sender.eyeobj.visible_message("[sender_name] [message]") + sender.eyeobj.visible_message("[sender_name] [message]") //Not AR Projecting else - to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] [message]") + to_chat(nif.human,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] [message]") for(var/mob/living/carbon/brain/caught_soul/CS as anything in brainmobs) - to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] [message]") + to_chat(CS,"\[\icon[nif.big_icon][bicon(nif.big_icon)]NIF\] [sender_name] [message]") log_nme(message,nif.human.real_name,sender) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index 9cf8d4d338..2c370300da 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -158,9 +158,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid). materials[S.material.name] += amnt S.use(1) count++ - to_chat(user, "You insert [count] [sname] into the fabricator.") + to_chat(user, "You insert [count] [sname] into the fabricator.") else - to_chat(user, "The fabricator cannot hold more [sname].") + to_chat(user, "The fabricator cannot hold more [sname].") busy = 0 updateUsrDialog() diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 39e78ad19f..2c8918e401 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -143,7 +143,7 @@ var/global/list/obj/machinery/message_server/message_servers = list() /obj/machinery/message_server/attack_hand(user as mob) // to_chat(user, "There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentCom delays.") - to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"]") + to_chat(user, "You toggle PDA message passing from [active ? "On" : "Off"] to [active ? "Off" : "On"].") active = !active update_icon() @@ -155,7 +155,7 @@ var/global/list/obj/machinery/message_server/message_servers = list() spamfilter_limit += round(MESSAGE_SERVER_DEFAULT_SPAM_LIMIT / 2) user.drop_item() qdel(O) - to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.") + to_chat(user, "You install additional memory and processors into message server. Its filtering capabilities been enhanced.") else ..(O, user) diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 84024e345b..9a42b0a9f7 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -168,9 +168,9 @@ materials[S.material.name] += amnt S.use(1) count++ - to_chat(user, "You insert [count] [sname] into the fabricator.") + to_chat(user, "You insert [count] [sname] into the fabricator.") else - to_chat(user, "The fabricator cannot hold more [sname].") + to_chat(user, "The fabricator cannot hold more [sname].") busy = 0 var/stacktype = S.type diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 3d58a40b16..9c517e4b08 100755 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -119,7 +119,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, //Loading a disk into it. if(istype(D, /obj/item/weapon/disk)) if(t_disk || d_disk) - to_chat(user, "A disk is already loaded into the machine.") + to_chat(user, "A disk is already loaded into the machine.") return if(istype(D, /obj/item/weapon/disk/tech_disk)) diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index c172b9bc44..743363fa44 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -42,8 +42,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \ - "You begin to cut through [target]'s [affected.encased] with \the [tool].") + user.visible_message("[user] begins to cut through [target]'s [affected.encased] with \the [tool].", \ + "You begin to cut through [target]'s [affected.encased] with \the [tool].") target.custom_pain("Something hurts horribly in your [affected.name]!", 60) ..() @@ -93,8 +93,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." - var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." + var/msg = "[user] starts to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." + var/self_msg = "You start to force open the [affected.encased] in [target]'s [affected.name] with \the [tool]." user.visible_message(msg, self_msg) target.custom_pain("Something hurts horribly in your [affected.name]!", 40) ..() @@ -147,8 +147,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." - var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." + var/msg = "[user] starts bending [target]'s [affected.encased] back into place with \the [tool]." + var/self_msg = "You start bending [target]'s [affected.encased] back into place with \the [tool]." user.visible_message(msg, self_msg) target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() @@ -206,8 +206,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]." - var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]." + var/msg = "[user] starts applying \the [tool] to [target]'s [affected.encased]." + var/self_msg = "You start applying \the [tool] to [target]'s [affected.encased]." user.visible_message(msg, self_msg) target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() @@ -249,8 +249,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - user.visible_message("[user] begins to open [target]'s [affected.encased] with \the [tool].", \ - "You begin to open [target]'s [affected.encased] with \the [tool].") + user.visible_message("[user] begins to open [target]'s [affected.encased] with \the [tool].", \ + "You begin to open [target]'s [affected.encased] with \the [tool].") target.custom_pain("Something hurts horribly in your [affected.name]!", 60) ..() @@ -299,8 +299,8 @@ return var/obj/item/organ/external/affected = target.get_organ(target_zone) - var/msg = "[user] starts sealing \the [target]'s [affected.encased] with \the [tool]." - var/self_msg = "You start sealing \the [target]'s [affected.encased] with \the [tool]." + var/msg = "[user] starts sealing \the [target]'s [affected.encased] with \the [tool]." + var/self_msg = "You start sealing \the [target]'s [affected.encased] with \the [tool]." user.visible_message(msg, self_msg) target.custom_pain("Something hurts horribly in your [affected.name]!", 100) ..() diff --git a/code/modules/surgery/face.dm b/code/modules/surgery/face.dm index 9ecef80252..3059b02176 100644 --- a/code/modules/surgery/face.dm +++ b/code/modules/surgery/face.dm @@ -38,8 +38,8 @@ return ..() && target_zone == O_MOUTH && target.op_stage.face == 0 /datum/surgery_step/generic/cut_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \ - "You start to cut open [target]'s face and neck with \the [tool].") + user.visible_message("[user] starts to cut open [target]'s face and neck with \the [tool].", \ + "You start to cut open [target]'s face and neck with \the [tool].") ..() /datum/surgery_step/generic/cut_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -73,8 +73,8 @@ return ..() && target.op_stage.face == 1 /datum/surgery_step/face/mend_vocal/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \ - "You start mending [target]'s vocal cords with \the [tool].") + user.visible_message("[user] starts mending [target]'s vocal cords with \the [tool].", \ + "You start mending [target]'s vocal cords with \the [tool].") ..() /datum/surgery_step/face/mend_vocal/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -107,8 +107,8 @@ return ..() && target.op_stage.face == 2 /datum/surgery_step/face/fix_face/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \ - "You start pulling the skin on [target]'s face back in place with \the [tool].") + user.visible_message("[user] starts pulling the skin on [target]'s face back in place with \the [tool].", \ + "You start pulling the skin on [target]'s face back in place with \the [tool].") ..() /datum/surgery_step/face/fix_face/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 8f25b42328..5410b9e63a 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -47,8 +47,8 @@ /datum/surgery_step/generic/cut_open/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("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \ - "You start the incision on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts the incision on [target]'s [affected.name] with \the [tool].", \ + "You start the incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible pain as if from a sharp knife in your [affected.name]!", 40) ..() @@ -94,8 +94,8 @@ /datum/surgery_step/generic/cut_with_laser/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("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \ - "You start the bloodless incision on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts the bloodless incision on [target]'s [affected.name] with \the [tool].", \ + "You start the bloodless incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible, searing pain in your [affected.name]!", 50) ..() @@ -152,8 +152,8 @@ /datum/surgery_step/generic/incision_manager/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("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \ - "You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].", \ + "You start to construct a prepared incision on and within [target]'s [affected.name] with \the [tool].") target.custom_pain("You feel a horrible, searing pain in your [affected.name] as it is pushed apart!", 50) ..() @@ -199,8 +199,8 @@ /datum/surgery_step/generic/clamp_bleeders/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("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \ - "You start clamping bleeders in [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts clamping bleeders in [target]'s [affected.name] with \the [tool].", \ + "You start clamping bleeders in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in your [affected.name] is maddening!", 40) ..() @@ -248,7 +248,7 @@ if (target_zone == BP_GROIN) msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with \the [tool]." - user.visible_message(msg, self_msg) + user.visible_message("[msg]", "[self_msg]") target.custom_pain("It feels like the skin on your [affected.name] is on fire!", 40) ..() @@ -301,8 +301,8 @@ /datum/surgery_step/generic/cauterize/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("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \ - "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] is beginning to cauterize the incision on [target]'s [affected.name] with \the [tool]." , \ + "You are beginning to cauterize the incision on [target]'s [affected.name] with \the [tool].") target.custom_pain("Your [affected.name] is being burned!", 40) ..() @@ -347,8 +347,8 @@ /datum/surgery_step/generic/amputate/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("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ - "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") + user.visible_message("[user] is beginning to amputate [target]'s [affected.name] with \the [tool]." , \ + "You are beginning to cut through [target]'s [affected.amputation_point] with \the [tool].") target.custom_pain("Your [affected.amputation_point] is being ripped apart!", 100) ..() diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index c3c2496cfd..991aa4cecc 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -64,8 +64,8 @@ /datum/surgery_step/cavity/make_space/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("[user] starts making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \ - "You start making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." ) + user.visible_message("[user] starts making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool].", \ + "You start making some space inside [target]'s [get_cavity(affected)] cavity with \the [tool]." ) target.custom_pain("The pain in your chest is living hell!",1) affected.cavity = 1 ..() @@ -99,8 +99,8 @@ /datum/surgery_step/cavity/close_space/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("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \ - "You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." ) + user.visible_message("[user] starts mending [target]'s [get_cavity(affected)] cavity wall with \the [tool].", \ + "You start mending [target]'s [get_cavity(affected)] cavity wall with \the [tool]." ) target.custom_pain("The pain in your chest is living hell!",1) affected.cavity = 0 ..() diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index 56c0ccccc1..a898d4447d 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -52,8 +52,8 @@ /datum/surgery_step/limb/attach/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool - user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \ - "You start attaching [E.name] to [target]'s [E.amputation_point].") + user.visible_message("[user] starts attaching [E.name] to [target]'s [E.amputation_point].", \ + "You start attaching [E.name] to [target]'s [E.amputation_point].") /datum/surgery_step/limb/attach/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = tool @@ -100,8 +100,8 @@ /datum/surgery_step/limb/connect/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = target.get_organ(target_zone) - user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \ - "You start connecting tendons and muscle in [target]'s [E.amputation_point].") + user.visible_message("[user] starts connecting tendons and muscles in [target]'s [E.amputation_point] with [tool].", \ + "You start connecting tendons and muscle in [target]'s [E.amputation_point].") /datum/surgery_step/limb/connect/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/E = target.get_organ(target_zone) @@ -138,8 +138,8 @@ return isnull(target.get_organ(target_zone)) /datum/surgery_step/limb/mechanize/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts attaching \the [tool] to [target].", \ - "You start attaching \the [tool] to [target].") + user.visible_message("[user] starts attaching \the [tool] to [target].", \ + "You start attaching \the [tool] to [target].") /datum/surgery_step/limb/mechanize/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/robot_parts/L = tool diff --git a/code/modules/surgery/neck.dm b/code/modules/surgery/neck.dm index 5b59075612..3fc4e00052 100644 --- a/code/modules/surgery/neck.dm +++ b/code/modules/surgery/neck.dm @@ -38,8 +38,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 0 /datum/surgery_step/brainstem/mend_vessels/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to mend the blood vessels on [target]'s brainstem with \the [tool].", \ - "You start to mend the blood vessels on [target]'s brainstem with \the [tool].") + user.visible_message("[user] starts to mend the blood vessels on [target]'s brainstem with \the [tool].", \ + "You start to mend the blood vessels on [target]'s brainstem with \the [tool].") ..() /datum/surgery_step/brainstem/mend_vessels/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -76,8 +76,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 1 /datum/surgery_step/brainstem/drill_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to drill around [target]'s brainstem with \the [tool].", \ - "You start to drill around [target]'s brainstem with \the [tool].") + user.visible_message("[user] starts to drill around [target]'s brainstem with \the [tool].", \ + "You start to drill around [target]'s brainstem with \the [tool].") ..() /datum/surgery_step/brainstem/drill_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -118,8 +118,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 2 /datum/surgery_step/brainstem/clean_chips/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to pick around [target]'s brainstem for bone chips with \the [tool].", \ - "You start to pick around [target]'s brainstem for bone chips with \the [tool].") + user.visible_message("[user] starts to pick around [target]'s brainstem for bone chips with \the [tool].", \ + "You start to pick around [target]'s brainstem for bone chips with \the [tool].") ..() /datum/surgery_step/brainstem/clean_chips/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -158,8 +158,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 3 /datum/surgery_step/brainstem/mend_cord/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to fuse [target]'s spinal cord with \the [tool].", \ - "You start to fuse [target]'s spinal cord with \the [tool].") + user.visible_message("[user] starts to fuse [target]'s spinal cord with \the [tool].", \ + "You start to fuse [target]'s spinal cord with \the [tool].") ..() /datum/surgery_step/brainstem/mend_cord/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -198,8 +198,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 4 /datum/surgery_step/brainstem/mend_vertebrae/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to mend [target]'s opened vertebrae with \the [tool].", \ - "You start to mend [target]'s opened vertebrae with \the [tool].") + user.visible_message("[user] starts to mend [target]'s opened vertebrae with \the [tool].", \ + "You start to mend [target]'s opened vertebrae with \the [tool].") ..() /datum/surgery_step/brainstem/mend_vertebrae/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -238,8 +238,8 @@ return ..() && target_zone == BP_HEAD && target.op_stage.brainstem == 5 /datum/surgery_step/brainstem/realign_tissue/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] starts to realign the tissues in [target]'s skull with \the [tool].", \ - "You start to realign the tissues in [target]'s skull with \the [tool].") + user.visible_message("[user] starts to realign the tissues in [target]'s skull with \the [tool].", \ + "You start to realign the tissues in [target]'s skull with \the [tool].") ..() /datum/surgery_step/brainstem/realign_tissue/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index e92010f8d3..dfbf624cf5 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -56,8 +56,8 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && (I.damage > 0 || I.status == ORGAN_DEAD)) if(!(I.robotic >= ORGAN_ROBOT)) - user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ - "You start treating damage to [target]'s [I.name] with [tool_name]." ) + user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ + "You start treating damage to [target]'s [I.name] with [tool_name]." ) target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() @@ -228,8 +228,8 @@ /datum/surgery_step/internal/detatch_organ/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("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." ) + user.visible_message("[user] starts to separate [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You start to separate [target]'s [target.op_stage.current_organ] with \the [tool]." ) target.custom_pain("The pain in your [affected.name] is living hell!", 100) ..() @@ -293,13 +293,13 @@ var/organ_to_remove = tgui_input_list(user, "Which organ do you want to remove?", "Organ Choice", removable_organs) if(!organ_to_remove) //They chose cancel! to_chat(user, "You decide against preparing any organs for removal.") - user.visible_message("[user] starts pulling \the [tool] from [target]'s [affected]", \ - "You start pulling \the [tool] from [target]'s [affected].") + user.visible_message("[user] starts pulling \the [tool] from [target]'s [affected].", \ + "You start pulling \the [tool] from [target]'s [affected].") target.op_stage.current_organ = organ_to_remove - user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "You start removing [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] starts removing [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You start removing [target]'s [target.op_stage.current_organ] with \the [tool].") target.custom_pain("Someone's ripping out your [target.op_stage.current_organ]!", 100) ..() @@ -382,8 +382,8 @@ /datum/surgery_step/internal/replace_organ/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("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ - "You start transplanting \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] starts transplanting \the [tool] into [target]'s [affected.name].", \ + "You start transplanting \the [tool] into [target]'s [affected.name].") target.custom_pain("Someone's rooting around in your [affected.name]!", 100) ..() @@ -439,8 +439,8 @@ return ..() /datum/surgery_step/internal/attach_organ/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) - user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") target.custom_pain("Someone's digging needles into your [target.op_stage.current_organ]!", 100) ..() diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index c0c081e05b..5b15d49d1a 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -37,8 +37,8 @@ /datum/surgery_step/fix_vein/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("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \ - "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts patching the damaged vein in [target]'s [affected.name] with \the [tool]." , \ + "You start patching the damaged vein in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() @@ -91,8 +91,8 @@ /datum/surgery_step/fix_dead_tissue/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("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \ - "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts cutting away necrotic tissue in [target]'s [affected.name] with \the [tool]." , \ + "You start cutting away necrotic tissue in [target]'s [affected.name] with \the [tool].") target.custom_pain("The pain in [affected.name] is unbearable!", 100) ..() @@ -149,8 +149,8 @@ /datum/surgery_step/treat_necrosis/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("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ - "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts applying medication to the affected tissue in [target]'s [affected.name] with \the [tool]." , \ + "You start applying medication to the affected tissue in [target]'s [affected.name] with \the [tool].") target.custom_pain("Something in your [affected.name] is causing you a lot of pain!", 50) ..() @@ -219,8 +219,8 @@ rig = target.belt if(!istype(rig)) return - user.visible_message("[user] starts cutting through the support systems of \the [rig] on [target] with \the [tool]." , \ - "You start cutting through the support systems of \the [rig] on [target] with \the [tool].") + user.visible_message("[user] starts cutting through the support systems of \the [rig] on [target] with \the [tool]." , \ + "You start cutting through the support systems of \the [rig] on [target] with \the [tool].") ..() /datum/surgery_step/hardsuit/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 14a37f39b4..5cc64ee5bd 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -50,8 +50,8 @@ /datum/surgery_step/robotics/unscrew_hatch/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("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ - "You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].", \ + "You start to unscrew the maintenance hatch on [target]'s [affected.name] with \the [tool].") ..() /datum/surgery_step/robotics/unscrew_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -88,8 +88,8 @@ /datum/surgery_step/robotics/open_hatch/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("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].", - "You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] starts to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].", + "You start to pry open the maintenance hatch on [target]'s [affected.name] with \the [tool].") ..() /datum/surgery_step/robotics/open_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -126,8 +126,8 @@ /datum/surgery_step/robotics/close_hatch/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("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \ - "You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].") + user.visible_message("[user] begins to close and secure the hatch on [target]'s [affected.name] with \the [tool]." , \ + "You begin to close and secure the hatch on [target]'s [affected.name] with \the [tool].") ..() /datum/surgery_step/robotics/close_hatch/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -171,8 +171,8 @@ /datum/surgery_step/robotics/repair_brute/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("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \ - "You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].") + user.visible_message("[user] begins to patch damage to [target]'s [affected.name]'s support structure with \the [tool]." , \ + "You begin to patch damage to [target]'s [affected.name]'s support structure with \the [tool].") ..() /datum/surgery_step/robotics/repair_brute/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -220,8 +220,8 @@ /datum/surgery_step/robotics/repair_burn/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("[user] begins to splice new cabling into [target]'s [affected.name]." , \ - "You begin to splice new cabling into [target]'s [affected.name].") + user.visible_message("[user] begins to splice new cabling into [target]'s [affected.name]." , \ + "You begin to splice new cabling into [target]'s [affected.name].") ..() /datum/surgery_step/robotics/repair_burn/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -273,8 +273,8 @@ for(var/obj/item/organ/I in affected.internal_organs) if(I && I.damage > 0) if(I.robotic >= ORGAN_ROBOT) - user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ - "You start mending the damage to [target]'s [I.name]'s mechanisms." ) + user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ + "You start mending the damage to [target]'s [I.name]'s mechanisms." ) target.custom_pain("The pain in your [affected.name] is living hell!",1) ..() @@ -353,8 +353,8 @@ return target.op_stage.current_organ = organ_to_remove - user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." ) + user.visible_message("[user] starts to decouple [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You start to decouple [target]'s [target.op_stage.current_organ] with \the [tool]." ) ..() /datum/surgery_step/robotics/detatch_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -415,8 +415,8 @@ target.op_stage.current_organ = organ_to_replace - user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ - "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") + user.visible_message("[user] begins reattaching [target]'s [target.op_stage.current_organ] with \the [tool].", \ + "You start reattaching [target]'s [target.op_stage.current_organ] with \the [tool].") ..() /datum/surgery_step/robotics/attach_organ_robotic/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -479,8 +479,8 @@ /datum/surgery_step/robotics/install_mmi/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("[user] starts installing \the [tool] into [target]'s [affected.name].", \ - "You start installing \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] starts installing \the [tool] into [target]'s [affected.name].", \ + "You start installing \the [tool] into [target]'s [affected.name].") ..() /datum/surgery_step/robotics/install_mmi/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) @@ -569,8 +569,8 @@ /datum/surgery_step/robotics/install_nymph/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("[user] starts setting \the [tool] into [target]'s [affected.name].", \ - "You start setting \the [tool] into [target]'s [affected.name].") + user.visible_message("[user] starts setting \the [tool] into [target]'s [affected.name].", \ + "You start setting \the [tool] into [target]'s [affected.name].") ..() /datum/surgery_step/robotics/install_nymph/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) diff --git a/code/modules/tables/flipping.dm b/code/modules/tables/flipping.dm index 6e05b15e48..7bf9544002 100644 --- a/code/modules/tables/flipping.dm +++ b/code/modules/tables/flipping.dm @@ -39,7 +39,7 @@ var/obj/occupied = turf_is_crowded() if(occupied) - to_chat(usr, "There's \a [occupied] in the way.") + to_chat(usr, "There's \a [occupied] in the way.") return 0 var/list/L = list() diff --git a/code/modules/vchat/js/vchat.js b/code/modules/vchat/js/vchat.js index eda5cb3177..a7be6bb3b0 100644 --- a/code/modules/vchat/js/vchat.js +++ b/code/modules/vchat/js/vchat.js @@ -279,6 +279,14 @@ function start_vue() { pretty: "System Messages", tooltip: "Messages from your client, always enabled", required: true + }, + { + matches: ".unsorted", + becomes: "vc_unsorted", + pretty: "Unsorted", + tooltip: "Messages that don't have any filters.", + required: false, + admin: false } ], }, @@ -586,6 +594,11 @@ function start_vue() { //Get a category newmessage.category = this.get_category(newmessage.content); + //Put it in unsorted blocks + if (newmessage.category == "vc_unsorted") { + newmessage.content = "" + newmessage.content + ""; + } + //Try to crush it with one of the last few if(this.crushing) { let crushwith = this.messages.slice(-(this.crushing)); @@ -663,7 +676,7 @@ function start_vue() { let doc = domparser.parseFromString(message, 'text/html'); let evaluating = doc.querySelector('span'); - let category = "nomatch"; //What we use if the classes aren't anything we know. + let category = "vc_unsorted"; //What we use if the classes aren't anything we know. if(!evaluating) return category; this.type_table.find( function(type) { if(evaluating.msMatchesSelector(type.matches)) { @@ -678,13 +691,16 @@ function start_vue() { var textToSave = ""; var messagesToSave = this.archived_messages.concat(this.messages); + var cats = this.current_categories; messagesToSave.forEach( function(message) { - textToSave += message.content; - if(message.repeats > 1) { - textToSave += "(x"+message.repeats+")"; + if(cats.length == 0 || (cats.indexOf(message.category) >= 0)) { //only in the active tab + textToSave += message.content; + if(message.repeats > 1) { + textToSave += "(x"+message.repeats+")"; + } + textToSave += "
\n"; } - textToSave += "
\n"; }); textToSave += ""; diff --git a/code/modules/vchat/js/vchat.min.js b/code/modules/vchat/js/vchat.min.js index 8dce654de0..bcd2c699c7 100644 --- a/code/modules/vchat/js/vchat.min.js +++ b/code/modules/vchat/js/vchat.min.js @@ -1 +1 @@ -!function(){var e=console.log;console.log=function(t){send_debug(t),e.apply(console,arguments)};var t=console.error;console.error=function(e){send_debug(e),t.apply(console,arguments)},window.onerror=function(e,t,s,a,n){var o="";return n&&n.stack&&(o=n.stack),send_debug(e+" ("+t+"@"+s+":"+a+") "+n+"|UA: "+navigator.userAgent+"|Stack: "+o),!0}}();var vchat_opts={msBeforeDropped:3e4,cookiePrefix:"vst-",alwaysShow:["vc_looc","vc_system"],vchatTabsVer:1},DARKMODE_COLORS={buttonBgColor:"#40628a",buttonTextColor:"#FFFFFF",windowBgColor:"#272727",highlightColor:"#009900",tabTextColor:"#FFFFFF",tabBackgroundColor:"#272727"},LIGHTMODE_COLORS={buttonBgColor:"none",buttonTextColor:"#000000",windowBgColor:"none",highlightColor:"#007700",tabTextColor:"#000000",tabBackgroundColor:"none"},set_storage=set_cookie,get_storage=get_cookie,domparser=new DOMParser;storageAvailable("localStorage")&&(set_storage=set_localstorage,get_storage=get_localstorage);var vueapp,vchat_state={ready:!1,byond_ip:null,byond_cid:null,byond_ckey:null,lastPingReceived:0,latency_sent:0,lastId:0};function start_vchat(){start_vue(),vchat_state.ready=!0,push_Topic("done_loading"),push_Topic_showingnum(this.showingnum),doWinset("htmloutput",{"is-visible":!0}),doWinset("oldoutput",{"is-visible":!1}),doWinset("chatloadlabel",{"is-visible":!1}),setInterval(check_ping,vchat_opts.msBeforeDropped),send_debug("VChat Loaded!")}function start_vue(){vueapp=new Vue({el:"#app",data:{messages:[],shown_messages:[],unshown_messages:0,archived_messages:[],tabs:[{name:"Main",categories:[],immutable:!0,active:!0}],unread_messages:{},editing:!1,paused:!1,latency:0,reconnecting:!1,ext_styles:"",is_admin:!1,inverted:!1,crushing:3,animated:!1,fontsize:.9,lineheight:130,showingnum:200,type_table:[{matches:".filter_say, .say, .emote, .emote_subtle",becomes:"vc_localchat",pretty:"Local Chat",tooltip:"In-character local messages (say, emote, etc)",required:!1,admin:!1},{matches:".filter_radio, .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:!1,admin:!1},{matches:".filter_notice, .notice:not(.pm), .adminnotice, .info, .sinister, .cult",becomes:"vc_info",pretty:"Notices",tooltip:"Non-urgent messages from the game and items",required:!1,admin:!1},{matches:".filter_warning, .warning:not(.pm), .critical, .userdanger, .italics",becomes:"vc_warnings",pretty:"Warnings",tooltip:"Urgent messages from the game and items",required:!1,admin:!1},{matches:".filter_deadsay, .deadsay",becomes:"vc_deadchat",pretty:"Deadchat",tooltip:"All of deadchat",required:!1,admin:!1},{matches:".filter_ooc, .ooc:not(.looc)",becomes:"vc_globalooc",pretty:"Global OOC",tooltip:"The bluewall of global OOC messages",required:!1,admin:!1},{matches:".nif",becomes:"vc_nif",pretty:"NIF Messages",tooltip:"Messages from the NIF itself and people inside",required:!1,admin:!1},{matches:".mentor_channel, .mentor",becomes:"vc_mentor",pretty:"Mentor messages",tooltip:"Mentorchat and mentor pms",required:!1,admin:!1},{matches:".filter_pm, .pm",becomes:"vc_adminpm",pretty:"Admin PMs",tooltip:"Messages to/from admins ('adminhelps')",required:!1,admin:!1},{matches:".filter_ASAY, .admin_channel",becomes:"vc_adminchat",pretty:"Admin Chat",tooltip:"ASAY messages",required:!1,admin:!0},{matches:".filter_MSAY, .mod_channel",becomes:"vc_modchat",pretty:"Mod Chat",tooltip:"MSAY messages",required:!1,admin:!0},{matches:".filter_ESAY, .event_channel",becomes:"vc_eventchat",pretty:"Event Chat",tooltip:"ESAY messages",required:!1,admin:!0},{matches:".filter_combat, .danger",becomes:"vc_combat",pretty:"Combat Logs",tooltip:"Urist McTraitor has stabbed you with a knife!",required:!1,admin:!1},{matches:".filter_adminlogs, .log_message",becomes:"vc_adminlogs",pretty:"Admin Logs",tooltip:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",required:!1,admin:!0},{matches:".filter_attacklogs",becomes:"vc_attacklogs",pretty:"Attack Logs",tooltip:"Urist McTraitor has shot John Doe",required:!1,admin:!0},{matches:".filter_debuglogs",becomes:"vc_debuglogs",pretty:"Debug Logs",tooltip:"DEBUG: SSPlanets subsystem Recover().",required:!1,admin:!0},{matches:".ooc.looc, .ooc, .looc",becomes:"vc_looc",pretty:"Local OOC",tooltip:"Local OOC messages, always enabled",required:!0},{matches:".boldannounce, .filter_system",becomes:"vc_system",pretty:"System Messages",tooltip:"Messages from your client, always enabled",required:!0}]},mounted:function(){this.load_settings();var e=new XMLHttpRequest;e.open("GET","ss13styles.css"),e.onreadystatechange=function(){this.ext_styles=e.responseText}.bind(this),e.send()},updated:function(){this.editing||this.paused||window.scrollTo(0,document.getElementById("messagebox").scrollHeight)},watch:{reconnecting:function(e,t){1==e&&0==t?this.internal_message("Your client has lost connection to the server, or there is severe lag. Your client will reconnect if possible."):0==e&&1==t&&this.internal_message("Your client has reconnected to the server.")},inverted:function(e){set_storage("darkmode",e),e?(document.body.classList.add("inverted"),switch_ui_mode(DARKMODE_COLORS)):(document.body.classList.remove("inverted"),switch_ui_mode(LIGHTMODE_COLORS))},crushing:function(e){set_storage("crushing",e)},animated:function(e){set_storage("animated",e)},fontsize:function(e,t){isNaN(e)?this.fontsize=t:(e<.2?this.fontsize=.2:e>5&&(this.fontsize=5),set_storage("fontsize",e))},lineheight:function(e,t){isFinite(e)?(e<100?this.lineheight=100:e>200&&(this.lineheight=200),set_storage("lineheight",e)):this.lineheight=t},showingnum:function(e,t){isFinite(e)?((e=Math.floor(e))<50?this.showingnum=50:e>2e3&&(this.showingnum=2e3),set_storage("showingnum",this.showingnum),push_Topic_showingnum(this.showingnum),this.attempt_archive()):this.showingnum=t},current_categories:function(e,t){e.length&&this.apply_filter(e)}},computed:{active_tab:function(){return this.tabs.find((function(e){return e.active}))},ping_classes:function(){return this.latency?"?"==this.latency?"grey":this.latency<0?"red":this.latency<=200?"green":this.latency<=400?"yellow":"grey":this.reconnecting?"red":"green"},current_categories:function(){return this.active_tab==this.tabs[0]?[]:this.active_tab.categories.concat(vchat_opts.alwaysShow)}},methods:{load_settings:function(){this.inverted=get_storage("darkmode",!1),this.crushing=get_storage("crushing",3),this.animated=get_storage("animated",!1),this.fontsize=get_storage("fontsize",.9),this.lineheight=get_storage("lineheight",130),this.showingnum=get_storage("showingnum",200),isNaN(this.crushing)&&(this.crushing=3),isNaN(this.fontsize)&&(this.fontsize=.9),this.load_tabs()},load_tabs:function(){var e=get_storage("tabs");if(e){var t=JSON.parse(e);t.version&&t.tabs?!t.version!=vchat_opts.vchatTabsVer?this.tabs.push.apply(this.tabs,t.tabs):this.internal_message("Your saved tabs are for an older version of VChat and must be recreated, sorry."):this.internal_message("There was a problem loading your tabs. Any new ones you make will be saved, however.")}},save_tabs:function(){var e={version:vchat_opts.vchatTabsVer,tabs:[]};this.tabs.forEach((function(t){if(!t.immutable){var s=t.name,a=[];t.categories.forEach((function(e){a.push(e)}));var n={name:s,categories:a,immutable:!1,active:!1};e.tabs.push(n)}}));var t=JSON.stringify(e);set_storage("tabs",t)},switchtab:function(e){e!=this.active_tab&&(this.active_tab.active=!1,e.active=!0,e.categories.forEach((function(e){this.unread_messages[e]=0}),this),this.apply_filter(this.current_categories))},editmode:function(){this.editing=!this.editing,this.save_tabs()},pause:function(){this.paused=!this.paused},newtab:function(){this.tabs.push({name:"New Tab",categories:[],immutable:!1,active:!1}),this.switchtab(this.tabs[this.tabs.length-1])},renametab:function(){if(!this.active_tab.immutable){var e=this.active_tab,t=window.prompt("Type the desired tab name:",e.name);null!==t&&""!==t&&null!==e&&(e.name=t)}},deltab:function(e){e||(e=this.active_tab),e.immutable||(this.switchtab(this.tabs[0]),this.tabs.splice(this.tabs.indexOf(e),1))},movetab:function(e,t){if(e&&!e.immutable){var s=this.tabs.indexOf(e),a=s+t;this.tabs.splice(a,0,this.tabs.splice(s,1)[0])}},tab_unread_count:function(e){var t=0,s=this.unread_messages;return e.categories.find((function(e){s[e]&&(t+=s[e])})),t},tab_unread_categories:function(e){var t=!1,s=this.unread_messages;return e.categories.find((function(e){if(s[e])return t=!0,!0})),{red:t,grey:!t}},attempt_archive:function(){if(this.messages.length>this.showingnum){var e=this.messages.splice(0,20);Array.prototype.push.apply(this.archived_messages,e)}},apply_filter:function(e){this.shown_messages.splice(0),this.unshown_messages=0,this.messages.forEach((function(t){e.indexOf(t.category)>-1&&this.shown_messages.push(t)}),this),this.archived_messages.forEach((function(t){e.indexOf(t.category)>-1&&this.unshown_messages++}),this)},add_message:function(e){let t={time:e.time,category:"error",content:e.message,repeats:1};if(t.category=this.get_category(t.content),this.crushing){let e=this.messages.slice(-this.crushing);for(let s=e.length-1;s>=0;s--){let a=e[s];a.content==t.content&&(t.repeats+=a.repeats,this.messages.splice(this.messages.indexOf(a),1))}}t.content=t.content.replace(/(\b(https?):\/\/[\-A-Z0-9+&@#\/%?=~_|!:,.;]*[\-A-Z0-9+&@#\/%=~_|])/gim,'$1'),this.current_categories.length&&this.current_categories.indexOf(t.category)<0?(isNaN(this.unread_messages[t.category])&&(this.unread_messages[t.category]=0),this.unread_messages[t.category]+=1):this.current_categories.length&&this.shown_messages.push(t),t.id=++vchat_state.lastId,this.attempt_archive(),this.messages.push(t)},internal_message:function(e){let t={time:this.messages.length?this.messages.slice(-1).time+1:0,category:"vc_system",content:"[VChat Internal] "+e+""};t.id=++vchat_state.lastId,this.messages.push(t)},on_mouseup:function(e){let t=e.target;"getSelection"in window&&!1===window.getSelection().isCollapsed||t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName)||(focusMapWindow(),e.preventDefault(),e.target.click())},click_message:function(e){let t=e.target;if("A"===t.tagName){e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1;var s=t.getAttribute("href");"?"==s[0]||s.length>=8&&"byond://"==s.substring(0,8)?window.location=s:window.location="byond://?action=openLink&link="+encodeURIComponent(s)}},get_category:function(e){if(!vchat_state.ready)return void push_Topic("not_ready");let t=domparser.parseFromString(e,"text/html").querySelector("span"),s="nomatch";return t?(this.type_table.find((function(e){if(t.msMatchesSelector(e.matches))return s=e.becomes,!0})),s):s},save_chatlog:function(){var e="";this.archived_messages.concat(this.messages).forEach((function(t){e+=t.content,t.repeats>1&&(e+="(x"+t.repeats+")"),e+="
\n"})),e+="";var t=new Date,s=String(t.getHours());s.length<2&&(s="0"+s);var a=String(t.getMinutes());a.length<2&&(a="0"+a);var n=String(t.getDate());n.length<2&&(n="0"+n);var o=String(t.getMonth()+1);o.length<2&&(o="0"+o);var i="log"+(" "+String(t.getFullYear())+"-"+o+"-"+n+" ("+s+" "+a+")")+".html",r=document.createElement("a");if(void 0!==r.download)r.href="data:attachment/text,"+encodeURI(e),r.target="_blank",r.download=i,r.click();else{var c=new Blob([e],{type:"text/html;charset=utf8;"});saved=window.navigator.msSaveOrOpenBlob(c,i)}},do_latency_test:function(){send_latency_check()},blur_this:function(e){e.target.blur()}}})}function check_ping(){Date.now()-vchat_state.lastPingReceived>vchat_opts.msBeforeDropped&&(vueapp.reconnecting=!0)}function send_latency_check(){vchat_state.latency_sent||(vchat_state.latency_sent=Date.now(),vueapp.latency="?",push_Topic("ping"),setTimeout((function(){"?"==vchat_state.latency_ms&&(vchat_state.latency_ms=999)}),1e3),setTimeout((function(){vchat_state.latency_sent=0,vueapp.latency=0}),5e3))}function get_latency_check(){vchat_state.latency_sent&&(vueapp.latency=Date.now()-vchat_state.latency_sent)}function byondDecode(e){e=e.replace(/\+/g,"%20");try{e=decodeURIComponent(e)}catch(t){e=unescape(e)}return JSON.parse(e)}function putmessage(e){e=byondDecode(e),Array.isArray(e)?e.forEach((function(e){vueapp.add_message(e)})):"object"==typeof e&&vueapp.add_message(e)}function system_message(e){vueapp.internal_message(e)}function push_Topic(e){window.location="?_src_=chat&proc="+e}function push_Topic_showingnum(e){window.location="?_src_=chat&showingnum="+e}function focusMapWindow(){window.location="byond://winset?mapwindow.map.focus=true"}function send_debug(e){push_Topic("debug¶m[message]="+encodeURIComponent(e))}function get_event(e){if(vchat_state.ready){var t;switch((t=byondDecode(e)).evttype){case"internal_error":system_message("Event parse error: "+e);break;case"byond_player":send_client_data(),vueapp.is_admin="true"===t.admin,vchat_state.byond_ip=t.address,vchat_state.byond_cid=t.cid,vchat_state.byond_ckey=t.ckey,set_storage("ip",vchat_state.byond_ip),set_storage("cid",vchat_state.byond_cid),set_storage("ckey",vchat_state.byond_ckey);break;case"keepalive":vchat_state.lastPingReceived=Date.now(),vueapp.reconnecting=!1;break;case"pong":get_latency_check();break;case"availability":push_Topic("done_loading");break;default:system_message("Didn't know what to do with event: "+e)}}else push_Topic("not_ready")}function send_client_data(){let e={ip:get_storage("ip"),cid:get_storage("cid"),ckey:get_storage("ckey")};push_Topic("ident¶m[clientdata]="+JSON.stringify(e))}function set_localstorage(e,t){window.localStorage.setItem(vchat_opts.cookiePrefix+e,t)}function get_localstorage(e,t){let s=window.localStorage.getItem(vchat_opts.cookiePrefix+e);return"null"===s||null===s?s=t:"true"===s?s=!0:"false"===s?s=!1:isNaN(s)||(s=+s),s}function set_cookie(e,t){let s=new Date;s.setFullYear(s.getFullYear()+1);let a=s.toUTCString();document.cookie=vchat_opts.cookiePrefix+e+"="+t+";expires="+a+";path=/"}function get_cookie(e,t){let s=document.cookie.split(";"),a={};s.forEach((function(e){let s=e.replace(vchat_opts.cookiePrefix,"").trim(),n=s.search("="),o=decodeURIComponent(s.substring(0,n)),i=decodeURIComponent(s.substring(n+1));"null"==i||null===i?i=t:"true"===i?i=!0:"false"===i?i=!1:isNaN(i)||(i=+i),a[o]=i})),a[e]}var SKIN_BUTTONS=["rpane.textb","rpane.infob","rpane.wikib","rpane.forumb","rpane.rulesb","rpane.github","rpane.discord","rpane.mapb","rpane.changelog","mainwindow.saybutton","mainwindow.mebutton","mainwindow.hotkey_toggle"],SKIN_ELEMENTS=["mainwindow","mainwindow.mainvsplit","mainwindow.tooltip","rpane","rpane.rpanewindow","rpane.mediapanel"];function switch_ui_mode(e){doWinset(SKIN_BUTTONS.reduce((function(t,s){return t[s+".background-color"]=e.buttonBgColor,t}),{})),doWinset(SKIN_BUTTONS.reduce((function(t,s){return t[s+".text-color"]=e.buttonTextColor,t}),{})),doWinset(SKIN_ELEMENTS.reduce((function(t,s){return t[s+".background-color"]=e.windowBgColor,t}),{})),doWinset("infowindow",{"background-color":e.tabBackgroundColor,"text-color":e.tabTextColor}),doWinset("infowindow.info",{"background-color":e.tabBackgroundColor,"text-color":e.tabTextColor,"highlight-color":e.highlightColor,"tab-text-color":e.tabTextColor,"tab-background-color":e.tabBackgroundColor})}function doWinset(e,t){void 0===t&&(t=e,e=null);var s="byond://winset?";e&&(s+="id="+e+"&"),s+=Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&"),window.location=s} +!function(){var e=console.log;console.log=function(t){send_debug(t),e.apply(console,arguments)};var t=console.error;console.error=function(e){send_debug(e),t.apply(console,arguments)},window.onerror=function(e,t,s,a,n){var o="";return n&&n.stack&&(o=n.stack),send_debug(e+" ("+t+"@"+s+":"+a+") "+n+"|UA: "+navigator.userAgent+"|Stack: "+o),!0}}();var vchat_opts={msBeforeDropped:3e4,cookiePrefix:"vst-",alwaysShow:["vc_looc","vc_system"],vchatTabsVer:1},DARKMODE_COLORS={buttonBgColor:"#40628a",buttonTextColor:"#FFFFFF",windowBgColor:"#272727",highlightColor:"#009900",tabTextColor:"#FFFFFF",tabBackgroundColor:"#272727"},LIGHTMODE_COLORS={buttonBgColor:"none",buttonTextColor:"#000000",windowBgColor:"none",highlightColor:"#007700",tabTextColor:"#000000",tabBackgroundColor:"none"},set_storage=set_cookie,get_storage=get_cookie,domparser=new DOMParser;storageAvailable("localStorage")&&(set_storage=set_localstorage,get_storage=get_localstorage);var vueapp,vchat_state={ready:!1,byond_ip:null,byond_cid:null,byond_ckey:null,lastPingReceived:0,latency_sent:0,lastId:0};function start_vchat(){start_vue(),vchat_state.ready=!0,push_Topic("done_loading"),push_Topic_showingnum(this.showingnum),doWinset("htmloutput",{"is-visible":!0}),doWinset("oldoutput",{"is-visible":!1}),doWinset("chatloadlabel",{"is-visible":!1}),setInterval(check_ping,vchat_opts.msBeforeDropped),send_debug("VChat Loaded!")}function start_vue(){vueapp=new Vue({el:"#app",data:{messages:[],shown_messages:[],unshown_messages:0,archived_messages:[],tabs:[{name:"Main",categories:[],immutable:!0,active:!0}],unread_messages:{},editing:!1,paused:!1,latency:0,reconnecting:!1,ext_styles:"",is_admin:!1,inverted:!1,crushing:3,animated:!1,fontsize:.9,lineheight:130,showingnum:200,type_table:[{matches:".filter_say, .say, .emote, .emote_subtle",becomes:"vc_localchat",pretty:"Local Chat",tooltip:"In-character local messages (say, emote, etc)",required:!1,admin:!1},{matches:".filter_radio, .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:!1,admin:!1},{matches:".filter_notice, .notice:not(.pm), .adminnotice, .info, .sinister, .cult",becomes:"vc_info",pretty:"Notices",tooltip:"Non-urgent messages from the game and items",required:!1,admin:!1},{matches:".filter_warning, .warning:not(.pm), .critical, .userdanger, .italics",becomes:"vc_warnings",pretty:"Warnings",tooltip:"Urgent messages from the game and items",required:!1,admin:!1},{matches:".filter_deadsay, .deadsay",becomes:"vc_deadchat",pretty:"Deadchat",tooltip:"All of deadchat",required:!1,admin:!1},{matches:".filter_ooc, .ooc:not(.looc)",becomes:"vc_globalooc",pretty:"Global OOC",tooltip:"The bluewall of global OOC messages",required:!1,admin:!1},{matches:".nif",becomes:"vc_nif",pretty:"NIF Messages",tooltip:"Messages from the NIF itself and people inside",required:!1,admin:!1},{matches:".mentor_channel, .mentor",becomes:"vc_mentor",pretty:"Mentor messages",tooltip:"Mentorchat and mentor pms",required:!1,admin:!1},{matches:".filter_pm, .pm",becomes:"vc_adminpm",pretty:"Admin PMs",tooltip:"Messages to/from admins ('adminhelps')",required:!1,admin:!1},{matches:".filter_ASAY, .admin_channel",becomes:"vc_adminchat",pretty:"Admin Chat",tooltip:"ASAY messages",required:!1,admin:!0},{matches:".filter_MSAY, .mod_channel",becomes:"vc_modchat",pretty:"Mod Chat",tooltip:"MSAY messages",required:!1,admin:!0},{matches:".filter_ESAY, .event_channel",becomes:"vc_eventchat",pretty:"Event Chat",tooltip:"ESAY messages",required:!1,admin:!0},{matches:".filter_combat, .danger",becomes:"vc_combat",pretty:"Combat Logs",tooltip:"Urist McTraitor has stabbed you with a knife!",required:!1,admin:!1},{matches:".filter_adminlogs, .log_message",becomes:"vc_adminlogs",pretty:"Admin Logs",tooltip:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",required:!1,admin:!0},{matches:".filter_attacklogs",becomes:"vc_attacklogs",pretty:"Attack Logs",tooltip:"Urist McTraitor has shot John Doe",required:!1,admin:!0},{matches:".filter_debuglogs",becomes:"vc_debuglogs",pretty:"Debug Logs",tooltip:"DEBUG: SSPlanets subsystem Recover().",required:!1,admin:!0},{matches:".ooc.looc, .ooc, .looc",becomes:"vc_looc",pretty:"Local OOC",tooltip:"Local OOC messages, always enabled",required:!0},{matches:".boldannounce, .filter_system",becomes:"vc_system",pretty:"System Messages",tooltip:"Messages from your client, always enabled",required:!0},{matches:".unsorted",becomes:"vc_unsorted",pretty:"Unsorted",tooltip:"Messages that don't have any filters.",required:!1,admin:!1}]},mounted:function(){this.load_settings();var e=new XMLHttpRequest;e.open("GET","ss13styles.css"),e.onreadystatechange=function(){this.ext_styles=e.responseText}.bind(this),e.send()},updated:function(){this.editing||this.paused||window.scrollTo(0,document.getElementById("messagebox").scrollHeight)},watch:{reconnecting:function(e,t){1==e&&0==t?this.internal_message("Your client has lost connection to the server, or there is severe lag. Your client will reconnect if possible."):0==e&&1==t&&this.internal_message("Your client has reconnected to the server.")},inverted:function(e){set_storage("darkmode",e),e?(document.body.classList.add("inverted"),switch_ui_mode(DARKMODE_COLORS)):(document.body.classList.remove("inverted"),switch_ui_mode(LIGHTMODE_COLORS))},crushing:function(e){set_storage("crushing",e)},animated:function(e){set_storage("animated",e)},fontsize:function(e,t){isNaN(e)?this.fontsize=t:(e<.2?this.fontsize=.2:e>5&&(this.fontsize=5),set_storage("fontsize",e))},lineheight:function(e,t){isFinite(e)?(e<100?this.lineheight=100:e>200&&(this.lineheight=200),set_storage("lineheight",e)):this.lineheight=t},showingnum:function(e,t){isFinite(e)?((e=Math.floor(e))<50?this.showingnum=50:e>2e3&&(this.showingnum=2e3),set_storage("showingnum",this.showingnum),push_Topic_showingnum(this.showingnum),this.attempt_archive()):this.showingnum=t},current_categories:function(e,t){e.length&&this.apply_filter(e)}},computed:{active_tab:function(){return this.tabs.find((function(e){return e.active}))},ping_classes:function(){return this.latency?"?"==this.latency?"grey":this.latency<0?"red":this.latency<=200?"green":this.latency<=400?"yellow":"grey":this.reconnecting?"red":"green"},current_categories:function(){return this.active_tab==this.tabs[0]?[]:this.active_tab.categories.concat(vchat_opts.alwaysShow)}},methods:{load_settings:function(){this.inverted=get_storage("darkmode",!1),this.crushing=get_storage("crushing",3),this.animated=get_storage("animated",!1),this.fontsize=get_storage("fontsize",.9),this.lineheight=get_storage("lineheight",130),this.showingnum=get_storage("showingnum",200),isNaN(this.crushing)&&(this.crushing=3),isNaN(this.fontsize)&&(this.fontsize=.9),this.load_tabs()},load_tabs:function(){var e=get_storage("tabs");if(e){var t=JSON.parse(e);t.version&&t.tabs?!t.version!=vchat_opts.vchatTabsVer?this.tabs.push.apply(this.tabs,t.tabs):this.internal_message("Your saved tabs are for an older version of VChat and must be recreated, sorry."):this.internal_message("There was a problem loading your tabs. Any new ones you make will be saved, however.")}},save_tabs:function(){var e={version:vchat_opts.vchatTabsVer,tabs:[]};this.tabs.forEach((function(t){if(!t.immutable){var s=t.name,a=[];t.categories.forEach((function(e){a.push(e)}));var n={name:s,categories:a,immutable:!1,active:!1};e.tabs.push(n)}}));var t=JSON.stringify(e);set_storage("tabs",t)},switchtab:function(e){e!=this.active_tab&&(this.active_tab.active=!1,e.active=!0,e.categories.forEach((function(e){this.unread_messages[e]=0}),this),this.apply_filter(this.current_categories))},editmode:function(){this.editing=!this.editing,this.save_tabs()},pause:function(){this.paused=!this.paused},newtab:function(){this.tabs.push({name:"New Tab",categories:[],immutable:!1,active:!1}),this.switchtab(this.tabs[this.tabs.length-1])},renametab:function(){if(!this.active_tab.immutable){var e=this.active_tab,t=window.prompt("Type the desired tab name:",e.name);null!==t&&""!==t&&null!==e&&(e.name=t)}},deltab:function(e){e||(e=this.active_tab),e.immutable||(this.switchtab(this.tabs[0]),this.tabs.splice(this.tabs.indexOf(e),1))},movetab:function(e,t){if(e&&!e.immutable){var s=this.tabs.indexOf(e),a=s+t;this.tabs.splice(a,0,this.tabs.splice(s,1)[0])}},tab_unread_count:function(e){var t=0,s=this.unread_messages;return e.categories.find((function(e){s[e]&&(t+=s[e])})),t},tab_unread_categories:function(e){var t=!1,s=this.unread_messages;return e.categories.find((function(e){if(s[e])return t=!0,!0})),{red:t,grey:!t}},attempt_archive:function(){if(this.messages.length>this.showingnum){var e=this.messages.splice(0,20);Array.prototype.push.apply(this.archived_messages,e)}},apply_filter:function(e){this.shown_messages.splice(0),this.unshown_messages=0,this.messages.forEach((function(t){e.indexOf(t.category)>-1&&this.shown_messages.push(t)}),this),this.archived_messages.forEach((function(t){e.indexOf(t.category)>-1&&this.unshown_messages++}),this)},add_message:function(e){let t={time:e.time,category:"error",content:e.message,repeats:1};if(t.category=this.get_category(t.content),"vc_unsorted"==t.category&&(t.content=""+t.content+""),this.crushing){let e=this.messages.slice(-this.crushing);for(let s=e.length-1;s>=0;s--){let a=e[s];a.content==t.content&&(t.repeats+=a.repeats,this.messages.splice(this.messages.indexOf(a),1))}}t.content=t.content.replace(/(\b(https?):\/\/[\-A-Z0-9+&@#\/%?=~_|!:,.;]*[\-A-Z0-9+&@#\/%=~_|])/gim,'$1'),this.current_categories.length&&this.current_categories.indexOf(t.category)<0?(isNaN(this.unread_messages[t.category])&&(this.unread_messages[t.category]=0),this.unread_messages[t.category]+=1):this.current_categories.length&&this.shown_messages.push(t),t.id=++vchat_state.lastId,this.attempt_archive(),this.messages.push(t)},internal_message:function(e){let t={time:this.messages.length?this.messages.slice(-1).time+1:0,category:"vc_system",content:"[VChat Internal] "+e+""};t.id=++vchat_state.lastId,this.messages.push(t)},on_mouseup:function(e){let t=e.target;"getSelection"in window&&!1===window.getSelection().isCollapsed||t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName)||(focusMapWindow(),e.preventDefault(),e.target.click())},click_message:function(e){let t=e.target;if("A"===t.tagName){e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1;var s=t.getAttribute("href");"?"==s[0]||s.length>=8&&"byond://"==s.substring(0,8)?window.location=s:window.location="byond://?action=openLink&link="+encodeURIComponent(s)}},get_category:function(e){if(!vchat_state.ready)return void push_Topic("not_ready");let t=domparser.parseFromString(e,"text/html").querySelector("span"),s="vc_unsorted";return t?(this.type_table.find((function(e){if(t.msMatchesSelector(e.matches))return s=e.becomes,!0})),s):s},save_chatlog:function(){var e="",t=this.archived_messages.concat(this.messages),s=this.current_categories;t.forEach((function(t){(0==s.length||s.indexOf(t.category)>=0)&&(e+=t.content,t.repeats>1&&(e+="(x"+t.repeats+")"),e+="
\n")})),e+="";var a=new Date,n=String(a.getHours());n.length<2&&(n="0"+n);var o=String(a.getMinutes());o.length<2&&(o="0"+o);var i=String(a.getDate());i.length<2&&(i="0"+i);var r=String(a.getMonth()+1);r.length<2&&(r="0"+r);var c="log"+(" "+String(a.getFullYear())+"-"+r+"-"+i+" ("+n+" "+o+")")+".html",l=document.createElement("a");if(void 0!==l.download)l.href="data:attachment/text,"+encodeURI(e),l.target="_blank",l.download=c,l.click();else{var h=new Blob([e],{type:"text/html;charset=utf8;"});saved=window.navigator.msSaveOrOpenBlob(h,c)}},do_latency_test:function(){send_latency_check()},blur_this:function(e){e.target.blur()}}})}function check_ping(){Date.now()-vchat_state.lastPingReceived>vchat_opts.msBeforeDropped&&(vueapp.reconnecting=!0)}function send_latency_check(){vchat_state.latency_sent||(vchat_state.latency_sent=Date.now(),vueapp.latency="?",push_Topic("ping"),setTimeout((function(){"?"==vchat_state.latency_ms&&(vchat_state.latency_ms=999)}),1e3),setTimeout((function(){vchat_state.latency_sent=0,vueapp.latency=0}),5e3))}function get_latency_check(){vchat_state.latency_sent&&(vueapp.latency=Date.now()-vchat_state.latency_sent)}function byondDecode(e){e=e.replace(/\+/g,"%20");try{e=decodeURIComponent(e)}catch(t){e=unescape(e)}return JSON.parse(e)}function putmessage(e){e=byondDecode(e),Array.isArray(e)?e.forEach((function(e){vueapp.add_message(e)})):"object"==typeof e&&vueapp.add_message(e)}function system_message(e){vueapp.internal_message(e)}function push_Topic(e){window.location="?_src_=chat&proc="+e}function push_Topic_showingnum(e){window.location="?_src_=chat&showingnum="+e}function focusMapWindow(){window.location="byond://winset?mapwindow.map.focus=true"}function send_debug(e){push_Topic("debug¶m[message]="+encodeURIComponent(e))}function get_event(e){if(vchat_state.ready){var t;switch((t=byondDecode(e)).evttype){case"internal_error":system_message("Event parse error: "+e);break;case"byond_player":send_client_data(),vueapp.is_admin="true"===t.admin,vchat_state.byond_ip=t.address,vchat_state.byond_cid=t.cid,vchat_state.byond_ckey=t.ckey,set_storage("ip",vchat_state.byond_ip),set_storage("cid",vchat_state.byond_cid),set_storage("ckey",vchat_state.byond_ckey);break;case"keepalive":vchat_state.lastPingReceived=Date.now(),vueapp.reconnecting=!1;break;case"pong":get_latency_check();break;case"availability":push_Topic("done_loading");break;default:system_message("Didn't know what to do with event: "+e)}}else push_Topic("not_ready")}function send_client_data(){let e={ip:get_storage("ip"),cid:get_storage("cid"),ckey:get_storage("ckey")};push_Topic("ident¶m[clientdata]="+JSON.stringify(e))}function set_localstorage(e,t){window.localStorage.setItem(vchat_opts.cookiePrefix+e,t)}function get_localstorage(e,t){let s=window.localStorage.getItem(vchat_opts.cookiePrefix+e);return"null"===s||null===s?s=t:"true"===s?s=!0:"false"===s?s=!1:isNaN(s)||(s=+s),s}function set_cookie(e,t){let s=new Date;s.setFullYear(s.getFullYear()+1);let a=s.toUTCString();document.cookie=vchat_opts.cookiePrefix+e+"="+t+";expires="+a+";path=/"}function get_cookie(e,t){let s=document.cookie.split(";"),a={};s.forEach((function(e){let s=e.replace(vchat_opts.cookiePrefix,"").trim(),n=s.search("="),o=decodeURIComponent(s.substring(0,n)),i=decodeURIComponent(s.substring(n+1));"null"==i||null===i?i=t:"true"===i?i=!0:"false"===i?i=!1:isNaN(i)||(i=+i),a[o]=i})),a[e]}var SKIN_BUTTONS=["rpane.textb","rpane.infob","rpane.wikib","rpane.forumb","rpane.rulesb","rpane.github","rpane.discord","rpane.mapb","rpane.changelog","mainwindow.saybutton","mainwindow.mebutton","mainwindow.hotkey_toggle"],SKIN_ELEMENTS=["mainwindow","mainwindow.mainvsplit","mainwindow.tooltip","rpane","rpane.rpanewindow","rpane.mediapanel"];function switch_ui_mode(e){doWinset(SKIN_BUTTONS.reduce((function(t,s){return t[s+".background-color"]=e.buttonBgColor,t}),{})),doWinset(SKIN_BUTTONS.reduce((function(t,s){return t[s+".text-color"]=e.buttonTextColor,t}),{})),doWinset(SKIN_ELEMENTS.reduce((function(t,s){return t[s+".background-color"]=e.windowBgColor,t}),{})),doWinset("infowindow",{"background-color":e.tabBackgroundColor,"text-color":e.tabTextColor}),doWinset("infowindow.info",{"background-color":e.tabBackgroundColor,"text-color":e.tabTextColor,"highlight-color":e.highlightColor,"tab-text-color":e.tabTextColor,"tab-background-color":e.tabBackgroundColor})}function doWinset(e,t){void 0===t&&(t=e,e=null);var s="byond://winset?";e&&(s+="id="+e+"&"),s+=Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&"),window.location=s} \ No newline at end of file diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 4999c3df3a..4230a82e0b 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -245,9 +245,9 @@ tmob_message = tail.msg_owner_stepunder if(src_message) - to_chat(src, STEP_TEXT_OWNER(src_message)) + to_chat(src, "[STEP_TEXT_OWNER(src_message)]") if(tmob_message) - to_chat(tmob, STEP_TEXT_PREY(tmob_message)) + to_chat(tmob, "[STEP_TEXT_PREY(tmob_message)]") return TRUE return FALSE @@ -409,7 +409,7 @@ set category = "IC" pickup_active = !pickup_active - to_chat(src, "You will [pickup_active ? "now" : "no longer"] attempt to pick up mobs when clicking them with help intent.") + to_chat(src, "You will [pickup_active ? "now" : "no longer"] attempt to pick up mobs when clicking them with help intent.") #undef STEP_TEXT_OWNER #undef STEP_TEXT_PREY diff --git a/code/modules/xenoarcheaology/artifacts/replicator.dm b/code/modules/xenoarcheaology/artifacts/replicator.dm index d6796c6ad1..06c411fab9 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator.dm @@ -98,13 +98,13 @@ "foreground" = colors[color], ))) - fail_message = "\icon[src][bicon(src)] a [pick("loud","soft","sinister","eery","triumphant","depressing","cheerful","angry")] \ + fail_message = "\icon[src][bicon(src)] a [pick("loud","soft","sinister","eery","triumphant","depressing","cheerful","angry")] \ [pick("horn","beep","bing","bleep","blat","honk","hrumph","ding")] sounds and a \ [pick("yellow","purple","green","blue","red","orange","white")] \ [pick("light","dial","meter","window","protrusion","knob","antenna","swirly thing")] \ [pick("swirls","flashes","whirrs","goes schwing","blinks","flickers","strobes","lights up")] on the \ [pick("front","side","top","bottom","rear","inside")] of [src]. A [pick("slot","funnel","chute","tube")] opens up in the \ - [pick("front","side","top","bottom","rear","inside")]." + [pick("front","side","top","bottom","rear","inside")]." /obj/machinery/replicator/process() if(spawning_types.len && powered()) @@ -178,4 +178,4 @@ user.drop_item() W.loc = src stored_materials.Add(W) - src.visible_message("\The [user] inserts \the [W] into \the [src].") + src.visible_message("\The [user] inserts \the [W] into \the [src].") diff --git a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm index 8fc3dba9b4..8d5fc2cb0b 100644 --- a/code/modules/xenoarcheaology/artifacts/replicator_vr.dm +++ b/code/modules/xenoarcheaology/artifacts/replicator_vr.dm @@ -276,7 +276,7 @@ inserted_human.drop_from_inventory(I) inserted_mob.loc = src stored_materials.Add(inserted_mob) - src.visible_message("\The [user] inserts \the [inserted_mob] into \the [src].") + src.visible_message("\The [user] inserts \the [inserted_mob] into \the [src].") return else to_chat(user, "You cannot put \the [W] into the machine. ((The micro must be connected to the server.))") @@ -297,7 +297,7 @@ //Now that we've dropped all the items they have, let's shove them back into the micro holder. W.loc = src stored_materials.Add(W) - src.visible_message("\The [user] inserts \the [W] into \the [src].") + src.visible_message("\The [user] inserts \the [W] into \the [src].") /obj/machinery/replicator/vore/tgui_data(mob/user, datum/tgui/ui, datum/tgui_state/state) var/list/data = ..() @@ -544,7 +544,7 @@ inserted_human.drop_from_inventory(I) inserted_mob.loc = src stored_materials.Add(inserted_mob) - src.visible_message("\The [user] inserts \the [inserted_mob] into \the [src].") + src.visible_message("\The [user] inserts \the [inserted_mob] into \the [src].") return else to_chat(user, "You cannot put \the [W] into the machine. ((They must be connected to the server.))") @@ -563,7 +563,7 @@ //Now that we've dropped all the items they have, let's shove them back into the micro holder. W.loc = src stored_materials.Add(W) - src.visible_message("\The [user] inserts \the [W] into \the [src].") + src.visible_message("\The [user] inserts \the [W] into \the [src].") /obj/machinery/replicator/clothing/tgui_interact(mob/user, datum/tgui/ui) //This creates the menu. diff --git a/code/modules/xenoarcheaology/effect.dm b/code/modules/xenoarcheaology/effect.dm index 7409c8744f..bccb9faa0e 100644 --- a/code/modules/xenoarcheaology/effect.dm +++ b/code/modules/xenoarcheaology/effect.dm @@ -92,7 +92,7 @@ var/atom/toplevelholder = target while(!istype(toplevelholder.loc, /turf)) toplevelholder = toplevelholder.loc - toplevelholder.visible_message("\icon[toplevelholder][bicon(toplevelholder)] [toplevelholder] [display_msg]") + toplevelholder.visible_message("\icon[toplevelholder][bicon(toplevelholder)] [toplevelholder] [display_msg]") /datum/artifact_effect/proc/DoEffectTouch(var/mob/user) /datum/artifact_effect/proc/DoEffectAura(var/atom/holder) diff --git a/code/modules/xenoarcheaology/effect_master.dm b/code/modules/xenoarcheaology/effect_master.dm index f654724b32..b320cbead3 100644 --- a/code/modules/xenoarcheaology/effect_master.dm +++ b/code/modules/xenoarcheaology/effect_master.dm @@ -103,7 +103,7 @@ my_effects += my_effect else - to_chat(usr, "This effect can not be applied to this atom type.") + to_chat(usr, "This effect can not be applied to this atom type.") qdel(my_effect) /datum/component/artifact_master/proc/remove_effect() @@ -231,7 +231,7 @@ warn = 1 if(warn && isliving(bumped)) - to_chat(bumped, "You accidentally touch \the [holder] as it hits you.") + to_chat(bumped, "You accidentally touch \the [holder] as it hits you.") /datum/component/artifact_master/proc/on_bumped() var/atom/movable/M = args[2] @@ -252,7 +252,7 @@ warn = 1 if(warn && isliving(M)) - to_chat(M, "You accidentally touch \the [holder].") + to_chat(M, "You accidentally touch \the [holder].") /datum/component/artifact_master/proc/on_attack_hand() var/mob/living/user = args[2] @@ -260,10 +260,10 @@ return if (get_dist(user, holder) > 1) - to_chat(user, "You can't reach [holder] from here.") + to_chat(user, "You can't reach [holder] from here.") return if(ishuman(user) && user:gloves) - to_chat(user, "You touch [holder] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].") + to_chat(user, "You touch [holder] with your gloved hands, [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].") return var/triggered = FALSE @@ -279,10 +279,10 @@ my_effect.DoEffectTouch(user) if(triggered) - to_chat(user, "You touch [holder].") + to_chat(user, "You touch [holder].") else - to_chat(user, "You touch [holder], [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].") + to_chat(user, "You touch [holder], [pick("but nothing of note happens","but nothing happens","but nothing interesting happens","but you notice nothing different","but nothing seems to have happened")].") /datum/component/artifact_master/proc/on_attackby()