Files
Bubberstation/code/modules/admin/verbs/change_shuttle_events.dm
SpaceLoveSs13 a9ff046352 Administrator Cherrypick (#27405)
* Admin Verb Datums MkIII | Now with functional command bar (#82511)

* Modular stuffs

* Put some admin jump verbs back into the context menu | sorts area jump list again (#82647)

## About The Pull Request

See title.

## Why It's Good For The Game

Some admins wanted all the jump verbs back, aswell as making them not
AGhost you.
Also make the Jump To Area verb use a sorted list again

* Hey what if admins were allowed to use the player panel (#82682)

Re-adds the player panel verb to the verb panel.

* Controller Overview UI (#82739)

* Fixes a minor spelling mistake on the admin panel/verb list (#82747)

## About The Pull Request

Corrects `inisimin` to `invisimin`. This addresses #82728, but only
fixes one of the two issues mentioned

## Why It's Good For The Game

-1 spelling mistake

## Changelog
🆑
spellcheck: 'inisimin' verb corrected to 'invisimin'
/🆑

* Player Panel-age (#82757)

* Admin Forced Mob Rename and Preference Update (#82715)

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: chel <64568243+iliyaxox@users.noreply.github.com>
2024-04-23 20:43:45 +02:00

32 lines
1.4 KiB
Plaintext

ADMIN_VERB(change_shuttle_events, R_ADMIN|R_FUN, "Change Shuttle Events", "Change the events on a shuttle.", ADMIN_CATEGORY_EVENTS)
//At least for now, just letting admins modify the emergency shuttle is fine
var/obj/docking_port/mobile/port = SSshuttle.emergency
if(!port)
to_chat(user, span_admin("Uh oh, couldn't find the escape shuttle!"))
var/list/options = list("Clear"="Clear")
//Grab the active events so we know which ones we can Add or Remove
var/list/active = list()
for(var/datum/shuttle_event/event in port.event_list)
active[event.type] = event
for(var/datum/shuttle_event/event as anything in subtypesof(/datum/shuttle_event))
options[((event in active) ? "(Remove)" : "(Add)") + initial(event.name)] = event
//Throw up an ugly menu with the shuttle events and the options to add or remove them, or clear them all
var/result = input(user, "Choose an event to add/remove", "Shuttle Events") as null|anything in sort_list(options)
if(result == "Clear")
port.event_list.Cut()
message_admins("[key_name_admin(user)] has cleared the shuttle events on: [port]")
else if(options[result])
var/typepath = options[result]
if(typepath in active)
port.event_list.Remove(active[options[result]])
message_admins("[key_name_admin(user)] has removed '[active[result]]' from [port].")
else
port.event_list.Add(new typepath (port))
message_admins("[key_name_admin(user)] has added '[typepath]' to [port].")