Merge branch 'master' of https://github.com/VOREStation/VOREStation into upstream-merge-8298

This commit is contained in:
MistakeNot4892
2022-08-25 14:26:20 +10:00
1603 changed files with 70496 additions and 61794 deletions
+5 -3
View File
@@ -126,6 +126,7 @@ var/const/MED_I_FREQ = 1485
var/const/SEC_I_FREQ = 1475
var/const/TALON_FREQ = 1363 //VOREStation Add
var/const/CSN_FREQ = 1365 //VOREStation Add
var/list/radiochannels = list(
"Common" = PUB_FREQ,
@@ -145,7 +146,8 @@ var/list/radiochannels = list(
"Entertainment" = ENT_FREQ,
"Medical(I)" = MED_I_FREQ,
"Security(I)" = SEC_I_FREQ,
"Talon" = TALON_FREQ //VOREStation Add
"Talon" = TALON_FREQ, //VOREStation Add
"Casino" = CSN_FREQ,
)
// Hey, if anyone ever needs to update tgui/packages/tgui/constants.js with new radio channels
@@ -155,7 +157,7 @@ var/list/radiochannels = list(
set category = "Generate TGUI Radio Constants"
var/list/channel_info = list()
for(var/i in RADIO_LOW_FREQ to RADIO_HIGH_FREQ)
for(var/key in radiochannels)
if(i == radiochannels[key])
@@ -192,7 +194,7 @@ var/list/ANTAG_FREQS = list(SYND_FREQ, RAID_FREQ)
//Department channels, arranged lexically
var/list/DEPT_FREQS = list(AI_FREQ, COMM_FREQ, ENG_FREQ, ENT_FREQ, MED_FREQ, SEC_FREQ, SCI_FREQ, SRV_FREQ, SUP_FREQ)
var/list/OFFMAP_FREQS = list(TALON_FREQ) //VOREStation Add
var/list/OFFMAP_FREQS = list(TALON_FREQ, CSN_FREQ) //VOREStation Add
/proc/frequency_span_class(var/frequency)
// Antags!
+8 -4
View File
@@ -78,6 +78,7 @@ var/list/gamemode_cache = list()
var/static/kick_inactive = 0 //force disconnect for inactive players after this many minutes, if non-0
var/static/show_mods = 0
var/static/show_devs = 0
var/static/show_mentors = 0
var/static/show_event_managers = 0
var/static/mods_can_tempban = 0
var/static/mods_can_job_tempban = 0
@@ -216,7 +217,7 @@ var/list/gamemode_cache = list()
var/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
var/use_lib_nudge = 0 //Use the C library nudge instead of the python nudge.
var/use_overmap = 0
var/static/list/engine_map = list("Supermatter Engine", "Edison's Bane") // Comma separated list of engines to choose from. Blank means fully random.
// Event settings
@@ -289,7 +290,7 @@ var/list/gamemode_cache = list()
// How strictly the loadout enforces object species whitelists
var/loadout_whitelist = LOADOUT_WHITELIST_LAX
var/static/vgs_access_identifier = null // VOREStation Edit - VGS
var/static/vgs_server_port = null // VOREStation Edit - VGS
@@ -652,6 +653,9 @@ var/list/gamemode_cache = list()
if("show_devs")
config.show_devs = 1
if("show_mentors")
config.show_mentors = 1
if("show_event_managers")
config.show_event_managers = 1
@@ -955,10 +959,10 @@ var/list/gamemode_cache = list()
if("suggested_byond_version")
config.suggested_byond_version = text2num(value)
if("suggested_byond_build")
config.suggested_byond_build = text2num(value)
// VOREStation Edit Start - Can't be in _vr file because it is loaded too late.
if("vgs_access_identifier")
config.vgs_access_identifier = value
+2 -2
View File
@@ -350,13 +350,13 @@ SUBSYSTEM_DEF(game_master)
choose_game_master(usr)
if(href_list["set_staleness"])
var/amount = input(usr, "How much staleness should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much staleness should there be?", "Game Master")
if(!isnull(amount))
staleness = amount
message_admins("GM staleness was set to [amount] by [usr.key].")
if(href_list["set_danger"])
var/amount = input(usr, "How much danger should there be?", "Game Master") as null|num
var/amount = tgui_input_number(usr, "How much danger should there be?", "Game Master")
if(!isnull(amount))
danger = amount
message_admins("GM danger was set to [amount] by [usr.key].")
+5 -4
View File
@@ -131,12 +131,13 @@ SUBSYSTEM_DEF(job)
return department_datums[primary_department]
/datum/controller/subsystem/job/proc/get_ping_role(var/role)
var/datum/job/J = get_job(role)
if(J.requestable)
return get_primary_department_of_job(J)
// Someday it might be good to port code/game/jobs/job_controller.dm to here and clean it up.
/datum/controller/subsystem/job/proc/job_debug_message(message)
if(debug_messages)
log_debug("JOB DEBUG: [message]")
+6 -6
View File
@@ -74,7 +74,7 @@ SUBSYSTEM_DEF(media_tracks)
return
// Required
var/url = input(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL") as message|null
var/url = tgui_input_text(C, "REQUIRED: Provide URL for track, or paste JSON if you know what you're doing. See code comments.", "Track URL", multiline = TRUE)
if(!url)
return
@@ -112,20 +112,20 @@ SUBSYSTEM_DEF(media_tracks)
sort_tracks()
return
var/title = input(C, "REQUIRED: Provide title for track", "Track Title") as text|null
var/title = tgui_input_text(C, "REQUIRED: Provide title for track", "Track Title")
if(!title)
return
var/duration = input(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration") as num|null
var/duration = tgui_input_number(C, "REQUIRED: Provide duration for track (in deciseconds, aka seconds*10)", "Track Duration")
if(!duration)
return
// Optional
var/artist = input(C, "Optional: Provide artist for track", "Track Artist") as text|null
var/artist = tgui_input_text(C, "Optional: Provide artist for track", "Track Artist")
if(isnull(artist)) // Cancel rather than empty string
return
var/genre = input(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre") as text|null
var/genre = tgui_input_text(C, "Optional: Provide genre for track (try to match an existing one)", "Track Genre")
if(isnull(genre)) // Cancel rather than empty string
return
@@ -160,7 +160,7 @@ SUBSYSTEM_DEF(media_tracks)
if(!check_rights(R_DEBUG|R_FUN))
return
var/track = input(C, "Input track title or URL to remove (must be exact)", "Remove Track") as text|null
var/track = tgui_input_text(C, "Input track title or URL to remove (must be exact)", "Remove Track")
if(!track)
return
@@ -59,6 +59,8 @@ SUBSYSTEM_DEF(persist)
var/client/C = M.client
var/wait_in_hours = wait / (1 HOUR)
var/pto_factored = wait_in_hours * J.timeoff_factor
if(J.playtime_only)
pto_factored = 0
LAZYINITLIST(C.department_hours)
LAZYINITLIST(C.play_hours)
var/dept_hours = C.department_hours
+3 -3
View File
@@ -363,15 +363,15 @@ SUBSYSTEM_DEF(supply)
// Will add an item entry to the specified export receipt on the user-side list
/datum/controller/subsystem/supply/proc/add_export_item(var/datum/exported_crate/E, var/mob/user)
var/new_name = input(user, "Name", "Please enter the name of the item.") as null|text
var/new_name = tgui_input_text(user, "Name", "Please enter the name of the item.")
if(!new_name)
return
var/new_quantity = input(user, "Name", "Please enter the quantity of the item.") as null|num
var/new_quantity = tgui_input_number(user, "Name", "Please enter the quantity of the item.")
if(!new_quantity)
return
var/new_value = input(user, "Name", "Please enter the value of the item.") as null|num
var/new_value = tgui_input_number(user, "Name", "Please enter the value of the item.")
if(!new_value)
return
+4
View File
@@ -23,6 +23,10 @@ SUBSYSTEM_DEF(tgui)
/datum/controller/subsystem/tgui/PreInit()
basehtml = file2text('tgui/public/tgui.html')
// Inject inline polyfills
var/polyfill = file2text('tgui/public/tgui-polyfill.min.js')
polyfill = "<script>\n[polyfill]\n</script>"
basehtml = replacetextEx(basehtml, "<!-- tgui:inline-polyfill -->", polyfill)
/datum/controller/subsystem/tgui/Shutdown()
close_all_uis()
+3
View File
@@ -145,6 +145,9 @@ SUBSYSTEM_DEF(throwing)
AM.Move(step, get_dir(AM, step))
if (!AM) // Us moving somehow destroyed us?
return
if (!AM.throwing) // we hit something during our move
finalize(hit = TRUE)
return
+9 -4
View File
@@ -50,9 +50,9 @@ var/global/datum/controller/subsystem/ticker/ticker
pregame_timeleft = config.pregame_time
send2mainirc("Server lobby is loaded and open at byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]")
SSwebhooks.send(
WEBHOOK_ROUNDPREP,
WEBHOOK_ROUNDPREP,
list(
"map" = station_name(),
"map" = station_name(),
"url" = get_world_url()
)
)
@@ -397,14 +397,19 @@ var/global/datum/controller/subsystem/ticker/ticker
if(player && player.ready && player.mind?.assigned_role)
var/datum/job/J = SSjob.get_job(player.mind.assigned_role)
// Ask their new_player mob to spawn them
if(!player.spawn_checks_vr(player.mind.assigned_role))
var/datum/job/job_datum = job_master.GetJob(J.title)
job_datum.current_positions--
player.mind.assigned_role = null
continue //VOREStation Add
// Snowflakey AI treatment
if(J?.mob_type & JOB_SILICON_AI)
player.close_spawn_windows()
player.AIize(move = TRUE)
continue
// Ask their new_player mob to spawn them
if(!player.spawn_checks_vr(player.mind.assigned_role)) continue //VOREStation Add
var/mob/living/carbon/human/new_char = player.create_character()
// Created their playable character, delete their /mob/new_player
+8 -3
View File
@@ -231,11 +231,11 @@ SUBSYSTEM_DEF(vote)
choices.Add(antag.role_text)
choices.Add("None")
if(VOTE_CUSTOM)
question = sanitizeSafe(input(usr, "What is the vote for?") as text|null)
question = sanitizeSafe(tgui_input_text(usr, "What is the vote for?"))
if(!question)
return 0
for(var/i = 1 to 10)
var/option = capitalize(sanitize(input(usr, "Please enter an option or hit cancel to finish") as text|null))
var/option = capitalize(sanitize(tgui_input_text(usr, "Please enter an option or hit cancel to finish")))
if(!option || mode || !usr.client)
break
choices.Add(option)
@@ -362,7 +362,12 @@ SUBSYSTEM_DEF(vote)
if(VOTE_RESTART)
if(config.allow_vote_restart || usr.client.holder)
initiate_vote(VOTE_RESTART, usr.key)
var/admin_number_present = send2irc_adminless_only(usr.ckey, usr)
if(admin_number_present <= 0 || usr.client.holder)
if(tgui_alert(usr, "Are you sure you want to start a RESTART VOTE? You should only do this if the server is dying and no staff are around to investigate.", "RESTART VOTE", list("No", "Yes I want to start a RESTART VOTE")) == "Yes I want to start a RESTART VOTE")
initiate_vote(VOTE_RESTART, usr.key)
else
to_chat(usr, "<span class = 'warning'>You can't start a RESTART VOTE while there are staff around. If you are having an issue with the round, please ahelp it.</span>")
if(VOTE_GAMEMODE)
if(config.allow_vote_mode || usr.client.holder)
initiate_vote(VOTE_GAMEMODE, usr.key)