mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Add Station Goals
Still to-do: * Remove old BSA computer. * Add NanoUI interfaces for all goals. * Test it.
This commit is contained in:
@@ -110,7 +110,8 @@ var/list/admin_verbs_event = list(
|
||||
/client/proc/response_team, // Response Teams admin verb
|
||||
/client/proc/cmd_admin_create_centcom_report,
|
||||
/client/proc/fax_panel,
|
||||
/client/proc/event_manager_panel
|
||||
/client/proc/event_manager_panel,
|
||||
/client/proc/modify_goals
|
||||
)
|
||||
|
||||
var/list/admin_verbs_spawn = list(
|
||||
|
||||
@@ -3017,6 +3017,27 @@
|
||||
error_viewer.showTo(usr, locate(href_list["viewruntime_backto"]), href_list["viewruntime_linear"])
|
||||
else
|
||||
error_viewer.showTo(usr, null, href_list["viewruntime_linear"])
|
||||
|
||||
else if(href_list["add_station_goal"])
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
var/list/type_choices = typesof(/datum/station_goal)
|
||||
var/picked = input("Choose goal type") in type_choices|null
|
||||
if(!picked)
|
||||
return
|
||||
var/datum/station_goal/G = new picked()
|
||||
if(picked == /datum/station_goal)
|
||||
var/newname = input("Enter goal name:") as text|null
|
||||
if(!newname)
|
||||
return
|
||||
G.name = newname
|
||||
var/description = input("Enter centcom message contents:") as message|null
|
||||
if(!description)
|
||||
return
|
||||
G.report_message = description
|
||||
message_admins("[key_name_admin(usr)] created \"[G.name]\" station goal.")
|
||||
ticker.mode.station_goals += G
|
||||
modify_goals()
|
||||
|
||||
/proc/admin_jump_link(var/atom/target)
|
||||
if(!target) return
|
||||
|
||||
@@ -561,36 +561,22 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("Yes")
|
||||
communications_announcement.Announce(input, customname, , , , from);
|
||||
if("No")
|
||||
to_chat(world, "\red [from] available at all communications consoles.")
|
||||
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
if(! (C.stat & (BROKEN|NOPOWER) ) )
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
|
||||
P.name = "[from]"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
C.messagetitle.Add("[from]")
|
||||
C.messagetext.Add(P.info)
|
||||
to_chat(world, "<span class='danger'>[from] available at all communications consoles.</span>")
|
||||
|
||||
print_command_report(input, from)
|
||||
|
||||
if(type == "Centcom Report")
|
||||
if(!customname)
|
||||
customname = "Nanotrasen Update"
|
||||
|
||||
switch(alert("Should this be announced to the general population?",,"Yes","No"))
|
||||
var/announce = alert("Should this be announced to the general population?",,"Yes","No")
|
||||
switch(announce)
|
||||
if("Yes")
|
||||
command_announcement.Announce(input, customname);
|
||||
if("No")
|
||||
to_chat(world, "\red New Nanotrasen Update available at all communication consoles.")
|
||||
to_chat(world, "<span class='danger'>New Nanotrasen Update available at all communication consoles.</span>")
|
||||
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
if(! (C.stat & (BROKEN|NOPOWER) ) )
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper( C.loc )
|
||||
P.name = "'[command_name()] Update.'"
|
||||
P.info = input
|
||||
P.update_icon()
|
||||
C.messagetitle.Add("[command_name()] Update")
|
||||
C.messagetext.Add(P.info)
|
||||
print_command_report(input, "[announce == "No" ? "Classified " : ""][command_name()] Update")
|
||||
|
||||
// world << sound('sound/AI/commandreport.ogg')
|
||||
log_admin("[key_name(src)] has created a communications report: [input]")
|
||||
@@ -892,7 +878,6 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
message_admins("[key_name_admin(usr)] blanked all telecomms scripts.")
|
||||
feedback_add_details("admin_verb","RAT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/toggle_ert_calling()
|
||||
set category = "Event"
|
||||
set name = "Toggle ERT"
|
||||
@@ -911,3 +896,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "\red ERT has been <b>Disabled</b>.")
|
||||
log_admin("Admin [key_name(src)] has disabled ERT calling.")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled ERT calling.", 1)
|
||||
|
||||
/client/proc/modify_goals()
|
||||
set category = "Event"
|
||||
set name = "Modify station goals"
|
||||
|
||||
if(!check_rights(R_EVENT))
|
||||
return
|
||||
|
||||
holder.modify_goals()
|
||||
|
||||
/datum/admins/proc/modify_goals()
|
||||
var/dat = ""
|
||||
for(var/datum/station_goal/S in ticker.mode.station_goals)
|
||||
dat += "[S.name] - <a href='?src=\ref[S];announce=1'>Announce</a> | <a href='?src=\ref[S];remove=1'>Remove</a><br>"
|
||||
dat += "<br><a href='?src=\ref[src];add_station_goal=1'>Add New Goal</a>"
|
||||
usr << browse(dat, "window=goals;size=400x400")
|
||||
Reference in New Issue
Block a user