Skip to content

Commit

Permalink
Adds capes by saro. (Cosmic-Overlord#353)
Browse files Browse the repository at this point in the history
* capes1

* regaly highlight

* hmm

* Update loadout_variants.dm

* Update greyscale_configs.dm

* Revert "Update greyscale_configs.dm"

This reverts commit 5663bde.

* hmmmmmm

* Update loadout_variants.dm

* Update capes_highlight.dmi

* should do it

* Update loadout_variants.dm

* Update loadout_variants.dm

* hair flags to facepaint

loadout doesn't work yet, i think so

* Робит

* Update _item_representation.dm

* Update loadout_variants.dm

* Update _item_representation.dm

* palette

* hair
  • Loading branch information
Helg2 authored Jan 22, 2024
1 parent abec8ae commit eac87b3
Show file tree
Hide file tree
Showing 24 changed files with 490 additions and 32 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/loadout_variants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#define MARK_THREE_WEBBING "mark_three_webbing"
#define MARK_ONE_WEBBING "mark_one_webbing"

/* RUTGMC REDEFINITION
///saved loadout key = icon_state, AGAIN DO NOT EDIT THE KEYS IT WILL BREAK LOADOUTS
GLOBAL_LIST_INIT(loadout_variant_keys, list(
NORMAL = "normal",
Expand Down Expand Up @@ -91,3 +92,4 @@ GLOBAL_LIST_INIT(loadout_variant_keys, list(
FOUR_EYE_FACEPLATE = "Four Eye",
FOUR_EYE_FACEPLATE_VISOR = "Four Eye",
))
*/
4 changes: 4 additions & 0 deletions code/__DEFINES/modular_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
#define COLOR_WHEEL "Color Wheel"
#define PRESET_COLORS "Preset Colors"
#define VARIANTS "Variant"
//RUTGMC ADDITION
#define HAIR_CONCEALING_CHANGE "Hair Concealing"

#define COLOR_WHEEL_ALLOWED (1<<0)
#define PRESET_COLORS_ALLOWED (1<<1)
#define ICON_STATE_VARIANTS_ALLOWED (1<<2)
//RUTGMC ADDITION
#define HAIR_CONCEALING_CHANGE_ALLOWED (1<<3)


#define JUNGLE_VARIANT "jungle"
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/~RUtgmc_defines/_defines_include.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "footsteps.dm"
#include "is_helpers.dm"
#include "jobs.dm"
#include "loadout_variants.dm"
#include "mobs.dm"
#include "mode.dm"
#include "modular_armor.dm"
Expand Down
19 changes: 19 additions & 0 deletions code/__DEFINES/~RUtgmc_defines/loadout_variants.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define CAPE_LONG "cape_long"
#define CAPE_REGALY "cape_regaly"
#define CAPE_ONELONG "cape_onelong"

GLOBAL_LIST_INIT(loadout_variant_keys, list(
CAPE_KAMA = "kama",
CAPE_KILT = "kilt",
CAPE_KILT_ALT = "kilt (alt)",
CAPE_LONG = "long",
CAPE_REGALY = "regaly",
CAPE_ONELONG = "onelong",
CAPE_HIGHLIGHT_NONE = "none",
NORMAL = "normal", // just so it doesn't cause runtimes even when don't use it
CAPE_HIGHLIGHT_NORMAL_ALT = "normal (alt)",
MARK_FIVE_WEBBING = "webbing",
MARK_THREE_WEBBING = "webbing",
MARK_ONE_WEBBING = "webbing",
SOM_BLACK = "black",
))
92 changes: 92 additions & 0 deletions code/__DEFINES/~RUtgmc_defines/modular_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,95 @@
"Charlie" = ARMOR_PALETTE_LILAC,\
),\
)

//Cape Highlight Colors

//Default
#define CAPE_PALETTE_GOLD "#6a5b2d#928446#8B7C4B#a59770"
#define CAPE_PALETTE_SILVER "#9db4c0#c2dfe3#BFDADF#e0fbfc"
#define CAPE_PALETTE_BLACK "#353340#4c4a59#4D4C57#686671"
#define CAPE_PALETTE_SYNDIE_BLACK_HELMET "#181719#3e3d3f#3E3C3D#63615e"
#define CAPE_PALETTE_NIGHTSHADE_HELMET "#080808#1b1b1f#1B1B21#2d2d37"

//Red
#define CAPE_PALETTE_RED "#682c2c#914545#894C4A#a3736e"
#define CAPE_PALETTE_SYNDIERED_HELMET "#3f0f25#820a26#7D1727#b72b2b"

//Green
#define CAPE_PALETTE_GREEN "#8fc0a9#c8d5b9#C6D8C0#faf3dd"
#define CAPE_PALETTE_TOPAZ "#18C196#5EEBA6#65E1B1#BAF7D8"
#define CAPE_PALETTE_IRISH "#1B9B13#5CE424#61D042#ACF18B"
#define CAPE_PALETTE_LEMON "#8CA600#C5E400#C2D820#F6FF5F"
#define CAPE_PALETTE_SYNDIE_GREEN "#045d3f#21a52e#39A42F#86ea21"

