Merge remote-tracking branch 'upstream/master' into cursed

This commit is contained in:
Pin-alternative
2022-05-30 20:09:20 +10:00
111 changed files with 271334 additions and 3480 deletions
-4
View File
@@ -135,10 +135,6 @@
///Used in MouseDrag to preserve the last mouse-entered object.
var/mouseObject = null
var/mouseControlObject = null
//Middle-mouse-button click dragtime control for aimbot exploit detection.
var/middragtime = 0
//Middle-mouse-button clicked object control for aimbot exploit detection.
var/atom/middragatom
/// Messages currently seen by this client
var/list/seen_messages
+7 -16
View File
@@ -876,10 +876,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
return
last_activity = world.time
last_click = world.time
var/ab = FALSE
var/list/L = params2list(params)
if (object && object == middragatom && L["left"])
ab = max(0, 5 SECONDS-(world.time-middragtime)*0.1)
if(L["drag"])
return
var/mcl = CONFIG_GET(number/minute_click_limit)
if (!holder && !ignore_spam && mcl)
var/minute = round(world.time, 600)
@@ -888,20 +889,14 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if (minute != clicklimiter[CURRENT_MINUTE])
clicklimiter[CURRENT_MINUTE] = minute
clicklimiter[MINUTE_COUNT] = 0
clicklimiter[MINUTE_COUNT] += 1+(ab)
clicklimiter[MINUTE_COUNT] += 1
if (clicklimiter[MINUTE_COUNT] > mcl)
var/msg = "Your previous click was ignored because you've done too many in a minute."
if (minute != clicklimiter[ADMINSWARNED_AT]) //only one admin message per-minute. (if they spam the admins can just boot/ban them)
clicklimiter[ADMINSWARNED_AT] = minute
msg += " Administrators have been informed."
if (ab)
log_game("[key_name(src)] is using the middle click aimbot exploit")
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] is using the middle click aimbot exploit</span>")
add_system_note("aimbot", "Is using the middle click aimbot exploit")
log_click(object, location, control, params, src, "lockout (spam - minute ab c [ab] s [middragtime])", TRUE)
else
log_click(object, location, control, params, src, "lockout (spam - minute)", TRUE)
log_click(object, location, control, params, src, "lockout (spam - minute)", TRUE)
log_game("[key_name(src)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
message_admins("[ADMIN_LOOKUPFLW(src)] [ADMIN_KICK(usr)] Has hit the per-minute click limit of [mcl] clicks in a given game minute")
to_chat(src, "<span class='danger'>[msg]</span>")
@@ -915,15 +910,11 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if (second != clicklimiter[CURRENT_SECOND])
clicklimiter[CURRENT_SECOND] = second
clicklimiter[SECOND_COUNT] = 0
clicklimiter[SECOND_COUNT] += 1+(!!ab)
clicklimiter[SECOND_COUNT] += 1
if (clicklimiter[SECOND_COUNT] > scl)
to_chat(src, "<span class='danger'>Your previous click was ignored because you've done too many in a second</span>")
return
if(ab) //Citadel edit, things with stuff.
log_click(object, location, control, params, src, "dropped (ab c [ab] s [middragtime])", TRUE)
return
if(prefs.log_clicks)
log_click(object, location, control, params, src, extra_info? "clicked ([extra_info])" : null)
+41 -2
View File
@@ -531,6 +531,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "[features["ooc_notes"]]<BR>"
else
dat += "[TextPreview(features["ooc_notes"])]...<BR>"
//SPLURT EDIT
dat += "<h2>Headshot Image</h2>"
dat += "<a href='?_src_=prefs;preference=headshot'><b>Set Headshot Image</b></a><br>"
if(features["headshot_link"])
dat += "<img src='[features["headshot_link"]]' width='160px' height='120px'>"
dat += "<br><br>"
//SPLURT EDIT END
//SKYRAT EDIT
dat += "ERP : <a href='?_src_=prefs;preference=erp_pref'>[erppref]</a><br>"
dat += "Non-Con : <a href='?_src_=prefs;preference=noncon_pref'>[nonconpref]</a><br>"
@@ -862,6 +869,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
tauric_shape = TRUE
dat += "<b>Penis Shape:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_shape;task=input'>[features["cock_shape"]][tauric_shape ? " (Taur)" : ""]</a>"
dat += "<b>Penis Length:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_length;task=input'>[features["cock_length"]] inch(es)</a>"
dat += "<b>Diameter Ratio:</b> <a style='display:block;width:120px' href='?_src_=prefs;preference=cock_diameter_ratio;task=input'>[features["cock_diameter_ratio"]]</a>"
dat += "<b>Penis Visibility:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cock_visibility;task=input'>[features["cock_visibility"]]</a>"
dat += "<b>Has Testicles:</b><a style='display:block;width:50px' href='?_src_=prefs;preference=has_balls'>[features["has_balls"] == TRUE ? "Yes" : "No"]</a>"
if(features["has_balls"])
@@ -2605,7 +2613,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("cock_length")
var/min_D = CONFIG_GET(number/penis_min_inches_prefs)
var/max_D = CONFIG_GET(number/penis_max_inches_prefs)
var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])", "Character Preference") as num|null
var/new_length = input(user, "Penis length in inches:\n([min_D]-[max_D])\nReminder that your sprite size will affect this.", "Character Preference") as num|null
if(new_length)
features["cock_length"] = clamp(round(new_length), min_D, max_D)
@@ -2626,6 +2634,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
features["cock_taur"] = TRUE
features["cock_shape"] = new_shape
if("cock_diameter_ratio")
var/min_diameter_ratio = CONFIG_GET(number/diameter_ratio_min_size_prefs)
var/max_diameter_ratio = CONFIG_GET(number/diameter_ratio_max_size_prefs)
var/new_ratio = input(user, "Penis diameter ratio:\n([min_diameter_ratio]-[max_diameter_ratio])\nReminder that your sprite size will affect this.", "Character Preference") as num|null
if(new_ratio)
features["cock_diameter_ratio"] = clamp(round(new_ratio, 0.01), min_diameter_ratio, max_diameter_ratio)
if("cock_visibility")
var/n_vis = input(user, "Penis Visibility", "Character Preference") as null|anything in CONFIG_GET(keyed_list/safe_visibility_toggles)
if(n_vis)
@@ -2758,7 +2773,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/min_belly = CONFIG_GET(number/belly_min_size_prefs)
var/max_belly = CONFIG_GET(number/belly_max_size_prefs)
var/new_bellysize = input(user, "Belly size :\n([min_belly]-[max_belly])", "Character Preference") as num|null
if(new_bellysize)
if(!isnull(new_bellysize))
features["belly_size"] = clamp(new_bellysize, min_belly, max_belly)
if("butt_size")
@@ -3480,6 +3495,30 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("tab")
if(href_list["tab"])
current_tab = text2num(href_list["tab"])
//SPLURT edit
if("headshot")
var/usr_input = input(user, "Input the image link:", "Headshot Image", features["headshot_link"]) as text|null
if(isnull(usr_input))
return
if(!usr_input)
features["headshot_link"] = null
return
var/static/link_regex = regex("https://i.gyazo.com|https://media.discordapp.net|https://cdn.discordapp.com|https://media.discordapp.net$") //Do not touch the damn duplicates.
var/static/end_regex = regex(".jpg|.jpg|.png|.jpeg|.jpeg") //Regex is terrible, don't touch the duplicate extensions
if(!findtext(usr_input, link_regex, 1, 29))
to_chat(usr, span_warning("The link needs to be an unshortened Gyazo or Discordapp link!"))
return
if(!findtext(usr_input, end_regex, -8))
to_chat(usr, span_warning("You need either \".png\", \".jpg\", or \".jpeg\" in the link!"))
return
if(features["headshot_link"] != usr_input)
to_chat(usr, span_notice("If the photo doesn't show up properly in-game, ensure that it's a direct image link that opens properly in a browser."))
to_chat(usr, span_notice("Keep in mind that the photo will be downsized to 250x250 pixels, so the more square the photo, the better it will look."))
features["headshot_link"] = usr_input
if(href_list["preference"] == "gear")
if(href_list["clear_loadout"])
loadout_data["SAVE_[loadout_slot]"] = list()
@@ -844,6 +844,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_horns_color"] >> features["horns_color"]
S["feature_wings_color"] >> features["wings_color"]
S["feature_color_scheme"] >> features["color_scheme"]
S["headshot"] >> features["headshot_link"] //SPLURT edit
S["persistent_scars"] >> persistent_scars
S["scars1"] >> scars_list["1"]
S["scars2"] >> scars_list["2"]
@@ -919,6 +920,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_cock_shape"] >> features["cock_shape"]
S["feature_cock_color"] >> features["cock_color"]
S["feature_cock_length"] >> features["cock_length"]
S["feature_cock_diameter_ratio"] >> features["cock_diameter_ratio"] //Why is this in the features but not a fucking option
S["feature_cock_diameter"] >> features["cock_diameter"]
S["feature_cock_taur"] >> features["cock_taur"]
S["feature_cock_visibility"] >> features["cock_visibility"]
@@ -1082,6 +1084,13 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
var/static/max_belly
if(!max_belly)
max_belly = CONFIG_GET(number/belly_max_size_prefs)
var/static/min_diameter_ratio
if(!min_diameter_ratio)
min_diameter_ratio = CONFIG_GET(number/diameter_ratio_min_size_prefs)
var/static/max_diameter_ratio
if(!max_diameter_ratio)
max_diameter_ratio = CONFIG_GET(number/diameter_ratio_max_size_prefs)
var/static/safe_visibilities
if(!safe_visibilities)
@@ -1090,6 +1099,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
features["breasts_size"] = sanitize_inlist(features["breasts_size"], B_sizes, BREASTS_SIZE_DEF)
features["cock_length"] = sanitize_integer(features["cock_length"], min_D, max_D, COCK_SIZE_DEF)
features["cock_diameter_ratio"] = sanitize_integer(features["cock_diameter_ratio"], min_diameter_ratio, max_diameter_ratio, COCK_DIAMETER_RATIO_DEF)
features["butt_size"] = sanitize_integer(features["butt_size"], min_B, max_B, BUTT_SIZE_DEF)
features["belly_size"] = sanitize_integer(features["belly_size"], min_belly, max_belly, BELLY_SIZE_DEF)
features["breasts_shape"] = sanitize_inlist(features["breasts_shape"], GLOB.breasts_shapes_list, DEF_BREASTS_SHAPE)
@@ -1253,6 +1263,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["feature_cock_shape"], features["cock_shape"])
WRITE_FILE(S["feature_cock_color"], features["cock_color"])
WRITE_FILE(S["feature_cock_length"], features["cock_length"])
WRITE_FILE(S["feature_cock_diameter_ratio"], features["cock_diameter_ratio"])
WRITE_FILE(S["feature_cock_taur"], features["cock_taur"])
WRITE_FILE(S["feature_cock_visibility"], features["cock_visibility"])
@@ -1362,6 +1373,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
WRITE_FILE(S["fertile"], fertility)
WRITE_FILE(S["oviposition"], oviposition)
WRITE_FILE(S["pregnancy_inflation"], pregnancy_inflation)
WRITE_FILE(S["headshot"], features["headshot_link"])
//SPLURT EDIT END
//gear loadout