Merge pull request #11379 from Ghommie/Ghommie-cit611
Polychromic element.
@@ -242,12 +242,14 @@
|
||||
#define COMSIG_ITEM_IMBUE_SOUL "item_imbue_soul" //return a truthy value to prevent ensouling, checked in /obj/effect/proc_holder/spell/targeted/lichdom/cast(): (mob/user)
|
||||
#define COMSIG_ITEM_HIT_REACT "item_hit_react" //from base of obj/item/hit_reaction(): (list/args)
|
||||
#define COMSIG_ITEM_WEARERCROSSED "wearer_crossed" //called on item when crossed by something (): (/atom/movable)
|
||||
#define COMSIG_ITEM_WORN_OVERLAYS "item_worn_overlays" //from base of obj/item/worn_overlays(): (isinhands, icon_file, used_state, style_flags, list/overlays)
|
||||
// THE FOLLOWING TWO BLOCKS SHOULD RETURN BLOCK FLAGS AS DEFINED IN __DEFINES/combat.dm!
|
||||
#define COMSIG_ITEM_CHECK_BLOCK "check_block" //from base of obj/item/check_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
#define COMSIG_ITEM_RUN_BLOCK "run_block" //from base of obj/item/run_block(): (mob/living/owner, atom/object, damage, attack_text, attack_type, armour_penetration, mob/attacker, def_zone, final_block_chance, list/block_return)
|
||||
|
||||
// /obj/item/clothing signals
|
||||
#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
|
||||
#define COMSIG_SUIT_MADE_HELMET "suit_made_helmet" //from base of obj/item/clothing/suit/MakeHelmet(): (helmet)
|
||||
|
||||
// /obj/item/implant signals
|
||||
#define COMSIG_IMPLANT_ACTIVATED "implant_activated" //from base of /obj/item/implant/proc/activate(): ()
|
||||
|
||||
@@ -550,6 +550,27 @@
|
||||
for(var/thing in flat_list)
|
||||
.[thing] = TRUE
|
||||
|
||||
/proc/deep_list2params(list/deep_list)
|
||||
var/list/L = list()
|
||||
for(var/i in deep_list)
|
||||
var/key = i
|
||||
if(isnum(key))
|
||||
L += "[key]"
|
||||
continue
|
||||
if(islist(key))
|
||||
key = deep_list2params(key)
|
||||
else if(!istext(key))
|
||||
key = "[REF(key)]"
|
||||
L += "[key]"
|
||||
var/value = deep_list[key]
|
||||
if(!isnull(value))
|
||||
if(islist(value))
|
||||
value = deep_list2params(value)
|
||||
else if(!(istext(key) || isnum(key)))
|
||||
value = "[REF(value)]"
|
||||
L["[key]"] = "[value]"
|
||||
return list2params(L)
|
||||
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((islist(L) && length(L)) ? pick(L) : default)
|
||||
|
||||
|
||||
@@ -38,11 +38,17 @@ PROCESSING_SUBSYSTEM_DEF(dcs)
|
||||
if(istext(key))
|
||||
value = arguments[key]
|
||||
if(!(istext(key) || isnum(key)))
|
||||
key = REF(key)
|
||||
if(islist(key)) // CITADEL EDIT
|
||||
key = deep_list2params(key)
|
||||
else
|
||||
key = REF(key)
|
||||
key = "[key]" // Key is stringified so numbers dont break things
|
||||
if(!isnull(value))
|
||||
if(!(istext(value) || isnum(value)))
|
||||
value = REF(value)
|
||||
if(islist(value)) // CITADEL EDIT
|
||||
value = deep_list2params(value)
|
||||
else
|
||||
value = REF(value)
|
||||
named_arguments["[key]"] = value
|
||||
else
|
||||
fullid += "[key]"
|
||||
|
||||
@@ -6,13 +6,15 @@
|
||||
/datum/action
|
||||
var/name = "Generic Action"
|
||||
var/desc = null
|
||||
var/obj/target = null
|
||||
var/atom/target = null
|
||||
var/check_flags = 0
|
||||
var/required_mobility_flags = MOBILITY_USE
|
||||
var/processing = FALSE
|
||||
var/obj/screen/movable/action_button/button = null
|
||||
var/buttontooltipstyle = ""
|
||||
var/transparent_when_unavailable = TRUE
|
||||
var/use_target_appearance = FALSE
|
||||
var/list/target_appearance_matrix //if set, will be used to transform the target button appearance as an arglist.
|
||||
|
||||
var/button_icon = 'icons/mob/actions/backgrounds.dmi' //This is the file for the BACKGROUND icon
|
||||
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND //And this is the state for the background icon
|
||||
@@ -88,7 +90,7 @@
|
||||
/datum/action/proc/Trigger()
|
||||
if(!IsAvailable())
|
||||
return FALSE
|
||||
if(SEND_SIGNAL(src, COMSIG_ACTION_TRIGGER, src) & COMPONENT_ACTION_BLOCK_TRIGGER)
|
||||
if(SEND_SIGNAL(src, COMSIG_ACTION_TRIGGER, target) & COMPONENT_ACTION_BLOCK_TRIGGER)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -116,29 +118,42 @@
|
||||
return TRUE
|
||||
|
||||
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
|
||||
if(button)
|
||||
if(!status_only)
|
||||
button.name = name
|
||||
button.desc = desc
|
||||
if(owner && owner.hud_used && background_icon_state == ACTION_BUTTON_DEFAULT_BACKGROUND)
|
||||
var/list/settings = owner.hud_used.get_action_buttons_icons()
|
||||
if(button.icon != settings["bg_icon"])
|
||||
button.icon = settings["bg_icon"]
|
||||
if(button.icon_state != settings["bg_state"])
|
||||
button.icon_state = settings["bg_state"]
|
||||
else
|
||||
if(button.icon != button_icon)
|
||||
button.icon = button_icon
|
||||
if(button.icon_state != background_icon_state)
|
||||
button.icon_state = background_icon_state
|
||||
if(!button)
|
||||
return
|
||||
if(!status_only)
|
||||
button.name = name
|
||||
button.desc = desc
|
||||
if(owner && owner.hud_used && background_icon_state == ACTION_BUTTON_DEFAULT_BACKGROUND)
|
||||
var/list/settings = owner.hud_used.get_action_buttons_icons()
|
||||
if(button.icon != settings["bg_icon"])
|
||||
button.icon = settings["bg_icon"]
|
||||
if(button.icon_state != settings["bg_state"])
|
||||
button.icon_state = settings["bg_state"]
|
||||
else
|
||||
if(button.icon != button_icon)
|
||||
button.icon = button_icon
|
||||
if(button.icon_state != background_icon_state)
|
||||
button.icon_state = background_icon_state
|
||||
|
||||
if(!use_target_appearance)
|
||||
ApplyIcon(button, force)
|
||||
|
||||
if(!IsAvailable(TRUE))
|
||||
button.color = transparent_when_unavailable ? rgb(128,0,0,128) : rgb(128,0,0)
|
||||
else
|
||||
button.color = rgb(255,255,255,255)
|
||||
return 1
|
||||
else if(target && button.appearance_cache != target.appearance) //replace with /ref comparison if this is not valid.
|
||||
var/mutable_appearance/M = new(target)
|
||||
M.layer = FLOAT_LAYER
|
||||
M.plane = FLOAT_PLANE
|
||||
if(target_appearance_matrix)
|
||||
var/list/L = target_appearance_matrix
|
||||
M.transform = matrix(L[1], L[2], L[3], L[4], L[5], L[6])
|
||||
button.cut_overlays()
|
||||
button.add_overlay(M)
|
||||
button.appearance_cache = target.appearance
|
||||
|
||||
if(!IsAvailable(TRUE))
|
||||
button.color = transparent_when_unavailable ? rgb(128,0,0,128) : rgb(128,0,0)
|
||||
else
|
||||
button.color = rgb(255,255,255,255)
|
||||
return 1
|
||||
|
||||
/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE)
|
||||
if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force))
|
||||
@@ -165,6 +180,7 @@
|
||||
/datum/action/item_action
|
||||
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
|
||||
button_icon_state = null
|
||||
use_target_appearance = TRUE
|
||||
// If you want to override the normal icon being the item
|
||||
// then change this to an icon state
|
||||
|
||||
@@ -188,23 +204,6 @@
|
||||
I.ui_action_click(owner, src)
|
||||
return 1
|
||||
|
||||
/datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button, force)
|
||||
if(button_icon && button_icon_state)
|
||||
// If set, use the custom icon that we set instead
|
||||
// of the item appearence
|
||||
..()
|
||||
else if(target && current_button.appearance_cache != target.appearance) //replace with /ref comparison if this is not valid.
|
||||
var/obj/item/I = target
|
||||
var/old_layer = I.layer
|
||||
var/old_plane = I.plane
|
||||
I.layer = FLOAT_LAYER //AAAH
|
||||
I.plane = FLOAT_PLANE //^ what that guy said
|
||||
current_button.cut_overlays()
|
||||
current_button.add_overlay(I)
|
||||
I.layer = old_layer
|
||||
I.plane = old_plane
|
||||
current_button.appearance_cache = I.appearance
|
||||
|
||||
/datum/action/item_action/toggle_light
|
||||
name = "Toggle Light"
|
||||
|
||||
|
||||
@@ -790,7 +790,7 @@
|
||||
user.visible_message("<span class='warning'>[user] draws [I] from [parent]!</span>", "<span class='notice'>You draw [I] from [parent].</span>")
|
||||
return TRUE
|
||||
|
||||
/datum/component/storage/proc/action_trigger(datum/signal_source, datum/action/source)
|
||||
/datum/component/storage/proc/action_trigger(datum/action/source, obj/target)
|
||||
gather_mode_switch(source.owner)
|
||||
return COMPONENT_ACTION_BLOCK_TRIGGER
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
/**
|
||||
*The following procs simply acts as hooks for quit(), since components do not use callbacks anymore
|
||||
*/
|
||||
/datum/component/virtual_reality/proc/action_trigger(datum/signal_source, datum/action/source)
|
||||
/datum/component/virtual_reality/proc/action_trigger(datum/action/source, obj/target)
|
||||
quit()
|
||||
return COMPONENT_ACTION_BLOCK_TRIGGER
|
||||
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
#define POLYCHROMIC_ALTCLICK (1<<0)
|
||||
#define POLYCHROMIC_ACTION (1<<1)
|
||||
#define POLYCHROMIC_NO_HELD (1<<2)
|
||||
#define POLYCHROMIC_NO_WORN (1<<3)
|
||||
|
||||
/datum/element/polychromic
|
||||
element_flags = ELEMENT_BESPOKE|ELEMENT_DETACH
|
||||
id_arg_index = 3
|
||||
var/overlays_states //A list or a number of states. In the latter case, the atom icon_state/item_state will be used followed by a number.
|
||||
var/list/colors_by_atom = list() //list of color strings or mutable appearances, depending on the above variable.
|
||||
var/icon_file
|
||||
var/worn_file //used in place of items' held or mob overlay icons if present.
|
||||
var/list/overlays_names //wrap numbers into text strings please.
|
||||
var/list/actions_by_atom = list()
|
||||
var/poly_flags
|
||||
var/static/list/suits_with_helmet_typecache = typecacheof(list(/obj/item/clothing/suit/hooded, /obj/item/clothing/suit/space/hardsuit))
|
||||
var/list/helmet_by_suit = list() //because poly winter coats exist.
|
||||
var/list/suit_by_helmet = list() //Idem.
|
||||
|
||||
/datum/element/polychromic/Attach(datum/target, list/colors, states, _flags = POLYCHROMIC_ACTION|POLYCHROMIC_NO_HELD, _icon, _worn, list/names = list("Primary", "Secondary", "Tertiary", "Quaternary", "Quinary", "Senary"))
|
||||
. = ..()
|
||||
var/make_appearances = islist(states)
|
||||
var/states_len = make_appearances ? length(states) : states
|
||||
var/names_len = length(names)
|
||||
if(!states_len || !names_len || colors_by_atom[target] || !isatom(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
var/atom/A = target
|
||||
|
||||
overlays_states = states
|
||||
icon_file = _icon
|
||||
worn_file = _worn
|
||||
poly_flags = _flags
|
||||
|
||||
var/mut_icon = icon_file || A.icon
|
||||
var/list/L = list()
|
||||
for(var/I in 1 to states_len)
|
||||
var/col = LAZYACCESS(colors, I) || "#FFFFFF"
|
||||
L += make_appearances ? mutable_appearance(mut_icon, overlays_states[I], color = col) : col
|
||||
colors_by_atom[A] = L
|
||||
|
||||
RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlays)
|
||||
|
||||
if(_flags & POLYCHROMIC_ALTCLICK)
|
||||
RegisterSignal(A, COMSIG_PARENT_EXAMINE, .proc/on_examine)
|
||||
RegisterSignal(A, COMSIG_CLICK_ALT, .proc/set_color)
|
||||
|
||||
if(!overlays_names && names) //generate
|
||||
overlays_names = names
|
||||
var/diff = states_len - names_len
|
||||
if(diff > 0)
|
||||
for(var/i in 1 to diff)
|
||||
overlays_names += "[names_len + i]°"
|
||||
else if(diff < 0)
|
||||
overlays_names.len += diff
|
||||
|
||||
if(isitem(A))
|
||||
if(_flags & POLYCHROMIC_ACTION)
|
||||
RegisterSignal(A, COMSIG_ITEM_EQUIPPED, .proc/grant_user_action)
|
||||
RegisterSignal(A, COMSIG_ITEM_DROPPED, .proc/remove_user_action)
|
||||
if(!(_flags & POLYCHROMIC_NO_WORN) || !(_flags & POLYCHROMIC_NO_HELD))
|
||||
A.AddElement(/datum/element/update_icon_updates_onmob)
|
||||
RegisterSignal(A, COMSIG_ITEM_WORN_OVERLAYS, .proc/apply_worn_overlays)
|
||||
if(suits_with_helmet_typecache[A.type])
|
||||
RegisterSignal(A, COMSIG_SUIT_MADE_HELMET, .proc/register_helmet)
|
||||
else if(_flags & POLYCHROMIC_ACTION && ismob(A)) //in the event mob update icon procs are ever standarized.
|
||||
var/datum/action/polychromic/P = new(A)
|
||||
RegisterSignal(P, COMSIG_ACTION_TRIGGER, .proc/activate_action)
|
||||
actions_by_atom[A] = P
|
||||
P.Grant(A)
|
||||
|
||||
A.update_icon() //apply the overlays.
|
||||
|
||||
/datum/element/polychromic/Detach(atom/A)
|
||||
. = ..()
|
||||
colors_by_atom -= A
|
||||
var/datum/action/polychromic/P = actions_by_atom[A]
|
||||
if(P)
|
||||
actions_by_atom -= A
|
||||
qdel(P)
|
||||
UnregisterSignal(A, list(COMSIG_PARENT_EXAMINE, COMSIG_CLICK_ALT, COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_ITEM_EQUIPPED, COMSIG_ITEM_DROPPED, COMSIG_ITEM_WORN_OVERLAYS, COMSIG_SUIT_MADE_HELMET))
|
||||
if(isitem(A))
|
||||
var/obj/item/clothing/head/H = helmet_by_suit[A]
|
||||
if(H)
|
||||
UnregisterSignal(H, list(COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_ITEM_WORN_OVERLAYS, COMSIG_PARENT_QDELETING))
|
||||
helmet_by_suit -= A
|
||||
suit_by_helmet -= H
|
||||
colors_by_atom -= H
|
||||
if(!QDELETED(H))
|
||||
H.update_icon() //removing the overlays
|
||||
if(!(poly_flags & POLYCHROMIC_NO_WORN) || !(poly_flags & POLYCHROMIC_NO_HELD))
|
||||
A.RemoveElement(/datum/element/update_icon_updates_onmob)
|
||||
if(!QDELETED(A) && ismob(A.loc))
|
||||
var/mob/M = A.loc
|
||||
if(!(poly_flags & POLYCHROMIC_NO_HELD) && M.is_holding(A))
|
||||
M.update_inv_hands()
|
||||
else if(!(poly_flags & POLYCHROMIC_NO_WORN))
|
||||
M.regenerate_icons()
|
||||
if(!QDELETED(A))
|
||||
A.update_icon() //removing the overlays
|
||||
|
||||
/datum/element/polychromic/proc/apply_overlays(atom/source, list/overlays)
|
||||
var/list/L = colors_by_atom[source]
|
||||
var/f_icon = icon_file || source.icon
|
||||
if(isnum(overlays_states))
|
||||
for(var/i in 1 to overlays_states)
|
||||
overlays += mutable_appearance(f_icon, "[source.icon_state]-[i]", color = L[i])
|
||||
else
|
||||
overlays += colors_by_atom[source]
|
||||
|
||||
/datum/element/polychromic/proc/apply_worn_overlays(obj/item/source, isinhands, icon, used_state, style_flags, list/overlays)
|
||||
if(poly_flags & (isinhands ? POLYCHROMIC_NO_HELD : POLYCHROMIC_NO_WORN))
|
||||
return
|
||||
var/f_icon = worn_file || icon
|
||||
var/list/L = colors_by_atom[source]
|
||||
|
||||
if(isnum(overlays_states))
|
||||
for(var/i in 1 to overlays_states)
|
||||
overlays += mutable_appearance(f_icon, "[used_state]-[i]", color = L[i])
|
||||
else
|
||||
for(var/i in 1 to length(overlays_states))
|
||||
var/mutable_appearance/M = L[i]
|
||||
overlays += mutable_appearance(f_icon, overlays_states[i], color = M.color)
|
||||
|
||||
/datum/element/polychromic/proc/set_color(atom/source, mob/user)
|
||||
var/choice = input(user,"Polychromic options", "Recolor [source]") as null|anything in overlays_names
|
||||
if(!choice || QDELETED(source) || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY))
|
||||
return
|
||||
var/index = overlays_names.Find(choice)
|
||||
var/list/L = colors_by_atom[source]
|
||||
if(!L) // Ummmmmh.
|
||||
return
|
||||
var/mutable_appearance/M = L[index]
|
||||
var/old_color = istype(M) ? M.color : M
|
||||
var/ncolor = input(user, "Polychromic options", "Choose [choice] Color", old_color) as color|null
|
||||
if(!ncolor || QDELETED(source) || !colors_by_atom[source] || !user.canUseTopic(source, BE_CLOSE, NO_DEXTERY))
|
||||
return
|
||||
ncolor = sanitize_hexcolor(ncolor, 6, TRUE, old_color)
|
||||
if(istype(M))
|
||||
M.color = ncolor
|
||||
else
|
||||
L[index] = ncolor
|
||||
|
||||
source.update_icon()
|
||||
return TRUE
|
||||
|
||||
/datum/element/polychromic/proc/grant_user_action(atom/source, mob/user, slot)
|
||||
if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED || slot == SLOT_HANDCUFFED || slot == SLOT_GENERC_DEXTROUS_STORAGE)
|
||||
return
|
||||
var/datum/action/polychromic/P = actions_by_atom[source]
|
||||
if(!P)
|
||||
P = new (source)
|
||||
P.name = "Modify [source]'\s Colors"
|
||||
actions_by_atom[source] = P
|
||||
P.check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_CONSCIOUS
|
||||
RegisterSignal(P, COMSIG_ACTION_TRIGGER, .proc/activate_action)
|
||||
P.Grant(user)
|
||||
|
||||
/datum/element/polychromic/proc/remove_user_action(atom/source, mob/user)
|
||||
var/datum/action/polychromic/P = actions_by_atom[source]
|
||||
P?.Remove(user)
|
||||
|
||||
/datum/element/polychromic/proc/activate_action(datum/action/source, atom/target)
|
||||
set_color(target, source.owner)
|
||||
|
||||
/datum/element/polychromic/proc/on_examine(atom/source, mob/user, list/examine_list)
|
||||
examine_list += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/datum/element/polychromic/proc/register_helmet(atom/source, obj/item/clothing/head/H)
|
||||
suit_by_helmet[H] = source
|
||||
helmet_by_suit[source] = H
|
||||
colors_by_atom[H] = colors_by_atom[source]
|
||||
RegisterSignal(H, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlays)
|
||||
RegisterSignal(H, COMSIG_ITEM_WORN_OVERLAYS, .proc/apply_worn_overlays)
|
||||
RegisterSignal(H, COMSIG_PARENT_QDELETING, .proc/unregister_helmet)
|
||||
|
||||
/datum/element/polychromic/proc/unregister_helmet(atom/source)
|
||||
var/obj/item/clothing/suit/S = suit_by_helmet[source]
|
||||
suit_by_helmet -= source
|
||||
helmet_by_suit -= S
|
||||
colors_by_atom -= source
|
||||
|
||||
/datum/action/polychromic
|
||||
name = "Modify Polychromic Colors"
|
||||
background_icon_state = "bg_polychromic"
|
||||
use_target_appearance = TRUE
|
||||
button_icon_state = null
|
||||
target_appearance_matrix = list(0.8,0,0,0,0.8,0)
|
||||
@@ -5,7 +5,7 @@
|
||||
. = ..()
|
||||
if(!istype(target, /obj/item))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
RegisterSignal(target, COMSIG_ATOM_UPDATED_ICON, .proc/update_onmob)
|
||||
RegisterSignal(target, COMSIG_ATOM_UPDATED_ICON, .proc/update_onmob, override = TRUE)
|
||||
|
||||
/datum/element/update_icon_updates_onmob/proc/update_onmob(obj/item/target)
|
||||
if(ismob(target.loc))
|
||||
|
||||
@@ -434,6 +434,13 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
item_flags |= IN_INVENTORY
|
||||
user.update_equipment_speed_mods()
|
||||
|
||||
//Overlays for the worn overlay so you can overlay while you overlay
|
||||
//eg: ammo counters, primed grenade flashing, etc.
|
||||
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = list()
|
||||
SEND_SIGNAL(src, COMSIG_ITEM_WORN_OVERLAYS, isinhands, icon_file, used_state, style_flags, .)
|
||||
|
||||
//sometimes we only want to grant the item's action if it's equipped in a specific slot.
|
||||
/obj/item/proc/item_action_slot_check(slot, mob/user, datum/action/A)
|
||||
if(slot == SLOT_IN_BACKPACK || slot == SLOT_LEGCUFFED) //these aren't true slots, so avoid granting actions there
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
cable_overlay.color = GLOB.cable_colors[colors[current_color_index]]
|
||||
. += cable_overlay
|
||||
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/twohanded/rcl/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands || !(loaded?.amount))
|
||||
return
|
||||
|
||||
@@ -303,8 +303,8 @@
|
||||
block_chance = 50
|
||||
var/shield_icon = "shield-red"
|
||||
|
||||
/obj/item/nullrod/staff/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/nullrod/staff/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
. += mutable_appearance('icons/effects/effects.dmi', shield_icon, MOB_LAYER + 0.01)
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/melee/transforming/energy/sword/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(isinhands)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
for(var/obj/item/I in contents)
|
||||
. += I.get_belt_overlay()
|
||||
|
||||
/obj/item/storage/belt/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/storage/belt/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && onmob_overlays)
|
||||
for(var/obj/item/I in contents)
|
||||
|
||||
@@ -376,8 +376,8 @@
|
||||
filling.color = mix_color_from_reagents(reagents.reagent_list)
|
||||
add_overlay(filling)
|
||||
|
||||
/obj/item/reagent_containers/chemtank/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE) //apply chemcolor and level
|
||||
. = list()
|
||||
/obj/item/reagent_containers/chemtank/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE) //apply chemcolor and level
|
||||
. = ..()
|
||||
//inhands + reagent_filling
|
||||
if(!isinhands && reagents.total_volume)
|
||||
var/mutable_appearance/filling = mutable_appearance('icons/obj/reagentfillings.dmi', "backpackmob-10")
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
base_overlay.appearance_flags = RESET_COLOR
|
||||
. += base_overlay
|
||||
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/screwdriver/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands && random_color)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "screwdriver_head")
|
||||
M.appearance_flags = RESET_COLOR
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/toy/sword/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(active)
|
||||
if(isinhands)
|
||||
|
||||
@@ -531,7 +531,7 @@
|
||||
update_light()
|
||||
return TRUE
|
||||
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/twohanded/dualsaber/hypereutactic/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
var/mutable_appearance/gem_inhand = mutable_appearance(icon_file, "hypereutactic_gem")
|
||||
|
||||
@@ -222,7 +222,7 @@ LINEN BINS
|
||||
add_overlay(g_mouth)
|
||||
add_overlay(g_eyes)
|
||||
|
||||
/obj/item/bedsheet/gondola/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/bedsheet/gondola/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
. += mutable_appearance(icon_file, g_mouth)
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
. = ..()
|
||||
addtimer(CALLBACK(src, .proc/check_on_mob, user), 1) //dropped is called before the item is out of the slot, so we need to check slightly later
|
||||
|
||||
/obj/item/clockwork/slab/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clockwork/slab/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands && item_state && inhand_overlay)
|
||||
var/mutable_appearance/M = mutable_appearance(icon_file, "slab_[inhand_overlay]")
|
||||
. += M
|
||||
|
||||
@@ -451,8 +451,8 @@
|
||||
return BLOCK_SUCCESS | BLOCK_PHYSICAL_EXTERNAL
|
||||
return BLOCK_NONE
|
||||
|
||||
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/suit/hooded/cultrobes/cult_shield/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && current_charges)
|
||||
. += mutable_appearance('icons/effects/cult_effects.dmi', "shield-cult", MOB_LAYER + 0.01)
|
||||
|
||||
|
||||
@@ -47,25 +47,12 @@
|
||||
//Add a "exclude" string to do the opposite, making it only only species listed that can't wear it.
|
||||
//You append this to clothing objects.
|
||||
|
||||
//Polychrome stuff:
|
||||
var/hasprimary = FALSE //These vars allow you to choose which overlays a clothing has
|
||||
var/hassecondary = FALSE
|
||||
var/hastertiary = FALSE
|
||||
var/primary_color = "#FFFFFF" //RGB in hexcode
|
||||
var/secondary_color = "#FFFFFF"
|
||||
var/tertiary_color = "#808080"
|
||||
|
||||
//No idea what this is but eh -tori
|
||||
var/force_alternate_icon = FALSE
|
||||
|
||||
/obj/item/clothing/Initialize()
|
||||
. = ..()
|
||||
if(CHECK_BITFIELD(clothing_flags, VOICEBOX_TOGGLABLE))
|
||||
actions_types += /datum/action/item_action/toggle_voice_box
|
||||
if(ispath(pocket_storage_component_path))
|
||||
LoadComponent(pocket_storage_component_path)
|
||||
if(hasprimary | hassecondary | hastertiary) //Checks if polychrome is enabled
|
||||
update_icon() //Applies the overlays and default colors onto the clothes on spawn.
|
||||
|
||||
/obj/item/clothing/MouseDrop(atom/over_object)
|
||||
. = ..()
|
||||
@@ -150,8 +137,6 @@
|
||||
how_cool_are_your_threads += "Adding or removing items from [src] makes no noise.\n"
|
||||
how_cool_are_your_threads += "</span>"
|
||||
. += how_cool_are_your_threads.Join()
|
||||
if(hasprimary | hassecondary | hastertiary) //Checks if polychrome is enabled
|
||||
. += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/obj/item/clothing/obj_break(damage_flag)
|
||||
if(!damaged_clothes)
|
||||
@@ -195,173 +180,6 @@ BLIND // can't see anything
|
||||
female_clothing_icon = fcopy_rsc(female_clothing_icon)
|
||||
GLOB.female_clothing_icons[index] = female_clothing_icon
|
||||
|
||||
/obj/item/clothing/under/verb/toggle()
|
||||
set name = "Adjust Suit Sensors"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
var/mob/M = usr
|
||||
if (istype(M, /mob/dead/))
|
||||
return
|
||||
if (!can_use(M))
|
||||
return
|
||||
if(src.has_sensor == LOCKED_SENSORS)
|
||||
to_chat(usr, "The controls are locked.")
|
||||
return 0
|
||||
if(src.has_sensor == BROKEN_SENSORS)
|
||||
to_chat(usr, "The sensors have shorted out!")
|
||||
return 0
|
||||
if(src.has_sensor <= NO_SENSORS)
|
||||
to_chat(usr, "This suit does not have any sensors.")
|
||||
return 0
|
||||
|
||||
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
|
||||
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
|
||||
if(get_dist(usr, src) > 1)
|
||||
to_chat(usr, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
sensor_mode = modes.Find(switchMode) - 1
|
||||
|
||||
if (src.loc == usr)
|
||||
switch(sensor_mode)
|
||||
if(0)
|
||||
to_chat(usr, "<span class='notice'>You disable your suit's remote sensing equipment.</span>")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report whether you are alive or dead.</span>")
|
||||
if(2)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report your exact vital lifesigns.</span>")
|
||||
if(3)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
|
||||
/obj/item/clothing/under/CtrlClick(mob/user)
|
||||
. = ..()
|
||||
|
||||
if (!(item_flags & IN_INVENTORY))
|
||||
return
|
||||
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
if(has_sensor == LOCKED_SENSORS)
|
||||
to_chat(user, "The controls are locked.")
|
||||
return
|
||||
if(has_sensor == BROKEN_SENSORS)
|
||||
to_chat(user, "The sensors have shorted out!")
|
||||
return
|
||||
if(has_sensor <= NO_SENSORS)
|
||||
to_chat(user, "This suit does not have any sensors.")
|
||||
return
|
||||
|
||||
sensor_mode = SENSOR_COORDS
|
||||
|
||||
to_chat(user, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
/obj/item/clothing/under/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(attached_accessory)
|
||||
remove_accessory(user)
|
||||
else
|
||||
rolldown()
|
||||
// Polychrome stuff:
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
var/choice = input(user,"polychromic thread options", "Clothing Recolor") as null|anything in list("[hasprimary ? "Primary Color" : ""]", "[hassecondary ? "Secondary Color" : ""]", "[hastertiary ? "Tertiary Color" : ""]") //generates a list depending on the enabled overlays
|
||||
switch(choice) //Lets the list's options actually lead to something
|
||||
if("Primary Color")
|
||||
var/primary_color_input = input(usr,"","Choose Primary Color",primary_color) as color|null //color input menu, the "|null" adds a cancel button to it.
|
||||
if(primary_color_input) //Checks if the color selected is NULL, rejects it if it is NULL.
|
||||
primary_color = sanitize_hexcolor(primary_color_input, desired_format=6, include_crunch=1) //formats the selected color properly
|
||||
update_icon() //updates the item icon
|
||||
user.regenerate_icons() //updates the worn icon. Probably a bad idea, but it works.
|
||||
if("Secondary Color")
|
||||
var/secondary_color_input = input(usr,"","Choose Secondary Color",secondary_color) as color|null
|
||||
if(secondary_color_input)
|
||||
secondary_color = sanitize_hexcolor(secondary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
if("Tertiary Color")
|
||||
var/tertiary_color_input = input(usr,"","Choose Tertiary Color",tertiary_color) as color|null
|
||||
if(tertiary_color_input)
|
||||
tertiary_color = sanitize_hexcolor(tertiary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/neck/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
// Polychrome stuff:
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
var/choice = input(user,"polychromic thread options", "Clothing Recolor") as null|anything in list("[hasprimary ? "Primary Color" : ""]", "[hassecondary ? "Secondary Color" : ""]", "[hastertiary ? "Tertiary Color" : ""]") //generates a list depending on the enabled overlays
|
||||
switch(choice) //Lets the list's options actually lead to something
|
||||
if("Primary Color")
|
||||
var/primary_color_input = input(usr,"","Choose Primary Color",primary_color) as color|null //color input menu, the "|null" adds a cancel button to it.
|
||||
if(primary_color_input) //Checks if the color selected is NULL, rejects it if it is NULL.
|
||||
primary_color = sanitize_hexcolor(primary_color_input, desired_format=6, include_crunch=1) //formats the selected color properly
|
||||
update_icon() //updates the item icon
|
||||
user.regenerate_icons() //updates the worn icon. Probably a bad idea, but it works.
|
||||
if("Secondary Color")
|
||||
var/secondary_color_input = input(usr,"","Choose Secondary Color",secondary_color) as color|null
|
||||
if(secondary_color_input)
|
||||
secondary_color = sanitize_hexcolor(secondary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
if("Tertiary Color")
|
||||
var/tertiary_color_input = input(usr,"","Choose Tertiary Color",tertiary_color) as color|null
|
||||
if(tertiary_color_input)
|
||||
tertiary_color = sanitize_hexcolor(tertiary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/under/verb/jumpsuit_adjust()
|
||||
set name = "Adjust Jumpsuit Style"
|
||||
set category = null
|
||||
set src in usr
|
||||
rolldown()
|
||||
|
||||
/obj/item/clothing/under/proc/rolldown()
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!can_adjust)
|
||||
to_chat(usr, "<span class='warning'>You cannot wear this suit any differently!</span>")
|
||||
return
|
||||
if(toggle_jumpsuit_adjust())
|
||||
to_chat(usr, "<span class='notice'>You adjust the suit to wear it more casually.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You adjust the suit back to normal.</span>")
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.update_inv_w_uniform()
|
||||
H.update_body()
|
||||
|
||||
/obj/item/clothing/under/proc/toggle_jumpsuit_adjust()
|
||||
adjusted = !adjusted
|
||||
|
||||
if(adjusted)
|
||||
if(fitted != FEMALE_UNIFORM_TOP)
|
||||
fitted = NO_FEMALE_UNIFORM
|
||||
if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted
|
||||
body_parts_covered &= ~CHEST
|
||||
else
|
||||
fitted = initial(fitted)
|
||||
if(!alt_covers_chest)
|
||||
body_parts_covered |= CHEST
|
||||
|
||||
return adjusted
|
||||
|
||||
/obj/item/clothing/proc/weldingvisortoggle(mob/user) //proc to toggle welding visors on helmets, masks, goggles, etc.
|
||||
if(!can_use(user))
|
||||
return FALSE
|
||||
@@ -441,15 +259,3 @@ BLIND // can't see anything
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/update_overlays() // Polychrome stuff
|
||||
. = ..()
|
||||
if(hasprimary) //Checks if the overlay is enabled
|
||||
var/mutable_appearance/primary_overlay = mutable_appearance(icon, "[item_state]-primary", color = primary_color) //Automagically picks overlays
|
||||
. += primary_overlay //Applies the coloured overlay onto the item sprite. but NOT the mob sprite.
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_overlay = mutable_appearance(icon, "[item_state]-secondary", color = secondary_color)
|
||||
. += secondary_overlay
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_overlay = mutable_appearance(icon, "[item_state]-tertiary", color = tertiary_color)
|
||||
. += tertiary_overlay
|
||||
|
||||
@@ -346,8 +346,8 @@
|
||||
add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY)
|
||||
colored_before = TRUE
|
||||
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && ishuman(loc) && !colored_before)
|
||||
var/mob/living/carbon/human/H = loc
|
||||
var/mutable_appearance/M = mutable_appearance('icons/mob/clothing/eyes.dmi', "blindfoldwhite")
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
user.visible_message("<span class='suicide'>\the [src] are forcing [user]'s hands around [user.p_their()] neck! It looks like the gloves are possessed!</span>")
|
||||
return OXYLOSS
|
||||
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/gloves/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves")
|
||||
|
||||
@@ -48,8 +48,8 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/clothing/head/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/head/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet")
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
playsound(src, 'sound/mecha/mechmove03.ogg', 50, TRUE) //Visors don't just come from nothing
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/hardhat/weldhat/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
. += mutable_appearance('icons/mob/clothing/head.dmi', "weldhelmet")
|
||||
|
||||
@@ -204,8 +204,8 @@
|
||||
icon = S.icon
|
||||
icon_state = S.icon_state
|
||||
|
||||
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/head/wig/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/datum/sprite_accessory/S = GLOB.hair_styles_list[hair_style]
|
||||
if(!S)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
/obj/item/clothing/mask/proc/handle_speech()
|
||||
|
||||
/obj/item/clothing/mask/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/mask/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(body_parts_covered & HEAD)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
strip_delay = 40
|
||||
equip_delay_other = 40
|
||||
|
||||
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE, icon_flag, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/neck/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(body_parts_covered & HEAD)
|
||||
if(damaged_clothes)
|
||||
@@ -169,54 +169,44 @@
|
||||
name = "pet collar"
|
||||
desc = "It's for pets. Though you probably could wear it yourself, you'd doubtless be the subject of ridicule. It seems to be made out of a polychromic material."
|
||||
icon_state = "petcollar"
|
||||
mob_overlay_icon = 'icons/mob/clothing/neck.dmi' //Because, as it appears, the item itself is normally not directly aware of its worn overlays, so this is about the easiest way, without adding a new var.
|
||||
hasprimary = TRUE
|
||||
primary_color = "#00BBBB"
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/small/collar
|
||||
var/poly_states = 1
|
||||
var/poly_colors = list("#00BBBB")
|
||||
var/tagname = null
|
||||
var/treat_path = /obj/item/reagent_containers/food/snacks/cookie
|
||||
|
||||
/obj/item/clothing/neck/petcollar/Initialize()
|
||||
. = ..()
|
||||
if(treat_path)
|
||||
new treat_path(src)
|
||||
|
||||
/obj/item/clothing/neck/petcollar/ComponentInitialize()
|
||||
. = ..()
|
||||
if(!poly_states)
|
||||
return
|
||||
AddElement(/datum/element/polychromic, poly_colors, poly_states)
|
||||
|
||||
/obj/item/clothing/neck/petcollar/attack_self(mob/user)
|
||||
tagname = stripped_input(user, "Would you like to change the name on the tag?", "Name your new pet", "Spot", MAX_NAME_LEN)
|
||||
name = "[initial(name)] - [tagname]"
|
||||
|
||||
/obj/item/clothing/neck/petcollar/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-primary") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-secondary")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-tertiary")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
/obj/item/clothing/neck/petcollar/leather
|
||||
name = "leather pet collar"
|
||||
icon_state = "leathercollar"
|
||||
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
primary_color = "#222222"
|
||||
secondary_color = "#888888"
|
||||
poly_states = 2
|
||||
poly_colors = list("#222222", "#888888")
|
||||
|
||||
/obj/item/clothing/neck/petcollar/choker
|
||||
desc = "Quite fashionable... if you're somebody who's just read their first BDSM-themed erotica novel."
|
||||
name = "choker"
|
||||
icon_state = "choker"
|
||||
|
||||
hasprimary = TRUE
|
||||
primary_color = "#222222"
|
||||
poly_colors = list("#222222")
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked
|
||||
name = "locked collar"
|
||||
desc = "A collar that has a small lock on it to keep it from being removed."
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/small/collar/locked
|
||||
treat_path = /obj/item/key/collar
|
||||
var/lock = FALSE
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/attackby(obj/item/K, mob/user, params)
|
||||
@@ -238,32 +228,19 @@
|
||||
/obj/item/clothing/neck/petcollar/locked/leather
|
||||
name = "leather pet collar"
|
||||
icon_state = "leathercollar"
|
||||
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
primary_color = "#222222"
|
||||
secondary_color = "#888888"
|
||||
poly_states = 2
|
||||
poly_colors = list("#222222", "#888888")
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/choker
|
||||
name = "choker"
|
||||
desc = "Quite fashionable... if you're somebody who's just read their first BDSM-themed erotica novel."
|
||||
icon_state = "choker"
|
||||
|
||||
hasprimary = TRUE
|
||||
primary_color = "#222222"
|
||||
poly_colors = list("#222222")
|
||||
|
||||
/obj/item/key/collar
|
||||
name = "Collar Key"
|
||||
desc = "A key for a tiny lock on a collar or bag."
|
||||
|
||||
/obj/item/clothing/neck/petcollar/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/reagent_containers/food/snacks/cookie(src)
|
||||
|
||||
/obj/item/clothing/neck/petcollar/locked/Initialize()
|
||||
. = ..()
|
||||
new /obj/item/key/collar(src)
|
||||
|
||||
//////////////
|
||||
//DOPE BLING//
|
||||
//////////////
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
last_bloodtype = blood_dna[blood_dna[blood_dna.len]]//trust me this works
|
||||
last_blood_DNA = blood_dna[blood_dna.len]
|
||||
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/shoes/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/bloody = FALSE
|
||||
if(blood_DNA)
|
||||
|
||||
@@ -800,7 +800,7 @@
|
||||
var/mob/living/carbon/human/C = loc
|
||||
C.update_inv_wear_suit()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/shielded/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/file2use = style_flags & STYLE_ALL_TAURIC ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/effects.dmi'
|
||||
@@ -957,7 +957,7 @@
|
||||
. = ..()
|
||||
. += mutable_appearance(icon, "knight_cydonia_overlay", color = energy_color)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
@@ -988,7 +988,7 @@
|
||||
. = ..()
|
||||
. += mutable_appearance(icon, "knight_cydonia_overlay", color = energy_color)
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/space/hardsuit/lavaknight/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/energy_overlay = mutable_appearance(icon_file, "knight_cydonia_overlay", ABOVE_LIGHTING_LAYER)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
var/datum/action/A=X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands && on)
|
||||
. += mutable_appearance(icon_file, light_overlay)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
var/suittoggled = FALSE
|
||||
mutantrace_variation = STYLE_DIGITIGRADE
|
||||
|
||||
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/suit/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
if(damaged_clothes)
|
||||
|
||||
@@ -91,3 +91,14 @@
|
||||
heat_protection = HEAD
|
||||
max_heat_protection_temperature = FIRE_IMMUNITY_MAX_TEMP_PROTECT
|
||||
resistance_flags = FIRE_PROOF | ACID_PROOF | GOLIATH_RESISTANCE
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic
|
||||
name = "polychromic cloak"
|
||||
desc = "For when you want to show off your horrible colour coordination skills."
|
||||
icon_state = "polyce"
|
||||
item_state = "qmcloak"
|
||||
var/list/poly_colors = list("#FFFFFF", "#FFFFFF", "#808080")
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, poly_colors, 3)
|
||||
|
||||
@@ -974,70 +974,11 @@
|
||||
icon_state = "coatpoly"
|
||||
item_state = "coatpoly"
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/polychromic
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#6A6964"
|
||||
secondary_color = "#C4B8A6"
|
||||
tertiary_color = "#0000FF"
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#6A6964", "#C4B8A6", "#0000FF"), 3)
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic
|
||||
icon_state = "winterhood_poly"
|
||||
item_state = "winterhood_poly"
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(suit.hasprimary | suit.hassecondary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(suit.hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon_file, "[icon_state]-primary") //automagical sprite selection
|
||||
primary_worn.color = suit.primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(suit.hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon_file, "[icon_state]-secondary")
|
||||
secondary_worn.color = suit.secondary_color
|
||||
. += secondary_worn
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens.
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon_file, "[icon_state]-primary[suittoggled ? "_t" : ""]") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon_file, "[icon_state]-secondary[suittoggled ? "_t" : ""]")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(icon_file, "[icon_state]-tertiary[suittoggled ? "_t" : ""]")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
var/choice = input(user,"polychromic thread options", "Clothing Recolor") as null|anything in list("[hasprimary ? "Primary Color" : ""]", "[hassecondary ? "Secondary Color" : ""]", "[hastertiary ? "Tertiary Color" : ""]") //generates a list depending on the enabled overlays
|
||||
switch(choice) //Lets the list's options actually lead to something
|
||||
if("Primary Color")
|
||||
var/primary_color_input = input(usr,"","Choose Primary Color",primary_color) as color|null //color input menu, the "|null" adds a cancel button to it.
|
||||
if(primary_color_input) //Checks if the color selected is NULL, rejects it if it is NULL.
|
||||
primary_color = sanitize_hexcolor(primary_color_input, desired_format=6, include_crunch=1) //formats the selected color properly
|
||||
update_icon() //updates the item icon
|
||||
user.regenerate_icons() //updates the worn icon. Probably a bad idea, but it works.
|
||||
if("Secondary Color")
|
||||
var/secondary_color_input = input(usr,"","Choose Secondary Color",secondary_color) as color|null
|
||||
if(secondary_color_input)
|
||||
secondary_color = sanitize_hexcolor(secondary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
if("Tertiary Color")
|
||||
var/tertiary_color_input = input(usr,"","Choose Tertiary Color",tertiary_color) as color|null
|
||||
if(tertiary_color_input)
|
||||
tertiary_color = sanitize_hexcolor(tertiary_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
user.regenerate_icons()
|
||||
return TRUE
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/hoodtype = /obj/item/clothing/head/hooded/winterhood //so the chaplain hoodie or other hoodies can override this
|
||||
|
||||
/obj/item/clothing/suit/hooded/New()
|
||||
MakeHood()
|
||||
hood = MakeHelmet()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/hooded/Destroy()
|
||||
@@ -14,11 +14,15 @@
|
||||
qdel(hood)
|
||||
hood = null
|
||||
|
||||
/obj/item/clothing/suit/hooded/proc/MakeHood()
|
||||
/obj/item/clothing/suit/proc/MakeHelmet(obj/item/clothing/head/H)
|
||||
SEND_SIGNAL(src, COMSIG_SUIT_MADE_HELMET, H)
|
||||
return H
|
||||
|
||||
/obj/item/clothing/suit/hooded/MakeHelmet(obj/item/clothing/head/hooded/H)
|
||||
if(!hood)
|
||||
var/obj/item/clothing/head/hooded/W = new hoodtype(src)
|
||||
W.suit = src
|
||||
hood = W
|
||||
H = new hoodtype(src)
|
||||
H.suit = src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/hooded/ui_action_click()
|
||||
ToggleHood()
|
||||
@@ -125,7 +129,7 @@
|
||||
|
||||
//Hardsuit toggle code
|
||||
/obj/item/clothing/suit/space/hardsuit/Initialize()
|
||||
MakeHelmet()
|
||||
helmet = MakeHelmet()
|
||||
. = ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/Destroy()
|
||||
@@ -140,13 +144,13 @@
|
||||
suit.helmet = null
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/proc/MakeHelmet()
|
||||
/obj/item/clothing/suit/space/hardsuit/MakeHelmet(obj/item/clothing/head/helmet/space/hardsuit/H)
|
||||
if(!helmettype)
|
||||
return
|
||||
if(!helmet)
|
||||
var/obj/item/clothing/head/helmet/space/hardsuit/W = new helmettype(src)
|
||||
W.suit = src
|
||||
helmet = W
|
||||
H = new helmettype(src)
|
||||
H.suit = src
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/suit/space/hardsuit/ui_action_click()
|
||||
..()
|
||||
|
||||
@@ -18,28 +18,14 @@
|
||||
var/obj/item/clothing/accessory/attached_accessory
|
||||
var/mutable_appearance/accessory_overlay
|
||||
|
||||
/obj/item/clothing/under/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/clothing/under/worn_overlays(isinhands = FALSE, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
return
|
||||
if(damaged_clothes)
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
|
||||
if(accessory_overlay)
|
||||
. += accessory_overlay
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon_file, "[icon_state]-primary") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon_file, "[icon_state]-secondary")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(icon_file, "[icon_state]-tertiary")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
/obj/item/clothing/under/attackby(obj/item/I, mob/user, params)
|
||||
if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil))
|
||||
@@ -167,5 +153,121 @@
|
||||
if(attached_accessory)
|
||||
. += "\A [attached_accessory] is attached to it."
|
||||
|
||||
/obj/item/clothing/under/verb/toggle()
|
||||
set name = "Adjust Suit Sensors"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
var/mob/M = usr
|
||||
if (istype(M, /mob/dead/))
|
||||
return
|
||||
if (!can_use(M))
|
||||
return
|
||||
if(src.has_sensor == LOCKED_SENSORS)
|
||||
to_chat(usr, "The controls are locked.")
|
||||
return 0
|
||||
if(src.has_sensor == BROKEN_SENSORS)
|
||||
to_chat(usr, "The sensors have shorted out!")
|
||||
return 0
|
||||
if(src.has_sensor <= NO_SENSORS)
|
||||
to_chat(usr, "This suit does not have any sensors.")
|
||||
return 0
|
||||
|
||||
var/list/modes = list("Off", "Binary vitals", "Exact vitals", "Tracking beacon")
|
||||
var/switchMode = input("Select a sensor mode:", "Suit Sensor Mode", modes[sensor_mode + 1]) in modes
|
||||
if(get_dist(usr, src) > 1)
|
||||
to_chat(usr, "<span class='warning'>You have moved too far away!</span>")
|
||||
return
|
||||
sensor_mode = modes.Find(switchMode) - 1
|
||||
|
||||
if (src.loc == usr)
|
||||
switch(sensor_mode)
|
||||
if(0)
|
||||
to_chat(usr, "<span class='notice'>You disable your suit's remote sensing equipment.</span>")
|
||||
if(1)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report whether you are alive or dead.</span>")
|
||||
if(2)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now only report your exact vital lifesigns.</span>")
|
||||
if(3)
|
||||
to_chat(usr, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
|
||||
/obj/item/clothing/under/CtrlClick(mob/user)
|
||||
. = ..()
|
||||
|
||||
if (!(item_flags & IN_INVENTORY))
|
||||
return
|
||||
|
||||
if(!isliving(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
|
||||
if(has_sensor == LOCKED_SENSORS)
|
||||
to_chat(user, "The controls are locked.")
|
||||
return
|
||||
if(has_sensor == BROKEN_SENSORS)
|
||||
to_chat(user, "The sensors have shorted out!")
|
||||
return
|
||||
if(has_sensor <= NO_SENSORS)
|
||||
to_chat(user, "This suit does not have any sensors.")
|
||||
return
|
||||
|
||||
sensor_mode = SENSOR_COORDS
|
||||
|
||||
to_chat(user, "<span class='notice'>Your suit will now report your exact vital lifesigns as well as your coordinate position.</span>")
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.w_uniform == src)
|
||||
H.update_suit_sensors()
|
||||
|
||||
/obj/item/clothing/under/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
||||
return
|
||||
if(attached_accessory)
|
||||
remove_accessory(user)
|
||||
else
|
||||
rolldown()
|
||||
|
||||
/obj/item/clothing/under/verb/jumpsuit_adjust()
|
||||
set name = "Adjust Jumpsuit Style"
|
||||
set category = null
|
||||
set src in usr
|
||||
rolldown()
|
||||
|
||||
/obj/item/clothing/under/proc/rolldown()
|
||||
if(!can_use(usr))
|
||||
return
|
||||
if(!can_adjust)
|
||||
to_chat(usr, "<span class='warning'>You cannot wear this suit any differently!</span>")
|
||||
return
|
||||
if(toggle_jumpsuit_adjust())
|
||||
to_chat(usr, "<span class='notice'>You adjust the suit to wear it more casually.</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>You adjust the suit back to normal.</span>")
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.update_inv_w_uniform()
|
||||
H.update_body()
|
||||
|
||||
/obj/item/clothing/under/proc/toggle_jumpsuit_adjust()
|
||||
adjusted = !adjusted
|
||||
|
||||
if(adjusted)
|
||||
if(fitted != FEMALE_UNIFORM_TOP)
|
||||
fitted = NO_FEMALE_UNIFORM
|
||||
if(!alt_covers_chest) // for the special snowflake suits that expose the chest when adjusted
|
||||
body_parts_covered &= ~CHEST
|
||||
else
|
||||
fitted = initial(fitted)
|
||||
if(!alt_covers_chest)
|
||||
body_parts_covered |= CHEST
|
||||
|
||||
return adjusted
|
||||
|
||||
/obj/item/clothing/under/rank
|
||||
dying_key = DYE_REGISTRY_UNDER
|
||||
|
||||
@@ -91,13 +91,13 @@
|
||||
name = "polychromic kilt"
|
||||
desc = "It's not a skirt!"
|
||||
icon_state = "polykilt"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#F08080"
|
||||
body_parts_covered = CHEST|GROIN|ARMS|LEGS
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/costume/kilt/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#FFFFFF", "#F08080"), 2)
|
||||
|
||||
/obj/item/clothing/under/costume/gladiator
|
||||
name = "gladiator uniform"
|
||||
desc = "Are you not entertained? Is that not why you are here?"
|
||||
|
||||
@@ -241,69 +241,67 @@
|
||||
desc = "A fancy button-up shirt made with polychromic threads."
|
||||
icon_state = "polysuit"
|
||||
item_state = "sl_suit"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#353535"
|
||||
tertiary_color = "#353535"
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/misc/poly_shirt/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#FFFFFF", "#353535", "#353535"), 3)
|
||||
|
||||
/obj/item/clothing/under/misc/polyshorts
|
||||
name = "polychromic shorts"
|
||||
desc = "For ease of movement and style."
|
||||
icon_state = "polyshorts"
|
||||
item_state = "rainbow"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#353535"
|
||||
secondary_color = "#808080"
|
||||
tertiary_color = "#808080"
|
||||
can_adjust = FALSE
|
||||
body_parts_covered = CHEST|GROIN|ARMS
|
||||
|
||||
/obj/item/clothing/under/misc/polyshorts/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#353535", "#808080", "#808080"), 3)
|
||||
|
||||
/obj/item/clothing/under/misc/polyjumpsuit
|
||||
name = "polychromic tri-tone jumpsuit"
|
||||
desc = "A fancy jumpsuit made with polychromic threads."
|
||||
icon_state = "polyjump"
|
||||
item_state = "rainbow"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#808080"
|
||||
tertiary_color = "#FF3535"
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/misc/polyjumpsuit/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#FFFFFF", "#808080", "#353535"), 3)
|
||||
|
||||
/obj/item/clothing/under/misc/poly_bottomless
|
||||
name = "polychromic bottomless shirt"
|
||||
desc = "Great for showing off your junk in dubious style."
|
||||
desc = "Great for showing off your underwear in dubious style."
|
||||
icon_state = "polybottomless"
|
||||
item_state = "rainbow"
|
||||
primary_color = "#808080"
|
||||
secondary_color = "#FF3535"
|
||||
body_parts_covered = CHEST|ARMS //Because there's no bottom included
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/misc/poly_bottomless/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#808080", "#FF3535"), 2)
|
||||
|
||||
/obj/item/clothing/under/misc/poly_tanktop
|
||||
name = "polychromic tank top"
|
||||
desc = "For those lazy summer days."
|
||||
icon_state = "polyshimatank"
|
||||
item_state = "rainbow"
|
||||
primary_color = "#808080"
|
||||
secondary_color = "#FFFFFF"
|
||||
tertiary_color = "#8CC6FF"
|
||||
body_parts_covered = CHEST|GROIN
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE
|
||||
var/list/poly_states = 3
|
||||
var/list/poly_colors = list("#808080", "#FFFFFF", "#8CC6FF")
|
||||
|
||||
/obj/item/clothing/under/misc/poly_tanktop/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, poly_colors, poly_states)
|
||||
|
||||
/obj/item/clothing/under/misc/poly_tanktop/female
|
||||
name = "polychromic feminine tank top"
|
||||
desc = "Great for showing off your chest in style. Not recommended for males."
|
||||
icon_state = "polyfemtankpantsu"
|
||||
hastertiary = FALSE
|
||||
primary_color = "#808080"
|
||||
secondary_color = "#FF3535"
|
||||
poly_states = 2
|
||||
poly_colors = list("#808080", "#FF3535")
|
||||
|
||||
@@ -35,19 +35,18 @@
|
||||
desc = "95% Polychrome, 5% Spandex!"
|
||||
icon_state = "polyshortpants"
|
||||
item_state = "rainbow"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#F08080"
|
||||
mutantrace_variation = NONE
|
||||
var/list/poly_colors = list("#FFFFFF", "#F08080")
|
||||
|
||||
/obj/item/clothing/under/shorts/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, poly_colors, 2)
|
||||
|
||||
/obj/item/clothing/under/shorts/polychromic/pantsu
|
||||
name = "polychromic panties"
|
||||
desc = "Topless striped panties. Now with 120% more polychrome!"
|
||||
icon_state = "polypantsu"
|
||||
item_state = "rainbow"
|
||||
hastertiary = FALSE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#8CC6FF"
|
||||
body_parts_covered = GROIN
|
||||
mutantrace_variation = NONE
|
||||
poly_colors = list("#FFFFFF", "#8CC6FF")
|
||||
|
||||
@@ -211,21 +211,18 @@
|
||||
desc = "A fancy skirt made with polychromic threads."
|
||||
icon_state = "polyskirt"
|
||||
item_state = "rainbow"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#F08080"
|
||||
tertiary_color = "#808080"
|
||||
mutantrace_variation = NONE
|
||||
var/list/poly_colors = list("#FFFFFF", "#F08080", "#808080")
|
||||
|
||||
/obj/item/clothing/under/dress/skirt/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, poly_colors, 3)
|
||||
|
||||
/obj/item/clothing/under/dress/skirt/polychromic/pleated
|
||||
name = "polychromic pleated skirt"
|
||||
desc = "A magnificent pleated skirt complements the woolen polychromatic sweater."
|
||||
icon_state = "polypleat"
|
||||
item_state = "rainbow"
|
||||
primary_color = "#8CC6FF"
|
||||
secondary_color = "#808080"
|
||||
tertiary_color = "#FF3535"
|
||||
body_parts_covered = CHEST|GROIN|ARMS
|
||||
mutantrace_variation = NONE
|
||||
poly_colors = list("#8CC6FF", "#808080", "#FF3535")
|
||||
|
||||
@@ -109,11 +109,9 @@
|
||||
desc = "For when you want to show off your horrible colour coordination skills."
|
||||
icon_state = "polysuit"
|
||||
item_state = "sl_suit"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#FFFFFF"
|
||||
secondary_color = "#FFFFFF"
|
||||
tertiary_color = "#808080"
|
||||
can_adjust = FALSE
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/under/suit/polychromic/ComponentInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/polychromic, list("#FFFFFF", "#FFFFFF", "#808080"), 3)
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
tag_overlay.pixel_y = boxes.len * 3
|
||||
add_overlay(tag_overlay)
|
||||
|
||||
/obj/item/pizzabox/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
/obj/item/pizzabox/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
var/current_offset = 2
|
||||
if(isinhands)
|
||||
for(var/V in boxes) //add EXTRA BOX per box
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
glass_overlay.appearance_flags = RESET_COLOR
|
||||
. += glass_overlay
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hostile_environment/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
/obj/item/clothing/head/helmet/space/hostile_environment/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(!isinhands)
|
||||
var/mutable_appearance/M = mutable_appearance('icons/mob/clothing/head.dmi', "hostile_env_glass")
|
||||
|
||||
@@ -597,7 +597,7 @@ use_mob_overlay_icon: if FALSE, it will always use the default_icon_file even if
|
||||
|
||||
//Get the overlays for this item when it's being worn
|
||||
//eg: ammo counters, primed grenade flashes, etc.
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use, style_flags)
|
||||
var/list/worn_overlays = worn_overlays(isinhands, file2use, t_state, style_flags)
|
||||
if(worn_overlays && worn_overlays.len)
|
||||
standing.overlays.Add(worn_overlays)
|
||||
|
||||
|
||||
@@ -191,15 +191,6 @@
|
||||
/mob/living/carbon/proc/update_hud_back(obj/item/I)
|
||||
return
|
||||
|
||||
|
||||
|
||||
//Overlays for the worn overlay so you can overlay while you overlay
|
||||
//eg: ammo counters, primed grenade flashing, etc.
|
||||
//"icon_file" is used automatically for inhands etc. to make sure it gets the right inhand file
|
||||
/obj/item/proc/worn_overlays(isinhands = FALSE, icon_file, style_flags = NONE)
|
||||
. = list()
|
||||
|
||||
|
||||
/mob/living/carbon/update_body()
|
||||
update_body_parts()
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 218 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 415 KiB After Width: | Height: | Size: 415 KiB |
|
Before Width: | Height: | Size: 430 KiB After Width: | Height: | Size: 430 KiB |
|
Before Width: | Height: | Size: 394 KiB After Width: | Height: | Size: 394 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 336 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 107 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
@@ -1,38 +0,0 @@
|
||||
/obj/item/clothing/neck/cloak/polychromic //enables all three overlays to reduce copypasta and defines basic stuff
|
||||
name = "polychromic cloak"
|
||||
desc = "For when you want to show off your horrible colour coordination skills."
|
||||
icon = 'modular_citadel/icons/polyclothes/item/neck.dmi'
|
||||
mob_overlay_icon = 'modular_citadel/icons/polyclothes/mob/neck.dmi'
|
||||
icon_state = "polyce"
|
||||
item_state = "qmcloak"
|
||||
hasprimary = TRUE
|
||||
hassecondary = TRUE
|
||||
hastertiary = TRUE
|
||||
primary_color = "#FFFFFF" //RGB in hexcode
|
||||
secondary_color = "#FFFFFF"
|
||||
tertiary_color = "#808080"
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/worn_overlays(isinhands, icon_file, style_flags = NONE) //this is where the main magic happens. Also mandates that ALL polychromic stuff MUST USE mob_overlay_icon
|
||||
. = ..()
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-primary") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite.
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-secondary")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(mob_overlay_icon, "[icon_state]-tertiary")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/polyce //DONATOR ITEM
|
||||
name = "polychromic embroidered cloak"
|
||||
desc = "A fancy cloak embroidered with polychromatic thread in a pattern that reminds one of the wielders of unlimited power."
|
||||
icon_state = "polyce"
|
||||
primary_color = "#808080" //RGB in hexcode
|
||||
secondary_color = "#8CC6FF"
|
||||
tertiary_color = "#FF3535"
|
||||
@@ -563,3 +563,8 @@
|
||||
unique_reskin = list("Goodboye" = "fritz", "Badboye" = "fritz_bad")
|
||||
mutantrace_variation = NONE
|
||||
|
||||
/obj/item/clothing/neck/cloak/polychromic/polyce
|
||||
name = "polychromic embroidered cloak"
|
||||
desc = "A fancy cloak embroidered with polychromatic thread in a pattern that reminds one of the wielders of unlimited power."
|
||||
icon_state = "polyce"
|
||||
poly_colors = list("#808080", "#8CC6FF", "#FF3535")
|
||||
|
||||
@@ -39,7 +39,7 @@ obj/item/gun/energy/e_gun/cx/AltClick(mob/living/user)
|
||||
body_color = sanitize_hexcolor(body_color_input, desired_format=6, include_crunch=1)
|
||||
update_icon()
|
||||
|
||||
obj/item/gun/energy/e_gun/cx/worn_overlays(isinhands, icon_file, style_flags = NONE)
|
||||
obj/item/gun/energy/e_gun/cx/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE)
|
||||
. = ..()
|
||||
if(isinhands)
|
||||
var/mutable_appearance/body_inhand = mutable_appearance(icon_file, "cxe_body")
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
. = ..()
|
||||
. += "<span class='notice'>Alt-click to change firing modes.</span>"
|
||||
|
||||
/obj/item/gun/energy/pumpaction/worn_overlays(isinhands, icon_file, style_flags = NONE) //ammo counter for inhands
|
||||
/obj/item/gun/energy/pumpaction/worn_overlays(isinhands, icon_file, used_state, style_flags = NONE) //ammo counter for inhands
|
||||
. = ..()
|
||||
var/ratio = CEILING((cell.charge / cell.maxcharge) * charge_sections, 1)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[current_firemode_index]
|
||||
|
||||
|
Before Width: | Height: | Size: 633 B |
|
Before Width: | Height: | Size: 1.4 KiB |
@@ -510,6 +510,7 @@
|
||||
#include "code\datums\elements\flavor_text.dm"
|
||||
#include "code\datums\elements\ghost_role_eligibility.dm"
|
||||
#include "code\datums\elements\mob_holder.dm"
|
||||
#include "code\datums\elements\polychromic.dm"
|
||||
#include "code\datums\elements\spellcasting.dm"
|
||||
#include "code\datums\elements\swimming.dm"
|
||||
#include "code\datums\elements\sword_point.dm"
|
||||
@@ -3290,7 +3291,6 @@
|
||||
#include "modular_citadel\code\modules\client\verbs\who.dm"
|
||||
#include "modular_citadel\code\modules\clothing\neck.dm"
|
||||
#include "modular_citadel\code\modules\clothing\trek.dm"
|
||||
#include "modular_citadel\code\modules\clothing\suits\polychromic_cloaks.dm"
|
||||
#include "modular_citadel\code\modules\clothing\suits\suits.dm"
|
||||
#include "modular_citadel\code\modules\custom_loadout\custom_items.dm"
|
||||
#include "modular_citadel\code\modules\custom_loadout\load_to_mob.dm"
|
||||
|
||||