Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -176,45 +176,9 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
/datum/asset/simple/tgui
|
||||
assets = list(
|
||||
"tgui.css" = 'tgui/assets/tgui.css',
|
||||
"tgui.js" = 'tgui/assets/tgui.js',
|
||||
"font-awesome.min.css" = 'tgui/assets/font-awesome.min.css',
|
||||
"fontawesome-webfont.eot" = 'tgui/assets/fonts/fontawesome-webfont.eot',
|
||||
"fontawesome-webfont.woff2" = 'tgui/assets/fonts/fontawesome-webfont.woff2',
|
||||
"fontawesome-webfont.woff" = 'tgui/assets/fonts/fontawesome-webfont.woff',
|
||||
"fontawesome-webfont.ttf" = 'tgui/assets/fonts/fontawesome-webfont.ttf',
|
||||
"fontawesome-webfont.svg" = 'tgui/assets/fonts/fontawesome-webfont.svg'
|
||||
"tgui.js" = 'tgui/assets/tgui.js'
|
||||
)
|
||||
|
||||
/datum/asset/simple/headers
|
||||
assets = list(
|
||||
"alarm_green.gif" = 'icons/program_icons/alarm_green.gif',
|
||||
"alarm_red.gif" = 'icons/program_icons/alarm_red.gif',
|
||||
"batt_5.gif" = 'icons/program_icons/batt_5.gif',
|
||||
"batt_20.gif" = 'icons/program_icons/batt_20.gif',
|
||||
"batt_40.gif" = 'icons/program_icons/batt_40.gif',
|
||||
"batt_60.gif" = 'icons/program_icons/batt_60.gif',
|
||||
"batt_80.gif" = 'icons/program_icons/batt_80.gif',
|
||||
"batt_100.gif" = 'icons/program_icons/batt_100.gif',
|
||||
"charging.gif" = 'icons/program_icons/charging.gif',
|
||||
"downloader_finished.gif" = 'icons/program_icons/downloader_finished.gif',
|
||||
"downloader_running.gif" = 'icons/program_icons/downloader_running.gif',
|
||||
"ntnrc_idle.gif" = 'icons/program_icons/ntnrc_idle.gif',
|
||||
"ntnrc_new.gif" = 'icons/program_icons/ntnrc_new.gif',
|
||||
"power_norm.gif" = 'icons/program_icons/power_norm.gif',
|
||||
"power_warn.gif" = 'icons/program_icons/power_warn.gif',
|
||||
"sig_high.gif" = 'icons/program_icons/sig_high.gif',
|
||||
"sig_low.gif" = 'icons/program_icons/sig_low.gif',
|
||||
"sig_lan.gif" = 'icons/program_icons/sig_lan.gif',
|
||||
"sig_none.gif" = 'icons/program_icons/sig_none.gif',
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/asset/simple/pda
|
||||
assets = list(
|
||||
"pda_atmos.png" = 'icons/pda_icons/pda_atmos.png',
|
||||
@@ -242,8 +206,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
"pda_refresh.png" = 'icons/pda_icons/pda_refresh.png',
|
||||
"pda_scanner.png" = 'icons/pda_icons/pda_scanner.png',
|
||||
"pda_signaler.png" = 'icons/pda_icons/pda_signaler.png',
|
||||
"pda_status.png" = 'icons/pda_icons/pda_status.png',
|
||||
"pda_dronephone.png" = 'icons/pda_icons/pda_dronephone.png'
|
||||
"pda_status.png" = 'icons/pda_icons/pda_status.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/paper
|
||||
@@ -261,11 +224,6 @@ You can set verify to TRUE if you want send() to sleep until the client has the
|
||||
"large_stamp-law.png" = 'icons/stamp_icons/large_stamp-law.png'
|
||||
)
|
||||
|
||||
/datum/asset/simple/IRV
|
||||
assets = list(
|
||||
"jquery-ui.custom-core-widgit-mouse-sortable-min.js" = 'html/IRV/jquery-ui.custom-core-widgit-mouse-sortable-min.js',
|
||||
"jquery-1.10.2.min.js" = 'html/IRV/jquery-1.10.2.min.js'
|
||||
)
|
||||
|
||||
//Registers HTML Interface assets.
|
||||
/datum/asset/HTML_interface/register()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
colour_type - a typepath (subtyped from /datum/client_colour)
|
||||
*/
|
||||
/mob/proc/add_client_colour(colour_type)
|
||||
if(!ispath(colour_type, /datum/client_colour))
|
||||
if(!ispath(/datum/client_colour))
|
||||
return
|
||||
|
||||
var/datum/client_colour/CC = new colour_type()
|
||||
@@ -41,7 +41,7 @@
|
||||
colour_type - a typepath (subtyped from /datum/client_colour)
|
||||
*/
|
||||
/mob/proc/remove_client_colour(colour_type)
|
||||
if(!ispath(colour_type, /datum/client_colour))
|
||||
if(!ispath(/datum/client_colour))
|
||||
return
|
||||
|
||||
for(var/cc in client_colours)
|
||||
@@ -70,39 +70,3 @@
|
||||
|
||||
|
||||
|
||||
/datum/client_colour/glass_colour
|
||||
priority = 0
|
||||
colour = "red"
|
||||
|
||||
/datum/client_colour/glass_colour/green
|
||||
colour = "#aaffaa"
|
||||
|
||||
/datum/client_colour/glass_colour/lightgreen
|
||||
colour = "#ccffcc"
|
||||
|
||||
/datum/client_colour/glass_colour/blue
|
||||
colour = "#aaaaff"
|
||||
|
||||
/datum/client_colour/glass_colour/lightblue
|
||||
colour = "#ccccff"
|
||||
|
||||
/datum/client_colour/glass_colour/yellow
|
||||
colour = "#ffff66"
|
||||
|
||||
/datum/client_colour/glass_colour/red
|
||||
colour = "#ffaaaa"
|
||||
|
||||
/datum/client_colour/glass_colour/darkred
|
||||
colour = "#bb5555"
|
||||
|
||||
/datum/client_colour/glass_colour/orange
|
||||
colour = "#ffbb99"
|
||||
|
||||
/datum/client_colour/glass_colour/lightorange
|
||||
colour = "#ffddaa"
|
||||
|
||||
/datum/client_colour/glass_colour/purple
|
||||
colour = "#ff99ff"
|
||||
|
||||
/datum/client_colour/glass_colour/gray
|
||||
colour = "#cccccc"
|
||||
@@ -1,9 +1,5 @@
|
||||
|
||||
/client
|
||||
//////////////////////
|
||||
//BLACK MAGIC THINGS//
|
||||
//////////////////////
|
||||
parent_type = /datum
|
||||
////////////////
|
||||
//ADMIN THINGS//
|
||||
////////////////
|
||||
@@ -14,7 +10,6 @@
|
||||
var/jobbancache = null //Used to cache this client's jobbans to save on DB queries
|
||||
var/last_message = "" //Contains the last message sent by this client - used to protect against copy-paste spamming.
|
||||
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
||||
var/ircreplyamount = 0
|
||||
|
||||
/////////
|
||||
//OTHER//
|
||||
@@ -54,3 +49,17 @@
|
||||
|
||||
//datum that controls the displaying and hiding of tooltips
|
||||
var/datum/tooltip/tooltips
|
||||
|
||||
//Used for var edit flagging, also defined in datums (clients are not a child of datums for some reason)
|
||||
var/var_edited = 0
|
||||
|
||||
////////////
|
||||
//PARALLAX//
|
||||
////////////
|
||||
var/list/parallax = list()
|
||||
var/list/parallax_movable = list()
|
||||
var/list/parallax_offset = list()
|
||||
var/turf/previous_turf = null
|
||||
var/obj/screen/plane_master/parallax_master/parallax_master = null
|
||||
var/obj/screen/plane_master/parallax_dustmaster/parallax_dustmaster = null
|
||||
var/obj/screen/plane_master/parallax_spacemaster/parallax_spacemaster = null
|
||||
|
||||
@@ -97,7 +97,7 @@ var/next_external_rsc = 0
|
||||
|
||||
|
||||
/client/New(TopicData)
|
||||
var/tdata = TopicData //save this for later use
|
||||
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(connection != "seeker" && connection != "web")//Invalid connection type.
|
||||
@@ -140,16 +140,13 @@ var/next_external_rsc = 0
|
||||
if(ahelp_count(0) > 0)
|
||||
list_ahelps(src, 0)
|
||||
|
||||
//preferences datum - also holds some persistent data for the client (because we may as well keep these datums to a minimum)
|
||||
//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]
|
||||
if(!prefs)
|
||||
prefs = new /datum/preferences(src)
|
||||
preferences_datums[ckey] = prefs
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
if(world.byond_version >= 511 && byond_version >= 511 && prefs.clientfps)
|
||||
vars["fps"] = prefs.clientfps
|
||||
sethotkeys(1) //set hoykeys from preferences (from_pref = 1)
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
|
||||
@@ -162,7 +159,7 @@ var/next_external_rsc = 0
|
||||
if (holder)
|
||||
src << "Because you are an admin, you are being allowed to walk past this limitation, But it is still STRONGLY suggested you upgrade"
|
||||
else
|
||||
qdel(src)
|
||||
del(src)
|
||||
return 0
|
||||
else if (byond_version < config.client_warn_version) //We have words for this client.
|
||||
src << "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>"
|
||||
@@ -171,14 +168,14 @@ var/next_external_rsc = 0
|
||||
src << "Required version to remove this message: [config.client_warn_version] or later"
|
||||
src << "Visit http://www.byond.com/download/ to get the latest version of byond."
|
||||
|
||||
if (connection == "web" && !holder)
|
||||
if (connection == "web")
|
||||
if (!config.allowwebclient)
|
||||
src << "Web client is disabled"
|
||||
qdel(src)
|
||||
del(src)
|
||||
return 0
|
||||
if (config.webclientmembersonly && !IsByondMember())
|
||||
src << "Sorry, but the web client is restricted to byond members only."
|
||||
qdel(src)
|
||||
del(src)
|
||||
return 0
|
||||
|
||||
if( (world.address == address || !address) && !host )
|
||||
@@ -200,11 +197,7 @@ var/next_external_rsc = 0
|
||||
log_access("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
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."
|
||||
if(config.allow_panic_bunker_bounce && tdata != "redirect")
|
||||
src << "<span class='notice'>Sending you to [config.panic_server_name].</span>"
|
||||
winset(src, null, "command=.options")
|
||||
src << link("[global.panic_address]?redirect")
|
||||
qdel(src)
|
||||
del(src)
|
||||
return 0
|
||||
|
||||
if (config.notify_new_player_age >= 0)
|
||||
@@ -220,7 +213,7 @@ var/next_external_rsc = 0
|
||||
if(!IsGuestKey(key) && dbcon.IsConnected())
|
||||
findJoinDate()
|
||||
|
||||
sync_client_with_db(tdata)
|
||||
sync_client_with_db()
|
||||
|
||||
check_ip_intel()
|
||||
|
||||
@@ -228,6 +221,7 @@ var/next_external_rsc = 0
|
||||
|
||||
if(!void)
|
||||
void = new()
|
||||
void = void.MakeGreed()
|
||||
|
||||
screen += void
|
||||
|
||||
@@ -266,13 +260,8 @@ var/next_external_rsc = 0
|
||||
admins -= src
|
||||
directory -= ckey
|
||||
clients -= src
|
||||
if(movingmob != null)
|
||||
movingmob.client_mobs_in_contents -= mob
|
||||
UNSETEMPTY(movingmob.client_mobs_in_contents)
|
||||
return ..()
|
||||
|
||||
/client/Destroy()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/client/proc/set_client_age_from_db()
|
||||
if (IsGuestKey(src.key))
|
||||
@@ -296,7 +285,7 @@ var/next_external_rsc = 0
|
||||
player_age = -1
|
||||
|
||||
|
||||
/client/proc/sync_client_with_db(connectiontopic)
|
||||
/client/proc/sync_client_with_db()
|
||||
if (IsGuestKey(src.key))
|
||||
return
|
||||
|
||||
@@ -304,7 +293,7 @@ var/next_external_rsc = 0
|
||||
if (!dbcon.IsConnected())
|
||||
return
|
||||
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/sql_ckey = sanitizeSQL(src.ckey)
|
||||
|
||||
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = '[address]' AND ckey != '[sql_ckey]'")
|
||||
query_ip.Execute()
|
||||
@@ -318,18 +307,14 @@ var/next_external_rsc = 0
|
||||
while (query_cid.NextRow())
|
||||
related_accounts_cid += "[query_cid.item[1]], "
|
||||
|
||||
var/watchreason = check_watchlist(sql_ckey)
|
||||
if(watchreason)
|
||||
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
|
||||
send2irc_adminless_only("Watchlist", "[key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
|
||||
|
||||
var/admin_rank = "Player"
|
||||
if (src.holder && src.holder.rank)
|
||||
admin_rank = src.holder.rank.name
|
||||
else
|
||||
if (check_randomizer(connectiontopic))
|
||||
return
|
||||
|
||||
var/watchreason = check_watchlist(sql_ckey)
|
||||
if(watchreason)
|
||||
current_watchlist[sql_ckey] = watchreason
|
||||
message_admins("<font color='red'><B>Notice: </B></font><font color='blue'>[key_name_admin(src)] is on the watchlist and has just connected - Reason: [watchreason]</font>")
|
||||
send2irc_adminless_only("Watchlist", "[key_name(src)] is on the watchlist and has just connected - Reason: [watchreason]")
|
||||
|
||||
var/sql_ip = sanitizeSQL(src.address)
|
||||
var/sql_computerid = sanitizeSQL(src.computer_id)
|
||||
@@ -344,107 +329,6 @@ var/next_external_rsc = 0
|
||||
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`serverip`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),'[serverip]','[sql_ckey]','[sql_ip]','[sql_computerid]');")
|
||||
query_accesslog.Execute()
|
||||
|
||||
/client/proc/check_randomizer(topic)
|
||||
. = FALSE
|
||||
if (connection != "seeker")
|
||||
return
|
||||
topic = params2list(topic)
|
||||
if (!config.check_randomizer)
|
||||
return
|
||||
var/static/cidcheck = list()
|
||||
var/static/tokens = list()
|
||||
var/static/cidcheck_failedckeys = list() //to avoid spamming the admins if the same guy keeps trying.
|
||||
var/static/cidcheck_spoofckeys = list()
|
||||
|
||||
var/oldcid = cidcheck[ckey]
|
||||
|
||||
if (oldcid)
|
||||
if (!topic || !topic["token"] || !tokens[ckey] || topic["token"] != tokens[ckey])
|
||||
if (!cidcheck_spoofckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name(src)] appears to have attempted to spoof a cid randomizer check.</span>")
|
||||
cidcheck_spoofckeys[ckey] = TRUE
|
||||
cidcheck[ckey] = computer_id
|
||||
tokens[ckey] = cid_check_reconnect()
|
||||
|
||||
sleep(10) //browse is queued, we don't want them to disconnect before getting the browse() command.
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
if (oldcid != computer_id) //IT CHANGED!!!
|
||||
cidcheck -= ckey //so they can try again after removing the cid randomizer.
|
||||
|
||||
src << "<span class='userdanger'>Connection Error:</span>"
|
||||
src << "<span class='danger'>Invalid ComputerID(spoofed). Please remove the ComputerID spoofer from your byond installation and try again.</span>"
|
||||
|
||||
if (!cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name(src)] has been detected as using a cid randomizer. Connection rejected.</span>")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
|
||||
cidcheck_failedckeys[ckey] = TRUE
|
||||
note_randomizer_user()
|
||||
|
||||
log_access("Failed Login: [key] [computer_id] [address] - CID randomizer confirmed (oldcid: [oldcid])")
|
||||
|
||||
qdel(src)
|
||||
return TRUE
|
||||
else
|
||||
if (cidcheck_failedckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after showing they removed their cid randomizer</span>")
|
||||
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
|
||||
cidcheck_failedckeys -= ckey
|
||||
if (cidcheck_spoofckeys[ckey])
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] has been allowed to connect after appearing to have attempted to spoof a cid randomizer check because it <i>appears</i> they aren't spoofing one this time</span>")
|
||||
cidcheck_spoofckeys -= ckey
|
||||
cidcheck -= ckey
|
||||
else
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
var/DBQuery/query_cidcheck = dbcon.NewQuery("SELECT computerid FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
|
||||
query_cidcheck.Execute()
|
||||
|
||||
var/lastcid
|
||||
if (query_cidcheck.NextRow())
|
||||
lastcid = query_cidcheck.item[1]
|
||||
|
||||
if (computer_id != lastcid)
|
||||
cidcheck[ckey] = computer_id
|
||||
tokens[ckey] = cid_check_reconnect()
|
||||
|
||||
sleep(10) //browse is queued, we don't want them to disconnect before getting the browse() command.
|
||||
qdel(src)
|
||||
return TRUE
|
||||
|
||||
/client/proc/cid_check_reconnect()
|
||||
var/token = md5("[rand(0,9999)][world.time][rand(0,9999)][ckey][rand(0,9999)][address][rand(0,9999)][computer_id][rand(0,9999)]")
|
||||
. = token
|
||||
log_access("Failed Login: [key] [computer_id] [address] - CID randomizer check")
|
||||
var/url = winget(src, null, "url")
|
||||
//special javascript to make them reconnect under a new window.
|
||||
src << browse("<a id='link' href='byond://[url]?token=[token]'>byond://[url]?token=[token]</a><script type='text/javascript'>document.getElementById(\"link\").click();window.location=\"byond://winset?command=.quit\"</script>", "border=0;titlebar=0;size=1x1")
|
||||
src << "<a href='byond://[url]?token=[token]'>You will be automatically taken to the game, if not, click here to be taken manually</a>"
|
||||
|
||||
/client/proc/note_randomizer_user()
|
||||
var/const/adminckey = "CID-Error"
|
||||
var/sql_ckey = sanitizeSQL(ckey)
|
||||
//check to see if we noted them in the last day.
|
||||
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("notes")] WHERE ckey = '[sql_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")
|
||||
return
|
||||
if (query_get_notes.NextRow())
|
||||
return
|
||||
|
||||
//regardless of above, make sure their last note is not from us, as no point in repeating the same note over and over.
|
||||
query_get_notes = dbcon.NewQuery("SELECT adminckey FROM [format_table_name("notes")] WHERE ckey = '[sql_ckey]' ORDER BY timestamp DESC LIMIT 1")
|
||||
if(!query_get_notes.Execute())
|
||||
var/err = query_get_notes.ErrorMsg()
|
||||
log_game("SQL ERROR obtaining id from notes table. Error : \[[err]\]\n")
|
||||
return
|
||||
if (query_get_notes.NextRow())
|
||||
if (query_get_notes.item[1] == adminckey)
|
||||
return
|
||||
add_note(ckey, "Detected as using a cid randomizer.", null, adminckey, 0, null, 0)
|
||||
|
||||
|
||||
/client/proc/check_ip_intel()
|
||||
set waitfor = 0 //we sleep when getting the intel, no need to hold up the client connection while we sleep
|
||||
if (config.ipintel_email)
|
||||
@@ -500,13 +384,4 @@ var/next_external_rsc = 0
|
||||
//Hook, override it to run code when dir changes
|
||||
//Like for /atoms, but clients are their own snowflake FUCK
|
||||
/client/proc/setDir(newdir)
|
||||
dir = newdir
|
||||
|
||||
/client/vv_edit_var(var_name, var_value)
|
||||
switch (var_name)
|
||||
if ("holder")
|
||||
return FALSE
|
||||
if ("ckey")
|
||||
return FALSE
|
||||
if ("key")
|
||||
return FALSE
|
||||
dir = newdir
|
||||
@@ -1,6 +1,6 @@
|
||||
var/list/clientmessages = list()
|
||||
|
||||
/proc/addclientmessage(var/ckey, var/message)
|
||||
proc/addclientmessage(var/ckey, var/message)
|
||||
ckey = ckey(ckey)
|
||||
if (!ckey || !message)
|
||||
return
|
||||
|
||||
+178
-208
@@ -1,11 +1,10 @@
|
||||
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
|
||||
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
|
||||
|
||||
/datum/preferences
|
||||
var/client/parent
|
||||
//doohickeys for savefiles
|
||||
var/path
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
@@ -42,7 +41,23 @@ var/list/preferences_datums = list()
|
||||
var/allow_midround_antag = 1
|
||||
var/preferred_map = null
|
||||
|
||||
var/uses_glasses_colour = 0
|
||||
var/vore_banned_methods = 0
|
||||
var/vore_extra_bans = 65535
|
||||
var/list/vore_ability = list(
|
||||
"1"=2,
|
||||
"2"=0,
|
||||
"4"=0,
|
||||
"8"=0,
|
||||
"16"=0,
|
||||
"32"=0,
|
||||
"64"=1,
|
||||
"128"=0,
|
||||
"256"=2) //BAAAAD way to do this
|
||||
var/character_size="normal"
|
||||
var/be_taur=0
|
||||
|
||||
var/list/p_cock=list("has"=0,"type"="human","color"="900","sheath"="FFF")
|
||||
var/p_vagina=0
|
||||
|
||||
//character preferences
|
||||
var/real_name //our character's name
|
||||
@@ -61,8 +76,11 @@ var/list/preferences_datums = list()
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/eye_color = "000" //Eye color
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/list/features = list("mcolor" = "FFF", "mcolor2" = "FFF","mcolor3" = "FFF", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "mam_body_markings" = "None", "mam_ears" = "None", "mam_tail" = "None", "mam_tail_animated" = "None",
|
||||
"xenodorsal" = "None", "xenohead" = "None", "xenotail" = "None", "legs" = "Normal Legs")
|
||||
var/list/features = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "tail_lizard" = "Smooth",
|
||||
"tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None",
|
||||
"wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None",
|
||||
"mam_body_markings" = "None", "mam_ears" = "None", "mam_tail" = "None", "mam_tail_animated" = "None",
|
||||
"xenodorsal" = "None", "xenohead" = "None", "xenotail" = "None")
|
||||
|
||||
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
|
||||
//Mob preview
|
||||
@@ -82,31 +100,29 @@ var/list/preferences_datums = list()
|
||||
var/job_engsec_low = 0
|
||||
|
||||
// Want randomjob if preferences already filled - Donkie
|
||||
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
|
||||
var/userandomjob = 1 //defaults to 1 for fewer assistants
|
||||
|
||||
// 0 = character settings, 1 = game preferences
|
||||
var/current_tab = 0
|
||||
|
||||
// OOC Metadata:
|
||||
//var/metadata = ""
|
||||
var/flavor_text = ""
|
||||
|
||||
// Vore prefs
|
||||
var/digestable = 1
|
||||
var/devourable = 0
|
||||
var/list/belly_prefs = list()
|
||||
|
||||
// OOC Metadata:
|
||||
var/metadata = ""
|
||||
|
||||
var/unlock_content = 0
|
||||
|
||||
var/list/ignoring = list()
|
||||
|
||||
var/clientfps = 0
|
||||
|
||||
var/parallax = PARALLAX_HIGH
|
||||
//Parallax prefs
|
||||
var/space_parallax = 1
|
||||
var/space_dust = 1
|
||||
var/parallax_speed = 2
|
||||
|
||||
/datum/preferences/New(client/C)
|
||||
parent = C
|
||||
custom_names["ai"] = pick(ai_names)
|
||||
custom_names["cyborg"] = pick(ai_names)
|
||||
custom_names["clown"] = pick(clown_names)
|
||||
@@ -169,7 +185,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=job;task=menu'>Set Occupation Preferences</a><br></center>"
|
||||
dat += "<h2>Identity</h2>"
|
||||
dat += "<table width='100%'><tr><td width='75%' valign='top'>"
|
||||
if(jobban_isbanned(user, "appearance"))
|
||||
if(appearance_isbanned(user))
|
||||
dat += "<b>You are banned from using custom names and appearances. You can continue to adjust your characters, but you will be randomised once you join the game.</b><br>"
|
||||
dat += "<a href='?_src_=prefs;preference=name;task=random'>Random Name</A> "
|
||||
dat += "<a href='?_src_=prefs;preference=name'>Always Random Name: [be_random_name ? "Yes" : "No"]</a><BR>"
|
||||
@@ -202,7 +218,8 @@ var/list/preferences_datums = list()
|
||||
dat += "<table width='100%'><tr><td width='24%' valign='top'>"
|
||||
|
||||
if(config.mutant_races)
|
||||
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
|
||||
dat += "<b>Species:</b><BR><a href='?_src_=prefs;preference=species;task=input'>[pref_species.id]</a><BR>"
|
||||
dat += "<BR>"
|
||||
else
|
||||
dat += "<b>Species:</b> Human<BR>"
|
||||
|
||||
@@ -211,7 +228,6 @@ var/list/preferences_datums = list()
|
||||
dat += "<b>Socks:</b><BR><a href ='?_src_=prefs;preference=socks;task=input'>[socks]</a><BR>"
|
||||
dat += "<b>Backpack:</b><BR><a href ='?_src_=prefs;preference=bag;task=input'>[backbag]</a><BR></td>"
|
||||
|
||||
|
||||
// dat += "<b>Size:</b> <a href='?_src_=prefs;preference=character_size;task=input'>[character_size]</a><BR>"
|
||||
dat += "<a href='byond://?src=\ref[user];preference=flavor_text;task=input'><b>Set Flavor Text</b></a><br>"
|
||||
if(lentext(flavor_text) <= 40)
|
||||
@@ -233,7 +249,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(HAIR in pref_species.species_traits)
|
||||
if(HAIR in pref_species.specflags)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
@@ -254,7 +270,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if(EYECOLOR in pref_species.species_traits)
|
||||
if(EYECOLOR in pref_species.specflags)
|
||||
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
@@ -266,21 +282,20 @@ var/list/preferences_datums = list()
|
||||
|
||||
if(config.mutant_races) //We don't allow mutant bodyparts for humans either unless this is true.
|
||||
|
||||
if((MUTCOLORS in pref_species.species_traits) || (MUTCOLORS_PARTSONLY in pref_species.species_traits))
|
||||
if((MUTCOLORS in pref_species.specflags) || (MUTCOLORS_PARTSONLY in pref_species.specflags))
|
||||
|
||||
dat += "<td valign='top' width='14%'>"
|
||||
dat += "<td valign='top' width='21%'>"
|
||||
|
||||
dat += "<h3>Mutant Color</h3>"
|
||||
dat += "<h3>Alien/Mutant Colors</h3>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor"]];'> </span> <a href='?_src_=prefs;preference=mutant_color;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor2"]];'> </span> <a href='?_src_=prefs;preference=mutant_color2;task=input'>Change</a><BR>"
|
||||
|
||||
dat += "<span style='border: 1px solid #161616; background-color: #[features["mcolor3"]];'> </span> <a href='?_src_=prefs;preference=mutant_color3;task=input'>Change</a><BR>"
|
||||
|
||||
|
||||
dat += "</td>"
|
||||
//lizard bodyparts
|
||||
if("tail_lizard" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
@@ -334,8 +349,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=body_markings;task=input'>[features["body_markings"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
//Mammal bodyparts
|
||||
//Mammal bodyparts
|
||||
if("mam_body_markings" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
@@ -352,13 +366,6 @@ var/list/preferences_datums = list()
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=mam_tail;task=input'>[features["mam_tail"]]</a><BR>"
|
||||
|
||||
if("legs" in pref_species.mutant_bodyparts)
|
||||
dat += "<td valign='top' width='7%'>"
|
||||
|
||||
dat += "<h3>Legs</h3>"
|
||||
|
||||
dat += "<a href='?_src_=prefs;preference=legs;task=input'>[features["legs"]]</a><BR>"
|
||||
|
||||
dat += "</td>"
|
||||
|
||||
if("mam_ears" in pref_species.mutant_bodyparts)
|
||||
@@ -433,7 +440,7 @@ var/list/preferences_datums = list()
|
||||
if (1) // Game Preferences
|
||||
dat += "<table><tr><td width='340px' height='300px' valign='top'>"
|
||||
dat += "<h2>General Settings</h2>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;task=input;preference=ui'>[UI_style]</a><br>"
|
||||
dat += "<b>UI Style:</b> <a href='?_src_=prefs;preference=ui'>[UI_style]</a><br>"
|
||||
dat += "<b>Keybindings:</b> <a href='?_src_=prefs;preference=hotkeys'>[(hotkeys) ? "Hotkeys" : "Default"]</a><br>"
|
||||
dat += "<b>tgui Style:</b> <a href='?_src_=prefs;preference=tgui_fancy'>[(tgui_fancy) ? "Fancy" : "No Frills"]</a><br>"
|
||||
dat += "<b>tgui Monitors:</b> <a href='?_src_=prefs;preference=tgui_lock'>[(tgui_lock) ? "Primary" : "All"]</a><br>"
|
||||
@@ -446,6 +453,10 @@ var/list/preferences_datums = list()
|
||||
dat += "<b>Ghost pda:</b> <a href='?_src=prefs;preference=ghost_pda'>[(chat_toggles & CHAT_GHOSTPDA) ? "All Messages" : "Nearest Creatures"]</a><br>"
|
||||
dat += "<b>Pull requests:</b> <a href='?_src_=prefs;preference=pull_requests'>[(chat_toggles & CHAT_PULLR) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Midround Antagonist:</b> <a href='?_src_=prefs;preference=allow_midround_antag'>[(toggles & MIDROUND_ANTAG) ? "Yes" : "No"]</a><br>"
|
||||
dat += "<b>Space Parallax:</b> <a href='?_src_=prefs;preference=parallax'>[space_parallax ? "Enabled" : "Disabled"]</a><br>"
|
||||
if(space_parallax)
|
||||
dat += "<b>Parallax Speed:</b> <a href='?_src_=prefs;preference=p_speed'>[parallax_speed]</a><br>"
|
||||
dat += "<b>Space Dust:</b> <a href='?_src_=prefs;preference=dust'>[space_dust ? "Yes" : "No"]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'>Edit </a><br>"
|
||||
|
||||
@@ -498,23 +509,7 @@ var/list/preferences_datums = list()
|
||||
p_map = VM.friendlyname
|
||||
else
|
||||
p_map += " (No longer exists)"
|
||||
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
|
||||
|
||||
dat += "<b>FPS:</b> <a href='?_src_=prefs;preference=clientfps;task=input'>[clientfps]</a><br>"
|
||||
|
||||
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallaxdown' oncontextmenu='window.location.href=\"?_src_=prefs;preference=parallaxup\";return false;'>"
|
||||
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>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a>"
|
||||
|
||||
dat += "</td><td width='300px' height='300px' valign='top'>"
|
||||
|
||||
@@ -551,6 +546,7 @@ var/list/preferences_datums = list()
|
||||
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
|
||||
dat += "</center>"
|
||||
|
||||
//user << browse(dat, "window=preferences;size=560x560")
|
||||
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
|
||||
popup.set_content(dat)
|
||||
popup.open(0)
|
||||
@@ -567,116 +563,108 @@ var/list/preferences_datums = list()
|
||||
var/width = widthPerColumn
|
||||
|
||||
var/HTML = "<center>"
|
||||
if(SSjob.occupations.len <= 0)
|
||||
HTML += "The job ticker is not yet finished creating jobs, please try again later"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
HTML += "<b>Choose occupation chances</b><br>"
|
||||
HTML += "<div align='center'>Left-click to raise an occupation preference, right-click to lower it.<br></div>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
HTML += "<script type='text/javascript'>function setJobPrefRedirect(level, rank) { window.location.href='?_src_=prefs;preference=job;task=setJobLevel;level=' + level + ';text=' + encodeURIComponent(rank); return false; }</script>"
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
|
||||
else
|
||||
HTML += "<b>Choose occupation chances</b><br>"
|
||||
HTML += "<div align='center'>Left-click to raise an occupation preference, right-click to lower it.<br></div>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=close'>Done</a></center><br>" // Easier to press up here.
|
||||
HTML += "<script type='text/javascript'>function setJobPrefRedirect(level, rank) { window.location.href='?_src_=prefs;preference=job;task=setJobLevel;level=' + level + ';text=' + encodeURIComponent(rank); return false; }</script>"
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'><tr><td width='20%'>" // Table within a table for alignment, also allows you to easily add more colomns.
|
||||
HTML += "<table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
var/index = -1
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
|
||||
for(var/datum/job/job in SSjob.occupations)
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
width += widthPerColumn
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
index += 1
|
||||
if((index >= limit) || (job.title in splitJobs))
|
||||
width += widthPerColumn
|
||||
if((index < limit) && (lastJob != null))
|
||||
//If the cells were broken up by a job in the splitJob list then it will fill in the rest of the cells with
|
||||
//the last job's selection color. Creating a rather nice effect.
|
||||
for(var/i = 0, i < (limit - index), i += 1)
|
||||
HTML += "<tr bgcolor='[lastJob.selection_color]'><td width='60%' align='right'> </td><td> </td></tr>"
|
||||
HTML += "</table></td><td width='20%'><table width='100%' cellpadding='1' cellspacing='0'>"
|
||||
index = 0
|
||||
|
||||
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><a href='?_src_=prefs;jobbancheck=[rank]'> BANNED</a></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS\]</font></td></tr>"
|
||||
continue
|
||||
if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features))
|
||||
if(user.client.prefs.pref_species.id == "human")
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[MUTANT\]</b></font></td></tr>"
|
||||
else
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[NON-HUMAN\]</b></font></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
HTML += "<tr bgcolor='[job.selection_color]'><td width='60%' align='right'>"
|
||||
var/rank = job.title
|
||||
lastJob = job
|
||||
if(jobban_isbanned(user, rank))
|
||||
HTML += "<font color=red>[rank]</font></td><td><a href='?_src_=prefs;jobbancheck=[rank]'> BANNED</a></td></tr>"
|
||||
continue
|
||||
if(!job.player_old_enough(user.client))
|
||||
var/available_in_days = job.available_in_days(user.client)
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red> \[IN [(available_in_days)] DAYS\]</font></td></tr>"
|
||||
continue
|
||||
if((job_civilian_low & ASSISTANT) && (rank != "Assistant") && !jobban_isbanned(user, "Assistant"))
|
||||
HTML += "<font color=orange>[rank]</font></td><td></td></tr>"
|
||||
continue
|
||||
if(config.enforce_human_authority && !user.client.prefs.pref_species.qualifies_for_rank(rank, user.client.prefs.features))
|
||||
if(user.client.prefs.pref_species.id == "human")
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[MUTANT\]</b></font></td></tr>"
|
||||
else
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
HTML += "<font color=red>[rank]</font></td><td><font color=red><b> \[NON-HUMAN\]</b></font></td></tr>"
|
||||
continue
|
||||
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
|
||||
HTML += "<b><span class='dark'>[rank]</span></b>"
|
||||
else
|
||||
HTML += "<span class='dark'>[rank]</span>"
|
||||
|
||||
HTML += "</td><td width='40%'>"
|
||||
HTML += "</td><td width='40%'>"
|
||||
|
||||
var/prefLevelLabel = "ERROR"
|
||||
var/prefLevelColor = "pink"
|
||||
var/prefUpperLevel = -1 // level to assign on left click
|
||||
var/prefLowerLevel = -1 // level to assign on right click
|
||||
var/prefLevelLabel = "ERROR"
|
||||
var/prefLevelColor = "pink"
|
||||
var/prefUpperLevel = -1 // level to assign on left click
|
||||
var/prefLowerLevel = -1 // level to assign on right click
|
||||
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
prefUpperLevel = 4
|
||||
prefLowerLevel = 2
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
prefUpperLevel = 1
|
||||
prefLowerLevel = 3
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
prefUpperLevel = 2
|
||||
prefLowerLevel = 4
|
||||
if(GetJobDepartment(job, 1) & job.flag)
|
||||
prefLevelLabel = "High"
|
||||
prefLevelColor = "slateblue"
|
||||
prefUpperLevel = 4
|
||||
prefLowerLevel = 2
|
||||
else if(GetJobDepartment(job, 2) & job.flag)
|
||||
prefLevelLabel = "Medium"
|
||||
prefLevelColor = "green"
|
||||
prefUpperLevel = 1
|
||||
prefLowerLevel = 3
|
||||
else if(GetJobDepartment(job, 3) & job.flag)
|
||||
prefLevelLabel = "Low"
|
||||
prefLevelColor = "orange"
|
||||
prefUpperLevel = 2
|
||||
prefLowerLevel = 4
|
||||
else
|
||||
prefLevelLabel = "NEVER"
|
||||
prefLevelColor = "red"
|
||||
prefUpperLevel = 3
|
||||
prefLowerLevel = 1
|
||||
|
||||
|
||||
HTML += "<a class='white' href='?_src_=prefs;preference=job;task=setJobLevel;level=[prefUpperLevel];text=[rank]' oncontextmenu='javascript:return setJobPrefRedirect([prefLowerLevel], \"[rank]\");'>"
|
||||
|
||||
if(rank == "Assistant")//Assistant is special
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
HTML += "<font color=green>Yes</font>"
|
||||
else
|
||||
prefLevelLabel = "NEVER"
|
||||
prefLevelColor = "red"
|
||||
prefUpperLevel = 3
|
||||
prefLowerLevel = 1
|
||||
|
||||
|
||||
HTML += "<a class='white' href='?_src_=prefs;preference=job;task=setJobLevel;level=[prefUpperLevel];text=[rank]' oncontextmenu='javascript:return setJobPrefRedirect([prefLowerLevel], \"[rank]\");'>"
|
||||
|
||||
if(rank == "Assistant")//Assistant is special
|
||||
if(job_civilian_low & ASSISTANT)
|
||||
HTML += "<font color=green>Yes</font>"
|
||||
else
|
||||
HTML += "<font color=red>No</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
HTML += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "<font color=red>No</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
continue
|
||||
|
||||
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 += "<font color=[prefLevelColor]>[prefLevelLabel]</font>"
|
||||
HTML += "</a></td></tr>"
|
||||
|
||||
HTML += "</td'></tr></table>"
|
||||
HTML += "</center></table>"
|
||||
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>"
|
||||
|
||||
var/message = "Be an Assistant if preferences unavailable"
|
||||
if(joblessrole == BERANDOMJOB)
|
||||
message = "Get random job if preferences unavailable"
|
||||
else if(joblessrole == RETURNTOLOBBY)
|
||||
message = "Return to lobby if preferences unavailable"
|
||||
HTML += "<center><br><a href='?_src_=prefs;preference=job;task=random'>[message]</a></center>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>Reset Preferences</a></center>"
|
||||
HTML += "</td'></tr></table>"
|
||||
|
||||
HTML += "</center></table>"
|
||||
|
||||
HTML += "<center><br><a href='?_src_=prefs;preference=job;task=random'>[userandomjob ? "Get random job if preferences unavailable" : "Be an Assistant if preference unavailable"]</a></center>"
|
||||
HTML += "<center><a href='?_src_=prefs;preference=job;task=reset'>Reset Preferences</a></center>"
|
||||
|
||||
user << browse(null, "window=preferences")
|
||||
//user << browse(HTML, "window=mob_occupation;size=[width]x[height]")
|
||||
var/datum/browser/popup = new(user, "mob_occupation", "<div align='center'>Occupation Preferences</div>", width, height)
|
||||
popup.set_window_options("can_close=0")
|
||||
popup.set_content(HTML)
|
||||
@@ -742,7 +730,7 @@ var/list/preferences_datums = list()
|
||||
return 0
|
||||
|
||||
/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl)
|
||||
if(!SSjob || SSjob.occupations.len <= 0)
|
||||
if(!SSjob)
|
||||
return
|
||||
var/datum/job/job = SSjob.GetJob(role)
|
||||
|
||||
@@ -847,16 +835,10 @@ var/list/preferences_datums = list()
|
||||
ResetJobs()
|
||||
SetChoices(user)
|
||||
if("random")
|
||||
switch(joblessrole)
|
||||
if(RETURNTOLOBBY)
|
||||
if(jobban_isbanned(user, "Assistant"))
|
||||
joblessrole = BERANDOMJOB
|
||||
else
|
||||
joblessrole = BEASSISTANT
|
||||
if(BEASSISTANT)
|
||||
joblessrole = BERANDOMJOB
|
||||
if(BERANDOMJOB)
|
||||
joblessrole = RETURNTOLOBBY
|
||||
if(jobban_isbanned(user, "Assistant"))
|
||||
userandomjob = 1
|
||||
else
|
||||
userandomjob = !userandomjob
|
||||
SetChoices(user)
|
||||
if("setJobLevel")
|
||||
UpdateJobPreference(user, href_list["text"], text2num(href_list["level"]))
|
||||
@@ -939,17 +921,18 @@ var/list/preferences_datums = list()
|
||||
if(new_age)
|
||||
age = max(min( round(text2num(new_age)), AGE_MAX),AGE_MIN)
|
||||
|
||||
/*if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))*/
|
||||
|
||||
if("flavor_text")
|
||||
var/msg = input(usr,"Set the flavor text in your 'examine' verb. This can also be used for OOC notes and preferences!","Flavor Text",html_decode(flavor_text)) as message
|
||||
if(msg != null)
|
||||
msg = copytext(msg, 1, MAX_MESSAGE_LEN)
|
||||
msg = html_encode(msg)
|
||||
flavor_text = msg
|
||||
|
||||
if("metadata")
|
||||
var/new_metadata = input(user, "Enter any information you'd like others to see, such as Roleplay-preferences:", "Game Preference" , metadata) as message|null
|
||||
if(new_metadata)
|
||||
metadata = sanitize(copytext(new_metadata,1,MAX_MESSAGE_LEN))
|
||||
flavor_text = msg
|
||||
|
||||
if("hair")
|
||||
var/new_hair = input(user, "Choose your character's hair colour:", "Character Preference") as null|color
|
||||
@@ -1035,26 +1018,27 @@ var/list/preferences_datums = list()
|
||||
|
||||
if("species")
|
||||
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
|
||||
var/result = input(user, "Select a species", "Species Selection") as null|anything in get_racelist(user)
|
||||
|
||||
if(result)
|
||||
var/newtype = roundstart_species[result]
|
||||
pref_species = new newtype()
|
||||
//Now that we changed our species, we must verify that the mutant colour is still allowed.
|
||||
var/temp_hsv = RGBtoHSV(features["mcolor"])
|
||||
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
if(features["mcolor"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
features["mcolor"] = pref_species.default_color
|
||||
if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
if(features["mcolor2"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
features["mcolor2"] = pref_species.default_color
|
||||
if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.species_traits) && ReadHSV(temp_hsv)[3] < ReadHSV("#7F7F7F")[3]))
|
||||
if(features["mcolor3"] == "#000" || (!(MUTCOLORS_PARTSONLY in pref_species.specflags) && ReadHSV(temp_hsv)[3] < ReadHSV("#202020")[3]))
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
|
||||
if("mutant_color")
|
||||
var/new_mutantcolor = input(user, "Choose your character's alien/mutant color:", "Character Preference") as color|null
|
||||
var/new_mutantcolor = input(user, "Choose your character's primary alien/mutant color:", "Character Preference") as color|null
|
||||
if(new_mutantcolor)
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1065,7 +1049,7 @@ var/list/preferences_datums = list()
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor2"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor2"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1076,7 +1060,7 @@ var/list/preferences_datums = list()
|
||||
var/temp_hsv = RGBtoHSV(new_mutantcolor)
|
||||
if(new_mutantcolor == "#000000")
|
||||
features["mcolor3"] = pref_species.default_color
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
else if((MUTCOLORS_PARTSONLY in pref_species.specflags) || ReadHSV(temp_hsv)[3] >= ReadHSV("#202020")[3]) // mutantcolors must be bright, but only if they affect the skin
|
||||
features["mcolor3"] = sanitize_hexcolor(new_mutantcolor)
|
||||
else
|
||||
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
|
||||
@@ -1098,7 +1082,6 @@ var/list/preferences_datums = list()
|
||||
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in mam_tails_list
|
||||
if(new_tail)
|
||||
features["mam_tail"] = new_tail
|
||||
|
||||
/* Doesn't exist yet. will include facial overlays to mimic 5th port species heads.
|
||||
if("mam_snout")
|
||||
var/new_snout
|
||||
@@ -1106,7 +1089,6 @@ var/list/preferences_datums = list()
|
||||
if(new_snout)
|
||||
features["snout"] = new_snout
|
||||
*/
|
||||
|
||||
if("snout")
|
||||
var/new_snout
|
||||
new_snout = input(user, "Choose your character's snout:", "Character Preference") as null|anything in snouts_list
|
||||
@@ -1180,19 +1162,13 @@ var/list/preferences_datums = list()
|
||||
if(new_dors)
|
||||
features["xenodorsal"] = new_dors
|
||||
|
||||
if("legs")
|
||||
var/new_legs
|
||||
new_legs = input(user, "Choose your character's legs:", "Character Preference") as null|anything in legs_list
|
||||
if(new_legs)
|
||||
features["legs"] = new_legs
|
||||
|
||||
if("s_tone")
|
||||
var/new_s_tone = input(user, "Choose your character's skin-tone:", "Character Preference") as null|anything in skin_tones
|
||||
if(new_s_tone)
|
||||
skin_tone = new_s_tone
|
||||
|
||||
if("ooccolor")
|
||||
var/new_ooccolor = input(user, "Choose your OOC colour:", "Game Preference") as color|null
|
||||
var/new_ooccolor = input(user, "Choose your OOC color:", "Game Preference") as color|null
|
||||
if(new_ooccolor)
|
||||
ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
|
||||
@@ -1257,21 +1233,6 @@ var/list/preferences_datums = list()
|
||||
var/pickedmap = input(user, "Choose your preferred map. This will be used to help weight random map selection.", "Character Preference") as null|anything in maplist
|
||||
if (pickedmap)
|
||||
preferred_map = maplist[pickedmap]
|
||||
if ("clientfps")
|
||||
var/version_message
|
||||
if (user.client && user.client.byond_version < 511)
|
||||
version_message = "\nYou need to be using byond version 511 or later to take advantage of this feature, your version of [user.client.byond_version] is too low"
|
||||
if (world.byond_version < 511)
|
||||
version_message += "\nThis server does not currently support client side fps. You can set now for when it does."
|
||||
var/desiredfps = input(user, "Choose your desired fps.[version_message]\n(0 = synced with server tick rate (currently:[world.fps]))", "Character Preference", clientfps) as null|num
|
||||
if (!isnull(desiredfps))
|
||||
clientfps = desiredfps
|
||||
if (world.byond_version >= 511 && user.client && user.client.byond_version >= 511)
|
||||
user.client.vars["fps"] = clientfps
|
||||
if("ui")
|
||||
var/pickedui = input(user, "Choose your UI style.", "Character Preference") as null|anything in list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork")
|
||||
if(pickedui)
|
||||
UI_style = pickedui
|
||||
|
||||
|
||||
else
|
||||
@@ -1290,6 +1251,19 @@ var/list/preferences_datums = list()
|
||||
facial_hair_style = random_facial_hair_style(gender)
|
||||
hair_style = random_hair_style(gender)
|
||||
|
||||
if("ui")
|
||||
switch(UI_style)
|
||||
if("Midnight")
|
||||
UI_style = "Plasmafire"
|
||||
if("Plasmafire")
|
||||
UI_style = "Retro"
|
||||
if("Retro")
|
||||
UI_style = "Slimecore"
|
||||
if("Slimecore")
|
||||
UI_style = "Operative"
|
||||
else
|
||||
UI_style = "Midnight"
|
||||
|
||||
if("hotkeys")
|
||||
hotkeys = !hotkeys
|
||||
|
||||
@@ -1310,6 +1284,15 @@ var/list/preferences_datums = list()
|
||||
else
|
||||
be_special += be_special_type
|
||||
|
||||
if("parallax")
|
||||
space_parallax = !space_parallax
|
||||
|
||||
if("dust")
|
||||
space_dust = !space_dust
|
||||
|
||||
if("p_speed")
|
||||
parallax_speed = min(max(input(user, "Enter a number between 0 and 5 included (default=2)","Parallax Speed Preferences",parallax_speed),0),5)
|
||||
|
||||
if("name")
|
||||
be_random_name = !be_random_name
|
||||
|
||||
@@ -1347,16 +1330,6 @@ var/list/preferences_datums = list()
|
||||
if("allow_midround_antag")
|
||||
toggles ^= MIDROUND_ANTAG
|
||||
|
||||
if("parallaxup")
|
||||
parallax = Wrap(parallax + 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("parallaxdown")
|
||||
parallax = Wrap(parallax - 1, PARALLAX_INSANE, PARALLAX_DISABLE + 1)
|
||||
if (parent && parent.mob && parent.mob.hud_used)
|
||||
parent.mob.hud_used.update_parallax_pref()
|
||||
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
@@ -1398,7 +1371,6 @@ var/list/preferences_datums = list()
|
||||
|
||||
character.real_name = real_name
|
||||
character.name = character.real_name
|
||||
|
||||
character.flavor_text = flavor_text
|
||||
|
||||
if(!length(belly_prefs))
|
||||
@@ -1417,7 +1389,6 @@ var/list/preferences_datums = list()
|
||||
B.owner = character
|
||||
|
||||
character.digestable = digestable
|
||||
// character.devourable = devourable
|
||||
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
@@ -1432,7 +1403,6 @@ var/list/preferences_datums = list()
|
||||
character.underwear = underwear
|
||||
character.undershirt = undershirt
|
||||
character.socks = socks
|
||||
|
||||
character.backbag = backbag
|
||||
|
||||
character.dna.features = features.Copy()
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped.
|
||||
#define SAVEFILE_VERSION_MIN 10
|
||||
//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped.
|
||||
#define SAVEFILE_VERSION_MIN 8
|
||||
|
||||
//This is the current version, anything below this will attempt to update (if it's not obsolete)
|
||||
#define SAVEFILE_VERSION_MAX 17
|
||||
#define SAVEFILE_VERSION_MAX 15
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
This proc checks if the current directory of the savefile S needs updating
|
||||
It is to be used by the load_character and load_preferences procs.
|
||||
(S.cd=="/" is preferences, S.cd=="/character[integer]" is a character slot, etc)
|
||||
|
||||
if the current directory's version is below SAVEFILE_VERSION_MIN it will simply wipe everything in that directory
|
||||
(if we're at root "/" then it'll just wipe the entire savefile, for instance.)
|
||||
|
||||
if its version is below SAVEFILE_VERSION_MAX but above the minimum, it will load data but later call the
|
||||
respective update_preferences() or update_character() proc.
|
||||
Those procs allow coders to specify format changes so users do not lose their setups and have to redo them again.
|
||||
|
||||
Failing all that, the standard sanity checks are performed. They simply check the data is suitable, reverting to
|
||||
initial() values if necessary.
|
||||
*/
|
||||
@@ -31,7 +28,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
return -1
|
||||
|
||||
|
||||
/datum/preferences/proc/update_antagchoices(current_version, savefile/S)
|
||||
/datum/preferences/proc/update_antagchoices(current_version)
|
||||
if((!islist(be_special) || old_be_special ) && current_version < 12)
|
||||
//Archived values of when antag pref defines were a bitfield+fitflags
|
||||
var/B_traitor = 1
|
||||
@@ -87,7 +84,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
be_special += ROLE_ABDUCTOR
|
||||
|
||||
|
||||
/datum/preferences/proc/update_preferences(current_version, savefile/S)
|
||||
/datum/preferences/proc/update_preferences(current_version)
|
||||
if(current_version < 10)
|
||||
toggles |= MEMBER_PUBLIC
|
||||
if(current_version < 11)
|
||||
@@ -98,14 +95,71 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(current_version < 15)
|
||||
toggles |= SOUND_ANNOUNCEMENTS
|
||||
|
||||
|
||||
//should this proc get fairly long (say 3 versions long),
|
||||
//just increase SAVEFILE_VERSION_MIN so it's not as far behind
|
||||
//SAVEFILE_VERSION_MAX and then delete any obsolete if clauses
|
||||
//from this proc.
|
||||
//It's only really meant to avoid annoying frequent players
|
||||
//if your savefile is 3 months out of date, then 'tough shit'.
|
||||
/datum/preferences/proc/update_character(current_version, savefile/S)
|
||||
/datum/preferences/proc/update_character(current_version)
|
||||
if(current_version < 9) //an example, underwear were an index for a hardcoded list, converting to a string
|
||||
if(gender == MALE)
|
||||
switch(underwear)
|
||||
if(1)
|
||||
underwear = "Mens White"
|
||||
if(2)
|
||||
underwear = "Mens Grey"
|
||||
if(3)
|
||||
underwear = "Mens Green"
|
||||
if(4)
|
||||
underwear = "Mens Blue"
|
||||
if(5)
|
||||
underwear = "Mens Black"
|
||||
if(6)
|
||||
underwear = "Mankini"
|
||||
if(7)
|
||||
underwear = "Mens Hearts Boxer"
|
||||
if(8)
|
||||
underwear = "Mens Black Boxer"
|
||||
if(9)
|
||||
underwear = "Mens Grey Boxer"
|
||||
if(10)
|
||||
underwear = "Mens Striped Boxer"
|
||||
if(11)
|
||||
underwear = "Mens Kinky"
|
||||
if(12)
|
||||
underwear = "Mens Red"
|
||||
if(13)
|
||||
underwear = "Nude"
|
||||
else
|
||||
switch(underwear)
|
||||
if(1)
|
||||
underwear = "Ladies Red"
|
||||
if(2)
|
||||
underwear = "Ladies White"
|
||||
if(3)
|
||||
underwear = "Ladies Yellow"
|
||||
if(4)
|
||||
underwear = "Ladies Blue"
|
||||
if(5)
|
||||
underwear = "Ladies Black"
|
||||
if(6)
|
||||
underwear = "Ladies Thong"
|
||||
if(7)
|
||||
underwear = "Babydoll"
|
||||
if(8)
|
||||
underwear = "Ladies Baby-Blue"
|
||||
if(9)
|
||||
underwear = "Ladies Green"
|
||||
if(10)
|
||||
underwear = "Ladies Pink"
|
||||
if(11)
|
||||
underwear = "Ladies Kinky"
|
||||
if(12)
|
||||
underwear = "Tankini"
|
||||
if(13)
|
||||
underwear = "Nude"
|
||||
|
||||
if(pref_species && !(pref_species.id in roundstart_species))
|
||||
var/rando_race = pick(config.roundstart_races)
|
||||
pref_species = new rando_race()
|
||||
@@ -116,17 +170,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
backbag = DSATCHEL
|
||||
else
|
||||
backbag = DBACKPACK
|
||||
if(current_version < 16)
|
||||
var/berandom
|
||||
S["userandomjob"] >> berandom
|
||||
if (berandom)
|
||||
joblessrole = BERANDOMJOB
|
||||
else
|
||||
joblessrole = BEASSISTANT
|
||||
if(current_version < 17)
|
||||
features["legs"] = "Normal Legs"
|
||||
|
||||
|
||||
//
|
||||
// Save/Load Vore Preferences
|
||||
//
|
||||
/datum/preferences/proc/load_vore_preferences(slot)
|
||||
@@ -141,13 +187,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S.cd = "/character[slot]"
|
||||
|
||||
S["digestable"] >> digestable
|
||||
S["devourable"] >> devourable
|
||||
S["belly_prefs"] >> belly_prefs
|
||||
|
||||
if(isnull(digestable))
|
||||
digestable = 1
|
||||
if(isnull(devourable))
|
||||
devourable = 0
|
||||
if(isnull(belly_prefs))
|
||||
belly_prefs = list()
|
||||
|
||||
@@ -162,7 +205,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
S["digestable"] << digestable
|
||||
S["devourable"] << devourable
|
||||
S["belly_prefs"] << belly_prefs
|
||||
|
||||
return 1
|
||||
@@ -195,6 +237,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["hotkeys"] >> hotkeys
|
||||
S["tgui_fancy"] >> tgui_fancy
|
||||
S["tgui_lock"] >> tgui_lock
|
||||
S["space_parallax"] >> space_parallax
|
||||
S["space_dust"] >> space_dust
|
||||
S["parallax_speed"] >> parallax_speed
|
||||
|
||||
if(islist(S["be_special"]))
|
||||
S["be_special"] >> be_special
|
||||
@@ -213,26 +258,24 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["ignoring"] >> ignoring
|
||||
S["ghost_hud"] >> ghost_hud
|
||||
S["inquisitive_ghost"] >> inquisitive_ghost
|
||||
S["uses_glasses_colour"]>> uses_glasses_colour
|
||||
S["clientfps"] >> clientfps
|
||||
S["parallax"] >> parallax
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
update_preferences(needs_update, S) //needs_update = savefile_version if we need an update (positive integer)
|
||||
update_antagchoices(needs_update, S)
|
||||
update_preferences(needs_update) //needs_update = savefile_version if we need an update (positive integer)
|
||||
update_antagchoices(needs_update)
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor)))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative", "Clockwork"), initial(UI_style))
|
||||
UI_style = sanitize_inlist(UI_style, list("Midnight", "Plasmafire", "Retro", "Slimecore", "Operative"), initial(UI_style))
|
||||
hotkeys = sanitize_integer(hotkeys, 0, 1, initial(hotkeys))
|
||||
tgui_fancy = sanitize_integer(tgui_fancy, 0, 1, initial(tgui_fancy))
|
||||
tgui_lock = sanitize_integer(tgui_lock, 0, 1, initial(tgui_lock))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, 0, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, PARALLAX_HIGH)
|
||||
space_parallax = sanitize_integer(space_parallax, 0, 1, initial(space_parallax))
|
||||
space_dust = sanitize_integer(space_dust, 0, 1, initial(space_dust))
|
||||
parallax_speed = sanitize_integer(parallax_speed, 0, 5, initial(parallax_speed))
|
||||
ghost_form = sanitize_inlist(ghost_form, ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
@@ -269,9 +312,9 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["ignoring"] << ignoring
|
||||
S["ghost_hud"] << ghost_hud
|
||||
S["inquisitive_ghost"] << inquisitive_ghost
|
||||
S["uses_glasses_colour"]<< uses_glasses_colour
|
||||
S["clientfps"] << clientfps
|
||||
S["parallax"] << parallax
|
||||
S["space_parallax"] << space_parallax
|
||||
S["space_dust"] << space_dust
|
||||
S["parallax_speed"] << parallax_speed
|
||||
|
||||
return 1
|
||||
|
||||
@@ -308,25 +351,28 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
if(!S["features["mcolor"]"] || S["features["mcolor"]"] == "#000")
|
||||
S["features["mcolor"]"] << "#FFF"
|
||||
if(!S["features["mcolor2"]"] || S["features["mcolor2"]"] == "#000")
|
||||
S["features["mcolor2"]"] << "#FFF"
|
||||
if(!S["features["mcolor3"]"] || S["features["mcolor3"]"] == "#000")
|
||||
S["features["mcolor3"]"] << "#FFF"
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] >> metadata
|
||||
S["flavor_text"] >> flavor_text
|
||||
S["real_name"] >> real_name
|
||||
S["name_is_always_random"] >> be_random_name
|
||||
S["body_is_always_random"] >> be_random_body
|
||||
S["gender"] >> gender
|
||||
S["age"] >> age
|
||||
S["hair_color"] >> hair_color
|
||||
S["facial_hair_color"] >> facial_hair_color
|
||||
S["eye_color"] >> eye_color
|
||||
S["skin_tone"] >> skin_tone
|
||||
S["hair_style_name"] >> hair_style
|
||||
S["facial_style_name"] >> facial_hair_style
|
||||
S["underwear"] >> underwear
|
||||
S["undershirt"] >> undershirt
|
||||
S["socks"] >> socks
|
||||
S["backbag"] >> backbag
|
||||
S["real_name"] >> real_name
|
||||
S["name_is_always_random"] >> be_random_name
|
||||
S["body_is_always_random"] >> be_random_body
|
||||
S["gender"] >> gender
|
||||
S["age"] >> age
|
||||
S["hair_color"] >> hair_color
|
||||
S["facial_hair_color"] >> facial_hair_color
|
||||
S["eye_color"] >> eye_color
|
||||
S["skin_tone"] >> skin_tone
|
||||
S["hair_style_name"] >> hair_style
|
||||
S["facial_style_name"] >> facial_hair_style
|
||||
S["underwear"] >> underwear
|
||||
S["undershirt"] >> undershirt
|
||||
S["socks"] >> socks
|
||||
S["backbag"] >> backbag
|
||||
S["flavor_text"] >> flavor_text
|
||||
S["feature_mcolor"] >> features["mcolor"]
|
||||
S["feature_mcolor2"] >> features["mcolor2"]
|
||||
S["feature_mcolor3"] >> features["mcolor3"]
|
||||
@@ -344,7 +390,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_xeno_tail"] >> features["xenotail"]
|
||||
S["feature_xeno_dors"] >> features["xenodorsal"]
|
||||
S["feature_xeno_head"] >> features["xenohead"]
|
||||
S["feature_lizard_legs"] >> features["legs"]
|
||||
if(!config.mutant_humans)
|
||||
features["tail_human"] = "none"
|
||||
features["ears"] = "none"
|
||||
@@ -359,7 +404,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["deity_name"] >> custom_names["deity"]
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] >> joblessrole
|
||||
S["userandomjob"] >> userandomjob
|
||||
S["job_civilian_high"] >> job_civilian_high
|
||||
S["job_civilian_med"] >> job_civilian_med
|
||||
S["job_civilian_low"] >> job_civilian_low
|
||||
@@ -372,11 +417,10 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
//try to fix any outdated data if necessary
|
||||
if(needs_update >= 0)
|
||||
update_character(needs_update, S) //needs_update == savefile_version if we need an update (positive integer)
|
||||
update_character(needs_update) //needs_update == savefile_version if we need an update (positive integer)
|
||||
|
||||
//Sanitize
|
||||
flavor_text = sanitize_text(flavor_text, initial(flavor_text))
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(!features["mcolor"] || features["mcolor"] == "#000")
|
||||
features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
@@ -424,9 +468,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
features["xenotail"] = sanitize_inlist(features["xenotail"], xeno_tail_list)
|
||||
features["xenohead"] = sanitize_inlist(features["xenohead"], xeno_head_list)
|
||||
features["xenodorsal"] = sanitize_inlist(features["xenodorsal"], xeno_dorsal_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], legs_list, "Normal Legs")
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
userandomjob = sanitize_integer(userandomjob, 0, 1, initial(userandomjob))
|
||||
job_civilian_high = sanitize_integer(job_civilian_high, 0, 65535, initial(job_civilian_high))
|
||||
job_civilian_med = sanitize_integer(job_civilian_med, 0, 65535, initial(job_civilian_med))
|
||||
job_civilian_low = sanitize_integer(job_civilian_low, 0, 65535, initial(job_civilian_low))
|
||||
@@ -450,24 +493,23 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["version"] << SAVEFILE_VERSION_MAX //load_character will sanitize any bad data, so assume up-to-date.
|
||||
|
||||
//Character
|
||||
S["OOC_Notes"] << metadata
|
||||
S["real_name"] << real_name
|
||||
S["name_is_always_random"] << be_random_name
|
||||
S["body_is_always_random"] << be_random_body
|
||||
S["gender"] << gender
|
||||
S["age"] << age
|
||||
S["hair_color"] << hair_color
|
||||
S["facial_hair_color"] << facial_hair_color
|
||||
S["eye_color"] << eye_color
|
||||
S["skin_tone"] << skin_tone
|
||||
S["hair_style_name"] << hair_style
|
||||
S["facial_style_name"] << facial_hair_style
|
||||
S["underwear"] << underwear
|
||||
S["undershirt"] << undershirt
|
||||
S["socks"] << socks
|
||||
S["backbag"] << backbag
|
||||
S["real_name"] << real_name
|
||||
S["name_is_always_random"] << be_random_name
|
||||
S["body_is_always_random"] << be_random_body
|
||||
S["gender"] << gender
|
||||
S["age"] << age
|
||||
S["hair_color"] << hair_color
|
||||
S["facial_hair_color"] << facial_hair_color
|
||||
S["eye_color"] << eye_color
|
||||
S["skin_tone"] << skin_tone
|
||||
S["hair_style_name"] << hair_style
|
||||
S["facial_style_name"] << facial_hair_style
|
||||
S["underwear"] << underwear
|
||||
S["undershirt"] << undershirt
|
||||
S["socks"] << socks
|
||||
S["backbag"] << backbag
|
||||
S["flavor_text"] << flavor_text
|
||||
S["species"] << pref_species.id
|
||||
S["species"] << pref_species.id
|
||||
S["feature_mcolor"] << features["mcolor"]
|
||||
S["feature_mcolor2"] << features["mcolor2"]
|
||||
S["feature_mcolor3"] << features["mcolor3"]
|
||||
@@ -487,7 +529,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["feature_xeno_tail"] << features["xenotail"]
|
||||
S["feature_xeno_dors"] << features["xenodorsal"]
|
||||
S["feature_xeno_head"] << features["xenohead"]
|
||||
S["feature_lizard_legs"] << features["legs"]
|
||||
|
||||
S["clown_name"] << custom_names["clown"]
|
||||
S["mime_name"] << custom_names["mime"]
|
||||
S["ai_name"] << custom_names["ai"]
|
||||
@@ -496,7 +538,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S["deity_name"] << custom_names["deity"]
|
||||
|
||||
//Jobs
|
||||
S["joblessrole"] << joblessrole
|
||||
S["userandomjob"] << userandomjob
|
||||
S["job_civilian_high"] << job_civilian_high
|
||||
S["job_civilian_med"] << job_civilian_med
|
||||
S["job_civilian_low"] << job_civilian_low
|
||||
|
||||
@@ -147,11 +147,11 @@
|
||||
prefs.save_preferences()
|
||||
if(prefs.toggles & SOUND_LOBBY)
|
||||
src << "You will now hear music in the game lobby."
|
||||
if(isnewplayer(mob))
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
else
|
||||
src << "You will no longer hear music in the game lobby."
|
||||
if(isnewplayer(mob))
|
||||
if(istype(mob, /mob/new_player))
|
||||
mob.stopLobbySound()
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -244,7 +244,7 @@ var/global/list/ghost_forms = list("ghost","ghostking","ghostian2","skeleghost",
|
||||
if(new_form)
|
||||
prefs.ghost_form = new_form
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
var/mob/dead/observer/O = mob
|
||||
O.update_icon(new_form)
|
||||
|
||||
@@ -258,7 +258,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
if(new_orbit)
|
||||
prefs.ghost_orbit = new_orbit
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
if(istype(mob, /mob/dead/observer))
|
||||
var/mob/dead/observer/O = mob
|
||||
O.ghost_orbit = new_orbit
|
||||
|
||||
@@ -273,7 +273,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
if("default sprites")
|
||||
prefs.ghost_accs = GHOST_ACCS_NONE
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
if(istype(mob, /mob/dead/observer))
|
||||
var/mob/dead/observer/O = mob
|
||||
O.update_icon()
|
||||
|
||||
@@ -306,7 +306,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
if("White Ghost")
|
||||
prefs.ghost_others = GHOST_OTHERS_SIMPLE
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
if(istype(mob, /mob/dead/observer))
|
||||
var/mob/dead/observer/O = mob
|
||||
O.updateghostsight()
|
||||
|
||||
@@ -334,7 +334,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
|
||||
prefs.ghost_hud = !prefs.ghost_hud
|
||||
src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]."
|
||||
prefs.save_preferences()
|
||||
if(isobserver(mob))
|
||||
if(istype(mob,/mob/dead/observer))
|
||||
mob.hud_used.show_hud()
|
||||
|
||||
/client/verb/toggle_inquisition() // warning: unexpected inquisition
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
/client/verb/ooc(msg as text)
|
||||
set name = "OOC" //Gave this shit a shorter name so you only have to time out "ooc" rather than "ooc message" to use it --NeoFite
|
||||
set category = "OOC"
|
||||
|
||||
if(say_disabled) //This is here to try to identify lag problems
|
||||
usr << "<span class='danger'>Speech is currently admin-disabled.</span>"
|
||||
return
|
||||
|
||||
if(!mob)
|
||||
return
|
||||
|
||||
if(IsGuestKey(key))
|
||||
src << "Guests may not use OOC."
|
||||
return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
var/raw_msg = msg
|
||||
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
msg = emoji_parse(msg)
|
||||
|
||||
if((copytext(msg, 1, 2) in list(".",";",":","#")) || (findtext(lowertext(copytext(msg, 1, 5)), "say")))
|
||||
if(alert("Your message \"[raw_msg]\" looks like it was meant for in game communication, say it in OOC?", "Meant for OOC?", "No", "Yes") != "Yes")
|
||||
return
|
||||
|
||||
if(!(prefs.chat_toggles & CHAT_OOC))
|
||||
src << "<span class='danger'>You have OOC muted.</span>"
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!ooc_allowed)
|
||||
src << "<span class='danger'>OOC is globally muted.</span>"
|
||||
return
|
||||
if(!dooc_allowed && (mob.stat == DEAD))
|
||||
usr << "<span class='danger'>OOC for dead mobs has been turned off.</span>"
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
src << "<span class='danger'>You cannot use OOC (muted).</span>"
|
||||
return
|
||||
if(src.mob)
|
||||
if(jobban_isbanned(src.mob, "OOC"))
|
||||
src << "<span class='danger'>You have been banned from OOC.</span>"
|
||||
return
|
||||
if(handle_spam_prevention(msg,MUTE_OOC))
|
||||
return
|
||||
if(findtext(msg, "byond://"))
|
||||
src << "<B>Advertising other servers is not allowed.</B>"
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
|
||||
log_ooc("[mob.name]/[key] : [raw_msg]")
|
||||
|
||||
var/keyname = key
|
||||
if(prefs.unlock_content)
|
||||
if(prefs.toggles & MEMBER_PUBLIC)
|
||||
keyname = "<font color='[prefs.ooccolor ? prefs.ooccolor : normal_ooc_colour]'><img style='width:9px;height:9px;' class=icon src=\ref['icons/member_content.dmi'] iconstate=blag>[keyname]</font>"
|
||||
|
||||
for(var/client/C in clients)
|
||||
if(C.prefs.chat_toggles & CHAT_OOC)
|
||||
if(holder)
|
||||
if(!holder.fakekey || C.holder)
|
||||
if(check_rights_for(src, R_ADMIN))
|
||||
C << "<span class='adminooc'>[config.allow_admin_ooccolor && prefs.ooccolor ? "<font color=[prefs.ooccolor]>" :"" ]<span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
else
|
||||
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[keyname][holder.fakekey ? "/([holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[holder.fakekey ? holder.fakekey : key]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
else if(!(key in C.prefs.ignoring))
|
||||
C << "<font color='[normal_ooc_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>"
|
||||
|
||||
/proc/toggle_ooc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
if(toggle != ooc_allowed)
|
||||
ooc_allowed = toggle
|
||||
else
|
||||
return
|
||||
else //otherwise just toggle it
|
||||
ooc_allowed = !ooc_allowed
|
||||
world << "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>"
|
||||
|
||||
var/global/normal_ooc_colour = OOC_COLOR
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
set name = "Set Player OOC Color"
|
||||
set desc = "Modifies player OOC Color"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = sanitize_ooccolor(newColor)
|
||||
|
||||
/client/proc/reset_ooc()
|
||||
set name = "Reset Player OOC Color"
|
||||
set desc = "Returns player OOC Color to default"
|
||||
set category = "Fun"
|
||||
normal_ooc_colour = OOC_COLOR
|
||||
|
||||
/client/verb/colorooc()
|
||||
set name = "Set Your OOC Color"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
var/new_ooccolor = input(src, "Please select your OOC color.", "OOC color", prefs.ooccolor) as color|null
|
||||
if(new_ooccolor)
|
||||
prefs.ooccolor = sanitize_ooccolor(new_ooccolor)
|
||||
prefs.save_preferences()
|
||||
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/verb/resetcolorooc()
|
||||
set name = "Reset Your OOC Color"
|
||||
set desc = "Returns your OOC Color to default"
|
||||
set category = "Preferences"
|
||||
|
||||
if(!holder || check_rights_for(src, R_ADMIN))
|
||||
if(!is_content_unlocked())
|
||||
return
|
||||
|
||||
prefs.ooccolor = initial(prefs.ooccolor)
|
||||
prefs.save_preferences()
|
||||
|
||||
//Checks admin notice
|
||||
/client/verb/admin_notice()
|
||||
set name = "Adminnotice"
|
||||
set category = "Admin"
|
||||
set desc ="Check the admin notice if it has been set"
|
||||
|
||||
if(admin_notice)
|
||||
src << "<span class='boldnotice'>Admin Notice:</span>\n \t [admin_notice]"
|
||||
else
|
||||
src << "<span class='notice'>There are no admin notices at the moment.</span>"
|
||||
|
||||
/client/verb/motd()
|
||||
set name = "MOTD"
|
||||
set category = "OOC"
|
||||
set desc ="Check the Message of the Day"
|
||||
|
||||
if(join_motd)
|
||||
src << "<div class=\"motd\">[join_motd]</div>"
|
||||
else
|
||||
src << "<span class='notice'>The Message of the Day has not been set.</span>"
|
||||
|
||||
/client/proc/self_notes()
|
||||
set name = "View Admin Remarks"
|
||||
set category = "OOC"
|
||||
set desc = "View the notes that admins have written about you"
|
||||
|
||||
if(!config.see_own_notes)
|
||||
usr << "<span class='notice'>Sorry, that function is not enabled on this server.</span>"
|
||||
return
|
||||
|
||||
show_note(usr.ckey, null, 1)
|
||||
|
||||
/client/proc/ignore_key(client)
|
||||
var/client/C = client
|
||||
if(C.key in prefs.ignoring)
|
||||
prefs.ignoring -= C.key
|
||||
else
|
||||
prefs.ignoring |= C.key
|
||||
src << "You are [(C.key in prefs.ignoring) ? "now" : "no longer"] ignoring [C.key] on the OOC channel."
|
||||
prefs.save_preferences()
|
||||
|
||||
/client/verb/select_ignore()
|
||||
set name = "Ignore"
|
||||
set category = "OOC"
|
||||
set desc ="Ignore a player's messages on the OOC channel"
|
||||
|
||||
var/selection = input("Please, select a player!", "Ignore", null, null) as null|anything in sortKey(clients)
|
||||
if(!selection)
|
||||
return
|
||||
if(selection == src)
|
||||
src << "You can't ignore yourself."
|
||||
return
|
||||
ignore_key(selection)
|
||||
@@ -1,24 +0,0 @@
|
||||
/client/verb/sethotkeys(from_pref = 0 as num)
|
||||
set name = "Set Hotkeys"
|
||||
set hidden = 1
|
||||
set desc = "Used to set mob-specific hotkeys or load hoykey mode from preferences"
|
||||
|
||||
var/hotkey_default = "default"
|
||||
var/hotkey_macro = "hotkeys"
|
||||
var/current_setting
|
||||
|
||||
var/list/default_macros = list("default", "robot-default")
|
||||
|
||||
if(from_pref)
|
||||
current_setting = (prefs.hotkeys ? hotkey_macro : hotkey_default)
|
||||
else
|
||||
current_setting = winget(src, "mainwindow", "macro")
|
||||
|
||||
if(mob)
|
||||
hotkey_macro = mob.macro_hotkeys
|
||||
hotkey_default = mob.macro_default
|
||||
|
||||
if(current_setting in default_macros)
|
||||
winset(src, null, "mainwindow.macro=[hotkey_default] input.focus=true input.background-color=#d3b5b5")
|
||||
else
|
||||
winset(src, null, "mainwindow.macro=[hotkey_macro] mapwindow.map.focus=true input.background-color=#e0e0e0")
|
||||
@@ -1,174 +0,0 @@
|
||||
/mob/var/suiciding = 0
|
||||
|
||||
/mob/living/carbon/human/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
log_game("[key_name(src)] (job: [job ? "[job]" : "None"]) commited suicide at [get_area(src)].")
|
||||
var/obj/item/held_item = get_active_held_item()
|
||||
if(held_item)
|
||||
var/damagetype = held_item.suicide_act(src)
|
||||
if(damagetype)
|
||||
if(damagetype & SHAME)
|
||||
adjustStaminaLoss(200)
|
||||
suiciding = 0
|
||||
return
|
||||
var/damage_mod = 0
|
||||
for(var/T in list(BRUTELOSS, FIRELOSS, TOXLOSS, OXYLOSS))
|
||||
damage_mod += (T & damagetype) ? 1 : 0
|
||||
damage_mod = max(1, damage_mod)
|
||||
|
||||
//Do 200 damage divided by the number of damage types applied.
|
||||
if(damagetype & BRUTELOSS)
|
||||
adjustBruteLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & FIRELOSS)
|
||||
adjustFireLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & TOXLOSS)
|
||||
adjustToxLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & OXYLOSS)
|
||||
adjustOxyLoss(200/damage_mod)
|
||||
|
||||
//If something went wrong, just do normal oxyloss
|
||||
if(!(damagetype & (BRUTELOSS | FIRELOSS | TOXLOSS | OXYLOSS) ))
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
|
||||
death(0)
|
||||
return
|
||||
|
||||
var/suicide_message = pick("[src] is attempting to bite [p_their()] tongue off! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is jamming [p_their()] thumbs into [p_their()] eye sockets! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is twisting [p_their()] own neck! It looks like [p_theyre()] trying to commit suicide.", \
|
||||
"[src] is holding [p_their()] breath! It looks like [p_theyre()] trying to commit suicide.")
|
||||
|
||||
visible_message("<span class='danger'>[suicide_message]</span>", "<span class='userdanger'>[suicide_message]</span>")
|
||||
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/brain/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src]'s brain is growing dull and lifeless. [p_they(TRUE)] look[p_s()] like [p_theyve()] lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src]'s brain is growing dull and lifeless. [p_they(TRUE)] look[p_s()] like [p_theyve()] lost the will to live.</span>")
|
||||
death(0)
|
||||
|
||||
/mob/living/carbon/monkey/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is attempting to bite [p_their()] tongue. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is attempting to bite [p_their()] tongue. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
adjustOxyLoss(max(200- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/ai/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/robot/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is powering down. It looks like [p_theyre()] trying to commit suicide.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
set category = "pAI Commands"
|
||||
set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)"
|
||||
set name = "pAI Suicide"
|
||||
var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No")
|
||||
if(answer == "Yes")
|
||||
var/turf/T = get_turf(src.loc)
|
||||
T.visible_message("<span class='notice'>[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"</span>", null, \
|
||||
"<span class='notice'>[src] bleeps electronically.</span>")
|
||||
death(0)
|
||||
else
|
||||
src << "Aborting suicide attempt."
|
||||
|
||||
/mob/living/carbon/alien/humanoid/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='userdanger'>[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.</span>", \
|
||||
"<span class='italics'>You hear thrashing.</span>")
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(0)
|
||||
|
||||
/mob/living/simple_animal/verb/suicide()
|
||||
set hidden = 1
|
||||
if(!canSuicide())
|
||||
return
|
||||
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
|
||||
if(!canSuicide())
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
suiciding = 1
|
||||
visible_message("<span class='danger'>[src] begins to fall down. It looks like [p_theyve()] lost the will to live.</span>", \
|
||||
"<span class='userdanger'>[src] begins to fall down. It looks like [p_theyve()] lost the will to live.</span>")
|
||||
death(0)
|
||||
|
||||
|
||||
/mob/living/proc/canSuicide()
|
||||
if(stat == CONSCIOUS)
|
||||
return TRUE
|
||||
else if(stat == DEAD)
|
||||
src << "You're already dead!"
|
||||
else if(stat == UNCONSCIOUS)
|
||||
src << "You need to be conscious to suicide!"
|
||||
return
|
||||
|
||||
/mob/living/carbon/canSuicide()
|
||||
if(!..())
|
||||
return
|
||||
if(!canmove || restrained()) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))"
|
||||
return
|
||||
if(has_brain_worms())
|
||||
src << "You can't bring yourself to commit suicide!"
|
||||
return
|
||||
return TRUE
|
||||
@@ -1,85 +0,0 @@
|
||||
/client/verb/who()
|
||||
set name = "Who"
|
||||
set category = "OOC"
|
||||
|
||||
var/msg = "<b>Current Players:</b>\n"
|
||||
|
||||
var/list/Lines = list()
|
||||
|
||||
if(holder)
|
||||
if (check_rights(R_ADMIN,0) && isobserver(src.mob))//If they have +ADMIN and are a ghost they can see players IC names and statuses.
|
||||
var/mob/dead/observer/G = src.mob
|
||||
if(!G.started_as_observer)//If you aghost to do this, KorPhaeron will deadmin you in your sleep.
|
||||
log_admin("[key_name(usr)] checked advanced who in-round")
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
if (isnewplayer(C.mob))
|
||||
entry += " - <font color='darkgray'><b>In Lobby</b></font>"
|
||||
else
|
||||
entry += " - Playing as [C.mob.real_name]"
|
||||
switch(C.mob.stat)
|
||||
if(UNCONSCIOUS)
|
||||
entry += " - <font color='darkgray'><b>Unconscious</b></font>"
|
||||
if(DEAD)
|
||||
if(isobserver(C.mob))
|
||||
var/mob/dead/observer/O = C.mob
|
||||
if(O.started_as_observer)
|
||||
entry += " - <font color='gray'>Observing</font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
else
|
||||
entry += " - <font color='black'><b>DEAD</b></font>"
|
||||
if(is_special_character(C.mob))
|
||||
entry += " - <b><font color='red'>Antagonist</font></b>"
|
||||
entry += " (<A HREF='?_src_=holder;adminmoreinfo=\ref[C.mob]'>?</A>)"
|
||||
Lines += entry
|
||||
else//If they don't have +ADMIN, only show hidden admins
|
||||
for(var/client/C in clients)
|
||||
var/entry = "\t[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
Lines += entry
|
||||
else
|
||||
for(var/client/C in clients)
|
||||
if(C.holder && C.holder.fakekey)
|
||||
Lines += C.holder.fakekey
|
||||
else
|
||||
Lines += C.key
|
||||
|
||||
for(var/line in sortList(Lines))
|
||||
msg += "[line]\n"
|
||||
|
||||
msg += "<b>Total Players: [length(Lines)]</b>"
|
||||
src << msg
|
||||
|
||||
/client/verb/adminwho()
|
||||
set category = "Admin"
|
||||
set name = "Adminwho"
|
||||
|
||||
var/msg = "<b>Current Admins:</b>\n"
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
msg += "\t[C] is a [C.holder.rank]"
|
||||
|
||||
if(C.holder.fakekey)
|
||||
msg += " <i>(as [C.holder.fakekey])</i>"
|
||||
|
||||
if(isobserver(C.mob))
|
||||
msg += " - Observing"
|
||||
else if(isnewplayer(C.mob))
|
||||
msg += " - Lobby"
|
||||
else
|
||||
msg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += " (AFK)"
|
||||
msg += "\n"
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(!C.holder.fakekey)
|
||||
msg += "\t[C] is a [C.holder.rank]\n"
|
||||
msg += "<span class='info'>Adminhelps are also sent to IRC. If no admins are available in game adminhelp anyways and an admin on IRC will see it and respond.</span>"
|
||||
src << msg
|
||||
|
||||
Reference in New Issue
Block a user