mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-21 12:04:48 +01:00
conflicts
This commit is contained in:
@@ -147,16 +147,16 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
//These datums are used to populate the asset cache, the proc "register()" does this.
|
||||
|
||||
//all of our asset datums, used for referring to these later
|
||||
/var/global/list/asset_datums = list()
|
||||
GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
//get a assetdatum or make a new one
|
||||
/proc/get_asset_datum(var/type)
|
||||
if(!(type in asset_datums))
|
||||
if(!(type in GLOB.asset_datums))
|
||||
return new type()
|
||||
return asset_datums[type]
|
||||
return GLOB.asset_datums[type]
|
||||
|
||||
/datum/asset/New()
|
||||
asset_datums[type] = src
|
||||
GLOB.asset_datums[type] = src
|
||||
|
||||
/datum/asset/proc/register()
|
||||
return
|
||||
@@ -195,7 +195,8 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
"large_stamp-rep.png" = 'icons/paper_icons/large_stamp-rep.png',
|
||||
"large_stamp-magistrate.png"= 'icons/paper_icons/large_stamp-magistrate.png',
|
||||
"talisman.png" = 'icons/paper_icons/talisman.png',
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png'
|
||||
"ntlogo.png" = 'icons/paper_icons/ntlogo.png',
|
||||
"syndielogo.png" ='icons/paper_icons/syndielogo.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/chess
|
||||
@@ -313,14 +314,14 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
if(!(state in list("cap", "connector", "dtvalve", "dual-port vent", "dvalve", "filter", "he", "heunary", "injector", "junction", "manifold", "mixer", "tvalve", "mvalve", "passive vent", "passivegate", "pump", "scrubber", "simple", "universal", "uvent", "volumepump"))) //Basically all the pipes we want sprites for
|
||||
continue
|
||||
if(state in list("he", "simple"))
|
||||
for(var/D in alldirs)
|
||||
for(var/D in GLOB.alldirs)
|
||||
assets["[state]-[dir2text(D)].png"] = icon('icons/obj/pipe-item.dmi', state, D)
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
assets["[state]-[dir2text(D)].png"] = icon('icons/obj/pipe-item.dmi', state, D)
|
||||
for(var/state in icon_states('icons/obj/pipes/disposal.dmi'))
|
||||
if(!(state in list("pipe-c", "pipe-j1", "pipe-s", "pipe-t", "pipe-y", "intake", "outlet", "pipe-j1s"))) //Pipes we want sprites for
|
||||
continue
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
assets["[state]-[dir2text(D)].png"] = icon('icons/obj/pipes/disposal.dmi', state, D)
|
||||
for(var/asset_name in assets)
|
||||
register_asset(asset_name, assets[asset_name])
|
||||
|
||||
@@ -28,13 +28,6 @@
|
||||
|
||||
var/adminhelped = 0
|
||||
|
||||
// var/gc_destroyed //Time when this object was destroyed. [Inherits from datum]
|
||||
|
||||
#ifdef TESTING
|
||||
var/running_find_references
|
||||
var/last_find_references = 0
|
||||
#endif
|
||||
|
||||
///////////////
|
||||
//SOUND STUFF//
|
||||
///////////////
|
||||
@@ -99,4 +92,4 @@
|
||||
var/client_keysend_amount = 0
|
||||
var/next_keysend_reset = 0
|
||||
var/next_keysend_trip_reset = 0
|
||||
var/keysend_tripped = FALSE
|
||||
var/keysend_tripped = FALSE
|
||||
|
||||
@@ -319,16 +319,16 @@
|
||||
if(!config.disable_localhost_admin)
|
||||
if(is_connecting_from_localhost())
|
||||
new /datum/admins("!LOCALHOST!", R_HOST, ckey) // Makes localhost rank
|
||||
holder = admin_datums[ckey]
|
||||
holder = GLOB.admin_datums[ckey]
|
||||
if(holder)
|
||||
GLOB.admins += src
|
||||
holder.owner = src
|
||||
|
||||
//preferences datum - also holds some persistant data for the client (because we may as well keep these datums to a minimum)
|
||||
prefs = preferences_datums[ckey]
|
||||
prefs = GLOB.preferences_datums[ckey]
|
||||
if(!prefs)
|
||||
prefs = new /datum/preferences(src)
|
||||
preferences_datums[ckey] = prefs
|
||||
GLOB.preferences_datums[ckey] = prefs
|
||||
else
|
||||
prefs.parent = src
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
@@ -339,8 +339,8 @@
|
||||
spawn() // Goonchat does some non-instant checks in start()
|
||||
chatOutput.start()
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
host = key
|
||||
if( (world.address == address || !address) && !GLOB.host )
|
||||
GLOB.host = key
|
||||
world.update_status()
|
||||
|
||||
if(holder)
|
||||
@@ -373,13 +373,11 @@
|
||||
send_resources()
|
||||
|
||||
if(prefs.toggles & UI_DARKMODE) // activates dark mode if its flagged. -AA07
|
||||
if(establish_db_connection())
|
||||
activate_darkmode()
|
||||
activate_darkmode()
|
||||
else
|
||||
// activate_darkmode() calls the CL update button proc, so we dont want it double called
|
||||
SSchangelog.UpdatePlayerChangelogButton(src)
|
||||
|
||||
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. -CP
|
||||
if(establish_db_connection())
|
||||
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
|
||||
update_changelog_button()
|
||||
|
||||
if(prefs.toggles & DISABLE_KARMA) // activates if karma is disabled
|
||||
if(establish_db_connection())
|
||||
@@ -393,10 +391,10 @@
|
||||
|
||||
check_forum_link()
|
||||
|
||||
if(custom_event_msg && custom_event_msg != "")
|
||||
if(GLOB.custom_event_msg && GLOB.custom_event_msg != "")
|
||||
to_chat(src, "<h1 class='alert'>Custom Event</h1>")
|
||||
to_chat(src, "<h2 class='alert'>A custom event is taking place. OOC Info:</h2>")
|
||||
to_chat(src, "<span class='alert'>[html_encode(custom_event_msg)]</span>")
|
||||
to_chat(src, "<span class='alert'>[html_encode(GLOB.custom_event_msg)]</span>")
|
||||
to_chat(src, "<br>")
|
||||
|
||||
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
|
||||
@@ -414,13 +412,20 @@
|
||||
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")
|
||||
// Update the state of the panic bunker based on current playercount
|
||||
var/threshold = config.panic_bunker_threshold
|
||||
|
||||
if((playercount > threshold) && (GLOB.panic_bunker_enabled == FALSE))
|
||||
GLOB.panic_bunker_enabled = TRUE
|
||||
message_admins("Panic bunker has been automatically enabled due to playercount rising above [threshold]")
|
||||
|
||||
if((playercount < threshold) && (GLOB.panic_bunker_enabled == TRUE))
|
||||
GLOB.panic_bunker_enabled = FALSE
|
||||
message_admins("Panic bunker has been automatically disabled due to playercount dropping below [threshold]")
|
||||
|
||||
/client/proc/is_connecting_from_localhost()
|
||||
var/localhost_addresses = list("127.0.0.1", "::1") // Adresses
|
||||
if(!isnull(address) && address in localhost_addresses)
|
||||
if(!isnull(address) && (address in localhost_addresses))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -445,7 +450,7 @@
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
return
|
||||
|
||||
if(check_rights(R_ADMIN, 0, mob)) // Yes, the mob is required, regardless of other examples in this file, it won't work otherwise
|
||||
@@ -454,7 +459,7 @@
|
||||
return
|
||||
|
||||
//Donator stuff.
|
||||
var/DBQuery/query_donor_select = dbcon.NewQuery("SELECT ckey, tier, active FROM `[format_table_name("donators")]` WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query_donor_select = GLOB.dbcon.NewQuery("SELECT ckey, tier, active FROM `[format_table_name("donators")]` WHERE ckey = '[ckey]'")
|
||||
query_donor_select.Execute()
|
||||
while(query_donor_select.NextRow())
|
||||
if(!text2num(query_donor_select.item[3]))
|
||||
@@ -475,11 +480,11 @@
|
||||
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
return
|
||||
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
query.Execute()
|
||||
var/sql_id = 0
|
||||
player_age = 0 // New players won't have an entry so knowing we have a connection we set this to zero to be updated if there is a record.
|
||||
@@ -489,7 +494,7 @@
|
||||
break
|
||||
|
||||
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]'")
|
||||
var/DBQuery/query_ip = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]'")
|
||||
query_ip.Execute()
|
||||
related_accounts_ip = list()
|
||||
while(query_ip.NextRow())
|
||||
@@ -497,7 +502,7 @@
|
||||
related_accounts_ip.Add("[query_ip.item[1]]")
|
||||
|
||||
|
||||
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]'")
|
||||
var/DBQuery/query_cid = GLOB.dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]'")
|
||||
query_cid.Execute()
|
||||
related_accounts_cid = list()
|
||||
while(query_cid.NextRow())
|
||||
@@ -539,7 +544,7 @@
|
||||
|
||||
if(sql_id)
|
||||
//Player already identified previously, we need to just update the 'lastseen', 'ip' and 'computer_id' variables
|
||||
var/DBQuery/query_update = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
|
||||
var/DBQuery/query_update = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastseen = Now(), ip = '[sql_ip]', computerid = '[sql_computerid]', lastadminrank = '[sql_admin_rank]' WHERE id = [sql_id]")
|
||||
if(!query_update.Execute())
|
||||
var/err = query_update.ErrorMsg()
|
||||
log_game("SQL ERROR during log_client_to_db (update). Error : \[[err]\]\n")
|
||||
@@ -549,19 +554,19 @@
|
||||
|
||||
// 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."
|
||||
var/threshold = config.panic_bunker_threshold
|
||||
src << "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. 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]')")
|
||||
var/DBQuery/query_insert = GLOB.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()
|
||||
log_game("SQL ERROR during log_client_to_db (insert). Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during log_client_to_db (insert). Error : \[[err]\]\n")
|
||||
|
||||
// Log player connections to DB
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`datetime`,`ckey`,`ip`,`computerid`) VALUES(Now(),'[ckey]','[sql_ip]','[sql_computerid]');")
|
||||
var/DBQuery/query_accesslog = GLOB.dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]`(`datetime`,`ckey`,`ip`,`computerid`) VALUES(Now(),'[ckey]','[sql_ip]','[sql_computerid]');")
|
||||
query_accesslog.Execute()
|
||||
|
||||
/client/proc/check_ip_intel()
|
||||
@@ -609,14 +614,14 @@
|
||||
to_chat(src, "<B>You have no verified forum account. <a href='?src=[UID()];link_forum_account=true'>VERIFY FORUM ACCOUNT</a></B>")
|
||||
|
||||
/client/proc/create_oauth_token()
|
||||
var/DBQuery/query_find_token = dbcon.NewQuery("SELECT token FROM [format_table_name("oauth_tokens")] WHERE ckey = '[ckey]' limit 1")
|
||||
var/DBQuery/query_find_token = GLOB.dbcon.NewQuery("SELECT token FROM [format_table_name("oauth_tokens")] WHERE ckey = '[ckey]' limit 1")
|
||||
if(!query_find_token.Execute())
|
||||
log_debug("create_oauth_token: failed db read")
|
||||
return
|
||||
if(query_find_token.NextRow())
|
||||
return query_find_token.item[1]
|
||||
var/tokenstr = md5("[ckey][rand()]")
|
||||
var/DBQuery/query_insert_token = dbcon.NewQuery("INSERT INTO [format_table_name("oauth_tokens")] (ckey, token) VALUES('[ckey]','[tokenstr]')")
|
||||
var/DBQuery/query_insert_token = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("oauth_tokens")] (ckey, token) VALUES('[ckey]','[tokenstr]')")
|
||||
if(!query_insert_token.Execute())
|
||||
return
|
||||
return tokenstr
|
||||
@@ -631,7 +636,7 @@
|
||||
if(!fromban)
|
||||
to_chat(src, "Your forum account is already set.")
|
||||
return
|
||||
var/DBQuery/query_find_link = dbcon.NewQuery("SELECT fuid FROM [format_table_name("player")] WHERE ckey = '[ckey]' limit 1")
|
||||
var/DBQuery/query_find_link = GLOB.dbcon.NewQuery("SELECT fuid FROM [format_table_name("player")] WHERE ckey = '[ckey]' limit 1")
|
||||
if(!query_find_link.Execute())
|
||||
log_debug("link_forum_account: failed db read")
|
||||
return
|
||||
@@ -675,7 +680,7 @@
|
||||
var/oldcid = cidcheck[ckey]
|
||||
|
||||
if(!oldcid)
|
||||
var/DBQuery/query_cidcheck = dbcon.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
var/DBQuery/query_cidcheck = GLOB.dbcon.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey = '[ckey]'")
|
||||
query_cidcheck.Execute()
|
||||
|
||||
var/lastcid = computer_id
|
||||
@@ -740,7 +745,7 @@
|
||||
var/const/adminckey = "CID-Error"
|
||||
|
||||
// Check for notes in the last day - only 1 note per 24 hours
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id from [format_table_name("notes")] WHERE ckey = '[ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
|
||||
var/DBQuery/query_get_notes = GLOB.dbcon.NewQuery("SELECT id from [format_table_name("notes")] WHERE ckey = '[ckey]' AND adminckey = '[adminckey]' AND timestamp + INTERVAL 1 DAY < NOW()")
|
||||
if(!query_get_notes.Execute())
|
||||
var/err = query_get_notes.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id from notes table. Error : \[[err]\]\n")
|
||||
@@ -749,7 +754,7 @@
|
||||
return
|
||||
|
||||
// Only add a note if their most recent note isn't from the randomizer blocker, either
|
||||
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("notes")] WHERE ckey = '[ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
query_get_notes = GLOB.dbcon.NewQuery("SELECT adminckey FROM [format_table_name("notes")] WHERE ckey = '[ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
if(!query_get_notes.Execute())
|
||||
var/err = query_get_notes.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining adminckey from notes table. Error : \[[err]\]\n")
|
||||
@@ -818,7 +823,7 @@
|
||||
// IF YOU CHANGE ANYTHING IN ACTIVATE, MAKE SURE IT HAS A DEACTIVATE METHOD, -AA07
|
||||
/client/proc/activate_darkmode()
|
||||
///// BUTTONS /////
|
||||
update_changelog_button()
|
||||
SSchangelog.UpdatePlayerChangelogButton(src)
|
||||
/* Rpane */
|
||||
winset(src, "rpane.textb", "background-color=#40628a;text-color=#FFFFFF")
|
||||
winset(src, "rpane.infob", "background-color=#40628a;text-color=#FFFFFF")
|
||||
@@ -850,7 +855,7 @@
|
||||
|
||||
/client/proc/deactivate_darkmode()
|
||||
///// BUTTONS /////
|
||||
update_changelog_button()
|
||||
SSchangelog.UpdatePlayerChangelogButton(src)
|
||||
/* Rpane */
|
||||
winset(src, "rpane.textb", "background-color=none;text-color=#000000")
|
||||
winset(src, "rpane.infob", "background-color=none;text-color=#000000")
|
||||
@@ -880,22 +885,6 @@
|
||||
///// NOTIFY USER /////
|
||||
to_chat(src, "<span class='notice'>Darkmode Disabled</span>") // what a sick fuck
|
||||
|
||||
// Better changelog button handling
|
||||
/client/proc/update_changelog_button()
|
||||
if(establish_db_connection())
|
||||
if(prefs.lastchangelog != changelog_hash)
|
||||
winset(src, "rpane.changelog", "background-color=#bb7700;text-color=#FFFFFF;font-style=bold")
|
||||
else
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
else
|
||||
if(prefs.toggles & UI_DARKMODE)
|
||||
winset(src, "rpane.changelog", "background-color=#40628a;text-color=#FFFFFF")
|
||||
else
|
||||
winset(src, "rpane.changelog", "background-color=none;text-color=#000000")
|
||||
|
||||
/client/proc/generate_clickcatcher()
|
||||
if(!void)
|
||||
void = new()
|
||||
@@ -913,7 +902,7 @@
|
||||
return FALSE
|
||||
if(M && M.player_logged < SSD_WARNING_TIMER)
|
||||
return FALSE
|
||||
to_chat(src, "Interacting with SSD players is against server rules unless you've ahelped first for permission. If you have, <a href='byond://?src=[UID()];ssdwarning=accepted'>confirm that</A> and proceed.")
|
||||
to_chat(src, "Are you taking this person to cryo or giving them medical treatment? If you are, <a href='byond://?src=[UID()];ssdwarning=accepted'>confirm that</a> and proceed. Interacting with SSD players in other ways is against server rules unless you've ahelped first for permission.")
|
||||
return TRUE
|
||||
|
||||
#undef SSD_WARNING_TIMER
|
||||
|
||||
@@ -7,4 +7,4 @@ proc/addclientmessage(var/ckey, var/message)
|
||||
var/list/L = GLOB.clientmessages[ckey]
|
||||
if(!L)
|
||||
GLOB.clientmessages[ckey] = L = list()
|
||||
L += message
|
||||
L += message
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
/*
|
||||
* Color adjustment
|
||||
*/
|
||||
|
||||
var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
|
||||
GLOBAL_DATUM_INIT(gear_tweak_free_color_choice, /datum/gear_tweak/color, new())
|
||||
|
||||
/datum/gear_tweak/color
|
||||
var/list/valid_colors
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var/list/loadout_categories = list()
|
||||
var/list/gear_datums = list()
|
||||
GLOBAL_LIST_EMPTY(loadout_categories)
|
||||
GLOBAL_LIST_EMPTY(gear_datums)
|
||||
|
||||
/datum/loadout_category
|
||||
var/category = ""
|
||||
@@ -30,15 +30,15 @@ var/list/gear_datums = list()
|
||||
error("Loadout - Missing path definition: [G]")
|
||||
continue
|
||||
|
||||
if(!loadout_categories[use_category])
|
||||
loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = loadout_categories[use_category]
|
||||
gear_datums[use_name] = new geartype
|
||||
LC.gear[use_name] = gear_datums[use_name]
|
||||
if(!GLOB.loadout_categories[use_category])
|
||||
GLOB.loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = GLOB.loadout_categories[use_category]
|
||||
GLOB.gear_datums[use_name] = new geartype
|
||||
LC.gear[use_name] = GLOB.gear_datums[use_name]
|
||||
|
||||
loadout_categories = sortAssoc(loadout_categories)
|
||||
for(var/loadout_category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[loadout_category]
|
||||
GLOB.loadout_categories = sortAssoc(GLOB.loadout_categories)
|
||||
for(var/loadout_category in GLOB.loadout_categories)
|
||||
var/datum/loadout_category/LC = GLOB.loadout_categories[loadout_category]
|
||||
LC.gear = sortAssoc(LC.gear)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
/datum/gear/lipstick/lime
|
||||
display_name = "lipstick, lime"
|
||||
path = /obj/item/lipstick/lime
|
||||
path = /obj/item/lipstick/lime
|
||||
|
||||
@@ -93,4 +93,4 @@
|
||||
display_name = "Gold ID Decal"
|
||||
path = /obj/item/id_decal/gold
|
||||
donator_tier = 4
|
||||
cost = 4
|
||||
cost = 4
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/datum/gear/sechud
|
||||
display_name = "a classic security HUD"
|
||||
path = /obj/item/clothing/glasses/hud/security
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot", "Internal Affairs Agent")
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot", "Internal Affairs Agent","Magistrate")
|
||||
|
||||
/datum/gear/matches
|
||||
display_name = "a box of matches"
|
||||
@@ -42,7 +42,7 @@
|
||||
/datum/gear/doublecards
|
||||
display_name = "a double deck of standard cards"
|
||||
path = /obj/item/deck/doublecards
|
||||
|
||||
|
||||
/datum/gear/tarot
|
||||
display_name = "a deck of tarot cards"
|
||||
path = /obj/item/deck/tarot
|
||||
|
||||
@@ -21,4 +21,4 @@
|
||||
|
||||
/datum/gear/glasses/prescription
|
||||
display_name = "Prescription glasses"
|
||||
path = /obj/item/clothing/glasses/regular
|
||||
path = /obj/item/clothing/glasses/regular
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
/datum/gear/gloves/fingerless
|
||||
display_name = "Fingerless Gloves"
|
||||
path = /obj/item/clothing/gloves/fingerless
|
||||
path = /obj/item/clothing/gloves/fingerless
|
||||
|
||||
@@ -55,4 +55,4 @@
|
||||
|
||||
/datum/gear/shoes/whiteshoes
|
||||
display_name = "White shoes"
|
||||
path = /obj/item/clothing/shoes/white
|
||||
path = /obj/item/clothing/shoes/white
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var/list/preferences_datums = list()
|
||||
GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
GLOBAL_PROTECT(preferences_datums) // These feel like something that shouldnt be fucked with
|
||||
|
||||
var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles
|
||||
GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts to play these roles
|
||||
ROLE_PAI = 0,
|
||||
ROLE_POSIBRAIN = 0,
|
||||
ROLE_GUARDIAN = 0,
|
||||
@@ -24,7 +25,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
ROLE_GSPIDER = 21,
|
||||
ROLE_ABDUCTOR = 30,
|
||||
ROLE_DEVIL = 14
|
||||
)
|
||||
))
|
||||
|
||||
/proc/player_old_enough_antag(client/C, role)
|
||||
if(available_in_days_antag(C, role))
|
||||
@@ -42,7 +43,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return 0
|
||||
if(!isnum(C.player_age))
|
||||
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
|
||||
var/minimal_player_age_antag = special_role_times[num2text(role)]
|
||||
var/minimal_player_age_antag = GLOB.special_role_times[num2text(role)]
|
||||
if(!isnum(minimal_player_age_antag))
|
||||
return 0
|
||||
|
||||
@@ -55,8 +56,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return max(0, days - C.player_age)
|
||||
return 0
|
||||
|
||||
#define MAX_SAVE_SLOTS 20 // Save slots for regular players
|
||||
#define MAX_SAVE_SLOTS_MEMBER 20 // Save slots for BYOND members
|
||||
#define MAX_SAVE_SLOTS 30 // Save slots for regular players
|
||||
#define MAX_SAVE_SLOTS_MEMBER 30 // Save slots for BYOND members
|
||||
|
||||
#define TAB_CHAR 0
|
||||
#define TAB_GAME 1
|
||||
@@ -78,7 +79,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/last_id
|
||||
|
||||
//game-preferences
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/lastchangelog = "1" //Saved changlog timestamp (unix epoch) to detect if there was a change. Dont set this to 0 unless you want the last changelog date to be 4x longer than the expected lifespan of the universe.
|
||||
var/exp
|
||||
var/ooccolor = "#b82e00"
|
||||
var/list/be_special = list() //Special role selection
|
||||
@@ -199,7 +200,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/unlock_content = 0
|
||||
|
||||
//Gear stuff
|
||||
var/list/gear = list()
|
||||
var/list/loadout_gear = list()
|
||||
var/gear_tab = "General"
|
||||
// Parallax
|
||||
var/parallax = PARALLAX_HIGH
|
||||
@@ -343,11 +344,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>Eyes:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=eyes;task=input'>Color</a> [color_square(e_colour)]<br>"
|
||||
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || GLOB.body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins
|
||||
dat += "<b>Body Color:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=skin;task=input'>Color</a> [color_square(s_colour)]<br>"
|
||||
|
||||
if(body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
if(GLOB.body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
dat += "<b>Body Accessory:</b> "
|
||||
dat += "<a href='?_src_=prefs;preference=body_accessory;task=input'>[body_accessory ? "[body_accessory]" : "None"]</a><br>"
|
||||
|
||||
@@ -413,10 +414,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
switch(status)
|
||||
if("cyborg")
|
||||
var/datum/robolimb/R
|
||||
if(rlimb_data[name] && all_robolimbs[rlimb_data[name]])
|
||||
R = all_robolimbs[rlimb_data[name]]
|
||||
if(rlimb_data[name] && GLOB.all_robolimbs[rlimb_data[name]])
|
||||
R = GLOB.all_robolimbs[rlimb_data[name]]
|
||||
else
|
||||
R = basic_robolimb
|
||||
R = GLOB.basic_robolimb
|
||||
dat += "\t[R.company] [organ_name] prosthesis"
|
||||
if("amputated")
|
||||
dat += "\tAmputated [organ_name]"
|
||||
@@ -461,7 +462,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>Ghost Sight:</b> <a href='?_src_=prefs;preference=ghost_sight'><b>[(toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]</b></a><br>"
|
||||
dat += "<b>Ghost PDA:</b> <a href='?_src_=prefs;preference=ghost_pda'><b>[(toggles & CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]</b></a><br>"
|
||||
if(check_rights(R_ADMIN,0))
|
||||
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>"
|
||||
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.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'>"
|
||||
@@ -488,7 +489,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>You are banned from special roles.</b>"
|
||||
be_special = list()
|
||||
else
|
||||
for(var/i in special_roles)
|
||||
for(var/i in GLOB.special_roles)
|
||||
if(jobban_isbanned(user, i))
|
||||
dat += "<b>Be [capitalize(i)]:</b> <font color=red><b> \[BANNED]</b></font><br>"
|
||||
else if(!player_old_enough_antag(user.client, i))
|
||||
@@ -507,9 +508,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(TAB_GEAR)
|
||||
var/total_cost = 0
|
||||
var/list/type_blacklist = list()
|
||||
if(gear && gear.len)
|
||||
for(var/i = 1, i <= gear.len, i++)
|
||||
var/datum/gear/G = gear_datums[gear[i]]
|
||||
if(loadout_gear && loadout_gear.len)
|
||||
for(var/i = 1, i <= loadout_gear.len, i++)
|
||||
var/datum/gear/G = GLOB.gear_datums[loadout_gear[i]]
|
||||
if(G)
|
||||
if(!G.subtype_cost_overlap)
|
||||
if(G.subtype_path in type_blacklist)
|
||||
@@ -525,7 +526,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<tr><td colspan=4><center><b>"
|
||||
|
||||
var/firstcat = 1
|
||||
for(var/category in loadout_categories)
|
||||
for(var/category in GLOB.loadout_categories)
|
||||
if(firstcat)
|
||||
firstcat = 0
|
||||
else
|
||||
@@ -536,13 +537,13 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += " <a href='?_src_=prefs;preference=gear;select_category=[category]'>[category]</a> "
|
||||
dat += "</b></center></td></tr>"
|
||||
|
||||
var/datum/loadout_category/LC = loadout_categories[gear_tab]
|
||||
var/datum/loadout_category/LC = GLOB.loadout_categories[gear_tab]
|
||||
dat += "<tr><td colspan=4><hr></td></tr>"
|
||||
dat += "<tr><td colspan=4><b><center>[LC.category]</center></b></td></tr>"
|
||||
dat += "<tr><td colspan=4><hr></td></tr>"
|
||||
for(var/gear_name in LC.gear)
|
||||
var/datum/gear/G = LC.gear[gear_name]
|
||||
var/ticked = (G.display_name in gear)
|
||||
var/ticked = (G.display_name in loadout_gear)
|
||||
if(G.donator_tier > user.client.donator_level)
|
||||
dat += "<tr style='vertical-align:top;'><td width=15%><B>[G.display_name]</B></td>"
|
||||
else
|
||||
@@ -575,10 +576,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
|
||||
/datum/preferences/proc/get_gear_metadata(var/datum/gear/G)
|
||||
. = gear[G.display_name]
|
||||
. = loadout_gear[G.display_name]
|
||||
if(!.)
|
||||
. = list()
|
||||
gear[G.display_name] = .
|
||||
loadout_gear[G.display_name] = .
|
||||
|
||||
/datum/preferences/proc/get_tweak_metadata(var/datum/gear/G, var/datum/gear_tweak/tweak)
|
||||
var/list/metadata = get_gear_metadata(G)
|
||||
@@ -651,10 +652,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<del>[rank]</del></td><td> \[IN [(available_in_days)] DAYS]</td></tr>"
|
||||
continue
|
||||
if((job_support_low & CIVILIAN) && (rank != "Civilian"))
|
||||
if((job_support_low & JOB_CIVILIAN) && (rank != "Civilian"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
if((rank in GLOB.command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
else
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
@@ -693,7 +694,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
// HTML += "<a href='?_src_=prefs;preference=job;task=input;text=[rank]'>"
|
||||
|
||||
if(rank == "Civilian")//Civilian is special
|
||||
if(job_support_low & CIVILIAN)
|
||||
if(job_support_low & JOB_CIVILIAN)
|
||||
HTML += " <font color=green>\[Yes]</font></a>"
|
||||
else
|
||||
HTML += " <font color=red>\[No]</font></a>"
|
||||
@@ -720,7 +721,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
HTML += "</td></tr>"
|
||||
|
||||
for(var/i = 1, i < (limit - index), i += 1) // Finish the column so it is even
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "<tr bgcolor='[lastJob ? lastJob.selection_color : "#ffffff"]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
|
||||
HTML += "</td'></tr></table>"
|
||||
|
||||
@@ -760,7 +761,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_medsci_high = 0
|
||||
job_karma_high = 0
|
||||
|
||||
if(job.department_flag == SUPPORT)
|
||||
if(job.department_flag == JOBCAT_SUPPORT)
|
||||
job_support_low &= ~job.flag
|
||||
job_support_med &= ~job.flag
|
||||
job_support_high &= ~job.flag
|
||||
@@ -774,7 +775,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_support_low |= job.flag
|
||||
|
||||
return 1
|
||||
else if(job.department_flag == ENGSEC)
|
||||
else if(job.department_flag == JOBCAT_ENGSEC)
|
||||
job_engsec_low &= ~job.flag
|
||||
job_engsec_med &= ~job.flag
|
||||
job_engsec_high &= ~job.flag
|
||||
@@ -788,7 +789,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_engsec_low |= job.flag
|
||||
|
||||
return 1
|
||||
else if(job.department_flag == MEDSCI)
|
||||
else if(job.department_flag == JOBCAT_MEDSCI)
|
||||
job_medsci_low &= ~job.flag
|
||||
job_medsci_med &= ~job.flag
|
||||
job_medsci_high &= ~job.flag
|
||||
@@ -802,7 +803,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_medsci_low |= job.flag
|
||||
|
||||
return 1
|
||||
else if(job.department_flag == KARMA)
|
||||
else if(job.department_flag == JOBCAT_KARMA)
|
||||
job_karma_low &= ~job.flag
|
||||
job_karma_med &= ~job.flag
|
||||
job_karma_high &= ~job.flag
|
||||
@@ -846,9 +847,6 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/ShowDisabilityState(mob/user, flag, label)
|
||||
var/datum/species/S = GLOB.all_species[species]
|
||||
if(flag == DISABILITY_FLAG_FAT && !(CAN_BE_FAT in S.species_traits))
|
||||
return "<li><i>[species] cannot be fat.</i></li>"
|
||||
return "<li><b>[label]:</b> <a href=\"?_src_=prefs;task=input;preference=disabilities;disability=[flag]\">[disabilities & flag ? "Yes" : "No"]</a></li>"
|
||||
|
||||
/datum/preferences/proc/SetDisabilities(mob/user)
|
||||
@@ -973,7 +971,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
/datum/preferences/proc/GetJobDepartment(var/datum/job/job, var/level)
|
||||
if(!job || !level) return 0
|
||||
switch(job.department_flag)
|
||||
if(SUPPORT)
|
||||
if(JOBCAT_SUPPORT)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_support_high
|
||||
@@ -981,7 +979,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return job_support_med
|
||||
if(3)
|
||||
return job_support_low
|
||||
if(MEDSCI)
|
||||
if(JOBCAT_MEDSCI)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_medsci_high
|
||||
@@ -989,7 +987,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return job_medsci_med
|
||||
if(3)
|
||||
return job_medsci_low
|
||||
if(ENGSEC)
|
||||
if(JOBCAT_ENGSEC)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_engsec_high
|
||||
@@ -997,7 +995,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return job_engsec_med
|
||||
if(3)
|
||||
return job_engsec_low
|
||||
if(KARMA)
|
||||
if(JOBCAT_KARMA)
|
||||
switch(level)
|
||||
if(1)
|
||||
return job_karma_high
|
||||
@@ -1027,7 +1025,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_karma_high = 0
|
||||
|
||||
switch(job.department_flag)
|
||||
if(SUPPORT)
|
||||
if(JOBCAT_SUPPORT)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_support_high = job.flag
|
||||
@@ -1037,7 +1035,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_support_low &= ~job.flag
|
||||
else
|
||||
job_support_low |= job.flag
|
||||
if(MEDSCI)
|
||||
if(JOBCAT_MEDSCI)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_medsci_high = job.flag
|
||||
@@ -1047,7 +1045,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_medsci_low &= ~job.flag
|
||||
else
|
||||
job_medsci_low |= job.flag
|
||||
if(ENGSEC)
|
||||
if(JOBCAT_ENGSEC)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_engsec_high = job.flag
|
||||
@@ -1057,7 +1055,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
job_engsec_low &= ~job.flag
|
||||
else
|
||||
job_engsec_low |= job.flag
|
||||
if(KARMA)
|
||||
if(JOBCAT_KARMA)
|
||||
switch(level)
|
||||
if(2)
|
||||
job_karma_high = job.flag
|
||||
@@ -1115,9 +1113,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
SetDisabilities(user)
|
||||
if("input")
|
||||
var/dflag=text2num(href_list["disability"])
|
||||
if(dflag >= 0)
|
||||
if(!(dflag==DISABILITY_FLAG_FAT && !(CAN_BE_FAT in S.species_traits))) //If the disability isn't fatness, toggle it. If it IS fatness, check to see if the species can be fat before going ahead.
|
||||
disabilities ^= text2num(href_list["disability"]) //MAGIC
|
||||
if(dflag >= 0) // Toggle it.
|
||||
disabilities ^= text2num(href_list["disability"]) //MAGIC
|
||||
SetDisabilities(user)
|
||||
else
|
||||
SetDisabilities(user)
|
||||
@@ -1160,17 +1157,17 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if(href_list["preference"] == "gear")
|
||||
if(href_list["toggle_gear"])
|
||||
var/datum/gear/TG = gear_datums[href_list["toggle_gear"]]
|
||||
if(TG.display_name in gear)
|
||||
gear -= TG.display_name
|
||||
var/datum/gear/TG = GLOB.gear_datums[href_list["toggle_gear"]]
|
||||
if(TG.display_name in loadout_gear)
|
||||
loadout_gear -= TG.display_name
|
||||
else
|
||||
if(TG.donator_tier && user.client.donator_level < TG.donator_tier)
|
||||
to_chat(user, "<span class='warning'>That gear is only available at a higher donation tier than you are on.</span>")
|
||||
return
|
||||
var/total_cost = 0
|
||||
var/list/type_blacklist = list()
|
||||
for(var/gear_name in gear)
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
for(var/gear_name in loadout_gear)
|
||||
var/datum/gear/G = GLOB.gear_datums[gear_name]
|
||||
if(istype(G))
|
||||
if(!G.subtype_cost_overlap)
|
||||
if(G.subtype_path in type_blacklist)
|
||||
@@ -1179,10 +1176,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
total_cost += G.cost
|
||||
|
||||
if((total_cost + TG.cost) <= max_gear_slots)
|
||||
gear += TG.display_name
|
||||
loadout_gear += TG.display_name
|
||||
|
||||
else if(href_list["gear"] && href_list["tweak"])
|
||||
var/datum/gear/gear = gear_datums[href_list["gear"]]
|
||||
var/datum/gear/gear = GLOB.gear_datums[href_list["gear"]]
|
||||
var/datum/gear_tweak/tweak = locate(href_list["tweak"])
|
||||
if(!tweak || !istype(gear) || !(tweak in gear.gear_tweaks))
|
||||
return
|
||||
@@ -1193,7 +1190,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
else if(href_list["select_category"])
|
||||
gear_tab = href_list["select_category"]
|
||||
else if(href_list["clear_loadout"])
|
||||
gear.Cut()
|
||||
loadout_gear.Cut()
|
||||
|
||||
ShowChoices(user)
|
||||
return
|
||||
@@ -1203,7 +1200,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/datum/robolimb/robohead
|
||||
if(S.bodyflags & ALL_RPARTS)
|
||||
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
|
||||
robohead = all_robolimbs[head_model]
|
||||
robohead = GLOB.all_robolimbs[head_model]
|
||||
switch(href_list["preference"])
|
||||
if("name")
|
||||
real_name = random_name(gender,species)
|
||||
@@ -1320,7 +1317,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/datum/robolimb/robohead
|
||||
if(NS.bodyflags & ALL_RPARTS)
|
||||
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
|
||||
robohead = all_robolimbs[head_model]
|
||||
robohead = GLOB.all_robolimbs[head_model]
|
||||
//grab one of the valid hair styles for the newly chosen species
|
||||
h_style = random_hair_style(gender, species, robohead)
|
||||
|
||||
@@ -1453,7 +1450,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
head_model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[head_model]
|
||||
var/datum/robolimb/robohead = GLOB.all_robolimbs[head_model]
|
||||
if((species in SA.species_allowed) && robohead.is_monitor && ((SA.models_allowed && (robohead.company in SA.models_allowed)) || !SA.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
|
||||
else
|
||||
@@ -1536,7 +1533,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
head_model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[head_model]
|
||||
var/datum/robolimb/robohead = GLOB.all_robolimbs[head_model]
|
||||
if(robohead.is_monitor && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings.
|
||||
continue
|
||||
else if(!robohead.is_monitor && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip.
|
||||
@@ -1613,10 +1610,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("body_accessory")
|
||||
var/list/possible_body_accessories = list()
|
||||
if(check_rights(R_ADMIN, 1, user))
|
||||
possible_body_accessories = body_accessory_by_name.Copy()
|
||||
possible_body_accessories = GLOB.body_accessory_by_name.Copy()
|
||||
else
|
||||
for(var/B in body_accessory_by_name)
|
||||
var/datum/body_accessory/accessory = body_accessory_by_name[B]
|
||||
for(var/B in GLOB.body_accessory_by_name)
|
||||
var/datum/body_accessory/accessory = GLOB.body_accessory_by_name[B]
|
||||
if(!istype(accessory))
|
||||
possible_body_accessories += "None" //the only null entry should be the "None" option
|
||||
continue
|
||||
@@ -1660,7 +1657,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
head_model = "Morpheus Cyberkinetics"
|
||||
else
|
||||
head_model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[head_model]
|
||||
var/datum/robolimb/robohead = GLOB.all_robolimbs[head_model]
|
||||
if((species in SA.species_allowed) && robohead.is_monitor && ((SA.models_allowed && (robohead.company in SA.models_allowed)) || !SA.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
|
||||
else
|
||||
@@ -1750,7 +1747,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
s_tone = max(min(round(skin_c), S.icon_skin_tones.len), 1)
|
||||
|
||||
if("skin")
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
if((S.bodyflags & HAS_SKIN_COLOR) || GLOB.body_accessory_by_species[species] || check_rights(R_ADMIN, 0, user))
|
||||
var/new_skin = input(user, "Choose your character's skin colour: ", "Character Preference", s_colour) as color|null
|
||||
if(new_skin)
|
||||
s_colour = new_skin
|
||||
@@ -1869,7 +1866,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if(!choice)
|
||||
return
|
||||
R.company = choice
|
||||
R = all_robolimbs[R.company]
|
||||
R = GLOB.all_robolimbs[R.company]
|
||||
if(R.has_subtypes == 1) //If the company the user selected provides more than just one base model, lets handle it.
|
||||
var/list/robolimb_models = list()
|
||||
for(var/limb_type in typesof(R)) //Handling the different models of parts that manufacturers can provide.
|
||||
@@ -2022,7 +2019,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
if("be_special")
|
||||
var/r = href_list["role"]
|
||||
if(r in special_roles)
|
||||
if(r in GLOB.special_roles)
|
||||
be_special ^= r
|
||||
|
||||
if("name")
|
||||
@@ -2208,7 +2205,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.m_styles = m_styles
|
||||
|
||||
if(body_accessory)
|
||||
character.body_accessory = body_accessory_by_name["[body_accessory]"]
|
||||
character.body_accessory = GLOB.body_accessory_by_name["[body_accessory]"]
|
||||
|
||||
character.backbag = backbag
|
||||
|
||||
@@ -2220,54 +2217,54 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
character.change_eye_color(e_colour)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_FAT && (CAN_BE_FAT in character.dna.species.species_traits))
|
||||
character.dna.SetSEState(FATBLOCK, TRUE, TRUE)
|
||||
if(disabilities & DISABILITY_FLAG_FAT)
|
||||
character.dna.SetSEState(GLOB.fatblock, TRUE, TRUE)
|
||||
character.overeatduration = 600
|
||||
character.dna.default_blocks.Add(FATBLOCK)
|
||||
character.dna.default_blocks.Add(GLOB.fatblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_NEARSIGHTED)
|
||||
character.dna.SetSEState(GLASSESBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLASSESBLOCK)
|
||||
character.dna.SetSEState(GLOB.glassesblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.glassesblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_BLIND)
|
||||
character.dna.SetSEState(BLINDBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(BLINDBLOCK)
|
||||
character.dna.SetSEState(GLOB.blindblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.blindblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_DEAF)
|
||||
character.dna.SetSEState(DEAFBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(DEAFBLOCK)
|
||||
character.dna.SetSEState(GLOB.deafblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.deafblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_COLOURBLIND)
|
||||
character.dna.SetSEState(COLOURBLINDBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(COLOURBLINDBLOCK)
|
||||
character.dna.SetSEState(GLOB.colourblindblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.colourblindblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_MUTE)
|
||||
character.dna.SetSEState(MUTEBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(MUTEBLOCK)
|
||||
character.dna.SetSEState(GLOB.muteblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.muteblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_NERVOUS)
|
||||
character.dna.SetSEState(NERVOUSBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(NERVOUSBLOCK)
|
||||
character.dna.SetSEState(GLOB.nervousblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.nervousblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_SWEDISH)
|
||||
character.dna.SetSEState(SWEDEBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(SWEDEBLOCK)
|
||||
character.dna.SetSEState(GLOB.swedeblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.swedeblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_CHAV)
|
||||
character.dna.SetSEState(CHAVBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(CHAVBLOCK)
|
||||
character.dna.SetSEState(GLOB.chavblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.chavblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_LISP)
|
||||
character.dna.SetSEState(LISPBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(LISPBLOCK)
|
||||
character.dna.SetSEState(GLOB.lispblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.lispblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_DIZZY)
|
||||
character.dna.SetSEState(DIZZYBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(DIZZYBLOCK)
|
||||
character.dna.SetSEState(GLOB.dizzyblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.dizzyblock)
|
||||
|
||||
if(disabilities & DISABILITY_FLAG_WINGDINGS && (CAN_WINGDINGS in character.dna.species.species_traits))
|
||||
character.dna.SetSEState(WINGDINGSBLOCK, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(WINGDINGSBLOCK)
|
||||
character.dna.SetSEState(GLOB.wingdingsblock, TRUE, TRUE)
|
||||
character.dna.default_blocks.Add(GLOB.wingdingsblock)
|
||||
|
||||
character.dna.species.handle_dna(character)
|
||||
|
||||
@@ -2286,7 +2283,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
/datum/preferences/proc/open_load_dialog(mob/user)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT slot,real_name FROM [format_table_name("characters")] WHERE ckey='[user.ckey]' ORDER BY slot")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT slot,real_name FROM [format_table_name("characters")] WHERE ckey='[user.ckey]' ORDER BY slot")
|
||||
var/list/slotnames[max_save_slots]
|
||||
|
||||
if(!query.Execute())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/datum/preferences/proc/load_preferences(client/C)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"SELECT
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"SELECT
|
||||
ooccolor,
|
||||
UI_style,
|
||||
UI_style_color,
|
||||
@@ -84,11 +84,11 @@
|
||||
|
||||
// Might as well scrub out any malformed be_special list entries while we're here
|
||||
for(var/role in be_special)
|
||||
if(!(role in special_roles))
|
||||
if(!(role in GLOB.special_roles))
|
||||
log_runtime(EXCEPTION("[C.key] had a malformed role entry: '[role]'. Removing!"), src)
|
||||
be_special -= role
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE [format_table_name("player")]
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"UPDATE [format_table_name("player")]
|
||||
SET
|
||||
ooccolor='[ooccolor]',
|
||||
UI_style='[UI_style]',
|
||||
@@ -126,11 +126,11 @@
|
||||
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'")
|
||||
var/DBQuery/firstquery = GLOB.dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'")
|
||||
firstquery.Execute()
|
||||
|
||||
// Let's not have this explode if you sneeze on the DB
|
||||
var/DBQuery/query = dbcon.NewQuery({"SELECT
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"SELECT
|
||||
OOC_Notes,
|
||||
real_name,
|
||||
name_is_always_random,
|
||||
@@ -259,7 +259,7 @@
|
||||
//socks
|
||||
socks = query.item[49]
|
||||
body_accessory = query.item[50]
|
||||
gear = params2list(query.item[51])
|
||||
loadout_gear = params2list(query.item[51])
|
||||
autohiss_mode = text2num(query.item[52])
|
||||
|
||||
//Sanitize
|
||||
@@ -318,7 +318,7 @@
|
||||
if(!player_alt_titles) player_alt_titles = new()
|
||||
if(!organ_data) src.organ_data = list()
|
||||
if(!rlimb_data) src.rlimb_data = list()
|
||||
if(!gear) gear = list()
|
||||
if(!loadout_gear) loadout_gear = list()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -336,14 +336,14 @@
|
||||
rlimblist = list2params(rlimb_data)
|
||||
if(!isemptylist(player_alt_titles))
|
||||
playertitlelist = list2params(player_alt_titles)
|
||||
if(!isemptylist(gear))
|
||||
gearlist = list2params(gear)
|
||||
if(!isemptylist(loadout_gear))
|
||||
gearlist = list2params(loadout_gear)
|
||||
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
var/DBQuery/firstquery = GLOB.dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
firstquery.Execute()
|
||||
while(firstquery.NextRow())
|
||||
if(text2num(firstquery.item[1]) == default_slot)
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE [format_table_name("characters")] SET OOC_Notes='[sanitizeSQL(metadata)]',
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"UPDATE [format_table_name("characters")] SET OOC_Notes='[sanitizeSQL(metadata)]',
|
||||
real_name='[sanitizeSQL(real_name)]',
|
||||
name_is_always_random='[be_random_name]',
|
||||
gender='[gender]',
|
||||
@@ -406,7 +406,7 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery({"
|
||||
INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender,
|
||||
age, species, language,
|
||||
hair_colour, secondary_hair_colour,
|
||||
@@ -473,7 +473,7 @@
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/load_random_character_slot(client/C)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
var/list/saves = list()
|
||||
|
||||
if(!query.Execute())
|
||||
@@ -491,17 +491,3 @@
|
||||
load_character(C,pick(saves))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/SetChangelog(client/C,hash)
|
||||
lastchangelog=hash
|
||||
if(preferences_datums[C.ckey].toggles & UI_DARKMODE)
|
||||
winset(C, "rpane.changelog", "background-color=#40628a;font-color=#ffffff;font-style=none")
|
||||
else
|
||||
winset(C, "rpane.changelog", "background-color=none;font-style=none")
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastchangelog='[lastchangelog]' WHERE ckey='[C.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
to_chat(C, "Couldn't update your last seen changelog, please try again later.")
|
||||
return
|
||||
return 1
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
var/list/spawntypes = list()
|
||||
GLOBAL_LIST_EMPTY(spawntypes)
|
||||
|
||||
/proc/populate_spawn_points()
|
||||
spawntypes = list()
|
||||
// GLOB.spawntypes = list() | This is already done, is it not
|
||||
for(var/type in subtypesof(/datum/spawnpoint))
|
||||
var/datum/spawnpoint/S = new type()
|
||||
spawntypes[S.display_name] = S
|
||||
GLOB.spawntypes[S.display_name] = S
|
||||
|
||||
/datum/spawnpoint
|
||||
var/msg //Message to display on the arrivals computer.
|
||||
@@ -28,7 +28,7 @@ var/list/spawntypes = list()
|
||||
|
||||
/datum/spawnpoint/arrivals/New()
|
||||
..()
|
||||
turfs = latejoin
|
||||
turfs = GLOB.latejoin
|
||||
|
||||
/datum/spawnpoint/gateway
|
||||
display_name = "Gateway"
|
||||
@@ -36,7 +36,7 @@ var/list/spawntypes = list()
|
||||
|
||||
/datum/spawnpoint/gateway/New()
|
||||
..()
|
||||
turfs = latejoin_gateway
|
||||
turfs = GLOB.latejoin_gateway
|
||||
|
||||
/datum/spawnpoint/cryo
|
||||
display_name = "Cryogenic Storage"
|
||||
@@ -45,7 +45,7 @@ var/list/spawntypes = list()
|
||||
|
||||
/datum/spawnpoint/cryo/New()
|
||||
..()
|
||||
turfs = latejoin_cryo
|
||||
turfs = GLOB.latejoin_cryo
|
||||
|
||||
/datum/spawnpoint/cyborg
|
||||
display_name = "Cyborg Storage"
|
||||
@@ -54,4 +54,4 @@ var/list/spawntypes = list()
|
||||
|
||||
/datum/spawnpoint/cyborg/New()
|
||||
..()
|
||||
turfs = latejoin_cyborg
|
||||
turfs = GLOB.latejoin_cyborg
|
||||
|
||||
@@ -36,6 +36,15 @@
|
||||
to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from radios or speakers")
|
||||
feedback_add_details("admin_verb","THR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ai_voice_annoucements()
|
||||
set name = "Hear/Silence AI Voice Announcements"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing AI annoucements in voice form or in text form"
|
||||
prefs.sound ^= SOUND_AI_VOICE
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "[(prefs.sound & SOUND_AI_VOICE) ? "You will now hear AI announcements." : "AI annoucements will now be converted to text."] ")
|
||||
feedback_add_details("admin_verb","TAIvoice") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggleadminhelpsound()
|
||||
set name = "Hear/Silence Admin Bwoinks"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -87,4 +87,4 @@
|
||||
return
|
||||
|
||||
to_chat(src, "<span class='notice'>View range set to [viewNum_to_text(view_range)]</span>")
|
||||
AddViewMod("custom", view_range)
|
||||
AddViewMod("custom", view_range)
|
||||
|
||||
Reference in New Issue
Block a user