From 74f04671f850ed2246926ea864153823b346363d Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Tue, 28 Jul 2015 13:37:15 +0100 Subject: [PATCH 1/5] His book? Her book. --- code/modules/mob/dead/observer/observer.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c7dea3bb9d..ecea7745dc 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -567,7 +567,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp toggle_visibility(1) else user.visible_message ( \ - "[user] just tried to smash his book into that ghost! It's not very effective.", \ + "[user] just tried to smash \his book into that ghost! It's not very effective.", \ "You get the feeling that the ghost can't become any more visible." \ ) From 2cf4f6e4db593b740d71bbd941f580e66e36880e Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 29 Jul 2015 06:39:03 +0100 Subject: [PATCH 2/5] Change Topic() 'status' command to make more sense --- code/world.dm | 43 ++++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 13 deletions(-) diff --git a/code/world.dm b/code/world.dm index 8737f69b0d..14cfbe6196 100644 --- a/code/world.dm +++ b/code/world.dm @@ -104,7 +104,8 @@ var/world_topic_spam_protect_time = world.timeofday n++ return n - else if (T == "status") + else if (copytext(T,1,7) == "status") + var/input[] = params2list(T) var/list/s = list() s["version"] = game_version s["mode"] = master_mode @@ -113,21 +114,37 @@ var/world_topic_spam_protect_time = world.timeofday s["vote"] = config.allow_vote_mode s["ai"] = config.allow_ai s["host"] = host ? host : null - s["players"] = list() s["stationtime"] = worldtime2text() - var/n = 0 - var/admins = 0 - for(var/client/C in clients) - if(C.holder) - if(C.holder.fakekey) - continue //so stealthmins aren't revealed by the hub - admins++ - s["player[n]"] = C.key - n++ - s["players"] = n + if(input["status"] == "2") + var/list/players = list() + var/list/admins = list() - s["admins"] = admins + for(var/client/C in clients) + if(C.holder) + if(C.holder.fakekey) + continue + admins[C.key] = C.holder.rank + players += C.key + + s["players"] = players.len + s["playerlist"] = list2params(players) + s["admins"] = admins.len + s["adminlist"] = list2params(admins) + else + var/n = 0 + var/admins = 0 + + for(var/client/C in clients) + if(C.holder) + if(C.holder.fakekey) + continue //so stealthmins aren't revealed by the hub + admins++ + s["player[n]"] = C.key + n++ + + s["players"] = n + s["admins"] = admins return list2params(s) From 84c76254903837940ac6ede58399ddc57dd3894d Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 29 Jul 2015 07:55:30 +0100 Subject: [PATCH 3/5] Chemical logging improvements --- baystation12.dme | 1 + code/modules/admin/admin_verbs.dm | 3 +- code/modules/reagents/Chemistry-Holder.dm | 1 + code/modules/reagents/Chemistry-Logging.dm | 28 +++++++++++++++++++ code/modules/reagents/Chemistry-Recipes.dm | 4 +++ .../reagents/reagent_containers/syringes.dm | 14 ++++++---- 6 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 code/modules/reagents/Chemistry-Logging.dm diff --git a/baystation12.dme b/baystation12.dme index dbed3c8fc3..e286a177bc 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1383,6 +1383,7 @@ #include "code\modules\random_map\random_map.dm" #include "code\modules\reagents\Chemistry-Colours.dm" #include "code\modules\reagents\Chemistry-Holder.dm" +#include "code\modules\reagents\Chemistry-Logging.dm" #include "code\modules\reagents\Chemistry-Machinery.dm" #include "code\modules\reagents\Chemistry-Readme.dm" #include "code\modules\reagents\Chemistry-Reagents-Antidepressants.dm" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index a07b05dec2..c0c92a81c7 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -79,7 +79,8 @@ var/list/admin_verbs_admin = list( /client/proc/toggle_antagHUD_restrictions, /client/proc/allow_character_respawn, /* Allows a ghost to respawn */ /client/proc/event_manager_panel, - /client/proc/empty_ai_core_toggle_latejoin + /client/proc/empty_ai_core_toggle_latejoin, + /client/proc/view_chemical_reaction_logs ) var/list/admin_verbs_ban = list( /client/proc/unban_panel, diff --git a/code/modules/reagents/Chemistry-Holder.dm b/code/modules/reagents/Chemistry-Holder.dm index 6c6c194af5..14d3f4e654 100644 --- a/code/modules/reagents/Chemistry-Holder.dm +++ b/code/modules/reagents/Chemistry-Holder.dm @@ -363,6 +363,7 @@ datum for(var/S in C.secondary_results) add_reagent(S, C.result_amount * C.secondary_results[S] * multiplier) + log_chemical_reaction(my_atom, C, multiplier) var/list/seen = viewers(4, get_turf(my_atom)) for(var/mob/M in seen) M << "\blue \icon[my_atom] The solution begins to bubble." diff --git a/code/modules/reagents/Chemistry-Logging.dm b/code/modules/reagents/Chemistry-Logging.dm new file mode 100644 index 0000000000..1432b18a2e --- /dev/null +++ b/code/modules/reagents/Chemistry-Logging.dm @@ -0,0 +1,28 @@ + +/var/list/chemical_reaction_logs = list() + +/proc/log_chemical_reaction(atom/A, datum/chemical_reaction/R, multiplier) + if(!A || !R) + return + + var/turf/T = get_turf(A) + var/logstr = "[usr ? key_name(usr) : "EVENT"] mixed [R.name] ([R.result]) (x[multiplier]) in \the [A] at [T ? "[T.x],[T.y],[T.z]" : "*null*"]" + + chemical_reaction_logs += "\[[time_stamp()]\] [logstr]" + + if(R.log_is_important) + message_admins(logstr) + log_admin(logstr) + +/client/proc/view_chemical_reaction_logs() + set name = "Show Chemical Reactions" + set category = "Admin" + + if(!check_rights(R_ADMIN)) + return + + var/html = "" + for(var/entry in chemical_reaction_logs) + html += "[entry]
" + + usr << browse(html, "window=chemlogs") diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 96730fb25b..6f17798c81 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -17,6 +17,8 @@ datum var/list/secondary_results = list() //additional reagents produced by the reaction var/requires_heating = 0 + var/log_is_important = 0 // If this reaction should be considered important for logging. Important recipes message admins when mixed, non-important ones just log to file. + proc on_reaction(var/datum/reagents/holder, var/created_volume) return @@ -169,6 +171,7 @@ datum result = "pacid" required_reagents = list("sacid" = 1, "chlorine" = 1, "potassium" = 1) result_amount = 3 + log_is_important = 1 synaptizine name = "Synaptizine" @@ -456,6 +459,7 @@ datum result = "chloralhydrate" required_reagents = list("ethanol" = 1, "chlorine" = 3, "water" = 1) result_amount = 1 + log_is_important = 1 potassium_chloride name = "Potassium Chloride" diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 8aa34a7dca..191dd5834a 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -170,10 +170,7 @@ if(istype(target,/mob/living)) var/mob/living/M = target - var/list/injected = list() - for(var/datum/reagent/R in src.reagents.reagent_list) - injected += R.name - var/contained = english_list(injected) + var/contained = reagents.get_reagents() M.attack_log += text("\[[time_stamp()]\] Has been injected with [src.name] by [user.name] ([user.ckey]). Reagents: [contained]") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to inject [M.name] ([M.key]). Reagents: [contained]") msg_admin_attack("[user.name] ([user.ckey]) injected [M.name] ([M.key]) with [src.name]. Reagents: [contained] (INTENT: [uppertext(user.a_intent)]) (JMP)") @@ -181,6 +178,13 @@ src.reagents.reaction(target, INGEST) if(ismob(target) && target == user) src.reagents.reaction(target, INGEST) + + if(!ismob(target) && !istype(target, /obj/item/weapon/reagent_containers/glass)) // It's not a mob (which is logged above) and it's not a beaker or similar (which is a fairly normal thing to inject into) + usr = user + var/contained = reagents.get_reagents() + user.attack_log += "\[[time_stamp()]\] Injected \the [target] with \the [src]. Reagents: [contained]" + log_and_message_admins("injected \the [target] with \the [src]. Reagents: [contained]") + spawn(5) var/datum/reagent/blood/B for(var/datum/reagent/blood/d in src.reagents.reagent_list) @@ -472,4 +476,4 @@ reagents.add_reagent("inaprovaline", 7) reagents.add_reagent("anti_toxin", 8) mode = SYRINGE_INJECT - update_icon() \ No newline at end of file + update_icon() From 7a6599fdf487bacc4278cc123da1b21195aaa24f Mon Sep 17 00:00:00 2001 From: GinjaNinja32 Date: Wed, 29 Jul 2015 12:36:00 +0100 Subject: [PATCH 4/5] Add logging to potassium-water and nitroglycerin reactions --- code/modules/reagents/Chemistry-Recipes.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 6f17798c81..821830efc6 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -31,6 +31,8 @@ datum result = null required_reagents = list("water" = 1, "potassium" = 1) result_amount = 2 + log_is_important = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round (created_volume/10, 1), holder.my_atom, 0, 0) @@ -344,6 +346,8 @@ datum result = "nitroglycerin" required_reagents = list("glycerol" = 1, "pacid" = 1, "sacid" = 1) result_amount = 2 + log_is_important = 1 + on_reaction(var/datum/reagents/holder, var/created_volume) var/datum/effect/effect/system/reagents_explosion/e = new() e.set_up(round (created_volume/2, 1), holder.my_atom, 0, 0) From 3bb88b327cffae2800a845cbe4aa9264e18735d3 Mon Sep 17 00:00:00 2001 From: Atlantis Date: Wed, 29 Jul 2015 23:16:27 +0200 Subject: [PATCH 5/5] Fixes #10353 - Fixes icons not updating properly - Also fixes a runtime. --- code/game/objects/items/robot/robot_upgrades.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 3f11eb4bbe..678a8b178a 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -30,14 +30,14 @@ R.uneq_all() R.hands.icon_state = "nomod" R.icon_state = "robot" + R.icontype = "Basic" //world << R.custom_sprite if(R.custom_sprite == 1) //world << R.icon_state icon = 'icons/mob/custom-synthetic.dmi' R.icon_state = "[R.ckey]-Standard" - del(R.module) R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name) - R.module = null + del(R.module) R.camera.remove_networks(list("Engineering","Medical","MINE")) R.updatename("Default") R.status_flags |= CANPUSH