diff --git a/code/__DEFINES/global.dm b/code/__DEFINES/global.dm index 9443eda8f86..3e032671341 100644 --- a/code/__DEFINES/global.dm +++ b/code/__DEFINES/global.dm @@ -93,6 +93,7 @@ GLOBAL_LIST_INIT(reverse_dir, list( // reverse_dir[dir] = reverse of dir 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63 )) +GLOBAL_LIST_INIT(all_days, list("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")) GLOBAL_LIST_EMPTY(combatlog) GLOBAL_PROTECT(lawchanges) diff --git a/code/controllers/subsystems/statpanel.dm b/code/controllers/subsystems/statpanel.dm index 71a69917ad8..d2ab2447abc 100644 --- a/code/controllers/subsystems/statpanel.dm +++ b/code/controllers/subsystems/statpanel.dm @@ -35,7 +35,8 @@ SUBSYSTEM_DEF(statpanels) "Round Time: [get_round_duration_formatted()]", "Ship Time: [worldtime2text()]", "Current Space Sector: [SSatlas.current_sector.name]", - "Last Transfer Vote: [GLOB.last_transfer_vote ? time2text(GLOB.last_transfer_vote, "hh:mm") : "Never"]" + "Last Transfer Vote: [GLOB.last_transfer_vote ? time2text(GLOB.last_transfer_vote, "hh:mm") : "Never"]", + "Next Port Visit: [SSatlas.current_sector.next_port_visit_string]" ) if(eta_status) global_data += eta_status diff --git a/code/game/world.dm b/code/game/world.dm index 73c0ca1b637..0f642bfe8b2 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -9,6 +9,7 @@ */ GLOBAL_DATUM_INIT(init, /datum/global_init, new) GLOBAL_DATUM(config, /datum/configuration) +GLOBAL_VAR(motd) GLOBAL_PROTECT(config) /** @@ -88,7 +89,9 @@ GLOBAL_PROTECT(config) GLOB.href_logfile = file("data/logs/[GLOB.diary_date_string] hrefs.htm") GLOB.diary = "data/logs/[GLOB.diary_date_string]_[GLOB.round_id].log" log_startup() - GLOB.changelog_hash = md5('html/changelog.html') //used for telling if the changelog has changed recently + // Used for telling if the changelog has changed recently. + GLOB.changelog_hash = md5('html/changelog.html') + load_motd() if(GLOB.config.logsettings["log_runtime"]) GLOB.diary_runtime = file("data/logs/_runtime/[GLOB.diary_date_string]-runtime.log") @@ -518,4 +521,7 @@ var/list/world_api_rate_limit = list() call_ext(dll, "auxtools_init")() enable_debugging() +/world/proc/load_motd() + GLOB.motd = file2text("config/motd.txt") + #undef FAILED_DB_CONNECTION_CUTOFF diff --git a/code/modules/background/space_sectors/badlands.dm b/code/modules/background/space_sectors/badlands.dm index 4d254eb6a04..8e23ac436a2 100644 --- a/code/modules/background/space_sectors/badlands.dm +++ b/code/modules/background/space_sectors/badlands.dm @@ -62,12 +62,6 @@ sector_hud_menu_sound = 'sound/effects/menu_click_heavy.ogg' sector_hud_arrow = "menu_arrow" -/datum/space_sector/srandmarr/get_port_travel_time() - return "[rand(6, 12)] hours" - -/datum/space_sector/srandmarr/generate_system_name() - return "S'rand'marr, and nearby points of interest" - /datum/space_sector/nrrahrahul name = SECTOR_NRRAHRAHUL description = "Hro'zamal is the second planet in the Nrrahrahul system. Formerly named Nrrahrahul Two, it was given the name Hro'zamal after the establishment of a permanent civilian \ diff --git a/code/modules/background/space_sectors/coalition/coalition.dm b/code/modules/background/space_sectors/coalition/coalition.dm index e626b81744f..6fd68311d95 100644 --- a/code/modules/background/space_sectors/coalition/coalition.dm +++ b/code/modules/background/space_sectors/coalition/coalition.dm @@ -64,6 +64,8 @@ guaranteed_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/konyang) cargo_price_coef = list("nt" = 1.1, "hpi" = 0.7, "zhu" = 0.4, "een" = 1.0, "get" = 1.1, "arz" = 1.8, "blm" = 0.9, "iac" = 1.2, "zsc" = 1.8, "vfc" = 0.9, "bis" = 0.4, "xmg" = 0.7, "npi" = 0.8) + ports_of_call = list("the corporate district of Aoyama") + scheduled_port_visits = list("Thursday", "Sunday") starlight_color = "#e2719b" starlight_power = 2//placeholder starlight_range = 4//placeholder diff --git a/code/modules/background/space_sectors/space_sector.dm b/code/modules/background/space_sectors/space_sector.dm index 4d73ca10019..cce9ddd4c75 100644 --- a/code/modules/background/space_sectors/space_sector.dm +++ b/code/modules/background/space_sectors/space_sector.dm @@ -30,6 +30,17 @@ /// Lobby music overrides. var/list/lobby_tracks + /// A list of the major ports in this sector. + /// Note that these are supposed to be visitable by the Horizon and its crew, so only put those there. + var/list/ports_of_call + /// The days of the next port visits. If null, port visits are disabled. + /// Must be a day found in the all_days list. + var/list/scheduled_port_visits = list("Sunday") + /// This variable holds the calculated time (integer) until port visit. Do not edit manually. + var/next_port_visit + /// This variable holds the string of time until port visit. Will be "in 1 day", "in 2 days", "today", etc. Do not edit manually. + var/next_port_visit_string + //vars used by the meteor random event var/list/meteors_minor = list( @@ -125,6 +136,23 @@ /datum/space_sector/proc/setup_current_sector() SHOULD_CALL_PARENT(TRUE) + if(SSatlas.current_map.ports_of_call && length(scheduled_port_visits)) + var/current_day_index = GLOB.all_days.Find(time2text(world.realtime, "Day")) + var/days_calculated = 0 + // The main problem to consider here is that you have to loop around for two weeks to find all the days, basically. + // It could be Thursday with Wednesday as a port of call, for example. + while(!next_port_visit) + if(!(GLOB.all_days[current_day_index] in SSatlas.current_sector.scheduled_port_visits)) + days_calculated++ + current_day_index++ + if(current_day_index > length(GLOB.all_days)) + current_day_index = 1 + continue + next_port_visit = current_day_index + break + + next_port_visit_string = days_calculated == 0 ? "today" : days_calculated == 1 ? "in [days_calculated] day" : "in [days_calculated] days" + // For now, i've put processing to only happen if the sector has a radio station // but if, in the future, you add more stuff for the processor to handle, feel free to move it out of the if block if(length(lore_radio_stations)) @@ -178,12 +206,6 @@ /datum/space_sector/proc/get_chat_description() return "
Current Sector: [name]!
[description]
" -/datum/space_sector/proc/get_port_travel_time() - return "[rand(1, 3)] days" - -/datum/space_sector/proc/generate_system_name() - return "[pick("Miranda", "BNM", "Xavier", "GJ", "HD", "TC", "Melissa", "TC")][prob(10) ? " Eridani" : ""] [rand(100,999)][prob(10) ? " [pick(greek_letters)]" : ""]" - /// Returns a flat list of all possible away sites that can spawn in this sector. /datum/space_sector/proc/possible_sites_in_sector() var/list/away_sites = list() diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index e504752988e..59025cfe6e3 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -236,19 +236,6 @@ var/list/localhost_addresses = list( if ("webint") src.open_webint() - // Handle the updating of MotD and Memo tabs upon click. - if ("updateHashes") - var/save = 0 - if (href_list["#motd-tab"]) - src.prefs.motd_hash = href_list["#motd-tab"] - save = 1 - if (href_list["#memo-tab"]) - src.prefs.memo_hash = href_list["#memo-tab"] - save = 1 - - if (save) - src.prefs.save_preferences() - return if (href_list["view_jobban"]) diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm index b670a02dda1..421aecc7f36 100644 --- a/code/modules/client/preference_setup/global/02_settings.dm +++ b/code/modules/client/preference_setup/global/02_settings.dm @@ -7,8 +7,6 @@ S["default_slot"] >> pref.default_slot S["toggles"] >> pref.toggles S["sfx_toggles"] >> pref.sfx_toggles - S["motd_hash"] >> pref.motd_hash - S["memo_hash"] >> pref.memo_hash S["toggles_secondary"] >> pref.toggles_secondary /datum/category_item/player_setup_item/player_global/settings/save_preferences(var/savefile/S) @@ -16,8 +14,6 @@ S["default_slot"] << pref.default_slot S["toggles"] << pref.toggles S["sfx_toggles"] << pref.sfx_toggles - S["motd_hash"] << pref.motd_hash - S["memo_hash"] << pref.memo_hash S["toggles_secondary"] << pref.toggles_secondary /datum/category_item/player_setup_item/player_global/settings/gather_load_query() @@ -28,8 +24,6 @@ "current_character", "toggles", "sfx_toggles", - "lastmotd" = "motd_hash", - "lastmemo" = "memo_hash", "toggles_secondary" ), "args" = list("ckey") @@ -60,8 +54,6 @@ "current_character" = pref.current_character, "toggles" = pref.toggles, "sfx_toggles" = pref.sfx_toggles, - "lastmotd" = pref.motd_hash, - "lastmemo" = pref.memo_hash, "toggles_secondary" = pref.toggles_secondary ) @@ -74,8 +66,6 @@ pref.default_slot = sanitize_integer(text2num(pref.default_slot), 1, GLOB.config.character_slots, initial(pref.default_slot)) pref.toggles = sanitize_integer(text2num(pref.toggles), 0, BITFIELDMAX, initial(pref.toggles)) pref.sfx_toggles = sanitize_integer(text2num(pref.sfx_toggles), 0, BITFIELDMAX, initial(pref.toggles)) - pref.motd_hash = sanitize_text(pref.motd_hash, initial(pref.motd_hash)) - pref.memo_hash = sanitize_text(pref.memo_hash, initial(pref.memo_hash)) pref.toggles_secondary = sanitize_integer(text2num(pref.toggles_secondary), 0, BITFIELDMAX, initial(pref.toggles_secondary)) /datum/category_item/player_setup_item/player_global/settings/content(mob/user) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index a100f5b2d53..5745321878c 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -33,8 +33,6 @@ var/list/preferences_datums = list() var/tgui_inputs_swapped = FALSE //Style for popup tooltips var/tooltip_style = "Midnight" - var/motd_hash = "" //Hashes for the new server greeting window. - var/memo_hash = "" //character preferences var/real_name //our character's name diff --git a/code/modules/mob/abstract/new_player/login.dm b/code/modules/mob/abstract/new_player/login.dm index e357ce8d237..c53f6cf8703 100644 --- a/code/modules/mob/abstract/new_player/login.dm +++ b/code/modules/mob/abstract/new_player/login.dm @@ -6,8 +6,6 @@ update_Login_details() //handles setting lastKnownIP and computer_id for use by the ban systems as well as checking for multikeying - to_chat(src, "
Game ID:
[GLOB.round_id]
") - if(!mind) mind = new /datum/mind(key) mind.active = 1 @@ -18,3 +16,13 @@ GLOB.player_list |= src client.playtitlemusic() + addtimer(CALLBACK(src, PROC_REF(show_lobby_info)), 5 SECONDS) + +/mob/abstract/new_player/proc/show_lobby_info() + if(!client) + return + + if(GLOB.motd) + to_chat(src, "
[GLOB.motd]
") + + to_chat(src, "
Game ID:
[GLOB.round_id]
") diff --git a/html/changelogs/mattatlas-ubelsteponme.yml b/html/changelogs/mattatlas-ubelsteponme.yml new file mode 100644 index 00000000000..931e2c1ca7b --- /dev/null +++ b/html/changelogs/mattatlas-ubelsteponme.yml @@ -0,0 +1,43 @@ +################################ +# 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: "Ports of call and shore leave days are now mechanically represented in game. Available ports will be present on Bridge sensor reports. The same goes for the next port visit, which is also present on your Status panel." + - rscdel: "Removed now superfluous random jump info." + - rscadd: "Readded the MOTD." diff --git a/maps/_common/mapsystem/map.dm b/maps/_common/mapsystem/map.dm index d1893a42261..4a6a7944c26 100644 --- a/maps/_common/mapsystem/map.dm +++ b/maps/_common/mapsystem/map.dm @@ -57,6 +57,10 @@ var/bluespace_called_message var/bluespace_recall_message + /// If this map has ports of call and refuels there. Crew are implied to be able to leave to these ports. + /// Ports of call are taken from the current map sector. + var/ports_of_call = FALSE + var/evac_controller_type = /datum/evacuation_controller var/list/station_networks = list() // Camera networks that will show up on the console. diff --git a/maps/sccv_horizon/code/sccv_horizon.dm b/maps/sccv_horizon/code/sccv_horizon.dm index 4a2a3941c87..b8848f5f41c 100644 --- a/maps/sccv_horizon/code/sccv_horizon.dm +++ b/maps/sccv_horizon/code/sccv_horizon.dm @@ -98,6 +98,7 @@ rogue_drone_end_message = "The hostile drone swarm has left the ship's proximity." rogue_drone_destroyed_message = "Sensors indicate the unidentified drone swarm has left the immediate proximity of the ship." + ports_of_call = TRUE map_shuttles = list( /datum/shuttle/autodock/ferry/lift/scc_ship/morgue, @@ -149,26 +150,12 @@ if (horizon) //If the overmap is disabled, it's possible for there to be no Horizon. var/list/space_things = list() welcome_text += "Current Coordinates:
[horizon.x]:[horizon.y]

" - welcome_text += "Next system targeted for jump:
[SSatlas.current_sector.generate_system_name()]

" - var/last_visit - var/current_day = time2text(world.realtime, "Day") - switch(current_day) - if("Monday") - last_visit = "1 day ago" - if("Tuesday") - last_visit = "2 days ago" - if("Wednesday") - last_visit = "3 days ago" - if("Thursday") - last_visit = "4 days ago" - if("Friday") - last_visit = "5 days ago" - if("Saturday") - last_visit = "6 days ago" - if("Sunday") - last_visit = "1 week ago" - welcome_text += "Last port visit:
[last_visit]

" - welcome_text += "Travel time to nearest port:
[SSatlas.current_sector.get_port_travel_time()]

" + welcome_text += "Available Ports of Call: [english_list(SSatlas.current_sector.ports_of_call, "none")]
" + if(SSatlas.current_sector.next_port_visit) + welcome_text += "Next Port Visit: in [SSatlas.current_sector.next_port_visit] days
" + else + welcome_text += "There is no port visit scheduled.

" + welcome_text += "It is advised to inform crew of the available ports of call and the date of the next port visit.

" welcome_text += "Scan results show the following points of interest:
" for(var/zlevel in GLOB.map_sectors) @@ -192,8 +179,9 @@ welcome_text += "
" - post_comm_message("SCCV Horizon Sensor Readings", welcome_text) - priority_announcement.Announce(message = "Long-range sensor readings have been printed out at all communication consoles.") + post_comm_message("SCCV Horizon Sensor Report", welcome_text) + var/report = "The long-range sensor readings have been printed out at all communication consoles." + priority_announcement.Announce(message = report) /datum/map/sccv_horizon/load_holodeck_programs() // loads only if at least two engineers are present diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss index 3df3eefdb36..32ef0bfb756 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss @@ -196,8 +196,11 @@ a.popt { /* MOTD */ .motd { color: #a4bad6; - font-family: Verdana, sans-serif; + font-family: 'Times New Roman', Times, serif; white-space: 'normal'; + border: 1px solid #a4bad6; + margin: 0.5em; + padding: 0.5em 0.75em; } .motd h1, .motd h2, @@ -208,12 +211,7 @@ a.popt { color: #a4bad6; text-decoration: underline; } -.vote { - color: #9933ff; -} -.alert { - color: #d82020; -} + .motd a, .motd a:link, .motd a:visited, @@ -467,7 +465,10 @@ em { font-weight: bold; } .alert { - color: #ff0000; + color: #d82020; +} +.vote { + color: #9933ff; } .emote { diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss index c49bd1545a5..d02f6781623 100644 --- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss +++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss @@ -215,8 +215,11 @@ a.popt { .motd { color: #a4bad6; - font-family: Verdana, sans-serif; + font-family: 'Times New Roman', Times, serif; white-space: 'normal'; + border: 1px solid #a4bad6; + margin: 0.5em; + padding: 0.5em 0.75em; } .motd h1, .motd h2,