better loadout flags

This commit is contained in:
timothyteakettle
2020-10-25 01:08:35 +00:00
parent a39dea1b4d
commit 71134ed8c3
8 changed files with 25 additions and 23 deletions
-5
View File
@@ -114,8 +114,3 @@
//special species definitions
#define MINIMUM_MUTANT_COLOR "#202020" //this is how dark players mutant parts and skin can be
//loadout defines
#define MAXIMUM_LOADOUT_SAVES 5
#define LOADOUT_ITEM "loadout_item"
#define LOADOUT_COLOR "loadout_color"
+8 -5
View File
@@ -68,9 +68,12 @@
#define LOADOUT_LIMBS list(LOADOUT_LIMB_NORMAL,LOADOUT_LIMB_PROSTHETIC,LOADOUT_LIMB_AMPUTATED) //you can amputate your legs/arms though
//options for modifiying color of loadout items
#define LOADOUT_COLOR_TYPE_NONE "no_color"
#define LOADOUT_COLOR_TYPE_POLYCHROMIC "polychromic"
//loadout saving/loading specific defines
#define MAXIMUM_LOADOUT_SAVES 5
#define LOADOUT_ITEM "loadout_item"
#define LOADOUT_COLOR "loadout_color"
//maximum loadout slots you can have (as in, how many stored loadout sets)
#define LOADOUT_MAXIMUM_SLOTS 5
//loadout item flags
#define LOADOUT_CAN_NAME (1<<0) //renaming items
#define LOADOUT_CAN_DESCRIPTION (1<<1) //adding a custom description to items
#define LOADOUT_CAN_COLOR_POLYCHROMIC
+4 -1
View File
@@ -894,8 +894,11 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(donoritem && !gear.donator_ckey_check(user.ckey))
continue
var/class_link = ""
if(has_loadout_gear(loadout_slot, gear.type))
var/list/loadout_item = has_loadout_gear(loadout_slot, gear.type)
if(loadout_item)
class_link = "style='white-space:normal;' class='linkOn' href='?_src_=prefs;preference=gear;toggle_gear_path=[html_encode(name)];toggle_gear=0'"
if(gear.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC)
else if(gear_points <= 0)
class_link = "style='white-space:normal;' class='linkOff'"
else if(donoritem)
@@ -287,7 +287,7 @@
slot = SLOT_IN_BACKPACK
path = /obj/item/clothing/neck/cloak/polychromic/polyce
ckeywhitelist = list("worksbythesea", "blakeryan")
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/donator/ssk
name = "Stun Sword Kit"
@@ -53,7 +53,8 @@ GLOBAL_LIST_EMPTY(loadout_whitelist_ids)
var/path //item-to-spawn path
var/cost = 1 //normally, each loadout costs a single point.
var/geargroupID //defines the ID that the gear inherits from the config
var/color_type = LOADOUT_COLOR_TYPE_NONE
var/loadout_flags
var/loadout_initial_colors = list()
//NEW DONATOR SYTSEM STUFF
var/donoritem //autoset on new if null
@@ -86,9 +86,9 @@
/datum/gear/neck/polycloak
name = "Polychromatic Cloak"
path = /obj/item/clothing/neck/cloak/polychromic
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/neck/altpolycloak
name = "Alternate Cloak"
path = /obj/item/clothing/neck/cloak/alt/polychromic
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
@@ -101,7 +101,7 @@
name = "Polychromic winter coat"
path = /obj/item/clothing/suit/hooded/wintercoat/polychromic
cost = 4 //too many people with neon green coats is hard on the eyes
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/suit/coat/med
name = "Medical winter coat"
@@ -223,43 +223,43 @@
name = "Polychromic Jumpsuit"
path = /obj/item/clothing/under/misc/polyjumpsuit
cost = 2
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/skirt/poly
name = "Polychromic Jumpskirt"
path = /obj/item/clothing/under/dress/skirt/polychromic
cost = 2
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/suit/poly
name = "Polychromic Button-up Shirt"
path = /obj/item/clothing/under/misc/poly_shirt
cost = 3
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/skirt/poly/pleated
name = "Polychromic Pleated Sweaterskirt"
path = /obj/item/clothing/under/dress/skirt/polychromic/pleated
cost = 3
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/polykilt
name = "Polychromic Kilt"
path = /obj/item/clothing/under/costume/kilt/polychromic
cost = 3
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/shorts/poly
name = "Polychromic Shorts"
path = /obj/item/clothing/under/misc/polyshorts
cost = 3
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/shorts/poly/athletic
name = "Polychromic Athletic Shorts"
path = /obj/item/clothing/under/shorts/polychromic
cost = 2
color_type = LOADOUT_COLOR_TYPE_POLYCHROMIC
loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC
/datum/gear/uniform/hopcasual
name = "Casual Head of Personnel's uniform"