mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
moves the last admin verbs (#19346)
* moves the last admin verbs * . * Update diagnostics.dm Co-authored-by: Cameron Lennox <killer65311@gmail.com> * . * . * . * . * Fixes jump to mob * Fixes coordinate jump * Convo fixes * Fixes random maps * yeh --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
15cdb9088d
commit
5c5ccc4c9f
@@ -4,15 +4,9 @@
|
||||
/mob/observer/dead/on_mob_jump()
|
||||
following = null
|
||||
|
||||
/client/proc/Jump(areaname as null|anything in return_sorted_areas())
|
||||
set name = "Jump to Area"
|
||||
set desc = "Area to jump to"
|
||||
set category = "Admin.Game"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
ADMIN_VERB(Jump, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Area", "Area to jump to.", ADMIN_CATEGORY_GAME, areaname as null|anything in return_sorted_areas())
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
var/area/target_area
|
||||
@@ -20,26 +14,24 @@
|
||||
if(areaname)
|
||||
target_area = return_sorted_areas()[areaname]
|
||||
else
|
||||
target_area = return_sorted_areas()[tgui_input_list(src, "Pick an area:", "Jump to Area", return_sorted_areas())]
|
||||
target_area = return_sorted_areas()[tgui_input_list(user, "Pick an area:", "Jump to Area", return_sorted_areas())]
|
||||
|
||||
if(!target_area)
|
||||
return
|
||||
|
||||
mob.on_mob_jump()
|
||||
mob.reset_perspective(mob)
|
||||
user.mob.on_mob_jump()
|
||||
user.mob.reset_perspective(user.mob)
|
||||
var/turf/target = pick(get_area_turfs(target_area))
|
||||
if(!target)
|
||||
to_chat(src, span_warning("Selected area [target_area] has no turfs!"))
|
||||
to_chat(user, span_warning("Selected area [target_area] has no turfs!"))
|
||||
return
|
||||
mob.forceMove(target)
|
||||
log_admin("[key_name(src)] jumped to [target_area]")
|
||||
message_admins("[key_name_admin(src)] jumped to [target_area]")
|
||||
user.mob.forceMove(target)
|
||||
log_and_message_admins("jumped to [target_area]", user)
|
||||
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Turf", "Jump to a specific turf in the game.", ADMIN_CATEGORY_GAME, turf/T in world)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
log_admin("[key_name(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(user)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
log_and_message_admins("jumped to [T.x],[T.y],[T.z] in [T.loc]", user)
|
||||
user.mob.on_mob_jump()
|
||||
user.mob.reset_perspective(user)
|
||||
user.mob.forceMove(T)
|
||||
@@ -48,15 +40,8 @@ ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
|
||||
/// Verb wrapper around do_jumptomob()
|
||||
/client/proc/jumptomob(mob as null|anything in GLOB.mob_list)
|
||||
set category = "Admin.Game"
|
||||
set name = "Jump to Mob"
|
||||
set popup_menu = FALSE
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
do_jumptomob(mob)
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(jumptomob, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Mob", "Jump to the selected mob.", ADMIN_CATEGORY_GAME, mob/M in GLOB.mob_list)
|
||||
user.do_jumptomob(M)
|
||||
|
||||
/// Performs the jumps, also called from admin Topic() for JMP links
|
||||
/client/proc/do_jumptomob(var/mob/M)
|
||||
@@ -81,110 +66,92 @@ ADMIN_VERB_AND_CONTEXT_MENU(jumptoturf, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to
|
||||
else
|
||||
to_chat(A, span_filter_adminlog("This mob is not located in the game world."))
|
||||
|
||||
/client/proc/jumptocoord(tx as num, ty as num, tz as num)
|
||||
set category = "Admin.Game"
|
||||
set name = "Jump to Coordinate"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
ADMIN_VERB(jumptocoord, R_ADMIN|R_MOD|R_DEBUG|R_EVENT,"Jump to Coordinate", "Jump to the target coordinates.", ADMIN_CATEGORY_GAME)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
if (CONFIG_GET(flag/allow_admin_jump))
|
||||
if(src.mob)
|
||||
var/mob/A = src.mob
|
||||
A.on_mob_jump()
|
||||
var/turf/T = locate(tx, ty, tz)
|
||||
if(!T)
|
||||
to_chat(usr, span_warning("Those coordinates are outside the boundaries of the map."))
|
||||
return
|
||||
A.reset_perspective(A)
|
||||
A.forceMove(T)
|
||||
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")
|
||||
var/tx
|
||||
var/ty
|
||||
var/tz
|
||||
|
||||
else
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
tx = tgui_input_number(user, "Select the target x coordinate", "X Loc", 1, world.maxx, 1)
|
||||
ty = tgui_input_number(user, "Select the target y coordinate", "Y Loc", 1, world.maxy, 1)
|
||||
tz = tgui_input_number(user, "Select the target z coordinate", "Z Loc", 1, world.maxz, 1)
|
||||
|
||||
/client/proc/jumptokey()
|
||||
set category = "Admin.Game"
|
||||
set name = "Jump to Key"
|
||||
var/mob/user_mob = user.mob
|
||||
user_mob.on_mob_jump()
|
||||
var/turf/target_turf = locate(tx, ty, tz)
|
||||
if(!target_turf)
|
||||
to_chat(user, span_warning("Those coordinates are outside the boundaries of the map."))
|
||||
return
|
||||
user_mob.reset_perspective(user_mob)
|
||||
user_mob.forceMove(target_turf)
|
||||
feedback_add_details("admin_verb","JC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
message_admins("[key_name_admin(user)] jumped to coordinates [tx], [ty], [tz]")
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
ADMIN_VERB(jumptokey, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Jump to Key", "Jump to a player.", ADMIN_CATEGORY_GAME)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = tgui_input_list(usr, "Select a key:", "Jump to Key", sortKey(keys))
|
||||
if(!selection)
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
var/turf/target_turf = get_turf(M)
|
||||
if(!target_turf)
|
||||
return
|
||||
log_admin("[key_name(usr)] jumped to [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
|
||||
usr.on_mob_jump()
|
||||
usr.reset_perspective(usr)
|
||||
usr.forceMove(target_turf)
|
||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
|
||||
/client/proc/Getmob(mob/living/M as null|anything in GLOB.mob_list)
|
||||
set category = "Admin.Game"
|
||||
set name = "Get Mob"
|
||||
set desc = "Mob to teleport"
|
||||
set popup_menu = TRUE
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
var/list/keys = list()
|
||||
for(var/mob/player_mob in GLOB.player_list)
|
||||
keys += player_mob.client
|
||||
var/client/selection = tgui_input_list(user, "Select a key:", "Jump to Key", sortKey(keys))
|
||||
if(!selection)
|
||||
return
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
if(!M)
|
||||
M = tgui_input_list(usr, "Pick a mob:", "Get Mob", GLOB.mob_list)
|
||||
if(!M)
|
||||
return
|
||||
log_admin("[key_name(usr)] jumped [key_name(M)] to them")
|
||||
var/msg = "[key_name_admin(usr)] jumped [key_name_admin(M)] to them"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
M.on_mob_jump()
|
||||
M.reset_perspective(M)
|
||||
M.forceMove(get_turf(usr))
|
||||
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
var/mob/selected_mob = selection.mob
|
||||
var/turf/target_turf = get_turf(selected_mob)
|
||||
if(!target_turf)
|
||||
return
|
||||
log_and_message_admins("jumped to [key_name(selected_mob)]", user)
|
||||
user.mob.on_mob_jump()
|
||||
user.mob.reset_perspective(user.mob)
|
||||
user.mob.forceMove(target_turf)
|
||||
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/Getkey()
|
||||
set category = "Admin.Game"
|
||||
set name = "Get Key"
|
||||
set desc = "Key to teleport"
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(Getmob, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Get Mob", "Mob to teleport.", ADMIN_CATEGORY_GAME, mob/living/living_mob in GLOB.mob_list)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
keys += M.client
|
||||
var/selection = tgui_input_list(usr, "Pick a key:", "Get Key", sortKey(keys))
|
||||
if(!selection)
|
||||
return
|
||||
var/mob/M = selection:mob
|
||||
if(!living_mob)
|
||||
living_mob = tgui_input_list(user, "Pick a mob:", "Get Mob", GLOB.mob_list)
|
||||
if(!living_mob)
|
||||
return
|
||||
var/msg = "jumped [key_name(living_mob)] to them."
|
||||
log_and_message_admins(msg, user)
|
||||
admin_ticket_log(living_mob, "[key_name_admin(user)] " + msg)
|
||||
living_mob.on_mob_jump()
|
||||
living_mob.reset_perspective(living_mob)
|
||||
living_mob.forceMove(get_turf(user.mob))
|
||||
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(!M)
|
||||
return
|
||||
log_admin("[key_name(usr)] teleported [key_name(M)]")
|
||||
var/msg = "[key_name_admin(usr)] teleported [ADMIN_LOOKUPFLW(M)]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
if(M)
|
||||
M.on_mob_jump()
|
||||
M.reset_perspective(M) // Force reset to self before teleport
|
||||
M.forceMove(get_turf(usr))
|
||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
ADMIN_VERB(Getkey, R_ADMIN|R_MOD|R_DEBUG|R_EVENT, "Get Key", "Key to teleport.", ADMIN_CATEGORY_GAME)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(user, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
var/list/keys = list()
|
||||
for(var/mob/curernt_mob in GLOB.player_list)
|
||||
keys += curernt_mob.client
|
||||
var/client/selection = tgui_input_list(user, "Pick a key:", "Get Key", sortKey(keys))
|
||||
if(!selection)
|
||||
return
|
||||
|
||||
var/mob/selected_mob = selection.mob
|
||||
if(!selected_mob)
|
||||
return
|
||||
|
||||
log_admin("[key_name(user)] teleported [key_name(selected_mob)]")
|
||||
var/msg = "[key_name_admin(user)] teleported [ADMIN_LOOKUPFLW(selected_mob)]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(selected_mob, msg)
|
||||
selected_mob.on_mob_jump()
|
||||
selected_mob.reset_perspective(selected_mob) // Force reset to self before teleport
|
||||
selected_mob.forceMove(get_turf(user))
|
||||
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/sendmob()
|
||||
set category = "Admin.Game"
|
||||
|
||||
@@ -3,40 +3,48 @@
|
||||
set name = "AOOC"
|
||||
set desc = "Antagonist OOC"
|
||||
|
||||
var/is_admin = check_rights(R_ADMIN|R_MOD|R_EVENT, show_msg = 0)
|
||||
var/is_antag = src.mob.mind && src.mob.mind.special_role
|
||||
var/is_antag = mob.mind?.special_role
|
||||
|
||||
if(!is_antag && !is_admin) // Non-antagonists and non-admins have no business using this.
|
||||
if(!is_antag) // Non-antagonists and non-admins have no business using this.
|
||||
to_chat(src, span_warning("Sorry, but only certain antagonists or administrators can use this verb."))
|
||||
return
|
||||
|
||||
else if(is_antag && !is_admin) // Is an antag, and not an admin, meaning we need to check if their antag type allows AOOC.
|
||||
var/datum/antagonist/A = SSantag_job.get_antag_data(src.mob.mind.special_role)
|
||||
if(!A || !A.can_speak_aooc || !A.can_hear_aooc)
|
||||
to_chat(src, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
|
||||
return
|
||||
var/datum/antagonist/antag_datum = SSantag_job.get_antag_data(src.mob.mind.special_role)
|
||||
if(!(antag_datum?.can_speak_aooc) || !antag_datum.can_hear_aooc)
|
||||
to_chat(src, span_warning("Sorry, but your antagonist type is not allowed to speak in AOOC."))
|
||||
return
|
||||
|
||||
msg = sanitize(msg)
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
perform_aooc(msg)
|
||||
|
||||
ADMIN_VERB(admin_aooc, R_ADMIN|R_MOD|R_EVENT, "Admin AOOC", "Send a message to antagonist OOC.", ADMIN_CATEGORY_CHAT, msg as text)
|
||||
msg = sanitize(msg)
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
user.perform_aooc(msg)
|
||||
|
||||
/client/proc/perform_aooc(msg)
|
||||
// Name shown to admins.
|
||||
var/display_name = src.key
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
display_name = holder.fakekey
|
||||
if(holder?.fakekey)
|
||||
display_name = holder.fakekey
|
||||
|
||||
// Name shown to other players. Admins whom are not also antags have their rank displayed.
|
||||
var/player_display = (is_admin && !is_antag) ? "[display_name]([holder.rank_names()])" : display_name
|
||||
var/player_display = (check_rights_for(src, R_ADMIN|R_MOD|R_EVENT) && !(mob.mind?.special_role)) ? "[display_name]([holder.rank_names()])" : display_name
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(check_rights_for(M.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(src.mob, check_rights_for(M.client, R_HOLDER))]):</EM> " + span_message("[msg]"))))
|
||||
else if(M.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
|
||||
var/datum/antagonist/A = null
|
||||
if(M.mind) // Observers don't have minds, but they should still see AOOC.
|
||||
A = SSantag_job.get_antag_data(M.mind.special_role)
|
||||
if((M.mind && M.mind.special_role && A && A.can_hear_aooc) || isobserver(M)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
|
||||
to_chat(M, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", M.client)] <EM>[player_display]:</EM> " + span_message("[msg]"))))
|
||||
for(var/mob/target_mob in GLOB.mob_list)
|
||||
if(check_rights_for(target_mob.client, R_ADMIN|R_MOD|R_EVENT)) // Staff can see AOOC unconditionally, and with more details.
|
||||
to_chat(target_mob, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", target_mob.client)] <EM>[get_options_bar(src, 0, 1, 1)]([admin_jump_link(src.mob, check_rights_for(target_mob.client, R_HOLDER))]):</EM> " + span_message("[msg]"))))
|
||||
continue
|
||||
if(target_mob.client) // Players can only see AOOC if observing, or if they are an antag type allowed to use AOOC.
|
||||
var/datum/antagonist/antag_datum = null
|
||||
if(target_mob.mind) // Observers don't have minds, but they should still see AOOC.
|
||||
antag_datum = SSantag_job.get_antag_data(target_mob.mind.special_role)
|
||||
if((target_mob.mind?.special_role && antag_datum?.can_hear_aooc) || isobserver(target_mob)) // Antags must have their type be allowed to AOOC to see AOOC. This prevents, say, ERT from seeing AOOC.
|
||||
to_chat(target_mob, span_ooc(span_aooc("[create_text_tag("aooc", "Antag-OOC:", target_mob.client)] <EM>[player_display]:</EM> " + span_message("[msg]"))))
|
||||
|
||||
src.mob.log_talk("(AOOC) [msg]", LOG_OOC, color="#ff0000")
|
||||
mob.log_talk("(AOOC) [msg]", LOG_OOC, color="#ff0000")
|
||||
|
||||
@@ -1,21 +1,14 @@
|
||||
// verb for admins to set custom event
|
||||
/client/proc/cmd_admin_change_custom_event()
|
||||
set category = "Fun.Event Kit"
|
||||
set name = "Change Custom Event"
|
||||
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
to_chat(src, "Only administrators may use this command.")
|
||||
ADMIN_VERB(cmd_admin_change_custom_event, R_ADMIN|R_FUN|R_SERVER|R_EVENT, "Change Custom Event", "Change custom event message.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
var/input = tgui_input_text(user, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
|
||||
if(isnull(input))
|
||||
return
|
||||
|
||||
var/input = tgui_input_text(usr, "Enter the description of the custom event. Be descriptive. To cancel the event, make this blank or hit cancel.", "Custom Event", GLOB.custom_event_msg, MAX_PAPER_MESSAGE_LEN, TRUE, prevent_enter = TRUE)
|
||||
if(!input || input == "")
|
||||
if(input == "")
|
||||
GLOB.custom_event_msg = null
|
||||
log_admin("[usr.key] has cleared the custom event text.")
|
||||
message_admins("[key_name_admin(usr)] has cleared the custom event text.")
|
||||
log_and_message_admins("has cleared the custom event text.", user)
|
||||
return
|
||||
|
||||
log_admin("[usr.key] has changed the custom event text.")
|
||||
message_admins("[key_name_admin(usr)] has changed the custom event text.")
|
||||
log_and_message_admins("has changed the custom event text.", user)
|
||||
|
||||
GLOB.custom_event_msg = input
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/client/proc/air_report()
|
||||
set category = "Debug.Investigate"
|
||||
set name = "Show Air Report"
|
||||
|
||||
if(!GLOB.master_controller || !SSair)
|
||||
tgui_alert_async(usr,"Master_controller or SSair not found.","Air Report")
|
||||
ADMIN_VERB(air_report, R_DEBUG, "Show Air Report", "Displays the current atmos stats.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
if(!SSair.initialized)
|
||||
tgui_alert_async(user, "SSair not ready.", "Air Report")
|
||||
return
|
||||
|
||||
var/active_groups = SSair.active_zones
|
||||
@@ -15,18 +12,18 @@
|
||||
|
||||
var/active_on_main_station = 0
|
||||
var/inactive_on_main_station = 0
|
||||
for(var/datum/zone/zone in SSair.zones)
|
||||
for(var/datum/zone/zone as anything in SSair.zones)
|
||||
var/turf/simulated/turf = locate() in zone.contents
|
||||
if(turf?.z in using_map.station_levels)
|
||||
if(zone.needs_update)
|
||||
active_on_main_station++
|
||||
else
|
||||
inactive_on_main_station++
|
||||
continue
|
||||
inactive_on_main_station++
|
||||
|
||||
var/output = {"<B>AIR SYSTEMS REPORT</B><HR>
|
||||
<B>General Processing Data</B><BR>
|
||||
Cycle: [SSair.current_cycle]<br>
|
||||
Groups: [SSair.zones.len]<BR>
|
||||
Groups: [length(SSair.zones)]<BR>
|
||||
---- <I>Active:</I> [active_groups]<BR>
|
||||
---- <I>Inactive:</I> [inactive_groups]<BR><br>
|
||||
---- <I>Active on station:</i> [active_on_main_station]<br>
|
||||
@@ -36,48 +33,14 @@
|
||||
Hotspot Processing: [hotspots]<BR>
|
||||
<br>
|
||||
<B>Geometry Processing Data</B><BR>
|
||||
Tile Update: [SSair.tiles_to_update.len]<BR>
|
||||
Tile Update: [length(SSair.tiles_to_update)]<BR>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(src, "airreport", "Airreport")
|
||||
var/datum/browser/popup = new(user, "airreport", "Airreport")
|
||||
popup.set_content(output)
|
||||
popup.open()
|
||||
|
||||
/client/proc/fix_next_move()
|
||||
set category = "Debug.Game"
|
||||
set name = "Unfreeze Everyone"
|
||||
var/largest_move_time = 0
|
||||
var/largest_click_time = 0
|
||||
var/mob/largest_move_mob = null
|
||||
var/mob/largest_click_mob = null
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(!M.client)
|
||||
continue
|
||||
if(M.next_move >= largest_move_time)
|
||||
largest_move_mob = M
|
||||
if(M.next_move > world.time)
|
||||
largest_move_time = M.next_move - world.time
|
||||
else
|
||||
largest_move_time = 1
|
||||
if(M.next_click >= largest_click_time)
|
||||
largest_click_mob = M
|
||||
if(M.next_click > world.time)
|
||||
largest_click_time = M.next_click - world.time
|
||||
else
|
||||
largest_click_time = 0
|
||||
log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] next_click = [M.next_click] world.time = [world.time]")
|
||||
M.next_move = 1
|
||||
M.next_click = 0
|
||||
message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!", 1)
|
||||
message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!", 1)
|
||||
message_admins("world.time = [world.time]", 1)
|
||||
feedback_add_details("admin_verb","UFE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/radio_report()
|
||||
set category = "Debug.Game"
|
||||
set name = "Radio report"
|
||||
|
||||
ADMIN_VERB(radio_report, R_DEBUG, "Radio report", "Displays a radio report.", ADMIN_CATEGORY_DEBUG_INVESTIGATE)
|
||||
var/output = "<b>Radio Report</b><hr>"
|
||||
for (var/fq in SSradio.frequencies)
|
||||
output += "<b>Freq: [fq]</b><br>"
|
||||
@@ -85,8 +48,8 @@
|
||||
if (!fqs)
|
||||
output += " <b>ERROR</b><br>"
|
||||
continue
|
||||
for (var/radio_filter in fqs.devices)
|
||||
var/list/f = fqs.devices[radio_filter]
|
||||
for (var/radio_filter, device_list in fqs.devices)
|
||||
var/list/f = device_list
|
||||
if (!f)
|
||||
output += " [radio_filter]: ERROR<br>"
|
||||
continue
|
||||
@@ -94,21 +57,16 @@
|
||||
for (var/device in f)
|
||||
if (isobj(device))
|
||||
output += " [device] ([device:x],[device:y],[device:z] in area [get_area(device:loc)])<br>"
|
||||
else
|
||||
output += " [device]<br>"
|
||||
continue
|
||||
output += " [device]<br>"
|
||||
|
||||
var/datum/browser/popup = new(src, "radioreport", "Radioreport")
|
||||
var/datum/browser/popup = new(user, "radioreport", "Radioreport")
|
||||
popup.set_content(output)
|
||||
popup.open()
|
||||
feedback_add_details("admin_verb","RR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reload_admins()
|
||||
set name = "Reload Admins"
|
||||
set category = "Debug.Server"
|
||||
|
||||
if(!check_rights(R_SERVER)) return
|
||||
|
||||
message_admins("[usr] manually reloaded admins")
|
||||
ADMIN_VERB(reload_admins, R_SERVER, "Reload Admins", "Reloads admins from the file or database.", ADMIN_CATEGORY_DEBUG_SERVER)
|
||||
message_admins("[user] manually reloaded admins")
|
||||
load_admins()
|
||||
feedback_add_details("admin_verb","RLDA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -212,18 +212,12 @@ ADMIN_VERB(play_web_sound, R_SOUNDS, "Play Internet Sound", "Plays a sound from
|
||||
else
|
||||
web_sound(user.mob, null)
|
||||
|
||||
/client/proc/stop_sounds()
|
||||
set category = "Debug.Dangerous"
|
||||
set name = "Stop All Playing Sounds"
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
return
|
||||
|
||||
log_admin("[key_name(src)] stopped all currently playing sounds.")
|
||||
message_admins("[key_name_admin(src)] stopped all currently playing sounds.")
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
SEND_SOUND(M, sound(null))
|
||||
var/client/C = M.client
|
||||
C?.tgui_panel?.stop_music()
|
||||
ADMIN_VERB(stop_sounds, R_SOUNDS, "Stop All Playing Sounds", "Stops all playing sounds.", ADMIN_CATEGORY_FUN_SOUNDS)
|
||||
log_and_message_admins("stopped all currently playing sounds.", user)
|
||||
for(var/mob/current_mob in GLOB.player_list)
|
||||
SEND_SOUND(current_mob, sound(null))
|
||||
var/client/current_client = current_mob.client
|
||||
current_client?.tgui_panel?.stop_music()
|
||||
|
||||
S_TIMER_COOLDOWN_RESET(SStimer, COOLDOWN_INTERNET_SOUND)
|
||||
feedback_add_details("admin_verb", "Stop All Playing Sounds")
|
||||
|
||||
@@ -123,7 +123,7 @@ ADMIN_VERB(cmd_admin_local_narrate, R_FUN|R_EVENT, "Local Narrate", "Locally nar
|
||||
feedback_add_details("admin_verb","LNR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
ADMIN_VERB(cmd_admin_direct_narrate, R_FUN|R_EVENT, "Direct Narrate", "Directly narrate the target.", ADMIN_CATEGORY_FUN_NARRATE, mob/target_mob)
|
||||
ADMIN_VERB_AND_CONTEXT_MENU(cmd_admin_direct_narrate, R_FUN|R_EVENT, "Direct Narrate", "Directly narrate the target.", ADMIN_CATEGORY_FUN_NARRATE, mob/target_mob in GLOB.mob_list)
|
||||
if(!target_mob)
|
||||
target_mob = tgui_input_list(user, "Direct narrate to who?", "Active Players", get_mob_with_client_list())
|
||||
|
||||
|
||||
@@ -60,40 +60,30 @@ GLOBAL_VAR_INIT(send_emergency_team, 0) // Used for automagic response teams; 'a
|
||||
|
||||
GLOBAL_VAR_INIT(ert_base_chance, 10) // Default base chance. Will be incremented by increment ERT chance.
|
||||
GLOBAL_VAR(can_call_ert)
|
||||
GLOBAL_VAR_INIT(silent_ert, 0)
|
||||
GLOBAL_VAR_INIT(silent_ert, FALSE)
|
||||
|
||||
/client/proc/response_team()
|
||||
set name = "Dispatch Emergency Response Team"
|
||||
set category = "Fun.Event Kit"
|
||||
set desc = "Send an emergency response team to the station"
|
||||
|
||||
if(!check_rights_for(src, R_HOLDER))
|
||||
to_chat(usr, span_danger("Only administrators may use this command."))
|
||||
return
|
||||
if(!SSticker)
|
||||
to_chat(usr, span_danger("The game hasn't started yet!"))
|
||||
return
|
||||
if(SSticker.current_state == 1)
|
||||
to_chat(usr, span_danger("The round hasn't started yet!"))
|
||||
ADMIN_VERB(response_team, R_ADMIN|R_MOD|R_EVENT, "Dispatch Emergency Response Team", "Send an emergency response team to the station.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
to_chat(user, span_danger("The round hasn't started yet!"))
|
||||
return
|
||||
if(GLOB.send_emergency_team)
|
||||
to_chat(usr, span_danger("[using_map.boss_name] has already dispatched an emergency response team!"))
|
||||
to_chat(user, span_danger("[using_map.boss_name] has already dispatched an emergency response team!"))
|
||||
return
|
||||
if(tgui_alert(usr, "Do you want to dispatch an Emergency Response Team?","ERT",list("Yes","No")) != "Yes")
|
||||
if(tgui_alert(user, "Do you want to dispatch an Emergency Response Team?", "ERT", list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(tgui_alert(usr, "Do you want this Response Team to be announced?","ERT",list("Yes","No")) != "Yes")
|
||||
GLOB.silent_ert = 1
|
||||
if(tgui_alert(user, "Do you want this Response Team to be announced?", "ERT", list("Yes","No")) != "Yes")
|
||||
GLOB.silent_ert = TRUE
|
||||
if(get_security_level() != "red") // Allow admins to reconsider if the alert level isn't Red
|
||||
if(tgui_alert(usr, "The station is not in red alert. Do you still want to dispatch a response team?","ERT",list("Yes","No")) != "Yes")
|
||||
if(tgui_alert(user, "The station is not in red alert. Do you still want to dispatch a response team?", "ERT", list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(GLOB.send_emergency_team)
|
||||
to_chat(usr, span_danger("Looks like somebody beat you to it!"))
|
||||
to_chat(user, span_danger("Looks like somebody beat you to it!"))
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] is dispatching an Emergency Response Team.", 1)
|
||||
admin_chat_message(message = "[key_name(usr)] is dispatching an Emergency Response Team", color = "#CC2222") //VOREStation Add
|
||||
log_admin("[key_name(usr)] used Dispatch Response Team.")
|
||||
trigger_armed_response_team(1)
|
||||
message_admins("[key_name_admin(user)] is dispatching an Emergency Response Team.")
|
||||
admin_chat_message(message = "[key_name(user)] is dispatching an Emergency Response Team", color = "#CC2222")
|
||||
log_admin("[key_name(user)] used Dispatch Response Team.")
|
||||
trigger_armed_response_team(TRUE)
|
||||
|
||||
/client/verb/JoinResponseTeam()
|
||||
|
||||
|
||||
@@ -1,57 +1,47 @@
|
||||
//Based on the ERT setup
|
||||
|
||||
GLOBAL_VAR_INIT(send_beruang, 0)
|
||||
GLOBAL_VAR_INIT(can_call_traders, 1)
|
||||
GLOBAL_VAR_INIT(send_beruang, FALSE)
|
||||
GLOBAL_VAR_INIT(can_call_traders, TRUE)
|
||||
|
||||
/client/proc/trader_ship()
|
||||
set name = "Dispatch Beruang Trader Ship"
|
||||
set category = "Fun.Event Kit"
|
||||
set desc = "Invite players to join the Beruang."
|
||||
|
||||
if(!holder)
|
||||
to_chat(usr, span_danger("Only administrators may use this command."))
|
||||
return
|
||||
if(!SSticker)
|
||||
to_chat(usr, span_danger("The game hasn't started yet!"))
|
||||
return
|
||||
if(SSticker.current_state == 1)
|
||||
to_chat(usr, span_danger("The round hasn't started yet!"))
|
||||
ADMIN_VERB(trader_ship, R_ADMIN|R_EVENT, "Dispatch Beruang Trader Ship", "Invite players to join the Beruang.", ADMIN_CATEGORY_FUN_EVENT_KIT)
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
to_chat(user, span_danger("The round hasn't started yet!"))
|
||||
return
|
||||
if(GLOB.send_beruang)
|
||||
to_chat(usr, span_danger("The Beruang has already been sent this round!"))
|
||||
to_chat(user, span_danger("The Beruang has already been sent this round!"))
|
||||
return
|
||||
if(tgui_alert(usr, "Do you want to dispatch the Beruang trade ship?","Trade Ship",list("Yes","No")) != "Yes")
|
||||
if(tgui_alert(user, "Do you want to dispatch the Beruang trade ship?", "Trade Ship", list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(get_security_level() == "red") // Allow admins to reconsider if the alert level is Red
|
||||
if(tgui_alert(usr, "The station is in red alert. Do you still want to send traders?","Trade Ship",list("Yes","No")) != "Yes")
|
||||
if(tgui_alert(user, "The station is in red alert. Do you still want to send traders?", "Trade Ship", list("Yes","No")) != "Yes")
|
||||
return
|
||||
if(GLOB.send_beruang)
|
||||
to_chat(usr, span_danger("Looks like somebody beat you to it!"))
|
||||
to_chat(user, span_danger("Looks like somebody beat you to it!"))
|
||||
return
|
||||
|
||||
message_admins("[key_name_admin(usr)] is dispatching the Beruang.", 1)
|
||||
log_admin("[key_name(usr)] used Dispatch Beruang Trader Ship.")
|
||||
message_admins("[key_name_admin(user)] is dispatching the Beruang.")
|
||||
log_admin("[key_name(user)] used Dispatch Beruang Trader Ship.")
|
||||
trigger_trader_visit()
|
||||
|
||||
/client/verb/JoinTraders()
|
||||
|
||||
set name = "Join Trader Visit"
|
||||
set category = "IC.Event"
|
||||
|
||||
if(!MayRespawn(1))
|
||||
to_chat(usr, span_warning("You cannot join the traders."))
|
||||
if(!MayRespawn(TRUE))
|
||||
to_chat(src, span_warning("You cannot join the traders."))
|
||||
return
|
||||
|
||||
if(isobserver(usr) || isnewplayer(usr))
|
||||
if(!GLOB.send_beruang)
|
||||
to_chat(usr, "The Beruang is not currently heading to the station.")
|
||||
return
|
||||
if(GLOB.traders.current_antagonists.len >= GLOB.traders.hard_cap)
|
||||
to_chat(usr, "The number of trader slots is already full!")
|
||||
return
|
||||
GLOB.traders.create_default(usr)
|
||||
else
|
||||
to_chat(usr, "You need to be an observer or new player to use this.")
|
||||
if(!isobserver(mob) && !isnewplayer(mob))
|
||||
to_chat(src, "You need to be an observer or new player to use this.")
|
||||
return
|
||||
|
||||
if(!GLOB.send_beruang)
|
||||
to_chat(src, "The Beruang is not currently heading to the station.")
|
||||
return
|
||||
if(GLOB.traders.current_antagonists.len >= GLOB.traders.hard_cap)
|
||||
to_chat(src, "The number of trader slots is already full!")
|
||||
return
|
||||
GLOB.traders.create_default(mob)
|
||||
|
||||
/proc/trigger_trader_visit()
|
||||
if(!GLOB.can_call_traders)
|
||||
@@ -61,12 +51,12 @@ GLOBAL_VAR_INIT(can_call_traders, 1)
|
||||
|
||||
GLOB.command_announcement.Announce("Incoming cargo hauler: Beruang (Reg: VRS 22EB1F11C2).", "[station_name()] Traffic Control")
|
||||
|
||||
GLOB.can_call_traders = 0 // Only one call per round.
|
||||
GLOB.send_beruang = 1
|
||||
GLOB.can_call_traders = FALSE // Only one call per round.
|
||||
GLOB.send_beruang = TRUE
|
||||
consider_trader_load() //VOREStation Add
|
||||
|
||||
sleep(600 * 5)
|
||||
GLOB.send_beruang = 0 // Can no longer join the traders.
|
||||
sleep(300 SECONDS)
|
||||
GLOB.send_beruang = FALSE // Can no longer join the traders.
|
||||
|
||||
GLOBAL_VAR(trader_loaded)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user