diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 9204ace71b6..978d130ec3f 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -324,10 +324,26 @@ proc/TextPreview(var/string,var/len=40) if (!message) return "" + // ---Begin URL caching. + var/list/urls = list() + var/regex/url_find = new("(https?:\\/\\/\[^\\s\]*)", "g") + while (url_find.Find(message)) + urls += url_find.match + + + if (urls.len) + var/i = 1 + for (var/url in urls) + var/ref = "\ref[urls]-[i]" + urls[url] = ref + message = replacetextEx(message, url, ref) + i++ + // ---End URL caching + var/list/tags = list("*" = list("", ""), - "_" = list("", ""), - "~" = list("", ""), - "-" = list("", "")) + "/" = list("", ""), + "~" = list("", ""), + "_" = list("", "")) if (ignore_tags && ignore_tags.len) tags -= ignore_tags @@ -339,4 +355,9 @@ proc/TextPreview(var/string,var/len=40) var/regex/markup = new("(\\[tag])(\[^\\[tag]\]*)(\\[tag])", "g") message = markup.Replace(message, "[marker_begin]$2[marker_end]") + // ---Unload URL cache + if (urls.len) + for (var/url in urls) + message = replacetextEx(message, urls[url], url) + return message diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index b4e75b046ff..4347085e3a3 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -137,6 +137,7 @@ H.dna.UpdateUI() H.set_cloned_appearance() + H.regenerate_icons() update_icon() for(var/datum/language/L in R.languages) diff --git a/code/modules/detectivework/tools/storage.dm b/code/modules/detectivework/tools/storage.dm index 1555124cc9b..ff671a01b10 100644 --- a/code/modules/detectivework/tools/storage.dm +++ b/code/modules/detectivework/tools/storage.dm @@ -27,6 +27,7 @@ storage_slots = 6 /obj/item/weapon/storage/box/evidence/New() + ..() for(var/i=0;i" diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm index 7336189e117..2f7279a6c2e 100644 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ b/code/modules/mob/living/carbon/human/whisper.dm @@ -7,7 +7,6 @@ return message = sanitize(message) - log_whisper("[src.name]/[src.key] : [message]") if (src.client) if (src.client.prefs.muted & MUTE_IC) @@ -75,6 +74,8 @@ if(!message || message=="") return + log_whisper("[key_name(src)] : ([get_lang_name(speaking)]) [message]") + //looks like this only appears in whisper. Should it be elsewhere as well? Maybe handle_speech_problems? var/voice_sub if(istype(back,/obj/item/weapon/rig)) @@ -102,12 +103,12 @@ temp_message[H] = ninjaspeak(temp_message[H]) pick_list -= H message = list2text(temp_message, " ") - message = replacetext(message, "o", "¤") - message = replacetext(message, "p", "þ") - message = replacetext(message, "l", "£") - message = replacetext(message, "s", "§") - message = replacetext(message, "u", "µ") - message = replacetext(message, "b", "ß") + message = replacetext(message, "o", "¤") + message = replacetext(message, "p", "ž") + message = replacetext(message, "l", "£") + message = replacetext(message, "s", "§") + message = replacetext(message, "u", "µ") + message = replacetext(message, "b", "ß") var/list/listening = hearers(message_range, src) listening |= src diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 66f1536a950..65be0ce90ff 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -379,6 +379,10 @@ default behaviour is: /mob/living/proc/revive() + // Stop killing yourself. Please. + if(suiciding) + suiciding = 0 + rejuvenate() if(buckled) buckled.unbuckle_mob() @@ -773,4 +777,3 @@ default behaviour is: if(W in internal_organs) return ..() - diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index d9caeb891fc..c8229c85f31 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -144,7 +144,7 @@ proc/get_radio_key_from_channel(var/channel) var/message_mode = parse_message_mode(message, "headset") - message = process_chat_markup(message, list("~", "-")) + message = process_chat_markup(message, list("~", "_")) switch(copytext(message,1,2)) if("*") return emote(copytext(message,2)) @@ -281,10 +281,12 @@ proc/get_radio_key_from_channel(var/channel) if(O) //It's possible that it could be deleted in the meantime. O.hear_talk(src, message, verb, speaking) - log_say("[name]/[key] : [message]") + log_say("[key_name(src)] : ([get_lang_name(speaking)]) [message]") return 1 /mob/living/proc/say_signlang(var/message, var/verb="gestures", var/datum/language/language) + log_say("[key_name(src)] : ([get_lang_name(language)]) [message]") + for (var/mob/O in viewers(src, null)) O.hear_signlang(message, verb, language, src) return 1 diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 48524304252..7e8a6c6f67f 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -22,7 +22,7 @@ var/global/list/robot_modules = list( flags = CONDUCT var/channels = list() var/networks = list() - var/languages = list(LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK_TAJR = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0, LANGUAGE_VAURCESE = 0, LANGUAGE_ROOTSPEAK = 0) + var/languages = list(LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, LANGUAGE_SIIK_MAAS = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 0, LANGUAGE_VAURCESE = 0, LANGUAGE_ROOTSPEAK = 0) var/sprites = list() var/can_be_pushed = 1 var/no_slip = 0 @@ -632,7 +632,7 @@ var/global/list/robot_modules = list( LANGUAGE_SOL_COMMON = 1, LANGUAGE_TRADEBAND = 1, LANGUAGE_UNATHI = 0, - LANGUAGE_SIIK_TAJR = 0, + LANGUAGE_SIIK_MAAS = 0, LANGUAGE_SKRELLIAN = 0, LANGUAGE_GUTTER = 1 ) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index dd28543ef1e..7e56039f0fb 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -58,7 +58,7 @@ usr << "You have deadchat muted." return - message = process_chat_markup(message, list("~", "-")) + message = process_chat_markup(message, list("~", "_")) say_dead_direct("[pick("complains","moans","whines","laments","blubbers")], \"[message]\"", src) diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 219ebff1410..08b3b574740 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -45,6 +45,8 @@ user << "\blue You inscribe \"[label_text]\" into \the [initial(BB.name)]." BB.name = "[initial(BB.name)] (\"[label_text]\")" + ..() + /obj/item/ammo_casing/update_icon() if(spent_icon && !BB) icon_state = spent_icon @@ -163,4 +165,3 @@ magazine_icondata_keys["[M.type]"] = icon_keys magazine_icondata_states["[M.type]"] = ammo_states - diff --git a/code/modules/virus2/dishincubator.dm b/code/modules/virus2/dishincubator.dm index ed6810980ca..7e892c57e2d 100644 --- a/code/modules/virus2/dishincubator.dm +++ b/code/modules/virus2/dishincubator.dm @@ -128,12 +128,13 @@ nanomanager.update_uis(src) if(beaker) - if(foodsupply < 100 && beaker.reagents.remove_reagent("virusfood",5)) - if(foodsupply + 10 <= 100) - foodsupply += 10 - else - beaker.reagents.add_reagent("virusfood",(100 - foodsupply)/2) - foodsupply = 100 + if (foodsupply < 100 && beaker.reagents.has_reagent("virusfood")) + var/food_needed = min(10, 100 - foodsupply) / 2 + var/food_taken = min(food_needed, beaker.reagents.get_reagent_amount("virusfood")) + + beaker.reagents.remove_reagent("virusfood", food_taken) + foodsupply = min(100, food_taken * 2) + nanomanager.update_uis(src) if (locate(/datum/reagent/toxin) in beaker.reagents.reagent_list && toxins < 100) diff --git a/html/changelogs/skull132-555.yml b/html/changelogs/skull132-555.yml new file mode 100644 index 00000000000..039e9236959 --- /dev/null +++ b/html/changelogs/skull132-555.yml @@ -0,0 +1,19 @@ +author: Skull132 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "All chats are now properly logged into the server log, to include the language they were spoken in." + - bugfix: "Changeling revive after using the suicide verb will now work properly." + - bugfix: "Evidence bag boxes now work like real boxes again. Note that in order to put an object into a bag, you drag that obejct onto the bag." + - bugfix: "Borgs will now understand the Tajaran language again." + - bugfix: "Alien species should no longer have oddly coloured fur/skin/scales/slime after being cloned." + - bugfix: "Fixed the unlimited virus food exploit." + - tweak: "Markup is no longer awful and will not break links. Proper keys have changed: / = italics, _ = underline, ~ = strikethrough, * = bold." + - tweak: "Trash bags can now be used to pick up bullet casings."