fixes compiling under 511

This commit is contained in:
MrStonedOne
2016-07-13 14:09:37 -07:00
parent 523a2b29fe
commit 80044c3380
3 changed files with 279 additions and 279 deletions

View File

@@ -299,7 +299,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/count_objects_all, /client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, /client/proc/cmd_assume_direct_control,
/client/proc/startSinglo, /client/proc/startSinglo,
/client/proc/fps, /client/proc/set_server_fps,
/client/proc/cmd_admin_grantfullaccess, /client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest, /client/proc/cmd_admin_areatest,
/client/proc/readmin /client/proc/readmin

View File

@@ -1,24 +1,24 @@
//replaces the old Ticklag verb, fps is easier to understand //replaces the old Ticklag verb, fps is easier to understand
/client/proc/fps() /client/proc/set_server_fps()
set category = "Debug" set category = "Debug"
set name = "Set fps" set name = "Set server fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game" set desc = "Sets game speed in frames-per-second. Can potentially break the game"
if(!check_rights(R_DEBUG)) if(!check_rights(R_DEBUG))
return return
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null) var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
if(fps <= 0) if(fps <= 0)
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>" src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
return return
if(fps > config.fps) if(fps > config.fps)
if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm") if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
return return
var/msg = "[key_name(src)] has modified world.fps to [fps]" var/msg = "[key_name(src)] has modified world.fps to [fps]"
log_admin(msg, 0) log_admin(msg, 0)
message_admins(msg, 0) message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.fps = fps world.fps = fps

View File

