diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 119180d3699..f6a47fc7f8a 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -31,6 +31,7 @@ GLOBAL_LIST_INIT_TYPED(quirk_blacklist, /list/datum/quirk, list( list(/datum/quirk/no_guns, /datum/quirk/nonviolent), list(/datum/quirk/spacer_born, /datum/quirk/oversized), list(/datum/quirk/feline_aspect, /datum/quirk/item_quirk/canine, /datum/quirk/item_quirk/avian), + list(/datum/quirk/all_nighter, /datum/quirk/heavy_sleeper), //SKYRAT EDIT ADDITION END )) diff --git a/code/datums/bodypart_overlays/simple_bodypart_overlay.dm b/code/datums/bodypart_overlays/simple_bodypart_overlay.dm index 72fef44b2d4..7f52d21de53 100644 --- a/code/datums/bodypart_overlays/simple_bodypart_overlay.dm +++ b/code/datums/bodypart_overlays/simple_bodypart_overlay.dm @@ -29,3 +29,9 @@ /datum/bodypart_overlay/simple/creampie icon_state = "creampie_human" layers = EXTERNAL_FRONT + +///bags drawn beneath the eyes +/datum/bodypart_overlay/simple/bags + icon_state = "bags" + draw_color = COLOR_WEBSAFE_DARK_GRAY + layers = EXTERNAL_ADJACENT diff --git a/code/datums/mood_events/generic_negative_events.dm b/code/datums/mood_events/generic_negative_events.dm index 23a3364adc3..317e155ef5e 100644 --- a/code/datums/mood_events/generic_negative_events.dm +++ b/code/datums/mood_events/generic_negative_events.dm @@ -444,3 +444,7 @@ description = "UNWORTHY, UNWORTHY, UNWORTHY!!!" mood_change = -200 special_screen_obj = "mood_despair" + +/datum/mood_event/all_nighter + description = "I didn't sleep at all last night. I'm exhausted." + mood_change = -5 diff --git a/code/datums/quirks/negative_quirks/all_nighter.dm b/code/datums/quirks/negative_quirks/all_nighter.dm new file mode 100644 index 00000000000..fbf160cec70 --- /dev/null +++ b/code/datums/quirks/negative_quirks/all_nighter.dm @@ -0,0 +1,115 @@ +#define SLEEP_BANK_MULTIPLIER 10 + +/datum/quirk/all_nighter + name = "All Nighter" + desc = "You didn't get any sleep last night, and people can tell! You'll constantly be in a bad mood and will have a tendency to sleep longer. Stimulants or a nap might help, though." + icon = FA_ICON_BED + value = -4 + mob_trait = TRAIT_HEAVY_SLEEPER + gain_text = span_danger("You feel exhausted.") + lose_text = span_notice("You feel well rested.") + medical_record_text = "Patient appears to be suffering from sleep deprivation." + hardcore_value = 2 + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_CHANGES_APPEARANCE|QUIRK_MOODLET_BASED|QUIRK_PROCESSES + + mail_goodies = list( + /obj/item/clothing/glasses/blindfold, + /obj/item/bedsheet/random, + /obj/item/clothing/under/misc/pj/red, + /obj/item/clothing/head/costume/nightcap/red, + /obj/item/clothing/under/misc/pj/blue, + /obj/item/clothing/head/costume/nightcap/blue, + /obj/item/pillow/random, + ) + + ///a list of all the reagents which alleviate the negative moodlet + var/list/stimulants = list( + /datum/reagent/medicine/stimulants, + /datum/reagent/drug/methamphetamine, + /datum/reagent/drug/bath_salts, + /datum/reagent/drug/aranesp, + /datum/reagent/drug/pumpup, + /datum/reagent/drug/blastoff, + /datum/reagent/consumable/coffee, + /datum/reagent/consumable/tea + ) + ///essentially our "sleep bank". sleeping charges it up and its drained while awake + var/five_more_minutes = 0 + ///the overlay we put over the eyes + var/datum/bodypart_overlay/simple/bags/bodypart_overlay + + +///adds the corresponding moodlet and visual effects +/datum/quirk/all_nighter/add(client/client_source) + quirk_holder.add_mood_event("all_nighter", /datum/mood_event/all_nighter) + add_bags() + +///removes the corresponding moodlet and visual effects +/datum/quirk/all_nighter/remove(client/client_source) + quirk_holder.clear_mood_event("all_nighter", /datum/mood_event/all_nighter) + remove_bags() + +///adds the bag overlay +/datum/quirk/all_nighter/proc/add_bags(client/client_source) + var/mob/living/carbon/human/sleepy_head = quirk_holder + var/obj/item/bodypart/head/face = sleepy_head.get_bodypart(BODY_ZONE_HEAD) + bodypart_overlay = new() //creates our overlay + face.add_bodypart_overlay(bodypart_overlay) + sleepy_head.update_body_parts() //make sure to update icon + +///removes the bag overlay +/datum/quirk/all_nighter/proc/remove_bags(client/client_source) + var/mob/living/carbon/human/sleepy_head = quirk_holder + var/obj/item/bodypart/head/face = sleepy_head.get_bodypart(BODY_ZONE_HEAD) + //our overlay is stored as a datum var, so referencing it is easy + face.remove_bodypart_overlay(bodypart_overlay) + QDEL_NULL(bodypart_overlay) + sleepy_head.update_body_parts() + +/** +*Here we actively handle our moodlet & eye bags, adding/removing them as necessary +* +**Logic: +**Every second spent sleeping adds to the "sleep bank" with a multiplier of SLEEP_BANK_MULTIPLIER +**Every waking second drains the sleep bank until empty +**An empty sleep bank means you have bags beneath your eyes +**An empty sleep bank AND a lack of stimulants means you have the negative moodlet +* +**Variables: +**happy_camper - FALSE if we should have the negative moodlet +**beauty_sleep - FALSE if we should have bags +*/ +/datum/quirk/all_nighter/process(seconds_per_tick) + var/happy_camper = TRUE + var/beauty_sleep = TRUE + var/stims_present = FALSE + + if(quirk_holder.IsSleeping()) + five_more_minutes += SLEEP_BANK_MULTIPLIER * seconds_per_tick + else if(five_more_minutes > 0) + five_more_minutes -= seconds_per_tick + else + beauty_sleep = FALSE //no sleep means eye bags + + for(var/stimulant in stimulants) + if(quirk_holder.has_reagent(stimulant)) //checking for stims + stims_present = TRUE + break + if(!stims_present) //no stims and no sleep means an unhappy camper + happy_camper = FALSE + + //adjusts the mood event accordingly + if(("all_nighter" in quirk_holder.mob_mood.mood_events) && happy_camper) + quirk_holder.clear_mood_event("all_nighter", /datum/mood_event/all_nighter) + if(!("all_nighter" in quirk_holder.mob_mood.mood_events) && !happy_camper) + quirk_holder.add_mood_event("all_nighter", /datum/mood_event/all_nighter) + to_chat(quirk_holder, span_danger("You start feeling tired again.")) + + //adjusts bag overlay accordingly + if(bodypart_overlay && beauty_sleep) + remove_bags() + if(!bodypart_overlay && !beauty_sleep) + add_bags() + + +#undef SLEEP_BANK_MULTIPLIER diff --git a/icons/mob/human/species/misc/bodypart_overlay_simple.dmi b/icons/mob/human/species/misc/bodypart_overlay_simple.dmi index 55fb5c40a84..8df76eb6314 100644 Binary files a/icons/mob/human/species/misc/bodypart_overlay_simple.dmi and b/icons/mob/human/species/misc/bodypart_overlay_simple.dmi differ diff --git a/modular_skyrat/master_files/code/datums/quirks/negative.dm b/modular_skyrat/master_files/code/datums/quirks/negative.dm deleted file mode 100644 index 5c95664a01c..00000000000 --- a/modular_skyrat/master_files/code/datums/quirks/negative.dm +++ /dev/null @@ -1,101 +0,0 @@ -/datum/quirk/equipping/nerve_staple - name = "Nerve Stapled" - desc = "You're a pacifist. Not because you want to be, but because of the device stapled into your eye." - value = -10 // pacifism = -8, losing eye slots = -2 - gain_text = span_danger("You suddenly can't raise a hand to hurt others!") - lose_text = span_notice("You think you can defend yourself again.") - medical_record_text = "Patient is nerve stapled and is unable to harm others." - icon = FA_ICON_FACE_ANGRY - forced_items = list(/obj/item/clothing/glasses/nerve_staple = list(ITEM_SLOT_EYES)) - /// The nerve staple attached to the quirk - var/obj/item/clothing/glasses/nerve_staple/staple - -/datum/quirk/equipping/nerve_staple/on_equip_item(obj/item/equipped, successful) - if (!istype(equipped, /obj/item/clothing/glasses/nerve_staple)) - return - staple = equipped - -/datum/quirk/equipping/nerve_staple/remove() - . = ..() - if (!staple || staple != quirk_holder.get_item_by_slot(ITEM_SLOT_EYES)) - return - to_chat(quirk_holder, span_warning("The nerve staple suddenly falls off your face and melts[istype(quirk_holder.loc, /turf/open/floor) ? " on the floor" : ""]!")) - qdel(staple) - -// Re-labels TG brainproblems to be more generic. There never was a tumor anyways! -/datum/quirk/item_quirk/brainproblems - name = "Brain Degeneration" - desc = "You have a lethal condition in your brain that is slowly destroying it. Better bring some mannitol!" - medical_record_text = "Patient has a lethal condition in their brain that is slowly causing brain death." - icon = FA_ICON_BRAIN - -// Override of Brain Tumor quirk for robotic/synthetic species with posibrains. -// Does not appear in TGUI or the character preferences window. -/datum/quirk/item_quirk/brainproblems/synth - name = "Positronic Cascade Anomaly" - desc = "Your positronic brain is slowly corrupting itself due to a cascading anomaly. Better bring some liquid solder!" - gain_text = "You feel glitchy." - lose_text = "You no longer feel glitchy." - medical_record_text = "Patient has a cascading anomaly in their brain that is slowly causing brain death." - icon = FA_ICON_BRAZILIAN_REAL_SIGN - mail_goodies = list(/obj/item/storage/pill_bottle/liquid_solder/braintumor) - hidden_quirk = TRUE - -// If brainproblems is added to a synth, this detours to the brainproblems/synth quirk. -// TODO: Add more brain-specific detours when PR #16105 is merged -/datum/quirk/item_quirk/brainproblems/add_to_holder(mob/living/new_holder, quirk_transfer, client/client_source) - if(!issynthetic(new_holder) || type != /datum/quirk/item_quirk/brainproblems) - // Defer to TG brainproblems if the character isn't robotic. - return ..() - - // TODO: Check brain type and detour to appropriate brainproblems quirk - var/datum/quirk/item_quirk/brainproblems/synth/bp_synth = new - qdel(src) - return bp_synth.add_to_holder(new_holder, quirk_transfer, client_source) - -// Synthetics get liquid_solder with Brain Tumor instead of mannitol. -/datum/quirk/item_quirk/brainproblems/synth/add_unique(client/client_source) - give_item_to_holder( - /obj/item/storage/pill_bottle/liquid_solder/braintumor, - list( - LOCATION_LPOCKET = ITEM_SLOT_LPOCKET, - LOCATION_RPOCKET = ITEM_SLOT_RPOCKET, - LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, - LOCATION_HANDS = ITEM_SLOT_HANDS, - ), - flavour_text = "These will keep you alive until you can secure a supply of medication. Don't rely on them too much!", - ) - -// Override of Blood Deficiency quirk for robotic/synthetic species. -// Does not appear in TGUI or the character preferences window. -/datum/quirk/blooddeficiency/synth - name = "Hydraulic Leak" - desc = "Your body's hydraulic fluids are leaking through their seals." - medical_record_text = "Patient requires regular treatment for hydraulic fluid loss." - icon = FA_ICON_GLASS_WATER_DROPLET - mail_goodies = list(/obj/item/reagent_containers/blood/oil) - // min_blood = BLOOD_VOLUME_BAD - 25; // TODO: Uncomment after TG PR #70563 - hidden_quirk = TRUE - -// If blooddeficiency is added to a synth, this detours to the blooddeficiency/synth quirk. -/datum/quirk/blooddeficiency/add_to_holder(mob/living/new_holder, quirk_transfer, client/client_source) - if(!issynthetic(new_holder) || type != /datum/quirk/blooddeficiency) - // Defer to TG blooddeficiency if the character isn't robotic. - return ..() - - var/datum/quirk/blooddeficiency/synth/bd_synth = new - qdel(src) - return bd_synth.add_to_holder(new_holder, quirk_transfer) - -/datum/quirk/gifted - name = "Gifted" - desc = "You were born a bit lucky, intelligent, or something in between. You're able to do a little more." - icon = FA_ICON_DOVE - quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_HIDE_FROM_SCAN - value = -6 - mob_trait = TRAIT_GIFTED - gain_text = span_danger("You feel like you're just a little bit more flexible.") - lose_text = span_notice("You feel a little less flexible.") - medical_record_text = "Patient has a history of uncanny fortune." - hardcore_value = 0 - hidden_quirk = TRUE // FF EDIT: ADDITION - Removing freebie points, staff decision diff --git a/modular_skyrat/master_files/code/datums/quirks/negative_quirks/all_nighter.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/all_nighter.dm new file mode 100644 index 00000000000..31532cee7ed --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/all_nighter.dm @@ -0,0 +1,3 @@ +// This was using the same icon as heavy sleeper. The moon makes more sense for this one +/datum/quirk/all_nighter + icon = FA_ICON_CLOUD_MOON diff --git a/modular_skyrat/master_files/code/datums/quirks/negative_quirks/blooddeficiency.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/blooddeficiency.dm new file mode 100644 index 00000000000..85103b1f1eb --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/blooddeficiency.dm @@ -0,0 +1,20 @@ +// Override of Blood Deficiency quirk for robotic/synthetic species. +// Does not appear in TGUI or the character preferences window. +/datum/quirk/blooddeficiency/synth + name = "Hydraulic Leak" + desc = "Your body's hydraulic fluids are leaking through their seals." + medical_record_text = "Patient requires regular treatment for hydraulic fluid loss." + icon = FA_ICON_GLASS_WATER_DROPLET + mail_goodies = list(/obj/item/reagent_containers/blood/oil) + // min_blood = BLOOD_VOLUME_BAD - 25; // TODO: Uncomment after TG PR #70563 + hidden_quirk = TRUE + +// If blooddeficiency is added to a synth, this detours to the blooddeficiency/synth quirk. +/datum/quirk/blooddeficiency/add_to_holder(mob/living/new_holder, quirk_transfer, client/client_source) + if(!issynthetic(new_holder) || type != /datum/quirk/blooddeficiency) + // Defer to TG blooddeficiency if the character isn't robotic. + return ..() + + var/datum/quirk/blooddeficiency/synth/bd_synth = new + qdel(src) + return bd_synth.add_to_holder(new_holder, quirk_transfer) diff --git a/modular_skyrat/master_files/code/datums/quirks/negative_quirks/brainproblems.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/brainproblems.dm new file mode 100644 index 00000000000..9b9a4cb1c7c --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/brainproblems.dm @@ -0,0 +1,43 @@ +// Re-labels TG brainproblems to be more generic. There never was a tumor anyways! +/datum/quirk/item_quirk/brainproblems + name = "Brain Degeneration" + desc = "You have a lethal condition in your brain that is slowly destroying it. Better bring some mannitol!" + medical_record_text = "Patient has a lethal condition in their brain that is slowly causing brain death." + icon = FA_ICON_BRAIN + +// Override of Brain Tumor quirk for robotic/synthetic species with posibrains. +// Does not appear in TGUI or the character preferences window. +/datum/quirk/item_quirk/brainproblems/synth + name = "Positronic Cascade Anomaly" + desc = "Your positronic brain is slowly corrupting itself due to a cascading anomaly. Better bring some liquid solder!" + gain_text = "You feel glitchy." + lose_text = "You no longer feel glitchy." + medical_record_text = "Patient has a cascading anomaly in their brain that is slowly causing brain death." + icon = FA_ICON_BRAZILIAN_REAL_SIGN + mail_goodies = list(/obj/item/storage/pill_bottle/liquid_solder/braintumor) + hidden_quirk = TRUE + +// If brainproblems is added to a synth, this detours to the brainproblems/synth quirk. +// TODO: Add more brain-specific detours when PR #16105 is merged +/datum/quirk/item_quirk/brainproblems/add_to_holder(mob/living/new_holder, quirk_transfer, client/client_source) + if(!issynthetic(new_holder) || type != /datum/quirk/item_quirk/brainproblems) + // Defer to TG brainproblems if the character isn't robotic. + return ..() + + // TODO: Check brain type and detour to appropriate brainproblems quirk + var/datum/quirk/item_quirk/brainproblems/synth/bp_synth = new + qdel(src) + return bp_synth.add_to_holder(new_holder, quirk_transfer, client_source) + +// Synthetics get liquid_solder with Brain Tumor instead of mannitol. +/datum/quirk/item_quirk/brainproblems/synth/add_unique(client/client_source) + give_item_to_holder( + /obj/item/storage/pill_bottle/liquid_solder/braintumor, + list( + LOCATION_LPOCKET = ITEM_SLOT_LPOCKET, + LOCATION_RPOCKET = ITEM_SLOT_RPOCKET, + LOCATION_BACKPACK = ITEM_SLOT_BACKPACK, + LOCATION_HANDS = ITEM_SLOT_HANDS, + ), + flavour_text = "These will keep you alive until you can secure a supply of medication. Don't rely on them too much!", + ) diff --git a/modular_skyrat/master_files/code/datums/quirks/negative_quirks/gifted.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/gifted.dm new file mode 100644 index 00000000000..12ce77b9f19 --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/gifted.dm @@ -0,0 +1,12 @@ +/datum/quirk/gifted + name = "Gifted" + desc = "You were born a bit lucky, intelligent, or something in between. You're able to do a little more." + icon = FA_ICON_DOVE + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_HIDE_FROM_SCAN + value = -6 + mob_trait = TRAIT_GIFTED + gain_text = span_danger("You feel like you're just a little bit more flexible.") + lose_text = span_notice("You feel a little less flexible.") + medical_record_text = "Patient has a history of uncanny fortune." + hardcore_value = 0 + hidden_quirk = TRUE // FF EDIT: ADDITION - Removing freebie points, staff decision diff --git a/code/datums/quirks/negative_quirks/heavy_sleeper.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/heavy_sleeper.dm similarity index 96% rename from code/datums/quirks/negative_quirks/heavy_sleeper.dm rename to modular_skyrat/master_files/code/datums/quirks/negative_quirks/heavy_sleeper.dm index dea79683915..4afd45ec75e 100644 --- a/code/datums/quirks/negative_quirks/heavy_sleeper.dm +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/heavy_sleeper.dm @@ -1,3 +1,4 @@ +// re-adds heavy sleeper /datum/quirk/heavy_sleeper name = "Heavy Sleeper" desc = "You sleep like a rock! Whenever you're put to sleep or knocked unconscious, you take a little bit longer to wake up." diff --git a/modular_skyrat/master_files/code/datums/quirks/negative_quirks/nerve_staple.dm b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/nerve_staple.dm new file mode 100644 index 00000000000..64bdb82dd30 --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/negative_quirks/nerve_staple.dm @@ -0,0 +1,23 @@ +/datum/quirk/equipping/nerve_staple + name = "Nerve Stapled" + desc = "You're a pacifist. Not because you want to be, but because of the device stapled into your eye." + value = -10 // pacifism = -8, losing eye slots = -2 + gain_text = span_danger("You suddenly can't raise a hand to hurt others!") + lose_text = span_notice("You think you can defend yourself again.") + medical_record_text = "Patient is nerve stapled and is unable to harm others." + icon = FA_ICON_FACE_ANGRY + forced_items = list(/obj/item/clothing/glasses/nerve_staple = list(ITEM_SLOT_EYES)) + /// The nerve staple attached to the quirk + var/obj/item/clothing/glasses/nerve_staple/staple + +/datum/quirk/equipping/nerve_staple/on_equip_item(obj/item/equipped, successful) + if (!istype(equipped, /obj/item/clothing/glasses/nerve_staple)) + return + staple = equipped + +/datum/quirk/equipping/nerve_staple/remove() + . = ..() + if (!staple || staple != quirk_holder.get_item_by_slot(ITEM_SLOT_EYES)) + return + to_chat(quirk_holder, span_warning("The nerve staple suddenly falls off your face and melts[istype(quirk_holder.loc, /turf/open/floor) ? " on the floor" : ""]!")) + qdel(staple) diff --git a/modular_skyrat/master_files/code/datums/quirks/neutral_quirks/equipping.dm b/modular_skyrat/master_files/code/datums/quirks/neutral_quirks/equipping.dm new file mode 100644 index 00000000000..4f48ddd4610 --- /dev/null +++ b/modular_skyrat/master_files/code/datums/quirks/neutral_quirks/equipping.dm @@ -0,0 +1,51 @@ +/datum/quirk/equipping + abstract_parent_type = /datum/quirk/equipping + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_CHANGES_APPEARANCE + icon = FA_ICON_BOX_OPEN + /// the items that will be equipped, formatted in the way of [item_path = list of slots it can be equipped to], will not equip over nodrop items + var/list/items = list() + /// the items that will be forcefully equipped, formatted in the way of [item_path = list of slots it can be equipped to], will equip over nodrop items + var/list/forced_items = list() + +/datum/quirk/equipping/add_unique(client/client_source) + var/mob/living/carbon/carbon_holder = quirk_holder + if (!items || !carbon_holder) + return + var/list/equipped_items = list() + var/list/all_items = forced_items|items + for (var/obj/item/item_path as anything in all_items) + if (!ispath(item_path)) + continue + var/item = new item_path(carbon_holder.loc) + var/success = FALSE + // Checking for nodrop and seeing if there's an empty slot + for (var/slot as anything in all_items[item_path]) + success = force_equip_item(carbon_holder, item, slot, check_item = FALSE) + if (success) + break + // Checking for nodrop + for (var/slot as anything in all_items[item_path]) + success = force_equip_item(carbon_holder, item, slot) + if (success) + break + + if ((item_path in forced_items) && !success) + // Checking for nodrop failed, shove it into the first available slot, even if it has nodrop + for (var/slot as anything in all_items[item_path]) + success = force_equip_item(carbon_holder, item, slot, FALSE) + if (success) + break + equipped_items[item] = success + for (var/item as anything in equipped_items) + on_equip_item(item, equipped_items[item]) + +/datum/quirk/equipping/proc/force_equip_item(mob/living/carbon/target, obj/item/item, slot, check_nodrop = TRUE, check_item = TRUE) + var/obj/item/item_in_slot = target.get_item_by_slot(slot) + if (check_item && item_in_slot) + if (check_nodrop && HAS_TRAIT(item_in_slot, TRAIT_NODROP)) + return FALSE + target.dropItemToGround(item_in_slot, force = TRUE) + return target.equip_to_slot_if_possible(item, slot, disable_warning = TRUE) // this should never not work tbh + +/datum/quirk/equipping/proc/on_equip_item(obj/item/equipped, success) + return diff --git a/modular_skyrat/master_files/code/datums/quirks/neutral.dm b/modular_skyrat/master_files/code/datums/quirks/neutral_quirks/lungs.dm similarity index 62% rename from modular_skyrat/master_files/code/datums/quirks/neutral.dm rename to modular_skyrat/master_files/code/datums/quirks/neutral_quirks/lungs.dm index 51d96c8fdbe..1e1fa2cc5f8 100644 --- a/modular_skyrat/master_files/code/datums/quirks/neutral.dm +++ b/modular_skyrat/master_files/code/datums/quirks/neutral_quirks/lungs.dm @@ -1,55 +1,3 @@ -/datum/quirk/equipping - abstract_parent_type = /datum/quirk/equipping - quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_CHANGES_APPEARANCE - icon = FA_ICON_BOX_OPEN - /// the items that will be equipped, formatted in the way of [item_path = list of slots it can be equipped to], will not equip over nodrop items - var/list/items = list() - /// the items that will be forcefully equipped, formatted in the way of [item_path = list of slots it can be equipped to], will equip over nodrop items - var/list/forced_items = list() - -/datum/quirk/equipping/add_unique(client/client_source) - var/mob/living/carbon/carbon_holder = quirk_holder - if (!items || !carbon_holder) - return - var/list/equipped_items = list() - var/list/all_items = forced_items|items - for (var/obj/item/item_path as anything in all_items) - if (!ispath(item_path)) - continue - var/item = new item_path(carbon_holder.loc) - var/success = FALSE - // Checking for nodrop and seeing if there's an empty slot - for (var/slot as anything in all_items[item_path]) - success = force_equip_item(carbon_holder, item, slot, check_item = FALSE) - if (success) - break - // Checking for nodrop - for (var/slot as anything in all_items[item_path]) - success = force_equip_item(carbon_holder, item, slot) - if (success) - break - - if ((item_path in forced_items) && !success) - // Checking for nodrop failed, shove it into the first available slot, even if it has nodrop - for (var/slot as anything in all_items[item_path]) - success = force_equip_item(carbon_holder, item, slot, FALSE) - if (success) - break - equipped_items[item] = success - for (var/item as anything in equipped_items) - on_equip_item(item, equipped_items[item]) - -/datum/quirk/equipping/proc/force_equip_item(mob/living/carbon/target, obj/item/item, slot, check_nodrop = TRUE, check_item = TRUE) - var/obj/item/item_in_slot = target.get_item_by_slot(slot) - if (check_item && item_in_slot) - if (check_nodrop && HAS_TRAIT(item_in_slot, TRAIT_NODROP)) - return FALSE - target.dropItemToGround(item_in_slot, force = TRUE) - return target.equip_to_slot_if_possible(item, slot, disable_warning = TRUE) // this should never not work tbh - -/datum/quirk/equipping/proc/on_equip_item(obj/item/equipped, success) - return - /datum/quirk/equipping/lungs abstract_parent_type = /datum/quirk/equipping/lungs icon = FA_ICON_LUNGS diff --git a/tgstation.dme b/tgstation.dme index 3d333efa5ca..d296cdbafdf 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1690,6 +1690,7 @@ #include "code\datums\proximity_monitor\fields\timestop.dm" #include "code\datums\quirks\_quirk.dm" #include "code\datums\quirks\_quirk_constant_data.dm" +#include "code\datums\quirks\negative_quirks\all_nighter.dm" #include "code\datums\quirks\negative_quirks\allergic.dm" #include "code\datums\quirks\negative_quirks\bad_back.dm" #include "code\datums\quirks\negative_quirks\bad_touch.dm" @@ -1708,7 +1709,6 @@ #include "code\datums\quirks\negative_quirks\food_allergy.dm" #include "code\datums\quirks\negative_quirks\frail.dm" #include "code\datums\quirks\negative_quirks\glass_jaw.dm" -#include "code\datums\quirks\negative_quirks\heavy_sleeper.dm" #include "code\datums\quirks\negative_quirks\hemiplegic.dm" #include "code\datums\quirks\negative_quirks\hypersensitive.dm" #include "code\datums\quirks\negative_quirks\illiterate.dm" @@ -6126,8 +6126,14 @@ #include "modular_skyrat\master_files\code\datums\mutations\chameleon.dm" #include "modular_skyrat\master_files\code\datums\mutations\hulk.dm" #include "modular_skyrat\master_files\code\datums\quirks\_quirk.dm" -#include "modular_skyrat\master_files\code\datums\quirks\negative.dm" -#include "modular_skyrat\master_files\code\datums\quirks\neutral.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\all_nighter.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\blooddeficiency.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\brainproblems.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\gifted.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\heavy_sleeper.dm" +#include "modular_skyrat\master_files\code\datums\quirks\negative_quirks\nerve_staple.dm" +#include "modular_skyrat\master_files\code\datums\quirks\neutral_quirks\equipping.dm" +#include "modular_skyrat\master_files\code\datums\quirks\neutral_quirks\lungs.dm" #include "modular_skyrat\master_files\code\datums\records\record.dm" #include "modular_skyrat\master_files\code\datums\station_traits\negative_traits.dm" #include "modular_skyrat\master_files\code\datums\storage\storage.dm"