mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +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
|
||||
Reference in New Issue
Block a user