Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 2/17/2018_make_AI_great_again

# Conflicts resolved:
#	icons/mob/modifier_effects.dmi
This commit is contained in:
Neerti
2018-06-15 18:28:00 -04:00
613 changed files with 16003 additions and 11384 deletions
+5 -3
View File
@@ -46,9 +46,11 @@
////////////////////////////////////
//things that require the database//
////////////////////////////////////
var/player_age = "Requires database" //So admins know why it isn't working - Used to determine how old the account is - in days.
var/related_accounts_ip = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
var/related_accounts_cid = "Requires database" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
var/player_age = "(Requires database)" //So admins know why it isn't working - Used to determine how old the account is - in days.
var/related_accounts_ip = "(Requires database)" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this ip
var/related_accounts_cid = "(Requires database)" //So admins know why it isn't working - Used to determine what other accounts previously logged in from this computer id
var/account_join_date = "(Requires database)"
var/account_age = "(Requires database)"
preload_rsc = PRELOAD_RSC
+25 -2
View File
@@ -162,8 +162,12 @@
winset(src, "rpane.changelog", "background-color=#eaeaea;font-style=bold")
if(config.aggressive_changelog)
src.changes()
if(config.paranoia_logging)
if(isnum(player_age) && player_age == 0)
log_and_message_admins("PARANOIA: [key_name(src)] has connected here for the first time.")
if(isnum(account_age) && account_age <= 2)
log_and_message_admins("PARANOIA: [key_name(src)] has a very new BYOND account ([account_age] days).")
//////////////
//DISCONNECT//
@@ -220,6 +224,12 @@
player_age = text2num(query.item[2])
break
account_join_date = sanitizeSQL(findJoinDate())
if(account_join_date && dbcon.IsConnected())
var/DBQuery/query_datediff = dbcon.NewQuery("SELECT DATEDIFF(Now(),'[account_join_date]')")
if(query_datediff.Execute() && query_datediff.NextRow())
account_age = text2num(query_datediff.item[1])
var/DBQuery/query_ip = dbcon.NewQuery("SELECT ckey FROM erro_player WHERE ip = '[address]'")
query_ip.Execute()
related_accounts_ip = ""
@@ -363,3 +373,16 @@ client/verb/character_setup()
set category = "Preferences"
if(prefs)
prefs.ShowChoices(usr)
/client/proc/findJoinDate()
var/list/http = world.Export("http://byond.com/members/[ckey]?format=text")
if(!http)
log_world("Failed to connect to byond age check for [ckey]")
return
var/F = file2text(http["CONTENT"])
if(F)
var/regex/R = regex("joined = \"(\\d{4}-\\d{2}-\\d{2})\"")
if(R.Find(F))
. = R.group[1]
else
CRASH("Age check regex failed for [src.ckey]")
@@ -11,12 +11,14 @@
S["all_underwear_metadata"] >> pref.all_underwear_metadata
S["backbag"] >> pref.backbag
S["pdachoice"] >> pref.pdachoice
S["communicator_visibility"] >> pref.communicator_visibility
/datum/category_item/player_setup_item/general/equipment/save_character(var/savefile/S)
S["all_underwear"] << pref.all_underwear
S["all_underwear_metadata"] << pref.all_underwear_metadata
S["backbag"] << pref.backbag
S["pdachoice"] << pref.pdachoice
S["communicator_visibility"] << pref.communicator_visibility
// Moved from /datum/preferences/proc/copy_to()
/datum/category_item/player_setup_item/general/equipment/copy_to_mob(var/mob/living/carbon/human/character)
@@ -86,6 +88,7 @@
. += "<br>"
. += "Backpack Type: <a href='?src=\ref[src];change_backpack=1'><b>[backbaglist[pref.backbag]]</b></a><br>"
. += "PDA Type: <a href='?src=\ref[src];change_pda=1'><b>[pdachoicelist[pref.pdachoice]]</b></a><br>"
. += "Communicator Visibility: <a href='?src=\ref[src];toggle_comm_visibility=1'><b>[(pref.communicator_visibility) ? "Yes" : "No"]</b></a><br>"
return jointext(.,null)
@@ -139,5 +142,10 @@
if(new_metadata)
set_metadata(underwear, gt, new_metadata)
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["toggle_comm_visibility"])
if(CanUseTopic(user))
pref.communicator_visibility = !pref.communicator_visibility
return TOPIC_REFRESH
return ..()
@@ -8,6 +8,7 @@
S["UI_style_alpha"] >> pref.UI_style_alpha
S["ooccolor"] >> pref.ooccolor
S["tooltipstyle"] >> pref.tooltipstyle
S["client_fps"] >> pref.client_fps
/datum/category_item/player_setup_item/player_global/ui/save_preferences(var/savefile/S)
S["UI_style"] << pref.UI_style
@@ -15,6 +16,7 @@
S["UI_style_alpha"] << pref.UI_style_alpha
S["ooccolor"] << pref.ooccolor
S["tooltipstyle"] << pref.tooltipstyle
S["client_fps"] << pref.client_fps
/datum/category_item/player_setup_item/player_global/ui/sanitize_preferences()
pref.UI_style = sanitize_inlist(pref.UI_style, all_ui_styles, initial(pref.UI_style))
@@ -22,6 +24,7 @@
pref.UI_style_alpha = sanitize_integer(pref.UI_style_alpha, 0, 255, initial(pref.UI_style_alpha))
pref.ooccolor = sanitize_hexcolor(pref.ooccolor, initial(pref.ooccolor))
pref.tooltipstyle = sanitize_inlist(pref.tooltipstyle, all_tooltip_styles, initial(pref.tooltipstyle))
pref.client_fps = sanitize_integer(pref.client_fps, 0, MAX_CLIENT_FPS, initial(pref.client_fps))
/datum/category_item/player_setup_item/player_global/ui/content(var/mob/user)
. = "<b>UI Style:</b> <a href='?src=\ref[src];select_style=1'><b>[pref.UI_style]</b></a><br>"
@@ -29,6 +32,7 @@
. += "-Color: <a href='?src=\ref[src];select_color=1'><b>[pref.UI_style_color]</b></a> <table style='display:inline;' bgcolor='[pref.UI_style_color]'><tr><td>__</td></tr></table> <a href='?src=\ref[src];reset=ui'>reset</a><br>"
. += "-Alpha(transparency): <a href='?src=\ref[src];select_alpha=1'><b>[pref.UI_style_alpha]</b></a> <a href='?src=\ref[src];reset=alpha'>reset</a><br>"
. += "<b>Tooltip Style:</b> <a href='?src=\ref[src];select_tooltip_style=1'><b>[pref.tooltipstyle]</b></a><br>"
. += "<b>Client FPS:</b> <a href='?src=\ref[src];select_client_fps=1'><b>[pref.client_fps]</b></a><br>"
if(can_select_ooc_color(user))
. += "<b>OOC Color:</b> "
if(pref.ooccolor == initial(pref.ooccolor))
@@ -62,11 +66,20 @@
return TOPIC_REFRESH
else if(href_list["select_tooltip_style"])
var/tooltip_style_new = input(user, "Choose tooltip style.", "Character Preference", pref.tooltipstyle) as null|anything in all_tooltip_styles
var/tooltip_style_new = input(user, "Choose tooltip style.", "Global Preference", pref.tooltipstyle) as null|anything in all_tooltip_styles
if(!tooltip_style_new || !CanUseTopic(user)) return TOPIC_NOACTION
pref.tooltipstyle = tooltip_style_new
return TOPIC_REFRESH
else if(href_list["select_client_fps"])
var/fps_new = input(user, "Input Client FPS (1-200, 0 uses server FPS)", "Global Preference", pref.client_fps) as null|num
if(isnull(fps_new) || !CanUseTopic(user)) return TOPIC_NOACTION
if(fps_new < 0 || fps_new > MAX_CLIENT_FPS) return TOPIC_NOACTION
pref.client_fps = fps_new
if(pref.client)
pref.client.fps = fps_new
return TOPIC_REFRESH
else if(href_list["reset"])
switch(href_list["reset"])
if("ui")
@@ -1,26 +0,0 @@
/datum/category_item/player_setup_item/player_global/communicators
name = "Communicators"
sort_order = 4
/datum/category_item/player_setup_item/player_global/communicators/load_preferences(var/savefile/S)
S["communicator_visibility"] >> pref.communicator_visibility
/datum/category_item/player_setup_item/player_global/communicators/save_preferences(var/savefile/S)
S["communicator_visibility"] << pref.communicator_visibility
/datum/category_item/player_setup_item/player_global/communicators/sanitize_preferences()
pref.communicator_visibility = sanitize_integer(pref.communicator_visibility, 0, 1, initial(pref.communicator_visibility))
/datum/category_item/player_setup_item/player_global/communicators/content(var/mob/user)
. += "<b>Communicator Identity:</b><br>"
. += "Visibility: <a href='?src=\ref[src];toggle_comm_visibility=1'><b>[(pref.communicator_visibility) ? "Yes" : "No"]</b></a><br>"
/datum/category_item/player_setup_item/player_global/communicators/OnTopic(var/href,var/list/href_list, var/mob/user)
if(href_list["toggle_comm_visibility"])
if(CanUseTopic(user))
pref.communicator_visibility = !pref.communicator_visibility
return TOPIC_REFRESH
return ..()
@@ -1,6 +1,6 @@
/datum/category_item/player_setup_item/player_global/ooc
name = "OOC"
sort_order = 5
sort_order = 4
/datum/category_item/player_setup_item/player_global/ooc/load_preferences(var/savefile/S)
S["ignored_players"] >> pref.ignored_players
@@ -169,6 +169,20 @@ var/list/_client_preferences_by_type
enabled_description = "Fancy"
disabled_description = "Plain"
/datum/client_preference/ambient_occlusion
description = "Fake Ambient Occlusion"
key = "AMBIENT_OCCLUSION_PREF"
enabled_by_default = FALSE
enabled_description = "On"
disabled_description = "Off"
/datum/client_preference/ambient_occlusion/toggled(var/mob/preference_mob, var/enabled)
. = ..()
if(preference_mob && preference_mob.plane_holder)
var/datum/plane_holder/PH = preference_mob.plane_holder
PH.set_ao(VIS_OBJS, enabled)
PH.set_ao(VIS_MOBS, enabled)
/********************
* Staff Preferences *
********************/
@@ -147,17 +147,17 @@
/datum/gear/accessory/brown_drop_pouches
display_name = "drop pouches, brown"
path = /obj/item/clothing/accessory/storage/brown_drop_pouches
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor")
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor", "Search and Rescue")
/datum/gear/accessory/black_drop_pouches
display_name = "drop pouches, black"
path = /obj/item/clothing/accessory/storage/black_drop_pouches
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor")
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor", "Search and Rescue")
/datum/gear/accessory/white_drop_pouches
display_name = "drop pouches, white"
path = /obj/item/clothing/accessory/storage/white_drop_pouches
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor")
allowed_roles = list("Station Engineer","Atmospheric Technician","Chief Engineer","Security Officer","Detective","Head of Security","Warden","Paramedic","Chief Medical Officer","Medical Doctor", "Search and Rescue")
/datum/gear/accessory/fannypack
display_name = "fannypack selection"
@@ -236,7 +236,7 @@
/datum/gear/accessory/stethoscope
display_name = "stethoscope"
path = /obj/item/clothing/accessory/stethoscope
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic")
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic", "Search and Rescue")
/datum/gear/accessory/locket
display_name = "locket"
@@ -57,7 +57,7 @@
/datum/gear/eyes/medical
display_name = "Medical HUD (Medical)"
path = /obj/item/clothing/glasses/hud/health
allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist")
allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist", "Search and Rescue")
/datum/gear/eyes/medical/prescriptionmed
display_name = "Medical HUD, prescription (Medical)"
@@ -440,7 +440,7 @@ datum/gear/suit/duster
/datum/gear/suit/snowsuit/medical
display_name = "snowsuit, medical"
path = /obj/item/clothing/suit/storage/snowsuit/medical
allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist")
allowed_roles = list("Medical Doctor","Chief Medical Officer","Chemist","Paramedic","Geneticist", "Psychiatrist", "Search and Rescue")
/datum/gear/suit/snowsuit/science
display_name = "snowsuit, science"
@@ -455,4 +455,4 @@ datum/gear/suit/duster
/datum/gear/suit/snowsuit/cargo
display_name = "snowsuit, supply"
path = /obj/item/clothing/suit/storage/snowsuit/cargo
allowed_roles = list("Quartermaster","shaft Miner","Cargo Technician","Head of Personnel")
allowed_roles = list("Quartermaster","Shaft Miner","Cargo Technician","Head of Personnel")
@@ -45,6 +45,11 @@
path = /obj/item/weapon/book/codex/corp_regs
cost = 0
/datum/gear/utility/robutt
display_name = "a buyer's guide to artificial bodies"
path = /obj/item/weapon/book/codex/lore/robutt
cost = 0
/datum/gear/utility/folder_blue
display_name = "folder, blue"
path = /obj/item/weapon/folder/blue
@@ -74,6 +79,11 @@
path =/obj/item/weapon/storage/secure/briefcase
cost = 2
/datum/gear/utility/laserpointer
display_name = "laser pointer"
path =/obj/item/device/laser_pointer
cost = 2
/datum/gear/utility/flashlight
display_name = "flashlight"
path = /obj/item/device/flashlight
@@ -140,4 +150,4 @@
/datum/gear/utility/umbrella/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
gear_tweaks = list(gear_tweak_free_color_choice)
@@ -94,7 +94,7 @@
if(job.minimum_character_age && user.client && (user.client.prefs.age < job.minimum_character_age))
. += "<del>[rank]</del></td><td> \[MINIMUM CHARACTER AGE: [job.minimum_character_age]]</td></tr>"
continue
if((pref.job_civilian_low & ASSISTANT) && job.flag != ASSISTANT)
if((pref.job_civilian_low & ASSISTANT) && job.type != /datum/job/assistant)
. += "<font color=grey>[rank]</font></td><td></td></tr>"
continue
if((rank in command_positions) || (rank == "AI"))//Bold head jobs
@@ -106,7 +106,7 @@
. += "<a href='?src=\ref[src];set_job=[rank]'>"
if(job.flag == ASSISTANT)//Assistant is special
if(job.type == /datum/job/assistant)//Assistant is special
if(pref.job_civilian_low & ASSISTANT)
. += " <font color=55cc55>\[Yes]</font>"
else
@@ -180,7 +180,7 @@
if(!job)
return 0
if(job.flag == ASSISTANT)
if(job.type == /datum/job/assistant)
if(pref.job_civilian_low & job.flag)
pref.job_civilian_low &= ~job.flag
else
+2 -1
View File
@@ -22,6 +22,7 @@ datum/preferences
var/UI_style_color = "#ffffff"
var/UI_style_alpha = 255
var/tooltipstyle = "Midnight" //Style for popup tooltips
var/client_fps = 0
//character preferences
var/real_name //our character's name
@@ -273,7 +274,7 @@ datum/preferences
ShowChoices(usr)
return 1
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1)
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = TRUE)
// Sanitizing rather than saving as someone might still be editing when copy_to occurs.
player_setup.sanitize_setup()