mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Bay/Polaris loadouts
Basics - Allows you to select up to 10 items in the character menu - Saved per-character - The items will be spawned when you join - Some items may have job limitations Included Items - Accessories - Scarf - Black Scarf - Christmas Scarf - Dark Blue Scarf - Green Scarf - Light Blue Scarf - Orange Scarf - Purple Scarf - Red Scarf - Striped Blue Scarf - Striped Green Scarf - Striped Red Scarf - White Scarf - Yellow Scarf - Zebra Scarf - Cosmetics - Blue lipstick - Jade lipstick - Purple lipstick - Red lipstick - General - d20 - Uniforms and Casual Dress - Blue Plaid Skirt - Purple Plaid Skirt - Red Plaid Skirt - Atmospherics Skirt - Black Skirt - Cargo Skirt - Chemist Skirt - CMO Skirt - Engineer Skirt - HOS Skirt - Medical Skirt - QM Skirt - Roboticist Skirt - Scientist Skirt - Security Skirt - Virologist Skirt - Warden Skirt
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
var/list/loadout_categories = list()
|
||||
var/list/gear_datums = list()
|
||||
|
||||
/datum/loadout_category
|
||||
var/category = ""
|
||||
var/list/gear = list()
|
||||
|
||||
/datum/loadout_category/New(cat)
|
||||
category = cat
|
||||
..()
|
||||
|
||||
/hook/startup/proc/populate_gear_list()
|
||||
//create a list of gear datums to sort
|
||||
for(var/geartype in subtypesof(/datum/gear))
|
||||
var/datum/gear/G = geartype
|
||||
|
||||
var/use_name = initial(G.display_name)
|
||||
var/use_category = initial(G.sort_category)
|
||||
|
||||
if(G == initial(G.subtype_path))
|
||||
continue
|
||||
|
||||
if(!use_name)
|
||||
error("Loadout - Missing display name: [G]")
|
||||
continue
|
||||
if(!initial(G.cost))
|
||||
error("Loadout - Missing cost: [G]")
|
||||
continue
|
||||
if(!initial(G.path))
|
||||
error("Loadout - Missing path definition: [G]")
|
||||
continue
|
||||
|
||||
if(!loadout_categories[use_category])
|
||||
loadout_categories[use_category] = new /datum/loadout_category(use_category)
|
||||
var/datum/loadout_category/LC = loadout_categories[use_category]
|
||||
gear_datums[use_name] = new geartype
|
||||
LC.gear[use_name] = gear_datums[use_name]
|
||||
|
||||
loadout_categories = sortAssoc(loadout_categories)
|
||||
for(var/loadout_category in loadout_categories)
|
||||
var/datum/loadout_category/LC = loadout_categories[loadout_category]
|
||||
LC.gear = sortAssoc(LC.gear)
|
||||
return 1
|
||||
|
||||
/datum/gear
|
||||
var/display_name //Name/index. Must be unique.
|
||||
var/description //Description of this gear. If left blank will default to the description of the pathed item.
|
||||
var/path //Path to item.
|
||||
var/cost = 1 //Number of points used. Items in general cost 1 point, storage/armor/gloves/special use costs 2 points.
|
||||
var/slot //Slot to equip to.
|
||||
var/list/allowed_roles //Roles that can spawn with this item.
|
||||
var/whitelisted //Term to check the whitelist for..
|
||||
var/sort_category = "General"
|
||||
var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned.
|
||||
var/subtype_path = /datum/gear //for skipping organizational subtypes (optional)
|
||||
|
||||
/datum/gear/New()
|
||||
..()
|
||||
if(!description)
|
||||
var/obj/O = path
|
||||
description = initial(O.desc)
|
||||
|
||||
/datum/gear_data
|
||||
var/path
|
||||
var/location
|
||||
|
||||
/datum/gear_data/New(npath, nlocation)
|
||||
path = npath
|
||||
location = nlocation
|
||||
|
||||
/datum/gear/proc/spawn_item(var/location)
|
||||
var/datum/gear_data/gd = new(path, location)
|
||||
var/item = new gd.path(gd.location)
|
||||
return item
|
||||
@@ -0,0 +1,64 @@
|
||||
/datum/gear/accessory
|
||||
subtype_path = /datum/gear/accessory
|
||||
slot = slot_tie
|
||||
sort_category = "Accessories"
|
||||
|
||||
/datum/gear/accessory/scarf
|
||||
display_name = "scarf"
|
||||
path = /obj/item/clothing/accessory/scarf
|
||||
|
||||
/datum/gear/accessory/scarf/red
|
||||
display_name = "scarf, red"
|
||||
path = /obj/item/clothing/accessory/scarf/red
|
||||
|
||||
/datum/gear/accessory/scarf/green
|
||||
display_name = "scarf, green"
|
||||
path = /obj/item/clothing/accessory/scarf/green
|
||||
|
||||
/datum/gear/accessory/scarf/darkblue
|
||||
display_name = "scarf, dark blue"
|
||||
path = /obj/item/clothing/accessory/scarf/darkblue
|
||||
|
||||
/datum/gear/accessory/scarf/purple
|
||||
display_name = "scarf, purple"
|
||||
path = /obj/item/clothing/accessory/scarf/purple
|
||||
|
||||
/datum/gear/accessory/scarf/yellow
|
||||
display_name = "scarf, yellow"
|
||||
path = /obj/item/clothing/accessory/scarf/yellow
|
||||
|
||||
/datum/gear/accessory/scarf/orange
|
||||
display_name = "scarf, orange"
|
||||
path = /obj/item/clothing/accessory/scarf/orange
|
||||
|
||||
/datum/gear/accessory/scarf/lightblue
|
||||
display_name = "scarf, light blue"
|
||||
path = /obj/item/clothing/accessory/scarf/lightblue
|
||||
|
||||
/datum/gear/accessory/scarf/white
|
||||
display_name = "scarf, white"
|
||||
path = /obj/item/clothing/accessory/scarf/white
|
||||
|
||||
/datum/gear/accessory/scarf/black
|
||||
display_name = "scarf, black"
|
||||
path = /obj/item/clothing/accessory/scarf/black
|
||||
|
||||
/datum/gear/accessory/scarf/zebra
|
||||
display_name = "scarf, zebra"
|
||||
path = /obj/item/clothing/accessory/scarf/zebra
|
||||
|
||||
/datum/gear/accessory/scarf/christmas
|
||||
display_name = "scarf, christmas"
|
||||
path = /obj/item/clothing/accessory/scarf/christmas
|
||||
|
||||
/datum/gear/accessory/scarf/stripedred
|
||||
display_name = "scarf, striped red"
|
||||
path = /obj/item/clothing/accessory/stripedredscarf
|
||||
|
||||
/datum/gear/accessory/scarf/stripedgreen
|
||||
display_name = "scarf, striped green"
|
||||
path = /obj/item/clothing/accessory/stripedgreenscarf
|
||||
|
||||
/datum/gear/accessory/scarf/stripedblue
|
||||
display_name = "scarf, striped blue"
|
||||
path = /obj/item/clothing/accessory/stripedbluescarf
|
||||
@@ -0,0 +1,16 @@
|
||||
/datum/gear/lipstick
|
||||
display_name = "lipstick, black"
|
||||
path = /obj/item/weapon/lipstick/black
|
||||
sort_category = "Cosmetics"
|
||||
|
||||
/datum/gear/lipstick/jade
|
||||
display_name = "lipstick, jade"
|
||||
path = /obj/item/weapon/lipstick/jade
|
||||
|
||||
/datum/gear/lipstick/purple
|
||||
display_name = "lipstick, purple"
|
||||
path = /obj/item/weapon/lipstick/purple
|
||||
|
||||
/datum/gear/lipstick/red
|
||||
display_name = "lipstick, red"
|
||||
path = /obj/item/weapon/lipstick
|
||||
@@ -0,0 +1,3 @@
|
||||
/datum/gear/dice
|
||||
display_name = "d20"
|
||||
path = /obj/item/weapon/dice/d20
|
||||
@@ -0,0 +1,91 @@
|
||||
// Uniform slot
|
||||
/datum/gear/uniform
|
||||
subtype_path = /datum/gear/uniform
|
||||
slot = slot_w_uniform
|
||||
sort_category = "Uniforms and Casual Dress"
|
||||
|
||||
/datum/gear/uniform/skirt
|
||||
display_name = "plaid skirt, blue"
|
||||
path = /obj/item/clothing/under/dress/plaid_blue
|
||||
|
||||
/datum/gear/uniform/skirt/purple
|
||||
display_name = "plaid skirt, purple"
|
||||
path = /obj/item/clothing/under/dress/plaid_purple
|
||||
|
||||
/datum/gear/uniform/skirt/red
|
||||
display_name = "plaid skirt, red"
|
||||
path = /obj/item/clothing/under/dress/plaid_red
|
||||
|
||||
/datum/gear/uniform/skirt/black
|
||||
display_name = "skirt, black"
|
||||
path = /obj/item/clothing/under/blackskirt
|
||||
|
||||
/datum/gear/uniform/skirt/ce
|
||||
display_name = "skirt, ce"
|
||||
path = /obj/item/clothing/under/rank/chief_engineer/skirt
|
||||
allowed_roles = list("Chief Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/atmos
|
||||
display_name = "skirt, atmos"
|
||||
path = /obj/item/clothing/under/rank/atmospheric_technician/skirt
|
||||
allowed_roles = list("Chief Engineer","Atmospheric Technician")
|
||||
|
||||
/datum/gear/uniform/skirt/eng
|
||||
display_name = "skirt, engineer"
|
||||
path = /obj/item/clothing/under/rank/engineer/skirt
|
||||
allowed_roles = list("Chief Engineer","Station Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/roboticist
|
||||
display_name = "skirt, roboticist"
|
||||
path = /obj/item/clothing/under/rank/roboticist/skirt
|
||||
allowed_roles = list("Research Director","Roboticist")
|
||||
|
||||
/datum/gear/uniform/skirt/cmo
|
||||
display_name = "skirt, cmo"
|
||||
path = /obj/item/clothing/under/rank/chief_medical_officer
|
||||
allowed_roles = list("Chief Medical Officer")
|
||||
|
||||
/datum/gear/uniform/skirt/chem
|
||||
display_name = "skirt, chemist"
|
||||
path = /obj/item/clothing/under/rank/chemist/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Chemist")
|
||||
|
||||
/datum/gear/uniform/skirt/viro
|
||||
display_name = "skirt, virologist"
|
||||
path = /obj/item/clothing/under/rank/virologist/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Medical Doctor")
|
||||
|
||||
/datum/gear/uniform/skirt/med
|
||||
display_name = "skirt, medical"
|
||||
path = /obj/item/clothing/under/rank/medical/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Medical Doctor","Chemist","Psychiatrist","Paramedic")
|
||||
|
||||
/datum/gear/uniform/skirt/sci
|
||||
display_name = "skirt, scientist"
|
||||
path = /obj/item/clothing/under/rank/scientist/skirt
|
||||
allowed_roles = list("Research Director","Scientist")
|
||||
|
||||
/datum/gear/uniform/skirt/cargo
|
||||
display_name = "skirt, cargo"
|
||||
path = /obj/item/clothing/under/rank/cargotech/skirt
|
||||
allowed_roles = list("Quartermaster","Cargo Technician")
|
||||
|
||||
/datum/gear/uniform/skirt/qm
|
||||
display_name = "skirt, QM"
|
||||
path = /obj/item/clothing/under/rank/cargo/skirt
|
||||
allowed_roles = list("Quartermaster")
|
||||
|
||||
/datum/gear/uniform/skirt/warden
|
||||
display_name = "skirt, warden"
|
||||
path = /obj/item/clothing/under/rank/warden/skirt
|
||||
allowed_roles = list("Head of Security", "Warden")
|
||||
|
||||
/datum/gear/uniform/skirt/security
|
||||
display_name = "skirt, security"
|
||||
path = /obj/item/clothing/under/rank/security/skirt
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer")
|
||||
|
||||
/datum/gear/uniform/skirt/head_of_security
|
||||
display_name = "skirt, hos"
|
||||
path = /obj/item/clothing/under/rank/head_of_security/skirt
|
||||
allowed_roles = list("Head of Security")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,459 @@
|
||||
/datum/preferences/proc/load_preferences(client/C)
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"SELECT
|
||||
ooccolor,
|
||||
UI_style,
|
||||
UI_style_color,
|
||||
UI_style_alpha,
|
||||
be_role,
|
||||
default_slot,
|
||||
toggles,
|
||||
sound,
|
||||
randomslot,
|
||||
volume,
|
||||
nanoui_fancy,
|
||||
show_ghostitem_attack
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during loading player preferences. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during loading player preferences. Error : \[[err]\]\n")
|
||||
return
|
||||
|
||||
|
||||
//general preferences
|
||||
while(query.NextRow())
|
||||
ooccolor = query.item[1]
|
||||
UI_style = query.item[2]
|
||||
UI_style_color = query.item[3]
|
||||
UI_style_alpha = text2num(query.item[4])
|
||||
be_special = params2list(query.item[5])
|
||||
default_slot = text2num(query.item[6])
|
||||
toggles = text2num(query.item[7])
|
||||
sound = text2num(query.item[8])
|
||||
randomslot = text2num(query.item[9])
|
||||
volume = text2num(query.item[10])
|
||||
nanoui_fancy = text2num(query.item[11])
|
||||
show_ghostitem_attack = text2num(query.item[12])
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
// lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
UI_style = sanitize_inlist(UI_style, list("White", "Midnight"), initial(UI_style))
|
||||
default_slot = sanitize_integer(default_slot, 1, max_save_slots, initial(default_slot))
|
||||
toggles = sanitize_integer(toggles, 0, 65535, initial(toggles))
|
||||
sound = sanitize_integer(sound, 0, 65535, initial(sound))
|
||||
UI_style_color = sanitize_hexcolor(UI_style_color, initial(UI_style_color))
|
||||
UI_style_alpha = sanitize_integer(UI_style_alpha, 0, 255, initial(UI_style_alpha))
|
||||
randomslot = sanitize_integer(randomslot, 0, 1, initial(randomslot))
|
||||
volume = sanitize_integer(volume, 0, 100, initial(volume))
|
||||
nanoui_fancy = sanitize_integer(nanoui_fancy, 0, 1, initial(nanoui_fancy))
|
||||
show_ghostitem_attack = sanitize_integer(show_ghostitem_attack, 0, 1, initial(show_ghostitem_attack))
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_preferences(client/C)
|
||||
|
||||
// Might as well scrub out any malformed be_special list entries while we're here
|
||||
for (var/role in be_special)
|
||||
if(!(role in special_roles))
|
||||
log_to_dd("[C.key] had a malformed role entry: '[role]'. Removing!")
|
||||
be_special -= role
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE [format_table_name("player")]
|
||||
SET
|
||||
ooccolor='[ooccolor]',
|
||||
UI_style='[UI_style]',
|
||||
UI_style_color='[UI_style_color]',
|
||||
UI_style_alpha='[UI_style_alpha]',
|
||||
be_role='[list2params(sql_sanitize_text_list(be_special))]',
|
||||
default_slot='[default_slot]',
|
||||
toggles='[toggles]',
|
||||
sound='[sound]',
|
||||
randomslot='[randomslot]',
|
||||
volume='[volume]',
|
||||
nanoui_fancy='[nanoui_fancy]',
|
||||
show_ghostitem_attack='[show_ghostitem_attack]'
|
||||
WHERE ckey='[C.ckey]'"}
|
||||
)
|
||||
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during saving player preferences. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during saving player preferences. Error : \[[err]\]\n")
|
||||
return
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/load_character(client/C,slot)
|
||||
|
||||
if(!slot) slot = default_slot
|
||||
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("UPDATE [format_table_name("player")] SET default_slot=[slot] WHERE ckey='[C.ckey]'")
|
||||
firstquery.Execute()
|
||||
|
||||
// Let's not have this explode if you sneeze on the DB
|
||||
var/DBQuery/query = dbcon.NewQuery({"SELECT
|
||||
OOC_Notes,
|
||||
real_name,
|
||||
name_is_always_random,
|
||||
gender,
|
||||
age,
|
||||
species,
|
||||
language,
|
||||
hair_red,
|
||||
hair_green,
|
||||
hair_blue,
|
||||
facial_red,
|
||||
facial_green,
|
||||
facial_blue,
|
||||
skin_tone,
|
||||
skin_red,
|
||||
skin_green,
|
||||
skin_blue,
|
||||
markings_red,
|
||||
markings_green,
|
||||
markings_blue,
|
||||
head_accessory_red,
|
||||
head_accessory_green,
|
||||
head_accessory_blue,
|
||||
hair_style_name,
|
||||
facial_style_name,
|
||||
marking_style_name,
|
||||
head_accessory_style_name,
|
||||
eyes_red,
|
||||
eyes_green,
|
||||
eyes_blue,
|
||||
underwear,
|
||||
undershirt,
|
||||
backbag,
|
||||
b_type,
|
||||
alternate_option,
|
||||
job_support_high,
|
||||
job_support_med,
|
||||
job_support_low,
|
||||
job_medsci_high,
|
||||
job_medsci_med,
|
||||
job_medsci_low,
|
||||
job_engsec_high,
|
||||
job_engsec_med,
|
||||
job_engsec_low,
|
||||
job_karma_high,
|
||||
job_karma_med,
|
||||
job_karma_low,
|
||||
flavor_text,
|
||||
med_record,
|
||||
sec_record,
|
||||
gen_record,
|
||||
disabilities,
|
||||
player_alt_titles,
|
||||
organ_data,
|
||||
rlimb_data,
|
||||
nanotrasen_relation,
|
||||
speciesprefs,
|
||||
socks,
|
||||
body_accessory,
|
||||
gear
|
||||
FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' AND slot='[slot]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during character slot loading. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during character slot loading. Error : \[[err]\]\n")
|
||||
return
|
||||
|
||||
while(query.NextRow())
|
||||
//Character
|
||||
metadata = query.item[1]
|
||||
real_name = query.item[2]
|
||||
be_random_name = text2num(query.item[3])
|
||||
gender = query.item[4]
|
||||
age = text2num(query.item[5])
|
||||
species = query.item[6]
|
||||
language = query.item[7]
|
||||
|
||||
//colors to be consolidated into hex strings (requires some work with dna code)
|
||||
r_hair = text2num(query.item[8])
|
||||
g_hair = text2num(query.item[9])
|
||||
b_hair = text2num(query.item[10])
|
||||
r_facial = text2num(query.item[11])
|
||||
g_facial = text2num(query.item[12])
|
||||
b_facial = text2num(query.item[13])
|
||||
s_tone = text2num(query.item[14])
|
||||
r_skin = text2num(query.item[15])
|
||||
g_skin = text2num(query.item[16])
|
||||
b_skin = text2num(query.item[17])
|
||||
r_markings = text2num(query.item[18])
|
||||
g_markings = text2num(query.item[19])
|
||||
b_markings = text2num(query.item[20])
|
||||
r_headacc = text2num(query.item[21])
|
||||
g_headacc = text2num(query.item[22])
|
||||
b_headacc = text2num(query.item[23])
|
||||
h_style = query.item[24]
|
||||
f_style = query.item[25]
|
||||
m_style = query.item[26]
|
||||
ha_style = query.item[27]
|
||||
r_eyes = text2num(query.item[28])
|
||||
g_eyes = text2num(query.item[29])
|
||||
b_eyes = text2num(query.item[30])
|
||||
underwear = query.item[31]
|
||||
undershirt = query.item[32]
|
||||
backbag = text2num(query.item[33])
|
||||
b_type = query.item[34]
|
||||
|
||||
|
||||
//Jobs
|
||||
alternate_option = text2num(query.item[35])
|
||||
job_support_high = text2num(query.item[36])
|
||||
job_support_med = text2num(query.item[37])
|
||||
job_support_low = text2num(query.item[38])
|
||||
job_medsci_high = text2num(query.item[39])
|
||||
job_medsci_med = text2num(query.item[40])
|
||||
job_medsci_low = text2num(query.item[41])
|
||||
job_engsec_high = text2num(query.item[42])
|
||||
job_engsec_med = text2num(query.item[43])
|
||||
job_engsec_low = text2num(query.item[44])
|
||||
job_karma_high = text2num(query.item[45])
|
||||
job_karma_med = text2num(query.item[46])
|
||||
job_karma_low = text2num(query.item[47])
|
||||
|
||||
//Miscellaneous
|
||||
flavor_text = query.item[48]
|
||||
med_record = query.item[49]
|
||||
sec_record = query.item[50]
|
||||
gen_record = query.item[51]
|
||||
disabilities = text2num(query.item[52])
|
||||
player_alt_titles = params2list(query.item[53])
|
||||
organ_data = params2list(query.item[54])
|
||||
rlimb_data = params2list(query.item[55])
|
||||
nanotrasen_relation = query.item[56]
|
||||
speciesprefs = text2num(query.item[57])
|
||||
|
||||
//socks
|
||||
socks = query.item[58]
|
||||
body_accessory = query.item[59]
|
||||
gear = params2list(query.item[60])
|
||||
|
||||
//Sanitize
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name)
|
||||
if(isnull(species)) species = "Human"
|
||||
if(isnull(language)) language = "None"
|
||||
if(isnull(nanotrasen_relation)) nanotrasen_relation = initial(nanotrasen_relation)
|
||||
if(isnull(speciesprefs)) speciesprefs = initial(speciesprefs)
|
||||
if(!real_name) real_name = random_name(gender,species)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
gender = sanitize_gender(gender)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
|
||||
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
|
||||
b_hair = sanitize_integer(b_hair, 0, 255, initial(b_hair))
|
||||
r_facial = sanitize_integer(r_facial, 0, 255, initial(r_facial))
|
||||
g_facial = sanitize_integer(g_facial, 0, 255, initial(g_facial))
|
||||
b_facial = sanitize_integer(b_facial, 0, 255, initial(b_facial))
|
||||
s_tone = sanitize_integer(s_tone, -185, 34, initial(s_tone))
|
||||
r_skin = sanitize_integer(r_skin, 0, 255, initial(r_skin))
|
||||
g_skin = sanitize_integer(g_skin, 0, 255, initial(g_skin))
|
||||
b_skin = sanitize_integer(b_skin, 0, 255, initial(b_skin))
|
||||
r_markings = sanitize_integer(r_markings, 0, 255, initial(r_markings))
|
||||
g_markings = sanitize_integer(g_markings, 0, 255, initial(g_markings))
|
||||
b_markings = sanitize_integer(b_markings, 0, 255, initial(b_markings))
|
||||
r_headacc = sanitize_integer(r_headacc, 0, 255, initial(r_headacc))
|
||||
g_headacc = sanitize_integer(g_headacc, 0, 255, initial(g_headacc))
|
||||
b_headacc = sanitize_integer(b_headacc, 0, 255, initial(b_headacc))
|
||||
h_style = sanitize_inlist(h_style, hair_styles_list, initial(h_style))
|
||||
f_style = sanitize_inlist(f_style, facial_hair_styles_list, initial(f_style))
|
||||
m_style = sanitize_inlist(m_style, marking_styles_list, initial(m_style))
|
||||
ha_style = sanitize_inlist(ha_style, head_accessory_styles_list, initial(ha_style))
|
||||
r_eyes = sanitize_integer(r_eyes, 0, 255, initial(r_eyes))
|
||||
g_eyes = sanitize_integer(g_eyes, 0, 255, initial(g_eyes))
|
||||
b_eyes = sanitize_integer(b_eyes, 0, 255, initial(b_eyes))
|
||||
underwear = sanitize_text(underwear, initial(underwear))
|
||||
undershirt = sanitize_text(undershirt, initial(undershirt))
|
||||
backbag = sanitize_integer(backbag, 1, backbaglist.len, initial(backbag))
|
||||
b_type = sanitize_text(b_type, initial(b_type))
|
||||
|
||||
alternate_option = sanitize_integer(alternate_option, 0, 2, initial(alternate_option))
|
||||
job_support_high = sanitize_integer(job_support_high, 0, 65535, initial(job_support_high))
|
||||
job_support_med = sanitize_integer(job_support_med, 0, 65535, initial(job_support_med))
|
||||
job_support_low = sanitize_integer(job_support_low, 0, 65535, initial(job_support_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))
|
||||
job_karma_high = sanitize_integer(job_karma_high, 0, 65535, initial(job_karma_high))
|
||||
job_karma_med = sanitize_integer(job_karma_med, 0, 65535, initial(job_karma_med))
|
||||
job_karma_low = sanitize_integer(job_karma_low, 0, 65535, initial(job_karma_low))
|
||||
disabilities = sanitize_integer(disabilities, 0, 65535, initial(disabilities))
|
||||
|
||||
socks = sanitize_text(socks, initial(socks))
|
||||
body_accessory = sanitize_text(body_accessory, initial(body_accessory))
|
||||
|
||||
// if(isnull(disabilities)) disabilities = 0
|
||||
if(!player_alt_titles) player_alt_titles = new()
|
||||
if(!organ_data) src.organ_data = list()
|
||||
if(!rlimb_data) src.rlimb_data = list()
|
||||
if(!gear) gear = list()
|
||||
|
||||
return 1
|
||||
|
||||
/datum/preferences/proc/save_character(client/C)
|
||||
var/organlist
|
||||
var/rlimblist
|
||||
var/playertitlelist
|
||||
var/gearlist
|
||||
if(!isemptylist(organ_data))
|
||||
organlist = list2params(organ_data)
|
||||
if(!isemptylist(rlimb_data))
|
||||
rlimblist = list2params(rlimb_data)
|
||||
if(!isemptylist(player_alt_titles))
|
||||
playertitlelist = list2params(player_alt_titles)
|
||||
if(!isemptylist(gear))
|
||||
gearlist = list2params(gear)
|
||||
|
||||
var/DBQuery/firstquery = dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
firstquery.Execute()
|
||||
while(firstquery.NextRow())
|
||||
if(text2num(firstquery.item[1]) == default_slot)
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE [format_table_name("characters")] SET OOC_Notes='[sql_sanitize_text(metadata)]',
|
||||
real_name='[sql_sanitize_text(real_name)]',
|
||||
name_is_always_random='[be_random_name]',
|
||||
gender='[gender]',
|
||||
age='[age]',
|
||||
species='[sql_sanitize_text(species)]',
|
||||
language='[sql_sanitize_text(language)]',
|
||||
hair_red='[r_hair]',
|
||||
hair_green='[g_hair]',
|
||||
hair_blue='[b_hair]',
|
||||
facial_red='[r_facial]',
|
||||
facial_green='[g_facial]',
|
||||
facial_blue='[b_facial]',
|
||||
skin_tone='[s_tone]',
|
||||
skin_red='[r_skin]',
|
||||
skin_green='[g_skin]',
|
||||
skin_blue='[b_skin]',
|
||||
markings_red='[r_markings]',
|
||||
markings_green='[g_markings]',
|
||||
markings_blue='[b_markings]',
|
||||
head_accessory_red='[r_headacc]',
|
||||
head_accessory_green='[g_headacc]',
|
||||
head_accessory_blue='[b_headacc]',
|
||||
hair_style_name='[sql_sanitize_text(h_style)]',
|
||||
facial_style_name='[sql_sanitize_text(f_style)]',
|
||||
marking_style_name='[sql_sanitize_text(m_style)]',
|
||||
head_accessory_style_name='[sql_sanitize_text(ha_style)]',
|
||||
eyes_red='[r_eyes]',
|
||||
eyes_green='[g_eyes]',
|
||||
eyes_blue='[b_eyes]',
|
||||
underwear='[underwear]',
|
||||
undershirt='[undershirt]',
|
||||
backbag='[backbag]',
|
||||
b_type='[b_type]',
|
||||
alternate_option='[alternate_option]',
|
||||
job_support_high='[job_support_high]',
|
||||
job_support_med='[job_support_med]',
|
||||
job_support_low='[job_support_low]',
|
||||
job_medsci_high='[job_medsci_high]',
|
||||
job_medsci_med='[job_medsci_med]',
|
||||
job_medsci_low='[job_medsci_low]',
|
||||
job_engsec_high='[job_engsec_high]',
|
||||
job_engsec_med='[job_engsec_med]',
|
||||
job_engsec_low='[job_engsec_low]',
|
||||
job_karma_high='[job_karma_high]',
|
||||
job_karma_med='[job_karma_med]',
|
||||
job_karma_low='[job_karma_low]',
|
||||
flavor_text='[sql_sanitize_text(html_decode(flavor_text))]',
|
||||
med_record='[sql_sanitize_text(html_decode(med_record))]',
|
||||
sec_record='[sql_sanitize_text(html_decode(sec_record))]',
|
||||
gen_record='[sql_sanitize_text(html_decode(gen_record))]',
|
||||
player_alt_titles='[playertitlelist]',
|
||||
disabilities='[disabilities]',
|
||||
organ_data='[organlist]',
|
||||
rlimb_data='[rlimblist]',
|
||||
nanotrasen_relation='[nanotrasen_relation]',
|
||||
speciesprefs='[speciesprefs]',
|
||||
socks='[socks]',
|
||||
body_accessory='[body_accessory]',
|
||||
gear='[gearlist]'
|
||||
WHERE ckey='[C.ckey]'
|
||||
AND slot='[default_slot]'"}
|
||||
)
|
||||
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during character slot saving. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during character slot saving. Error : \[[err]\]\n")
|
||||
return
|
||||
return 1
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"
|
||||
INSERT INTO [format_table_name("characters")] (ckey, slot, OOC_Notes, real_name, name_is_always_random, gender,
|
||||
age, species, language,
|
||||
hair_red, hair_green, hair_blue,
|
||||
facial_red, facial_green, facial_blue,
|
||||
skin_tone, skin_red, skin_green, skin_blue,
|
||||
markings_red, markings_green, markings_blue,
|
||||
head_accessory_red, head_accessory_green, head_accessory_blue,
|
||||
hair_style_name, facial_style_name, marking_style_name, head_accessory_style_name,
|
||||
eyes_red, eyes_green, eyes_blue,
|
||||
underwear, undershirt,
|
||||
backbag, b_type, alternate_option,
|
||||
job_support_high, job_support_med, job_support_low,
|
||||
job_medsci_high, job_medsci_med, job_medsci_low,
|
||||
job_engsec_high, job_engsec_med, job_engsec_low,
|
||||
job_karma_high, job_karma_med, job_karma_low,
|
||||
flavor_text, med_record, sec_record, gen_record,
|
||||
player_alt_titles,
|
||||
disabilities, organ_data, rlimb_data, nanotrasen_relation, speciesprefs,
|
||||
socks, body_accessory, gear)
|
||||
|
||||
VALUES
|
||||
('[C.ckey]', '[default_slot]', '[sql_sanitize_text(metadata)]', '[sql_sanitize_text(real_name)]', '[be_random_name]','[gender]',
|
||||
'[age]', '[sql_sanitize_text(species)]', '[sql_sanitize_text(language)]',
|
||||
'[r_hair]', '[g_hair]', '[b_hair]',
|
||||
'[r_facial]', '[g_facial]', '[b_facial]',
|
||||
'[s_tone]', '[r_skin]', '[g_skin]', '[b_skin]',
|
||||
'[r_markings]', '[g_markings]', '[b_markings]',
|
||||
'[r_headacc]', '[g_headacc]', '[b_headacc]',
|
||||
'[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]', '[sql_sanitize_text(m_style)]', '[sql_sanitize_text(ha_style)]',
|
||||
'[r_eyes]', '[g_eyes]', '[b_eyes]',
|
||||
'[underwear]', '[undershirt]',
|
||||
'[backbag]', '[b_type]', '[alternate_option]',
|
||||
'[job_support_high]', '[job_support_med]', '[job_support_low]',
|
||||
'[job_medsci_high]', '[job_medsci_med]', '[job_medsci_low]',
|
||||
'[job_engsec_high]', '[job_engsec_med]', '[job_engsec_low]',
|
||||
'[job_karma_high]', '[job_karma_med]', '[job_karma_low]',
|
||||
'[sql_sanitize_text(html_encode(flavor_text))]', '[sql_sanitize_text(html_encode(med_record))]', '[sql_sanitize_text(html_encode(sec_record))]', '[sql_sanitize_text(html_encode(gen_record))]',
|
||||
'[playertitlelist]',
|
||||
'[disabilities]', '[organlist]', '[rlimblist]', '[nanotrasen_relation]', '[speciesprefs]',
|
||||
'[socks]', '[body_accessory]', '[gearlist]')
|
||||
|
||||
"}
|
||||
)
|
||||
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during character slot saving. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during character slot saving. Error : \[[err]\]\n")
|
||||
return
|
||||
return 1
|
||||
|
||||
/*
|
||||
/datum/preferences/proc/random_character(client/C)
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT slot FROM [format_table_name("characters")] WHERE ckey='[C.ckey]' ORDER BY slot")
|
||||
|
||||
while(query.NextRow())
|
||||
var/list/saves = list()
|
||||
for(var/i=1, i<=MAX_SAVE_SLOTS, i++)
|
||||
if(i==text2num(query.item[1]))
|
||||
saves += i
|
||||
|
||||
if(!saves.len)
|
||||
load_character(C)
|
||||
return 0
|
||||
load_character(C,pick(saves))
|
||||
return 1*/
|
||||
@@ -0,0 +1,57 @@
|
||||
var/list/spawntypes = list()
|
||||
|
||||
/proc/populate_spawn_points()
|
||||
spawntypes = list()
|
||||
for(var/type in subtypesof(/datum/spawnpoint))
|
||||
var/datum/spawnpoint/S = new type()
|
||||
spawntypes[S.display_name] = S
|
||||
|
||||
/datum/spawnpoint
|
||||
var/msg //Message to display on the arrivals computer.
|
||||
var/list/turfs //List of turfs to spawn on.
|
||||
var/display_name //Name used in preference setup.
|
||||
var/list/restrict_job = null
|
||||
var/list/disallow_job = null
|
||||
|
||||
proc/check_job_spawning(job)
|
||||
if(restrict_job && !(job in restrict_job))
|
||||
return 0
|
||||
|
||||
if(disallow_job && (job in disallow_job))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/datum/spawnpoint/arrivals
|
||||
display_name = "Arrivals Shuttle"
|
||||
msg = "has arrived on the station"
|
||||
|
||||
/datum/spawnpoint/arrivals/New()
|
||||
..()
|
||||
turfs = latejoin
|
||||
|
||||
/datum/spawnpoint/gateway
|
||||
display_name = "Gateway"
|
||||
msg = "has completed translation from offsite gateway"
|
||||
|
||||
/datum/spawnpoint/gateway/New()
|
||||
..()
|
||||
turfs = latejoin_gateway
|
||||
|
||||
/datum/spawnpoint/cryo
|
||||
display_name = "Cryogenic Storage"
|
||||
msg = "has completed cryogenic revival"
|
||||
disallow_job = list("Cyborg")
|
||||
|
||||
/datum/spawnpoint/cryo/New()
|
||||
..()
|
||||
turfs = latejoin_cryo
|
||||
|
||||
/datum/spawnpoint/cyborg
|
||||
display_name = "Cyborg Storage"
|
||||
msg = "has been activated from storage"
|
||||
restrict_job = list("Cyborg")
|
||||
|
||||
/datum/spawnpoint/cyborg/New()
|
||||
..()
|
||||
turfs = latejoin_cyborg
|
||||
@@ -0,0 +1,216 @@
|
||||
//toggles
|
||||
/client/verb/toggle_ghost_ears()
|
||||
set name = "Show/Hide GhostEars"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob speech, and only speech of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTEARS
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTEARS) ? "see all speech in the world" : "only see speech from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_sight()
|
||||
set name = "Show/Hide GhostSight"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle Between seeing all mob emotes, and only emotes of nearby mobs"
|
||||
prefs.toggles ^= CHAT_GHOSTSIGHT
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTSIGHT) ? "see all emotes in the world" : "only see emotes from nearby mobs"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggle_ghost_radio()
|
||||
set name = "Enable/Disable GhostRadio"
|
||||
set category = "Preferences"
|
||||
set desc = ".Toggle between hearing all radio chatter, or only from nearby speakers"
|
||||
prefs.toggles ^= CHAT_GHOSTRADIO
|
||||
to_chat(src, "As a ghost, you will now [(prefs.toggles & CHAT_GHOSTRADIO) ? "hear all radio chat in the world" : "only hear from nearby speakers"].")
|
||||
prefs.save_preferences(src)
|
||||
feedback_add_details("admin_verb","TGR")
|
||||
|
||||
/client/proc/toggle_hear_radio()
|
||||
set name = "Show/Hide RadioChatter"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle seeing radiochatter from radios and speakers"
|
||||
if(!holder) return
|
||||
prefs.toggles ^= CHAT_RADIO
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.toggles & CHAT_RADIO) ? "now" : "no longer"] see radio chatter from 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/toggleadminhelpsound()
|
||||
set name = "Hear/Silence Adminhelps"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing a notification when admin PMs are recieved"
|
||||
if(!holder) return
|
||||
prefs.sound ^= SOUND_ADMINHELP
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & 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/verb/deadchat() // Deadchat toggle is usable by anyone.
|
||||
set name = "Show/Hide Deadchat"
|
||||
set category = "Preferences"
|
||||
set desc ="Toggles seeing deadchat"
|
||||
prefs.toggles ^= CHAT_DEAD
|
||||
prefs.save_preferences(src)
|
||||
|
||||
if(src.holder)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_DEAD) ? "now" : "no longer"] see deadchat.")
|
||||
else
|
||||
to_chat(src, "As a ghost, you will [(prefs.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()
|
||||
set name = "Show/Hide Prayers"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing prayers"
|
||||
prefs.toggles ^= CHAT_PRAYER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.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/togglescoreboard()
|
||||
set name = "Hide/Display End Round Scoreboard"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round scoreboard"
|
||||
prefs.toggles ^= DISABLE_SCOREBOARD
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_SCOREBOARD) ? "no longer" : "now"] see the end of round scoreboard.")
|
||||
feedback_add_details("admin_verb","TScoreboard") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglekarmareminder()
|
||||
set name = "Hide/Display End Round Karma Reminder"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles displaying end of round karma reminder"
|
||||
prefs.toggles ^= DISABLE_KARMA_REMINDER
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & DISABLE_KARMA_REMINDER) ? "no longer" : "now"] see the end of round karma reminder.")
|
||||
feedback_add_details("admin_verb","TKarmabugger") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/toggletitlemusic()
|
||||
set name = "Hear/Silence LobbyMusic"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing the GameLobby music"
|
||||
prefs.sound ^= SOUND_LOBBY
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
to_chat(src, "You will now hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
playtitlemusic()
|
||||
else
|
||||
to_chat(src, "You will no longer hear music in the game lobby.")
|
||||
if(istype(mob, /mob/new_player))
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 85, channel = 1))// stop the jamsz
|
||||
|
||||
feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/togglemidis()
|
||||
set name = "Hear/Silence Midis"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing sounds uploaded by admins"
|
||||
prefs.sound ^= SOUND_MIDI
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_MIDI)
|
||||
to_chat(src, "You will now hear any sounds uploaded by admins.")
|
||||
else
|
||||
var/sound/break_sound = sound(null, repeat = 0, wait = 0, channel = 777)
|
||||
break_sound.priority = 250
|
||||
to_chat(src, break_sound)//breaks the client's sound output on channel 777
|
||||
|
||||
to_chat(src, "You will no longer hear sounds uploaded by admins; any currently playing midis have been disabled.")
|
||||
feedback_add_details("admin_verb","TMidi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/listen_ooc()
|
||||
set name = "Show/Hide OOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_OOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.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/listen_looc()
|
||||
set name = "Show/Hide LOOC"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles seeing Local OutOfCharacter chat"
|
||||
prefs.toggles ^= CHAT_LOOC
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & CHAT_LOOC) ? "now" : "no longer"] see messages on the LOOC channel.")
|
||||
feedback_add_details("admin_verb","TLOOC") //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
|
||||
set name = "Hear/Silence Ambience"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient sound effects"
|
||||
prefs.sound ^= SOUND_AMBIENCE
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_AMBIENCE)
|
||||
to_chat(src, "You will now hear ambient sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient sounds.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 1))
|
||||
feedback_add_details("admin_verb","TAmbi") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/verb/Toggle_Buzz() //No more headaches because headphones bump up shipambience.ogg to insanity levels.
|
||||
set name = "Hear/Silence White Noise"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing ambient white noise"
|
||||
prefs.sound ^= SOUND_BUZZ
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_BUZZ)
|
||||
to_chat(src, "You will now hear ambient white noise.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear ambient white noise.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 2))
|
||||
feedback_add_details("admin_verb","TBuzz") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/verb/Toggle_Heartbeat() //to toggle off heartbeat sounds, in case they get too annoying
|
||||
set name = "Hear/Silence Heartbeat"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing heart beating sound effects"
|
||||
prefs.sound ^= SOUND_HEARTBEAT
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & SOUND_HEARTBEAT)
|
||||
to_chat(src, "You will now hear heartbeat sounds.")
|
||||
else
|
||||
to_chat(src, "You will no longer hear heartbeat sounds.")
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 1))
|
||||
to_chat(src, sound(null, repeat = 0, wait = 0, volume = 0, channel = 2))
|
||||
feedback_add_details("admin_verb","Thb") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
// This needs a toggle because you people are awful and spammed terrible music
|
||||
/client/verb/toggle_instruments()
|
||||
set name = "Hear/Silence Instruments"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggles hearing musical instruments like the violin and piano"
|
||||
prefs.toggles ^= SOUND_INSTRUMENTS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.toggles & SOUND_INSTRUMENTS)
|
||||
to_chat(src, "You will now hear people playing musical instruments.")
|
||||
else
|
||||
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!
|
||||
|
||||
/client/verb/toggle_media()
|
||||
set name = "Hear/Silence Streaming"
|
||||
set category = "Preferences"
|
||||
set desc = "Toggle hearing streaming media (radios, jukeboxes, etc)"
|
||||
|
||||
prefs.sound ^= SOUND_STREAMING
|
||||
prefs.save_preferences(src)
|
||||
to_chat(usr, "You will [(prefs.sound & SOUND_STREAMING) ? "now" : "no longer"] hear streamed media.")
|
||||
if(!media) return
|
||||
if(prefs.sound & SOUND_STREAMING)
|
||||
media.update_music()
|
||||
else
|
||||
media.stop_music()
|
||||
|
||||
/client/verb/setup_character()
|
||||
set name = "Game Preferences"
|
||||
set category = "Preferences"
|
||||
set desc = "Allows you to access the Setup Character screen. Changes to your character won't take effect until next round, but other changes will."
|
||||
prefs.current_tab = 1
|
||||
prefs.ShowChoices(usr)
|
||||
Reference in New Issue
Block a user