mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 17:13:46 +01:00
Back up to date.
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
/datum/gear_tweak/proc/get_contents(var/metadata)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/get_metadata(var/user, var/metadata)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/get_default()
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/tweak_gear_data(var/metadata, var/datum/gear_data)
|
||||
return
|
||||
|
||||
/datum/gear_tweak/proc/tweak_item(var/obj/item/I, var/metadata)
|
||||
return
|
||||
|
||||
/*
|
||||
* Color adjustment
|
||||
*/
|
||||
|
||||
var/datum/gear_tweak/color/gear_tweak_free_color_choice = new()
|
||||
|
||||
/datum/gear_tweak/color
|
||||
var/list/valid_colors
|
||||
|
||||
/datum/gear_tweak/color/New(var/list/colors)
|
||||
valid_colors = colors
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/color/get_contents(var/metadata)
|
||||
return "Color: <font color='[metadata]'>⚫</font>"
|
||||
|
||||
/datum/gear_tweak/color/get_default()
|
||||
return valid_colors ? valid_colors[1] : COLOR_GRAY
|
||||
|
||||
/datum/gear_tweak/color/get_metadata(var/user, var/metadata)
|
||||
if(valid_colors)
|
||||
return input(user, "Choose an item color.", "Character Preference", metadata) as null|anything in valid_colors
|
||||
return input(user, "Choose an item color.", "Global Preference", metadata) as color|null
|
||||
|
||||
/datum/gear_tweak/color/tweak_item(var/obj/item/I, var/metadata)
|
||||
if(valid_colors && !(metadata in valid_colors))
|
||||
return
|
||||
I.color = metadata
|
||||
|
||||
/*
|
||||
* Path adjustment
|
||||
*/
|
||||
|
||||
/datum/gear_tweak/path
|
||||
var/list/valid_paths
|
||||
|
||||
/datum/gear_tweak/path/New(var/list/paths)
|
||||
valid_paths = paths
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/path/get_contents(var/metadata)
|
||||
return "Type: [metadata]"
|
||||
|
||||
/datum/gear_tweak/path/get_default()
|
||||
return valid_paths[1]
|
||||
|
||||
/datum/gear_tweak/path/get_metadata(var/user, var/metadata)
|
||||
return input(user, "Choose a type.", "Character Preference", metadata) as null|anything in valid_paths
|
||||
|
||||
/datum/gear_tweak/path/tweak_gear_data(var/metadata, var/datum/gear_data/gear_data)
|
||||
if(!(metadata in valid_paths))
|
||||
return
|
||||
gear_data.path = valid_paths[metadata]
|
||||
|
||||
/*
|
||||
* Content adjustment
|
||||
*/
|
||||
|
||||
/datum/gear_tweak/contents
|
||||
var/list/valid_contents
|
||||
|
||||
/datum/gear_tweak/contents/New()
|
||||
valid_contents = args.Copy()
|
||||
..()
|
||||
|
||||
/datum/gear_tweak/contents/get_contents(var/metadata)
|
||||
return "Contents: [english_list(metadata, and_text = ", ")]"
|
||||
|
||||
/datum/gear_tweak/contents/get_default()
|
||||
. = list()
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
. += "Random"
|
||||
|
||||
/datum/gear_tweak/contents/get_metadata(var/user, var/list/metadata)
|
||||
. = list()
|
||||
for(var/i = metadata.len to valid_contents.len)
|
||||
metadata += "Random"
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
var/entry = input(user, "Choose an entry.", "Character Preference", metadata[i]) as null|anything in (valid_contents[i] + list("Random", "None"))
|
||||
if(entry)
|
||||
. += entry
|
||||
else
|
||||
return metadata
|
||||
|
||||
/datum/gear_tweak/contents/tweak_item(var/obj/item/I, var/list/metadata)
|
||||
if(metadata.len != valid_contents.len)
|
||||
return
|
||||
for(var/i = 1 to valid_contents.len)
|
||||
var/path
|
||||
var/list/contents = valid_contents[i]
|
||||
if(metadata[i] == "Random")
|
||||
path = pick(contents)
|
||||
path = contents[path]
|
||||
else if(metadata[i] == "None")
|
||||
continue
|
||||
else
|
||||
path = contents[metadata[i]]
|
||||
new path(I)
|
||||
@@ -0,0 +1,79 @@
|
||||
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)
|
||||
var/subtype_cost_overlap = TRUE //if subtypes can take points at the same time
|
||||
|
||||
/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(location, metadata)
|
||||
var/datum/gear_data/gd = new(path, location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_gear_data(metadata["[gt]"], gd)
|
||||
var/item = new gd.path(gd.location)
|
||||
for(var/datum/gear_tweak/gt in gear_tweaks)
|
||||
gt.tweak_item(item, metadata["[gt]"])
|
||||
return item
|
||||
@@ -0,0 +1,95 @@
|
||||
/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
|
||||
|
||||
/datum/gear/accessory/holobadge
|
||||
display_name = "holobadge, pin"
|
||||
path = /obj/item/clothing/accessory/holobadge
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/accessory/holobadge_n
|
||||
display_name = "holobadge, cord"
|
||||
path = /obj/item/clothing/accessory/holobadge/cord
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/accessory/tieblue
|
||||
display_name = "tie, blue"
|
||||
path = /obj/item/clothing/accessory/blue
|
||||
|
||||
/datum/gear/accessory/tiered
|
||||
display_name = "tie, red"
|
||||
path = /obj/item/clothing/accessory/red
|
||||
|
||||
/datum/gear/accessory/tieblack
|
||||
display_name = "tie, black"
|
||||
path = /obj/item/clothing/accessory/black
|
||||
|
||||
/datum/gear/accessory/tiehorrible
|
||||
display_name = "tie, vomit green"
|
||||
path = /obj/item/clothing/accessory/horrible
|
||||
|
||||
/datum/gear/accessory/stethoscope
|
||||
display_name = "stethoscope"
|
||||
path = /obj/item/clothing/accessory/stethoscope
|
||||
allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Paramedic", "Brig Physician")
|
||||
@@ -0,0 +1,20 @@
|
||||
/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
|
||||
|
||||
/datum/gear/monocle
|
||||
display_name = "monocle"
|
||||
path = /obj/item/clothing/glasses/monocle
|
||||
@@ -0,0 +1,40 @@
|
||||
/datum/gear/dice
|
||||
display_name = "a d20"
|
||||
path = /obj/item/weapon/dice/d20
|
||||
|
||||
/datum/gear/uplift
|
||||
display_name = "a pack of Uplifts"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_uplift
|
||||
|
||||
/datum/gear/robust
|
||||
display_name = "a pack of Robusts"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_robust
|
||||
|
||||
/datum/gear/carp
|
||||
display_name = "a pack of Carps"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_carp
|
||||
|
||||
/datum/gear/midori
|
||||
display_name = "a pack of Midoris"
|
||||
path = /obj/item/weapon/storage/fancy/cigarettes/cigpack_midori
|
||||
|
||||
/datum/gear/lighter
|
||||
display_name = "a cheap lighter"
|
||||
path = /obj/item/weapon/lighter
|
||||
|
||||
/datum/gear/rock
|
||||
display_name = "a pet rock"
|
||||
path = /obj/item/toy/pet_rock
|
||||
|
||||
/datum/gear/sechud
|
||||
display_name = "a classic security HUD"
|
||||
path = /obj/item/clothing/glasses/hud/security
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/matches
|
||||
display_name = "a box of matches"
|
||||
path = /obj/item/weapon/storage/box/matches
|
||||
|
||||
/datum/gear/cards
|
||||
display_name = "a deck of cards"
|
||||
path = /obj/item/toy/cards/deck
|
||||
@@ -0,0 +1,114 @@
|
||||
/datum/gear/hat
|
||||
subtype_path = /datum/gear/hat
|
||||
slot = slot_head
|
||||
sort_category = "Headwear"
|
||||
|
||||
/datum/gear/hat/hhat_yellow
|
||||
display_name = "hardhat, yellow"
|
||||
path = /obj/item/clothing/head/hardhat
|
||||
allowed_roles = list("Chief Engineer", "Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/hhat_orange
|
||||
display_name = "hardhat, orange"
|
||||
path = /obj/item/clothing/head/hardhat/orange
|
||||
allowed_roles = list("Chief Engineer", "Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/hhat_blue
|
||||
display_name = "hardhat, blue"
|
||||
path = /obj/item/clothing/head/hardhat/dblue
|
||||
allowed_roles = list("Chief Engineer", "Engineer", "Mechanic", "Life Support Specialist")
|
||||
|
||||
/datum/gear/hat/that
|
||||
display_name = "top hat"
|
||||
path = /obj/item/clothing/head/that
|
||||
|
||||
/datum/gear/hat/flatcap
|
||||
display_name = "flat cap"
|
||||
path = /obj/item/clothing/head/flatcap
|
||||
|
||||
/datum/gear/hat/fez
|
||||
display_name = "fez"
|
||||
path = /obj/item/clothing/head/fez
|
||||
|
||||
/datum/gear/hat/bfedora
|
||||
display_name = "fedora, black"
|
||||
path = /obj/item/clothing/head/fedora
|
||||
|
||||
/datum/gear/hat/wfedora
|
||||
display_name = "fedora, white"
|
||||
path = /obj/item/clothing/head/fedora/whitefedora
|
||||
|
||||
/datum/gear/hat/brfedora
|
||||
display_name = "fedora, brown"
|
||||
path = /obj/item/clothing/head/fedora/brownfedora
|
||||
|
||||
/datum/gear/hat/beretsec
|
||||
display_name = "security beret"
|
||||
path = /obj/item/clothing/head/beret/sec
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capcsec
|
||||
display_name = "security corporate cap"
|
||||
path = /obj/item/clothing/head/soft/sec/corp
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capsec
|
||||
display_name = "security cap"
|
||||
path = /obj/item/clothing/head/soft/sec
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/hat/capred
|
||||
display_name = "cap, red"
|
||||
path = /obj/item/clothing/head/soft/red
|
||||
|
||||
/datum/gear/hat/capblue
|
||||
display_name = "cap, blue"
|
||||
path = /obj/item/clothing/head/soft/blue
|
||||
|
||||
/datum/gear/hat/capgreen
|
||||
display_name = "cap, green"
|
||||
path = /obj/item/clothing/head/soft/green
|
||||
|
||||
/datum/gear/hat/capblack
|
||||
display_name = "cap, black"
|
||||
path = /obj/item/clothing/head/soft/black
|
||||
|
||||
/datum/gear/hat/cappurple
|
||||
display_name = "cap, purple"
|
||||
path = /obj/item/clothing/head/soft/purple
|
||||
|
||||
/datum/gear/hat/capwhite
|
||||
display_name = "cap, white"
|
||||
path = /obj/item/clothing/head/soft/mime
|
||||
|
||||
/datum/gear/hat/caporange
|
||||
display_name = "cap, orange"
|
||||
path = /obj/item/clothing/head/soft/orange
|
||||
|
||||
/datum/gear/hat/capgrey
|
||||
display_name = "cap, grey"
|
||||
path = /obj/item/clothing/head/soft/grey
|
||||
|
||||
/datum/gear/hat/capyellow
|
||||
display_name = "cap, yellow"
|
||||
path = /obj/item/clothing/head/soft/yellow
|
||||
|
||||
/datum/gear/hat/cowboyhat
|
||||
display_name = "cowboy hat"
|
||||
path = /obj/item/clothing/head/cowboyhat
|
||||
|
||||
/datum/gear/hat/beret/purple
|
||||
display_name = "beret, purple"
|
||||
path = /obj/item/clothing/head/beret/purple_normal
|
||||
|
||||
/datum/gear/hat/beret/black
|
||||
display_name = "beret, black"
|
||||
path = /obj/item/clothing/head/beret/black
|
||||
|
||||
/datum/gear/hat/beret/blue
|
||||
display_name = "beret, blue"
|
||||
path = /obj/item/clothing/head/beret/blue
|
||||
|
||||
/datum/gear/hat/beret/red
|
||||
display_name = "beret, red"
|
||||
path = /obj/item/clothing/head/beret
|
||||
@@ -0,0 +1,146 @@
|
||||
/datum/gear/suit
|
||||
subtype_path = /datum/gear/suit
|
||||
slot = slot_wear_suit
|
||||
sort_category = "External Wear"
|
||||
|
||||
//WINTER COATS
|
||||
/datum/gear/suit/coat
|
||||
subtype_path = /datum/gear/suit/coat
|
||||
cost = 2
|
||||
|
||||
/datum/gear/suit/coat/grey
|
||||
display_name = "winter coat"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat
|
||||
|
||||
/datum/gear/suit/coat/job
|
||||
subtype_path = /datum/gear/suit/coat
|
||||
subtype_cost_overlap = FALSE
|
||||
|
||||
/datum/gear/suit/coat/job/sec
|
||||
display_name = "winter coat, security"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/security
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/suit/coat/job/captain
|
||||
display_name = "winter coat, captain"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/captain
|
||||
allowed_roles = list("Captain")
|
||||
|
||||
/datum/gear/suit/coat/job/med
|
||||
display_name = "winter coat, medical"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/medical
|
||||
allowed_roles = list("Chief Medical Officer", "Medical Doctor", "Chemist", "Psychiatrist", "Paramedic", "Virologist", "Brig Physician")
|
||||
|
||||
/datum/gear/suit/coat/job/sci
|
||||
display_name = "winter coat, science"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/science
|
||||
allowed_roles = list("Scientist", "Research Director")
|
||||
|
||||
/datum/gear/suit/coat/job/engi
|
||||
display_name = "winter coat, engineering"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/engineering
|
||||
allowed_roles = list("Chief Engineer", "Engineer", "Mechanic")
|
||||
|
||||
/datum/gear/suit/coat/job/atmos
|
||||
display_name = "winter coat, atmospherics"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/engineering/atmos
|
||||
allowed_roles = list("Chief Engineer", "Life Support Specialist")
|
||||
|
||||
/datum/gear/suit/coat/job/hydro
|
||||
display_name = "winter coat, hydroponics"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/hydro
|
||||
allowed_roles = list("Botanist")
|
||||
|
||||
/datum/gear/suit/coat/job/cargo
|
||||
display_name = "winter coat, cargo"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/cargo
|
||||
allowed_roles = list("Quartermaster", "Cargo Technician")
|
||||
|
||||
/datum/gear/suit/coat/job/miner
|
||||
display_name = "winter coat, miner"
|
||||
path = /obj/item/clothing/suit/hooded/wintercoat/miner
|
||||
allowed_roles = list("Miner")
|
||||
|
||||
//LABCOATS
|
||||
/datum/gear/suit/labcoat_emt
|
||||
display_name = "labcoat, paramedic"
|
||||
path = /obj/item/clothing/suit/storage/labcoat/emt
|
||||
allowed_roles = list("Chief Medical Officer", "Paramedic")
|
||||
|
||||
//JACKETS
|
||||
/datum/gear/suit/leather_jacket
|
||||
display_name = "leather jacket"
|
||||
path = /obj/item/clothing/suit/jacket/leather
|
||||
|
||||
/datum/gear/suit/br_tcoat
|
||||
display_name = "trenchcoat, brown"
|
||||
path = /obj/item/clothing/suit/browntrenchcoat
|
||||
|
||||
/datum/gear/suit/bl_tcoat
|
||||
display_name = "trenchcoat, black"
|
||||
path = /obj/item/clothing/suit/blacktrenchcoat
|
||||
|
||||
/datum/gear/suit/bomber_jacket
|
||||
display_name = "bomber jacket"
|
||||
path = /obj/item/clothing/suit/jacket
|
||||
|
||||
/datum/gear/suit/ol_miljacket
|
||||
display_name = "military jacket, olive"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket
|
||||
|
||||
/datum/gear/suit/nv_miljacket
|
||||
display_name = "military jacket, navy"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/navy
|
||||
|
||||
/datum/gear/suit/ds_miljacket
|
||||
display_name = "military jacket, desert"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/desert
|
||||
|
||||
/datum/gear/suit/wh_miljacket
|
||||
display_name = "military jacket, white"
|
||||
path = /obj/item/clothing/suit/jacket/miljacket/white
|
||||
|
||||
/datum/gear/suit/secjacket
|
||||
display_name = "security jacket"
|
||||
path = /obj/item/clothing/suit/armor/secjacket
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/suit/poncho
|
||||
display_name = "poncho, classic"
|
||||
path = /obj/item/clothing/suit/poncho
|
||||
|
||||
/datum/gear/suit/grponcho
|
||||
display_name = "poncho, green"
|
||||
path = /obj/item/clothing/suit/poncho/green
|
||||
|
||||
/datum/gear/suit/rdponcho
|
||||
display_name = "poncho, red"
|
||||
path = /obj/item/clothing/suit/poncho/red
|
||||
|
||||
/datum/gear/suit/tphoodie
|
||||
display_name = "hoodie, Tharsis Polytech"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/tp
|
||||
|
||||
/datum/gear/suit/nthoodie
|
||||
display_name = "hoodie, Nanotrasen"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/nt
|
||||
|
||||
/datum/gear/suit/lamhoodie
|
||||
display_name = "hoodie, Lunar Academy of Medicine"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/lam
|
||||
|
||||
/datum/gear/suit/cuthoodie
|
||||
display_name = "hoodie, Canaan University of Technology"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/cut
|
||||
|
||||
/datum/gear/suit/mithoodie
|
||||
display_name = "hoodie, Martian Institute of Technology"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/mit
|
||||
|
||||
/datum/gear/suit/bluehoodie
|
||||
display_name = "hoodie, blue"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie/blue
|
||||
|
||||
/datum/gear/suit/blackhoodie
|
||||
display_name = "hoodie, black"
|
||||
path = /obj/item/clothing/suit/hooded/hoodie
|
||||
@@ -0,0 +1,191 @@
|
||||
// Uniform slot
|
||||
/datum/gear/uniform
|
||||
subtype_path = /datum/gear/uniform
|
||||
slot = slot_w_uniform
|
||||
sort_category = "Uniforms and Casual Dress"
|
||||
|
||||
/datum/gear/uniform/skirt
|
||||
subtype_path = /datum/gear/uniform/skirt
|
||||
|
||||
/datum/gear/uniform/skirt/blue
|
||||
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/job
|
||||
cost = 2
|
||||
subtype_path = /datum/gear/uniform/skirt/job
|
||||
subtype_cost_overlap = FALSE
|
||||
|
||||
/datum/gear/uniform/skirt/job/ce
|
||||
display_name = "skirt, ce"
|
||||
path = /obj/item/clothing/under/rank/chief_engineer/skirt
|
||||
allowed_roles = list("Chief Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/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/job/eng
|
||||
display_name = "skirt, engineer"
|
||||
path = /obj/item/clothing/under/rank/engineer/skirt
|
||||
allowed_roles = list("Chief Engineer","Station Engineer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/roboticist
|
||||
display_name = "skirt, roboticist"
|
||||
path = /obj/item/clothing/under/rank/roboticist/skirt
|
||||
allowed_roles = list("Research Director","Roboticist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/cmo
|
||||
display_name = "skirt, cmo"
|
||||
path = /obj/item/clothing/under/rank/chief_medical_officer
|
||||
allowed_roles = list("Chief Medical Officer")
|
||||
|
||||
/datum/gear/uniform/skirt/job/chem
|
||||
display_name = "skirt, chemist"
|
||||
path = /obj/item/clothing/under/rank/chemist/skirt
|
||||
allowed_roles = list("Chief Medical Officer","Chemist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/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/job/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/job/sci
|
||||
display_name = "skirt, scientist"
|
||||
path = /obj/item/clothing/under/rank/scientist/skirt
|
||||
allowed_roles = list("Research Director","Scientist")
|
||||
|
||||
/datum/gear/uniform/skirt/job/cargo
|
||||
display_name = "skirt, cargo"
|
||||
path = /obj/item/clothing/under/rank/cargotech/skirt
|
||||
allowed_roles = list("Quartermaster","Cargo Technician")
|
||||
|
||||
/datum/gear/uniform/skirt/job/qm
|
||||
display_name = "skirt, QM"
|
||||
path = /obj/item/clothing/under/rank/cargo/skirt
|
||||
allowed_roles = list("Quartermaster")
|
||||
|
||||
/datum/gear/uniform/skirt/job/warden
|
||||
display_name = "skirt, warden"
|
||||
path = /obj/item/clothing/under/rank/warden/skirt
|
||||
allowed_roles = list("Head of Security", "Warden")
|
||||
|
||||
/datum/gear/uniform/skirt/job/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/job/head_of_security
|
||||
display_name = "skirt, hos"
|
||||
path = /obj/item/clothing/under/rank/head_of_security/skirt
|
||||
allowed_roles = list("Head of Security")
|
||||
|
||||
/datum/gear/uniform/sec
|
||||
subtype_path = /datum/gear/uniform/sec
|
||||
cost = 2
|
||||
|
||||
/datum/gear/uniform/sec/formal
|
||||
display_name = "security uniform, formal"
|
||||
path = /obj/item/clothing/under/rank/security/formal
|
||||
allowed_roles = list("Head of Security", "Warden", "Detective", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
datum/gear/uniform/secorporate
|
||||
display_name = "security uniform, corporate "
|
||||
path = /obj/item/clothing/under/rank/security/corp
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/sec/dispatch
|
||||
display_name = "security uniform, dispatch"
|
||||
path = /obj/item/clothing/under/rank/dispatch
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/sec/casual
|
||||
display_name = "security uniform, casual"
|
||||
path = /obj/item/clothing/under/rank/security2
|
||||
allowed_roles = list("Head of Security", "Warden", "Security Officer", "Detective", "Security Pod Pilot")
|
||||
|
||||
/datum/gear/uniform/shorts/red
|
||||
display_name = "shorts, red"
|
||||
path = /obj/item/clothing/under/shorts/red
|
||||
|
||||
/datum/gear/uniform/shorts/green
|
||||
display_name = "shorts, green"
|
||||
path = /obj/item/clothing/under/shorts/green
|
||||
|
||||
/datum/gear/uniform/shorts/blue
|
||||
display_name = "shorts, blue"
|
||||
path = /obj/item/clothing/under/shorts/blue
|
||||
|
||||
/datum/gear/uniform/shorts/black
|
||||
display_name = "shorts, black"
|
||||
path = /obj/item/clothing/under/shorts/black
|
||||
|
||||
/datum/gear/uniform/shorts/grey
|
||||
display_name = "shorts, grey"
|
||||
path = /obj/item/clothing/under/shorts/grey
|
||||
|
||||
/datum/gear/uniform/pants/jeans
|
||||
display_name = "jeans, classic"
|
||||
path = /obj/item/clothing/under/pants/classicjeans
|
||||
|
||||
/datum/gear/uniform/pants/mjeans
|
||||
display_name = "jeans, mustang"
|
||||
path = /obj/item/clothing/under/pants/mustangjeans
|
||||
|
||||
/datum/gear/uniform/pants/bljeans
|
||||
display_name = "jeans, black"
|
||||
path = /obj/item/clothing/under/pants/blackjeans
|
||||
|
||||
/datum/gear/uniform/pants/yfjeans
|
||||
display_name = "jeans, Young Folks"
|
||||
path = /obj/item/clothing/under/pants/youngfolksjeans
|
||||
|
||||
/datum/gear/uniform/pants/whitepants
|
||||
display_name = "pants, white"
|
||||
path = /obj/item/clothing/under/pants/white
|
||||
|
||||
/datum/gear/uniform/pants/redpants
|
||||
display_name = "pants, red"
|
||||
path = /obj/item/clothing/under/pants/red
|
||||
|
||||
/datum/gear/uniform/pants/blackpants
|
||||
display_name = "pants, black"
|
||||
path = /obj/item/clothing/under/pants/black
|
||||
|
||||
/datum/gear/uniform/pants/tanpants
|
||||
display_name = "pants, tan"
|
||||
path = /obj/item/clothing/under/pants/tan
|
||||
|
||||
/datum/gear/uniform/pants/bluepants
|
||||
display_name = "pants, blue"
|
||||
path = /obj/item/clothing/under/pants/blue
|
||||
|
||||
/datum/gear/uniform/pants/trackpants
|
||||
display_name = "trackpants"
|
||||
path = /obj/item/clothing/under/pants/track
|
||||
|
||||
/datum/gear/uniform/pants/khakipants
|
||||
display_name = "pants, khaki"
|
||||
path = /obj/item/clothing/under/pants/khaki
|
||||
|
||||
/datum/gear/uniform/pants/caopants
|
||||
display_name = "pants, camo"
|
||||
path = /obj/item/clothing/under/pants/camo
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,466 @@
|
||||
/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,
|
||||
lastchangelog
|
||||
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])
|
||||
lastchangelog = query.item[13]
|
||||
|
||||
//Sanitize
|
||||
ooccolor = sanitize_hexcolor(ooccolor, initial(ooccolor))
|
||||
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))
|
||||
lastchangelog = sanitize_text(lastchangelog, initial(lastchangelog))
|
||||
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]',
|
||||
lastchangelog='[lastchangelog]'
|
||||
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,
|
||||
marking_colours,
|
||||
head_accessory_red,
|
||||
head_accessory_green,
|
||||
head_accessory_blue,
|
||||
hair_style_name,
|
||||
facial_style_name,
|
||||
marking_styles,
|
||||
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])
|
||||
m_colours = query.item[18]
|
||||
r_headacc = text2num(query.item[19])
|
||||
g_headacc = text2num(query.item[20])
|
||||
b_headacc = text2num(query.item[21])
|
||||
h_style = query.item[22]
|
||||
f_style = query.item[23]
|
||||
m_styles = query.item[24]
|
||||
ha_style = query.item[25]
|
||||
r_eyes = text2num(query.item[26])
|
||||
g_eyes = text2num(query.item[27])
|
||||
b_eyes = text2num(query.item[28])
|
||||
underwear = query.item[29]
|
||||
undershirt = query.item[30]
|
||||
backbag = text2num(query.item[31])
|
||||
b_type = query.item[32]
|
||||
|
||||
|
||||
//Jobs
|
||||
alternate_option = text2num(query.item[33])
|
||||
job_support_high = text2num(query.item[34])
|
||||
job_support_med = text2num(query.item[35])
|
||||
job_support_low = text2num(query.item[36])
|
||||
job_medsci_high = text2num(query.item[37])
|
||||
job_medsci_med = text2num(query.item[38])
|
||||
job_medsci_low = text2num(query.item[39])
|
||||
job_engsec_high = text2num(query.item[40])
|
||||
job_engsec_med = text2num(query.item[41])
|
||||
job_engsec_low = text2num(query.item[42])
|
||||
job_karma_high = text2num(query.item[43])
|
||||
job_karma_med = text2num(query.item[44])
|
||||
job_karma_low = text2num(query.item[44])
|
||||
|
||||
//Miscellaneous
|
||||
flavor_text = query.item[46]
|
||||
med_record = query.item[47]
|
||||
sec_record = query.item[48]
|
||||
gen_record = query.item[49]
|
||||
disabilities = text2num(query.item[50])
|
||||
player_alt_titles = params2list(query.item[51])
|
||||
organ_data = params2list(query.item[52])
|
||||
rlimb_data = params2list(query.item[53])
|
||||
nanotrasen_relation = query.item[54]
|
||||
speciesprefs = text2num(query.item[55])
|
||||
|
||||
//socks
|
||||
socks = query.item[56]
|
||||
body_accessory = query.item[57]
|
||||
gear = params2list(query.item[58])
|
||||
|
||||
//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_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))
|
||||
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(!m_colours) m_colours = initial(m_colours)
|
||||
if(!m_styles) m_styles = initial(m_styles)
|
||||
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]',
|
||||
marking_colours='[m_colours]',
|
||||
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_styles='[m_styles]',
|
||||
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,
|
||||
marking_colours,
|
||||
head_accessory_red, head_accessory_green, head_accessory_blue,
|
||||
hair_style_name, facial_style_name, marking_styles, 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]',
|
||||
'[m_colours]',
|
||||
'[r_headacc]', '[g_headacc]', '[b_headacc]',
|
||||
'[sql_sanitize_text(h_style)]', '[sql_sanitize_text(f_style)]', '[m_styles]', '[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*/
|
||||
|
||||
/datum/preferences/proc/SetChangelog(client/C,hash)
|
||||
lastchangelog=hash
|
||||
winset(C, "rpane.changelog", "background-color=none;font-style=")
|
||||
var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastchangelog='[lastchangelog]' WHERE ckey='[C.ckey]'")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
message_admins("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
|
||||
to_chat(C, "Couldn't update your last seen changelog, please try again later.")
|
||||
return
|
||||
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))
|
||||
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
|
||||
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.")
|
||||
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.")
|
||||
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.")
|
||||
src << sound(null, repeat = 0, wait = 0, volume = 0, channel = 1)
|
||||
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.sound ^= SOUND_INSTRUMENTS
|
||||
prefs.save_preferences(src)
|
||||
if(prefs.sound & 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