Bleeding edgy refresh (#303)

* not code stuff

* other things

* global vars, defines, helpers

* onclick hud stuff, orphans, world.dm

* controllers and datums

* game folder

* everything not client/mobs in modules

* client folder

* stage 1 mob stuff

* simple animal things

* silicons

* carbon things

* ayylmaos and monkeys

* hyoomahn

* icons n shit

* sprite fixes

* compile fixes

* some fixes I cherrypicked.

* qdel fixes

* forgot brain refractors
This commit is contained in:
Poojawa
2017-03-21 11:44:10 -05:00
committed by GitHub
parent 099a6c8764
commit f67e9f6d87
1476 changed files with 344416 additions and 40694 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ You can set verify to TRUE if you want send() to sleep until the client has the
if(!unreceived || !unreceived.len)
return 0
if (unreceived.len >= ASSET_CACHE_TELL_CLIENT_AMOUNT)
client << "Sending Resources..."
to_chat(client, "Sending Resources...")
for(var/asset in unreceived)
if (asset in SSasset.cache)
client << browse_rsc(SSasset.cache[asset], asset)
+61 -67
View File
@@ -31,7 +31,7 @@
// asset_cache
if(href_list["asset_cache_confirm_arrival"])
//src << "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED."
//to_chat(src, "ASSET JOB [href_list["asset_cache_confirm_arrival"]] ARRIVED.")
var/job = text2num(href_list["asset_cache_confirm_arrival"])
//because we skip the limiter, we have to make sure this is a valid arrival and not somebody tricking us
// into letting append to a list without limit.
@@ -53,8 +53,8 @@
topiclimiter[ADMINSWARNED_AT] = minute
msg += " Administrators have been informed."
log_game("[key_name(src)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
message_admins("[key_name_admin(src)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
src << "<span class='danger'>[msg]</span>"
message_admins("[key_name_admin(src)] [ADMIN_FLW(usr)] [ADMIN_KICK(usr)] Has hit the per-minute topic limit of [config.minutetopiclimit] topic calls in a given game minute")
to_chat(src, "<span class='danger'>[msg]</span>")
return
if (!holder && config.secondtopiclimit)
@@ -66,7 +66,7 @@
topiclimiter[SECOND_COUNT] = 0
topiclimiter[SECOND_COUNT] += 1
if (topiclimiter[SECOND_COUNT] > config.secondtopiclimit)
src << "<span class='danger'>Your previous action was ignored because you've done too many in a second</span>"
to_chat(src, "<span class='danger'>Your previous action was ignored because you've done too many in a second</span>")
return
if(href_list["mentor_msg"])
@@ -79,7 +79,7 @@
//Logs all hrefs
if(config && config.log_hrefs && href_logfile)
href_logfile << "<small>[time2text(world.timeofday,"hh:mm")] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
href_logfile << "<small>[time_stamp(show_ds = TRUE)] [src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]<br>"
// Admin PM
if(href_list["priv_msg"])
@@ -108,7 +108,7 @@
/client/proc/is_content_unlocked()
if(!prefs.unlock_content)
src << "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href='http://www.byond.com/membership'>Click Here to find out more</a>."
to_chat(src, "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href='http://www.byond.com/membership'>Click Here to find out more</a>.")
return 0
return 1
@@ -116,11 +116,11 @@
if(config.automute_on && !holder && src.last_message == message)
src.last_message_count++
if(src.last_message_count >= SPAM_TRIGGER_AUTOMUTE)
src << "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>"
to_chat(src, "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>")
cmd_admin_mute(src, mute_type, 1)
return 1
if(src.last_message_count >= SPAM_TRIGGER_WARNING)
src << "<span class='danger'>You are nearing the spam filter limit for identical messages.</span>"
to_chat(src, "<span class='danger'>You are nearing the spam filter limit for identical messages.</span>")
return 0
else
last_message = message
@@ -130,13 +130,13 @@
//This stops files larger than UPLOAD_LIMIT being sent from client to server via input(), client.Import() etc.
/client/AllowUpload(filename, filelength)
if(filelength > UPLOAD_LIMIT)
src << "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>"
to_chat(src, "<font color='red'>Error: AllowUpload(): File Upload too large. Upload Limit: [UPLOAD_LIMIT/1024]KiB.</font>")
return 0
/* //Don't need this at the moment. But it's here if it's needed later.
//Helps prevent multiple files being uploaded at once. Or right after eachother.
var/time_to_wait = fileaccess_timer - world.time
if(time_to_wait > 0)
src << "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>"
to_chat(src, "<font color='red'>Error: AllowUpload(): Spam prevention. Please wait [round(time_to_wait/10)] seconds.</font>")
return 0
fileaccess_timer = world.time + FTPDELAY */
return 1
@@ -174,15 +174,15 @@ var/next_external_rsc = 0
if(localhost_rank)
var/datum/admins/localhost_holder = new(localhost_rank, ckey)
localhost_holder.associate(src)
if(protected_config.autoadmin)
if(config.autoadmin)
if(!admin_datums[ckey])
var/datum/admin_rank/autorank
for(var/datum/admin_rank/R in admin_ranks)
if(R.name == protected_config.autoadmin_rank)
if(R.name == config.autoadmin_rank)
autorank = R
break
if(!autorank)
world << "Autoadmin rank not found"
to_chat(world, "Autoadmin rank not found")
else
var/datum/admins/D = new(autorank, ckey)
admin_datums[ckey] = D
@@ -197,10 +197,6 @@ var/next_external_rsc = 0
verbs += /client/proc/cmd_mentor_say
verbs += /client/proc/show_mentor_memo
mentors += src
/*
if(check_rights(R_ADMIN))
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)
prefs = preferences_datums[ckey]
@@ -222,30 +218,30 @@ var/next_external_rsc = 0
connection_timeofday = world.timeofday
winset(src, null, "command=\".configure graphics-hwmode on\"")
if (byond_version < config.client_error_version) //Out of date client.
src << "<span class='danger'><b>Your version of byond is too old:</b></span>"
src << config.client_error_message
src << "Your version: [byond_version]"
src << "Required version: [config.client_error_version] or later"
src << "Visit http://www.byond.com/download/ to get the latest version of byond."
to_chat(src, "<span class='danger'><b>Your version of byond is too old:</b></span>")
to_chat(src, config.client_error_message)
to_chat(src, "Your version: [byond_version]")
to_chat(src, "Required version: [config.client_error_version] or later")
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
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"
to_chat(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)
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>"
src << config.client_warn_message
src << "Your version: [byond_version]"
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."
to_chat(src, "<span class='danger'><b>Your version of byond may be getting out of date:</b></span>")
to_chat(src, config.client_warn_message)
to_chat(src, "Your version: [byond_version]")
to_chat(src, "Required version to remove this message: [config.client_warn_version] or later")
to_chat(src, "Visit http://www.byond.com/download/ to get the latest version of byond.")
if (connection == "web" && !holder)
if (!config.allowwebclient)
src << "Web client is disabled"
to_chat(src, "Web client is disabled")
qdel(src)
return 0
if (config.webclientmembersonly && !IsByondMember())
src << "Sorry, but the web client is restricted to byond members only."
to_chat(src, "Sorry, but the web client is restricted to byond members only.")
qdel(src)
return 0
@@ -255,10 +251,10 @@ var/next_external_rsc = 0
if(holder)
add_admin_verbs()
src << get_message_output("memo")
to_chat(src, get_message_output("memo"))
adminGreet()
if((global.comms_key == "default_pwd" || length(global.comms_key) <= 6) && global.comms_allowed) //It's the default value or less than 6 characters long, but it somehow didn't disable comms.
src << "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>"
to_chat(src, "<span class='danger'>The server's API key is either too short or is the default value! Consider changing it immediately!</span>")
if(mentor && !holder)
mentor_memo_output("Show")
@@ -270,9 +266,9 @@ var/next_external_rsc = 0
if (config.panic_bunker && !holder && !(ckey in deadmins))
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."
to_chat(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>"
to_chat(src, "<span class='notice'>Sending you to [config.panic_server_name].</span>")
winset(src, null, "command=.options")
src << link("[config.panic_address]?redirect")
qdel(src)
@@ -281,7 +277,7 @@ var/next_external_rsc = 0
if (config.notify_new_player_age >= 0)
message_admins("New user: [key_name_admin(src)] is connecting here for the first time.")
if (config.irc_first_connection_alert)
send2irc("New-user", "[key_name(src)] is connecting for the first time!")
send2irc_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
player_age = 0 // set it from -1 to 0 so the job selection code doesn't have a panic attack
@@ -303,7 +299,7 @@ var/next_external_rsc = 0
screen += void
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates.
src << "<span class='info'>You have unread updates in the changelog.</span>"
to_chat(src, "<span class='info'>You have unread updates in the changelog.</span>")
if(config.aggressive_changelog)
changelog()
else
@@ -311,14 +307,14 @@ var/next_external_rsc = 0
if(ckey in clientmessages)
for(var/message in clientmessages[ckey])
src << message
to_chat(src, message)
clientmessages.Remove(ckey)
if(config && config.autoconvert_notes)
convert_notes_sql(ckey)
src << get_message_output("message", ckey)
to_chat(src, get_message_output("message", ckey))
if(!winexists(src, "asset_cache_browser")) // The client is using a custom skin, tell them.
src << "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>"
to_chat(src, "<span class='warning'>Unable to access asset cache browser, if you are using a custom skin file, please allow DS to download the updated version, if you are not, then make a bug report. This is not a critical issue but can cause issues with resource downloading, as it is impossible to know when extra resources arrived to you.</span>")
//This is down here because of the browse() calls in tooltip/New()
@@ -355,12 +351,12 @@ var/next_external_rsc = 0
var/sql_ckey = sanitizeSQL(src.ckey)
var/DBQuery/query = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
if (!query.Execute())
var/DBQuery/query_get_client_age = dbcon.NewQuery("SELECT id, datediff(Now(),firstseen) as age FROM [format_table_name("player")] WHERE ckey = '[sql_ckey]'")
if(!query_get_client_age.Execute())
return
while (query.NextRow())
player_age = text2num(query.item[2])
while(query_get_client_age.NextRow())
player_age = text2num(query_get_client_age.item[2])
return
//no match mark it as a first connection for use in client/New()
@@ -376,17 +372,18 @@ var/next_external_rsc = 0
var/sql_ckey = sanitizeSQL(ckey)
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
query_ip.Execute()
var/DBQuery/query_get_ip = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE ip = INET_ATON('[address]') AND ckey != '[sql_ckey]'")
query_get_ip.Execute()
related_accounts_ip = ""
while(query_ip.NextRow())
related_accounts_ip += "[query_ip.item[1]], "
while(query_get_ip.NextRow())
related_accounts_ip += "[query_get_ip.item[1]], "
var/DBQuery/query_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
query_cid.Execute()
var/DBQuery/query_get_cid = dbcon.NewQuery("SELECT ckey FROM [format_table_name("player")] WHERE computerid = '[computer_id]' AND ckey != '[sql_ckey]'")
if(!query_get_cid.Execute())
return
related_accounts_cid = ""
while (query_cid.NextRow())
related_accounts_cid += "[query_cid.item[1]], "
while (query_get_cid.NextRow())
related_accounts_cid += "[query_get_cid.item[1]], "
var/admin_rank = "Player"
if (src.holder && src.holder.rank)
@@ -400,12 +397,14 @@ var/next_external_rsc = 0
var/sql_admin_rank = sanitizeSQL(admin_rank)
var/DBQuery/query_insert = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
query_insert.Execute()
var/DBQuery/query_log_player = dbcon.NewQuery("INSERT INTO [format_table_name("player")] (id, ckey, firstseen, lastseen, ip, computerid, lastadminrank) VALUES (null, '[sql_ckey]', Now(), Now(), INET_ATON('[sql_ip]'), '[sql_computerid]', '[sql_admin_rank]') ON DUPLICATE KEY UPDATE lastseen = VALUES(lastseen), ip = VALUES(ip), computerid = VALUES(computerid), lastadminrank = VALUES(lastadminrank)")
if(!query_log_player.Execute())
return
//Logging player access
var/DBQuery/query_accesslog = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]');")
query_accesslog.Execute()
var/DBQuery/query_log_connection = dbcon.NewQuery("INSERT INTO `[format_table_name("connection_log")]` (`id`,`datetime`,`server_ip`,`server_port`,`ckey`,`ip`,`computerid`) VALUES(null,Now(),INET_ATON('[world.internet_address]'),'[world.port]','[sql_ckey]',INET_ATON('[sql_ip]'),'[sql_computerid]')")
query_log_connection.Execute()
/client/proc/check_randomizer(topic)
. = FALSE
@@ -436,12 +435,12 @@ var/next_external_rsc = 0
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>"
to_chat(src, "<span class='userdanger'>Connection Error:</span>")
to_chat(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("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
send2irc_adminless_only("CidRandomizer", "[key_name(src)] has been detected as using a cid randomizer. Connection rejected.")
cidcheck_failedckeys[ckey] = TRUE
note_randomizer_user()
@@ -452,7 +451,7 @@ var/next_external_rsc = 0
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("CidRandomizer", "[key_name(src)] has been allowed to connect after showing they removed their cid randomizer.")
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>")
@@ -482,7 +481,7 @@ var/next_external_rsc = 0
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>"
to_chat(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"
@@ -490,19 +489,14 @@ var/next_external_rsc = 0
//check to see if we noted them in the last day.
var/DBQuery/query_get_notes = dbcon.NewQuery("SELECT id FROM [format_table_name("messages")] WHERE type = 'note' AND targetckey = '[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 messages table. Error : \[[err]\]\n")
return
if (query_get_notes.NextRow())
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("messages")] WHERE targetckey = '[sql_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")
return
if (query_get_notes.NextRow())
if(query_get_notes.NextRow())
if (query_get_notes.item[1] == adminckey)
return
create_message("note", sql_ckey, adminckey, "Detected as using a cid randomizer.", null, null, 0, 0)
+46 -50
View File
@@ -128,7 +128,6 @@ var/list/preferences_datums = list()
"womb_fluid" = "femcum"
)//MAKE SURE TO UPDATE THE LIST IN MOBS.DM IF YOU'RE GOING TO ADD TO THIS LIST, OTHERWISE THINGS MIGHT GET FUCKEY
var/list/custom_names = list("clown", "mime", "ai", "cyborg", "religion", "deity")
var/prefered_security_department = SEC_DEPT_RANDOM
@@ -149,17 +148,12 @@ var/list/preferences_datums = list()
var/job_engsec_med = 0
var/job_engsec_low = 0
//citadel code
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
// Want randomjob if preferences already filled - Donkie
var/joblessrole = BERANDOMJOB //defaults to 1 for fewer assistants
// 0 = character settings, 1 = game preferences, 2 = character appearance
var/current_tab = 0
var/flavor_text = ""
// OOC Metadata:
var/metadata = ""
@@ -169,10 +163,14 @@ var/list/preferences_datums = list()
var/clientfps = 0
var/parallax = PARALLAX_DISABLE //Starting disabled by default so people stop freaking about about certain issues.
var/parallax
var/uplink_spawn_loc = UPLINK_PDA
//citadel code
var/arousable = TRUE //Allows players to disable arousal from the character creation menu
var/flavor_text = ""
/datum/preferences/New(client/C)
parent = C
custom_names["ai"] = pick(ai_names)
@@ -211,7 +209,6 @@ var/list/preferences_datums = list()
dat += "<a href='?_src_=prefs;preference=tab;tab=2' [current_tab == 2 ? "class='linkOn'" : ""]>Character Appearance</a>"
dat += "<a href='?_src_=prefs;preference=tab;tab=1' [current_tab == 1 ? "class='linkOn'" : ""]>Game Preferences</a>"
if(!path)
dat += "<div class='notice'>Please create an account to save your preferences</div>"
@@ -324,22 +321,23 @@ var/list/preferences_datums = list()
dat += "<b>Ghosts of Others:</b> <a href='?_src_=prefs;task=input;preference=ghostothers'>[button_name]</a><br>"
if (SERVERTOOLS && config.maprotation)
if (config.maprotation)
var/p_map = preferred_map
if (!p_map)
p_map = "Default"
if (config.defaultmap)
p_map += " ([config.defaultmap.friendlyname])"
p_map += " ([config.defaultmap.map_name])"
else
if (p_map in config.maplist)
var/datum/votablemap/VM = config.maplist[p_map]
var/datum/map_config/VM = config.maplist[p_map]
if (!VM)
p_map += " (No longer exists)"
else
p_map = VM.friendlyname
p_map = VM.map_name
else
p_map += " (No longer exists)"
dat += "<b>Preferred Map:</b> <a href='?_src_=prefs;preference=preferred_map;task=input'>[p_map]</a><br>"
if(config.allow_map_voting)
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>"
@@ -514,7 +512,7 @@ var/list/preferences_datums = list()
dat += "<a href='?_src_=prefs;preference=reset_all'>Reset Setup</a>"
dat += "</center>"
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 750)
var/datum/browser/popup = new(user, "preferences", "<div align='center'>Character Setup</div>", 640, 770)
popup.set_content(dat)
popup.open(0)
@@ -715,7 +713,7 @@ var/list/preferences_datums = list()
return
if (!isnum(desiredLvl))
user << "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>"
to_chat(user, "<span class='danger'>UpdateJobPreference - desired level was not a number. Please notify coders!</span>")
ShowChoices(user)
return
@@ -782,10 +780,8 @@ var/list/preferences_datums = list()
if(href_list["jobbancheck"])
var/job = sanitizeSQL(href_list["jobbancheck"])
var/sql_ckey = sanitizeSQL(user.ckey)
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND job = '[job]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)")
if(!query_get_jobban.Execute())
var/err = query_get_jobban.ErrorMsg()
log_game("SQL ERROR obtaining reason from ban table. Error : \[[err]\]\n")
var/DBQuery/query_get_jobban = dbcon.NewQuery("SELECT reason, bantime, duration, expiration_time, a_ckey FROM [format_table_name("ban")] WHERE ckey = '[sql_ckey]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[job]'")
if(!query_get_jobban.warn_execute())
return
if(query_get_jobban.NextRow())
var/reason = query_get_jobban.item[1]
@@ -798,7 +794,7 @@ var/list/preferences_datums = list()
if(text2num(duration) > 0)
text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)"
text += ".</span>"
user << text
to_chat(user, text)
return
if(href_list["preference"] == "job")
@@ -895,7 +891,7 @@ var/list/preferences_datums = list()
if(new_name)
real_name = new_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("age")
var/new_age = input(user, "Choose your character's age:\n([AGE_MIN]-[AGE_MAX])", "Character Preference") as num|null
@@ -997,11 +993,7 @@ var/list/preferences_datums = list()
eye_color = sanitize_hexcolor(new_eyes)
if("species")
/* for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath()
var/list/wlist = S.whitelist
if(S.whitelisted && (wlist.Find(user.ckey) || wlist.Find(user.key) || user.client.holder)) //If your ckey is on the species whitelist or you're an admin:)
roundstart_species[S.id] = S */
var/result = input(user, "Select a species", "Species Selection") as null|anything in roundstart_species
if(result)
@@ -1025,7 +1017,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || 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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("mutant_color2")
var/new_mutantcolor = input(user, "Choose your character's secondary alien/mutant color:", "Character Preference") as color|null
@@ -1036,7 +1028,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || 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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("mutant_color3")
var/new_mutantcolor = input(user, "Choose your character's tertiary alien/mutant color:", "Character Preference") as color|null
@@ -1047,7 +1039,7 @@ var/list/preferences_datums = list()
else if((MUTCOLORS_PARTSONLY in pref_species.species_traits) || 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>"
to_chat(user, "<span class='danger'>Invalid color. Your color is not bright enough.</span>")
if("tail_lizard")
var/new_tail
@@ -1064,7 +1056,6 @@ var/list/preferences_datums = list()
features["tail_human"] = new_tail
if(new_tail != "None")
features["taur"] = "None"
if("mam_tail")
var/new_tail
new_tail = input(user, "Choose your character's tail:", "Character Preference") as null|anything in mam_tails_list
@@ -1184,73 +1175,74 @@ var/list/preferences_datums = list()
if(new_backbag)
backbag = new_backbag
if("uplink_loc")
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
if(new_loc)
uplink_spawn_loc = new_loc
if("clown_name")
var/new_clown_name = reject_bad_name( input(user, "Choose your character's clown name:", "Character Preference") as text|null )
if(new_clown_name)
custom_names["clown"] = new_clown_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("mime_name")
var/new_mime_name = reject_bad_name( input(user, "Choose your character's mime name:", "Character Preference") as text|null )
if(new_mime_name)
custom_names["mime"] = new_mime_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("ai_name")
var/new_ai_name = reject_bad_name( input(user, "Choose your character's AI name:", "Character Preference") as text|null, 1 )
if(new_ai_name)
custom_names["ai"] = new_ai_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
if("cyborg_name")
var/new_cyborg_name = reject_bad_name( input(user, "Choose your character's cyborg name:", "Character Preference") as text|null, 1 )
if(new_cyborg_name)
custom_names["cyborg"] = new_cyborg_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, 0-9, -, ' and .</font>")
if("religion_name")
var/new_religion_name = reject_bad_name( input(user, "Choose your character's religion:", "Character Preference") as text|null )
if(new_religion_name)
custom_names["religion"] = new_religion_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("deity_name")
var/new_deity_name = reject_bad_name( input(user, "Choose your character's deity:", "Character Preference") as text|null )
if(new_deity_name)
custom_names["deity"] = new_deity_name
else
user << "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>"
to_chat(user, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
if("sec_dept")
var/department = input(user, "Choose your prefered security department:", "Security Departments") as null|anything in security_depts_prefs
if(department)
prefered_security_department = department
if("uplink_loc")
var/new_loc = input(user, "Choose your character's traitor uplink spawn location:", "Character Preference") as null|anything in uplink_spawn_loc_list
if(new_loc)
uplink_spawn_loc = new_loc
if ("preferred_map")
var/maplist = list()
var/default = "Default"
if (config.defaultmap)
default += " ([config.defaultmap.friendlyname])"
default += " ([config.defaultmap.map_name])"
for (var/M in config.maplist)
var/datum/votablemap/VM = config.maplist[M]
var/friendlyname = "[VM.friendlyname] "
var/datum/map_config/VM = config.maplist[M]
var/friendlyname = "[VM.map_name] "
if (VM.voteweight <= 0)
friendlyname += " (disabled)"
maplist[friendlyname] = VM.name
maplist[friendlyname] = VM.map_name
maplist[default] = null
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)
@@ -1343,7 +1335,6 @@ var/list/preferences_datums = list()
else
user << "<span class='danger'>Invalid color. Your color is not bright enough.</span>"
else
switch(href_list["preference"])
@@ -1576,16 +1567,18 @@ var/list/preferences_datums = list()
else if(firstspace == name_length)
real_name += "[pick(last_names)]"
//citadel code
character.canbearoused = arousable
character.real_name = real_name
character.name = character.real_name
character.flavor_text = flavor_text
character.gender = gender
character.age = age
character.eye_color = eye_color
var/obj/item/organ/eyes/organ_eyes = character.getorgan(/obj/item/organ/eyes)
if(organ_eyes)
if(!initial(organ_eyes.eye_color))
organ_eyes.eye_color = eye_color
organ_eyes.old_eye_color = eye_color
character.hair_color = hair_color
character.facial_hair_color = facial_hair_color
@@ -1606,10 +1599,13 @@ var/list/preferences_datums = list()
else
chosen_species = /datum/species/human
character.set_species(chosen_species, icon_update=0)
//citadel code
character.give_genitals()
character.flavor_text = flavor_text
character.canbearoused = arousable
if(icon_updates)
character.update_body()
character.update_hair()
character.update_body_parts()
character.update_body_parts()
+84 -74
View File
@@ -8,11 +8,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
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.
*/
@@ -273,7 +276,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//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
@@ -290,16 +292,46 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["socks"] >> socks
S["backbag"] >> backbag
S["uplink_loc"] >> uplink_spawn_loc
S["feature_exhibitionist"] >> features["exhibitionist"]
S["feature_mcolor"] >> features["mcolor"]
S["feature_mcolor2"] >> features["mcolor2"]
S["feature_mcolor3"] >> features["mcolor3"]
S["feature_lizard_tail"] >> features["tail_lizard"]
S["feature_lizard_snout"] >> features["snout"]
S["feature_lizard_horns"] >> features["horns"]
S["feature_lizard_frills"] >> features["frills"]
S["feature_lizard_spines"] >> features["spines"]
S["feature_lizard_body_markings"] >> features["body_markings"]
S["feature_lizard_legs"] >> features["legs"]
if(!config.mutant_humans)
features["tail_human"] = "none"
features["ears"] = "none"
else
S["feature_human_tail"] >> features["tail_human"]
S["feature_human_ears"] >> features["ears"]
S["clown_name"] >> custom_names["clown"]
S["mime_name"] >> custom_names["mime"]
S["ai_name"] >> custom_names["ai"]
S["cyborg_name"] >> custom_names["cyborg"]
S["religion_name"] >> custom_names["religion"]
S["deity_name"] >> custom_names["deity"]
S["prefered_security_department"] >> prefered_security_department
//Jobs
S["joblessrole"] >> joblessrole
S["job_civilian_high"] >> job_civilian_high
S["job_civilian_med"] >> job_civilian_med
S["job_civilian_low"] >> job_civilian_low
S["job_medsci_high"] >> job_medsci_high
S["job_medsci_med"] >> job_medsci_med
S["job_medsci_low"] >> job_medsci_low
S["job_engsec_high"] >> job_engsec_high
S["job_engsec_med"] >> job_engsec_med
S["job_engsec_low"] >> job_engsec_low
//Citadel code
S["flavor_text"] >> flavor_text
S["feature_exhibitionist"] >> features["exhibitionist"]
S["feature_mcolor2"] >> features["mcolor2"]
S["feature_mcolor3"] >> features["mcolor3"]
S["feature_mam_body_markings"] >> features["mam_body_markings"]
S["feature_mam_tail"] >> features["mam_tail"]
S["feature_mam_ears"] >> features["mam_ears"]
@@ -309,7 +341,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"]
//cock features
S["feature_has_cock"] >> features["has_cock"]
S["feature_cock_shape"] >> features["cock_shape"]
@@ -331,47 +362,16 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//vagina features
S["feature_has_vag"] >> features["has_vag"]
S["feature_vag_color"] >> features["vag_color"]
if(!config.mutant_humans)
features["tail_human"] = "none"
features["ears"] = "none"
else
S["feature_human_tail"] >> features["tail_human"]
S["feature_human_ears"] >> features["ears"]
S["clown_name"] >> custom_names["clown"]
S["mime_name"] >> custom_names["mime"]
S["ai_name"] >> custom_names["ai"]
S["cyborg_name"] >> custom_names["cyborg"]
S["religion_name"] >> custom_names["religion"]
S["deity_name"] >> custom_names["deity"]
S["prefered_security_department"] >> prefered_security_department
//Jobs
S["joblessrole"] >> joblessrole
S["job_civilian_high"] >> job_civilian_high
S["job_civilian_med"] >> job_civilian_med
S["job_civilian_low"] >> job_civilian_low
S["job_medsci_high"] >> job_medsci_high
S["job_medsci_med"] >> job_medsci_med
S["job_medsci_low"] >> job_medsci_low
S["job_engsec_high"] >> job_engsec_high
S["job_engsec_med"] >> job_engsec_med
S["job_engsec_low"] >> job_engsec_low
//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)
//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")
if(!features["mcolor2"] || features["mcolor"] == "#000")
features["mcolor2"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
if(!features["mcolor3"] || features["mcolor"] == "#000")
features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
if(!real_name)
real_name = random_unique_name(gender)
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
@@ -399,8 +399,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
backbag = sanitize_inlist(backbag, backbaglist, initial(backbag))
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, uplink_spawn_loc_list, initial(uplink_spawn_loc))
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], tails_list_lizard)
features["tail_human"] = sanitize_inlist(features["tail_human"], tails_list_human, "None")
features["snout"] = sanitize_inlist(features["snout"], snouts_list)
@@ -409,6 +407,27 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["frills"] = sanitize_inlist(features["frills"], frills_list)
features["spines"] = sanitize_inlist(features["spines"], spines_list)
features["body_markings"] = sanitize_inlist(features["body_markings"], body_markings_list)
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], legs_list, "Normal Legs")
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
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))
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
//Citadel
flavor_text = sanitize_text(flavor_text, initial(flavor_text))
if(!features["mcolor2"] || features["mcolor"] == "#000")
features["mcolor2"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
if(!features["mcolor3"] || features["mcolor"] == "#000")
features["mcolor3"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
features["mcolor2"] = sanitize_hexcolor(features["mcolor2"], 3, 0)
features["mcolor3"] = sanitize_hexcolor(features["mcolor3"], 3, 0)
features["mam_body_markings"] = sanitize_inlist(features["mam_body_markings"], mam_body_markings_list)
features["mam_ears"] = sanitize_inlist(features["mam_ears"], mam_ears_list)
features["mam_tail"] = sanitize_inlist(features["mam_tail"], mam_tails_list)
@@ -417,7 +436,6 @@ 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")
//cock features
features["has_cock"] = sanitize_integer(features["has_cock"], 0, 1, 0)
features["cock_shape"] = sanitize_inlist(features["cock_shape"], cock_shapes_list, "Human")
@@ -438,16 +456,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["has_vag"] = sanitize_integer(features["has_vag"], 0, 1, 0)
features["vag_color"] = sanitize_hexcolor(features["vag_color"], 3, 0)
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
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))
job_medsci_high = sanitize_integer(job_medsci_high, 0, 65535, initial(job_medsci_high))
job_medsci_med = sanitize_integer(job_medsci_med, 0, 65535, initial(job_medsci_med))
job_medsci_low = sanitize_integer(job_medsci_low, 0, 65535, initial(job_medsci_low))
job_engsec_high = sanitize_integer(job_engsec_high, 0, 65535, initial(job_engsec_high))
job_engsec_med = sanitize_integer(job_engsec_med, 0, 65535, initial(job_engsec_med))
job_engsec_low = sanitize_integer(job_engsec_low, 0, 65535, initial(job_engsec_low))
return 1
@@ -479,12 +487,8 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["socks"] << socks
S["backbag"] << backbag
S["uplink_loc"] << uplink_spawn_loc
S["flavor_text"] << flavor_text
S["species"] << pref_species.id
S["feature_exhibitionist"] << features["exhibitionist"]
S["feature_mcolor"] << features["mcolor"]
S["feature_mcolor2"] << features["mcolor2"]
S["feature_mcolor3"] << features["mcolor3"]
S["feature_lizard_tail"] << features["tail_lizard"]
S["feature_human_tail"] << features["tail_human"]
S["feature_lizard_snout"] << features["snout"]
@@ -493,6 +497,32 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_lizard_frills"] << features["frills"]
S["feature_lizard_spines"] << features["spines"]
S["feature_lizard_body_markings"] << features["body_markings"]
S["feature_lizard_legs"] << features["legs"]
S["clown_name"] << custom_names["clown"]
S["mime_name"] << custom_names["mime"]
S["ai_name"] << custom_names["ai"]
S["cyborg_name"] << custom_names["cyborg"]
S["religion_name"] << custom_names["religion"]
S["deity_name"] << custom_names["deity"]
S["prefered_security_department"] << prefered_security_department
//Jobs
S["joblessrole"] << joblessrole
S["job_civilian_high"] << job_civilian_high
S["job_civilian_med"] << job_civilian_med
S["job_civilian_low"] << job_civilian_low
S["job_medsci_high"] << job_medsci_high
S["job_medsci_med"] << job_medsci_med
S["job_medsci_low"] << job_medsci_low
S["job_engsec_high"] << job_engsec_high
S["job_engsec_med"] << job_engsec_med
S["job_engsec_low"] << job_engsec_low
//Citadel
S["flavor_text"] << flavor_text
S["feature_exhibitionist"] << features["exhibitionist"]
S["feature_mcolor2"] << features["mcolor2"]
S["feature_mcolor3"] << features["mcolor3"]
S["feature_mam_body_markings"] << features["mam_body_markings"]
S["feature_mam_tail"] << features["mam_tail"]
S["feature_mam_ears"] << features["mam_ears"]
@@ -502,14 +532,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"]
S["clown_name"] << custom_names["clown"]
S["mime_name"] << custom_names["mime"]
S["ai_name"] << custom_names["ai"]
S["cyborg_name"] << custom_names["cyborg"]
S["religion_name"] << custom_names["religion"]
S["deity_name"] << custom_names["deity"]
S["prefered_security_department"] << prefered_security_department
//cock features
S["feature_has_cock"] << features["has_cock"]
S["feature_cock_shape"] << features["cock_shape"]
@@ -532,18 +554,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_has_vag"] << features["has_vag"]
S["feature_vag_color"] << features["vag_color"]
//Jobs
S["joblessrole"] << joblessrole
S["job_civilian_high"] << job_civilian_high
S["job_civilian_med"] << job_civilian_med
S["job_civilian_low"] << job_civilian_low
S["job_medsci_high"] << job_medsci_high
S["job_medsci_med"] << job_medsci_med
S["job_medsci_low"] << job_medsci_low
S["job_engsec_high"] << job_engsec_high
S["job_engsec_med"] << job_engsec_med
S["job_engsec_low"] << job_engsec_low
return 1
#undef SAVEFILE_VERSION_MAX
@@ -559,4 +569,4 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
/client/verb/savefile_import(path as text)
var/savefile/S = new /savefile(path)
S.ImportText("/",file("[path].txt"))
*/
*/
+33 -37
View File
@@ -4,7 +4,7 @@
set category = "Preferences"
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
prefs.chat_toggles ^= CHAT_GHOSTEARS
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"]."
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -13,7 +13,7 @@
set category = "Preferences"
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
prefs.chat_toggles ^= CHAT_GHOSTSIGHT
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"]."
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -22,7 +22,7 @@
set category = "Preferences"
set desc = ".Toggle between hearing all whispers, and only whispers of nearby mobs"
prefs.chat_toggles ^= CHAT_GHOSTWHISPER
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"]."
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTWHISPER) ? "see all whispers in the world" : "only see whispers from nearby mobs"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TGW") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -31,7 +31,7 @@
set category = "Preferences"
set desc = ".Enable or disable hearing radio chatter as a ghost"
prefs.chat_toggles ^= CHAT_GHOSTRADIO
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"]."
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTRADIO) ? "see radio chatter" : "not see radio chatter"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TGR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //social experiment, increase the generation whenever you copypaste this shamelessly GENERATION 1
@@ -40,7 +40,7 @@
set category = "Preferences"
set desc = ".Toggle Between seeing all mob pda messages, and only pda messages of nearby mobs"
prefs.chat_toggles ^= CHAT_GHOSTPDA
src << "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"]."
to_chat(src, "As a ghost, you will now [(prefs.chat_toggles & CHAT_GHOSTPDA) ? "see all pda messages in the world" : "only see pda messages from nearby mobs"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TGP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -51,7 +51,7 @@
if(!holder) return
prefs.chat_toggles ^= CHAT_RADIO
prefs.save_preferences()
usr << "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby radios or speakers"
to_chat(usr, "You will [(prefs.chat_toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from nearby 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_deathrattle()
@@ -61,9 +61,7 @@
die."
prefs.toggles ^= DISABLE_DEATHRATTLE
prefs.save_preferences()
usr << "You will \
[(prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get \
messages when a sentient mob dies."
to_chat(usr, "You will [(prefs.toggles & DISABLE_DEATHRATTLE) ? "no longer" : "now"] get messages when a sentient mob dies.")
feedback_add_details("admin_verb", "TDR") // If you are copy-pasting this, maybe you should spend some time reading the comments.
/client/verb/toggle_arrivalrattle()
@@ -72,9 +70,7 @@
set desc = "Toggle recieving a message in deadchat when someone joins \
the station."
prefs.toggles ^= DISABLE_ARRIVALRATTLE
usr << "You will \
[(prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get \
messages when someone joins the station."
to_chat(usr, "You will [(prefs.toggles & DISABLE_ARRIVALRATTLE) ? "no longer" : "now"] get messages when someone joins the station.")
prefs.save_preferences()
feedback_add_details("admin_verb", "TAR") // If you are copy-pasting this, maybe you should rethink where your life went so wrong.
@@ -86,7 +82,7 @@
return
prefs.toggles ^= SOUND_ADMINHELP
prefs.save_preferences()
usr << "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive."
to_chat(usr, "You will [(prefs.toggles & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")
feedback_add_details("admin_verb","AHS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggleannouncelogin()
@@ -97,7 +93,7 @@
return
prefs.toggles ^= ANNOUNCE_LOGIN
prefs.save_preferences()
usr << "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login."
to_chat(usr, "You will [(prefs.toggles & ANNOUNCE_LOGIN) ? "now" : "no longer"] have an announcement to other admins when you login.")
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/deadchat()
@@ -106,7 +102,7 @@
set desc ="Toggles seeing deadchat"
prefs.chat_toggles ^= CHAT_DEAD
prefs.save_preferences()
src << "You will [(prefs.chat_toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat."
to_chat(src, "You will [(prefs.chat_toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
feedback_add_details("admin_verb","TDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/toggleprayers()
@@ -115,7 +111,7 @@
set desc = "Toggles seeing prayers"
prefs.chat_toggles ^= CHAT_PRAYER
prefs.save_preferences()
src << "You will [(prefs.chat_toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat."
to_chat(src, "You will [(prefs.chat_toggles & CHAT_PRAYER) ? "now" : "no longer"] see prayerchat.")
feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggleprayersounds()
@@ -125,9 +121,9 @@
prefs.toggles ^= SOUND_PRAYERS
prefs.save_preferences()
if(prefs.toggles & SOUND_PRAYERS)
src << "You will now hear prayer sounds."
to_chat(src, "You will now hear prayer sounds.")
else
src << "You will no longer prayer sounds."
to_chat(src, "You will no longer prayer sounds.")
feedback_add_details("admin_verb", "PSounds")
/client/verb/togglemidroundantag()
@@ -136,7 +132,7 @@
set desc = "Toggles whether or not you will be considered for antagonist status given during a round."
prefs.toggles ^= MIDROUND_ANTAG
prefs.save_preferences()
src << "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions."
to_chat(src, "You will [(prefs.toggles & MIDROUND_ANTAG) ? "now" : "no longer"] be considered for midround antagonist positions.")
feedback_add_details("admin_verb","TMidroundA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/toggletitlemusic()
@@ -146,11 +142,11 @@
prefs.toggles ^= SOUND_LOBBY
prefs.save_preferences()
if(prefs.toggles & SOUND_LOBBY)
src << "You will now hear music in the game lobby."
to_chat(src, "You will now hear music in the game lobby.")
if(isnewplayer(mob))
playtitlemusic()
else
src << "You will no longer hear music in the game lobby."
to_chat(src, "You will no longer hear music in the game lobby.")
if(isnewplayer(mob))
mob.stopLobbySound()
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -162,14 +158,14 @@
prefs.toggles ^= SOUND_MIDI
prefs.save_preferences()
if(prefs.toggles & SOUND_MIDI)
src << "You will now hear any sounds uploaded by admins."
to_chat(src, "You will now hear any sounds uploaded by admins.")
if(admin_sound)
src << admin_sound
to_chat(src, admin_sound)
else
src << "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled."
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
if(admin_sound && !(admin_sound.status & SOUND_PAUSED))
admin_sound.status |= SOUND_PAUSED
src << admin_sound
to_chat(src, admin_sound)
admin_sound.status ^= SOUND_PAUSED
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -186,7 +182,7 @@
set desc = "Toggles seeing OutOfCharacter chat"
prefs.chat_toggles ^= CHAT_OOC
prefs.save_preferences()
src << "You will [(prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel."
to_chat(src, "You will [(prefs.chat_toggles & CHAT_OOC) ? "now" : "no longer"] see messages on the OOC channel.")
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/verb/Toggle_Soundscape() //All new ambience should be added here so it works with this verb until someone better at things comes up with a fix that isn't awful
@@ -196,9 +192,9 @@
prefs.toggles ^= SOUND_AMBIENCE
prefs.save_preferences()
if(prefs.toggles & SOUND_AMBIENCE)
src << "You will now hear ambient sounds."
to_chat(src, "You will now hear ambient sounds.")
else
src << "You will no longer hear ambient sounds."
to_chat(src, "You will no longer hear ambient sounds.")
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -211,9 +207,9 @@
prefs.toggles ^= SOUND_INSTRUMENTS
prefs.save_preferences()
if(prefs.toggles & SOUND_INSTRUMENTS)
src << "You will now hear people playing musical instruments."
to_chat(src, "You will now hear people playing musical instruments.")
else
src << "You will no longer hear musical instruments."
to_chat(src, "You will no longer hear musical instruments.")
feedback_add_details("admin_verb","TInstru") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//Lots of people get headaches from the normal ship ambience, this is to prevent that
@@ -224,9 +220,9 @@
prefs.toggles ^= SOUND_SHIP_AMBIENCE
prefs.save_preferences()
if(prefs.toggles & SOUND_SHIP_AMBIENCE)
src << "You will now hear ship ambience."
to_chat(src, "You will now hear ship ambience.")
else
src << "You will no longer hear ship ambience."
to_chat(src, "You will no longer hear ship ambience.")
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 2)
src.ambience_playing = 0
feedback_add_details("admin_verb", "SAmbi") //If you are copy-pasting this, I bet you read this comment expecting to see the same thing :^)
@@ -315,7 +311,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set category = "Preferences"
set desc = "Toggle between directly clicking the desired intent or clicking to rotate through."
prefs.toggles ^= INTENT_STYLE
src << "[(prefs.toggles & INTENT_STYLE) ? "Clicking directly on intents selects them." : "Clicking on intents rotates selection clockwise."]"
to_chat(src, "[(prefs.toggles & INTENT_STYLE) ? "Clicking directly on intents selects them." : "Clicking on intents rotates selection clockwise."]")
prefs.save_preferences()
feedback_add_details("admin_verb","ITENTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -332,7 +328,7 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
set desc = "Hide/Show Ghost HUD"
prefs.ghost_hud = !prefs.ghost_hud
src << "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"]."
to_chat(src, "Ghost HUD will now be [prefs.ghost_hud ? "visible" : "hidden"].")
prefs.save_preferences()
if(isobserver(mob))
mob.hud_used.show_hud()
@@ -345,15 +341,15 @@ var/global/list/ghost_orbits = list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
prefs.inquisitive_ghost = !prefs.inquisitive_ghost
prefs.save_preferences()
if(prefs.inquisitive_ghost)
src << "<span class='notice'>You will now examine everything you click on.</span>"
to_chat(src, "<span class='notice'>You will now examine everything you click on.</span>")
else
src << "<span class='notice'>You will no longer examine things you click on.</span>"
to_chat(src, "<span class='notice'>You will no longer examine things you click on.</span>")
/client/verb/toggle_announcement_sound()
set name = "Hear/Silence Announcements"
set category = "Preferences"
set desc = ".Toggles hearing Central Command, Captain, VOX, and other announcement sounds"
prefs.toggles ^= SOUND_ANNOUNCEMENTS
src << "You will now [(prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"]."
to_chat(src, "You will now [(prefs.toggles & SOUND_ANNOUNCEMENTS) ? "hear announcement sounds" : "no longer hear announcements"].")
prefs.save_preferences()
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+21 -24
View File
@@ -3,14 +3,14 @@
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>"
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
return
if(!mob)
return
if(IsGuestKey(key))
src << "Guests may not use OOC."
to_chat(src, "Guests may not use OOC.")
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
@@ -26,32 +26,33 @@
return
if(!(prefs.chat_toggles & CHAT_OOC))
src << "<span class='danger'>You have OOC muted.</span>"
to_chat(src, "<span class='danger'>You have OOC muted.</span>")
return
if(!holder)
if(!ooc_allowed)
src << "<span class='danger'>OOC is globally muted.</span>"
to_chat(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>"
to_chat(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>"
to_chat(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>"
to_chat(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>"
to_chat(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]")
mob.log_message("[key]: [raw_msg]", INDIVIDUAL_OOC_LOG)
var/keyname = key
if(prefs.unlock_content)
@@ -63,17 +64,13 @@
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>"
to_chat(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>"
to_chat(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(check_mentor()) //mentors
C << "<font color='#FF3E96'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[keyname]:</EM> <span class='message'>[msg]</span></span></font>"
to_chat(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>"
to_chat(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
@@ -83,7 +80,7 @@
return
else //otherwise just toggle it
ooc_allowed = !ooc_allowed
world << "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>"
to_chat(world, "<B>The OOC channel has been globally [ooc_allowed ? "enabled" : "disabled"].</B>")
var/global/normal_ooc_colour = OOC_COLOR
@@ -133,9 +130,9 @@ var/global/normal_ooc_colour = OOC_COLOR
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]"
to_chat(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>"
to_chat(src, "<span class='notice'>There are no admin notices at the moment.</span>")
/client/verb/motd()
set name = "MOTD"
@@ -143,9 +140,9 @@ var/global/normal_ooc_colour = OOC_COLOR
set desc ="Check the Message of the Day"
if(join_motd)
src << "<div class=\"motd\">[join_motd]</div>"
to_chat(src, "<div class=\"motd\">[join_motd]</div>")
else
src << "<span class='notice'>The Message of the Day has not been set.</span>"
to_chat(src, "<span class='notice'>The Message of the Day has not been set.</span>")
/client/proc/self_notes()
set name = "View Admin Remarks"
@@ -153,7 +150,7 @@ var/global/normal_ooc_colour = OOC_COLOR
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>"
to_chat(usr, "<span class='notice'>Sorry, that function is not enabled on this server.</span>")
return
browse_messages(null, usr.ckey, null, 1)
@@ -164,7 +161,7 @@ var/global/normal_ooc_colour = OOC_COLOR
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."
to_chat(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()
@@ -176,6 +173,6 @@ var/global/normal_ooc_colour = OOC_COLOR
if(!selection)
return
if(selection == src)
src << "You can't ignore yourself."
to_chat(src, "You can't ignore yourself.")
return
ignore_key(selection)
+1 -1
View File
@@ -14,7 +14,7 @@
/client/verb/display_ping(time as num)
set instant = TRUE
set name = ".display_ping"
src << "<span class='notice'>Round trip ping took [round(pingfromtime(time),1)]ms</span>"
to_chat(src, "<span class='notice'>Round trip ping took [round(pingfromtime(time),1)]ms</span>")
/client/verb/ping()
set name = "Ping"
+6 -6
View File
@@ -2,7 +2,7 @@
/mob/living/carbon/human/verb/suicide()
set hidden = 1
return
return // H U G B O X
if(!canSuicide())
return
var/oldkey = ckey
@@ -126,7 +126,7 @@
"<span class='notice'>[src] bleeps electronically.</span>")
death(0)
else
src << "Aborting suicide attempt."
to_chat(src, "Aborting suicide attempt.")
/mob/living/carbon/alien/humanoid/verb/suicide()
set hidden = 1
@@ -162,18 +162,18 @@
if(stat == CONSCIOUS)
return TRUE
else if(stat == DEAD)
src << "You're already dead!"
to_chat(src, "You're already dead!")
else if(stat == UNCONSCIOUS)
src << "You need to be conscious to suicide!"
to_chat(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.))"
to_chat(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!"
to_chat(src, "You can't bring yourself to commit suicide!")
return
return TRUE
+50 -56
View File
@@ -2,65 +2,59 @@
set name = "Who"
set category = "OOC"
var/msg = ""
var/msg = "<b>Current Players:</b>\n"
var/list/Lines = list()
if(length(admins) > 0)
Lines += "<b>Admins:</b>"
for(var/client/C in sortList(admins))
if(!C.holder.fakekey)
Lines += "\t <font color='#FF0000'>[C.key]</font>[show_info(C)]"
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>)"
entry += " ([round(C.avgping, 1)]ms)"
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>"
entry += " ([round(C.avgping, 1)]ms)"
Lines += entry
else
for(var/client/C in clients)
if(C.holder && C.holder.fakekey)
Lines += "[C.holder.fakekey] ([round(C.avgping, 1)]ms)"
else
Lines += "[C.key] ([round(C.avgping, 1)]ms)"
if(length(mentors) > 0)
Lines += "<b>Mentors:</b>"
for(var/client/C in sortList(clients))
var/mentor = mentor_datums[C.ckey]
if(mentor)
Lines += "\t <font color='#0033CC'>[C.key]</font>[show_info(C)]"
Lines += "<b>Players:</b>"
for(var/client/C in sortList(clients))
if(!check_mentor_other(C) || (C.holder && C.holder.fakekey))
Lines += "\t [C.key][show_info(C)]"
for(var/line in Lines)
for(var/line in sortList(Lines))
msg += "[line]\n"
msg += "<b>Total Players: [length(Lines)]</b>"
src << msg
/client/proc/show_info(var/client/C)
if(!C)
return ""
if(!src.holder)
return ""
var/entry = ""
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>)"
entry += " ([round(C.avgping, 1)]ms)"
return entry
to_chat(src, msg)
/client/verb/adminwho()
set category = "Admin"
@@ -90,8 +84,8 @@
continue //Don't show afk admins to adminwho
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
msg += "<span class='info'>Adminhelps are also sent to Discord. If no admins are available in game adminhelp anyways and an admin on Discord will see it and respond.</span>"
to_chat(src, msg)
/client/verb/mentorwho()
set category = "Mentor"
@@ -102,7 +96,7 @@
if(holder)
if(isobserver(C.mob))
suffix += " - Observing"
else if(istype(C.mob,/mob/new_player))
else if(istype(C.mob,/mob/dead/new_player))
suffix += " - Lobby"
else
suffix += " - Playing"
@@ -110,4 +104,4 @@
if(C.is_afk())
suffix += " (AFK)"
msg += "\t[C][suffix]\n"
src << msg
to_chat(src, msg)