Skip to content

Commit

Permalink
Fixes some issues with the debug menu (#21600)
Browse files Browse the repository at this point in the history
* fixes debug menu

* guh, scuffed implementation

* user.client -> parent

* deconflict

* please fix it? executable?
  • Loading branch information
Contrabang authored Aug 6, 2023
1 parent b589d0d commit ce8c7fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
17 changes: 12 additions & 5 deletions code/controllers/subsystem/SSdebugview.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ SUBSYSTEM_DEF(debugview)
C.debug_text_overlay.maptext = "<span class='maptext' style='background-color: #272727;'>[out_text]</span>"

/datum/controller/subsystem/debugview/proc/start_processing(client/C)
C.debug_text_overlay = new /obj/screen/debugtextholder
C.debug_text_overlay = new /obj/screen/debugtextholder(null, C)
C.screen |= C.debug_text_overlay
processing |= C

Expand All @@ -55,12 +55,19 @@ SUBSYSTEM_DEF(debugview)

/obj/screen/debugtextholder
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
icon_state = "empty"
screen_loc = "TOP,LEFT"
plane = HUD_PLANE_DEBUGVIEW
maptext_height = 480 // If we ever change view size, increase this
maptext_width = 480
maptext_height = 480 // 15 * 32 (15 tiles, 32 pixels each)
maptext_width = 480 // changes with prefs

/obj/screen/debugtextholder/Initialize(mapload, client/C)
. = ..()
update_view(C)

/obj/screen/debugtextholder/proc/update_view(client/C)
var/list/viewsizes = getviewsize(C.view)
maptext_width = viewsizes[1] * world.icon_size

// Make a verb for dumping full SS stats
/client/proc/ss_breakdown()
Expand Down
2 changes: 2 additions & 0 deletions code/modules/client/preference/link_processing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,8 @@
var/list/actualview = getviewsize(parent.view)
parent.void.UpdateGreed(actualview[1],actualview[2])

parent.debug_text_overlay.update_view(parent)

if("afk_watch")
if(!(toggles2 & PREFTOGGLE_2_AFKWATCH))
to_chat(user, "<span class='info'>You will now get put into cryo dorms after [GLOB.configuration.afk.auto_cryo_minutes] minutes. \
Expand Down
Binary file modified icons/mob/screen_full.dmi
Binary file not shown.

0 comments on commit ce8c7fa

Please sign in to comment.