From 1f293571680688553504e49f9679f033c814e47a Mon Sep 17 00:00:00 2001 From: "VivianFoxfoot@gmail.com" Date: Sun, 8 Jan 2012 03:30:25 +0000 Subject: [PATCH] Adds logging in the form of an attack log.log (now enabled by default) You can now drag PDAs onto yourself to open the screen Disables the fire damage causing husking. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2926 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/global.dm | 1 + code/defines/procs/logging.dm | 6 ++-- code/game/algorithm.dm | 13 +++++++++ code/game/objects/devices/PDA/PDA.dm | 21 ++++++++++++++ code/modules/admin/admin.dm | 29 +++++++++++++++++-- code/modules/admin/admin_verbs.dm | 2 ++ code/modules/mob/living/carbon/human/human.dm | 2 +- html/changelog.html | 6 +++- 8 files changed, 72 insertions(+), 8 deletions(-) diff --git a/code/defines/global.dm b/code/defines/global.dm index a24e19e6092..89a353973b7 100644 --- a/code/defines/global.dm +++ b/code/defines/global.dm @@ -47,6 +47,7 @@ var /////////////// diary = null + diaryofmeanpeople = null station_name = null game_version = "/tg/ Station 13" diff --git a/code/defines/procs/logging.dm b/code/defines/procs/logging.dm index cc35d8d0148..0bedd4a942b 100644 --- a/code/defines/procs/logging.dm +++ b/code/defines/procs/logging.dm @@ -33,12 +33,12 @@ /proc/log_attack(text) if (config.log_attack) - diary << "\[[time_stamp()]]ATTACK: [text]" -/* + diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]" + /proc/log_adminsay(text) if (config.log_adminchat) diary << "\[[time_stamp()]]ADMINSAY: [text]" -*/ + /proc/log_adminwarn(text) if (config.log_adminwarn) diary << "\[[time_stamp()]]ADMINWARN: [text]" diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index 652fd847fbf..86b89548718 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -10,6 +10,19 @@ Dear Diary.... "} + diaryofmeanpeople = file("data/logs/[time2text(world.realtime, "YYYY/MM-Month/DD-Day")] Attack.log") + + diaryofmeanpeople << {" + +Starting up. [time2text(world.timeofday, "hh:mm.ss")] +--------------------- +Dear Diary.... +Today, these people were mean: + +"} + + + jobban_loadbanfile() jobban_updatelegacybans() LoadBans() diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index bf3bd82327e..395408738c8 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -143,6 +143,27 @@ if (default_cartridge) cartridge = new default_cartridge(src) +/obj/item/device/pda/proc/can_use() + if(!ismob(loc)) + return 0 + var/mob/M = loc + + if(!M.canmove) + return 0 + + if((src in M.contents) || ( istype(loc, /turf) && in_range(src, M) ) ) + return 1 + else + return 0 + + +/obj/item/device/pda/MouseDrop(obj/over_object as obj, src_location, over_location) + var/mob/M = usr + world << "Test" + if((!istype(over_object, /obj/screen)) && !M.restrained() && !M.stat && can_use()) + return attack_self(M) + return + //NOTE: graphic resources are loaded on client login /obj/item/device/pda/attack_self(mob/user as mob) user.machine = src diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index a3ad1d782e0..3b8dfb28af9 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -833,7 +833,8 @@ if (href_list["BlueSpaceArtillery"]) var/mob/M = locate(href_list["BlueSpaceArtillery"]) M << "You've been hit by bluespace artillery!" - + log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") + message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") var/obj/effect/stop/S S = new /obj/effect/stop S.victim = M @@ -842,8 +843,11 @@ del(S) var/turf/T = get_turf(M) - if(T) - T.ex_act(2) + if(T && (istype(T,/turf/simulated/floor/))) + if(prob(80)) + T:break_tile_to_plating() + else + T:break_tile() if(M.health == 1) M.gib() @@ -2524,6 +2528,25 @@ onclose(usr,"server_logfile") return +/obj/admins/proc/view_atk_log() + set category = "Admin" + set desc="Shows todays server attack log in new window" + set name="Show Server Attack Log" + var/path = "data/logs/[time2text(world.realtime,"YYYY")]/[time2text(world.realtime,"MM")]-[time2text(world.realtime,"Month")]/[time2text(world.realtime,"DD")]-[time2text(world.realtime,"Day")] Attack.log" + var/output = {" + + [time2text(world.realtime,"Day, MMM DD, YYYY")] - Attack Log + + +
+						[file2text(path)]
+						
+ + "} + usr << browse(output,"window=server_logfile") + onclose(usr,"server_logfile") + return + /client/proc/unjobban_panel() set name = "Unjobban Panel" set category = "Admin" diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 967677fb0b3..72d270a441f 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -144,6 +144,7 @@ if (holder.level >= 5)//Game Admin******************************************************************** verbs += /obj/admins/proc/view_txt_log + verbs += /obj/admins/proc/view_atk_log //verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables verbs += /client/proc/cmd_admin_list_open_jobs verbs += /client/proc/cmd_admin_direct_narrate @@ -288,6 +289,7 @@ verbs -= /client/proc/object_talk verbs -= /client/proc/strike_team verbs -= /obj/admins/proc/view_txt_log + verbs -= /obj/admins/proc/view_atk_log //verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables verbs -= /client/proc/cmd_admin_list_open_jobs verbs -= /client/proc/cmd_admin_direct_narrate diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 49bc3afff8c..2bbf93bfc09 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -2203,7 +2203,7 @@ It can still be worn/put on as normal. return src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss() if(getFireLoss() > 100 && stat == DEAD) - ChangeToHusk() + // ChangeToHusk() // Commented out due to lasers and fire also husking you and making you unclonable. return diff --git a/html/changelog.html b/html/changelog.html index 6f9340e4aca..6d89da4effb 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -67,8 +67,12 @@ should be listed in the changelog upon commit tho. Thanks. -->
  • You must now repair damaged plating with a welder before placing a floor tile.
  • You can now relabel canisters if they're under 1kPa.
  • +
  • Polymorph updated: + - + 3 January 2012
    • Erro updated: