* Replaced the lobby menu (with actual art) (#60953) * a * a * Update new_player.dm * Update new_player.dm * Update new_player.dm * a * a * Update new_player.dm Co-authored-by: AMonkeyThatCodes <20987591+AMonkeyThatCodes@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
@@ -1434,3 +1434,10 @@
|
||||
|
||||
/// Called on the organ when it is removed from someone (mob/living/carbon/old_owner)
|
||||
#define COMSIG_ORGAN_REMOVED "comsig_organ_removed"
|
||||
|
||||
|
||||
///Called when the ticker enters the pre-game phase
|
||||
#define COMSIG_TICKER_ENTER_PREGAME "comsig_ticker_enter_pregame"
|
||||
|
||||
///Called when the ticker sets up the game for start
|
||||
#define COMSIG_TICKER_ENTER_SETTING_UP "comsig_ticker_enter_setting_up"
|
||||
|
||||
@@ -191,6 +191,9 @@
|
||||
#define SPLASHSCREEN_PLANE 9999
|
||||
#define SPLASHSCREEN_RENDER_TARGET "SPLASHSCREEN_PLANE"
|
||||
|
||||
#define LOBBY_BACKGROUND_LAYER 3
|
||||
#define LOBBY_BUTTON_LAYER 4
|
||||
|
||||
///cinematics are "below" the splash screen
|
||||
#define CINEMATIC_LAYER -1
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
//Ready states at roundstart for mob/dead/new_player
|
||||
#define PLAYER_NOT_READY 0
|
||||
#define PLAYER_READY_TO_PLAY 1
|
||||
#define PLAYER_READY_TO_OBSERVE 2
|
||||
|
||||
//movement intent defines for the m_intent var
|
||||
#define MOVE_INTENT_WALK "walk"
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
/datum/hud/new_player
|
||||
|
||||
/datum/hud/new_player/New(mob/owner)
|
||||
..()
|
||||
if (owner?.client?.interviewee)
|
||||
return
|
||||
var/list/buttons = subtypesof(/atom/movable/screen/lobby)
|
||||
for(var/button in buttons)
|
||||
var/atom/movable/screen/lobbyscreen = new button()
|
||||
lobbyscreen.hud = src
|
||||
static_inventory += lobbyscreen
|
||||
|
||||
/atom/movable/screen/lobby
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
layer = LOBBY_BUTTON_LAYER
|
||||
screen_loc = "TOP,CENTER"
|
||||
|
||||
/atom/movable/screen/lobby/background
|
||||
layer = LOBBY_BACKGROUND_LAYER
|
||||
icon = 'icons/hud/lobby/background.dmi'
|
||||
icon_state = "background"
|
||||
screen_loc = "TOP,CENTER:-61"
|
||||
|
||||
/atom/movable/screen/lobby/button
|
||||
///Is the button currently enabled?
|
||||
var/enabled = TRUE
|
||||
///Is the button currently being hovered over with the mouse?
|
||||
var/highlighted = FALSE
|
||||
|
||||
/atom/movable/screen/lobby/button/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!enabled)
|
||||
return
|
||||
flick("[base_icon_state]_pressed", src)
|
||||
update_appearance(UPDATE_ICON)
|
||||
SEND_SOUND(hud.mymob, sound('modular_skyrat/master_files/sound/effects/save.ogg')) //SKYRAT EDIT ADDITION
|
||||
return TRUE
|
||||
|
||||
/atom/movable/screen/lobby/button/MouseEntered(location,control,params)
|
||||
. = ..()
|
||||
highlighted = TRUE
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/atom/movable/screen/lobby/button/MouseExited()
|
||||
. = ..()
|
||||
highlighted = FALSE
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
/atom/movable/screen/lobby/button/update_icon(updates)
|
||||
. = ..()
|
||||
if(!enabled)
|
||||
icon_state = "[base_icon_state]_disabled"
|
||||
return
|
||||
else if(highlighted)
|
||||
icon_state = "[base_icon_state]_highlighted"
|
||||
return
|
||||
icon_state = base_icon_state
|
||||
|
||||
/atom/movable/screen/lobby/button/proc/set_button_status(status)
|
||||
if(status == enabled)
|
||||
return FALSE
|
||||
enabled = status
|
||||
update_appearance(UPDATE_ICON)
|
||||
return TRUE
|
||||
|
||||
///Prefs menu
|
||||
/atom/movable/screen/lobby/button/character_setup
|
||||
screen_loc = "TOP:-70,CENTER:-54"
|
||||
icon = 'icons/hud/lobby/character_setup.dmi'
|
||||
icon_state = "character_setup"
|
||||
base_icon_state = "character_setup"
|
||||
|
||||
/atom/movable/screen/lobby/button/character_setup/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
hud.mymob.client.prefs.ShowChoices(hud.mymob)
|
||||
|
||||
///Button that appears before the game has started
|
||||
/atom/movable/screen/lobby/button/ready
|
||||
screen_loc = "TOP:-8,CENTER:-65"
|
||||
icon = 'icons/hud/lobby/ready.dmi'
|
||||
icon_state = "not_ready"
|
||||
base_icon_state = "not_ready"
|
||||
var/ready = FALSE
|
||||
|
||||
/atom/movable/screen/lobby/button/ready/Initialize(mapload)
|
||||
. = ..()
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
set_button_status(FALSE)
|
||||
else
|
||||
RegisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP, .proc/hide_ready_button)
|
||||
|
||||
/atom/movable/screen/lobby/button/ready/proc/hide_ready_button()
|
||||
SIGNAL_HANDLER
|
||||
set_button_status(FALSE)
|
||||
UnregisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP)
|
||||
|
||||
/atom/movable/screen/lobby/button/ready/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
ready = !ready
|
||||
if(ready)
|
||||
new_player.ready = PLAYER_READY_TO_PLAY
|
||||
base_icon_state = "ready"
|
||||
else
|
||||
new_player.ready = PLAYER_NOT_READY
|
||||
base_icon_state = "not_ready"
|
||||
update_appearance(UPDATE_ICON)
|
||||
|
||||
///Shown when the game has started
|
||||
/atom/movable/screen/lobby/button/join
|
||||
screen_loc = "TOP:-13,CENTER:-58"
|
||||
icon = 'icons/hud/lobby/join.dmi'
|
||||
icon_state = "" //Default to not visible
|
||||
base_icon_state = "join_game"
|
||||
enabled = FALSE
|
||||
|
||||
/atom/movable/screen/lobby/button/join/Initialize(mapload)
|
||||
. = ..()
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
set_button_status(TRUE)
|
||||
else
|
||||
RegisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP, .proc/show_join_button)
|
||||
|
||||
/atom/movable/screen/lobby/button/join/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!SSticker?.IsRoundInProgress())
|
||||
to_chat(hud.mymob, span_boldwarning("The round is either not ready, or has already finished..."))
|
||||
return
|
||||
|
||||
//Determines Relevent Population Cap
|
||||
var/relevant_cap
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
var/epc = CONFIG_GET(number/extreme_popcap)
|
||||
if(hpc && epc)
|
||||
relevant_cap = min(hpc, epc)
|
||||
else
|
||||
relevant_cap = max(hpc, epc)
|
||||
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
|
||||
if(SSticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(new_player.key) in GLOB.admin_datums)))
|
||||
to_chat(new_player, span_danger("[CONFIG_GET(string/hard_popcap_message)]"))
|
||||
|
||||
var/queue_position = SSticker.queued_players.Find(new_player)
|
||||
if(queue_position == 1)
|
||||
to_chat(new_player, span_notice("You are next in line to join the game. You will be notified when a slot opens up."))
|
||||
else if(queue_position)
|
||||
to_chat(new_player, span_notice("There are [queue_position-1] players in front of you in the queue to join the game."))
|
||||
else
|
||||
SSticker.queued_players += new_player
|
||||
to_chat(new_player, span_notice("You have been added to the queue to join the game. Your position in queue is [SSticker.queued_players.len]."))
|
||||
return
|
||||
new_player.LateChoices()
|
||||
|
||||
/atom/movable/screen/lobby/button/join/proc/show_join_button(status)
|
||||
SIGNAL_HANDLER
|
||||
set_button_status(TRUE)
|
||||
UnregisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP)
|
||||
|
||||
/atom/movable/screen/lobby/button/observe
|
||||
screen_loc = "TOP:-40,CENTER:-54"
|
||||
icon = 'icons/hud/lobby/observe.dmi'
|
||||
icon_state = "observe_disabled"
|
||||
base_icon_state = "observe"
|
||||
enabled = FALSE
|
||||
|
||||
/atom/movable/screen/lobby/button/observe/Initialize(mapload)
|
||||
. = ..()
|
||||
if(SSticker.current_state > GAME_STATE_STARTUP)
|
||||
set_button_status(TRUE)
|
||||
else
|
||||
RegisterSignal(SSticker, COMSIG_TICKER_ENTER_PREGAME, .proc/enable_observing)
|
||||
|
||||
/atom/movable/screen/lobby/button/observe/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
new_player.make_me_an_observer()
|
||||
|
||||
/atom/movable/screen/lobby/button/observe/proc/enable_observing()
|
||||
SIGNAL_HANDLER
|
||||
flick("[base_icon_state]_enabled", src)
|
||||
set_button_status(TRUE)
|
||||
UnregisterSignal(SSticker, COMSIG_TICKER_ENTER_PREGAME, .proc/enable_observing)
|
||||
|
||||
|
||||
/* This is here for a future settings menu that will come with the prefs rework, if this is not in by 2022 kill mothblocks.
|
||||
/atom/movable/screen/lobby/button/settings
|
||||
icon = 'icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "settings"
|
||||
base_icon_state = "settings"
|
||||
screen_loc = "TOP:-122,CENTER:+58"
|
||||
|
||||
/atom/movable/screen/lobby/button/settings/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
hud.mymob.client.prefs.ShowChoices(hud.mymob)
|
||||
*/
|
||||
|
||||
|
||||
/atom/movable/screen/lobby/button/changelog_button
|
||||
icon = 'icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "changelog"
|
||||
base_icon_state = "changelog"
|
||||
screen_loc ="TOP:-122,CENTER:+58"
|
||||
|
||||
|
||||
/atom/movable/screen/lobby/button/crew_manifest
|
||||
icon = 'icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "crew_manifest"
|
||||
base_icon_state = "crew_manifest"
|
||||
screen_loc = "TOP:-122,CENTER:+30"
|
||||
|
||||
/atom/movable/screen/lobby/button/crew_manifest/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
new_player.ViewManifest()
|
||||
|
||||
/atom/movable/screen/lobby/button/changelog_button/Click(location, control, params)
|
||||
. = ..()
|
||||
usr.client?.changelog()
|
||||
|
||||
/atom/movable/screen/lobby/button/poll
|
||||
icon = 'icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "poll"
|
||||
base_icon_state = "poll"
|
||||
screen_loc = "TOP:-122,CENTER:+2"
|
||||
|
||||
var/new_poll = FALSE
|
||||
|
||||
///Need to use New due to init
|
||||
/atom/movable/screen/lobby/button/poll/New(loc, ...)
|
||||
. = ..()
|
||||
if(!usr) //
|
||||
return
|
||||
var/mob/dead/new_player/new_player = usr
|
||||
if(IsGuestKey(new_player.key))
|
||||
set_button_status(FALSE)
|
||||
return
|
||||
if(!SSdbcore.Connect())
|
||||
set_button_status(FALSE)
|
||||
return
|
||||
var/isadmin = FALSE
|
||||
if(new_player.client?.holder)
|
||||
isadmin = TRUE
|
||||
var/datum/db_query/query_get_new_polls = SSdbcore.NewQuery({"
|
||||
SELECT id FROM [format_table_name("poll_question")]
|
||||
WHERE (adminonly = 0 OR :isadmin = 1)
|
||||
AND Now() BETWEEN starttime AND endtime
|
||||
AND deleted = 0
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_vote")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_textreply")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
"}, list("isadmin" = isadmin, "ckey" = new_player.ckey))
|
||||
if(!query_get_new_polls.Execute())
|
||||
qdel(query_get_new_polls)
|
||||
set_button_status(FALSE)
|
||||
return
|
||||
if(query_get_new_polls.NextRow())
|
||||
new_poll = TRUE
|
||||
else
|
||||
new_poll = FALSE
|
||||
update_appearance(UPDATE_OVERLAYS)
|
||||
qdel(query_get_new_polls)
|
||||
if(QDELETED(new_player))
|
||||
set_button_status(FALSE)
|
||||
return
|
||||
|
||||
/atom/movable/screen/lobby/button/poll/update_overlays()
|
||||
. = ..()
|
||||
if(new_poll)
|
||||
. += mutable_appearance('icons/hud/lobby/poll_overlay.dmi', "new_poll")
|
||||
|
||||
/atom/movable/screen/lobby/button/poll/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
new_player.handle_player_polling()
|
||||
@@ -673,7 +673,6 @@
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
var/client/holder
|
||||
|
||||
/* SKYRAT EDIT REMOVAL
|
||||
/atom/movable/screen/splash/New(client/C, visible, use_previous_title) //TODO: Make this use INITIALIZE_IMMEDIATE, except its not easy
|
||||
. = ..()
|
||||
if(!istype(C))
|
||||
@@ -694,7 +693,6 @@
|
||||
icon = SStitle.previous_icon
|
||||
|
||||
holder.screen += src
|
||||
*/
|
||||
|
||||
/atom/movable/screen/splash/proc/Fade(out, qdel_after = TRUE)
|
||||
if(QDELETED(src))
|
||||
|
||||
@@ -203,8 +203,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
if(init_sss)
|
||||
init_subtypes(/datum/controller/subsystem, subsystems)
|
||||
|
||||
//to_chat(world, span_boldannounce("Initializing subsystems..."))
|
||||
add_startupmessage("Initializing subsystems...") //SKYRAT EDIT CHANGE
|
||||
to_chat(world, span_boldannounce("Initializing subsystems..."))
|
||||
|
||||
// Sort subsystems by init_order, so they initialize in the correct order.
|
||||
sortTim(subsystems, /proc/cmp_subsystem_init)
|
||||
@@ -245,7 +244,6 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10
|
||||
// Loop.
|
||||
Master.StartProcessing(0)
|
||||
add_startupmessage("Clearing clutter...") //SKYRAT EDIT ADDITION
|
||||
|
||||
/datum/controller/master/proc/SetRunLevel(new_runlevel)
|
||||
var/old_runlevel = current_runlevel
|
||||
|
||||
@@ -246,8 +246,7 @@
|
||||
SEND_SIGNAL(src, COMSIG_SUBSYSTEM_POST_INITIALIZE, start_timeofday)
|
||||
var/time = (REALTIMEOFDAY - start_timeofday) / 10
|
||||
var/msg = "Initialized [name] subsystem within [time] second[time == 1 ? "" : "s"]!"
|
||||
//to_chat(world, span_boldannounce("[msg]"))
|
||||
add_startupmessage(msg) //SKYRAT EDIT CHANGE
|
||||
to_chat(world, span_boldannounce("[msg]"))
|
||||
log_world(msg)
|
||||
return time
|
||||
|
||||
|
||||
@@ -729,7 +729,6 @@ SUBSYSTEM_DEF(job)
|
||||
to_chat(player, "<span class='infoplain'><b>You have failed to qualify for any job you desired.</b></span>")
|
||||
unassigned -= player
|
||||
player.ready = PLAYER_NOT_READY
|
||||
player.client << output(player.ready, "lobbybrowser:imgsrc") //SKYRAT EDIT ADDITION
|
||||
|
||||
|
||||
/datum/controller/subsystem/job/Recover()
|
||||
|
||||
@@ -285,8 +285,7 @@ Used by the AI doomsday and the self-destruct nuke.
|
||||
if (!pm.load(1, 1, start_z + parsed_maps[P], no_changeturf = TRUE))
|
||||
errorList |= pm.original_path
|
||||
if(!silent)
|
||||
//INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
add_startupmessage("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!") //SKYRAT EDIT CHANGE
|
||||
INIT_ANNOUNCE("Loaded [name] in [(REALTIMEOFDAY - start_time)/10]s!")
|
||||
return parsed_maps
|
||||
|
||||
/datum/controller/subsystem/mapping/proc/loadWorld()
|
||||
@@ -298,8 +297,7 @@ Used by the AI doomsday and the self-destruct nuke.
|
||||
|
||||
// load the station
|
||||
station_start = world.maxz + 1
|
||||
//INIT_ANNOUNCE("Loading [config.map_name]...") SKYRAT EDIT REMOVAL
|
||||
add_startupmessage("Loading [config.map_name]...")
|
||||
INIT_ANNOUNCE("Loading [config.map_name]...")
|
||||
LoadGroup(FailedZs, "Station", config.map_path, config.map_file, config.traits, ZTRAITS_STATION)
|
||||
|
||||
if(SSdbcore.Connect())
|
||||
@@ -320,13 +318,13 @@ Used by the AI doomsday and the self-destruct nuke.
|
||||
var/mining_traits_to_load = GLOB.mining_traits[SSrandommining.traits]
|
||||
if(config.minetype != "none")
|
||||
if(mining_map_to_load)
|
||||
add_startupmessage("MINING MAP: Loading mining level...")
|
||||
INIT_ANNOUNCE("MINING MAP: Loading mining level...")
|
||||
if(!mining_traits_to_load)
|
||||
add_startupmessage("MINING MAP ERROR: No z-level traits detected, loading without traits.")
|
||||
INIT_ANNOUNCE("MINING MAP ERROR: No z-level traits detected, loading without traits.")
|
||||
LoadGroup(FailedZs, "Mining Level", "map_files/Mining", mining_map_to_load, default_traits = mining_traits_to_load)
|
||||
add_startupmessage("MINING MAP: Loaded successfully.")
|
||||
INIT_ANNOUNCE("MINING MAP: Loaded successfully.")
|
||||
if(!mining_map_to_load)
|
||||
add_startupmessage("MINING MAP ERROR: No loadable map z-levels detected, reverting to backup mining system!")
|
||||
INIT_ANNOUNCE("MINING MAP ERROR: No loadable map z-levels detected, reverting to backup mining system!")
|
||||
if(config.minetype == "lavaland")
|
||||
LoadGroup(FailedZs, "Lavaland", "map_files/Mining", "Lavaland.dmm", default_traits = ZTRAITS_LAVALAND)
|
||||
else if (!isnull(config.minetype) && config.minetype != "none")
|
||||
|
||||
@@ -158,9 +158,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
discord_alerted = TRUE
|
||||
send2chat("<@&[CONFIG_GET(string/game_alert_role_id)]> New round starting on [SSmapping.config.map_name], [CONFIG_GET(string/servername)]! \nIf you wish to be pinged for game related stuff, go to <#[CONFIG_GET(string/role_assign_channel_id)]> and assign yourself the roles.", CONFIG_GET(string/chat_announce_new_game)) // Skyrat EDIT -- role pingcurrent_state = GAME_STATE_PREGAME
|
||||
current_state = GAME_STATE_PREGAME
|
||||
change_lobbyscreen() //SKYRAT EDIT ADDITION
|
||||
//Everyone who wants to be an observer is now spawned
|
||||
create_observers()
|
||||
SEND_SIGNAL(src, COMSIG_TICKER_ENTER_PREGAME)
|
||||
fire()
|
||||
if(GAME_STATE_PREGAME)
|
||||
//lobby stats for statpanels
|
||||
@@ -186,6 +185,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
tipped = TRUE
|
||||
|
||||
if(timeLeft <= 0)
|
||||
SEND_SIGNAL(src, COMSIG_TICKER_ENTER_SETTING_UP)
|
||||
current_state = GAME_STATE_SETTING_UP
|
||||
Master.SetRunLevel(RUNLEVEL_SETUP)
|
||||
if(start_immediately)
|
||||
@@ -342,11 +342,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
GLOB.joined_player_list += player.ckey
|
||||
var/atom/destination = player.mind.assigned_role.get_roundstart_spawn_point()
|
||||
if(!destination) // Failed to fetch a proper roundstart location, won't be going anywhere.
|
||||
player.show_titlescreen() //SKYRAT EDIT CHANGE
|
||||
continue
|
||||
player.create_character(destination)
|
||||
else
|
||||
player.show_titlescreen() //SKYRAT EDIT ADDITION
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/collect_minds()
|
||||
@@ -651,14 +649,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
else
|
||||
timeLeft = newtime
|
||||
|
||||
//Everyone who wanted to be an observer gets made one now
|
||||
/datum/controller/subsystem/ticker/proc/create_observers()
|
||||
for(var/i in GLOB.new_player_list)
|
||||
var/mob/dead/new_player/player = i
|
||||
if(player.ready == PLAYER_READY_TO_OBSERVE && player.mind)
|
||||
//Break chain since this has a sleep input in it
|
||||
addtimer(CALLBACK(player, /mob/dead/new_player.proc/make_me_an_observer), 1)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/SetRoundEndSound(the_sound)
|
||||
set waitfor = FALSE
|
||||
round_end_sound_sent = FALSE
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
/* SKYRAT EDIT REMOVAL - MOVED TO MODULAR
|
||||
SUBSYSTEM_DEF(title)
|
||||
name = "Title Screen"
|
||||
flags = SS_NO_FIRE
|
||||
@@ -67,4 +66,3 @@ SUBSYSTEM_DEF(title)
|
||||
splash_turf = SStitle.splash_turf
|
||||
file_path = SStitle.file_path
|
||||
previous_icon = SStitle.previous_icon
|
||||
*/
|
||||
|
||||
@@ -144,6 +144,5 @@
|
||||
CHECK_TICK
|
||||
|
||||
var/message = "[name] finished in [(REALTIMEOFDAY - start_time)/10]s!"
|
||||
//to_chat(world, span_boldannounce("[message]"))
|
||||
add_startupmessage(message) //SKYRAT EDIT CHANGE
|
||||
to_chat(world, span_boldannounce("[message]"))
|
||||
log_world(message)
|
||||
|
||||
@@ -60,7 +60,6 @@
|
||||
plane = SPLASHSCREEN_PLANE
|
||||
bullet_bounce_sound = null
|
||||
|
||||
/* SKYRAT EDIT REMOVAL
|
||||
/turf/closed/indestructible/splashscreen/New()
|
||||
SStitle.splash_turf = src
|
||||
if(SStitle.icon)
|
||||
@@ -73,7 +72,6 @@
|
||||
switch(var_name)
|
||||
if(NAMEOF(src, icon))
|
||||
SStitle.icon = icon
|
||||
*/
|
||||
|
||||
/turf/closed/indestructible/reinforced
|
||||
name = "reinforced wall"
|
||||
|
||||
@@ -97,9 +97,6 @@ GLOBAL_PROTECT(admin_verbs_ban)
|
||||
GLOBAL_LIST_INIT(admin_verbs_sounds, list(/client/proc/play_local_sound, /client/proc/play_direct_mob_sound, /client/proc/play_sound, /client/proc/set_round_end_sound))
|
||||
GLOBAL_PROTECT(admin_verbs_sounds)
|
||||
GLOBAL_LIST_INIT(admin_verbs_fun, list(
|
||||
/client/proc/change_title_screen, //SKYRAT EDIT ADDITION
|
||||
/client/proc/change_title_screen_notice, //SKYRAT EDIT ADDITION
|
||||
/client/proc/change_title_screen_html, //SKYRAT EDIT ADDITION
|
||||
/client/proc/one_click_antag, // SKYRAT EDIT ADDITION - ONE CLICK ANTAG
|
||||
/client/proc/cmd_select_equipment,
|
||||
/client/proc/cmd_admin_gib_self,
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
mind = new /datum/mind(key)
|
||||
mind.active = TRUE
|
||||
mind.set_current(src)
|
||||
my_client = client //SKYRAT EDIT ADDITION
|
||||
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
@@ -29,6 +28,9 @@
|
||||
|
||||
client.playtitlemusic()
|
||||
|
||||
var/datum/asset/asset_datum = get_asset_datum(/datum/asset/simple/lobby)
|
||||
asset_datum.send(client)
|
||||
|
||||
// Check if user should be added to interview queue
|
||||
if (!client.holder && CONFIG_GET(flag/panic_bunker) && CONFIG_GET(flag/panic_bunker_interview) && !(client.ckey in GLOB.interviews.approved_ckeys))
|
||||
var/required_living_minutes = CONFIG_GET(number/panic_bunker_living)
|
||||
@@ -38,10 +40,7 @@
|
||||
register_for_interview()
|
||||
return
|
||||
|
||||
show_titlescreen() //SKYRAT EDIT CHANGE
|
||||
/* SKYRAT EDIT REMOVAL
|
||||
if(SSticker.current_state < GAME_STATE_SETTING_UP)
|
||||
var/tl = SSticker.GetTimeLeft()
|
||||
to_chat(src, "Please set up your character and select \"Ready\". The game will start [tl > 0 ? "in about [DisplayTimeText(tl)]" : "soon"].")
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
/* SKYRAT EDIT REMOVAL - MOVED TO MODULAR
|
||||
#define LINKIFY_READY(string, value) "<a href='byond://?src=[REF(src)];ready=[value]'>[string]</a>"
|
||||
|
||||
/mob/dead/new_player
|
||||
var/ready = 0
|
||||
var/spawning = 0//Referenced when you want to delete the new_player later on in the code.
|
||||
|
||||
flags_1 = NONE
|
||||
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
|
||||
density = FALSE
|
||||
stat = DEAD
|
||||
hud_type = /datum/hud/new_player
|
||||
hud_possible = list()
|
||||
|
||||
var/mob/living/new_character //for instant transfer once the round is set up
|
||||
|
||||
//Used to make sure someone doesn't get spammed with messages if they're ineligible for roles
|
||||
var/ready = FALSE
|
||||
/// Referenced when you want to delete the new_player later on in the code.
|
||||
var/spawning = FALSE
|
||||
/// For instant transfer once the round is set up
|
||||
var/mob/living/new_character
|
||||
///Used to make sure someone doesn't get spammed with messages if they're ineligible for roles.
|
||||
var/ineligible_for_roles = FALSE
|
||||
|
||||
|
||||
|
||||
/mob/dead/new_player/Initialize()
|
||||
if(client && SSticker.state == GAME_STATE_STARTUP)
|
||||
var/atom/movable/screen/splash/S = new(client, TRUE, TRUE)
|
||||
@@ -42,75 +41,6 @@
|
||||
/mob/dead/new_player/prepare_huds()
|
||||
return
|
||||
|
||||
/**
|
||||
* This proc generates the panel that opens to all newly joining players, allowing them to join, observe, view polls, view the current crew manifest, and open the character customization menu.
|
||||
*/
|
||||
/mob/dead/new_player/proc/new_player_panel()
|
||||
if (client?.interviewee)
|
||||
return
|
||||
|
||||
var/datum/asset/asset_datum = get_asset_datum(/datum/asset/simple/lobby)
|
||||
asset_datum.send(client)
|
||||
var/list/output = list("<center><p><a href='byond://?src=[REF(src)];show_preferences=1'>Setup Character</a></p>")
|
||||
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
switch(ready)
|
||||
if(PLAYER_NOT_READY)
|
||||
output += "<p>\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | <b>Not Ready</b> | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]</p>"
|
||||
if(PLAYER_READY_TO_PLAY)
|
||||
output += "<p>\[ <b>Ready</b> | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | [LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)] \]</p>"
|
||||
if(PLAYER_READY_TO_OBSERVE)
|
||||
output += "<p>\[ [LINKIFY_READY("Ready", PLAYER_READY_TO_PLAY)] | [LINKIFY_READY("Not Ready", PLAYER_NOT_READY)] | <b> Observe </b> \]</p>"
|
||||
else
|
||||
output += "<p><a href='byond://?src=[REF(src)];manifest=1'>View the Crew Manifest</a></p>"
|
||||
output += "<p><a href='byond://?src=[REF(src)];late_join=1'>Join Game!</a></p>"
|
||||
output += "<p>[LINKIFY_READY("Observe", PLAYER_READY_TO_OBSERVE)]</p>"
|
||||
|
||||
if(!IsGuestKey(src.key))
|
||||
output += playerpolls()
|
||||
|
||||
output += "</center>"
|
||||
|
||||
var/datum/browser/popup = new(src, "playersetup", "<div align='center'>New Player Options</div>", 250, 265)
|
||||
popup.set_window_options("can_close=0")
|
||||
popup.set_content(output.Join())
|
||||
popup.open(FALSE)
|
||||
|
||||
/mob/dead/new_player/proc/playerpolls()
|
||||
var/list/output = list()
|
||||
if (SSdbcore.Connect())
|
||||
var/isadmin = FALSE
|
||||
if(client?.holder)
|
||||
isadmin = TRUE
|
||||
var/datum/db_query/query_get_new_polls = SSdbcore.NewQuery({"
|
||||
SELECT id FROM [format_table_name("poll_question")]
|
||||
WHERE (adminonly = 0 OR :isadmin = 1)
|
||||
AND Now() BETWEEN starttime AND endtime
|
||||
AND deleted = 0
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_vote")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_textreply")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
"}, list("isadmin" = isadmin, "ckey" = ckey))
|
||||
var/rs = REF(src)
|
||||
if(!query_get_new_polls.Execute())
|
||||
qdel(query_get_new_polls)
|
||||
return
|
||||
if(query_get_new_polls.NextRow())
|
||||
output += "<p><b><a href='byond://?src=[rs];showpoll=1'>Show Player Polls</A> (NEW!)</b></p>"
|
||||
else
|
||||
output += "<p><a href='byond://?src=[rs];showpoll=1'>Show Player Polls</A></p>"
|
||||
qdel(query_get_new_polls)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
return output
|
||||
|
||||
/mob/dead/new_player/Topic(href, href_list[])
|
||||
if(src != usr)
|
||||
return
|
||||
@@ -121,61 +51,12 @@
|
||||
if(client.interviewee)
|
||||
return FALSE
|
||||
|
||||
//Determines Relevent Population Cap
|
||||
var/relevant_cap
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
var/epc = CONFIG_GET(number/extreme_popcap)
|
||||
if(hpc && epc)
|
||||
relevant_cap = min(hpc, epc)
|
||||
else
|
||||
relevant_cap = max(hpc, epc)
|
||||
|
||||
if(href_list["show_preferences"])
|
||||
client.prefs.ShowChoices(src)
|
||||
return TRUE
|
||||
|
||||
if(href_list["ready"])
|
||||
var/tready = text2num(href_list["ready"])
|
||||
//Avoid updating ready if we're after PREGAME (they should use latejoin instead)
|
||||
//This is likely not an actual issue but I don't have time to prove that this
|
||||
//no longer is required
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
ready = tready
|
||||
//if it's post initialisation and they're trying to observe we do the needful
|
||||
if(!SSticker.current_state < GAME_STATE_PREGAME && tready == PLAYER_READY_TO_OBSERVE)
|
||||
ready = tready
|
||||
make_me_an_observer()
|
||||
return
|
||||
|
||||
if(href_list["refresh"])
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
new_player_panel()
|
||||
|
||||
if(href_list["late_join"])
|
||||
if(href_list["late_join"]) //This still exists for queue messages in chat
|
||||
if(!SSticker?.IsRoundInProgress())
|
||||
to_chat(usr, span_boldwarning("The round is either not ready, or has already finished..."))
|
||||
return
|
||||
|
||||
if(href_list["late_join"] == "override")
|
||||
LateChoices()
|
||||
return
|
||||
|
||||
if(SSticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in GLOB.admin_datums)))
|
||||
to_chat(usr, span_danger("[CONFIG_GET(string/hard_popcap_message)]"))
|
||||
|
||||
var/queue_position = SSticker.queued_players.Find(usr)
|
||||
if(queue_position == 1)
|
||||
to_chat(usr, span_notice("You are next in line to join the game. You will be notified when a slot opens up."))
|
||||
else if(queue_position)
|
||||
to_chat(usr, span_notice("There are [queue_position-1] players in front of you in the queue to join the game."))
|
||||
else
|
||||
SSticker.queued_players += usr
|
||||
to_chat(usr, span_notice("You have been added to the queue to join the game. Your position in queue is [SSticker.queued_players.len]."))
|
||||
return
|
||||
LateChoices()
|
||||
|
||||
if(href_list["manifest"])
|
||||
ViewManifest()
|
||||
return
|
||||
|
||||
if(href_list["SelectedJob"])
|
||||
if(!SSticker?.IsRoundInProgress())
|
||||
@@ -186,6 +67,17 @@
|
||||
to_chat(usr, span_notice("There is an administrative lock on entering the game!"))
|
||||
return
|
||||
|
||||
//Determines Relevent Population Cap
|
||||
var/relevant_cap
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
var/epc = CONFIG_GET(number/extreme_popcap)
|
||||
if(hpc && epc)
|
||||
relevant_cap = min(hpc, epc)
|
||||
else
|
||||
relevant_cap = max(hpc, epc)
|
||||
|
||||
|
||||
|
||||
if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums))
|
||||
if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1]))
|
||||
to_chat(usr, span_warning("Server is full."))
|
||||
@@ -194,13 +86,6 @@
|
||||
AttemptLateSpawn(href_list["SelectedJob"])
|
||||
return
|
||||
|
||||
else if(!href_list["late_join"])
|
||||
new_player_panel()
|
||||
|
||||
if(href_list["showpoll"])
|
||||
handle_player_polling()
|
||||
return
|
||||
|
||||
if(href_list["viewpoll"])
|
||||
var/datum/poll_question/poll = locate(href_list["viewpoll"]) in GLOB.polls
|
||||
poll_player(poll)
|
||||
@@ -223,7 +108,6 @@
|
||||
if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes")
|
||||
ready = PLAYER_NOT_READY
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
new_player_panel()
|
||||
return FALSE
|
||||
|
||||
var/mob/dead/observer/observer = new()
|
||||
@@ -270,14 +154,14 @@
|
||||
|
||||
/mob/dead/new_player/proc/IsJobUnavailable(rank, latejoin = FALSE)
|
||||
var/datum/job/job = SSjob.GetJob(rank)
|
||||
if(!job)
|
||||
if(!(job.job_flags & JOB_NEW_PLAYER_JOINABLE))
|
||||
return JOB_UNAVAILABLE_GENERIC
|
||||
if((job.current_positions >= job.total_positions) && job.total_positions != -1)
|
||||
if(job.title == "Assistant")
|
||||
if(is_assistant_job(job))
|
||||
if(isnum(client.player_age) && client.player_age <= 14) //Newbies can always be assistants
|
||||
return JOB_AVAILABLE
|
||||
for(var/datum/job/J in SSjob.occupations)
|
||||
if(J && J.current_positions < J.total_positions && J.title != job.title)
|
||||
for(var/datum/job/other_job as anything in SSjob.joinable_occupations)
|
||||
if(other_job.current_positions < other_job.total_positions && other_job != job)
|
||||
return JOB_UNAVAILABLE_SLOTFULL
|
||||
else
|
||||
return JOB_UNAVAILABLE_SLOTFULL
|
||||
@@ -299,7 +183,6 @@
|
||||
tgui_alert(usr, get_job_unavailable_error_message(error, rank))
|
||||
return FALSE
|
||||
|
||||
var/arrivals_docked = TRUE
|
||||
if(SSshuttle.arrivals)
|
||||
close_spawn_windows() //In case we get held up
|
||||
if(SSshuttle.arrivals.damaged && CONFIG_GET(flag/arrivals_shuttle_require_safe_latejoin))
|
||||
@@ -308,37 +191,43 @@
|
||||
|
||||
if(CONFIG_GET(flag/arrivals_shuttle_require_undocked))
|
||||
SSshuttle.arrivals.RequireUndocked(src)
|
||||
arrivals_docked = SSshuttle.arrivals.mode != SHUTTLE_CALL
|
||||
|
||||
//Remove the player from the join queue if he was in one and reset the timer
|
||||
SSticker.queued_players -= src
|
||||
SSticker.queue_delay = 4
|
||||
|
||||
SSjob.AssignRole(src, rank, 1)
|
||||
var/datum/job/job = SSjob.GetJob(rank)
|
||||
|
||||
var/mob/living/character = create_character(TRUE) //creates the human and transfers vars and mind
|
||||
SSjob.AssignRole(src, job, TRUE)
|
||||
|
||||
var/is_captain = FALSE
|
||||
// If we don't have an assigned cap yet, check if this person qualifies for some from of captaincy.
|
||||
if(!SSjob.assigned_captain && ishuman(character) && SSjob.chain_of_command[rank] && !is_banned_from(ckey, list("Captain")))
|
||||
is_captain = TRUE
|
||||
// If we already have a captain, are they a "Captain" rank and are we allowing multiple of them to be assigned?
|
||||
else if(SSjob.always_promote_captain_job && (rank == "Captain"))
|
||||
is_captain = TRUE
|
||||
mind.late_joiner = TRUE
|
||||
var/atom/destination = mind.assigned_role.get_latejoin_spawn_point()
|
||||
if(!destination)
|
||||
CRASH("Failed to find a latejoin spawn point.")
|
||||
var/mob/living/character = create_character(destination)
|
||||
if(!character)
|
||||
CRASH("Failed to create a character for latejoin.")
|
||||
transfer_character()
|
||||
|
||||
SSjob.EquipRank(character, job, character.client)
|
||||
job.after_latejoin_spawn(character)
|
||||
|
||||
var/datum/job/job = SSjob.GetJob(rank)
|
||||
|
||||
if(job && !job.override_latejoin_spawn(character))
|
||||
SSjob.SendToLateJoin(character)
|
||||
if(!arrivals_docked)
|
||||
var/atom/movable/screen/splash/Spl = new(character.client, TRUE)
|
||||
Spl.Fade(TRUE)
|
||||
character.playsound_local(get_turf(character), 'sound/voice/ApproachingTG.ogg', 25)
|
||||
|
||||
character.update_parallax_teleport()
|
||||
#define IS_NOT_CAPTAIN 0
|
||||
#define IS_ACTING_CAPTAIN 1
|
||||
#define IS_FULL_CAPTAIN 2
|
||||
var/is_captain = IS_NOT_CAPTAIN
|
||||
// If we already have a captain, are they a "Captain" rank and are we allowing multiple of them to be assigned?
|
||||
if(is_captain_job(job))
|
||||
is_captain = IS_FULL_CAPTAIN
|
||||
// If we don't have an assigned cap yet, check if this person qualifies for some from of captaincy.
|
||||
else if(!SSjob.assigned_captain && ishuman(character) && SSjob.chain_of_command[rank] && !is_banned_from(ckey, list("Captain")))
|
||||
is_captain = IS_ACTING_CAPTAIN
|
||||
if(is_captain != IS_NOT_CAPTAIN)
|
||||
minor_announce(job.get_captaincy_announcement(character))
|
||||
SSjob.promote_to_captain(character, is_captain == IS_ACTING_CAPTAIN)
|
||||
#undef IS_NOT_CAPTAIN
|
||||
#undef IS_ACTING_CAPTAIN
|
||||
#undef IS_FULL_CAPTAIN
|
||||
|
||||
SSticker.minds += character.mind
|
||||
character.client.init_verbs() // init verbs for the late join
|
||||
@@ -433,54 +322,37 @@
|
||||
popup.set_content(jointext(dat, ""))
|
||||
popup.open(FALSE) // 0 is passed to open so that it doesn't use the onclose() proc
|
||||
|
||||
/mob/dead/new_player/proc/create_character(transfer_after)
|
||||
spawning = 1
|
||||
|
||||
/// Creates, assigns and returns the new_character to spawn as. Assumes a valid mind.assigned_role exists.
|
||||
/mob/dead/new_player/proc/create_character(atom/destination)
|
||||
spawning = TRUE
|
||||
close_spawn_windows()
|
||||
|
||||
var/mob/living/carbon/human/H = new(loc)
|
||||
|
||||
var/frn = CONFIG_GET(flag/force_random_names)
|
||||
if(!frn)
|
||||
frn = is_banned_from(ckey, "Appearance")
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(frn)
|
||||
client.prefs.random_character()
|
||||
client.prefs.real_name = client.prefs.pref_species.random_name(gender,1)
|
||||
|
||||
var/is_antag
|
||||
if(mind in GLOB.pre_setup_antags)
|
||||
is_antag = TRUE
|
||||
|
||||
client.prefs.copy_to(H, antagonist = is_antag, is_latejoiner = transfer_after)
|
||||
|
||||
if(GLOB.current_anonymous_theme)//overrides random name because it achieves the same effect and is an admin enabled event tool
|
||||
randomize_human(H)
|
||||
H.fully_replace_character_name(null, GLOB.current_anonymous_theme.anonymous_name(H))
|
||||
|
||||
H.dna.update_dna_identity()
|
||||
if(mind)
|
||||
if(transfer_after)
|
||||
mind.late_joiner = TRUE
|
||||
mind.active = FALSE //we wish to transfer the key manually
|
||||
mind.active = FALSE //we wish to transfer the key manually
|
||||
var/mob/living/spawning_mob = mind.assigned_role.get_spawn_mob(client, destination)
|
||||
if(QDELETED(src) || !client)
|
||||
return // Disconnected while checking for the appearance ban.
|
||||
if(!isAI(spawning_mob)) // Unfortunately there's still snowflake AI code out there.
|
||||
mind.original_character_slot_index = client.prefs.default_slot
|
||||
mind.transfer_to(H) //won't transfer key since the mind is not active
|
||||
mind.set_original_character(H)
|
||||
|
||||
H.name = real_name
|
||||
mind.transfer_to(spawning_mob) //won't transfer key since the mind is not active
|
||||
mind.set_original_character(spawning_mob)
|
||||
client.init_verbs()
|
||||
. = H
|
||||
. = spawning_mob
|
||||
new_character = .
|
||||
if(transfer_after)
|
||||
transfer_character()
|
||||
|
||||
|
||||
/mob/dead/new_player/proc/transfer_character()
|
||||
. = new_character
|
||||
if(.)
|
||||
new_character.key = key //Manually transfer the key to log them in,
|
||||
new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC)
|
||||
new_character = null
|
||||
qdel(src)
|
||||
if(!.)
|
||||
return
|
||||
new_character.key = key //Manually transfer the key to log them in,
|
||||
new_character.stop_sound_channel(CHANNEL_LOBBYMUSIC)
|
||||
var/area/joined_area = get_area(new_character.loc)
|
||||
if(joined_area)
|
||||
joined_area.on_joining_game(new_character)
|
||||
new_character = null
|
||||
qdel(src)
|
||||
|
||||
|
||||
/mob/dead/new_player/proc/ViewManifest()
|
||||
if(!client)
|
||||
|
||||
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 871 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 257 B |
|
After Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 320 KiB |
@@ -116,17 +116,6 @@ window "mapwindow"
|
||||
right-click = true
|
||||
saved-params = "zoom;letterbox;zoom-mode"
|
||||
style = ".center { text-align: center; } .maptext { font-family: 'Small Fonts'; font-size: 7px; -dm-text-outline: 1px black; color: white; line-height: 1.1; } .command_headset { font-weight: bold;\tfont-size: 8px; } .small { font-size: 6px; } .big { font-size: 8px; } .reallybig { font-size: 8px; } .extremelybig { font-size: 8px; } .greentext { color: #00FF00; font-size: 7px; } .redtext { color: #FF0000; font-size: 7px; } .clown { color: #FF69Bf; font-size: 7px; font-weight: bold; } .his_grace { color: #15D512; } .hypnophrase { color: #0d0d0d; font-weight: bold; } .yell { font-weight: bold; } .italics { font-size: 6px; }"
|
||||
elem "lobbybrowser"
|
||||
type = BROWSER
|
||||
pos = 0,0
|
||||
size = 640x480
|
||||
anchor1 = 0,0
|
||||
anchor2 = 100,100
|
||||
background-color = none
|
||||
is-visible = false
|
||||
is-disabled = true
|
||||
saved-params = ""
|
||||
auto-format = false
|
||||
elem "status_bar"
|
||||
type = LABEL
|
||||
pos = 0,464
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/atom/movable/screen/lobby/button/antag_toggle
|
||||
icon = 'modular_skyrat/master_files/icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "be_antag_off"
|
||||
base_icon_state = "be_antag_off"
|
||||
screen_loc = "TOP:-122,CENTER:-26"
|
||||
|
||||
/atom/movable/screen/lobby/button/antag_toggle/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
new_player.client.prefs.be_antag = !new_player.client.prefs.be_antag
|
||||
base_icon_state = "be_antag_[new_player.client.prefs.be_antag ? "on" : "off"]"
|
||||
update_appearance(UPDATE_ICON)
|
||||
to_chat(new_player, span_notice("You will now [new_player.client.prefs.be_antag ? "be considered" : "not be considered"] for any antagonist positions set in your preferences."))
|
||||
|
||||
/atom/movable/screen/lobby/button/antag_toggle/Initialize(mapload)
|
||||
. = ..()
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)
|
||||
set_button_status(FALSE)
|
||||
else
|
||||
RegisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP, .proc/hide_ready_button)
|
||||
|
||||
/atom/movable/screen/lobby/button/antag_toggle/proc/hide_ready_button()
|
||||
SIGNAL_HANDLER
|
||||
set_button_status(FALSE)
|
||||
UnregisterSignal(SSticker, COMSIG_TICKER_ENTER_SETTING_UP)
|
||||
|
||||
/atom/movable/screen/lobby/button/server_swap
|
||||
icon = 'modular_skyrat/master_files/icons/hud/lobby/bottom_buttons.dmi'
|
||||
icon_state = "server_swap"
|
||||
base_icon_state = "server_swap"
|
||||
screen_loc = "TOP:-122,CENTER:-54"
|
||||
|
||||
/atom/movable/screen/lobby/button/server_swap/Click(location, control, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!CONFIG_GET(flag/server_swap_enabled))
|
||||
return
|
||||
var/mob/dead/new_player/new_player = hud.mymob
|
||||
if(GLOB.swappable_ips.len == 1)
|
||||
var/server_name = GLOB.swappable_ips[1]
|
||||
var/server_ip = GLOB.swappable_ips[server_name]
|
||||
var/confirm = tgui_alert(new_player, "Are you sure you want to swap to [server_name] ([server_ip])?", "Swapping server!", list("Connect me!", "Stay here!"))
|
||||
if(confirm == "Connect me!")
|
||||
to_chat_immediate(new_player, "So long, spaceman.")
|
||||
new_player.client << link(server_ip)
|
||||
return
|
||||
var/server_name = tgui_input_list(new_player, "Please select the server you wish to swap to:", "Swap servers!", GLOB.swappable_ips)
|
||||
if(!server_name)
|
||||
return
|
||||
var/server_ip = GLOB.swappable_ips[server_name]
|
||||
var/confirm = tgui_alert(new_player, "Are you sure you want to swap to [server_name] ([server_ip])?", "Swapping server!", list("Connect me!", "Stay here!"))
|
||||
if(confirm == "Connect me!")
|
||||
to_chat_immediate(new_player, "So long, spaceman.")
|
||||
new_player.client << link(server_ip)
|
||||
return
|
||||
@@ -1,10 +1,9 @@
|
||||
#define LINKIFY_READY(string, value) "<a href='byond://?src=[REF(src)];ready=[value]'>[string]</a>"
|
||||
|
||||
/mob/dead/new_player
|
||||
flags_1 = NONE
|
||||
invisibility = INVISIBILITY_ABSTRACT
|
||||
density = FALSE
|
||||
stat = DEAD
|
||||
hud_type = /datum/hud/new_player
|
||||
hud_possible = list()
|
||||
|
||||
var/ready = FALSE
|
||||
@@ -13,10 +12,9 @@
|
||||
/// For instant transfer once the round is set up
|
||||
var/mob/living/new_character
|
||||
///Used to make sure someone doesn't get spammed with messages if they're ineligible for roles.
|
||||
//Used to make sure someone doesn't get spammed with messages if they're ineligible for roles
|
||||
var/ineligible_for_roles = FALSE
|
||||
|
||||
var/client/my_client
|
||||
|
||||
|
||||
/mob/dead/new_player/Initialize()
|
||||
if(client && SSticker.state == GAME_STATE_STARTUP)
|
||||
@@ -42,220 +40,59 @@
|
||||
/mob/dead/new_player/prepare_huds()
|
||||
return
|
||||
|
||||
/**
|
||||
* This proc generates the panel that opens to all newly joining players, allowing them to join, observe, view polls, view the current crew manifest, and open the character customization menu.
|
||||
*/
|
||||
/mob/dead/new_player/proc/show_titlescreen()
|
||||
if (client?.interviewee)
|
||||
/mob/dead/new_player/Topic(href, href_list[])
|
||||
if(src != usr)
|
||||
return
|
||||
|
||||
winset(src, "lobbybrowser", "is-disabled=false;is-visible=true")
|
||||
|
||||
|
||||
|
||||
var/datum/asset/assets = get_asset_datum(/datum/asset/simple/lobby) //Sending pictures to the client
|
||||
assets.send(src)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
update_titlescreen()
|
||||
|
||||
|
||||
|
||||
|
||||
/mob/dead/new_player/proc/update_titlescreen()
|
||||
var/dat = get_lobby_html()
|
||||
|
||||
src << browse(GLOB.current_lobby_screen, "file=titlescreen.gif;display=0")
|
||||
src << browse(dat, "window=lobbybrowser")
|
||||
|
||||
/datum/asset/simple/lobby
|
||||
assets = list(
|
||||
"FixedsysExcelsior3.01Regular.ttf" = 'html/browser/FixedsysExcelsior3.01Regular.ttf',
|
||||
)
|
||||
|
||||
/mob/dead/new_player/proc/hide_titlescreen()
|
||||
if(my_client.mob)
|
||||
winset(my_client, "lobbybrowser", "is-disabled=true;is-visible=false")
|
||||
|
||||
/mob/dead/new_player/proc/playerpolls()
|
||||
var/output
|
||||
if (SSdbcore.Connect())
|
||||
var/isadmin = FALSE
|
||||
if(client?.holder)
|
||||
isadmin = TRUE
|
||||
var/datum/db_query/query_get_new_polls = SSdbcore.NewQuery({"
|
||||
SELECT id FROM [format_table_name("poll_question")]
|
||||
WHERE (adminonly = 0 OR :isadmin = 1)
|
||||
AND Now() BETWEEN starttime AND endtime
|
||||
AND deleted = 0
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_vote")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
AND id NOT IN (
|
||||
SELECT pollid FROM [format_table_name("poll_textreply")]
|
||||
WHERE ckey = :ckey
|
||||
AND deleted = 0
|
||||
)
|
||||
"}, list("isadmin" = isadmin, "ckey" = ckey))
|
||||
|
||||
if(!query_get_new_polls.Execute())
|
||||
qdel(query_get_new_polls)
|
||||
return
|
||||
if(query_get_new_polls.NextRow())
|
||||
output +={"<a class="menu_ab" href='?src=\ref[src];showpoll=1'>POLLS (NEW)</a>"}
|
||||
else
|
||||
output +={"<a class="menu_a" href='?src=\ref[src];showpoll=1'>POLLS</a>"}
|
||||
qdel(query_get_new_polls)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
return output
|
||||
|
||||
/mob/dead/new_player/Topic(href, href_list[])
|
||||
if(src != usr || !client)
|
||||
|
||||
|
||||
|
||||
if(!client)
|
||||
return
|
||||
|
||||
if(client.interviewee)
|
||||
return FALSE
|
||||
|
||||
//Determines Relevent Population Cap
|
||||
var/relevant_cap
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
var/epc = CONFIG_GET(number/extreme_popcap)
|
||||
if(hpc && epc)
|
||||
relevant_cap = min(hpc, epc)
|
||||
else
|
||||
relevant_cap = max(hpc, epc)
|
||||
|
||||
if(href_list["lobby_setup"])
|
||||
client.prefs.needs_update = TRUE
|
||||
client.prefs.ShowChoices(src)
|
||||
return TRUE
|
||||
|
||||
if(href_list["lobby_ready"])
|
||||
if(!client.prefs.check_flavor_text())
|
||||
ready = PLAYER_NOT_READY
|
||||
return
|
||||
|
||||
if(SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
client << output(null, "lobbybrowser:imgsrc")
|
||||
ready = !ready
|
||||
return
|
||||
|
||||
if(href_list["lobby_observe"])
|
||||
ready = PLAYER_READY_TO_OBSERVE
|
||||
hide_titlescreen()
|
||||
make_me_an_observer()
|
||||
return
|
||||
|
||||
if(href_list["lobby_antagtoggle"])
|
||||
client.prefs.be_antag = !client.prefs.be_antag
|
||||
update_titlescreen()
|
||||
to_chat(usr, "<span class='notice'>You will now [client.prefs.be_antag ? "be considered" : "not be considered"] for any antagonist positions set in your preferences.</span>")
|
||||
return
|
||||
|
||||
if(href_list["lobby_swap"])
|
||||
if(!CONFIG_GET(flag/server_swap_enabled))
|
||||
return
|
||||
if(GLOB.swappable_ips.len == 1)
|
||||
var/server_name = GLOB.swappable_ips[1]
|
||||
var/server_ip = GLOB.swappable_ips[server_name]
|
||||
var/confirm = tgui_alert(usr, "Are you sure you want to swap to [server_name] ([server_ip])?", "Swapping server!", list("Connect me!", "Stay here!"))
|
||||
if(confirm == "Connect me!")
|
||||
to_chat_immediate(src, "So long, spaceman.")
|
||||
client << link(server_ip)
|
||||
return
|
||||
var/server_name = tgui_input_list(usr, "Please select the server you wish to swap to:", "Swap servers!", GLOB.swappable_ips)
|
||||
if(!server_name)
|
||||
return
|
||||
var/server_ip = GLOB.swappable_ips[server_name]
|
||||
var/confirm = tgui_alert(usr, "Are you sure you want to swap to [server_name] ([server_ip])?", "Swapping server!", list("Connect me!", "Stay here!"))
|
||||
if(confirm == "Connect me!")
|
||||
to_chat_immediate(src, "So long, spaceman.")
|
||||
client << link(server_ip)
|
||||
return
|
||||
|
||||
if(href_list["lobby_join"])
|
||||
if(!client.prefs.check_flavor_text())
|
||||
return
|
||||
|
||||
|
||||
if(href_list["late_join"]) //This still exists for queue messages in chat
|
||||
if(!SSticker?.IsRoundInProgress())
|
||||
to_chat(usr, "<span class='boldwarning'>The round is either not ready, or has already finished...</span>")
|
||||
return
|
||||
|
||||
if(href_list["lobby_join"] == "override")
|
||||
LateChoices()
|
||||
return
|
||||
|
||||
if(SSticker.queued_players.len || (relevant_cap && living_player_count() >= relevant_cap && !(ckey(key) in GLOB.admin_datums)))
|
||||
to_chat(usr, "<span class='danger'>[CONFIG_GET(string/hard_popcap_message)]</span>")
|
||||
|
||||
var/queue_position = SSticker.queued_players.Find(usr)
|
||||
if(queue_position == 1)
|
||||
to_chat(usr, "<span class='notice'>You are next in line to join the game. You will be notified when a slot opens up.</span>")
|
||||
else if(queue_position)
|
||||
to_chat(usr, "<span class='notice'>There are [queue_position-1] players in front of you in the queue to join the game.</span>")
|
||||
else
|
||||
SSticker.queued_players += usr
|
||||
to_chat(usr, "<span class='notice'>You have been added to the queue to join the game. Your position in queue is [SSticker.queued_players.len].</span>")
|
||||
to_chat(usr, span_boldwarning("The round is either not ready, or has already finished..."))
|
||||
return
|
||||
LateChoices()
|
||||
|
||||
if(href_list["lobby_crew"])
|
||||
ViewManifest()
|
||||
return
|
||||
|
||||
|
||||
if(href_list["SelectedJob"])
|
||||
if(!client.prefs.check_flavor_text())
|
||||
return
|
||||
|
||||
if(!SSticker?.IsRoundInProgress())
|
||||
to_chat(usr, "<span class='danger'>The round is either not ready, or has already finished...</span>")
|
||||
to_chat(usr, span_danger("The round is either not ready, or has already finished..."))
|
||||
return
|
||||
|
||||
if(SSlag_switch.measures[DISABLE_NON_OBSJOBS])
|
||||
to_chat(usr, "<span class='notice'>There is an administrative lock on entering the game!</span>")
|
||||
to_chat(usr, span_notice("There is an administrative lock on entering the game!"))
|
||||
return
|
||||
|
||||
//Determines Relevent Population Cap
|
||||
var/relevant_cap
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
var/epc = CONFIG_GET(number/extreme_popcap)
|
||||
if(hpc && epc)
|
||||
relevant_cap = min(hpc, epc)
|
||||
else
|
||||
relevant_cap = max(hpc, epc)
|
||||
|
||||
|
||||
|
||||
if(SSticker.queued_players.len && !(ckey(key) in GLOB.admin_datums))
|
||||
if((living_player_count() >= relevant_cap) || (src != SSticker.queued_players[1]))
|
||||
to_chat(usr, "<span class='warning'>Server is full.</span>")
|
||||
to_chat(usr, span_warning("Server is full."))
|
||||
return
|
||||
|
||||
AttemptLateSpawn(href_list["SelectedJob"])
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
if(href_list["showpoll"])
|
||||
handle_player_polling()
|
||||
return
|
||||
|
||||
if(href_list["viewpoll"])
|
||||
var/datum/poll_question/poll = locate(href_list["viewpoll"]) in GLOB.polls
|
||||
poll_player(poll)
|
||||
return
|
||||
|
||||
if(href_list["votepollref"])
|
||||
var/datum/poll_question/poll = locate(href_list["votepollref"]) in GLOB.polls
|
||||
vote_on_poll_handler(poll, href_list)
|
||||
return
|
||||
|
||||
|
||||
//When you cop out of the round (NB: this HAS A SLEEP FOR PLAYER INPUT IN IT)
|
||||
/mob/dead/new_player/proc/make_me_an_observer()
|
||||
@@ -270,8 +107,7 @@
|
||||
|
||||
if(QDELETED(src) || !src.client || this_is_like_playing_right != "Yes")
|
||||
ready = PLAYER_NOT_READY
|
||||
show_titlescreen()
|
||||
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
return FALSE
|
||||
|
||||
var/mob/dead/observer/observer = new()
|
||||
@@ -280,11 +116,11 @@
|
||||
observer.started_as_observer = TRUE
|
||||
close_spawn_windows()
|
||||
var/obj/effect/landmark/observer_start/O = locate(/obj/effect/landmark/observer_start) in GLOB.landmarks_list
|
||||
to_chat(src, "<span class='notice'>Now teleporting.</span>")
|
||||
to_chat(src, span_notice("Now teleporting."))
|
||||
if (O)
|
||||
observer.forceMove(O.loc)
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Teleporting failed. Ahelp an admin please</span>")
|
||||
to_chat(src, span_notice("Teleporting failed. Ahelp an admin please"))
|
||||
stack_trace("There's no freaking observer landmark available on this map or you're making observers before the map is initialised")
|
||||
observer.key = key
|
||||
observer.client = client
|
||||
@@ -568,7 +404,7 @@
|
||||
/mob/dead/new_player/proc/close_spawn_windows()
|
||||
|
||||
src << browse(null, "window=latechoices") //closes late choices window
|
||||
hide_titlescreen() //closes the player setup window
|
||||
src << browse(null, "window=playersetup") //closes the player setup window
|
||||
src << browse(null, "window=preferences") //closes job selection
|
||||
src << browse(null, "window=mob_occupation")
|
||||
src << browse(null, "window=latechoices") //closes late job selection
|
||||
@@ -589,7 +425,7 @@
|
||||
has_antags = TRUE
|
||||
if(client.prefs.job_preferences.len == 0)
|
||||
if(!ineligible_for_roles)
|
||||
to_chat(src, "<span class='danger'>You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences.</span>")
|
||||
to_chat(src, span_danger("You have no jobs enabled, along with return to lobby if job is unavailable. This makes you ineligible for any round start role, please update your job preferences."))
|
||||
ineligible_for_roles = TRUE
|
||||
ready = PLAYER_NOT_READY
|
||||
if(has_antags)
|
||||
|
||||
|
After Width: | Height: | Size: 878 B |
@@ -3038,10 +3038,6 @@ GLOBAL_LIST_INIT(food, list(
|
||||
else
|
||||
needs_update = TRUE
|
||||
|
||||
if(istype(parent.mob, /mob/dead/new_player)) //is this shitcode? probably - I DONT CAREEE~
|
||||
var/mob/dead/new_player/NP = parent.mob
|
||||
NP.show_titlescreen()
|
||||
|
||||
if("tab")
|
||||
if (href_list["tab"])
|
||||
current_tab = text2num(href_list["tab"])
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
/client/proc/change_title_screen()
|
||||
set category = "Admin.Fun"
|
||||
set name = "Title Screen: Change"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] is changing the titlescreen.")
|
||||
message_admins("[key_name_admin(usr)] is changing the titlescreen.")
|
||||
|
||||
switch(alert(usr, "Please select a new titlescreen.", "Title Screen", "Change", "Reset", "Cancel"))
|
||||
if("Change")
|
||||
var/file = input(usr) as icon|null
|
||||
if(!file)
|
||||
return
|
||||
change_lobbyscreen(file)
|
||||
if("Reset")
|
||||
change_lobbyscreen()
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
/client/proc/change_title_screen_notice()
|
||||
set category = "Admin.Fun"
|
||||
set name = "Title Screen: Set Notice"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] is setting the titlescreen notice.")
|
||||
message_admins("[key_name_admin(usr)] is setting the titlescreen notice.")
|
||||
|
||||
var/new_notice = input(usr, "Please input a notice to be displayed on the titlescreen:", "Titlescreen Notice")
|
||||
if(!new_notice)
|
||||
set_titlescreen_notice()
|
||||
return
|
||||
set_titlescreen_notice(new_notice)
|
||||
for(var/mob/dead/new_player/N in GLOB.new_player_list)
|
||||
to_chat(N, "<span class='boldannounce'>TITLE NOTICE UPDATED: [new_notice]</span>")
|
||||
SEND_SOUND(N, sound('modular_skyrat/modules/admin/sound/duckhonk.ogg'))
|
||||
|
||||
@@ -28,6 +28,6 @@ SUBSYSTEM_DEF(serverswap)
|
||||
var/server_name = L[1]
|
||||
var/IP = L[2]
|
||||
GLOB.swappable_ips[server_name] = IP
|
||||
add_startupmessage("SERVER SWAP: [server_name] loaded with IP: [IP]!")
|
||||
to_chat(world, span_boldannounce("SERVER SWAP: [server_name] loaded with IP: [IP]!"))
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
GLOBAL_LIST_EMPTY(startup_messages)
|
||||
// FOR MOR INFO ON HTML CUSTOMISATION, SEE: https://github.com/Skyrat-SS13/Skyrat-tg/pull/4783
|
||||
/mob/dead/new_player/proc/get_lobby_html()
|
||||
var/dat = GLOB.lobby_html
|
||||
if(SSticker.current_state == GAME_STATE_STARTUP)
|
||||
dat += {"<img src="titlescreen.gif" class="fone" alt="">"}
|
||||
dat += {"
|
||||
<div class="container_terminal">
|
||||
<p class="menu_b">SYSTEMS INITIALIZING:</p>
|
||||
"}
|
||||
var/loop_index = 0
|
||||
for(var/i in GLOB.startup_messages)
|
||||
if(loop_index >= 27)
|
||||
break
|
||||
dat += i
|
||||
loop_index++
|
||||
dat += "</div>"
|
||||
|
||||
else
|
||||
dat += {"<img src="titlescreen.gif" class="fone" alt="">"}
|
||||
|
||||
if(GLOB.current_lobbyscreen_notice)
|
||||
dat += {"
|
||||
<div class="container_notice">
|
||||
<p class="menu_c">[GLOB.current_lobbyscreen_notice]</p>
|
||||
</div>
|
||||
"}
|
||||
|
||||
dat += {"
|
||||
<div class="container_nav">
|
||||
<a class="menu_a" href='?src=\ref[src];lobby_setup=1'>SETUP ([uppertext(client.prefs.real_name)])</a>
|
||||
"}
|
||||
|
||||
if(!SSticker || SSticker.current_state <= GAME_STATE_PREGAME)
|
||||
dat += {"<a id="ready" class="menu_a" href='?src=\ref[src];lobby_ready=1'>[ready ? "READY ☑" : "READY ☒"]</a>
|
||||
"}
|
||||
else
|
||||
dat += {"<a class="menu_a" href='?src=\ref[src];lobby_join=1'>JOIN</a>
|
||||
"}
|
||||
dat += {"<a class="menu_a" href='?src=\ref[src];lobby_crew=1'>CREW</a>
|
||||
"}
|
||||
|
||||
dat += {"<a class="menu_a" href='?src=\ref[src];lobby_antagtoggle=1'>[client.prefs.be_antag ? "BE ANTAG ☑" : "BE ANTAG ☒"]</a>
|
||||
"}
|
||||
|
||||
dat += {"<a class="menu_a" href='?src=\ref[src];lobby_observe=1'>OBSERVE</a>
|
||||
"}
|
||||
if(CONFIG_GET(flag/server_swap_enabled))
|
||||
dat += {"
|
||||
<a class="menu_a" href='?src=\ref[src];lobby_swap=1'>SWAP SERVERS</a>
|
||||
"}
|
||||
|
||||
if(!IsGuestKey(src.key))
|
||||
dat += playerpolls()
|
||||
|
||||
dat += "</div>"
|
||||
dat += {"
|
||||
<script language="JavaScript">
|
||||
var i=0;
|
||||
var mark=document.getElementById("ready");
|
||||
var marks=new Array('READY ☒', 'READY ☑');
|
||||
function imgsrc(setReady) {
|
||||
if(setReady) {
|
||||
i = setReady;
|
||||
mark.textContent = marks\[i\];
|
||||
}
|
||||
else {
|
||||
i++;
|
||||
if (i == marks.length)
|
||||
i = 0;
|
||||
mark.textContent = marks\[i\];
|
||||
}
|
||||
}
|
||||
</script>
|
||||
"}
|
||||
|
||||
dat += "</body></html>"
|
||||
|
||||
return dat
|
||||
|
||||
/proc/add_startupmessage(msg)
|
||||
var/msg_dat = {"<p class="menu_b">[msg]</p>"}
|
||||
|
||||
GLOB.startup_messages.Insert(1, msg_dat)
|
||||
|
||||
for(var/mob/dead/new_player/N in GLOB.new_player_list)
|
||||
INVOKE_ASYNC(N, /mob/dead/new_player.proc/update_titlescreen)
|
||||
@@ -1,262 +0,0 @@
|
||||
GLOBAL_VAR(current_lobby_screen)
|
||||
|
||||
GLOBAL_VAR(current_lobbyscreen_notice)
|
||||
|
||||
GLOBAL_VAR(lobby_html)
|
||||
|
||||
GLOBAL_LIST_EMPTY(lobby_screens)
|
||||
|
||||
SUBSYSTEM_DEF(title)
|
||||
name = "Title Screen"
|
||||
flags = SS_NO_FIRE
|
||||
init_order = INIT_ORDER_TITLE
|
||||
|
||||
var/file_path
|
||||
var/icon/startup_splash
|
||||
|
||||
/datum/controller/subsystem/title/Initialize()
|
||||
var/dat
|
||||
if(!fexists("[global.config.directory]/skyrat/lobby_html.txt"))
|
||||
to_chat(world, "<span class='boldwarning'>CRITICAL ERROR: Unable to read lobby_html.txt, reverting to backup lobby html, please check your server config and ensure this file exists.")
|
||||
dat = {"
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<style type='text/css'>
|
||||
@font-face {
|
||||
font-family: "Fixedsys";
|
||||
src: url("FixedsysExcelsior3.01Regular.ttf");
|
||||
}
|
||||
body,
|
||||
html {
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
text-align: center;
|
||||
background-color: black;
|
||||
padding-top: 5vmin;
|
||||
-ms-user-select: none;
|
||||
}
|
||||
|
||||
img {
|
||||
border-style:none;
|
||||
}
|
||||
|
||||
.fone{
|
||||
position: absolute;
|
||||
width: auto;
|
||||
height: 100vmin;
|
||||
min-width: 100vmin;
|
||||
min-height: 100vmin;
|
||||
top: 50%;
|
||||
left:50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.container_nav {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
min-width: 100vmin;
|
||||
min-height: 10vmin;
|
||||
padding-left: 0vmin;
|
||||
padding-top: 45vmin;
|
||||
box-sizing: border-box;
|
||||
top: 50%;
|
||||
left:50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.container_terminal {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
box-sizing: border-box;
|
||||
padding-top: 3vmin;
|
||||
top: 0%;
|
||||
left:0%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.container_notice {
|
||||
position: absolute;
|
||||
width: auto;
|
||||
box-sizing: border-box;
|
||||
padding-top: 1vmin;
|
||||
top: 0%;
|
||||
left:0%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.menu_a {
|
||||
display: inline-block;
|
||||
font-family: "Fixedsys";
|
||||
font-weight: lighter;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
color: #add8e6;
|
||||
margin-right: 100%;
|
||||
margin-top: 5px;
|
||||
padding-left: 6px;
|
||||
font-size: 6vmin;
|
||||
line-height: 6vmin;
|
||||
height: 6vmin;
|
||||
letter-spacing: 1px;
|
||||
border: 2px solid white;
|
||||
background-color: #0080ff;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.menu_a:hover {
|
||||
border-left: 3px solid red;
|
||||
border-right: 3px solid red;
|
||||
font-weight: bolder;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
@keyframes pollsmove {
|
||||
50% {opacity: 0;}
|
||||
}
|
||||
|
||||
.menu_ab {
|
||||
display: inline-block;
|
||||
font-family: "Fixedsys";
|
||||
font-weight: lighter;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
color: #add8e6;
|
||||
margin-right: 100%;
|
||||
margin-top: 5px;
|
||||
padding-left: 6px;
|
||||
font-size: 6vmin;
|
||||
line-height: 6vmin;
|
||||
height: 6vmin;
|
||||
letter-spacing: 1px;
|
||||
border: 2px solid white;
|
||||
background-color: #0080ff;
|
||||
opacity: 0.5;
|
||||
animation: pollsmove 5s infinite;
|
||||
}
|
||||
|
||||
.menu_b {
|
||||
display: inline-block;
|
||||
font-family: "Terminal";
|
||||
font-weight: lighter;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
color:green;
|
||||
margin-right: 0%;
|
||||
margin-top: 0px;
|
||||
font-size: 2vmin;
|
||||
line-height: 1vmin;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.menu_c {
|
||||
display: inline-block;
|
||||
font-weight: lighter;
|
||||
text-decoration: none;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
color: red;
|
||||
margin-right: 0%;
|
||||
margin-top: 0px;
|
||||
font-size: 3vmin;
|
||||
line-height: 2vmin;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
"}
|
||||
|
||||
else
|
||||
dat = file2text("[global.config.directory]/skyrat/lobby_html.txt")
|
||||
|
||||
GLOB.lobby_html = dat
|
||||
|
||||
var/list/provisional_title_screens = flist("[global.config.directory]/title_screens/images/")
|
||||
var/list/title_screens = list()
|
||||
|
||||
for(var/S in provisional_title_screens)
|
||||
var/list/L = splittext(S,"+")
|
||||
if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png" && L[1] != "startup_splash")))
|
||||
title_screens += S
|
||||
|
||||
if(L.len > 1 && lowertext(L[1]) == "startup_splash")
|
||||
var/file_path = "[global.config.directory]/title_screens/images/[S]"
|
||||
ASSERT(fexists(file_path))
|
||||
startup_splash = new(fcopy_rsc(file_path))
|
||||
|
||||
if(startup_splash)
|
||||
change_lobbyscreen(startup_splash)
|
||||
else
|
||||
change_lobbyscreen('modular_skyrat/modules/lobbyscreen/icons/loading_screen.gif')
|
||||
|
||||
if(length(title_screens))
|
||||
for(var/i in title_screens)
|
||||
var/file_path = "[global.config.directory]/title_screens/images/[i]"
|
||||
ASSERT(fexists(file_path))
|
||||
var/icon/title2use = new(fcopy_rsc(file_path))
|
||||
GLOB.lobby_screens += title2use
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/title/Recover()
|
||||
startup_splash = SStitle.startup_splash
|
||||
file_path = SStitle.file_path
|
||||
|
||||
|
||||
/proc/change_lobbyscreen(new_screen)
|
||||
if(new_screen)
|
||||
GLOB.current_lobby_screen = new_screen
|
||||
else
|
||||
if(GLOB.lobby_screens.len)
|
||||
GLOB.current_lobby_screen = pick(GLOB.lobby_screens)
|
||||
else
|
||||
GLOB.current_lobby_screen = 'modular_skyrat/modules/lobbyscreen/icons/skyrat_lobbyscreen.png'
|
||||
|
||||
for(var/mob/dead/new_player/N in GLOB.new_player_list)
|
||||
INVOKE_ASYNC(N, /mob/dead/new_player.proc/show_titlescreen)
|
||||
|
||||
/proc/set_titlescreen_notice(new_title)
|
||||
if(new_title)
|
||||
GLOB.current_lobbyscreen_notice = sanitize_text(new_title)
|
||||
else
|
||||
GLOB.current_lobbyscreen_notice = null
|
||||
|
||||
for(var/mob/dead/new_player/N in GLOB.new_player_list)
|
||||
INVOKE_ASYNC(N, /mob/dead/new_player.proc/show_titlescreen)
|
||||
|
||||
/client/verb/fix_lobbyscreen()
|
||||
set name = "Fix Lobbyscreen"
|
||||
set desc = "Lobbyscreen broke? Press this."
|
||||
set category = "OOC"
|
||||
|
||||
if(istype(mob, /mob/dead/new_player))
|
||||
var/mob/dead/new_player/NP = mob
|
||||
NP.show_titlescreen()
|
||||
else
|
||||
winset(src, "lobbybrowser", "is-disabled=true;is-visible=false")
|
||||
|
||||
/client/proc/change_title_screen_html()
|
||||
set category = "Admin.Fun"
|
||||
set name = "Title Screen: Set HTML"
|
||||
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] is setting the titlescreen HTML.")
|
||||
message_admins("[key_name_admin(usr)] is setting the titlescreen HTML.")
|
||||
|
||||
var/new_html = input(usr, "Please enter your desired HTML(WARNING: YOU WILL BREAK SHIT)", "DANGER: LOBBY HTML EDIT") as message|null
|
||||
|
||||
GLOB.lobby_html = new_html
|
||||
|
||||
for(var/mob/dead/new_player/N in GLOB.new_player_list)
|
||||
INVOKE_ASYNC(N, /mob/dead/new_player.proc/show_titlescreen)
|
||||
|
||||
message_admins("[key_name_admin(usr)] has changed the titlescreen HTML.")
|
||||
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(randommining)
|
||||
fdel("data/previous_mining.dat")
|
||||
|
||||
if(!fexists("config/skyrat/mining_levels.txt"))
|
||||
add_startupmessage("RANDOM MINING ERROR: mining_levels.txt does not exist, unable to load mining level!")
|
||||
to_chat(world, span_boldannounce("RANDOM MINING ERROR: mining_levels.txt does not exist, unable to load mining level!"))
|
||||
return ..()
|
||||
|
||||
var/list/lines = world.file2list("config/skyrat/mining_levels.txt")
|
||||
@@ -45,7 +45,7 @@ SUBSYSTEM_DEF(randommining)
|
||||
continue
|
||||
possible_choices[name] = traits
|
||||
possible_names += name
|
||||
add_startupmessage("RANDOM MINING: [uppertext(name)] Level loaded!")
|
||||
to_chat(world, span_boldannounce("RANDOM MINING: [uppertext(name)] Level loaded!"))
|
||||
|
||||
if(voted_map)
|
||||
chosen_map = voted_map
|
||||
@@ -55,12 +55,12 @@ SUBSYSTEM_DEF(randommining)
|
||||
traits = possible_choices[chosen_map]
|
||||
|
||||
if(!chosen_map)
|
||||
add_startupmessage("RANDOM MINING: Error, no map was chosen!")
|
||||
to_chat(world, span_boldannounce("RANDOM MINING: Error, no map was chosen!"))
|
||||
return ..()
|
||||
else if(voted_map)
|
||||
add_startupmessage("RANDOM MINING: Voted map loaded!")
|
||||
to_chat(world, span_boldannounce("RANDOM MINING: Voted map loaded!"))
|
||||
else
|
||||
add_startupmessage("RANDOM MINING: Map randomly picked!")
|
||||
to_chat(world, span_boldannounce("RANDOM MINING: Map randomly picked!"))
|
||||
|
||||
var/F = file("data/previous_mining.dat")
|
||||
WRITE_FILE(F, chosen_map)
|
||||
@@ -71,7 +71,7 @@ SUBSYSTEM_DEF(randommining)
|
||||
if(voted_next_map) //If voted or set by other means.
|
||||
return
|
||||
if(SSvote.mode) //Theres already a vote running, default to rotation.
|
||||
to_chat(world, "<span class='boldannounce'>MAPPING VOTE ERROR; VOTE IN PROGRESS, REVERTING TO RANDOM MAP.")
|
||||
to_chat(world, span_boldannounce("MAPPING VOTE ERROR; VOTE IN PROGRESS, REVERTING TO RANDOM MAP."))
|
||||
if(fexists("data/next_mining.dat"))
|
||||
fdel("data/next_mining.dat")
|
||||
return
|
||||
|
||||
@@ -316,6 +316,7 @@
|
||||
#include "code\_onclick\hud\living.dm"
|
||||
#include "code\_onclick\hud\map_popups.dm"
|
||||
#include "code\_onclick\hud\movable_screen_objects.dm"
|
||||
#include "code\_onclick\hud\new_player.dm"
|
||||
#include "code\_onclick\hud\ooze.dm"
|
||||
#include "code\_onclick\hud\pai.dm"
|
||||
#include "code\_onclick\hud\parallax.dm"
|
||||
@@ -3863,6 +3864,7 @@
|
||||
#include "modular_skyrat\master_files\code\_globalvars\~maint_loot.dm"
|
||||
#include "modular_skyrat\master_files\code\_globalvars\lists\ambience.dm"
|
||||
#include "modular_skyrat\master_files\code\_onclick\cyborg.dm"
|
||||
#include "modular_skyrat\master_files\code\_onclick\hud\new_player.dm"
|
||||
#include "modular_skyrat\master_files\code\controllers\configuration\entries\skryat_config_entries.dm"
|
||||
#include "modular_skyrat\master_files\code\controllers\subsystem\statpanel.dm"
|
||||
#include "modular_skyrat\master_files\code\datums\ert.dm"
|
||||
@@ -4469,10 +4471,7 @@
|
||||
#include "modular_skyrat\modules\liquids\code\liquid_systems\liquid_pump.dm"
|
||||
#include "modular_skyrat\modules\liquids\code\liquid_systems\liquid_status_effect.dm"
|
||||
#include "modular_skyrat\modules\liquids\code\liquid_systems\liquid_turf.dm"
|
||||
#include "modular_skyrat\modules\lobbyscreen\code\change_titlescreen.dm"
|
||||
#include "modular_skyrat\modules\lobbyscreen\code\load_servers.dm"
|
||||
#include "modular_skyrat\modules\lobbyscreen\code\lobby.dm"
|
||||
#include "modular_skyrat\modules\lobbyscreen\code\title_screen.dm"
|
||||
#include "modular_skyrat\modules\mapping\code\_unsorted\dungeon.dm"
|
||||
#include "modular_skyrat\modules\mapping\code\_unsorted\pool.dm"
|
||||
#include "modular_skyrat\modules\mapping\code\_unsorted\radio.dm"
|
||||
|
||||