mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
Merge remote-tracking branch 'upstream/master' into plasmamen-rework
# Conflicts: # code/modules/mob/living/carbon/human/update_icons.dm # icons/obj/device.dmi # paradise.dme
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
var/list/related_accounts_ip = list() //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
|
||||
var/list/related_accounts_cid = list() //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
|
||||
|
||||
preload_rsc = 1 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server.
|
||||
preload_rsc = 0 // This is 0 so we can set it to an URL once the player logs in and have them download the resources from a different server.
|
||||
|
||||
var/global/obj/screen/click_catcher/void
|
||||
|
||||
|
||||
@@ -307,11 +307,6 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
// Change the way they should download resources.
|
||||
if(config.resource_urls)
|
||||
preload_rsc = pick(config.resource_urls)
|
||||
else preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
||||
|
||||
to_chat(src, "<span class='warning'>If the title screen is black, resources are still downloading. Please be patient until the title screen appears.</span>")
|
||||
|
||||
|
||||
@@ -413,6 +408,16 @@
|
||||
|
||||
Master.UpdateTickRate()
|
||||
|
||||
// Check total playercount
|
||||
var/playercount = 0
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
|
||||
if(playercount >= 150 && GLOB.panic_bunker_enabled == 0)
|
||||
GLOB.panic_bunker_enabled = 1
|
||||
message_admins("Panic bunker has been automatically enabled due to playercount surpassing 150")
|
||||
|
||||
/client/proc/is_connecting_from_localhost()
|
||||
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
|
||||
if(!isnull(address) && address in localhost_addresses)
|
||||
@@ -428,6 +433,9 @@
|
||||
GLOB.admins -= src
|
||||
GLOB.directory -= ckey
|
||||
GLOB.clients -= src
|
||||
if(movingmob)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
Master.UpdateTickRate()
|
||||
return ..()
|
||||
|
||||
@@ -538,6 +546,14 @@
|
||||
message_admins("SQL ERROR during log_client_to_db (update). Error : \[[err]\]\n")
|
||||
else
|
||||
//New player!! Need to insert all the stuff
|
||||
|
||||
// Check new peeps for panic bunker
|
||||
if(GLOB.panic_bunker_enabled)
|
||||
message_admins("<span class='adminnotice'>Failed Login: [key] - New account attempting to connect during panic bunker</span>")
|
||||
src << "Sorry but the server is currently not accepting connections from never before seen players. Please try again later."
|
||||
del(src)
|
||||
return // Dont insert or they can just go in again
|
||||
|
||||
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[ckey]', Now(), Now(), '[sql_ip]', '[sql_computerid]', '[sql_admin_rank]')")
|
||||
if(!query_insert.Execute())
|
||||
var/err = query_insert.ErrorMsg()
|
||||
@@ -755,6 +771,11 @@
|
||||
|
||||
//Send resources to the client.
|
||||
/client/proc/send_resources()
|
||||
// Change the way they should download resources.
|
||||
if(config.resource_urls)
|
||||
preload_rsc = pick(config.resource_urls)
|
||||
else
|
||||
preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
||||
// Most assets are now handled through global_cache.dm
|
||||
getFiles(
|
||||
'html/search.js', // Used in various non-NanoUI HTML windows for search functionality
|
||||
|
||||
@@ -201,6 +201,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
//Gear stuff
|
||||
var/list/gear = list()
|
||||
var/gear_tab = "General"
|
||||
// Parallax
|
||||
var/parallax = PARALLAX_HIGH
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
@@ -462,6 +464,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'><b>Change</b></a><br>"
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'><b>Edit</b></a><br>"
|
||||
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallax'>"
|
||||
switch (parallax)
|
||||
if(PARALLAX_LOW)
|
||||
dat += "Low"
|
||||
if(PARALLAX_MED)
|
||||
dat += "Medium"
|
||||
if(PARALLAX_INSANE)
|
||||
dat += "Insane"
|
||||
if(PARALLAX_DISABLE)
|
||||
dat += "Disabled"
|
||||
else
|
||||
dat += "High"
|
||||
dat += "</a><br>"
|
||||
dat += "<b>Play Admin MIDIs:</b> <a href='?_src_=prefs;preference=hear_midis'><b>[(sound & SOUND_MIDI) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Play Lobby Music:</b> <a href='?_src_=prefs;preference=lobby_music'><b>[(sound & SOUND_LOBBY) ? "Yes" : "No"]</b></a><br>"
|
||||
dat += "<b>Randomized Character Slot:</b> <a href='?_src_=prefs;preference=randomslot'><b>[randomslot ? "Yes" : "No"]</b></a><br>"
|
||||
@@ -2072,6 +2087,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(href_list["tab"])
|
||||
current_tab = text2num(href_list["tab"])
|
||||
|
||||
|
||||
if("ambientocclusion")
|
||||
toggles ^= AMBIENT_OCCLUSION
|
||||
if(parent && parent.screen && parent.screen.len)
|
||||
@@ -2080,6 +2096,19 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(toggles & AMBIENT_OCCLUSION)
|
||||
PM.filters += FILTER_AMBIENT_OCCLUSION
|
||||
|
||||
if("parallax")
|
||||
var/parallax_styles = list(
|
||||
"Off" = PARALLAX_DISABLE,
|
||||
"Low" = PARALLAX_LOW,
|
||||
"Medium" = PARALLAX_MED,
|
||||
"High" = PARALLAX_HIGH,
|
||||
"Insane" = PARALLAX_INSANE
|
||||
)
|
||||
parallax = parallax_styles[input(user, "Pick a parallax style", "Parallax Style") as null|anything in parallax_styles]
|
||||
if(parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
|
||||
ShowChoices(user)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
clientfps,
|
||||
atklog,
|
||||
fuid,
|
||||
afk_watch
|
||||
afk_watch,
|
||||
parallax
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
@@ -54,6 +55,7 @@
|
||||
atklog = text2num(query.item[18])
|
||||
fuid = text2num(query.item[19])
|
||||
afk_watch = text2num(query.item[20])
|
||||
parallax = text2num(query.item[21])
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
@@ -75,6 +77,7 @@
|
||||
atklog = sanitize_integer(atklog, 0, 100, initial(atklog))
|
||||
fuid = sanitize_integer(fuid, 0, 10000000, initial(fuid))
|
||||
afk_watch = sanitize_integer(afk_watch, 0, 1, initial(afk_watch))
|
||||
parallax = sanitize_integer(parallax, 0, 16, initial(parallax))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
@@ -105,7 +108,8 @@
|
||||
ghost_anonsay='[ghost_anonsay]',
|
||||
clientfps='[clientfps]',
|
||||
atklog='[atklog]',
|
||||
afk_watch='[afk_watch]'
|
||||
afk_watch='[afk_watch]',
|
||||
parallax='[parallax]'
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user