This commit is contained in:
izac112
2020-05-27 20:10:55 +02:00
159 changed files with 28268 additions and 25848 deletions
+11 -6
View File
@@ -95,6 +95,7 @@
log_and_message_admins("[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord snowflake ID is: [their_id]")
admin_chat_message(message = "[ckey] has registered their Discord ID to obtain the Crew Member role. Their Discord is: <@[their_id]>", color = "#4eff22")
notes_add(ckey, "Discord ID: [their_id]")
world.VgsAddMemberRole(their_id)
else
to_chat(src, "<span class='warning'>There was an error registering your Discord ID in the database. Contact an administrator.</span>")
log_and_message_admins("[ckey] failed to register their Discord ID. Their Discord snowflake ID is: [their_id]. Is the database connected?")
@@ -325,12 +326,14 @@
var/sql_computerid = sql_sanitize_text(src.computer_id)
var/sql_admin_rank = sql_sanitize_text(admin_rank)
// If you're about to disconnect the player, you have to use to_chat_immediate otherwise they won't get the message (SSchat will queue it)
//Panic bunker code
if (isnum(player_age) && player_age == 0) //first connection
if (config.panic_bunker && !holder && !deadmin_holder)
log_adminwarn("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>")
to_chat(src, "Sorry but the server is currently not accepting connections from never before seen players.")
to_chat_immediate(src, "<span class='danger'>Sorry but the server is currently not accepting connections from never before seen players.</span>")
qdel(src)
return 0
@@ -349,11 +352,11 @@
//Take action if required
if(config.ipr_block_bad_ips && config.ipr_allow_existing) //We allow players of an age, but you don't meet it
to_chat(src, "Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.")
to_chat_immediate(src, "<span class='danger'>Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.</span>")
qdel(src)
return 0
else if(config.ipr_block_bad_ips) //We don't allow players of any particular age
to_chat(src, "Sorry, we do not accept connections from users via VPN/Proxy/Tor connections.")
to_chat_immediate(src, "<span class='danger'>Sorry, we do not accept connections from users via VPN/Proxy/Tor connections. If you believe this is in error, contact an admin out-of-game.</span>")
qdel(src)
return 0
else
@@ -452,18 +455,20 @@ client/verb/character_setup()
if(src.chatOutputLoadedAt > (world.time - 10 SECONDS))
alert(src, "You can only try to reload VChat every 10 seconds at most.")
return
verbs -= /client/proc/vchat_export_log
//Log, disable
log_debug("[key_name(src)] reloaded VChat.")
winset(src, null, "outputwindow.htmloutput.is-visible=false;outputwindow.oldoutput.is-visible=false;outputwindow.chatloadlabel.is-visible=true")
//The hard way
qdel_null(src.chatOutput)
chatOutput = new /datum/chatOutput(src) //veechat
chatOutput.send_resources()
spawn()
chatOutput.start()
//This is for getipintel.net.
//You're welcome to replace this proc with your own that does your own cool stuff.
@@ -35,7 +35,7 @@ var/global/list/special_roles = list( //keep synced with the defines BE_* in set
S["be_special"] << pref.be_special
/datum/category_item/player_setup_item/antagonism/candidacy/sanitize_character()
pref.be_special = sanitize_integer(pref.be_special, 0, 65535, initial(pref.be_special))
pref.be_special = sanitize_integer(pref.be_special, 0, 16777215, initial(pref.be_special)) //VOREStation Edit - 24 bits of support
/datum/category_item/player_setup_item/antagonism/candidacy/content(var/mob/user)
if(jobban_isbanned(user, "Syndicate"))
@@ -37,7 +37,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
S["synth_green"] >> pref.g_synth
S["synth_blue"] >> pref.b_synth
S["synth_markings"] >> pref.synth_markings
pref.preview_icon = null
S["bgstate"] >> pref.bgstate
S["body_descriptors"] >> pref.body_descriptors
S["Wingdings"] >> pref.wingdings //YWadd start
@@ -213,9 +212,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
/datum/category_item/player_setup_item/general/body/content(var/mob/user)
. = list()
if(!pref.preview_icon)
pref.update_preview_icon()
user << browse_rsc(pref.preview_icon, "previewicon.png")
var/datum/species/mob_species = GLOB.all_species[pref.species]
. += "<table><tr style='vertical-align:top'><td><b>Body</b> "
@@ -338,7 +334,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
. += "</table><br>"
. += "</td><td><b>Preview</b><br>"
. += "<div class='statusDisplay'><center><img src=previewicon.png width=[pref.preview_icon.Width()] height=[pref.preview_icon.Height()]></center></div>"
. += "<br><a href='?src=\ref[src];cycle_bg=1'>Cycle background</a>"
. += "<br><a href='?src=\ref[src];toggle_preview_value=[EQUIP_PREVIEW_LOADOUT]'>[pref.equip_preview_mob & EQUIP_PREVIEW_LOADOUT ? "Hide loadout" : "Show loadout"]</a>"
. += "<br><a href='?src=\ref[src];toggle_preview_value=[EQUIP_PREVIEW_JOB]'>[pref.equip_preview_mob & EQUIP_PREVIEW_JOB ? "Hide job gear" : "Show job gear"]</a>"
@@ -125,17 +125,9 @@
display_name = "cap, bill"
path = /obj/item/clothing/head/soft/mbill
/*/datum/gear/head/cap/sol
/datum/gear/head/cap/sol
display_name = "cap, sol"
path = /obj/item/clothing/head/soft/sol
/datum/gear/head/cap/expdition
display_name = "cap, expedition"
path = /obj/item/clothing/head/soft/sol/expedition
/datum/gear/head/cap/fleet
display_name = "cap, fleet"
path = /obj/item/clothing/head/soft/sol/fleet*/ // Vorestation removal
path = /obj/item/clothing/head/soft/solgov
/datum/gear/head/cowboy
display_name = "cowboy, rodeo"
@@ -337,17 +329,17 @@
display_name = "welding, engie (engineering/robotics)"
path = /obj/item/clothing/head/welding/engie
/*/datum/gear/head/beret/sol
/datum/gear/head/beret/solgov
display_name = "beret sol, selection"
path = /obj/item/clothing/head/beret/sol
path = /obj/item/clothing/head/beret/solgov
/datum/gear/head/beret/sol/New()
/datum/gear/head/beret/solgov/New()
..()
var/list/sols = list()
for(var/sol_style in typesof(/obj/item/clothing/head/beret/sol))
var/obj/item/clothing/head/beret/sol/sol = sol_style
for(var/sol_style in typesof(/obj/item/clothing/head/beret/solgov))
var/obj/item/clothing/head/beret/solgov/sol = sol_style
sols[initial(sol.name)] = sol
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(sols))*/ // Vorestation removal.
gear_tweaks += new/datum/gear_tweak/path(sortAssoc(sols))
/datum/gear/head/surgery
display_name = "surgical cap selection"
@@ -393,3 +393,23 @@
/datum/gear/suit/labcoat_tesh/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/suit/teshcoat
display_name = "small black coat, recolorable stripes (Teshari)"
path = /obj/item/clothing/suit/storage/toggle/tesharicoat
whitelisted = SPECIES_TESHARI
sort_category = "Xenowear"
/datum/gear/suit/teshcoat/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
/datum/gear/suit/teshcoatwhite
display_name = "smallcoat, recolorable (Teshari)"
path = /obj/item/clothing/suit/storage/toggle/tesharicoatwhite
whitelisted = SPECIES_TESHARI
sort_category = "Xenowear"
/datum/gear/suit/teshcoatwhite/New()
..()
gear_tweaks = list(gear_tweak_free_color_choice)
@@ -232,7 +232,7 @@
. = OnTopic(href, href_list, usr)
if(. & TOPIC_UPDATE_PREVIEW)
pref_mob.client.prefs.preview_icon = null
pref_mob.client.prefs.update_preview_icon()
if(. & TOPIC_REFRESH)
pref_mob.client.prefs.ShowChoices(usr)
@@ -27,7 +27,6 @@
var/r_wing2 = 30 // Wing extra color
var/g_wing2 = 30 // Wing extra color
var/b_wing2 = 30 // Wing extra color
var/dress_mob = TRUE
// Definition of the stuff for Ears
/datum/category_item/player_setup_item/vore/ears
@@ -143,14 +142,6 @@
/datum/category_item/player_setup_item/vore/ears/content(var/mob/user)
. += "<h2>VORE Station Settings</h2>"
if(!pref.preview_icon)
pref.update_preview_icon()
user << browse_rsc(pref.preview_icon, "previewicon.png")
. += "<b>Preview</b><br>"
. += "<div class='statusDisplay'><center><img src=previewicon.png width=[pref.preview_icon.Width()] height=[pref.preview_icon.Height()]></center></div>"
. += "<br><a href='?src=\ref[src];toggle_clothing=1'>[pref.dress_mob ? "Hide equipment" : "Show equipment"]</a><br>"
var/ear_display = "Normal"
if(pref.ear_style && (pref.ear_style in ear_styles_list))
var/datum/sprite_accessory/ears/instance = ear_styles_list[pref.ear_style]
@@ -302,8 +293,4 @@
pref.b_wing2 = hex2num(copytext(new_wingc2, 6, 8))
return TOPIC_REFRESH_UPDATE_PREVIEW
else if(href_list["toggle_clothing"])
pref.dress_mob = !pref.dress_mob
return TOPIC_REFRESH_UPDATE_PREVIEW
return ..()
+63 -3
View File
@@ -71,7 +71,14 @@ datum/preferences
var/antag_vis = "Hidden" //How visible antag association is to others.
//Mob preview
var/icon/preview_icon = null
var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen.
var/static/list/preview_screen_locs = list(
"1" = "character_preview_map:1,5:-12",
"2" = "character_preview_map:1,3:15",
"4" = "character_preview_map:1:7,2:10",
"8" = "character_preview_map:1:-7,1:5",
"BG" = "character_preview_map:1,1 to 1,5"
)
//Jobs, uses bitflags
var/job_civilian_high = 0
@@ -157,6 +164,10 @@ datum/preferences
if(load_character())
return
/datum/preferences/Destroy()
. = ..()
QDEL_LIST_ASSOC_VAL(char_render_holders)
/datum/preferences/proc/ZeroSkills(var/forced = 0)
for(var/V in SKILLS) for(var/datum/skill/S in SKILLS[V])
if(!skills.Find(S.ID) || forced)
@@ -216,6 +227,10 @@ datum/preferences
to_chat(user, "<span class='danger'>No mob exists for the given client!</span>")
close_load_dialog(user)
return
if(!char_render_holders)
update_preview_icon()
show_character_previews()
var/dat = "<html><body><center>"
@@ -237,9 +252,50 @@ datum/preferences
dat += "</html></body>"
//user << browse(dat, "window=preferences;size=635x736")
var/datum/browser/popup = new(user, "Character Setup","Character Setup", 800, 800, src)
winshow(user, "preferences_window", TRUE)
var/datum/browser/popup = new(user, "preferences_browser", "Character Setup", 800, 800)
popup.set_content(dat)
popup.open()
popup.open(FALSE) // Skip registring onclose on the browser pane
onclose(user, "preferences_window", src) // We want to register on the window itself
/datum/preferences/proc/update_character_previews(mutable_appearance/MA)
if(!client)
return
var/obj/screen/setup_preview/bg/BG = LAZYACCESS(char_render_holders, "BG")
if(!BG)
BG = new
BG.plane = TURF_PLANE
BG.icon = 'icons/effects/128x48.dmi'
BG.pref = src
LAZYSET(char_render_holders, "BG", BG)
client.screen |= BG
BG.icon_state = bgstate
BG.screen_loc = preview_screen_locs["BG"]
for(var/D in global.cardinal)
var/obj/screen/setup_preview/O = LAZYACCESS(char_render_holders, "[D]")
if(!O)
O = new
O.pref = src
LAZYSET(char_render_holders, "[D]", O)
client.screen |= O
O.appearance = MA
O.dir = D
O.screen_loc = preview_screen_locs["[D]"]
/datum/preferences/proc/show_character_previews()
if(!client || !char_render_holders)
return
for(var/render_holder in char_render_holders)
client.screen |= char_render_holders[render_holder]
/datum/preferences/proc/clear_character_previews()
for(var/index in char_render_holders)
var/obj/screen/S = char_render_holders[index]
client?.screen -= S
qdel(S)
char_render_holders = null
/datum/preferences/proc/process_link(mob/user, list/href_list)
if(!user) return
@@ -289,6 +345,10 @@ datum/preferences
overwrite_character(text2num(href_list["overwrite"]))
sanitize_preferences()
close_load_dialog(usr)
else if(href_list["close"])
// User closed preferences window, cleanup anything we need to.
clear_character_previews()
return 1
else
return 0
@@ -85,6 +85,7 @@
sanitize_preferences()
player_setup.load_character(S)
clear_character_previews() // Recalculate them on next show
return 1
/datum/preferences/proc/save_character()