mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge branch 'master' into hook-kill-v10-final-ultimate-final
This commit is contained in:
@@ -64,6 +64,10 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
|
||||
C.holder = null
|
||||
GLOB.admins.Cut()
|
||||
|
||||
// Remove all profiler access
|
||||
for(var/A in world.GetConfig("admin"))
|
||||
world.SetConfig("APP/admin", A, null)
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
load_admin_ranks()
|
||||
|
||||
@@ -94,6 +98,9 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
|
||||
//create the admin datum and store it for later use
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
if(D.rights & R_DEBUG || D.rights & R_VIEWRUNTIMES) // Grants profiler access to anyone with R_DEBUG or R_VIEWRUNTIMES
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(GLOB.directory[ckey])
|
||||
|
||||
@@ -118,6 +125,9 @@ GLOBAL_PROTECT(admin_ranks) // this shit is being protected for obvious reasons
|
||||
if(istext(rights)) rights = text2num(rights)
|
||||
var/datum/admins/D = new /datum/admins(rank, rights, ckey)
|
||||
|
||||
if(D.rights & R_DEBUG || D.rights & R_VIEWRUNTIMES) // Grants profiler access to anyone with R_DEBUG or R_VIEWRUNTIMES
|
||||
world.SetConfig("APP/admin", ckey, "role=admin")
|
||||
|
||||
//find the client for a ckey if they are connected and associate them with the new admin datum
|
||||
D.associate(GLOB.directory[ckey])
|
||||
if(!GLOB.admin_datums)
|
||||
|
||||
@@ -247,6 +247,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
verbs += GLOB.admin_verbs_server
|
||||
if(holder.rights & R_DEBUG)
|
||||
verbs += GLOB.admin_verbs_debug
|
||||
spawn(1)
|
||||
control_freak = 0 // Setting control_freak to 0 allows you to use the Profiler and other client-side tools
|
||||
if(holder.rights & R_POSSESS)
|
||||
verbs += GLOB.admin_verbs_possess
|
||||
if(holder.rights & R_PERMISSIONS)
|
||||
@@ -267,6 +269,9 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
verbs += GLOB.admin_verbs_proccall
|
||||
if(holder.rights & R_VIEWRUNTIMES)
|
||||
verbs += /client/proc/view_runtimes
|
||||
spawn(1) // This setting exposes the profiler for people with R_VIEWRUNTIMES. They must still have it set in cfg/admin.txt
|
||||
control_freak = 0
|
||||
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
verbs.Remove(
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
/datum/admins/proc/player_panel_new()//The new one
|
||||
if(!usr.client.holder)
|
||||
return
|
||||
// This stops the panel from being invoked by mentors who press F7.
|
||||
if(!check_rights(R_ADMIN))
|
||||
message_admins("[key_name_admin(usr)] attempted to invoke player panel without admin rights. If this is a mentor, its a chance they accidentally hit F7. If this is NOT a mentor, there is a high chance an exploit is being used")
|
||||
return
|
||||
var/dat = "<html><head><title>Admin Player Panel</title></head>"
|
||||
|
||||
//javascript, the part that does most of the work~
|
||||
@@ -486,6 +490,9 @@
|
||||
if(SSticker.mode.wizards.len)
|
||||
dat += check_role_table("Wizards", SSticker.mode.wizards)
|
||||
|
||||
if(SSticker.mode.apprentices.len)
|
||||
dat += check_role_table("Apprentices", SSticker.mode.apprentices)
|
||||
|
||||
if(SSticker.mode.raiders.len)
|
||||
dat += check_role_table("Raiders", SSticker.mode.raiders)
|
||||
|
||||
|
||||
@@ -1980,7 +1980,7 @@
|
||||
to_chat(usr, "<span class='warning'>ERROR: This mob ([H]) has no mind!</span>")
|
||||
return
|
||||
var/list/possible_traitors = list()
|
||||
for(var/mob/living/player in GLOB.living_mob_list)
|
||||
for(var/mob/living/player in GLOB.alive_mob_list)
|
||||
if(player.client && player.mind && player.stat != DEAD && player != H)
|
||||
if(ishuman(player) && !player.mind.special_role)
|
||||
if(player.client && (ROLE_TRAITOR in player.client.prefs.be_special) && !jobban_isbanned(player, ROLE_TRAITOR) && !jobban_isbanned(player, "Syndicate"))
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
else if(expression[start + 1] == "\[" && islist(v))
|
||||
var/list/L = v
|
||||
var/index = SDQL_expression(source, expression[start + 2])
|
||||
if(isnum(index) && (!IsInteger(index) || L.len < index))
|
||||
if(isnum(index) && (!ISINTEGER(index) || L.len < index))
|
||||
to_chat(world, "<span class='danger'>Invalid list index: [index]</span>")
|
||||
return null
|
||||
return L[index]
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
/client/proc/atmosscan()
|
||||
set category = "Mapping"
|
||||
set name = "Check Piping"
|
||||
set background = 1
|
||||
if(!src.holder)
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
return
|
||||
@@ -12,17 +11,18 @@
|
||||
|
||||
to_chat(usr, "Checking for disconnected pipes...")
|
||||
//all plumbing - yes, some things might get stated twice, doesn't matter.
|
||||
for(var/obj/machinery/atmospherics/plumbing in world)
|
||||
for(var/thing in SSair.atmos_machinery)
|
||||
var/obj/machinery/atmospherics/plumbing = thing
|
||||
if(plumbing.nodealert)
|
||||
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
|
||||
|
||||
//Manifolds
|
||||
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
|
||||
for(var/obj/machinery/atmospherics/pipe/manifold/pipe in SSair.atmos_machinery)
|
||||
if(!pipe.node1 || !pipe.node2 || !pipe.node3)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
//Pipes
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/pipe in world)
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/pipe in SSair.atmos_machinery)
|
||||
if(!pipe.node1 || !pipe.node2)
|
||||
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
|
||||
|
||||
|
||||
@@ -487,7 +487,8 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
for(var/area/A in world)
|
||||
areas_all |= A.type
|
||||
|
||||
for(var/obj/machinery/power/apc/APC in world)
|
||||
for(var/thing in GLOB.apcs)
|
||||
var/obj/machinery/power/apc/APC = thing
|
||||
var/area/A = get_area(APC)
|
||||
if(!A)
|
||||
continue
|
||||
@@ -496,7 +497,8 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
else
|
||||
areas_with_multiple_APCs |= A.type
|
||||
|
||||
for(var/obj/machinery/alarm/alarm in world)
|
||||
for(var/thing in GLOB.air_alarms)
|
||||
var/obj/machinery/alarm/alarm = thing
|
||||
var/area/A = get_area(alarm)
|
||||
if(!A)
|
||||
continue
|
||||
@@ -505,31 +507,31 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
else
|
||||
areas_with_multiple_air_alarms |= A.type
|
||||
|
||||
for(var/obj/machinery/requests_console/RC in world)
|
||||
for(var/obj/machinery/requests_console/RC in GLOB.machines)
|
||||
var/area/A = get_area(RC)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_RC |= A.type
|
||||
|
||||
for(var/obj/machinery/light/L in world)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
var/area/A = get_area(L)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_light |= A.type
|
||||
|
||||
for(var/obj/machinery/light_switch/LS in world)
|
||||
for(var/obj/machinery/light_switch/LS in GLOB.machines)
|
||||
var/area/A = get_area(LS)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_LS |= A.type
|
||||
|
||||
for(var/obj/item/radio/intercom/I in world)
|
||||
for(var/obj/item/radio/intercom/I in GLOB.global_radios)
|
||||
var/area/A = get_area(I)
|
||||
if(!A)
|
||||
continue
|
||||
areas_with_intercom |= A.type
|
||||
|
||||
for(var/obj/machinery/camera/C in world)
|
||||
for(var/obj/machinery/camera/C in GLOB.machines)
|
||||
var/area/A = get_area(C)
|
||||
if(!A)
|
||||
continue
|
||||
@@ -716,23 +718,25 @@ GLOBAL_PROTECT(AdminProcCaller)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
|
||||
switch(input("Which list?") in list("Players", "Admins", "Mobs", "Living Mobs", "Alive Mobs", "Dead Mobs", "Silicons", "Clients", "Respawnable Mobs"))
|
||||
if("Players")
|
||||
to_chat(usr, jointext(GLOB.player_list,","))
|
||||
to_chat(usr, jointext(GLOB.player_list, ","))
|
||||
if("Admins")
|
||||
to_chat(usr, jointext(GLOB.admins,","))
|
||||
to_chat(usr, jointext(GLOB.admins, ","))
|
||||
if("Mobs")
|
||||
to_chat(usr, jointext(GLOB.mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.mob_list, ","))
|
||||
if("Living Mobs")
|
||||
to_chat(usr, jointext(GLOB.living_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.mob_living_list, ","))
|
||||
if("Alive Mobs")
|
||||
to_chat(usr, jointext(GLOB.alive_mob_list, ","))
|
||||
if("Dead Mobs")
|
||||
to_chat(usr, jointext(GLOB.dead_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.dead_mob_list, ","))
|
||||
if("Silicons")
|
||||
to_chat(usr, jointext(GLOB.silicon_mob_list,","))
|
||||
to_chat(usr, jointext(GLOB.silicon_mob_list, ","))
|
||||
if("Clients")
|
||||
to_chat(usr, jointext(GLOB.clients,","))
|
||||
to_chat(usr, jointext(GLOB.clients, ","))
|
||||
if("Respawnable Mobs")
|
||||
to_chat(usr, jointext(GLOB.respawnable_list,","))
|
||||
to_chat(usr, jointext(GLOB.respawnable_list, ","))
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
set category = "Debug"
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
to_chat(usr, "<span class='notice'>@[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("<span class='warning'>BURNING</span>"):(null)]</span>")
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
to_chat(usr, "[trace_gas.type]: [trace_gas.moles]")
|
||||
to_chat(usr, "<span class='notice'>@[target.x],[target.y]: O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] N2O: [GM.sleeping_agent] Agent B: [GM.agent_b] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("<span class='warning'>BURNING</span>"):(null)]</span>")
|
||||
|
||||
message_admins("[key_name_admin(usr)] has checked the air status of [target]")
|
||||
log_admin("[key_name(usr)] has checked the air status of [target]")
|
||||
|
||||
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_honksquad, 0)
|
||||
commandos += candidate//Add their ghost to commandos.
|
||||
|
||||
//Spawns HONKsquad and equips them.
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(honksquad_number<=0) break
|
||||
if(L.name == "HONKsquad")
|
||||
honk_leader_selected = honksquad_number == 1?1:0
|
||||
|
||||
@@ -66,7 +66,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
|
||||
var/list/sit_spawns = list()
|
||||
var/list/sit_spawns_leader = list()
|
||||
var/list/sit_spawns_mgmt = list()
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name == "Syndicate-Infiltrator")
|
||||
sit_spawns += L
|
||||
if(L.name == "Syndicate-Infiltrator-Leader")
|
||||
|
||||
@@ -118,7 +118,7 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
qdel(M)
|
||||
|
||||
if(GLOB.intercom_range_display_status)
|
||||
for(var/obj/item/radio/intercom/I in world)
|
||||
for(var/obj/item/radio/intercom/I in GLOB.global_radios)
|
||||
for(var/turf/T in orange(7,I))
|
||||
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
|
||||
if(!(F in view(7,I.loc)))
|
||||
|
||||
@@ -627,6 +627,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
|
||||
if(!O.vv_edit_var(variable, var_new))
|
||||
to_chat(src, "Your edit was rejected by the object.")
|
||||
return
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_VAR_EDIT, args)
|
||||
log_world("### VarEdit by [src]: [O.type] [variable]=[html_encode("[var_new]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [var_new]")
|
||||
var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] to [var_new]"
|
||||
|
||||
@@ -267,7 +267,7 @@ client/proc/one_click_antag()
|
||||
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
|
||||
synd_mind.current.client.images += I
|
||||
|
||||
for(var/obj/machinery/nuclearbomb/bomb in world)
|
||||
for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
|
||||
bomb.r_code = nuke_code // All the nukes are set to this code.
|
||||
return 1
|
||||
|
||||
@@ -455,7 +455,8 @@ client/proc/one_click_antag()
|
||||
if(candidates.len)
|
||||
var/raiders = min(antnum, candidates.len)
|
||||
//Spawns vox raiders and equips them.
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name == "voxstart")
|
||||
if(raiders<=0)
|
||||
break
|
||||
@@ -583,7 +584,8 @@ client/proc/one_click_antag()
|
||||
var/teamOneMembers = 5
|
||||
var/teamTwoMembers = 5
|
||||
var/datum/preferences/A = new()
|
||||
for(var/obj/effect/landmark/L in world)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name == "tdome1")
|
||||
if(teamOneMembers<=0)
|
||||
break
|
||||
|
||||
@@ -979,7 +979,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/role_string
|
||||
var/obj_count = 0
|
||||
var/obj_string = ""
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(!isLivingSSD(H))
|
||||
continue
|
||||
mins_ssd = round((world.time - H.last_logout) / 600)
|
||||
@@ -1016,7 +1016,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
msg += "AFK Players:<BR><TABLE border='1'>"
|
||||
msg += "<TR><TD><B>Key</B></TD><TD><B>Real Name</B></TD><TD><B>Job</B></TD><TD><B>Mins AFK</B></TD><TD><B>Special Role</B></TD><TD><B>Area</B></TD><TD><B>PPN</B></TD><TD><B>Cryo</B></TD></TR>"
|
||||
var/mins_afk
|
||||
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.alive_mob_list)
|
||||
if(H.client == null || H.stat == DEAD) // No clientless or dead
|
||||
continue
|
||||
mins_afk = round(H.client.inactivity / 600)
|
||||
|
||||
@@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
// Find the nuclear auth code
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in world)
|
||||
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
var/commando_number = COMMANDOS_POSSIBLE //for selecting a leader
|
||||
var/is_leader = TRUE // set to FALSE after leader is spawned
|
||||
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
|
||||
if(commando_number <= 0)
|
||||
break
|
||||
@@ -109,7 +110,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
commando_number--
|
||||
|
||||
//Spawns the rest of the commando gear.
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name == "Commando_Manual")
|
||||
//new /obj/item/gun/energy/pulse_rifle(L.loc)
|
||||
var/obj/item/paper/P = new(L.loc)
|
||||
@@ -120,7 +122,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
|
||||
P.stamp(stamp)
|
||||
qdel(stamp)
|
||||
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(L.name == "Commando-Bomb")
|
||||
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
|
||||
qdel(L)
|
||||
|
||||
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
// Find the nuclear auth code
|
||||
var/nuke_code
|
||||
var/temp_code
|
||||
for(var/obj/machinery/nuclearbomb/N in world)
|
||||
for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
|
||||
temp_code = text2num(N.r_code)
|
||||
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
|
||||
nuke_code = N.r_code
|
||||
@@ -53,7 +53,8 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
GLOB.sent_syndicate_strike_team = 1
|
||||
|
||||
//Spawns commandos and equips them.
|
||||
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
|
||||
if(syndicate_commando_number <= 0)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user