-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] rolls Heavy Sleeper into the new All Nighter quirk, which ca…
…rries extra... baggage (#867) * [MIRROR] rolls Heavy Sleeper into the new All Nighter quirk, which carries extra... baggage [MDB IGNORE] (#25298) * Delete negative.dm * no gifted for us --------- Co-authored-by: SkyratBot <[email protected]> Co-authored-by: wesoda25 <[email protected]> Co-authored-by: Giz <[email protected]> Co-authored-by: Iajret <[email protected]>
- Loading branch information
1 parent
489f917
commit bd894e5
Showing
15 changed files
with
288 additions
and
156 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Binary file not shown.
101 changes: 0 additions & 101 deletions
101
modular_skyrat/master_files/code/datums/quirks/negative.dm
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
modular_skyrat/master_files/code/datums/quirks/negative_quirks/all_nighter.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
20 changes: 20 additions & 0 deletions
20
modular_skyrat/master_files/code/datums/quirks/negative_quirks/blooddeficiency.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
43 changes: 43 additions & 0 deletions
43
modular_skyrat/master_files/code/datums/quirks/negative_quirks/brainproblems.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = "<span class='danger'>You feel glitchy.</span>" | ||
lose_text = "<span class='notice'>You no longer feel glitchy.</span>" | ||
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!", | ||
) |
12 changes: 12 additions & 0 deletions
12
modular_skyrat/master_files/code/datums/quirks/negative_quirks/gifted.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
1 change: 1 addition & 0 deletions
1
...s/quirks/negative_quirks/heavy_sleeper.dm → ...s/quirks/negative_quirks/heavy_sleeper.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
modular_skyrat/master_files/code/datums/quirks/negative_quirks/nerve_staple.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
Oops, something went wrong.