diff --git a/code/modules/mob/abstract/new_player/menu.dm b/code/modules/mob/abstract/new_player/menu.dm index 6690bc6e1d9..aace3fcea5c 100644 --- a/code/modules/mob/abstract/new_player/menu.dm +++ b/code/modules/mob/abstract/new_player/menu.dm @@ -12,35 +12,35 @@ adding = list() var/obj/screen/using - using = new /obj/screen/new_player/title() + using = new /obj/screen/new_player/title(FALSE, src) using.name = "Title" adding += using - using = new /obj/screen/new_player/selection/join_game(src) + using = new /obj/screen/new_player/selection/join_game(FALSE, src) using.name = "Join Game" adding += using - using = new /obj/screen/new_player/selection/settings() + using = new /obj/screen/new_player/selection/settings(FALSE, src) using.name = "Setup Character" adding += using - using = new /obj/screen/new_player/selection/manifest() + using = new /obj/screen/new_player/selection/manifest(FALSE, src) using.name = "Crew Manifest" adding += using - using = new /obj/screen/new_player/selection/observe() + using = new /obj/screen/new_player/selection/observe(FALSE, src) using.name = "Observe" adding += using - using = new /obj/screen/new_player/selection/changelog() + using = new /obj/screen/new_player/selection/changelog(FALSE, src) using.name = "Changelog" adding += using - using = new /obj/screen/new_player/selection/polls() + using = new /obj/screen/new_player/selection/polls(FALSE, src) using.name = "Polls" adding += using - using = new /obj/screen/new_player/selection/lore_summary() + using = new /obj/screen/new_player/selection/lore_summary(FALSE, src) using.name = "Current Lore Summary" adding += using @@ -57,7 +57,7 @@ screen_loc = "WEST,SOUTH" var/lobby_index = 1 -/obj/screen/new_player/title/Initialize() +/obj/screen/new_player/title/Initialize(mapload, var/datum/hud/H) if(!current_map.lobby_icon) current_map.lobby_icon = pick(current_map.lobby_icons) if(!length(current_map.lobby_screens)) @@ -131,9 +131,10 @@ //SELECTION -/obj/screen/new_player/selection/New(var/desired_loc) +/obj/screen/new_player/selection/Initialize(mapload, var/datum/hud/H) + . = ..() color = null - return ..() + hud = H /obj/screen/new_player/selection/MouseEntered(location,control,params) //Yellow color for the font color = "#ffb200" @@ -147,8 +148,8 @@ animate(src, transform = null, time = 1, easing = CUBIC_EASING) return ..() -/obj/screen/new_player/selection/join_game/New(var/datum/hud/H) - hud = H +/obj/screen/new_player/selection/join_game/Initialize(mapload, var/datum/hud/H) + . = ..() var/mob/abstract/new_player/player = hud.mymob update_icon(player) @@ -178,6 +179,9 @@ /obj/screen/new_player/selection/manifest/Click() var/mob/abstract/new_player/player = usr sound_to(player, 'sound/effects/menu_click.ogg') + if(SSticker.current_state < GAME_STATE_PLAYING) + to_chat(player, SPAN_WARNING("The game hasn't started yet!")) + return player.ViewManifest() /obj/screen/new_player/selection/observe/Click() @@ -195,6 +199,20 @@ sound_to(player, 'sound/effects/menu_click.ogg') player.client.changes() +/obj/screen/new_player/selection/polls/Initialize() + . = ..() + var/mob/M = hud.mymob + if(!M) + return + if(dbcon.IsConnected()) + var/isadmin = M.client && M.client.holder + 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 = \"[M.ckey]\") AND id NOT IN (SELECT pollid FROM ss13_poll_textreply WHERE ckey = \"[M.ckey]\")") + query.Execute() + var/newpoll = query.NextRow() + + if(newpoll) + icon_state = "polls_new" + /obj/screen/new_player/selection/polls/Click() var/mob/abstract/new_player/player = usr sound_to(player, 'sound/effects/menu_click.ogg') @@ -275,4 +293,4 @@ if(config.lore_summary) var/output = "
Welcome to the [station_name()]!
" output += "[config.lore_summary]
" - to_chat(src, output) \ No newline at end of file + to_chat(src, output) diff --git a/html/changelogs/mattatlas-newpolls.yml b/html/changelogs/mattatlas-newpolls.yml new file mode 100644 index 00000000000..58d0b8fe8e1 --- /dev/null +++ b/html/changelogs/mattatlas-newpolls.yml @@ -0,0 +1,42 @@ +################################ +# 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: + - tweak: "If there are new polls, the poll button will now be highlighted." + - tweak: "You can no longer open the crew manifest before the game starts." diff --git a/icons/misc/hudmenu.dmi b/icons/misc/hudmenu.dmi index 6851486967f..c7fd9ded513 100644 Binary files a/icons/misc/hudmenu.dmi and b/icons/misc/hudmenu.dmi differ