diff --git a/code/__DEFINES/traits/monkestation/declarations.dm b/code/__DEFINES/traits/monkestation/declarations.dm index e3e0abafd7a2..5022ce24b23e 100644 --- a/code/__DEFINES/traits/monkestation/declarations.dm +++ b/code/__DEFINES/traits/monkestation/declarations.dm @@ -87,6 +87,7 @@ #define TRAIT_LOUD_ASS "loud_ass" #define TRAIT_MINING_CALLOUTS "miner_callouts" #define TRAIT_PARANOIA "paranoia" +#define TRAIT_PRIDE_PIN "pride_pin" #define TRAIT_STABLE_ASS "stable_ass" #define TRAIT_STOWAWAY "stowaway" #define TRAIT_UNSTABLE_ASS "unstable_ass" diff --git a/code/datums/quirks/neutral_quirks/pride_pin.dm b/code/datums/quirks/neutral_quirks/pride_pin.dm index 2897816f4bb8..0bdb26260109 100644 --- a/code/datums/quirks/neutral_quirks/pride_pin.dm +++ b/code/datums/quirks/neutral_quirks/pride_pin.dm @@ -1,19 +1,28 @@ -// /datum/quirk/item_quirk/pride_pin -// name = "Pride Pin" -// desc = "Show off your pride with this changing pride pin!" -// icon = FA_ICON_RAINBOW -// value = 0 -// gain_text = span_notice("You feel fruity.") -// lose_text = span_danger("You feel only slightly less fruity than before.") -// medical_record_text = "Patient appears to be fruity." +/datum/quirk/item_quirk/pride_pin + name = "Pride Pin" + desc = "Show off your pride with this changing pride pin!" + icon = FA_ICON_RAINBOW + value = 0 + //MONKESTATION EDIT START + mob_trait = TRAIT_PRIDE_PIN + quirk_flags = QUIRK_CHANGES_APPEARANCE + gain_text = span_notice("You feel proud to be queer.") + lose_text = span_danger("You decide to repress your feelings.") + //MONKESTATION EDIT END -// /datum/quirk/item_quirk/pride_pin/add_unique(client/client_source) -// var/obj/item/clothing/accessory/pride/pin = new(get_turf(quirk_holder)) +/datum/quirk/item_quirk/pride_pin/add_unique(client/client_source) + var/obj/item/clothing/accessory/pride/pin = new(get_turf(quirk_holder)) -// var/pride_choice = client_source?.prefs?.read_preference(/datum/preference/choiced/pride_pin) || assoc_to_keys(GLOB.pride_pin_reskins)[1] -// var/pride_reskin = GLOB.pride_pin_reskins[pride_choice] + var/pride_choice = client_source?.prefs?.read_preference(/datum/preference/choiced/pride_pin) || assoc_to_keys(GLOB.pride_pin_reskins)[1] + var/pride_reskin = GLOB.pride_pin_reskins[pride_choice] -// pin.current_skin = pride_choice -// pin.icon_state = pride_reskin - -// give_item_to_holder(pin, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) + pin.current_skin = pride_choice + pin.icon_state = pride_reskin + //MONKESTATION EDIT START + var/mob/living/carbon/human/H = quirk_holder + if (istype(H)) + var/obj/item/clothing/under/U = H.w_uniform + if(U && U.attach_accessory(pin)) + return + //MONKESTATION EDIT END + give_item_to_holder(pin, list(LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, LOCATION_HANDS = ITEM_SLOT_HANDS)) diff --git a/code/modules/client/preferences/pride_pin.dm b/code/modules/client/preferences/pride_pin.dm new file mode 100644 index 000000000000..326dad69979b --- /dev/null +++ b/code/modules/client/preferences/pride_pin.dm @@ -0,0 +1,16 @@ +/datum/preference/choiced/pride_pin + category = PREFERENCE_CATEGORY_SECONDARY_FEATURES + savefile_key = "pride_pin" + savefile_identifier = PREFERENCE_CHARACTER + +/datum/preference/choiced/pride_pin/init_possible_values() + return assoc_to_keys(GLOB.pride_pin_reskins) + +/datum/preference/choiced/pride_pin/is_accessible(datum/preferences/preferences) + if (!..(preferences)) + return FALSE + + return "Pride Pin" in preferences.all_quirks + +/datum/preference/choiced/pride_pin/apply_to_human(mob/living/carbon/human/target, value) + return diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 2da2a6e3956c..f124618ad81c 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -54,7 +54,10 @@ //make the sensor mode favor higher levels, except coords. sensor_mode = pick(SENSOR_VITALS, SENSOR_VITALS, SENSOR_VITALS, SENSOR_LIVING, SENSOR_LIVING, SENSOR_COORDS, SENSOR_COORDS, SENSOR_OFF) register_context() - AddElement(/datum/element/update_icon_updates_onmob, flags = ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING, body = TRUE) + // MONKESTATION EDIT START + // AddElement(/datum/element/update_icon_updates_onmob, flags = ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING, body = TRUE) - original + AddElement(/datum/element/update_icon_updates_onmob, flags = ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING|ITEM_SLOT_NECK, body = TRUE) + // MONKESTATION EDIT END /obj/item/clothing/under/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) . = NONE diff --git a/code/modules/clothing/under/accessories/_accessories.dm b/code/modules/clothing/under/accessories/_accessories.dm index 1792bff82bb2..f818c14e4d8c 100644 --- a/code/modules/clothing/under/accessories/_accessories.dm +++ b/code/modules/clothing/under/accessories/_accessories.dm @@ -141,7 +141,10 @@ SIGNAL_HANDLER accessory_dropped(source, user) - user.update_clothing(ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING) + // MONKESTATION EDIT START + // user.update_clothing(ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING) - original + user.update_clothing(ITEM_SLOT_ICLOTHING|ITEM_SLOT_OCLOTHING|ITEM_SLOT_NECK) + // MONKESTATION EDIT END /// Called when the uniform this accessory is pinned to is equipped in a valid slot /obj/item/clothing/accessory/proc/accessory_equipped(obj/item/clothing/under/clothes, mob/living/user) diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm index 490fdfbbd7bf..d8b5561910ab 100644 --- a/code/modules/vending/clothesmate.dm +++ b/code/modules/vending/clothesmate.dm @@ -39,6 +39,7 @@ "name" = "Accessories", "icon" = "glasses", "products" = list( + /obj/item/clothing/accessory/pride = 15, /obj/item/clothing/accessory/waistcoat = 4, /obj/item/clothing/suit/toggle/suspenders = 4, /obj/item/clothing/neck/tie/horrible = 3, diff --git a/monkestation/code/modules/clothing/neck/_neck.dm b/monkestation/code/modules/clothing/neck/_neck.dm new file mode 100644 index 000000000000..4363ca12eee5 --- /dev/null +++ b/monkestation/code/modules/clothing/neck/_neck.dm @@ -0,0 +1,43 @@ +/obj/item/clothing/neck + var/cover_accessories = TRUE + +/obj/item/clothing/neck/Initialize(mapload) + . = ..() + register_context() + +/obj/item/clothing/neck/alt_click_secondary(mob/user) + . = ..() + if(.) + return + if(!can_use(user)) + return + cover_accessories = !cover_accessories + if(cover_accessories) + to_chat(usr, span_notice("You adjust [src] to cover accessories.")) + else + to_chat(usr, span_notice("You adjust [src] to show accessories.")) + + user.update_clothing(ITEM_SLOT_NECK) + update_appearance() + +/obj/item/clothing/neck/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) + . = ..() + context[SCREENTIP_CONTEXT_ALT_RMB] = "[cover_accessories ? "Uncover" : "Cover"] accessories" + return CONTEXTUAL_SCREENTIP_SET + +/obj/item/clothing/neck/worn_overlays(mutable_appearance/standing, isinhands = FALSE) + . = ..() + if(isinhands) + return + if(cover_accessories) + return + var/mob/living/carbon/human/wearer = loc + if(!ishuman(wearer) || !wearer.w_uniform) + return + var/obj/item/clothing/under/undershirt = wearer.w_uniform + if(!istype(undershirt) || !LAZYLEN(undershirt.attached_accessories)) + return + + var/obj/item/clothing/accessory/displayed = undershirt.attached_accessories[1] + if(displayed.above_suit) + . += undershirt.accessory_overlay diff --git a/monkestation/code/modules/clothing/under/accessories/badges.dm b/monkestation/code/modules/clothing/under/accessories/badges.dm new file mode 100644 index 000000000000..a486e4b3b9d8 --- /dev/null +++ b/monkestation/code/modules/clothing/under/accessories/badges.dm @@ -0,0 +1,6 @@ +/obj/item/clothing/accessory/pride/accessory_equipped(obj/item/clothing/under/clothes, mob/living/user) + if(HAS_TRAIT(user, TRAIT_PRIDE_PIN)) + user.add_mood_event("pride_pin", /datum/mood_event/pride_pin) + +/obj/item/clothing/accessory/pride/accessory_dropped(obj/item/clothing/under/clothes, mob/living/user) + user.clear_mood_event("pride_pin") diff --git a/monkestation/code/modules/datums/mood_events/generic_positive_events.dm b/monkestation/code/modules/datums/mood_events/generic_positive_events.dm index 37f39c486364..c19cd5f4314c 100644 --- a/monkestation/code/modules/datums/mood_events/generic_positive_events.dm +++ b/monkestation/code/modules/datums/mood_events/generic_positive_events.dm @@ -9,3 +9,7 @@ description = "Glory to the hunt." mood_change = 10 hidden = TRUE + +/datum/mood_event/pride_pin + description = "I love showing off my pride pin!" + mood_change = 1 diff --git a/tgstation.dme b/tgstation.dme index 3ca6d2d4202c..976f2e12bbc5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3432,6 +3432,7 @@ #include "code\modules\cargo\exports\gear.dm" #include "code\modules\cargo\exports\large_objects.dm" #include "code\modules\cargo\exports\lavaland.dm" +#include "code\modules\client\preferences\pride_pin.dm" #include "code\modules\cargo\exports\manifest.dm" #include "code\modules\cargo\exports\materials.dm" #include "code\modules\cargo\exports\organs.dm" @@ -6934,6 +6935,7 @@ #include "monkestation\code\modules\cargo\crates\imports.dm" #include "monkestation\code\modules\cargo\crates\large.dm" #include "monkestation\code\modules\cargo\crates\livestock.dm" +#include "monkestation\code\modules\clothing\neck\_neck.dm" #include "monkestation\code\modules\cargo\crates\materials.dm" #include "monkestation\code\modules\cargo\crates\medical.dm" #include "monkestation\code\modules\cargo\crates\organic.dm" @@ -6958,6 +6960,7 @@ #include "monkestation\code\modules\cassettes\machines\dj_station.dm" #include "monkestation\code\modules\cassettes\machines\portable_mixer.dm" #include "monkestation\code\modules\cassettes\machines\postbox.dm" +#include "monkestation\code\modules\clothing\under\accessories\badges.dm" #include "monkestation\code\modules\cassettes\machines\radio_mic.dm" #include "monkestation\code\modules\cassettes\machines\stationary_mixer.dm" #include "monkestation\code\modules\cassettes\machines\media\__base_machine.dm" diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/pride_pin.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/pride_pin.tsx new file mode 100644 index 000000000000..b0fae6092a1e --- /dev/null +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/character_preferences/pride_pin.tsx @@ -0,0 +1,6 @@ +import { FeatureChoiced, FeatureDropdownInput } from '../base'; + +export const pride_pin: FeatureChoiced = { + name: 'Pride Pin', + component: FeatureDropdownInput, +};