From 440f784c703558779619e922bb23f0ffa36c7818 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 21 Feb 2014 02:11:11 -0600 Subject: [PATCH 01/28] Bugfix: People unable to hear while in certain locations. (And some debug verbs) ...hopefully --- code/__HELPERS/game.dm | 36 ++++++++++------ code/modules/admin/verbs/mapping.dm | 67 +++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+), 13 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 577c8093390..911b5c6f1eb 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -35,12 +35,17 @@ // Like view but bypasses luminosity check -/proc/hear(var/range, var/atom/source) +/proc/hear(var/range, var/turf/source) + var/Alum = source.loc.luminosity var/lum = source.luminosity + source.loc.luminosity = 6 source.luminosity = 6 - var/list/heard = view(range, source) + var/list/heard = viewers(range, source) //Only lists mobs, but does a better job then view of getting the mobs. + heard |= view(range, source) + + source.loc.luminosity = Alum source.luminosity = lum return heard @@ -174,33 +179,38 @@ var/list/range = hear(R, T) - for(var/mob/M in range) + var/list/clients_minus_checked = clients + + for(var/mob/M in range) //Only looking for living mobs because ghosts are automatically added. hear += M + if(M.client) + clients_minus_checked -= M.client var/list/objects = list() - for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object + for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object objects += O - for(var/client/C in clients) - if(!istype(C) || !C.eye) - continue //I have no idea when this client check would be needed, but if this runtimes people won't hear anything - //So kinda paranoid about runtime avoidance. - if(istype(C.eye, /obj/machinery/camera)) - continue //No microphones in cameras. + var/list/hear_and_objects = (hear|objects) - if(C.mob in hear) + for(var/client/C in clients_minus_checked) + if(!istype(C) || !C.eye || istype(C.mob, /mob/dead)) continue - var/list/hear_and_objects = (hear|objects) //Combined these lists here instead of doing the combine 3 more times. + if(istype(C.eye, /obj/machinery/camera)) + continue //No microphones in cameras. if(C.eye in hear_and_objects) hear += C.mob - + hear_and_objects += C.mob else if(C.mob.loc in hear_and_objects) hear += C.mob + hear_and_objects += C.mob + else if(C.mob.loc.loc in hear_and_objects) hear += C.mob + hear_and_objects += C.mob + return hear diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 00b9f15ca53..6108ebd7749 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -161,6 +161,9 @@ var/list/debug_verbs = list ( ,/client/proc/hide_debug_verbs ,/client/proc/testZAScolors ,/client/proc/testZAScolors_remove + ,/client/proc/test_viewers + ,/client/proc/test_view + ,/client/proc/test_hear ) @@ -185,6 +188,70 @@ var/list/debug_verbs = list ( feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/test_viewers() + set category = "Debug" + set name = "Test Viewers" + + var/turf/T = get_turf(usr) + var/lum = T.loc.luminosity + T.loc.luminosity = 1 + + + var/list/inviewers = viewers(7, usr) + T.loc.luminosity = lum + var/list/M = list() + var/list/O = list() + + for(var/obj/OBJ in inviewers) + O += OBJ + for(var/mob/MOB in inviewers) + M += MOB + + usr << "VIEWERS MOB: [list2text(M,", ")]" + usr << "VIEWERS OBJ: [list2text(O,", ")]" + + + +/client/proc/test_view() + set category = "Debug" + set name = "Test View" + + var/list/inview = view(7, usr) + var/list/M = list() + var/list/O = list() + + for(var/obj/OBJ in inview) + O += OBJ + for(var/mob/MOB in inview) + M += MOB + + usr << "VIEW MOB: [list2text(M,", ")]" + usr << "VIEW OBJ: [list2text(O,", ")]" + +/client/proc/test_hear() + set category = "Debug" + set name = "Test Hear" + + var/turf/T = get_turf(usr) + var/list/hearers = hear(7, T) + var/list/M = list() + var/list/O = list() + + for(var/obj/OBJ in hearers) + O += OBJ + for(var/mob/MOB in hearers) + M += MOB + + + usr << "HEAR MOB: [list2text(M,", ")]" + usr << "HEAR OBJ: [list2text(O,", ")]" + + + + + + /client/var/list/testZAScolors_turfs = list() /client/var/list/testZAScolors_zones = list() /client/var/usedZAScolors = 0 From 6dc330a3988d531466d010e45b58c624431afb19 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Fri, 21 Feb 2014 21:29:34 -0600 Subject: [PATCH 02/28] Bugfix: get_mobs_in_view won't allow AIeyes to hear chat. Also: Added a client check to saycode for now that stops runtimes when you have a dead body with no client and removed colons from it. herp derp. --- code/__HELPERS/game.dm | 29 ++++++++++++++++++----------- code/modules/mob/living/say.dm | 27 ++++++++++++++------------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 911b5c6f1eb..a9b7f23072e 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -42,7 +42,7 @@ source.loc.luminosity = 6 source.luminosity = 6 - var/list/heard = viewers(range, source) //Only lists mobs, but does a better job then view of getting the mobs. + var/list/heard = hearers(range, source) //Only lists mobs, but does a better job then view of getting the mobs. heard |= view(range, source) source.loc.luminosity = Alum @@ -178,23 +178,30 @@ return hear var/list/range = hear(R, T) - + var/list/objects = list() var/list/clients_minus_checked = clients - for(var/mob/M in range) //Only looking for living mobs because ghosts are automatically added. - hear += M - if(M.client) - clients_minus_checked -= M.client - - var/list/objects = list() + for(var/I in range) + if(istype(I, /mob)) + var/mob/M = I + if(istype(M, /mob/living)) + hear += M + else if(istype(M, /mob/dead)) + hear += M + else + objects += M //We still need to check if they contain entities that can hear + continue - for(var/obj/O in range) //Get a list of objects in hearing range. We'll check to see if any clients have their "eye" set to the object - objects += O + if(M.client) + clients_minus_checked -= M.client + + else + objects += I var/list/hear_and_objects = (hear|objects) for(var/client/C in clients_minus_checked) - if(!istype(C) || !C.eye || istype(C.mob, /mob/dead)) + if(!istype(C) || !C.eye || istype(C.mob, /mob/dead) || istype(C.eye, /mob/aiEye)) continue if(istype(C.eye, /obj/machinery/camera)) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 93369793586..554ec38afae 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -384,19 +384,20 @@ var/list/department_radio_keys = list( rendered = "[GetVoice()][alt_name] [message_a]" var/rendered_ghost = "[GetVoice()][alt_name] [message_ghost]" for (var/mob/M in heard_a) - if(hascall(M,"show_message")) - var/deaf_message = "" - var/deaf_type = 1 - if(M != src) - deaf_message = "[name][alt_name] talks but you cannot hear them." - else - deaf_message = "You cannot hear yourself!" - deaf_type = 2 // Since you should be able to hear yourself without looking - if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) - M:show_message(rendered_ghost, 2, deaf_message, deaf_type) - else - M:show_message(rendered, 2, deaf_message, deaf_type) - M << speech_bubble + if(M.client) //Runtime fix. + if(hascall(M,"show_message")) + var/deaf_message = "" + var/deaf_type = 1 + if(M != src) + deaf_message = "[name][alt_name] talks but you cannot hear them." + else + deaf_message = "You cannot hear yourself!" + deaf_type = 2 // Since you should be able to hear yourself without looking + if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) + M.show_message(rendered_ghost, 2, deaf_message, deaf_type) + else + M.show_message(rendered, 2, deaf_message, deaf_type) + M << speech_bubble if (length(heard_b)) From c6d39deac0a34cf30ace6ca063a377f0502e57be Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:49:57 +0300 Subject: [PATCH 03/28] Fix for #4445. --- code/_onclick/ai.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/_onclick/ai.dm b/code/_onclick/ai.dm index 112c3431e52..d6918b1f7e0 100644 --- a/code/_onclick/ai.dm +++ b/code/_onclick/ai.dm @@ -32,6 +32,9 @@ build_click(src, client.buildmode, params, A) return + if(control_disabled || stat) + return + var/list/modifiers = params2list(params) if(modifiers["middle"]) MiddleClickOn(A) @@ -46,7 +49,8 @@ CtrlClickOn(A) return - if(control_disabled || stat || world.time <= next_move) return + if(world.time <= next_move) + return next_move = world.time + 9 /* @@ -123,4 +127,4 @@ else // disable/6 is not in Topic; disable/5 disables both temporary and permenant shock Topic("aiDisable=5", list("aiDisable"="5"), 1) - return + return \ No newline at end of file From ef3b565f6413ccc44c9b185662a148eae3f5288c Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:53:37 +0300 Subject: [PATCH 04/28] Fix for #4458. --- code/game/objects/structures/watercloset.dm | 4 +++- code/modules/mob/living/carbon/human/human.dm | 10 ++++++---- code/modules/mob/living/silicon/robot/robot.dm | 2 +- code/modules/reagents/Chemistry-Reagents.dm | 5 ++++- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 0a9dc69bacd..237ee6c92f1 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -268,10 +268,12 @@ if(H.belt) if(H.belt.clean_blood()) H.update_inv_belt(0) + H.clean_blood(washshoes) else if(M.wear_mask) //if the mob is not human, it cleans the mask without asking for bitflags if(M.wear_mask.clean_blood()) M.update_inv_wear_mask(0) + M.clean_blood() else O.clean_blood() @@ -413,4 +415,4 @@ /obj/structure/sink/puddle/attackby(obj/item/O as obj, mob/user as mob) icon_state = "puddle-splash" ..() - icon_state = "puddle" + icon_state = "puddle" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 97a6987ad9e..998b4f80144 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -47,7 +47,7 @@ if(!dna) dna = new /datum/dna(null) - dna.species=species.name + dna.species=species.name for(var/i=0;i<7;i++) // 2 for medHUDs and 5 for secHUDs hud_list += image('icons/mob/hud.dmi', src, "hudunknown") @@ -1113,10 +1113,12 @@ verbs += /mob/living/carbon/human/proc/bloody_doodle return 1 //we applied blood to the item -/mob/living/carbon/human/clean_blood() +/mob/living/carbon/human/clean_blood(var/clean_feet) .=..() - if(istype(feet_blood_DNA, /list) && feet_blood_DNA.len) + if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len) + feet_blood_color = null del(feet_blood_DNA) + update_inv_shoes(1) return 1 /mob/living/carbon/human/get_visible_implants(var/class = 0) @@ -1193,7 +1195,7 @@ if(!new_species) new_species = dna.species else - dna.species = new_species + dna.species = new_species if(species && (species.name && species.name == new_species)) return diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 2e03b9ffd04..5b417e40247 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1189,7 +1189,7 @@ if(cleaned_human.shoes) cleaned_human.shoes.clean_blood() cleaned_human.update_inv_shoes(0) - cleaned_human.clean_blood() + cleaned_human.clean_blood(1) cleaned_human << "\red [src] cleans your face!" return diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c9666d98f00..b48b96d3095 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -962,6 +962,9 @@ datum if(H.shoes) if(H.shoes.clean_blood()) H.update_inv_shoes(0) + else + H.clean_blood(1) + return M.clean_blood() leporazine @@ -3696,4 +3699,4 @@ datum return // Undefine the alias for REAGENTS_EFFECT_MULTIPLER -#undef REM +#undef REM \ No newline at end of file From b04d00ff7b19e53d497a8f4c52829b8058cf593a Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:54:11 +0300 Subject: [PATCH 05/28] Typo fix. --- code/modules/economy/cash.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/economy/cash.dm b/code/modules/economy/cash.dm index c352caa88d4..356015c6c06 100644 --- a/code/modules/economy/cash.dm +++ b/code/modules/economy/cash.dm @@ -17,7 +17,7 @@ var/worth = 0 /obj/item/weapon/spacecash/c1 - name = "1 credip chip" + name = "1 credit chip" icon_state = "spacecash" desc = "It's worth 1 credit." worth = 1 From fd738a5767ef808c862c932e943fcd1234630d95 Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:54:48 +0300 Subject: [PATCH 06/28] Smallfix. --- code/modules/client/preferences.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index ab55f29f50e..2be354860ed 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -248,9 +248,9 @@ datum/preferences dat += "-Alpha(transparence): [UI_style_alpha]
" dat += "Play admin midis: [(toggles & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play lobby music: [(toggles & SOUND_LOBBY) ? "Yes" : "No"]
" - dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "Nearest Creatures" : "All Speech"]
" - dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "Nearest Creatures" : "All Emotes"]
" - dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "Nearest Speakers" : "All Chatter"]
" + dat += "Ghost ears: [(toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
" + dat += "Ghost sight: [(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
" + dat += "Ghost radio: [(toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
" if(config.allow_Metadata) dat += "OOC Notes: Edit
" From 2b9842c113231ebb396ff77835c9eca67d66d520 Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:56:12 +0300 Subject: [PATCH 07/28] Smallfix. --- .../objects/items/weapons/cigs_lighters.dm | 26 +++++++++++-------- .../objects/items/weapons/storage/boxes.dm | 4 ++- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index ac80658f27c..2dd706649d9 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -21,6 +21,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM icon = 'icons/obj/cigarettes.dmi' icon_state = "match_unlit" var/lit = 0 + var/burnt = 0 var/smoketime = 5 w_class = 1.0 origin_tech = "materials=1" @@ -30,24 +31,27 @@ CIGARETTE PACKETS ARE IN FANCY.DM var/turf/location = get_turf(src) smoketime-- if(smoketime < 1) - icon_state = "match_burnt" - lit = -1 - processing_objects.Remove(src) + burn_out() return if(location) location.hotspot_expose(700, 5) return /obj/item/weapon/match/dropped(mob/user as mob) - if(lit == 1) - lit = -1 - damtype = "brute" - icon_state = "match_burnt" - item_state = "cigoff" - name = "burnt match" - desc = "A match. This one has seen better days." + if(lit) + burn_out() return ..() +/obj/item/weapon/match/proc/burn_out() + lit = 0 + burnt = 1 + damtype = "brute" + icon_state = "match_burnt" + item_state = "cigoff" + name = "burnt match" + desc = "A match. This one has seen better days." + processing_objects.Remove(src) + ////////////////// //FINE SMOKABLES// ////////////////// @@ -419,4 +423,4 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(lit) user.SetLuminosity(user.luminosity-2) SetLuminosity(2) - return + return \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/boxes.dm b/code/game/objects/items/weapons/storage/boxes.dm index 91c68bd1e74..83189aafd6b 100644 --- a/code/game/objects/items/weapons/storage/boxes.dm +++ b/code/game/objects/items/weapons/storage/boxes.dm @@ -418,6 +418,7 @@ w_class = 1 flags = TABLEPASS slot_flags = SLOT_BELT + can_hold = list("/obj/item/weapon/match") New() ..() @@ -425,8 +426,9 @@ new /obj/item/weapon/match(src) attackby(obj/item/weapon/match/W as obj, mob/user as mob) - if(istype(W, /obj/item/weapon/match) && W.lit == 0) + if(istype(W) && !W.lit && !W.burnt) W.lit = 1 + W.damtype = "burn" W.icon_state = "match_lit" processing_objects.Add(W) W.update_icon() From 05c82c970b2f3a7284c4e1f39c49e107b52212b9 Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 06:56:51 +0300 Subject: [PATCH 08/28] Tiny fix. --- code/game/objects/items/weapons/storage/fancy.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 119d2d2c22e..5766fd27e45 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -173,7 +173,6 @@ /obj/item/weapon/storage/fancy/cigarettes/update_icon() icon_state = "[initial(icon_state)][contents.len]" - desc = "There are [contents.len] cig\s left!" return /obj/item/weapon/storage/fancy/cigarettes/remove_from_storage(obj/item/W as obj, atom/new_location) @@ -253,5 +252,4 @@ /obj/item/weapon/storage/lockbox/vials/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() - update_icon() - + update_icon() \ No newline at end of file From 86c73e242b24aec51c2779aae2fa0b1a336617e1 Mon Sep 17 00:00:00 2001 From: Segrain Date: Sat, 22 Feb 2014 10:16:55 +0300 Subject: [PATCH 09/28] Fix for embedding. --- code/modules/projectiles/projectile/force.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/projectiles/projectile/force.dm b/code/modules/projectiles/projectile/force.dm index 2fab1a4da18..364ad53370b 100644 --- a/code/modules/projectiles/projectile/force.dm +++ b/code/modules/projectiles/projectile/force.dm @@ -4,7 +4,6 @@ icon_state = "ice_1" damage = 20 flag = "energy" - embed = 1 /obj/item/projectile/forcebolt/strong name = "force bolt" From d95caffecb62ce0d50d811aabbf0eb7ef25e5588 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Feb 2014 01:45:43 -0600 Subject: [PATCH 10/28] DEV EMPOWERMENT Gives people with R_DEBUG access to runtimelogs. Also moves make_everyone_random to R_FUN where it belongs, gets rid of that dumb panel from my awesome dev screen. --- code/modules/admin/admin_verbs.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 664b70bcff2..0258ddb50ae 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -29,7 +29,6 @@ var/list/admin_verbs_admin = list( /client/proc/cmd_admin_check_contents, /*displays the contents of an instance*/ /datum/admins/proc/access_news_network, /*allows access of newscasters*/ /client/proc/giveruntimelog, /*allows us to give access to runtime logs to somebody*/ - /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/ /client/proc/getserverlog, /*allows us to fetch server logs (diary) for other days*/ /client/proc/jumptocoord, /*we ghost and jump to a coordinate*/ /client/proc/Getmob, /*teleports a mob to our location*/ @@ -89,6 +88,7 @@ var/list/admin_verbs_fun = list( /client/proc/cmd_admin_dress, /client/proc/cmd_admin_gib_self, /client/proc/drop_bomb, + /client/proc/everyone_random, /client/proc/cinematic, /client/proc/one_click_antag, /datum/admins/proc/toggle_aliens, @@ -127,6 +127,7 @@ var/list/admin_verbs_server = list( /client/proc/check_customitem_activity ) var/list/admin_verbs_debug = list( + /client/proc/getruntimelog, /*allows us to access runtime logs to somebody*/ /client/proc/cmd_admin_list_open_jobs, /client/proc/Debug2, /client/proc/kill_air, From 92e0c601260471d5b82d9d91e52fb668b05c26fc Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Feb 2014 02:50:49 -0600 Subject: [PATCH 11/28] Remove clients removal derp. --- code/__HELPERS/game.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index a9b7f23072e..e5a4ab8de94 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -179,7 +179,8 @@ var/list/range = hear(R, T) var/list/objects = list() - var/list/clients_minus_checked = clients + var/list/clients_minus_checked = list() + clients_minus_checked |= clients for(var/I in range) if(istype(I, /mob)) From 8ef2e1023722882956d86ccb8734b7f2ae579815 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Feb 2014 03:43:37 -0600 Subject: [PATCH 12/28] This reverts commit all the say code changes over the last couple of days. Except for the removal of the redundant get_mobs_in_view used for bolding ghosts text. --- code/__HELPERS/game.dm | 57 +++++------------------- code/modules/admin/verbs/mapping.dm | 67 ----------------------------- code/modules/mob/emote.dm | 6 +-- code/modules/mob/living/say.dm | 27 ++++++------ 4 files changed, 26 insertions(+), 131 deletions(-) diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index e5a4ab8de94..e2c04299f1c 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -35,17 +35,12 @@ // Like view but bypasses luminosity check -/proc/hear(var/range, var/turf/source) +/proc/hear(var/range, var/atom/source) - var/Alum = source.loc.luminosity var/lum = source.luminosity - source.loc.luminosity = 6 source.luminosity = 6 - var/list/heard = hearers(range, source) //Only lists mobs, but does a better job then view of getting the mobs. - heard |= view(range, source) - - source.loc.luminosity = Alum + var/list/heard = view(range, source) source.luminosity = lum return heard @@ -166,8 +161,6 @@ // The old system would loop through lists for a total of 5000 per function call, in an empty server. // This new system will loop at around 1000 in an empty server. -// SCREW THAT SHIT, we're not recursing. - /proc/get_mobs_in_view(var/R, var/atom/source) // Returns a list of mobs in range of R from source. Used in radio and say code. @@ -178,46 +171,18 @@ return hear var/list/range = hear(R, T) - var/list/objects = list() - var/list/clients_minus_checked = list() - clients_minus_checked |= clients - - for(var/I in range) - if(istype(I, /mob)) - var/mob/M = I - if(istype(M, /mob/living)) - hear += M - else if(istype(M, /mob/dead)) - hear += M - else - objects += M //We still need to check if they contain entities that can hear - continue + for(var/atom/A in range) + if(ismob(A)) + var/mob/M = A if(M.client) - clients_minus_checked -= M.client + hear += M + //world.log << "Start = [M] - [get_turf(M)] - ([M.x], [M.y], [M.z])" + else if(istype(A, /obj/item/device/radio)) + hear += A - else - objects += I - - var/list/hear_and_objects = (hear|objects) - - for(var/client/C in clients_minus_checked) - if(!istype(C) || !C.eye || istype(C.mob, /mob/dead) || istype(C.eye, /mob/aiEye)) - continue - - if(istype(C.eye, /obj/machinery/camera)) - continue //No microphones in cameras. - - if(C.eye in hear_and_objects) - hear += C.mob - hear_and_objects += C.mob - else if(C.mob.loc in hear_and_objects) - hear += C.mob - hear_and_objects += C.mob - - else if(C.mob.loc.loc in hear_and_objects) - hear += C.mob - hear_and_objects += C.mob + if(isobj(A) || ismob(A)) + hear |= recursive_mob_check(A, hear, 3, 1, 0, 1) return hear diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 6108ebd7749..00b9f15ca53 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -161,9 +161,6 @@ var/list/debug_verbs = list ( ,/client/proc/hide_debug_verbs ,/client/proc/testZAScolors ,/client/proc/testZAScolors_remove - ,/client/proc/test_viewers - ,/client/proc/test_view - ,/client/proc/test_hear ) @@ -188,70 +185,6 @@ var/list/debug_verbs = list ( feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - -/client/proc/test_viewers() - set category = "Debug" - set name = "Test Viewers" - - var/turf/T = get_turf(usr) - var/lum = T.loc.luminosity - T.loc.luminosity = 1 - - - var/list/inviewers = viewers(7, usr) - T.loc.luminosity = lum - var/list/M = list() - var/list/O = list() - - for(var/obj/OBJ in inviewers) - O += OBJ - for(var/mob/MOB in inviewers) - M += MOB - - usr << "VIEWERS MOB: [list2text(M,", ")]" - usr << "VIEWERS OBJ: [list2text(O,", ")]" - - - -/client/proc/test_view() - set category = "Debug" - set name = "Test View" - - var/list/inview = view(7, usr) - var/list/M = list() - var/list/O = list() - - for(var/obj/OBJ in inview) - O += OBJ - for(var/mob/MOB in inview) - M += MOB - - usr << "VIEW MOB: [list2text(M,", ")]" - usr << "VIEW OBJ: [list2text(O,", ")]" - -/client/proc/test_hear() - set category = "Debug" - set name = "Test Hear" - - var/turf/T = get_turf(usr) - var/list/hearers = hear(7, T) - var/list/M = list() - var/list/O = list() - - for(var/obj/OBJ in hearers) - O += OBJ - for(var/mob/MOB in hearers) - M += MOB - - - usr << "HEAR MOB: [list2text(M,", ")]" - usr << "HEAR OBJ: [list2text(O,", ")]" - - - - - - /client/var/list/testZAScolors_turfs = list() /client/var/list/testZAScolors_zones = list() /client/var/usedZAScolors = 0 diff --git a/code/modules/mob/emote.dm b/code/modules/mob/emote.dm index c33732ed133..e2125ada66c 100644 --- a/code/modules/mob/emote.dm +++ b/code/modules/mob/emote.dm @@ -38,15 +38,13 @@ // Type 1 (Visual) emotes are sent to anyone in view of the item if (m_type & 1) - var/list/can_see = get_mobs_in_view(1,src) //Allows silicon & mmi mobs carried around to see the emotes of the person carrying them around. - can_see |= viewers(src,null) - for (var/mob/O in can_see) + for (var/mob/O in viewers(src, null)) O.show_message(message, m_type) // Type 2 (Audible) emotes are sent to anyone in hear range // of the *LOCATION* -- this is important for pAIs to be heard else if (m_type & 2) - for (var/mob/O in get_mobs_in_view(7,src)) + for (var/mob/O in hearers(get_turf(src), null)) O.show_message(message, m_type) /mob/proc/emote_dead(var/message) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 554ec38afae..93369793586 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -384,20 +384,19 @@ var/list/department_radio_keys = list( rendered = "[GetVoice()][alt_name] [message_a]" var/rendered_ghost = "[GetVoice()][alt_name] [message_ghost]" for (var/mob/M in heard_a) - if(M.client) //Runtime fix. - if(hascall(M,"show_message")) - var/deaf_message = "" - var/deaf_type = 1 - if(M != src) - deaf_message = "[name][alt_name] talks but you cannot hear them." - else - deaf_message = "You cannot hear yourself!" - deaf_type = 2 // Since you should be able to hear yourself without looking - if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) - M.show_message(rendered_ghost, 2, deaf_message, deaf_type) - else - M.show_message(rendered, 2, deaf_message, deaf_type) - M << speech_bubble + if(hascall(M,"show_message")) + var/deaf_message = "" + var/deaf_type = 1 + if(M != src) + deaf_message = "[name][alt_name] talks but you cannot hear them." + else + deaf_message = "You cannot hear yourself!" + deaf_type = 2 // Since you should be able to hear yourself without looking + if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) + M:show_message(rendered_ghost, 2, deaf_message, deaf_type) + else + M:show_message(rendered, 2, deaf_message, deaf_type) + M << speech_bubble if (length(heard_b)) From e72c584ac86818f0954e36d21f8cf7a423ae679c Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Sat, 22 Feb 2014 03:47:46 -0600 Subject: [PATCH 13/28] Reapplys this runtime fix when dead /mob/living would not have a client. --- code/modules/mob/living/say.dm | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 93369793586..3f7bd7c02dd 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -384,19 +384,20 @@ var/list/department_radio_keys = list( rendered = "[GetVoice()][alt_name] [message_a]" var/rendered_ghost = "[GetVoice()][alt_name] [message_ghost]" for (var/mob/M in heard_a) - if(hascall(M,"show_message")) - var/deaf_message = "" - var/deaf_type = 1 - if(M != src) - deaf_message = "[name][alt_name] talks but you cannot hear them." - else - deaf_message = "You cannot hear yourself!" - deaf_type = 2 // Since you should be able to hear yourself without looking - if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) - M:show_message(rendered_ghost, 2, deaf_message, deaf_type) - else - M:show_message(rendered, 2, deaf_message, deaf_type) - M << speech_bubble + if(M.client) + if(hascall(M,"show_message")) + var/deaf_message = "" + var/deaf_type = 1 + if(M != src) + deaf_message = "[name][alt_name] talks but you cannot hear them." + else + deaf_message = "You cannot hear yourself!" + deaf_type = 2 // Since you should be able to hear yourself without looking + if (M.stat == DEAD && (M.client.prefs.toggles & CHAT_GHOSTEARS) && M in onscreen) + M:show_message(rendered_ghost, 2, deaf_message, deaf_type) + else + M:show_message(rendered, 2, deaf_message, deaf_type) + M << speech_bubble if (length(heard_b)) From 32de00eed82c0c834a017c067373579afe9a9531 Mon Sep 17 00:00:00 2001 From: suethecake Date: Sat, 22 Feb 2014 21:50:21 -0600 Subject: [PATCH 14/28] Fix to cloned gun issue - now your holster is located on your tactical armor. --- .../objects/items/weapons/storage/belt.dm | 40 +------------------ code/modules/clothing/suits/armor.dm | 35 +++++++++++++++- 2 files changed, 36 insertions(+), 39 deletions(-) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 8798cb699c1..3ad8b79e49a 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -173,7 +173,6 @@ desc = "Can hold security gear like handcuffs and flashes, with more pouches for more storage." icon_state = "swatbelt" item_state = "swatbelt" - var/obj/item/weapon/gun/holstered = null storage_slots = 9 max_w_class = 3 max_combined_w_class = 21 @@ -195,40 +194,5 @@ "/obj/item/device/flashlight", "/obj/item/device/pda", "/obj/item/device/radio/headset", - "/obj/item/weapon/melee", - "/obj/item/taperoll/police", - "/obj/item/weapon/gun/energy/taser" - ) - - - /obj/item/weapon/storage/belt/security/tactical/verb/holster() - set name = "Holster" - set category = "Object" - set src in usr - if(!istype(usr, /mob/living)) return - if(usr.stat) return - - if(!holstered) - if(!istype(usr.get_active_hand(), /obj/item/weapon/gun)) - usr << "\blue You need your gun equiped to holster it." - return - var/obj/item/weapon/gun/W = usr.get_active_hand() - if (!W.isHandgun()) - usr << "\red This gun won't fit in \the belt!" - return - holstered = usr.get_active_hand() - usr.drop_item() - holstered.loc = src - usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].") - else - if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) - usr << "\red You need an empty hand to draw the gun!" - else - if(usr.a_intent == "hurt") - usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \ - "\red You draw \the [holstered], ready to shoot!") - else - usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \ - "\blue You draw \the [holstered], pointing it at the ground.") - usr.put_in_hands(holstered) - holstered = null \ No newline at end of file + "/obj/item/weapon/melee" + ) \ No newline at end of file diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index c58ec18be0f..7299516c9cd 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -190,7 +190,40 @@ desc = "A suit of armor most often used by Special Weapons and Tactics squads. Includes padded vest with pockets along with shoulder and kneeguards." icon_state = "swatarmor" item_state = "armor" + var/obj/item/weapon/gun/holstered = null body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS slowdown = 1 armor = list(melee = 60, bullet = 60, laser = 60, energy = 40, bomb = 20, bio = 0, rad = 0) - siemens_coefficient = 0.7 \ No newline at end of file + siemens_coefficient = 0.7 + + /obj/item/clothing/suit/armor/tactical/verb/holster() + set name = "Holster" + set category = "Object" + set src in usr + if(!istype(usr, /mob/living)) return + if(usr.stat) return + + if(!holstered) + if(!istype(usr.get_active_hand(), /obj/item/weapon/gun)) + usr << "\blue You need your gun equiped to holster it." + return + var/obj/item/weapon/gun/W = usr.get_active_hand() + if (!W.isHandgun()) + usr << "\red This gun won't fit in \the belt!" + return + holstered = usr.get_active_hand() + usr.drop_item() + holstered.loc = src + usr.visible_message("\blue \The [usr] holsters \the [holstered].", "You holster \the [holstered].") + else + if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) + usr << "\red You need an empty hand to draw the gun!" + else + if(usr.a_intent == "hurt") + usr.visible_message("\red \The [usr] draws \the [holstered], ready to shoot!", \ + "\red You draw \the [holstered], ready to shoot!") + else + usr.visible_message("\blue \The [usr] draws \the [holstered], pointing it at the ground.", \ + "\blue You draw \the [holstered], pointing it at the ground.") + usr.put_in_hands(holstered) + holstered = null \ No newline at end of file From cea151813e72e5ac6b01cc2a48659622bfce093d Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:44:00 -0600 Subject: [PATCH 15/28] Runtime fix: Dirt in SPAAAAACCEEEEEEE ndefined variable /turf/space/var/dirt proc name: reaction turf (/datum/reagent/space_cleaner/reaction_turf) source file: Chemistry-Reagents.dm,939 --- code/modules/reagents/Chemistry-Reagents.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index c9666d98f00..73c500403f8 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -935,8 +935,9 @@ datum for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5,10)) reaction_turf(var/turf/simulated/S, var/volume) - if(volume >= 1) - S.dirt = 0 + if(istype(S) + if(volume >= 1) + S.dirt = 0 reaction_mob(var/mob/M, var/method=TOUCH, var/volume) if(iscarbon(M)) From 1eb66f1f78d7cc8261a3d488ec90e961f3d60ae2 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:47:55 -0600 Subject: [PATCH 16/28] Runtime fix blood_DNA length checks when it's possibly null. runtime error: Cannot read null.len proc name: attack self (/obj/item/weapon/melee/telebaton/attack_self) source file: swords_axes_etc.dm,156 --- code/game/objects/items/weapons/swords_axes_etc.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 8b9d914bc24..7ee3499c1cd 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -153,7 +153,7 @@ playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1) add_fingerprint(user) - if(blood_overlay && (blood_DNA.len >= 1)) //updates blood overlay, if any + if(blood_overlay && blood_DNA && (blood_DNA.len >= 1)) //updates blood overlay, if any overlays.Cut()//this might delete other item overlays as well but eeeeeeeh var/icon/I = new /icon(src.icon, src.icon_state) @@ -265,4 +265,4 @@ H.update_inv_r_hand() add_fingerprint(user) - return \ No newline at end of file + return From 0bcd89360a26223820d5b7ef0b89baf4de7fc5eb Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 00:51:57 -0600 Subject: [PATCH 17/28] Runtime fix: I have no UI, and I must close it. runtime error: Cannot execute null.close(). proc name: Topic (/obj/item/device/pda/Topic) source file: PDA.dm,485 usr: Garry Myers (/mob/living/carbon/human) src: PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering) call stack: PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering): Topic("src=\[0x2003e95];choice=Messag...", /list (/list)) NeroHarry (/client): Topic("src=\[0x2003e95];choice=Messag...", /list (/list), PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering)) NeroHarry (/client): Topic("src=\[0x2003e95];choice=Messag...", /list (/list), PDA-Garry Myers (Station Engin... (/obj/item/device/pda/engineering)) --- code/game/objects/items/devices/PDA/PDA.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 5a0bdf4af30..df04ddfcfe7 100755 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -482,7 +482,8 @@ var/global/list/obj/item/device/pda/PDAs = list() return 0 if(!can_use()) //Why reinvent the wheel? There's a proc that does exactly that. U.unset_machine() - ui.close() + if(ui) + ui.close() return 0 add_fingerprint(U) From 75116bfd53602c49da55fc477cbfe004ff2addc0 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:16:19 -0600 Subject: [PATCH 18/28] Runtime fix: Someone using a gas mask with no tank...IN SPACE runtime error: Cannot read null.oxygen proc name: copy from (/datum/gas_mixture/proc/copy_from) source file: FEA_gas_mixture.dm,480 usr: null src: /datum/gas_mixture (/datum/gas_mixture) call stack: /datum/gas_mixture (/datum/gas_mixture): copy from(null) Basileus (/mob/living/carbon/human): breathe() Basileus (/mob/living/carbon/human): Life() /datum/controller/game_control... (/datum/controller/game_controller): process mobs() /datum/controller/game_control... (/datum/controller/game_controller): process() runtime error: Cannot read null.toxins proc name: breathe (/mob/living/carbon/human/proc/breathe) source file: life.dm,339 usr: null src: Basileus (/mob/living/carbon/human) call stack: Basileus (/mob/living/carbon/human): breathe() Basileus (/mob/living/carbon/human): Life() /datum/controller/game_control... (/datum/controller/game_controller): process mobs() /datum/controller/game_control... (/datum/controller/game_controller): process() --- code/modules/mob/living/carbon/human/life.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 00368c2debd..8470095cde0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -325,7 +325,7 @@ breath = loc.remove_air(breath_moles) - if(istype(wear_mask, /obj/item/clothing/mask/gas)) + if(istype(wear_mask, /obj/item/clothing/mask/gas) && breath) var/obj/item/clothing/mask/gas/G = wear_mask var/datum/gas_mixture/filtered = new From d5951781fdeaf675508fa5d67bb44e130dde63df Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:27:04 -0600 Subject: [PATCH 19/28] Runtime fix: Alarms keep trying to heat up space. runtime error: Cannot execute null.heat capacity(). proc name: process (/obj/machinery/alarm/process) source file: alarm.dm,186 runtime error: Cannot execute null.heat capacity(). proc name: process (/obj/machinery/alarm/process) source file: alarm.dm,186 over and over and over. --- code/game/machinery/alarm.dm | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index f2a069c4543..c781bb20c99 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -183,24 +183,25 @@ var/datum/gas_mixture/gas gas = location.remove_air(0.25*environment.total_moles) - var/heat_capacity = gas.heat_capacity() - var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) + if(gas) + var/heat_capacity = gas.heat_capacity() + var/energy_used = min( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE) - //Use power. Assuming that each power unit represents 1000 watts.... - use_power(energy_used/1000, ENVIRON) + //Use power. Assuming that each power unit represents 1000 watts.... + use_power(energy_used/1000, ENVIRON) - //We need to cool ourselves. - if(environment.temperature > target_temperature) - gas.temperature -= energy_used/heat_capacity - else - gas.temperature += energy_used/heat_capacity + //We need to cool ourselves. + if(environment.temperature > target_temperature) + gas.temperature -= energy_used/heat_capacity + else + gas.temperature += energy_used/heat_capacity - environment.merge(gas) + environment.merge(gas) - if(abs(environment.temperature - target_temperature) <= 0.5) - regulating_temperature = 0 - visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ - "You hear a click as a faint electronic humming stops.") + if(abs(environment.temperature - target_temperature) <= 0.5) + regulating_temperature = 0 + visible_message("\The [src] clicks quietly as it stops [environment.temperature > target_temperature ? "cooling" : "heating"] the room.",\ + "You hear a click as a faint electronic humming stops.") var/old_level = danger_level danger_level = overall_danger_level() @@ -1683,4 +1684,4 @@ Code shamelessly copied from apc_frame else usr << browse(null, "window=partyalarm") return - return \ No newline at end of file + return From 3d8899812320df31b5dab37f9d0472370b70dc37 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:35:04 -0600 Subject: [PATCH 20/28] Runtime fix: usr = 0??? runtime error: Cannot read 0.item_use_icon proc name: remove gun icons (/client/proc/remove_gun_icons) source file: targeting.dm,273 usr: 0 src: Vivalas (/client) call stack: Vivalas (/client): remove gun icons() the taser gun (/obj/item/weapon/gun/energy/taser): dropped(Jonathon Sommer (/mob/living/carbon/human)) Jonathon Sommer (/mob/living/carbon/human): drop r hand(null) Jonathon Sommer (/mob/living/carbon/human): update canmove() Jonathon Sommer (/mob/living/carbon/human): Weaken(5) Jonathon Sommer (/mob/living/carbon/human): Weaken(5) Jonathon Sommer (/mob/living/carbon/human): apply effect(5, "weaken", 0) Jonathon Sommer (/mob/living/carbon/human): apply effects(0, 5, 0, 0, 0, 0, 0, 0, 0) --- code/modules/projectiles/targeting.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm index 06f25a7e18b..d627a5c7713 100644 --- a/code/modules/projectiles/targeting.dm +++ b/code/modules/projectiles/targeting.dm @@ -269,7 +269,7 @@ client/proc/add_gun_icons() screen += usr.gun_run_icon client/proc/remove_gun_icons() - if(isnull(usr)) return 1 // Runtime prevention on N00k agents spawning with SMG + if(!usr) return 1 // Runtime prevention on N00k agents spawning with SMG screen -= usr.item_use_icon screen -= usr.gun_move_icon if (target_can_move) From f071421552188fa08ac19f042d244ef2777dc706 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:39:25 -0600 Subject: [PATCH 21/28] Runtime fix: Null isn't really that sharp. runtime error: Cannot read null.sharp proc name: is sharp (/proc/is_sharp) source file: unsorted.dm,1270 usr: Arthur Ward (/mob/living/carbon/human) src: null call stack: is sharp(null) the police tape (/obj/item/tape/police): breaktape(null, Arthur Ward (/mob/living/carbon/human)) the police tape (/obj/item/tape/police): attack hand(Arthur Ward (/mob/living/carbon/human)) Arthur Ward (/mob/living/carbon/human): UnarmedAttack(the police tape (/obj/item/tape/police), 1) Arthur Ward (/mob/living/carbon/human): ClickOn(the police tape (/obj/item/tape/police), "icon-x=16;icon-y=10;left=1;scr...") the police tape (/obj/item/tape/police): Click(the floor (172,128,1) (/turf/simulated/floor), "mapwindow.map", "icon-x=16;icon-y=10;left=1;scr...") --- code/__HELPERS/unsorted.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index f9c2c90dd57..c5ec1748419 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1267,6 +1267,7 @@ proc/is_hot(obj/item/W as obj) //Is this even used for anything besides balloons? Yes I took out the W:lit stuff because : really shouldnt be used. /proc/is_sharp(obj/item/W as obj) // For the record, WHAT THE HELL IS THIS METHOD OF DOING IT? + if(!W) return 0 if(W.sharp) return 1 return ( \ W.sharp || \ @@ -1374,4 +1375,4 @@ var/list/WALLITEMS = list( return 0 /proc/format_text(text) - return replacetext(replacetext(text,"\proper ",""),"\improper ","") \ No newline at end of file + return replacetext(replacetext(text,"\proper ",""),"\improper ","") From 0f538a9b2faae56f86eb630298ba0234cce92bb6 Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Mon, 24 Feb 2014 01:50:44 -0600 Subject: [PATCH 22/28] Typo fix. Screw typechecks and their need for closing parens :*( --- code/modules/reagents/Chemistry-Reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 73c500403f8..8a6f6a74f99 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -935,7 +935,7 @@ datum for(var/mob/living/carbon/slime/M in T) M.adjustToxLoss(rand(5,10)) reaction_turf(var/turf/simulated/S, var/volume) - if(istype(S) + if(istype(S)) if(volume >= 1) S.dirt = 0 From fa2061a249dd783698e963a2797ce371d5341f26 Mon Sep 17 00:00:00 2001 From: Mloc Date: Tue, 25 Feb 2014 00:11:07 +0000 Subject: [PATCH 23/28] Fix for ban queries. --- code/modules/admin/IsBanned.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index 178384f5f6c..4f0c356dc57 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -51,7 +51,7 @@ world/IsBanned(key,address,computer_id) failedcid = 0 cidquery = " OR computerid = '[computer_id]' " - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") query.Execute() From bd5585052c67e0adc9f6e905d79860d460d45ea8 Mon Sep 17 00:00:00 2001 From: Segrain Date: Tue, 25 Feb 2014 03:33:18 +0300 Subject: [PATCH 24/28] Fix for #4479. --- code/modules/reagents/Chemistry-Recipes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index c06117a08bb..63ab84432f2 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -485,7 +485,7 @@ datum name = "Potassium Chlorophoride" id = "potassium_chlorophoride" result = "potassium_chlorophoride" - required_reagents = list("potassium_chloride" = 1, "plasma" = 1, "chloral_hydrate" = 1) + required_reagents = list("potassium_chloride" = 1, "plasma" = 1, "chloralhydrate" = 1) result_amount = 4 stoxin From e098746209559582d846eac5cf24a18e75cea63f Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 25 Feb 2014 00:20:44 -0600 Subject: [PATCH 25/28] Runtime fix: RP_Revolution's auto_add_rev_head loves that null. runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 runtime error: Cannot read null.client proc name: process (/datum/game_mode/revolution/rp_revolution/process) source file: rp_revolution.dm,198 --- code/game/gamemodes/revolution/rp_revolution.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 98f97cf4600..f9a3e9f2c27 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -195,7 +195,7 @@ tried_to_add_revheads = world.time+50 var/active_revs = 0 for(var/datum/mind/rev_mind in head_revolutionaries) - if(rev_mind.current.client && rev_mind.current.client.inactivity <= 10*60*20) // 20 minutes inactivity are OK + if(rev_mind.current && rev_mind.current.client && rev_mind.current.client.inactivity <= 10*60*20) // 20 minutes inactivity are OK active_revs++ if(active_revs == 0) From ceb220f7055dea16a5253b1068467a54fa13d52d Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 25 Feb 2014 00:21:41 -0600 Subject: [PATCH 26/28] Runtime fix: OH GOD NOT THE BEEs WON'T SOMEONE CALM THEM DOWN? Other then NULL? runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 runtime error: Cannot read null.type proc name: Life (/mob/living/simple_animal/bee/Life) source file: bees.dm,91 --- code/modules/mob/living/simple_animal/bees.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/simple_animal/bees.dm b/code/modules/mob/living/simple_animal/bees.dm index e78e818eccd..1fa531070c2 100644 --- a/code/modules/mob/living/simple_animal/bees.dm +++ b/code/modules/mob/living/simple_animal/bees.dm @@ -88,9 +88,10 @@ for(var/this_type in calmers) var/mob/living/simple_animal/check_effect = locate() in src.loc - if(check_effect.type == this_type) - calming = 1 - break + if(istype(check_effect)) + if(check_effect.type == this_type) + calming = 1 + break if(calming) if(feral > 0) From 3ab7e8438a2aa07335f34be7b2913ce437d7ca2e Mon Sep 17 00:00:00 2001 From: Ccomp5950 Date: Tue, 25 Feb 2014 00:28:00 -0600 Subject: [PATCH 27/28] Runtime fix: Sparks trying to delete that which does not exist. runtime error: Cannot execute null.delete(). proc name: start (/datum/effect/effect/system/spark_spread/start) source file: effect_system.dm,204 usr: Mark Hoover (/mob/living/carbon/human) src: /datum/effect/effect/system/sp... (/datum/effect/effect/system/spark_spread) call stack: /datum/effect/effect/system/sp... (/datum/effect/effect/system/spark_spread): start() runtime error: Cannot execute null.delete(). proc name: start (/datum/effect/effect/system/spark_spread/start) source file: effect_system.dm,204 usr: Mark Hoover (/mob/living/carbon/human) src: /datum/effect/effect/system/sp... (/datum/effect/effect/system/spark_spread) call stack: /datum/effect/effect/system/sp... (/datum/effect/effect/system/spark_spread): start() --- code/game/objects/effects/effect_system.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 8d2d69a654f..09600d09ed6 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -201,7 +201,8 @@ steam.start() -- spawns the effect sleep(5) step(sparks,direction) spawn(20) - sparks.delete() + if(sparks) + sparks.delete() src.total_sparks-- From f5ab084eaccce49ea0bfc1f5c866944300063b16 Mon Sep 17 00:00:00 2001 From: Mloc-Argent Date: Tue, 25 Feb 2014 20:36:46 +0000 Subject: [PATCH 28/28] Fixes admin attack logs to show up in-game as well as in the logfiles. Signed-off-by: Mloc-Argent --- code/_onclick/item_attack.dm | 2 +- code/game/machinery/kitchen/gibber.dm | 2 +- code/game/objects/items/weapons/gift_wrappaper.dm | 2 +- code/game/objects/items/weapons/handcuffs.dm | 2 +- code/game/objects/items/weapons/stunbaton.dm | 4 ++-- code/game/objects/items/weapons/swords_axes_etc.dm | 2 +- code/modules/mob/living/carbon/human/human_attackhand.dm | 4 ++-- code/modules/mob/mob_grab.dm | 4 ++-- code/modules/reagents/reagent_containers/food/cans.dm | 2 +- code/modules/reagents/reagent_containers/food/drinks.dm | 2 +- code/modules/reagents/reagent_containers/food/snacks.dm | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 1dbaeb1a3f6..90a68b02b68 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -39,7 +39,7 @@ user.attack_log += "\[[time_stamp()]\] Attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" M.attack_log += "\[[time_stamp()]\] Attacked by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" ) + msg_admin_attack("[key_name(user)] attacked [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" ) //spawn(1800) // this wont work right // M.lastattacker = null diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index 219581d5b3d..b0861395f52 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -203,7 +203,7 @@ if(src.occupant.client) // Gibbed a cow with a client in it? log that shit src.occupant.attack_log += "\[[time_stamp()]\] Was gibbed by [user]/[user.ckey]" user.attack_log += "\[[time_stamp()]\] Gibbed [src.occupant]/[src.occupant.ckey]" - log_attack("\[[time_stamp()]\] [user]/[user.ckey] gibbed [src.occupant]/[src.occupant.ckey]") + msg_admin_attack("\[[time_stamp()]\] [key_name(user)] gibbed [key_name(src.occupant)]") src.occupant.death(1) src.occupant.ghostize() diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm index afd63497073..9e876154471 100644 --- a/code/game/objects/items/weapons/gift_wrappaper.dm +++ b/code/game/objects/items/weapons/gift_wrappaper.dm @@ -185,7 +185,7 @@ H.attack_log += text("\[[time_stamp()]\] Has been wrapped with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to wrap [H.name] ([H.ckey])") - log_attack("[user.name] ([user.ckey]) used the [src.name] to wrap [H.name] ([H.ckey])") + msg_admin_attack("[key_name(user)] used [src] to wrap [key_name(H)]") else user << "\blue You need more paper." diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 80b3403a9be..c3e5b6a88d0 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -54,7 +54,7 @@ C.attack_log += text("\[[time_stamp()]\] Has been handcuffed (attempt) by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Attempted to handcuff [C.name] ([C.ckey])") - log_attack("[user.name] ([user.ckey]) Attempted to handcuff [C.name] ([C.ckey])") + msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(C)]") var/obj/effect/equip_e/human/O = new /obj/effect/equip_e/human( ) O.source = user diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 5637f47f983..9f439b2b376 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -88,7 +88,7 @@ user.attack_log += "\[[time_stamp()]\] Stunned [H.name] ([H.ckey]) with [src.name]" H.attack_log += "\[[time_stamp()]\] Stunned by [user.name] ([user.ckey]) with [src.name]" - log_attack("[user.name] ([user.ckey]) stunned [H.name] ([H.ckey]) with [src.name]") + msg_admin_attack("[key_name(user)] stunned [key_name(H)] with [src.name]") playsound(src.loc, 'sound/weapons/Egloves.ogg', 50, 1, -1) if(charges < 1) @@ -115,7 +115,7 @@ H.visible_message("[src], thrown by [foundmob.name], strikes [H] and stuns them!") H.attack_log += "\[[time_stamp()]\] Stunned by thrown [src.name] last touched by ([src.fingerprintslast])" - log_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [H.name] ([H.ckey])" ) + msg_admin_attack("Flying [src.name], last touched by ([src.fingerprintslast]) stunned [key_name(H)]" ) /obj/item/weapon/melee/baton/emp_act(severity) switch(severity) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 7ee3499c1cd..bbfb940ec9c 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -104,7 +104,7 @@ M.Weaken(5) M.attack_log += text("\[[time_stamp()]\] Has been attacked with [src.name] by [user.name] ([user.ckey])") user.attack_log += text("\[[time_stamp()]\] Used the [src.name] to attack [M.name] ([M.ckey])") - log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name(user)] attacked [key_name(user)] with [src.name] (INTENT: [uppertext(user.a_intent)])") src.add_fingerprint(user) for(var/mob/O in viewers(M)) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index a085a88b34f..2620a20964d 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -114,7 +114,7 @@ M.attack_log += text("\[[time_stamp()]\] [M.species.attack_verb]ed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been [M.species.attack_verb]ed by [M.name] ([M.ckey])") - log_attack("[M.name] ([M.ckey]) [M.species.attack_verb]ed [src.name] ([src.ckey])") + msg_admin_attack("[key_name(M)] [M.species.attack_verb]ed [key_name(src)]") var/damage = rand(0, 5)//BS12 EDIT if(!damage) @@ -153,7 +153,7 @@ M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])") - log_attack("[M.name] ([M.ckey]) disarmed [src.name] ([src.ckey])") + msg_admin_attack("[key_name(M)] disarmed [src.name] ([src.ckey])") if(w_uniform) w_uniform.add_fingerprint(M) diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 13bf68005ee..a95f8612c1b 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -137,7 +137,7 @@ affecting.loc = assailant.loc affecting.attack_log += "\[[time_stamp()]\] Has had their neck grabbed by [assailant.name] ([assailant.ckey])" assailant.attack_log += "\[[time_stamp()]\] Grabbed the neck of [affecting.name] ([affecting.ckey])" - log_attack("[assailant.name] ([assailant.ckey]) grabbed the neck of [affecting.name] ([affecting.ckey])") + msg_admin_attack("[key_name(assailant)] grabbed the neck of [key_name(affecting)]") hud.icon_state = "disarm/kill" hud.name = "disarm/kill" else @@ -158,7 +158,7 @@ assailant.visible_message("[assailant] has tightened \his grip on [affecting]'s neck!") affecting.attack_log += "\[[time_stamp()]\] Has been strangled (kill intent) by [assailant.name] ([assailant.ckey])" assailant.attack_log += "\[[time_stamp()]\] Strangled (kill intent) [affecting.name] ([affecting.ckey])" - log_attack("[assailant.name] ([assailant.ckey]) Strangled (kill intent) [affecting.name] ([affecting.ckey])") + msg_admin_attack("[key_name(assailant)] strangled (kill intent) [key_name(affecting)]") assailant.next_move = world.time + 10 affecting.losebreath += 1 diff --git a/code/modules/reagents/reagent_containers/food/cans.dm b/code/modules/reagents/reagent_containers/food/cans.dm index 6f3b3f3901d..ec9f457b67c 100644 --- a/code/modules/reagents/reagent_containers/food/cans.dm +++ b/code/modules/reagents/reagent_containers/food/cans.dm @@ -39,7 +39,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index fe49ad0262a..837e54a6d0c 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -45,7 +45,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [M.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") + msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)]) (JMP)") if(reagents.total_volume) reagents.reaction(M, INGEST) diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 4476eb6d4f1..6142f023f2a 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -66,7 +66,7 @@ M.attack_log += text("\[[time_stamp()]\] Has been fed [src.name] by [user.name] ([user.ckey]) Reagents: [reagentlist(src)]") user.attack_log += text("\[[time_stamp()]\] Fed [src.name] by [M.name] ([M.ckey]) Reagents: [reagentlist(src)]") - log_attack("[user.name] ([user.ckey]) fed [M.name] ([M.ckey]) with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") + msg_admin_attack("[key_name(user)] fed [key_name(M)] with [src.name] Reagents: [reagentlist(src)] (INTENT: [uppertext(user.a_intent)])") for(var/mob/O in viewers(world.view, user)) O.show_message("\red [user] feeds [M] [src].", 1)