@@ -1,255 +1,255 @@
//- Are all the floors with or without air, as they should be? (regular or airless) //- Are all the floors with or without air, as they should be? (regular or airless)
//- Does the area have an APC? //- Does the area have an APC?
//- Does the area have an Air Alarm? //- Does the area have an Air Alarm?
//- Does the area have a Request Console? //- Does the area have a Request Console?
//- Does the area have lights? //- Does the area have lights?
//- Does the area have a light switch? //- Does the area have a light switch?
//- Does the area have enough intercoms? //- Does the area have enough intercoms?
//- Does the area have enough security cameras? (Use the 'Camera Range Display' verb under Debug) //- Does the area have enough security cameras? (Use the 'Camera Range Display' verb under Debug)
//- Is the area connected to the scrubbers air loop? //- Is the area connected to the scrubbers air loop?
//- Is the area connected to the vent air loop? (vent pumps) //- Is the area connected to the vent air loop? (vent pumps)
//- Is everything wired properly? //- Is everything wired properly?
//- Does the area have a fire alarm and firedoors? //- Does the area have a fire alarm and firedoors?
//- Do all pod doors work properly? //- Do all pod doors work properly?
//- Are accesses set properly on doors, pod buttons, etc. //- Are accesses set properly on doors, pod buttons, etc.
//- Are all items placed properly? (not below vents, scrubbers, tables) //- Are all items placed properly? (not below vents, scrubbers, tables)
//- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room? //- Does the disposal system work properly from all the disposal units in this room and all the units, the pipes of which pass through this room?
//- Check for any misplaced or stacked piece of pipe (air and disposal) //- Check for any misplaced or stacked piece of pipe (air and disposal)
//- Check for any misplaced or stacked piece of wire //- Check for any misplaced or stacked piece of wire
//- Identify how hard it is to break into the area and where the weak points are //- Identify how hard it is to break into the area and where the weak points are
//- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels. //- Check if the area has too much empty space. If so, make it smaller and replace the rest with maintenance tunnels.
var/intercom_range_display_status = 0 var/intercom_range_display_status = 0
var/list/admin_verbs_debug_mapping = list( var/list/admin_verbs_debug_mapping = list(
/client/proc/do_not_use_these, //-errorage /client/proc/do_not_use_these, //-errorage
/client/proc/camera_view, //-errorage /client/proc/camera_view, //-errorage
/client/proc/sec_camera_report, //-errorage /client/proc/sec_camera_report, //-errorage
/client/proc/intercom_view, //-errorage /client/proc/intercom_view, //-errorage
/client/proc/air_status, //Air things /client/proc/air_status, //Air things
/client/proc/Cell, //More air things /client/proc/Cell, //More air things
/client/proc/atmosscan, //check plumbing /client/proc/atmosscan, //check plumbing
/client/proc/powerdebug, //check power /client/proc/powerdebug, //check power
/client/proc/count_objects_on_z_level, /client/proc/count_objects_on_z_level,
/client/proc/count_objects_all, /client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage /client/proc/cmd_assume_direct_control, //-errorage
/client/proc/startSinglo, /client/proc/startSinglo,
/client/proc/fps, //allows you to set the ticklag. /client/proc/set_server_fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess, /client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest, /client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_rejuvenate, /client/proc/cmd_admin_rejuvenate,
/datum/admins/proc/show_traitor_panel, /datum/admins/proc/show_traitor_panel,
/client/proc/disable_communication, /client/proc/disable_communication,
/client/proc/print_pointers, /client/proc/print_pointers,
/client/proc/cmd_show_at_list, /client/proc/cmd_show_at_list,
/client/proc/cmd_show_at_list, /client/proc/cmd_show_at_list,
/client/proc/manipulate_organs /client/proc/manipulate_organs
) )
/obj/effect/debugging/marker /obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi' icon = 'icons/turf/areas.dmi'
icon_state = "yellow" icon_state = "yellow"
/obj/effect/debugging/marker/Move() /obj/effect/debugging/marker/Move()
return 0 return 0
/client/proc/do_not_use_these() /client/proc/do_not_use_these()
set category = "Mapping" set category = "Mapping"
set name = "-None of these are for ingame use!!" set name = "-None of these are for ingame use!!"
..() ..()
/client/proc/camera_view() /client/proc/camera_view()
set category = "Mapping" set category = "Mapping"
set name = "Camera Range Display" set name = "Camera Range Display"
var/on = 0 var/on = 0
for(var/turf/T in world) for(var/turf/T in world)
if(T.maptext) if(T.maptext)
on = 1 on = 1
T.maptext = null T.maptext = null
if(!on) if(!on)
var/list/seen = list() var/list/seen = list()
for(var/obj/machinery/camera/C in cameranet.cameras) for(var/obj/machinery/camera/C in cameranet.cameras)
for(var/turf/T in C.can_see()) for(var/turf/T in C.can_see())
seen[T]++ seen[T]++
for(var/turf/T in seen) for(var/turf/T in seen)
T.maptext = "[seen[T]]" T.maptext = "[seen[T]]"
feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mCRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/sec_camera_report() /client/proc/sec_camera_report()
set category = "Mapping" set category = "Mapping"
set name = "Camera Report" set name = "Camera Report"
if(!Master) if(!Master)
alert(usr,"Master_controller not found.","Sec Camera Report") alert(usr,"Master_controller not found.","Sec Camera Report")
return 0 return 0
var/list/obj/machinery/camera/CL = list() var/list/obj/machinery/camera/CL = list()
for(var/obj/machinery/camera/C in cameranet.cameras) for(var/obj/machinery/camera/C in cameranet.cameras)
CL += C CL += C
var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR> var/output = {"<B>CAMERA ANNOMALITIES REPORT</B><HR>
<B>The following annomalities have been detected. The ones in red need immediate attention: Some of those in black may be intentional.</B><BR><ul>"} <B>The following annomalities have been detected. The ones in red need immediate attention: Some of those in black may be intentional.</B><BR><ul>"}
for(var/obj/machinery/camera/C1 in CL) for(var/obj/machinery/camera/C1 in CL)
for(var/obj/machinery/camera/C2 in CL) for(var/obj/machinery/camera/C2 in CL)
if(C1 != C2) if(C1 != C2)
if(C1.c_tag == C2.c_tag) if(C1.c_tag == C2.c_tag)
output += "<li><font color='red'>c_tag match for sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) and \[[C2.x], [C2.y], [C2.z]\] ([C2.loc.loc]) - c_tag is [C1.c_tag]</font></li>" output += "<li><font color='red'>c_tag match for sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) and \[[C2.x], [C2.y], [C2.z]\] ([C2.loc.loc]) - c_tag is [C1.c_tag]</font></li>"
if(C1.loc == C2.loc && C1.dir == C2.dir && C1.pixel_x == C2.pixel_x && C1.pixel_y == C2.pixel_y) if(C1.loc == C2.loc && C1.dir == C2.dir && C1.pixel_x == C2.pixel_x && C1.pixel_y == C2.pixel_y)
output += "<li><font color='red'>FULLY overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>" output += "<li><font color='red'>FULLY overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
if(C1.loc == C2.loc) if(C1.loc == C2.loc)
output += "<li>overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>" output += "<li>overlapping sec. cameras at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Networks: [C1.network] and [C2.network]</font></li>"
var/turf/T = get_step(C1,turn(C1.dir,180)) var/turf/T = get_step(C1,turn(C1.dir,180))
if(!T || !isturf(T) || !T.density ) if(!T || !isturf(T) || !T.density )
if(!(locate(/obj/structure/grille,T))) if(!(locate(/obj/structure/grille,T)))
var/window_check = 0 var/window_check = 0
for(var/obj/structure/window/W in T) for(var/obj/structure/window/W in T)
if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) ) if (W.dir == turn(C1.dir,180) || W.dir in list(5,6,9,10) )
window_check = 1 window_check = 1
break break
if(!window_check) if(!window_check)
output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>" output += "<li><font color='red'>Camera not connected to wall at \[[C1.x], [C1.y], [C1.z]\] ([C1.loc.loc]) Network: [C1.network]</color></li>"
output += "</ul>" output += "</ul>"
usr << browse(output,"window=airreport;size=1000x500") usr << browse(output,"window=airreport;size=1000x500")
feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mCRP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/intercom_view() /client/proc/intercom_view()
set category = "Mapping" set category = "Mapping"
set name = "Intercom Range Display" set name = "Intercom Range Display"
if(intercom_range_display_status) if(intercom_range_display_status)
intercom_range_display_status = 0 intercom_range_display_status = 0
else else
intercom_range_display_status = 1 intercom_range_display_status = 1
for(var/obj/effect/debugging/marker/M in world) for(var/obj/effect/debugging/marker/M in world)
qdel(M) qdel(M)
if(intercom_range_display_status) if(intercom_range_display_status)
for(var/obj/item/device/radio/intercom/I in world) for(var/obj/item/device/radio/intercom/I in world)
for(var/turf/T in orange(7,I)) for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T) var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if (!(F in view(7,I.loc))) if (!(F in view(7,I.loc)))
qdel(F) qdel(F)
feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mIRD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list() /client/proc/cmd_show_at_list()
set category = "Mapping" set category = "Mapping"
set name = "Show roundstart AT list" set name = "Show roundstart AT list"
set desc = "Displays a list of active turfs coordinates at roundstart" set desc = "Displays a list of active turfs coordinates at roundstart"
var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b> var/dat = {"<b>Coordinate list of Active Turfs at Roundstart</b>
<br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"} <br>Real-time Active Turfs list you can see in Air Subsystem at active_turfs var<br>"}
for(var/i=1; i<=active_turfs_startlist.len; i++) for(var/i=1; i<=active_turfs_startlist.len; i++)
dat += active_turfs_startlist[i] dat += active_turfs_startlist[i]
dat += "<br>" dat += "<br>"
usr << browse(dat, "window=at_list") usr << browse(dat, "window=at_list")
feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mATL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/enable_debug_verbs() /client/proc/enable_debug_verbs()
set category = "Debug" set category = "Debug"
set name = "Debug verbs - Enable" set name = "Debug verbs - Enable"
if(!check_rights(R_DEBUG)) if(!check_rights(R_DEBUG))
return return
verbs -= /client/proc/enable_debug_verbs verbs -= /client/proc/enable_debug_verbs
verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping) verbs.Add(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mDVE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/disable_debug_verbs() /client/proc/disable_debug_verbs()
set category = "Debug" set category = "Debug"
set name = "Debug verbs - Disable" set name = "Debug verbs - Disable"
verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping) verbs.Remove(/client/proc/disable_debug_verbs, admin_verbs_debug_mapping)
verbs += /client/proc/enable_debug_verbs verbs += /client/proc/enable_debug_verbs
feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb", "mDVD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_on_z_level() /client/proc/count_objects_on_z_level()
set category = "Mapping" set category = "Mapping"
set name = "Count Objects On Level" set name = "Count Objects On Level"
var/level = input("Which z-level?","Level?") as text var/level = input("Which z-level?","Level?") as text
if(!level) return if(!level) return
var/num_level = text2num(level) var/num_level = text2num(level)
if(!num_level) return if(!num_level) return
if(!isnum(num_level)) return if(!isnum(num_level)) return
var/type_text = input("Which type path?","Path?") as text var/type_text = input("Which type path?","Path?") as text
if(!type_text) return if(!type_text) return
var/type_path = text2path(type_text) var/type_path = text2path(type_text)
if(!type_path) return if(!type_path) return
var/count = 0 var/count = 0
var/list/atom/atom_list = list() var/list/atom/atom_list = list()
for(var/atom/A in world) for(var/atom/A in world)
if(istype(A,type_path)) if(istype(A,type_path))
var/atom/B = A var/atom/B = A
while(!(isturf(B.loc))) while(!(isturf(B.loc)))
if(B && B.loc) if(B && B.loc)
B = B.loc B = B.loc
else else
break break
if(B) if(B)
if(B.z == num_level) if(B.z == num_level)
count++ count++
atom_list += A atom_list += A
/* /*
var/atom/temp_atom var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++) for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = "" var/line = ""
for(var/j = 1; j <= 10; j++) for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len) if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j] temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; " line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/ world << line*/
world << "There are [count] objects of type [type_path] on z-level [num_level]" world << "There are [count] objects of type [type_path] on z-level [num_level]"
feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mOBJZ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/count_objects_all() /client/proc/count_objects_all()
set category = "Mapping" set category = "Mapping"
set name = "Count Objects All" set name = "Count Objects All"
var/type_text = input("Which type path?","") as text var/type_text = input("Which type path?","") as text
if(!type_text) return if(!type_text) return
var/type_path = text2path(type_text) var/type_path = text2path(type_text)
if(!type_path) return if(!type_path) return
var/count = 0 var/count = 0
for(var/atom/A in world) for(var/atom/A in world)
if(istype(A,type_path)) if(istype(A,type_path))
count++ count++
/* /*
var/atom/temp_atom var/atom/temp_atom
for(var/i = 0; i <= (atom_list.len/10); i++) for(var/i = 0; i <= (atom_list.len/10); i++)
var/line = "" var/line = ""
for(var/j = 1; j <= 10; j++) for(var/j = 1; j <= 10; j++)
if(i*10+j <= atom_list.len) if(i*10+j <= atom_list.len)
temp_atom = atom_list[i*10+j] temp_atom = atom_list[i*10+j]
line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; " line += " no.[i+10+j]@\[[temp_atom.x], [temp_atom.y], [temp_atom.z]\]; "
world << line*/ world << line*/
world << "There are [count] objects of type [type_path] in the game world" world << "There are [count] objects of type [type_path] in the game world"
feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","mOBJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//This proc is intended to detect lag problems relating to communication procs //This proc is intended to detect lag problems relating to communication procs
var/global/say_disabled = 0 var/global/say_disabled = 0
/client/proc/disable_communication() /client/proc/disable_communication()
set category = "Mapping" set category = "Mapping"
set name = "Disable all communication verbs" set name = "Disable all communication verbs"
say_disabled = !say_disabled say_disabled = !say_disabled
if(say_disabled) if(say_disabled)
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.") message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
else else
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.") message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")