mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-21 20:27:42 +01:00
ZAS_Debug verb.
Applys a client side only layer of colors over the various zones to show if they are connected or not. Green is your current zone Blue is adjacent zones that are connected. yellow is zones that are connected but not adjacent to your current zone. Red is for zones that aren't connected at all.
This commit is contained in:
@@ -159,6 +159,8 @@ var/list/debug_verbs = list (
|
||||
,/client/proc/ZoneTick
|
||||
,/client/proc/TestZASRebuild
|
||||
,/client/proc/hide_debug_verbs
|
||||
,/client/proc/testZAScolors
|
||||
,/client/proc/testZAScolors_remove
|
||||
)
|
||||
|
||||
|
||||
@@ -183,6 +185,81 @@ var/list/debug_verbs = list (
|
||||
feedback_add_details("admin_verb","hDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/var/list/testZAScolors_turfs = list()
|
||||
/client/var/list/testZAScolors_zones = list()
|
||||
/client/var/usedZAScolors = 0
|
||||
/client/var/list/image/ZAScolors = list()
|
||||
|
||||
/client/proc/recurse_zone(var/zone/Z, var/recurse_level =1)
|
||||
testZAScolors_zones += Z
|
||||
if(recurse_level > 10)
|
||||
return
|
||||
var/icon/yellow = new('icons/misc/debug_group.dmi', "yellow")
|
||||
|
||||
for(var/turf/T in Z.contents)
|
||||
images += image(yellow, T, "zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/connected in Z.connected_zones)
|
||||
if(connected in testZAScolors_zones)
|
||||
continue
|
||||
recurse_zone(connected,recurse_level+1)
|
||||
|
||||
|
||||
/client/proc/testZAScolors()
|
||||
set category = "ZAS"
|
||||
set name = "Check ZAS connections"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
testZAScolors_remove()
|
||||
|
||||
var/turf/location = get_turf(usr)
|
||||
|
||||
var/icon/red = new('icons/misc/debug_group.dmi', "red") //created here so we don't have to make thousands of these.
|
||||
var/icon/green = new('icons/misc/debug_group.dmi', "green")
|
||||
var/icon/blue = new('icons/misc/debug_group.dmi', "blue")
|
||||
|
||||
if(!usedZAScolors)
|
||||
usr << "ZAS Test Colors"
|
||||
usr << "Green = Zone you are standing in"
|
||||
usr << "Blue = Connected zone to the zone you are standing in"
|
||||
usr << "Yellow = A zone that is connected but not one adjacent to your connected zone"
|
||||
usr << "Red = Not connected"
|
||||
usedZAScolors = 1
|
||||
|
||||
testZAScolors_zones += location.zone
|
||||
for(var/turf/T in location.zone.contents)
|
||||
images += image(green, T,"zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/Z in location.zone.connected_zones)
|
||||
testZAScolors_zones += Z
|
||||
for(var/turf/T in Z.contents)
|
||||
images += image(blue, T,"zasdebug",TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
for(var/zone/connected in Z.connected_zones)
|
||||
if(connected in testZAScolors_zones)
|
||||
continue
|
||||
recurse_zone(connected,1)
|
||||
|
||||
for(var/turf/T in range(25,location))
|
||||
if(!istype(T))
|
||||
continue
|
||||
if(T in testZAScolors_turfs)
|
||||
continue
|
||||
images += image(red, T, "zasdebug", TURF_LAYER)
|
||||
testZAScolors_turfs += T
|
||||
|
||||
/client/proc/testZAScolors_remove()
|
||||
set category = "ZAS"
|
||||
set name = "Remove ZAS connection colors"
|
||||
|
||||
testZAScolors_turfs.Cut()
|
||||
testZAScolors_zones.Cut()
|
||||
|
||||
if(images.len)
|
||||
for(var/image/i in images)
|
||||
if(i.icon_state == "zasdebug")
|
||||
images.Remove(i)
|
||||
|
||||
|
||||
/client/proc/count_objects_on_z_level()
|
||||
set category = "Mapping"
|
||||
@@ -198,7 +275,7 @@ var/list/debug_verbs = list (
|
||||
var/type_path = text2path(type_text)
|
||||
if(!type_path) return
|
||||
|
||||
var/count = 0
|
||||
var/count = 1
|
||||
|
||||
var/list/atom/atom_list = list()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user