Makes crew manifest pop-up use a single proc, makes it prettier (#10275)

This commit is contained in:
Jiří Barouš
2020-10-23 15:24:38 +02:00
committed by GitHub
parent a79e048f10
commit 5f52e411a9
10 changed files with 56 additions and 53 deletions
@@ -406,12 +406,7 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
return new_character
/mob/abstract/new_player/proc/ViewManifest()
var/dat = "<html><body>"
dat += "<h4>Show Crew Manifest</h4>"
dat += SSrecords.get_manifest(OOC = 1)
send_theme_resources(src)
src << browse(enable_ui_theme(src, dat), "window=manifest;size=370x420;can_close=1")
open_crew_manifest(src, OOC = TRUE)
/mob/abstract/new_player/Move()
return 0
@@ -582,15 +582,10 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
else
return bestvent
/mob/abstract/observer/verb/view_manfiest()
/mob/abstract/observer/verb/view_manifest()
set name = "Show Crew Manifest"
set category = "Ghost"
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += SSrecords.get_manifest(OOC = 1)
src << browse(dat, "window=manifest;size=370x420;can_close=1")
open_crew_manifest(src, OOC = TRUE)
//This is called when a ghost is drag clicked to something.
/mob/abstract/observer/MouseDrop(atom/over)
+2 -1
View File
@@ -379,7 +379,8 @@ var/list/ai_verbs_default = list(
/mob/living/silicon/ai/proc/ai_roster()
set category = "AI Commands"
set name = "Show Crew Manifest"
show_station_manifest()
var/windowname = open_crew_manifest(src)
onclose(src, windowname)
//AI Examine code
/mob/living/silicon/ai/proc/ai_examine(atom/A as mob|obj|turf in view(src.eyeobj))
@@ -412,7 +412,8 @@
/mob/living/silicon/robot/verb/cmd_station_manifest()
set category = "Robot Commands"
set name = "Show Crew Manifest"
show_station_manifest()
var/windowname = open_crew_manifest(src)
onclose(src, windowname)
/mob/living/silicon/robot/proc/self_diagnosis()
if(!is_component_functioning("diagnosis unit"))
@@ -1246,4 +1247,4 @@
to_chat(user, SPAN_WARNING("You fail to hack into \the [src]."))
to_chat(src, SPAN_DANGER("Hack attempt detected and thwarted. Evacuate the area immediately."))
return SMOOTH_TRUE
return
return
@@ -186,15 +186,6 @@
show_malf_ai()
..()
// this function displays the stations manifest in a separate window
/mob/living/silicon/proc/show_station_manifest()
var/dat
dat += "<h4>Crew Manifest</h4>"
dat += SSrecords.get_manifest(1) // make it monochrome
dat += "<br>"
src << browse(dat, "window=airoster")
onclose(src, "airoster")
//can't inject synths
/mob/living/silicon/can_inject(mob/user, error_msg)
if(error_msg)