[MIRROR] Fix crew manifest (#9279)

Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
Co-authored-by: CHOMPStation2 <chompsation2@gmail.com>
This commit is contained in:
CHOMPStation2
2024-10-21 21:52:48 -07:00
committed by GitHub
parent f69836b0bd
commit cc75d76c72
2 changed files with 11 additions and 7 deletions

View File

@@ -8,7 +8,7 @@
var/show_hidden_jobs = 0 //Show jobs that are set to "Never" in preferences
var/has_respawned = FALSE //Determines if we're using RESPAWN_MESSAGE
var/datum/browser/panel
var/datum/tgui_module/crew_manifest/manifest = null
var/datum/tgui_module/crew_manifest/new_player/manifest_dialog = null
var/datum/tgui_module/late_choices/late_choices_dialog = null
universal_speak = 1
@@ -37,8 +37,8 @@
/mob/new_player/Destroy()
if(panel)
QDEL_NULL(panel)
if(manifest)
QDEL_NULL(manifest)
if(manifest_dialog)
QDEL_NULL(manifest_dialog)
if(late_choices_dialog)
QDEL_NULL(late_choices_dialog)
. = ..()
@@ -703,15 +703,15 @@
return new_character
/mob/new_player/proc/ViewManifest()
if(!manifest)
manifest = new(src)
manifest.tgui_interact(src)
if(!manifest_dialog)
manifest_dialog = new(src)
manifest_dialog.tgui_interact(src)
/mob/new_player/Move()
return 0
/mob/new_player/proc/close_spawn_windows()
manifest?.close_ui()
manifest_dialog?.close_ui()
late_choices_dialog?.close_ui()
src << browse(null, "window=latechoices") //closes late choices window

View File

@@ -13,6 +13,10 @@
/datum/tgui_module/crew_manifest/robot/tgui_state(mob/user)
return GLOB.tgui_self_state
/datum/tgui_module/crew_manifest/new_player
/datum/tgui_module/crew_manifest/new_player/tgui_state(mob/user)
return GLOB.tgui_always_state
// Module that deletes itself when it's closed
/datum/tgui_module/crew_manifest/self_deleting