mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
[MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines * a Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Mothblocks
Gandalf2k15
parent
7635f198f4
commit
b332b46b65
@@ -1,8 +1,8 @@
|
||||
////////////
|
||||
//SECURITY//
|
||||
////////////
|
||||
#define UPLOAD_LIMIT 524288 //Restricts client uploads to the server to 0.5MB
|
||||
#define UPLOAD_LIMIT_ADMIN 2621440 //Restricts admin client uploads to the server to 2.5MB
|
||||
#define UPLOAD_LIMIT 524288 //Restricts client uploads to the server to 0.5MB
|
||||
#define UPLOAD_LIMIT_ADMIN 2621440 //Restricts admin client uploads to the server to 2.5MB
|
||||
|
||||
GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
"1407" = "bug preventing client display overrides from working leads to clients being able to see things/mobs they shouldn't be able to see",
|
||||
@@ -11,12 +11,12 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
))
|
||||
|
||||
#define LIMITER_SIZE 5
|
||||
#define CURRENT_SECOND 1
|
||||
#define SECOND_COUNT 2
|
||||
#define CURRENT_MINUTE 3
|
||||
#define MINUTE_COUNT 4
|
||||
#define ADMINSWARNED_AT 5
|
||||
#define LIMITER_SIZE 5
|
||||
#define CURRENT_SECOND 1
|
||||
#define SECOND_COUNT 2
|
||||
#define CURRENT_MINUTE 3
|
||||
#define MINUTE_COUNT 4
|
||||
#define ADMINSWARNED_AT 5
|
||||
/*
|
||||
When somebody clicks a link in game, this Topic is called first.
|
||||
It does the stuff in this proc and then is redirected to the Topic() proc for the src=[0xWhatever]
|
||||
@@ -34,7 +34,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
*/
|
||||
|
||||
/client/Topic(href, href_list, hsrc)
|
||||
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
|
||||
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
|
||||
return
|
||||
//SKYRAT EDIT ADDITION BEGIN - MENTOR
|
||||
if(mentor_client_procs(href_list))
|
||||
@@ -128,7 +128,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(QDELETED(real_src))
|
||||
return
|
||||
|
||||
..() //redirect to hsrc.Topic()
|
||||
..() //redirect to hsrc.Topic()
|
||||
|
||||
/client/proc/is_content_unlocked()
|
||||
if(!prefs.unlock_content)
|
||||
@@ -204,7 +204,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
/client/New(TopicData)
|
||||
var/tdata = TopicData //save this for later use
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
TopicData = null //Prevent calls to client.Topic from connect
|
||||
|
||||
if(connection != "seeker" && connection != "web")//Invalid connection type.
|
||||
return null
|
||||
@@ -252,8 +252,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
else
|
||||
prefs = new /datum/preferences(src)
|
||||
GLOB.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
|
||||
prefs.last_ip = address //these are gonna be used for banning
|
||||
prefs.last_id = computer_id //these are gonna be used for banning
|
||||
fps = (prefs.clientfps < 0) ? RECOMMENDED_FPS : prefs.clientfps
|
||||
|
||||
if(fexists(roundend_report_file()))
|
||||
@@ -298,7 +298,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
GLOB.player_details[ckey] = player_details
|
||||
|
||||
|
||||
. = ..() //calls mob.Login()
|
||||
. = ..() //calls mob.Login()
|
||||
if (length(GLOB.stickybanadminexemptions))
|
||||
GLOB.stickybanadminexemptions -= ckey
|
||||
if (!length(GLOB.stickybanadminexemptions))
|
||||
@@ -341,7 +341,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
var/cev = CONFIG_GET(number/client_error_version)
|
||||
var/ceb = CONFIG_GET(number/client_error_build)
|
||||
var/cwv = CONFIG_GET(number/client_warn_version)
|
||||
if (byond_version < cev || (byond_version == cev && byond_build < ceb)) //Out of date client.
|
||||
if (byond_version < cev || (byond_version == cev && byond_build < ceb)) //Out of date client.
|
||||
to_chat(src, "<span class='danger'><b>Your version of BYOND is too old:</b></span>")
|
||||
to_chat(src, CONFIG_GET(string/client_error_message))
|
||||
to_chat(src, "Your version: [byond_version].[byond_build]")
|
||||
@@ -352,7 +352,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
else
|
||||
qdel(src)
|
||||
return
|
||||
else if (byond_version < cwv) //We have words for this client.
|
||||
else if (byond_version < cwv) //We have words for this client.
|
||||
if(CONFIG_GET(flag/client_warn_popup))
|
||||
var/msg = "<b>Your version of byond may be getting out of date:</b><br>"
|
||||
msg += CONFIG_GET(string/client_warn_message) + "<br><br>"
|
||||
@@ -1046,11 +1046,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
|
||||
///Redirect proc that makes it easier to call the unlock achievement proc. Achievement type is the typepath to the award, user is the mob getting the award, and value is an optional variable used for leaderboard value increments
|
||||
/client/proc/give_award(achievement_type, mob/user, value = 1)
|
||||
return player_details.achievements.unlock(achievement_type, user, value)
|
||||
return player_details.achievements.unlock(achievement_type, user, value)
|
||||
|
||||
///Redirect proc that makes it easier to get the status of an achievement. Achievement type is the typepath to the award.
|
||||
/client/proc/get_award_status(achievement_type, mob/user, value = 1)
|
||||
return player_details.achievements.get_achievement_status(achievement_type)
|
||||
return player_details.achievements.get_achievement_status(achievement_type)
|
||||
|
||||
///Gives someone hearted status for OOC, from behavior commendations
|
||||
/client/proc/adjust_heart(duration = 24 HOURS)
|
||||
|
||||
@@ -6,7 +6,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
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
|
||||
var/default_slot = 1 //Holder so it doesn't default to slot 1, rather the last one used
|
||||
var/max_save_slots = 3
|
||||
|
||||
//non-preference stuff
|
||||
@@ -15,17 +15,17 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/last_id
|
||||
|
||||
//game-preferences
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/lastchangelog = "" //Saved changlog filesize to detect if there was a change
|
||||
var/ooccolor = "#c43b23"
|
||||
var/asaycolor = "#ff4500" //This won't change the color for current admins, only incoming ones.
|
||||
var/asaycolor = "#ff4500" //This won't change the color for current admins, only incoming ones.
|
||||
/// If we spawn an ERT as an admin and choose to spawn as the briefing officer, we'll be given this outfit
|
||||
var/brief_outfit = /datum/outfit/centcom/commander
|
||||
var/enable_tips = TRUE
|
||||
var/tip_delay = 500 //tip delay in milliseconds
|
||||
|
||||
//Antag preferences
|
||||
var/list/be_special = list() //Special role selection
|
||||
var/tmp/old_be_special = 0 //Bitflag version of be_special, used to update old savefiles and nothing more
|
||||
var/list/be_special = list() //Special role selection
|
||||
var/tmp/old_be_special = 0 //Bitflag version of be_special, used to update old savefiles and nothing more
|
||||
//If it's 0, that's good, if it's anything but 0, the owner of this prefs file's antag choices were,
|
||||
//autocorrected this round, not that you'd need to check that.
|
||||
|
||||
@@ -65,23 +65,23 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
var/uses_glasses_colour = 0
|
||||
|
||||
//character preferences
|
||||
var/slot_randomized //keeps track of round-to-round randomization of the character slot, prevents overwriting
|
||||
var/real_name //our character's name
|
||||
var/gender = MALE //gender of character (well duh)
|
||||
var/age = 30 //age of character
|
||||
var/underwear = "Nude" //underwear type
|
||||
var/underwear_color = "000" //underwear color
|
||||
var/undershirt = "Nude" //undershirt type
|
||||
var/socks = "Nude" //socks type
|
||||
var/backpack = DBACKPACK //backpack type
|
||||
var/jumpsuit_style = PREF_SUIT //suit/skirt
|
||||
var/hairstyle = "Bald" //Hair type
|
||||
var/hair_color = "000" //Hair color
|
||||
var/facial_hairstyle = "Shaved" //Face hair type
|
||||
var/facial_hair_color = "000" //Facial hair color
|
||||
var/skin_tone = "caucasian1" //Skin color
|
||||
var/eye_color = "000" //Eye color
|
||||
var/datum/species/pref_species = new /datum/species/human() //Mutant race
|
||||
var/slot_randomized //keeps track of round-to-round randomization of the character slot, prevents overwriting
|
||||
var/real_name //our character's name
|
||||
var/gender = MALE //gender of character (well duh)
|
||||
var/age = 30 //age of character
|
||||
var/underwear = "Nude" //underwear type
|
||||
var/underwear_color = "000" //underwear color
|
||||
var/undershirt = "Nude" //undershirt type
|
||||
var/socks = "Nude" //socks type
|
||||
var/backpack = DBACKPACK //backpack type
|
||||
var/jumpsuit_style = PREF_SUIT //suit/skirt
|
||||
var/hairstyle = "Bald" //Hair type
|
||||
var/hair_color = "000" //Hair color
|
||||
var/facial_hairstyle = "Shaved" //Face hair type
|
||||
var/facial_hair_color = "000" //Facial hair color
|
||||
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", "ethcolor" = "9c3030", "tail_lizard" = "Smooth", "tail_human" = "None", "snout" = "Round", "horns" = "None", "ears" = "None", "wings" = "None", "frills" = "None", "spines" = "None", "body_markings" = "None", "legs" = "Normal Legs", "moth_wings" = "Plain", "moth_antennae" = "Plain", "moth_markings" = "None")
|
||||
var/list/randomise = list(RANDOM_UNDERWEAR = TRUE, RANDOM_UNDERWEAR_COLOR = TRUE, RANDOM_UNDERSHIRT = TRUE, RANDOM_SOCKS = TRUE, RANDOM_BACKPACK = TRUE, RANDOM_JUMPSUIT_STYLE = TRUE, RANDOM_HAIRSTYLE = TRUE, RANDOM_HAIR_COLOR = TRUE, RANDOM_FACIAL_HAIRSTYLE = TRUE, RANDOM_FACIAL_HAIR_COLOR = TRUE, RANDOM_SKIN_TONE = TRUE, RANDOM_EYE_COLOR = TRUE)
|
||||
var/phobia = "spiders"
|
||||
@@ -160,13 +160,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(load_character())
|
||||
return
|
||||
//we couldn't load character data so just randomize the character appearance + name
|
||||
random_character() //let's create a random character then - rather than a fat, bald and naked man.
|
||||
random_character() //let's create a random character then - rather than a fat, bald and naked man.
|
||||
key_bindings = deepCopyList(GLOB.hotkey_keybinding_list_by_key) // give them default keybinds and update their movement keys
|
||||
C?.set_macros()
|
||||
real_name = pref_species.random_name(gender,1)
|
||||
if(!loaded_preferences_successfully)
|
||||
save_preferences()
|
||||
save_character() //let's save this new random character so it doesn't keep generating new ones.
|
||||
save_character() //let's save this new random character so it doesn't keep generating new ones.
|
||||
menuoptions = list()
|
||||
return
|
||||
|
||||
@@ -1113,7 +1113,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(GetQuirkBalance() < 0)
|
||||
all_quirks = list()
|
||||
|
||||
/datum/preferences/Topic(href, href_list, hsrc) //yeah, gotta do this I guess..
|
||||
/datum/preferences/Topic(href, href_list, hsrc) //yeah, gotta do this I guess..
|
||||
. = ..()
|
||||
if(href_list["close"])
|
||||
var/client/C = usr.client
|
||||
@@ -1918,7 +1918,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(CONFIG_GET(flag/humans_need_surnames) && (pref_species.id == "human"))
|
||||
var/firstspace = findtext(real_name, " ")
|
||||
var/name_length = length(real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
if(!firstspace) //we need a surname
|
||||
real_name += " [pick(GLOB.last_names)]"
|
||||
else if(firstspace == name_length)
|
||||
real_name += "[pick(GLOB.last_names)]"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
//This is the lowest supported version, anything below this is completely obsolete and the entire savefile will be wiped.
|
||||
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION (moved to modular)
|
||||
/*
|
||||
#define SAVEFILE_VERSION_MIN 32
|
||||
#define SAVEFILE_VERSION_MIN 32
|
||||
|
||||
//This is the current version, anything below this will attempt to update (if it's not obsolete)
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 39
|
||||
// You do not need to raise this if you are adding new values that have sane defaults.
|
||||
// Only raise this value when changing the meaning/format/name/layout of an existing value
|
||||
// where you would want the updater procs below to run
|
||||
#define SAVEFILE_VERSION_MAX 39
|
||||
|
||||
/*
|
||||
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
|
||||
@@ -152,7 +152,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
S.cd = "/"
|
||||
|
||||
var/needs_update = savefile_needs_update(S)
|
||||
if(needs_update == -2) //fatal, can't load any data
|
||||
if(needs_update == -2) //fatal, can't load any data
|
||||
var/bacpath = "[path].updatebac" //todo: if the savefile version is higher then the server, check the backup, and give the player a prompt to load the backup
|
||||
if (fexists(bacpath))
|
||||
fdel(bacpath) //only keep 1 version of backup
|
||||
@@ -218,44 +218,44 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if (fexists(bacpath))
|
||||
fdel(bacpath) //only keep 1 version of backup
|
||||
fcopy(S, bacpath) //byond helpfully lets you use a savefile for the first arg.
|
||||
update_preferences(needs_update, S) //needs_update = savefile_version if we need an update (positive integer)
|
||||
update_preferences(needs_update, S) //needs_update = savefile_version if we need an update (positive integer)
|
||||
|
||||
|
||||
|
||||
//Sanitize
|
||||
asaycolor = sanitize_ooccolor(sanitize_hexcolor(asaycolor, 6, 1, initial(asaycolor)))
|
||||
ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor)))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, GLOB.available_ui_styles, GLOB.available_ui_styles[1])
|
||||
hotkeys = sanitize_integer(hotkeys, FALSE, TRUE, initial(hotkeys))
|
||||
chat_on_map = sanitize_integer(chat_on_map, FALSE, TRUE, initial(chat_on_map))
|
||||
asaycolor = sanitize_ooccolor(sanitize_hexcolor(asaycolor, 6, 1, initial(asaycolor)))
|
||||
ooccolor = sanitize_ooccolor(sanitize_hexcolor(ooccolor, 6, 1, initial(ooccolor)))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, GLOB.available_ui_styles, GLOB.available_ui_styles[1])
|
||||
hotkeys = sanitize_integer(hotkeys, FALSE, TRUE, initial(hotkeys))
|
||||
chat_on_map = sanitize_integer(chat_on_map, FALSE, TRUE, initial(chat_on_map))
|
||||
max_chat_length = sanitize_integer(max_chat_length, 1, CHAT_MESSAGE_MAX_LENGTH, initial(max_chat_length))
|
||||
see_chat_non_mob = sanitize_integer(see_chat_non_mob, FALSE, TRUE, initial(see_chat_non_mob))
|
||||
see_rc_emotes = sanitize_integer(see_rc_emotes, FALSE, TRUE, initial(see_rc_emotes))
|
||||
see_chat_non_mob = sanitize_integer(see_chat_non_mob, FALSE, TRUE, initial(see_chat_non_mob))
|
||||
see_rc_emotes = sanitize_integer(see_rc_emotes, FALSE, TRUE, initial(see_rc_emotes))
|
||||
broadcast_login_logout = sanitize_integer(broadcast_login_logout, FALSE, TRUE, initial(broadcast_login_logout))
|
||||
tgui_fancy = sanitize_integer(tgui_fancy, FALSE, TRUE, initial(tgui_fancy))
|
||||
tgui_lock = sanitize_integer(tgui_lock, FALSE, TRUE, initial(tgui_lock))
|
||||
buttons_locked = sanitize_integer(buttons_locked, FALSE, TRUE, initial(buttons_locked))
|
||||
windowflashing = sanitize_integer(windowflashing, FALSE, TRUE, initial(windowflashing))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, (2**24)-1, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, -1, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
|
||||
ambientocclusion = sanitize_integer(ambientocclusion, FALSE, TRUE, initial(ambientocclusion))
|
||||
auto_fit_viewport = sanitize_integer(auto_fit_viewport, FALSE, TRUE, initial(auto_fit_viewport))
|
||||
tgui_fancy = sanitize_integer(tgui_fancy, FALSE, TRUE, initial(tgui_fancy))
|
||||
tgui_lock = sanitize_integer(tgui_lock, FALSE, TRUE, initial(tgui_lock))
|
||||
buttons_locked = sanitize_integer(buttons_locked, FALSE, TRUE, initial(buttons_locked))
|
||||
windowflashing = sanitize_integer(windowflashing, FALSE, TRUE, initial(windowflashing))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, (2**24)-1, initial(toggles))
|
||||
clientfps = sanitize_integer(clientfps, -1, 1000, 0)
|
||||
parallax = sanitize_integer(parallax, PARALLAX_INSANE, PARALLAX_DISABLE, null)
|
||||
ambientocclusion = sanitize_integer(ambientocclusion, FALSE, TRUE, initial(ambientocclusion))
|
||||
auto_fit_viewport = sanitize_integer(auto_fit_viewport, FALSE, TRUE, initial(auto_fit_viewport))
|
||||
widescreenpref = sanitize_integer(widescreenpref, FALSE, TRUE, initial(widescreenpref))
|
||||
pixel_size = sanitize_float(pixel_size, PIXEL_SCALING_AUTO, PIXEL_SCALING_3X, 0.5, initial(pixel_size))
|
||||
pixel_size = sanitize_float(pixel_size, PIXEL_SCALING_AUTO, PIXEL_SCALING_3X, 0.5, initial(pixel_size))
|
||||
scaling_method = sanitize_text(scaling_method, initial(scaling_method))
|
||||
ghost_form = sanitize_inlist(ghost_form, GLOB.ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, GLOB.ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
menuoptions = SANITIZE_LIST(menuoptions)
|
||||
be_special = SANITIZE_LIST(be_special)
|
||||
brief_outfit = sanitize_inlist(brief_outfit, subtypesof(/datum/outfit), null)
|
||||
pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
|
||||
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
|
||||
key_bindings = sanitize_keybindings(key_bindings)
|
||||
ghost_form = sanitize_inlist(ghost_form, GLOB.ghost_forms, initial(ghost_form))
|
||||
ghost_orbit = sanitize_inlist(ghost_orbit, GLOB.ghost_orbits, initial(ghost_orbit))
|
||||
ghost_accs = sanitize_inlist(ghost_accs, GLOB.ghost_accs_options, GHOST_ACCS_DEFAULT_OPTION)
|
||||
ghost_others = sanitize_inlist(ghost_others, GLOB.ghost_others_options, GHOST_OTHERS_DEFAULT_OPTION)
|
||||
menuoptions = SANITIZE_LIST(menuoptions)
|
||||
be_special = SANITIZE_LIST(be_special)
|
||||
brief_outfit = sanitize_inlist(brief_outfit, subtypesof(/datum/outfit), null)
|
||||
pda_style = sanitize_inlist(pda_style, GLOB.pda_styles, initial(pda_style))
|
||||
pda_color = sanitize_hexcolor(pda_color, 6, 1, initial(pda_color))
|
||||
key_bindings = sanitize_keybindings(key_bindings)
|
||||
|
||||
if(needs_update >= 0) //save the updated version
|
||||
var/old_default_slot = default_slot
|
||||
@@ -285,7 +285,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
return FALSE
|
||||
S.cd = "/"
|
||||
|
||||
WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX) //updates (or failing that the sanity checks) will ensure data is not invalid at load. Assume up-to-date
|
||||
WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX) //updates (or failing that the sanity checks) will ensure data is not invalid at load. Assume up-to-date
|
||||
|
||||
//general preferences
|
||||
WRITE_FILE(S["asaycolor"], asaycolor)
|
||||
@@ -350,7 +350,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
S.cd = "/character[slot]"
|
||||
var/needs_update = savefile_needs_update(S)
|
||||
if(needs_update == -2) //fatal, can't load any data
|
||||
if(needs_update == -2) //fatal, can't load any data
|
||||
return FALSE
|
||||
|
||||
//Species
|
||||
@@ -422,7 +422,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
//try to fix any outdated data if necessary
|
||||
//preference updating will handle saving the updated data for us.
|
||||
if(needs_update >= 0)
|
||||
update_character(needs_update, S) //needs_update == savefile_version if we need an update (positive integer)
|
||||
update_character(needs_update, S) //needs_update == savefile_version if we need an update (positive integer)
|
||||
|
||||
//Sanitize
|
||||
real_name = reject_bad_name(real_name)
|
||||
@@ -446,50 +446,50 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
randomise = SANITIZE_LIST(randomise)
|
||||
|
||||
if(gender == MALE)
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_male_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_male_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_m)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m)
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_male_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_male_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_m)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_m)
|
||||
else if(gender == FEMALE)
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_female_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_female_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_f)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f)
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_female_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_female_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_f)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_f)
|
||||
else
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_list)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list)
|
||||
hairstyle = sanitize_inlist(hairstyle, GLOB.hairstyles_list)
|
||||
facial_hairstyle = sanitize_inlist(facial_hairstyle, GLOB.facial_hairstyles_list)
|
||||
underwear = sanitize_inlist(underwear, GLOB.underwear_list)
|
||||
undershirt = sanitize_inlist(undershirt, GLOB.undershirt_list)
|
||||
|
||||
socks = sanitize_inlist(socks, GLOB.socks_list)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
underwear_color = sanitize_hexcolor(underwear_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
|
||||
backpack = sanitize_inlist(backpack, GLOB.backpacklist, initial(backpack))
|
||||
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
|
||||
socks = sanitize_inlist(socks, GLOB.socks_list)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
hair_color = sanitize_hexcolor(hair_color, 3, 0)
|
||||
facial_hair_color = sanitize_hexcolor(facial_hair_color, 3, 0)
|
||||
underwear_color = sanitize_hexcolor(underwear_color, 3, 0)
|
||||
eye_color = sanitize_hexcolor(eye_color, 3, 0)
|
||||
skin_tone = sanitize_inlist(skin_tone, GLOB.skin_tones)
|
||||
backpack = sanitize_inlist(backpack, GLOB.backpacklist, initial(backpack))
|
||||
jumpsuit_style = sanitize_inlist(jumpsuit_style, GLOB.jumpsuitlist, initial(jumpsuit_style))
|
||||
uplink_spawn_loc = sanitize_inlist(uplink_spawn_loc, GLOB.uplink_spawn_loc_list, initial(uplink_spawn_loc))
|
||||
playtime_reward_cloak = sanitize_integer(playtime_reward_cloak)
|
||||
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
|
||||
features["ethcolor"] = copytext_char(features["ethcolor"], 1, 7)
|
||||
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], GLOB.tails_list_lizard)
|
||||
features["tail_human"] = sanitize_inlist(features["tail_human"], GLOB.tails_list_human, "None")
|
||||
features["snout"] = sanitize_inlist(features["snout"], GLOB.snouts_list)
|
||||
features["horns"] = sanitize_inlist(features["horns"], GLOB.horns_list)
|
||||
features["ears"] = sanitize_inlist(features["ears"], GLOB.ears_list, "None")
|
||||
features["frills"] = sanitize_inlist(features["frills"], GLOB.frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], GLOB.spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list, "Normal Legs")
|
||||
features["moth_wings"] = sanitize_inlist(features["moth_wings"], GLOB.moth_wings_list, "Plain")
|
||||
features["moth_antennae"] = sanitize_inlist(features["moth_antennae"], GLOB.moth_antennae_list, "Plain")
|
||||
features["moth_markings"] = sanitize_inlist(features["moth_markings"], GLOB.moth_markings_list, "None")
|
||||
features["mcolor"] = sanitize_hexcolor(features["mcolor"], 3, 0)
|
||||
features["ethcolor"] = copytext_char(features["ethcolor"], 1, 7)
|
||||
features["tail_lizard"] = sanitize_inlist(features["tail_lizard"], GLOB.tails_list_lizard)
|
||||
features["tail_human"] = sanitize_inlist(features["tail_human"], GLOB.tails_list_human, "None")
|
||||
features["snout"] = sanitize_inlist(features["snout"], GLOB.snouts_list)
|
||||
features["horns"] = sanitize_inlist(features["horns"], GLOB.horns_list)
|
||||
features["ears"] = sanitize_inlist(features["ears"], GLOB.ears_list, "None")
|
||||
features["frills"] = sanitize_inlist(features["frills"], GLOB.frills_list)
|
||||
features["spines"] = sanitize_inlist(features["spines"], GLOB.spines_list)
|
||||
features["body_markings"] = sanitize_inlist(features["body_markings"], GLOB.body_markings_list)
|
||||
features["feature_lizard_legs"] = sanitize_inlist(features["legs"], GLOB.legs_list, "Normal Legs")
|
||||
features["moth_wings"] = sanitize_inlist(features["moth_wings"], GLOB.moth_wings_list, "Plain")
|
||||
features["moth_antennae"] = sanitize_inlist(features["moth_antennae"], GLOB.moth_antennae_list, "Plain")
|
||||
features["moth_markings"] = sanitize_inlist(features["moth_markings"], GLOB.moth_markings_list, "None")
|
||||
|
||||
persistent_scars = sanitize_integer(persistent_scars)
|
||||
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
joblessrole = sanitize_integer(joblessrole, 1, 3, initial(joblessrole))
|
||||
//Validate job prefs
|
||||
for(var/j in job_preferences)
|
||||
if(job_preferences[j] != JP_LOW && job_preferences[j] != JP_MEDIUM && job_preferences[j] != JP_HIGH)
|
||||
@@ -508,45 +508,45 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
return FALSE
|
||||
S.cd = "/character[default_slot]"
|
||||
|
||||
WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX) //load_character will sanitize any bad data, so assume up-to-date.)
|
||||
WRITE_FILE(S["version"] , SAVEFILE_VERSION_MAX) //load_character will sanitize any bad data, so assume up-to-date.)
|
||||
|
||||
//Character
|
||||
WRITE_FILE(S["real_name"] , real_name)
|
||||
WRITE_FILE(S["gender"] , gender)
|
||||
WRITE_FILE(S["body_type"] , body_type)
|
||||
WRITE_FILE(S["age"] , age)
|
||||
WRITE_FILE(S["hair_color"] , hair_color)
|
||||
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
|
||||
WRITE_FILE(S["eye_color"] , eye_color)
|
||||
WRITE_FILE(S["skin_tone"] , skin_tone)
|
||||
WRITE_FILE(S["hairstyle_name"] , hairstyle)
|
||||
WRITE_FILE(S["facial_style_name"] , facial_hairstyle)
|
||||
WRITE_FILE(S["underwear"] , underwear)
|
||||
WRITE_FILE(S["underwear_color"] , underwear_color)
|
||||
WRITE_FILE(S["undershirt"] , undershirt)
|
||||
WRITE_FILE(S["socks"] , socks)
|
||||
WRITE_FILE(S["backpack"] , backpack)
|
||||
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
|
||||
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
|
||||
WRITE_FILE(S["playtime_reward_cloak"] , playtime_reward_cloak)
|
||||
WRITE_FILE(S["randomise"] , randomise)
|
||||
WRITE_FILE(S["species"] , pref_species.id)
|
||||
WRITE_FILE(S["real_name"] , real_name)
|
||||
WRITE_FILE(S["gender"] , gender)
|
||||
WRITE_FILE(S["body_type"] , body_type)
|
||||
WRITE_FILE(S["age"] , age)
|
||||
WRITE_FILE(S["hair_color"] , hair_color)
|
||||
WRITE_FILE(S["facial_hair_color"] , facial_hair_color)
|
||||
WRITE_FILE(S["eye_color"] , eye_color)
|
||||
WRITE_FILE(S["skin_tone"] , skin_tone)
|
||||
WRITE_FILE(S["hairstyle_name"] , hairstyle)
|
||||
WRITE_FILE(S["facial_style_name"] , facial_hairstyle)
|
||||
WRITE_FILE(S["underwear"] , underwear)
|
||||
WRITE_FILE(S["underwear_color"] , underwear_color)
|
||||
WRITE_FILE(S["undershirt"] , undershirt)
|
||||
WRITE_FILE(S["socks"] , socks)
|
||||
WRITE_FILE(S["backpack"] , backpack)
|
||||
WRITE_FILE(S["jumpsuit_style"] , jumpsuit_style)
|
||||
WRITE_FILE(S["uplink_loc"] , uplink_spawn_loc)
|
||||
WRITE_FILE(S["playtime_reward_cloak"] , playtime_reward_cloak)
|
||||
WRITE_FILE(S["randomise"] , randomise)
|
||||
WRITE_FILE(S["species"] , pref_species.id)
|
||||
WRITE_FILE(S["phobia"], phobia)
|
||||
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
|
||||
WRITE_FILE(S["feature_ethcolor"] , features["ethcolor"])
|
||||
WRITE_FILE(S["feature_lizard_tail"] , features["tail_lizard"])
|
||||
WRITE_FILE(S["feature_human_tail"] , features["tail_human"])
|
||||
WRITE_FILE(S["feature_lizard_snout"] , features["snout"])
|
||||
WRITE_FILE(S["feature_lizard_horns"] , features["horns"])
|
||||
WRITE_FILE(S["feature_human_ears"] , features["ears"])
|
||||
WRITE_FILE(S["feature_lizard_frills"] , features["frills"])
|
||||
WRITE_FILE(S["feature_lizard_spines"] , features["spines"])
|
||||
WRITE_FILE(S["feature_lizard_body_markings"] , features["body_markings"])
|
||||
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
|
||||
WRITE_FILE(S["feature_moth_wings"] , features["moth_wings"])
|
||||
WRITE_FILE(S["feature_moth_antennae"] , features["moth_antennae"])
|
||||
WRITE_FILE(S["feature_moth_markings"] , features["moth_markings"])
|
||||
WRITE_FILE(S["persistent_scars"] , persistent_scars)
|
||||
WRITE_FILE(S["feature_mcolor"] , features["mcolor"])
|
||||
WRITE_FILE(S["feature_ethcolor"] , features["ethcolor"])
|
||||
WRITE_FILE(S["feature_lizard_tail"] , features["tail_lizard"])
|
||||
WRITE_FILE(S["feature_human_tail"] , features["tail_human"])
|
||||
WRITE_FILE(S["feature_lizard_snout"] , features["snout"])
|
||||
WRITE_FILE(S["feature_lizard_horns"] , features["horns"])
|
||||
WRITE_FILE(S["feature_human_ears"] , features["ears"])
|
||||
WRITE_FILE(S["feature_lizard_frills"] , features["frills"])
|
||||
WRITE_FILE(S["feature_lizard_spines"] , features["spines"])
|
||||
WRITE_FILE(S["feature_lizard_body_markings"] , features["body_markings"])
|
||||
WRITE_FILE(S["feature_lizard_legs"] , features["legs"])
|
||||
WRITE_FILE(S["feature_moth_wings"] , features["moth_wings"])
|
||||
WRITE_FILE(S["feature_moth_antennae"] , features["moth_antennae"])
|
||||
WRITE_FILE(S["feature_moth_markings"] , features["moth_markings"])
|
||||
WRITE_FILE(S["persistent_scars"] , persistent_scars)
|
||||
|
||||
//Custom names
|
||||
for(var/custom_name_id in GLOB.preferences_custom_names)
|
||||
@@ -557,12 +557,12 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
WRITE_FILE(S["prefered_security_department"] , prefered_security_department)
|
||||
|
||||
//Jobs
|
||||
WRITE_FILE(S["joblessrole"] , joblessrole)
|
||||
WRITE_FILE(S["joblessrole"] , joblessrole)
|
||||
//Write prefs
|
||||
WRITE_FILE(S["job_preferences"] , job_preferences)
|
||||
|
||||
//Quirks
|
||||
WRITE_FILE(S["all_quirks"] , all_quirks)
|
||||
WRITE_FILE(S["all_quirks"] , all_quirks)
|
||||
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
|
||||
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(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
if(GLOB.say_disabled) //This is here to try to identify lag problems
|
||||
to_chat(usr, "<span class='danger'>Speech is currently admin-disabled.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(damagetype & OXYLOSS)
|
||||
adjustOxyLoss(200/damage_mod)
|
||||
|
||||
if(damagetype & MANUAL_SUICIDE) //Assume the object will handle the death.
|
||||
if(damagetype & MANUAL_SUICIDE) //Assume the object will handle the death.
|
||||
return
|
||||
|
||||
//If something went wrong, just do normal oxyloss
|
||||
@@ -77,7 +77,7 @@
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
|
||||
adjustOxyLoss(max(200 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/brain/verb/suicide()
|
||||
set hidden = TRUE
|
||||
@@ -125,7 +125,7 @@
|
||||
suicide_log()
|
||||
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/silicon/ai/verb/suicide()
|
||||
set hidden = TRUE
|
||||
@@ -144,7 +144,7 @@
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/silicon/robot/verb/suicide()
|
||||
set hidden = TRUE
|
||||
@@ -163,7 +163,7 @@
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/silicon/pai/verb/suicide()
|
||||
set hidden = TRUE
|
||||
@@ -176,7 +176,7 @@
|
||||
suicide_log()
|
||||
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
else
|
||||
to_chat(src, "Aborting suicide attempt.")
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
//put em at -175
|
||||
adjustOxyLoss(max(200 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
|
||||
death(FALSE)
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
ghostize(FALSE) // Disallows reentering body and disassociates mind
|
||||
|
||||
/mob/living/simple_animal/verb/suicide()
|
||||
set hidden = TRUE
|
||||
@@ -244,7 +244,7 @@
|
||||
/mob/living/carbon/canSuicide()
|
||||
if(!..())
|
||||
return
|
||||
if(!(mobility_flags & MOBILITY_USE)) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
if(!(mobility_flags & MOBILITY_USE)) //just while I finish up the new 'fun' suiciding verb. This is to prevent metagaming via suicide
|
||||
to_chat(src, "<span class='warning'>You can't commit suicide whilst immobile! ((You can type Ghost instead however.))</span>")
|
||||
return
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user