[MIRROR] removes some uses of var in world (#7150)

* removes some uses of var in world (#60407)

Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com>

* removes some uses of var in world

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-07-28 19:00:36 +01:00
committed by GitHub
co-authored by Watermelon914 Fikou
parent a3915952de
commit d379f5425e
4 changed files with 31 additions and 44 deletions
+9 -9
View File
@@ -25,17 +25,17 @@
html = span_danger("Error: Admin-PM-Panel: Only administrators may use this command."),
confidential = TRUE)
return
var/list/client/targets[0]
for(var/client/T)
if(T.mob)
if(isnewplayer(T.mob))
targets["(New Player) - [T]"] = T
else if(isobserver(T.mob))
targets["[T.mob.name](Ghost) - [T]"] = T
var/list/targets = list()
for(var/client/client as anything in GLOB.clients)
if(client.mob)
if(isnewplayer(client.mob))
targets["(New Player) - [client]"] = client
else if(isobserver(client.mob))
targets["[client.mob.name](Ghost) - [client]"] = client
else
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
targets["[client.mob.real_name](as [client.mob.name]) - [client]"] = client
else
targets["(No Mob) - [T]"] = T
targets["(No Mob) - [client]"] = client
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
cmd_admin_pm(targets[target],null)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+12 -14
View File
@@ -14,24 +14,22 @@
var/largest_click_time = 0
var/mob/largest_move_mob = null
var/mob/largest_click_mob = null
for(var/mob/M in world)
if(!M.client)
continue
if(M.next_move >= largest_move_time)
largest_move_mob = M
if(M.next_move > world.time)
largest_move_time = M.next_move - world.time
for(var/mob/frozen_mob as anything in GLOB.player_list)
if(frozen_mob.next_move >= largest_move_time)
largest_move_mob = frozen_mob
if(frozen_mob.next_move > world.time)
largest_move_time = frozen_mob.next_move - world.time
else
largest_move_time = 1
if(M.next_click >= largest_click_time)
largest_click_mob = M
if(M.next_click > world.time)
largest_click_time = M.next_click - world.time
if(frozen_mob.next_click >= largest_click_time)
largest_click_mob = frozen_mob
if(frozen_mob.next_click > world.time)
largest_click_time = frozen_mob.next_click - world.time
else
largest_click_time = 0
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.next_click] world.time = [world.time]")
M.next_move = 1
M.next_click = 0
log_admin("DEBUG: [key_name(frozen_mob)] next_move = [frozen_mob.next_move] lastDblClick = [frozen_mob.next_click] world.time = [world.time]")
frozen_mob.next_move = 1
frozen_mob.next_click = 0
message_admins("[ADMIN_LOOKUPFLW(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [DisplayTimeText(largest_move_time)]!")
message_admins("[ADMIN_LOOKUPFLW(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [DisplayTimeText(largest_click_time)]!")
message_admins("world.time = [world.time]")
+7 -21
View File
@@ -54,19 +54,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
))
GLOBAL_PROTECT(admin_verbs_debug_mapping)
/obj/effect/debugging/mapfix_marker
name = "map fix marker"
icon = 'icons/hud/screen_gen.dmi'
icon_state = "mapfixmarker"
desc = "I am a mappers mistake."
/obj/effect/debugging/marker
icon = 'icons/turf/areas.dmi'
icon_state = "yellow"
/obj/effect/debugging/marker/Move()
return FALSE
/client/proc/camera_view()
set category = "Mapping"
set name = "Camera Range Display"
@@ -149,17 +136,16 @@ GLOBAL_LIST_EMPTY(dirty_vars)
set name = "Intercom Range Display"
var/static/intercom_range_display_status = FALSE
intercom_range_display_status = !intercom_range_display_status //blame cyberboss if this breaks something
intercom_range_display_status = !intercom_range_display_status //blame cyberboss if this breaks something //blamed
for(var/obj/effect/debugging/marker/M in world)
qdel(M)
for(var/obj/effect/abstract/marker/intercom/marker in GLOB.all_abstract_markers)
qdel(marker)
if(intercom_range_display_status)
for(var/obj/item/radio/intercom/I in world)
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)))
qdel(F)
for(var/frequency in GLOB.all_radios)
for(var/obj/item/radio/intercom/intercom in GLOB.all_radios[frequency])
for(var/turf/turf in view(7,intercom.loc))
var/atom/marker = new /obj/effect/abstract/marker/intercom(turf)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Intercom Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_show_at_list()