Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into heights
  • Loading branch information
Absolucy committed Jan 18, 2024
2 parents 64be95f + e0bf740 commit b802677
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 87 deletions.
25 changes: 23 additions & 2 deletions code/_onclick/hud/rendering/plane_master_group.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
var/active_offset = 0
/// What, if any, submap we render onto
var/map = ""
/// Controls the screen_loc that owned plane masters will use when generating relays. Due to a Byond bug, relays using the CENTER positional loc
/// Will be improperly offset
var/relay_loc = "CENTER"

/datum/plane_master_group/New(key, map = "")
. = ..()
Expand Down Expand Up @@ -51,11 +54,15 @@
/// Fully regenerate our group, resetting our planes to their compile time values
/datum/plane_master_group/proc/rebuild_hud()
hide_hud()
QDEL_LIST_ASSOC_VAL(plane_masters)
build_plane_masters(0, SSmapping.max_plane_offset)
rebuild_plane_masters()
show_hud()
transform_lower_turfs(our_hud, active_offset)

/// Regenerate our plane masters, this is useful if we don't have a mob but still want to rebuild. Such in the case of changing the screen_loc of relays
/datum/plane_master_group/proc/rebuild_plane_masters()
QDEL_LIST_ASSOC_VAL(plane_masters)
build_plane_masters(0, SSmapping.max_plane_offset)

/datum/plane_master_group/proc/hide_hud()
for(var/thing in plane_masters)
var/atom/movable/screen/plane_master/plane = plane_masters[thing]
Expand Down Expand Up @@ -170,6 +177,20 @@
/// If you wanna try someday feel free, but I can't manage it
/datum/plane_master_group/popup

/// This is janky as hell but since something changed with CENTER positioning after build 1614 we have to switch to the bandaid LEFT,TOP positioning
/// using LEFT,TOP *at* or *before* 1614 will result in another broken offset for cameras
#define MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS 1614

/datum/plane_master_group/popup/attach_to(datum/hud/viewing_hud)
// If we're about to display this group to a mob who's client is more recent than the last known version with working CENTER, then we need to remake the relays
// with the correct screen_loc using the relay override
if(viewing_hud.mymob?.client?.byond_build > MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS)
relay_loc = "LEFT,TOP"
rebuild_plane_masters()
return ..()

#undef MAX_CLIENT_BUILD_WITH_WORKING_SECONDARY_MAPS