//Purple
#define CAPE_PALETTE_PURPLE "#4a2c69#6c4691#6C4A8A#8e6da3"
#define CAPE_PALETTE_MAGENTA "#3D3159#7F487F#845583#D185B2"

//Blue
#define CAPE_PALETTE_BLUE "#2b6666#448e8e#498686#6d9e9e"
#define CAPE_PALETTE_ICE "#1D425B#4B7EA1#54849D#93CBDC"
#define CAPE_PALETTE_SKY_BLUE "#44496B#81ABC9#8199B3#BFD7E6"
#define CAPE_PALETTE_DARK_BLUE_HELMET "#151126#242e63#20315E#275591"
#define CAPE_PALETTE_SPACE_CADET_HELMET "#151126#203357#1D3663#215ead"

//Yellow
#define CAPE_PALETTE_HONEY "#74422D#D47111#BE7724#F3B32F"
#define CAPE_PALETTE_METALLIC_BRONZE "#7C534D#A5915B#AC9774#E2E0B3"

//Orange
#define CAPE_PALETTE_ORANGE "#944224#bf5934#B45F3D#c8825e"
#define CAPE_PALETTE_ELITE_ORANGE "#a64211#d98d41#D58C46#ffd480"

//Pink
#define CAPE_PALETTE_SALMON "#84294A#BA5163#B95965#ED9082"
#define CAPE_PALETTE_PEARL_PINK "#754068#AA6183#A96F8D#DBADBB"

#define CAPE_PALETTES_LIST list(\
"Default Colors" = list(\
"Gold" = CAPE_PALETTE_GOLD,\
"Silver" = CAPE_PALETTE_SILVER,\
"Black" = CAPE_PALETTE_BLACK,\
"Syndicate Black" = CAPE_PALETTE_SYNDIE_BLACK_HELMET,\
"Nightshade" = CAPE_PALETTE_NIGHTSHADE_HELMET,\
),\
"Red" = list(\
"Red" = CAPE_PALETTE_RED,\
"Syndicate Red" = CAPE_PALETTE_SYNDIERED_HELMET,\
),\
"Orange" = list(\
"Orange" = CAPE_PALETTE_ORANGE,\
"Elite Orange" = CAPE_PALETTE_ELITE_ORANGE,\
),\
"Yellow" = list(\
"Honey" = CAPE_PALETTE_HONEY,\
"Metallic Bronze" = CAPE_PALETTE_METALLIC_BRONZE,\
),\
"Green" = list(\
"Green" = CAPE_PALETTE_GREEN,\
"Topaz" = CAPE_PALETTE_TOPAZ,\
"Irish" = CAPE_PALETTE_IRISH,\
"Lemon" = CAPE_PALETTE_LEMON,\
"Syndicate Green" = CAPE_PALETTE_SYNDIE_GREEN,\
),\
"Blue" = list(\
"Blue" = CAPE_PALETTE_BLUE,\
"Ice Blue" = CAPE_PALETTE_ICE,\
"Sky Blue" = CAPE_PALETTE_SKY_BLUE,\
"Dark Blue" = CAPE_PALETTE_DARK_BLUE_HELMET,\
"Space Cadet" = CAPE_PALETTE_SPACE_CADET_HELMET,\
),\
"Purple" = list(\
"Purple" = CAPE_PALETTE_PURPLE,\
"Magenta" = CAPE_PALETTE_MAGENTA,\
),\
"Pink" = list(\
"Salmon" = CAPE_PALETTE_SALMON,\
"Pearl Pink" = CAPE_PALETTE_PEARL_PINK,\
),\
)

#define HAIR_NO_CONCEALING "Fully revealing hair"
#define TOP_HAIR_CONCEALING "Concealing only top hair"
#define HAIR_PARTIALLY_CONCEALING "Partially concealing hair"
#define HAIR_FULL_CONCEALING "Fully concealing hair"
2 changes: 2 additions & 0 deletions code/datums/loadout/loadout_manager.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
. = ..()
user.client?.prefs.save_loadout_list(loadouts_data, CURRENT_LOADOUT_VERSION)

/* RUTGMC DELETION, CAPES
///Recursive function to update attachment lists.
/datum/loadout_manager/proc/update_attachments(list/datum/item_representation/armor_module/attachments, version)
for(var/datum/item_representation/armor_module/module AS in attachments)
Expand Down Expand Up @@ -221,6 +222,7 @@
new_glyph.item_type = /obj/item/armor_module/armor/visor_glyph/old
module.attachments.Add(new_glyph)
update_attachments(module.attachments, version)
*/

///Modifies a legacy loadout to make it valid for the current loadout version
/datum/loadout_manager/proc/legacy_version_fix(datum/loadout/loadout, loadout_name, loadout_job, datum/tgui/ui)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/clothing/modular_armor/attachments.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@
continue
armor_piece.handle_color(source, user, secondaries)

