diff --git a/aurorastation.dme b/aurorastation.dme index 09ed5088f75..ecee7bc5622 100644 --- a/aurorastation.dme +++ b/aurorastation.dme @@ -1794,6 +1794,7 @@ #include "code\modules\mob\abstract\new_player\character_traits.dm" #include "code\modules\mob\abstract\new_player\login.dm" #include "code\modules\mob\abstract\new_player\logout.dm" +#include "code\modules\mob\abstract\new_player\menu.dm" #include "code\modules\mob\abstract\new_player\new_player.dm" #include "code\modules\mob\abstract\new_player\poll.dm" #include "code\modules\mob\abstract\new_player\preferences_setup.dm" diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm index 47969a59cc1..b9a336a64c3 100644 --- a/code/controllers/subsystems/job.dm +++ b/code/controllers/subsystems/job.dm @@ -298,7 +298,6 @@ for(var/mob/abstract/new_player/player in unassigned) if(player.client.prefs.alternate_option == RETURN_TO_LOBBY) player.ready = 0 - player.new_player_panel_proc() unassigned -= player return TRUE diff --git a/code/controllers/subsystems/theming.dm b/code/controllers/subsystems/theming.dm index 451d558a35f..ac63e175b4f 100644 --- a/code/controllers/subsystems/theming.dm +++ b/code/controllers/subsystems/theming.dm @@ -48,9 +48,6 @@ var/datum/controller/subsystem/theming/SStheming for(var/mob/M in mob_list) if(M.client) apply_theme_from_perfs(M.client) - var/mob/abstract/new_player/np = M - if(istype(np)) - np.new_player_panel_proc() ..() /datum/controller/subsystem/theming/proc/apply_theme_from_perfs(var/user) diff --git a/code/modules/mob/abstract/new_player/login.dm b/code/modules/mob/abstract/new_player/login.dm index d73660d3b3d..debe62a2448 100644 --- a/code/modules/mob/abstract/new_player/login.dm +++ b/code/modules/mob/abstract/new_player/login.dm @@ -43,7 +43,6 @@ sight |= SEE_TURFS player_list |= src - new_player_panel() spawn(40) if(client) client.playtitlemusic() diff --git a/code/modules/mob/abstract/new_player/menu.dm b/code/modules/mob/abstract/new_player/menu.dm new file mode 100644 index 00000000000..392d61b7265 --- /dev/null +++ b/code/modules/mob/abstract/new_player/menu.dm @@ -0,0 +1,231 @@ +//MENU SYSTEM BY BIGRAGE, some awful code, some awful design, all as you love //Code edits/additions by AshtonFox +/mob/abstract/new_player/instantiate_hud(datum/hud/HUD, ui_style, ui_color, ui_alpha) + HUD.new_player_hud(ui_style, ui_color, ui_alpha) + HUD.mymob = src + +/datum/hud/new_player + hud_shown = TRUE + inventory_shown = FALSE + hotkey_ui_hidden = FALSE + +/datum/hud/proc/new_player_hud(var/ui_style='icons/mob/screen/white.dmi', var/ui_color = "#fffffe", var/ui_alpha = 255) + adding = list() + var/obj/screen/using + + using = new /obj/screen/new_player/title() + using.name = "Title" + adding += using + + using = new /obj/screen/new_player/selection/join_game(src) + using.name = "Join Game" + adding += using + + using = new /obj/screen/new_player/selection/settings() + using.name = "Setup Character" + adding += using + + using = new /obj/screen/new_player/selection/manifest() + using.name = "Crew Manifest" + adding += using + + using = new /obj/screen/new_player/selection/observe() + using.name = "Observe" + adding += using + + using = new /obj/screen/new_player/selection/changelog() + using.name = "Changelog" + adding += using + + using = new /obj/screen/new_player/selection/polls() + using.name = "Polls" + adding += using + + mymob.client.screen = list() + mymob.client.screen += adding + src.adding += using + +/obj/screen/new_player + icon = 'icons/misc/hudmenu.dmi' + layer = HUD_LAYER + +/obj/screen/new_player/title + name = "Title" + screen_loc = "WEST,SOUTH" + +/obj/screen/new_player/title/Initialize() + icon = current_map.lobby_icon + var/list/known_icon_states = icon_states(icon) + for(var/lobby_screen in current_map.lobby_screens) + if(!(lobby_screen in known_icon_states)) + error("Lobby screen '[lobby_screen]' did not exist in the icon set [icon].") + current_map.lobby_screens -= lobby_screen + + if(length(current_map.lobby_screens)) + icon_state = pick(current_map.lobby_screens) + else + icon_state = known_icon_states[1] + + . = ..() + +/obj/screen/new_player/selection/join_game + name = "Join Game" + icon_state = "unready" + screen_loc = "LEFT+1,CENTER" + +/obj/screen/new_player/selection/settings + name = "Setup" + icon_state = "setup" + screen_loc = "LEFT+1,CENTER-1" + +/obj/screen/new_player/selection/manifest + name = "Crew Manifest" + icon_state = "manifest" + screen_loc = "LEFT+1,CENTER-2" + +/obj/screen/new_player/selection/observe + name = "Observe" + icon_state = "observe" + screen_loc = "LEFT+1,CENTER-3" + +/obj/screen/new_player/selection/changelog + name = "Changelog" + icon_state = "changelog" + screen_loc = "LEFT+1,CENTER-4" + +/obj/screen/new_player/selection/polls + name = "Polls" + icon_state = "polls" + screen_loc = "LEFT+1,CENTER-5" + +//SELECTION + +/obj/screen/new_player/selection/New(var/desired_loc) + color = null + return ..() + +/obj/screen/new_player/selection/MouseEntered(location,control,params) //Yellow color for the font + color = "#ffb200" + return ..() + +/obj/screen/new_player/selection/MouseExited(location,control,params) + color = null + return ..() + +/obj/screen/new_player/selection/join_game/New(var/datum/hud/H) + hud = H + var/mob/abstract/new_player/player = hud.mymob + update_icon(player) + +/obj/screen/new_player/selection/join_game/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + if(SSticker.current_state <= GAME_STATE_SETTING_UP) + if(player.ready) + player.ready = FALSE + player.ready(FALSE) + else + player.ready = TRUE + player.ready(TRUE) + else + player.join_game() + update_icon(player) + +/obj/screen/new_player/selection/join_game/update_icon(var/mob/abstract/new_player/player) + if(SSticker.current_state <= GAME_STATE_SETTING_UP) + if(player.ready) + icon_state = "ready" + else + icon_state = "unready" + else + icon_state = "joingame" + +/obj/screen/new_player/selection/manifest/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + player.ViewManifest() + +/obj/screen/new_player/selection/observe/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + player.new_player_observe() + +/obj/screen/new_player/selection/settings/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + player.setupcharacter() + +/obj/screen/new_player/selection/changelog/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + player.client.changes() + +/obj/screen/new_player/selection/poll/Click() + var/mob/abstract/new_player/player = usr + sound_to(player, 'sound/effects/pop.ogg') + player.handle_player_polling() + +/mob/abstract/new_player/proc/setupcharacter() + client.prefs.ShowChoices(src) + return TRUE + +/mob/abstract/new_player/proc/ready(var/readying = TRUE) + if(SSticker.current_state <= GAME_STATE_PREGAME) // Make sure we don't ready up after the round has started + // Cannot join without a saved character, if we're on SQL saves. + if (config.sql_saves && !client.prefs.current_character) + alert(src, "You have not saved your character yet. Please do so before readying up.") + return + if(client.unacked_warning_count > 0) + alert(src, "You can not ready up, because you have unacknowledged warnings. Acknowledge your warnings in OOC->Warnings and Notifications.") + return + + ready = readying + else + ready = FALSE + +/mob/abstract/new_player/proc/join_game(href, href_list) + if(SSticker.current_state <= GAME_STATE_SETTING_UP || SSticker.current_state >= GAME_STATE_FINISHED) + to_chat(usr, "The round is either not ready, or has already finished...") + return + LateChoices() //show the latejoin job selection menu + +/mob/abstract/new_player/proc/new_player_observe() + if(!SSATOMS_IS_PROBABLY_DONE) + // Don't allow players to observe until initialization is more or less complete. + // Letting them join too early breaks things, they can wait. + alert(src, "Please wait, the map is not initialized yet.") + return 0 + + if(alert(src,"Are you sure you wish to observe? You will have to wait [config.respawn_delay] minutes before being able to respawn!","Player Setup","Yes","No") == "Yes") + if(!client) + return TRUE + var/mob/abstract/observer/observer = new /mob/abstract/observer(src) + spawning = 1 + sound_to(src, sound(null, repeat = 0, wait = 0, volume = 85, channel = 1)) + + + observer.started_as_observer = 1 + close_spawn_windows() + var/obj/O = locate("landmark*Observer-Start") + if(istype(O)) + to_chat(src, "Now teleporting.") + observer.forceMove(O.loc) + else + to_chat(src, "Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.") + observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly. + + announce_ghost_joinleave(src) + var/mob/living/carbon/human/dummy/mannequin = SSmob.get_mannequin(client.ckey) + client.prefs.dress_preview_mob(mannequin) + observer.appearance = mannequin + observer.alpha = 127 + observer.layer = initial(observer.layer) + observer.invisibility = initial(observer.invisibility) + observer.desc = initial(observer.desc) + + observer.real_name = client.prefs.real_name + observer.name = observer.real_name + if(!client.holder && !config.antag_hud_allowed) + observer.verbs -= /mob/abstract/observer/verb/toggle_antagHUD + observer.ckey = ckey + observer.initialise_postkey() + qdel(src) \ No newline at end of file diff --git a/code/modules/mob/abstract/new_player/new_player.dm b/code/modules/mob/abstract/new_player/new_player.dm index be2b6cada54..ce5cb011202 100644 --- a/code/modules/mob/abstract/new_player/new_player.dm +++ b/code/modules/mob/abstract/new_player/new_player.dm @@ -22,54 +22,6 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player) . = ..() dead_mob_list -= src -/mob/abstract/new_player/verb/new_player_panel() - set src = usr - new_player_panel_proc() - -/mob/abstract/new_player/proc/new_player_panel_proc() - var/output = "
Welcome to the [station_name()]!
" - var/character_name = client.prefs.real_name - if(current_map.description) - output += "[current_map.description]
" - - output += "Setup Character " - output += "Observe " - if(ROUND_IS_STARTED) - output += "View the Crew Manifest " - - if(!IsGuestKey(src.key)) - establish_db_connection(dbcon) - - if(dbcon.IsConnected()) - var/isadmin = 0 - if(src.client && src.client.holder) - isadmin = 1 - var/DBQuery/query = dbcon.NewQuery("SELECT id FROM ss13_poll_question WHERE [(isadmin ? "" : "adminonly = false AND")] Now() BETWEEN starttime AND endtime AND id NOT IN (SELECT pollid FROM ss13_poll_vote WHERE ckey = \"[ckey]\") AND id NOT IN (SELECT pollid FROM ss13_poll_textreply WHERE ckey = \"[ckey]\")") - query.Execute() - var/newpoll = 0 - while(query.NextRow()) - newpoll = 1 - break - - if(newpoll) - output += "Show Player Polls (NEW!)" - else - output += "Show Player Polls" - - if(character_name) - output += "
You will board as [character_name]
" - if(ROUND_IS_STARTED) - output += "Join the Game " - else - if(ready) - output += "Un-Ready " - else - output += "Ready Up " - - output += "
" - send_theme_resources(src) - src << browse(enable_ui_theme(src, output),"window=playersetup;size=560x280;can_close=0") - /mob/abstract/new_player/Stat() ..() @@ -118,52 +70,9 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player) else ready = 0 - if(href_list["refresh"]) - src << browse(null, "window=playersetup") //closes the player setup window) - new_player_panel_proc() - if(href_list["observe"]) - if (!SSATOMS_IS_PROBABLY_DONE) - // Don't allow players to observe until initialization is more or less complete. - // Letting them join too early breaks things, they can wait. - alert(src, "Please wait, the map is not initialized yet.") - return 0 - - if(alert(src,"Are you sure you wish to observe? You will have to wait [config.respawn_delay] minutes before being able to respawn!","Player Setup","Yes","No") == "Yes") - if(!client) return 1 - var/mob/abstract/observer/observer = new /mob/abstract/observer(src) - spawning = 1 - src << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) // MAD JAMS cant last forever yo) - - - observer.started_as_observer = 1 - close_spawn_windows() - var/obj/O = locate("landmark*Observer-Start") - if(istype(O)) - to_chat(src, "Now teleporting.") - observer.forceMove(O.loc) - else - to_chat(src, "Could not locate an observer spawn point. Use the Teleport verb to jump to the station map.") - observer.timeofdeath = world.time // Set the time of death so that the respawn timer works correctly. - - announce_ghost_joinleave(src) - var/mob/living/carbon/human/dummy/mannequin = SSmob.get_mannequin(client.ckey) - client.prefs.dress_preview_mob(mannequin) - observer.appearance = mannequin - observer.alpha = 127 - observer.layer = initial(observer.layer) - observer.invisibility = initial(observer.invisibility) - observer.desc = initial(observer.desc) - - observer.real_name = client.prefs.real_name - observer.name = observer.real_name - if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. - observer.verbs -= /mob/abstract/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing! - observer.ckey = ckey - observer.initialise_postkey() - qdel(src) - - return 1 + new_player_observe() + return TRUE if(href_list["late_join"]) @@ -225,11 +134,8 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player) if(!ready && href_list["preference"]) if(client) client.prefs.process_link(src, href_list) - else if(!href_list["late_join"]) - new_player_panel() if(href_list["showpoll"]) - handle_player_polling() return diff --git a/html/changelogs/mattatlas-newmenu.yml b/html/changelogs/mattatlas-newmenu.yml new file mode 100644 index 00000000000..878d3157889 --- /dev/null +++ b/html/changelogs/mattatlas-newmenu.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a new, swanky main menu." diff --git a/icons/misc/aurora.dmi b/icons/misc/aurora.dmi new file mode 100644 index 00000000000..6dff8658133 Binary files /dev/null and b/icons/misc/aurora.dmi differ diff --git a/icons/misc/hudmenu.dmi b/icons/misc/hudmenu.dmi new file mode 100644 index 00000000000..675f55ad643 Binary files /dev/null and b/icons/misc/hudmenu.dmi differ diff --git a/icons/misc/title.dmi b/icons/misc/title.dmi index 72e7b8dbce7..47f57dabd42 100644 Binary files a/icons/misc/title.dmi and b/icons/misc/title.dmi differ diff --git a/maps/aurora/code/aurora.dm b/maps/aurora/code/aurora.dm index 63686fe7a96..d56c0a62ebc 100644 --- a/maps/aurora/code/aurora.dm +++ b/maps/aurora/code/aurora.dm @@ -7,7 +7,8 @@ it is under the joint administration of the Republic of Biesel and the trans-stellar corporate conglomerate NanoTrasen." path = "aurora" - lobby_screens = list("aurora_asteroid", "aurora_postcard") + lobby_icon = 'icons/misc/aurora.dmi' + lobby_screens = list("corp_titles") station_levels = list(2, 3, 4, 5, 6, 7) admin_levels = list(1)