diff --git a/baystation12.dme b/baystation12.dme index 2716d92af4..2f27193548 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -369,6 +369,7 @@ #include "code\defines\turf.dm" #include "code\defines\world.dm" #include "code\defines\area\Space Station 13 areas.dm" +#include "code\defines\obj\costume.dm" #include "code\defines\obj\hydro.dm" #include "code\defines\obj\machinery.dm" #include "code\defines\obj\storage.dm" @@ -502,6 +503,7 @@ #include "code\game\machinery\autolathe.dm" #include "code\game\machinery\Beacon.dm" #include "code\game\machinery\biogenerator.dm" +#include "code\game\machinery\camera_circuit.dm" #include "code\game\machinery\cell_charger.dm" #include "code\game\machinery\cloning.dm" #include "code\game\machinery\constructable_frame.dm" @@ -511,6 +513,7 @@ #include "code\game\machinery\door_control.dm" #include "code\game\machinery\doppler_array.dm" #include "code\game\machinery\flasher.dm" +#include "code\game\machinery\floodlight.dm" #include "code\game\machinery\Freezer.dm" #include "code\game\machinery\gateway.dm" #include "code\game\machinery\hologram.dm" @@ -527,6 +530,7 @@ #include "code\game\machinery\portable_turret.dm" #include "code\game\machinery\recharger.dm" #include "code\game\machinery\rechargestation.dm" +#include "code\game\machinery\records_scanner.dm" #include "code\game\machinery\requests_console.dm" #include "code\game\machinery\robot_fabricator.dm" #include "code\game\machinery\seed_extractor.dm" @@ -539,6 +543,7 @@ #include "code\game\machinery\teleporter.dm" #include "code\game\machinery\turrets.dm" #include "code\game\machinery\vending.dm" +#include "code\game\machinery\walllockers.dm" #include "code\game\machinery\washing_machine.dm" #include "code\game\machinery\atmoalter\area_atmos_computer.dm" #include "code\game\machinery\atmoalter\canister.dm" @@ -824,6 +829,7 @@ #include "code\game\objects\structures\stool_bed_chair_nest\bed.dm" #include "code\game\objects\structures\stool_bed_chair_nest\chairs.dm" #include "code\game\objects\structures\stool_bed_chair_nest\stools.dm" +#include "code\game\player\admin_report.dm" #include "code\game\turfs\turf.dm" #include "code\game\turfs\simulated\beach.dm" #include "code\game\turfs\unsimulated\beach.dm" diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index 12f9f97a1c..60928154ef 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -377,6 +377,34 @@ Turf and target are seperate in case you want to teleport some distance from a t select = input("AI signals detected:", "AI selection") in ais return ais[select] +/proc/get_sorted_mobs() + var/list/old_list = getmobs() + var/list/AI_list = list() + var/list/Dead_list = list() + var/list/keyclient_list = list() + var/list/key_list = list() + var/list/logged_list = list() + for(var/named in old_list) + var/mob/M = old_list[named] + if(issilicon(M)) + AI_list |= M + else if(isobserver(M) || M.stat == 2) + Dead_list |= M + else if(M.key && M.client) + keyclient_list |= M + else if(M.key) + key_list |= M + else + logged_list |= M + old_list.Remove(named) + var/list/new_list = list() + new_list += AI_list + new_list += keyclient_list + new_list += key_list + new_list += logged_list + new_list += Dead_list + return new_list + //Returns a list of all mobs with their name /proc/getmobs() diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index f07e80d20c..86a002b51c 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -35,6 +35,23 @@ admins[m_key] = a_lev diary << ("ADMIN: [m_key] = [a_lev]") + // look for moderators in a separate file + text = file2text("config/moderators.txt") + if (!text) + diary << "Failed to load config/moderators.txt\n" + else + var/list/lines = dd_text2list(text, "\n") + for(var/line in lines) + if (!line) + continue + + if (copytext(line, 1, 2) == ";") + continue + + var/m_key = copytext(line, 1, length(line)+1) + var/a_lev = "Moderator" + admins[m_key] = a_lev + /world/proc/load_testers() var/text = file2text("config/testers.txt") if (!text) diff --git a/code/game/machinery/camera_circuit.dm b/code/game/machinery/camera_circuit.dm index e3fdfd05cd..3114f537e3 100644 --- a/code/game/machinery/camera_circuit.dm +++ b/code/game/machinery/camera_circuit.dm @@ -11,12 +11,12 @@ //when adding a new camera network, you should only need to update these two procs New() - possibleNets["Engineering"] = ACCESS_CE - possibleNets["SS13"] = ACCESS_HOS - possibleNets["Mining"] = ACCESS_MINING - possibleNets["Cargo"] = ACCESS_QM - possibleNets["Research"] = ACCESS_RD - possibleNets["Medbay"] = ACCESS_CMO + possibleNets["Engineering"] = access_ce + possibleNets["SS13"] = access_hos + possibleNets["Mining"] = access_mining + possibleNets["Cargo"] = access_qm + possibleNets["Research"] = access_rd + possibleNets["Medbay"] = access_cmo proc/updateBuildPath() build_path = "" @@ -102,7 +102,7 @@ var/obj/item/device/pda/pda = I I = pda.id if (I && istype(I)) - if(ACCESS_CAPTAIN in I.access) + if(access_captain in I.access) authorised = 1 else if (possibleNets[network] in I.access) authorised = 1 diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 08e13e535c..1e5740ed8e 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -1,3 +1,5 @@ +//these are probably broken + /obj/machinery/floodlight name = "Emergency Floodlight" icon = 'floodlight.dmi' @@ -16,17 +18,17 @@ if (!on) if (luminosity) updateicon() - sd_SetLuminosity(0) + //sd_SetLuminosity(0) return if(!luminosity && cell && cell.charge > 0) - sd_SetLuminosity(10) + //sd_SetLuminosity(10) updateicon() if(!cell && luminosity) on = 0 updateicon() - sd_SetLuminosity(0) + //sd_SetLuminosity(0) return cell.charge -= use @@ -34,7 +36,7 @@ if(cell.charge <= 0 && luminosity) on = 0 updateicon() - sd_SetLuminosity(0) + //sd_SetLuminosity(0) return /obj/machinery/floodlight/attack_hand(mob/user as mob) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 984e8418a6..a8d42da9ae 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -44,9 +44,13 @@ for (var/client/C) if(C.listen_ooc) - if (src.client.holder && (!src.client.stealth || C.holder)) + if (src.client.holder && (!src.client.stealth || (C.holder && C.holder.level > 0))) if (src.client.holder.rank == "Admin Observer") C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " + else if (src.client.holder.rank == "Retired Admin") + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " + else if (src.client.holder.rank == "Moderator") + C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " else if (src.client.holder.level >= 5) C << "OOC: [src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]: " else diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 1f38cdadc9..043a1c794e 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -15,6 +15,13 @@ var/global/BSACooldown = 0 msg = dd_replacetext(msg, "%holder_ref%", "\ref[C.holder]") C << msg +/obj/admins/proc/player_has_info(var/key as text) + var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav") + var/list/infos + info >> infos + if(!infos || !infos.len) return 0 + else return 1 + /proc/msg_admin_attack(var/text) //Toggleable Attack Messages var/rendered = "ADMIN LOG: " log_adminwarn(rendered) @@ -2259,6 +2266,15 @@ var/global/BSACooldown = 0 return //hahaha + if(href_list["vsc"]) + if ((src.rank in list( "Moderator", "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" ))) + if(href_list["vsc"] == "airflow") + vsc.ChangeSettingsDialog(usr,vsc.settings) + if(href_list["vsc"] == "plasma") + vsc.ChangeSettingsDialog(usr,vsc.plc.settings) + if(href_list["vsc"] == "default") + vsc.SetDefault(usr) + if(href_list["ac_view_wanted"]) //Admin newscaster Topic() stuff be here src.admincaster_screen = 18 //The ac_ prefix before the hrefs stands for AdminCaster. diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 3393c4138f..b061b660d4 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -106,10 +106,27 @@ verbs += /client/proc/cmd_admin_say verbs += /client/proc/cmd_admin_gib_self verbs += /client/proc/deadmin_self + else if (holder.level == -3) // Retired Admin + verbs += /client/proc/cmd_admin_say + verbs += /client/proc/cmd_mod_say + return else return //Moderator if (holder.level >= 0) + if (holder.level == 0) + verbs -= /client/proc/cmd_admin_say + verbs -= /client/proc/investigate_show + verbs -= /client/proc/cmd_admin_gib_self + verbs += /client/proc/mod_panel + verbs += /client/proc/admin_play + verbs += /client/proc/admin_observe + verbs += /client/proc/cmd_mod_say + else return + + //Temporary Admin + if (holder.level >= 1) + //--former tg mod commands, moved up a level verbs += /obj/admins/proc/announce verbs += /obj/admins/proc/startnow verbs += /obj/admins/proc/toggleAI //Toggle the AI @@ -128,8 +145,6 @@ verbs += /client/proc/cmd_admin_subtle_message //verbs += /client/proc/warn - was never used verbs += /client/proc/dsay - verbs += /client/proc/admin_play - verbs += /client/proc/admin_observe verbs += /client/proc/game_panel verbs += /client/proc/player_panel verbs += /client/proc/player_panel_new @@ -144,10 +159,8 @@ verbs += /client/proc/check_ai_laws //verbs += /client/proc/cmd_admin_prison --Merged with player panel //verbs += /obj/admins/proc/unprison --Merged with player panel - else return + //--end tg mod commands - //Temporary Admin - if (holder.level >= 1) verbs += /obj/admins/proc/delay //game start delay verbs += /obj/admins/proc/immreboot //immediate reboot verbs += /obj/admins/proc/restart //restart @@ -507,6 +520,14 @@ feedback_add_details("admin_verb","PPN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return +/client/proc/mod_panel() + set name = "Moderator Panel" + set category = "Admin" + if(holder) + holder.mod_panel() +// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + return + /client/proc/check_antagonists() set name = "Check Antagonists" set category = "Admin" diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index e3120af2b1..1d5778ae82 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -493,3 +493,112 @@ usr << browse(dat, "window=roundstatus;size=400x500") else alert("The game hasn't started yet!") + + +/obj/admins/proc/mod_panel()//The new one + if (!usr.client.holder) + return + var/dat = "
| Name/Real Name | IP/CID | Info | Options | Traitor? | IP: | to this if wanting to add back in IP checkingType | Assigned Job | Traitor? | + //add(IP: [M.lastKnownIP]) | if you want to know their ip to the lists below + var/list/mobs = get_sorted_mobs() + var/i = 1 + + for(var/mob/M in mobs) + if(M.ckey) + var/color = "#e6e6e6" + i++ + if(i%2 == 0) + color = "#f2f2f2" + //no idea what tg used to replace original_name, probably a proc floating around somewhere + //var/real = (M.real_name == M.original_name ? "[M.name]/[M.real_name]" : "[M.original_name] (as [M.name]/[M.real_name])") + var/real = "[M.name]/[M.real_name]" + var/turf/T = get_turf(M) + var/client_key = (M.key? M.key : "No key") + dat += "||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| [real] [M.client ? M.client : "No client ([client_key])"] at ([T.x], [T.y], [T.z]) | " // Adds current name
+/* if(isobserver(M))
+ dat += "Ghost | " + else if(isalien(M)) + dat += "Alien | " + else if(islarva(M)) + dat += "Alien larva | " + else if(istajaran(M)) + dat += "Tajaran | " + else if(ishuman(M)) + dat += "[M.job] | " + else if(ismetroid(M)) + dat += "Metroid | " + else if(ismonkey(M)) + dat += "Monkey | " + else if(isAI(M)) + dat += "AI | " + else if(ispAI(M)) + dat += "pAI | " + else if(isrobot(M)) + dat += "Cyborg | " + else if(isanimal(M)) + dat += "Animal | " + else if(iscorgi(M)) + dat += "Corgi | " + else if(istype(M,/mob/new_player)) + dat += "New Player | " + else + dat += "\red ERROR | \black" + + 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 + + if (H.wear_id) + var/obj/item/weapon/card/id/id + + 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 += "[M.mind.assigned_role] (No ID) | " + + else if(isnull(id.assignment)) // Preventing runtime errors blocking the player panel + if(istype(id, /obj/item/weapon/card/id/syndicate)) + dat += "Antagonist | " + else + usr << "ERROR: Inform the coders that an [id.name] was checked for its assignment variable, and it was null." + dat += "ERROR | " + + else + if(M.mind.assigned_role == id.assignment) // Polymorph + dat += "[M.mind.assigned_role] | " + + else + dat += "[M.mind.assigned_role] ([id.assignment])" + + else + dat += " | [M.mind.assigned_role] (No ID) | " + + else + dat += "No Assigned Role | " +*/ + dat += {"IP: [M.client ? M.client.address : "Disconnected"] + CID: [M.client ? M.client.computer_id : "Disconnected"] |
+ "}
+
+ dat += {"[player_has_info(M.ckey) ? "Info" : "N/A"] | +PM | + "} + + switch(is_special_character(M)) + if(0) + dat += {"Loyal | "} + if(1) + dat += {"Antag | "} + if(2) + dat += {"Mode-Antag | "} + + dat += "