/datum/plane_master_group/popup/transform_lower_turfs(datum/hud/source, new_offset, use_scale = TRUE)
return ..(source, new_offset, FALSE)

Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/rendering/render_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
* Other vars such as alpha will automatically be applied with the render source
*/
/atom/movable/screen/plane_master/proc/generate_render_relays()
var/relay_loc = "CENTER"
var/relay_loc = home?.relay_loc || "CENTER"
// If we're using a submap (say for a popup window) make sure we draw onto it
if(home?.map)
relay_loc = "[home.map]:[relay_loc]"
Expand Down
60 changes: 30 additions & 30 deletions code/datums/quirks/negative_quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/datum/quirk/badback
name = "Bad Back"
desc = "Thanks to your poor posture, backpacks and other bags never sit right on your back. More evenly weighted objects are fine, though."
icon = "hiking"
icon = FA_ICON_HIKING
value = -8
quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_MOODLET_BASED
gain_text = span_danger("Your back REALLY hurts!")
Expand Down Expand Up @@ -57,7 +57,7 @@
/datum/quirk/blooddeficiency
name = "Blood Deficiency"
desc = "Your body can't produce enough blood to sustain itself."
icon = "tint"
icon = FA_ICON_TINT
value = -8
mob_trait = TRAIT_BLOOD_DEFICIENCY
gain_text = span_danger("You feel your vigor slowly fading away.")
Expand Down Expand Up @@ -98,7 +98,7 @@
/datum/quirk/item_quirk/blindness
name = "Blind"
desc = "You are completely blind, nothing can counteract this."
icon = "eye-slash"
icon = FA_ICON_EYE_SLASH
value = -16
gain_text = span_danger("You can't see anything.")
lose_text = span_notice("You miraculously gain back your vision.")
Expand All @@ -124,7 +124,7 @@
/datum/quirk/item_quirk/brainproblems
name = "Brain Tumor"
desc = "You have a little friend in your brain that is slowly destroying it. Better bring some mannitol!"
icon = "brain"
icon = FA_ICON_BRAIN
value = -12
gain_text = span_danger("You feel smooth.")
lose_text = span_notice("You feel wrinkled again.")
Expand Down Expand Up @@ -157,7 +157,7 @@
/datum/quirk/item_quirk/deafness
name = "Deaf"
desc = "You are incurably deaf."
icon = "deaf"
icon = FA_ICON_DEAF
value = -8
mob_trait = TRAIT_DEAF
gain_text = span_danger("You can't hear anything.")
Expand All @@ -172,7 +172,7 @@
/datum/quirk/depression
name = "Depression"
desc = "You sometimes just hate life."
icon = "frown"
icon = FA_ICON_FROWN
mob_trait = TRAIT_DEPRESSION
value = -3
gain_text = span_danger("You start feeling depressed.")
Expand All @@ -185,7 +185,7 @@
/datum/quirk/item_quirk/family_heirloom
name = "Family Heirloom"
desc = "You are the current owner of an heirloom, passed down for generations. You have to keep it safe!"
icon = "toolbox"
icon = FA_ICON_TOOLBOX
value = -2
medical_record_text = "Patient demonstrates an unnatural attachment to a family heirloom."
hardcore_value = 1
Expand Down Expand Up @@ -264,7 +264,7 @@
/datum/quirk/glass_jaw
name = "Glass Jaw"
desc = "You have a very fragile jaw. Any sufficiently hard blow to your head might knock you out."
icon = "hand-fist"
icon = FA_ICON_HAND_FIST
value = -4
gain_text = span_danger("Your jaw feels loose.")
lose_text = span_notice("Your jaw feels fitting again.")
Expand Down Expand Up @@ -315,7 +315,7 @@
/datum/quirk/frail
name = "Frail"
desc = "You have skin of paper and bones of glass! You suffer wounds much more easily than most."
icon = "skull"
icon = FA_ICON_SKULL
value = -6
mob_trait = TRAIT_EASILY_WOUNDED
gain_text = span_danger("You feel frail.")
Expand All @@ -327,7 +327,7 @@
/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."
icon = "bed"
icon = FA_ICON_BED
value = -2
mob_trait = TRAIT_HEAVY_SLEEPER
gain_text = span_danger("You feel sleepy.")
Expand All @@ -347,7 +347,7 @@
/datum/quirk/hypersensitive
name = "Hypersensitive"
desc = "For better or worse, everything seems to affect your mood more than it should."
icon = "flushed"
icon = FA_ICON_FLUSHED
value = -2
gain_text = span_danger("You seem to make a big deal out of everything.")
lose_text = span_notice("You don't seem to make a big deal out of everything anymore.")
Expand All @@ -366,7 +366,7 @@
/datum/quirk/light_drinker
name = "Light Drinker"
desc = "You just can't handle your drinks and get drunk very quickly."
icon = "cocktail"
icon = FA_ICON_COCKTAIL
value = -2
mob_trait = TRAIT_LIGHT_DRINKER
gain_text = span_notice("Just the thought of drinking alcohol makes your head spin.")
Expand All @@ -378,7 +378,7 @@
/datum/quirk/item_quirk/nearsighted
name = "Nearsighted"
desc = "You are nearsighted without prescription glasses, but spawn with a pair."
icon = "glasses"
icon = FA_ICON_GLASSES
value = -4
gain_text = span_danger("Things far away from you start looking blurry.")
lose_text = span_notice("You start seeing faraway things normally again.")
Expand Down Expand Up @@ -415,7 +415,7 @@
/datum/quirk/nyctophobia
name = "Nyctophobia"
desc = "As far as you can remember, you've always been afraid of the dark. While in the dark without a light source, you instinctively act careful, and constantly feel a sense of dread."
icon = "lightbulb"
icon = FA_ICON_LIGHTBULB
value = -3
medical_record_text = "Patient demonstrates a fear of the dark. (Seriously?)"
hardcore_value = 5
Expand Down Expand Up @@ -462,7 +462,7 @@
/datum/quirk/nonviolent
name = "Pacifist"
desc = "The thought of violence makes you sick. So much so, in fact, that you can't hurt anyone."
icon = "peace"
icon = FA_ICON_PEACE
value = -8
mob_trait = TRAIT_PACIFISM
gain_text = span_danger("You feel repulsed by the thought of violence!")
Expand All @@ -474,7 +474,7 @@
/datum/quirk/paraplegic
name = "Paraplegic"
desc = "Your legs do not function. Nothing will ever fix this. But hey, free wheelchair!"
icon = "wheelchair"
icon = FA_ICON_WHEELCHAIR
value = -12
gain_text = null // Handled by trauma.
lose_text = null
Expand Down Expand Up @@ -516,7 +516,7 @@
/datum/quirk/poor_aim
name = "Stormtrooper Aim"
desc = "You've never hit anything you were aiming for in your life."
icon = "bullseye"
icon = FA_ICON_BULLSEYE
value = -4
mob_trait = TRAIT_POOR_AIM
medical_record_text = "Patient possesses a strong tremor in both hands."
Expand All @@ -526,7 +526,7 @@
/datum/quirk/prosopagnosia
name = "Prosopagnosia"
desc = "You have a mental disorder that prevents you from being able to recognize faces at all."
icon = "user-secret"
icon = FA_ICON_USER_SECRET
value = -4
mob_trait = TRAIT_PROSOPAGNOSIA
medical_record_text = "Patient suffers from prosopagnosia and cannot recognize faces."
Expand Down Expand Up @@ -590,7 +590,7 @@
/datum/quirk/pushover
name = "Pushover"
desc = "Your first instinct is always to let people push you around. Resisting out of grabs will take conscious effort."
icon = "handshake"
icon = FA_ICON_HANDSHAKE
value = -8
mob_trait = TRAIT_GRABWEAKNESS
gain_text = span_danger("You feel like a pushover.")
Expand All @@ -604,7 +604,7 @@
desc = "You suffer from a severe disorder that causes very vivid hallucinations. \
Mindbreaker toxin can suppress its effects, and you are immune to mindbreaker's hallucinogenic properties. \
THIS IS NOT A LICENSE TO GRIEF."
icon = "grin-tongue-wink"
icon = FA_ICON_GRIN_TONGUE_WINK
value = -8
gain_text = span_userdanger("...")
lose_text = span_notice("You feel in tune with the world again.")
Expand Down Expand Up @@ -644,7 +644,7 @@
/datum/quirk/social_anxiety
name = "Social Anxiety"
desc = "Talking to people is very difficult for you, and you often stutter or even lock up."
icon = "comment-slash"
icon = FA_ICON_COMMENT_SLASH
value = -3
gain_text = span_danger("You start worrying about what you're saying.")
lose_text = span_notice("You feel easier about talking again.") //if only it were that easy!
Expand Down Expand Up @@ -759,7 +759,7 @@
/datum/quirk/item_quirk/junkie
name = "Junkie"
desc = "You can't get enough of hard drugs."
icon = "pills"
icon = FA_ICON_PILLS
value = -6
gain_text = span_danger("You suddenly feel the craving for drugs.")
medical_record_text = "Patient has a history of hard drugs."
Expand Down Expand Up @@ -849,7 +849,7 @@
/datum/quirk/item_quirk/junkie/smoker
name = "Smoker"
desc = "Sometimes you just really want a smoke. Probably not great for your lungs."
icon = "smoking"
icon = FA_ICON_SMOKING
value = -4
gain_text = span_danger("You could really go for a smoke right about now.")
medical_record_text = "Patient is a current smoker."
Expand Down Expand Up @@ -898,7 +898,7 @@
/datum/quirk/unstable
name = "Unstable"
desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!"
icon = "angry"
icon = FA_ICON_ANGRY
value = -10
mob_trait = TRAIT_UNSTABLE
gain_text = span_danger("There's a lot on your mind right now.")
Expand All @@ -910,7 +910,7 @@
/datum/quirk/item_quirk/allergic
name = "Extreme Medicine Allergy"
desc = "Ever since you were a kid, you've been allergic to certain chemicals..."
icon = "prescription-bottle"
icon = FA_ICON_PRESCRIPTION_BOTTLE
value = -6
gain_text = span_danger("You feel your immune system shift.")
lose_text = span_notice("You feel your immune system phase back into perfect shape.")
Expand Down Expand Up @@ -1005,7 +1005,7 @@
/datum/quirk/claustrophobia
name = "Claustrophobia"
desc = "You are terrified of small spaces and certain jolly figures. If you are placed inside any container, locker, or machinery, a panic attack sets in and you struggle to breathe."
icon = "box-open"
icon = FA_ICON_BOX_OPEN
value = -4
medical_record_text = "Patient demonstrates a fear of tight spaces."
hardcore_value = 5
Expand Down Expand Up @@ -1060,7 +1060,7 @@
/datum/quirk/illiterate
name = "Illiterate"
desc = "You dropped out of school and are unable to read or write. This affects reading, writing, using computers and other electronics."
icon = "graduation-cap"
icon = FA_ICON_GRADUATION_CAP
value = -8
mob_trait = TRAIT_ILLITERATE
medical_record_text = "Patient is not literate."
Expand All @@ -1071,7 +1071,7 @@
/datum/quirk/mute
name = "Mute"
desc = "For some reason you are completely unable to speak."
icon = "volume-xmark"
icon = FA_ICON_VOLUME_XMARK
value = -6 //monkestation change 4->6
mob_trait = TRAIT_MUTE
gain_text = span_danger("You find yourself unable to speak!")
Expand All @@ -1082,7 +1082,7 @@
/datum/quirk/body_purist
name = "Body Purist"
desc = "You believe your body is a temple and its natural form is an embodiment of perfection. Accordingly, you despise the idea of ever augmenting it with unnatural parts, cybernetic, prosthetic, or anything like it."
icon = "person-rays"
icon = FA_ICON_PERSON_RAYS
value = -2
quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_MOODLET_BASED
gain_text = span_danger("You now begin to hate the idea of having cybernetic implants.")
Expand Down Expand Up @@ -1152,7 +1152,7 @@
/datum/quirk/cursed
name = "Cursed"
desc = "You are cursed with bad luck. You are much more likely to suffer from accidents and mishaps. When it rains, it pours."
icon = "cloud-showers-heavy"
icon = FA_ICON_CLOUD_SHOWERS_HEAVY
value = -8
mob_trait = TRAIT_CURSED
gain_text = span_danger("You feel like you're going to have a bad day.")
Expand Down
Loading

0 comments on commit b802677

Please sign in to comment.