diff --git a/baystation12.dme b/baystation12.dme index 1224b024332..f8af77ffab6 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -952,6 +952,7 @@ #include "code\modules\mob\new_player\preferences.dm" #include "code\modules\mob\new_player\preferences_setup.dm" #include "code\modules\mob\new_player\savefile.dm" +#include "code\modules\mob\new_player\skill.dm" #include "code\modules\mob\new_player\sprite_accessories.dm" #include "code\modules\mob\organ\organ.dm" #include "code\modules\mob\organ\organ_external.dm" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index aa11f4bd8bd..984faa999f2 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1866,14 +1866,220 @@ /obj/admins/proc/player() if (!usr.client.holder) return - var/dat = "Player Menu" - dat += "" - //add to this if wanting to add back in IP checking - //add if you want to know their ip to the lists below + var/dat = "Player Panel" + + //javascript, the part that does most of the work~ + dat += {" + + + + + + + "} + + //body tag start + onload and onkeypress (onkeyup) javascript event calls + dat += "" + + //title + search bar + dat += {" + +
NameReal NameAssigned JobKeyOptionsInfoPMTraitor?Karma
IP:(IP: [M.lastKnownIP])
+ + + + + + +
+ Player panel
+ Hover over a line to see more information +

+

+ Search: +
+ + "} + + //player table header + dat += {" + + "} + var/list/mobs = sortmobs() + var/i = 1 var/show_karma = 0 var/DBConnection/dbcon - if(config.sql_enabled) // SQL is enabled in config.txt dbcon = new() // Setting up connection dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") @@ -1882,131 +2088,85 @@ else usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.
" - if(!show_karma) - for(var/mob/M in mobs) - if(M.ckey) - dat += "" // Adds current name - if(istype(M, /mob/living/silicon/ai)) // Adds current 'Real Name' - dat += "" - if(istype(M, /mob/living/silicon/robot)) - dat += "" - if(istype(M, /mob/living/carbon/human)) - dat += "" - if(istype(M, /mob/living/silicon/pai)) - dat += "" - if(istype(M, /mob/new_player)) - dat += "" - if(istype(M, /mob/dead/observer)) - dat += "" - if(istype(M, /mob/living/carbon/monkey)) - dat += "" - if(istype(M, /mob/living/carbon/alien)) - dat += "" - if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job. - var/mob/living/carbon/human/H = M + for(var/mob/M in mobs) + if(M.ckey) + var/color = "#e6e6e6" + if(i%2 == 0) + color = "#f2f2f2" + var/is_antagonist = is_special_character(M) - if (H.wear_id) - var/obj/item/weapon/card/id/id + var/karma = "DC" - if(istype(H.wear_id, /obj/item/device/pda)) - var/obj/item/device/pda/PDA = H.wear_id - if(!isnull(PDA.id)) // The PDA may contain no ID - id = PDA.id // The ID is contained inside the PDA - - else - id = H.wear_id // The ID was on the ID slot - - if(!id) // Happens when there's no ID in the PDA located on the wear_id slot - dat += "" - - else if(isnull(id.assignment)) // Preventing runtime errors blocking the player panel - usr << "ERROR: Inform the coders that an [id.name] was checked for its assignment variable, and it was null." - dat += "" - - else - if(M.mind.assigned_role == id.assignment) // Polymorph - dat += "" - - else - dat += "" - - else - dat += "" - - dat += {" - - - - "} - switch(is_special_character(M)) - if(0) - dat += {""} - if(1) - dat += {""} - if(2) - dat += {""} - if (config.sql_enabled) - dat += "" - else - dat += "" - - else - - for(var/mob/M in mobs) - if(M.ckey) + if(show_karma) var/DBQuery/query = dbcon.NewQuery("SELECT karma FROM karmatotals WHERE byondkey='[M.key]'") query.Execute() - var/currentkarma while(query.NextRow()) - currentkarma = query.item[1] + karma = query.item[1] - dat += "" - if(isAI(M)) - dat += "" - if(isrobot(M)) - dat += "" - if(ishuman(M)) - dat += "" - if(istype(M, /mob/living/silicon/pai)) - dat += "" - if(istype(M, /mob/new_player)) - dat += "" - if(isobserver(M)) - dat += "" - if(ismonkey(M)) - dat += "" - if(isalien(M)) - dat += "" - dat += {" - - - - "} - switch(is_special_character(M)) - if(0) - dat += {""} - if(1) - dat += {""} - if(2) - dat += {""} - if(currentkarma) - dat += "" - else - dat += "" + var/job = "" - dat += "
[M.name]AICyborg[M.real_name]pAINew PlayerGhostMonkeyAlien[M.mind.assigned_role] (No ID)ERROR[M.mind.assigned_role][M.mind.assigned_role] ([id.assignment])" - - else - dat += "[M.mind.assigned_role] (No ID)No Assigned Role[M.client?"[M.client]":"No client"]X[player_has_info(M.ckey) ? "Info" : "N/A"] PMTraitor?Traitor?Traitor?ERROR
disabled
[M.name]AICyborg[M.real_name]pAINew PlayerGhostMonkeyAlien[(M.client ? "[M.client]" : "No client")]X[player_has_info(M.ckey) ? "Info" : "N/A"] PMTraitor?Traitor?Traitor?[currentkarma]
0
" + if(isobserver(M)) + job = "Ghost" + if(isalien(M)) + job = "Alien" + if(islarva(M)) + job = "Alien larva" + if(ishuman(M)) + job = M.job + if(ismetroid(M)) + job = "Metroid" + if(ismonkey(M)) + job = "Moneky" + if(isAI(M)) + job = "AI" + if(ispAI(M)) + job = "pAI" + if(isrobot(M)) + job = "Cyborg" + if(isanimal(M)) + job = "Animal" + if(iscorgi(M)) + job = "Corgi" - usr << browse(dat, "window=players;size=905x480") + //output for each mob + dat += {" + + + + + [M.name] - [M.real_name] - [M.key] + +
+ + + + "} + + i++ + + + //player table ending + dat += {" + +
+ + + + "} + + text2file(dat, "debug.html") + usr << browse(dat, "window=players;size=600x480") /obj/admins/proc/Jobbans() - if ((src.rank in list( "Game Admin", "Game Master" ))) var/dat = "Job Bans!
" for(var/t in jobban_keylist)