/* RUTGMC DELETION, CAPES
///Relays the extra controls to the user when the parent is examined.
/obj/item/armor_module/armor/proc/extra_examine(datum/source, mob/user, list/examine_list)
SIGNAL_HANDLER
examine_list += "Right click the [parent] with paint to color [src]"
*/

11 changes: 11 additions & 0 deletions modular_RUtgmc/code/datums/greyscale/greyscale_configs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,14 @@

/datum/greyscale_config/xenonaut/helm/mk1
icon_file = 'modular_RUtgmc/icons/mob/modular/xenonauten.dmi'

//Capes
/datum/greyscale_config/cape
icon_file = 'modular_RUtgmc/icons/mob/modular/capes.dmi'
json_config = 'modular_RUtgmc/code/datums/greyscale/json_configs/cape.json'


//Cape highlights
/datum/greyscale_config/cape_highlight
icon_file = 'modular_RUtgmc/icons/mob/modular/capes_highlight.dmi'
json_config = 'modular_RUtgmc/code/datums/greyscale/json_configs/cape_highlight.json'
66 changes: 66 additions & 0 deletions modular_RUtgmc/code/datums/greyscale/json_configs/cape.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"cape_kama": [
{
"type": "hyperscale",
"icon_state": "kama"
}
],
"cape_kilt": [
{
"type": "hyperscale",
"icon_state": "kilt"
},
{
"type":"icon_state",
"icon_state":"kilt_no_color",
"blend_mode":"overlay"
}
],
"cape_kilt (alt)": [
{
"type": "hyperscale",
"icon_state": "kilt_alt"
},
{
"type":"icon_state",
"icon_state":"kilt_no_color",
"blend_mode":"overlay"
}
],
"cape_long": [
{
"type": "hyperscale",
"icon_state": "long"
}
],
"cape_long_h": [
{
"type": "hyperscale",
"icon_state": "long_h"
}
],
"cape_regaly": [
{
"type": "hyperscale",
"icon_state": "regaly"
}
],
"cape_regaly_h": [
{
"type": "hyperscale",
"icon_state": "regaly_h"
}
],
"cape_onelong": [
{
"type": "hyperscale",
"icon_state": "onelong"
}
],
"cape_onelong_h": [
{
"type": "hyperscale",
"icon_state": "onelong_h"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"highlight_kama":[
{
"type": "hyperscale",
"icon_state": "kama"
}
],
"highlight_kilt": [
{
"type": "hyperscale",
"icon_state": "kilt"
}
],
"highlight_long":[
{
"type": "hyperscale",
"icon_state": "long"
}
],
"highlight_long_h":[
{
"type": "hyperscale",
"icon_state": "long"
}
],

"highlight_regaly":[
{
"type": "hyperscale",
"icon_state": "regaly"
}
],
"highlight_regaly_h":[
{
"type": "hyperscale",
"icon_state": "regaly_h"
}
],
"highlight_onelong":[
{
"type": "hyperscale",
"icon_state": "onelong"
}
],

"highlight_onelong_h":[
{
"type": "hyperscale",
"icon_state": "onelong"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/datum/item_representation
///If the item has hair concealing changed, save it.
var/hair_concealing_option

/datum/item_representation/New(obj/item/item_to_copy)
if(!item_to_copy)
return
item_type = item_to_copy.type
if(item_to_copy.current_variant && item_to_copy.colorable_allowed & ICON_STATE_VARIANTS_ALLOWED)
for(var/key in GLOB.loadout_variant_keys)
var/val = GLOB.loadout_variant_keys[key]
if(val != item_to_copy.current_variant)
continue
variant = key
break

if(item_to_copy.current_hair_concealment && item_to_copy.colorable_allowed & HAIR_CONCEALING_CHANGE_ALLOWED)
hair_concealing_option = item_to_copy.current_hair_concealment

if(!item_to_copy.greyscale_config)
return
colors = item_to_copy.greyscale_colors

/datum/item_representation/instantiate_object(datum/loadout_seller/seller, master = null, mob/living/carbon/human/user)
if(seller && !bypass_vendor_check && !buy_item_in_vendor(item_type, seller, user))
return
if(!text2path("[item_type]"))
to_chat(user, span_warning("[item_type] in your loadout is an invalid item, it has probably been changed or removed."))
return
var/obj/item/item = new item_type(master)
if(item.greyscale_config)
item.set_greyscale_colors(colors)
if(item.current_variant && item.colorable_allowed & ICON_STATE_VARIANTS_ALLOWED)
item.current_variant = GLOB.loadout_variant_keys[variant]
item.update_icon()
if(item.colorable_allowed & HAIR_CONCEALING_CHANGE_ALLOWED)
item.current_hair_concealment = hair_concealing_option
item.switch_hair_concealment_flags(user)
return item
Loading

0 comments on commit eac87b3

Please sign in to comment.