mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Admin Verb Datums MkIII | Now with functional command bar (#82511)
This commit is contained in:
@@ -643,46 +643,38 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
holodeck_templates[holo_template.template_id] = holo_template
|
||||
|
||||
//Manual loading of away missions.
|
||||
/client/proc/admin_away()
|
||||
set name = "Load Away Mission"
|
||||
set category = "Admin.Events"
|
||||
|
||||
if(!holder || !check_rights(R_FUN))
|
||||
return
|
||||
|
||||
|
||||
ADMIN_VERB(load_away_mission, R_FUN, "Load Away Mission", "Load a specific away mission for the station.", ADMIN_CATEGORY_EVENTS)
|
||||
if(!GLOB.the_gateway)
|
||||
if(tgui_alert(usr, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
|
||||
if(tgui_alert(user, "There's no home gateway on the station. You sure you want to continue ?", "Uh oh", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
|
||||
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
|
||||
var/away_name
|
||||
var/datum/space_level/away_level
|
||||
var/secret = FALSE
|
||||
if(tgui_alert(usr, "Do you want your mission secret? (This will prevent ghosts from looking at your map in any way other than through a living player's eyes.)", "Are you $$$ekret?", list("Yes", "No")) == "Yes")
|
||||
if(tgui_alert(user, "Do you want your mission secret? (This will prevent ghosts from looking at your map in any way other than through a living player's eyes.)", "Are you $$$ekret?", list("Yes", "No")) == "Yes")
|
||||
secret = TRUE
|
||||
var/answer = input("What kind?","Away") as null|anything in possible_options
|
||||
var/answer = input(user, "What kind?","Away") as null|anything in possible_options
|
||||
switch(answer)
|
||||
if("Custom")
|
||||
var/mapfile = input("Pick file:", "File") as null|file
|
||||
var/mapfile = input(user, "Pick file:", "File") as null|file
|
||||
if(!mapfile)
|
||||
return
|
||||
away_name = "[mapfile] custom"
|
||||
to_chat(usr,span_notice("Loading [away_name]..."))
|
||||
to_chat(user,span_notice("Loading [away_name]..."))
|
||||
var/datum/map_template/template = new(mapfile, "Away Mission")
|
||||
away_level = template.load_new_z(secret)
|
||||
else
|
||||
if(answer in GLOB.potentialRandomZlevels)
|
||||
away_name = answer
|
||||
to_chat(usr,span_notice("Loading [away_name]..."))
|
||||
to_chat(user,span_notice("Loading [away_name]..."))
|
||||
var/datum/map_template/template = new(away_name, "Away Mission")
|
||||
away_level = template.load_new_z(secret)
|
||||
else
|
||||
return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
|
||||
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
|
||||
message_admins("Admin [key_name_admin(user)] has loaded [away_name] away mission.")
|
||||
log_admin("Admin [key_name(user)] has loaded [away_name] away mission.")
|
||||
if(!away_level)
|
||||
message_admins("Loading [away_name] failed!")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user