mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 03:59:59 +01:00
Makes Fluoride Stare less of a meme, fixes lizard blinking (#92426)
## About The Pull Request Buffs fluoride stare to not be completely unplayable, increasing warning delay from 30 seconds to 3 minutes, and post-warning grace to 30 seconds from 10, as well as halving damage per second. Also fixes lizard blinking being horribly broken, made brain damage properly update eye blinking instead of you having to wait until an update_body call to get your brain-damaged blinks. Additionally, fixes a bug where only roundstart eyes would blink, as #88300's removal of update_body in eye insertion prevents them from properly updating their overlays when inserted, thus not granting their owner passive blinking until forced by another source. - Closes #90269 ## Why It's Good For The Game Fluoride stare was somewhat of a joke quirk, but people liked the concept, so it should probably not make you blind in the first five minutes of the round. Original numbers are extremely detrimental and require constant micromanaging to the point where you can't do any job whatsoever.
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
eye_color_left = as_human.eye_color_left
|
||||
if (!eye_color_right)
|
||||
eye_color_right = as_human.eye_color_right
|
||||
refresh(receiver, call_update = !special)
|
||||
refresh(receiver, call_update = TRUE)
|
||||
RegisterSignal(receiver, COMSIG_ATOM_BULLET_ACT, PROC_REF(on_bullet_act))
|
||||
RegisterSignal(receiver, COMSIG_COMPONENT_CLEAN_FACE_ACT, PROC_REF(on_face_wash))
|
||||
if (scarring)
|
||||
@@ -416,7 +416,6 @@
|
||||
#define RAND_BLINKING_DELAY 1 SECONDS
|
||||
#define BLINK_DURATION 0.15 SECONDS
|
||||
#define BLINK_LOOPS 5
|
||||
#define ASYNC_BLINKING_BRAIN_DAMAGE 60
|
||||
|
||||
/// Modifies eye overlays to also act as eyelids, both for blinking and for when you're knocked out cold
|
||||
/obj/item/organ/eyes/proc/setup_eyelids(mutable_appearance/eye_left, mutable_appearance/eye_right, mob/living/carbon/human/parent)
|
||||
@@ -461,7 +460,6 @@
|
||||
if (anim_times)
|
||||
if (sync_blinking)
|
||||
wait_time = anim_times[1]
|
||||
anim_times.Cut(1, 2)
|
||||
else
|
||||
wait_time = rand(max(BASE_BLINKING_DELAY - RAND_BLINKING_DELAY, anim_times[1] - RAND_BLINKING_DELAY), anim_times[1])
|
||||
|
||||
@@ -472,17 +470,15 @@
|
||||
for (var/i in 1 to cycles)
|
||||
if (anim_times)
|
||||
if (sync_blinking)
|
||||
wait_time = anim_times[1]
|
||||
anim_times.Cut(1, 2)
|
||||
wait_time = anim_times[i + 1]
|
||||
else
|
||||
wait_time = rand(max(BASE_BLINKING_DELAY - RAND_BLINKING_DELAY, anim_times[1] - RAND_BLINKING_DELAY), anim_times[1])
|
||||
wait_time = rand(max(BASE_BLINKING_DELAY - RAND_BLINKING_DELAY, anim_times[i + 1] - RAND_BLINKING_DELAY), anim_times[i + 1])
|
||||
else
|
||||
wait_time = rand(BASE_BLINKING_DELAY - RAND_BLINKING_DELAY, BASE_BLINKING_DELAY + RAND_BLINKING_DELAY)
|
||||
. += wait_time
|
||||
if (anim_times && !sync_blinking)
|
||||
// Make sure that we're somewhat in sync with the other eye
|
||||
animate(time = anim_times[1] - wait_time)
|
||||
anim_times.Cut(1, 2)
|
||||
animate(time = anim_times[i + 1] - wait_time)
|
||||
animate(alpha = 255, time = 0)
|
||||
animate(time = BLINK_DURATION)
|
||||
if (i != cycles)
|
||||
@@ -490,17 +486,18 @@
|
||||
animate(time = wait_time)
|
||||
|
||||
/obj/item/organ/eyes/proc/blink(duration = BLINK_DURATION, restart_animation = TRUE)
|
||||
var/left_delayed = rand(50)
|
||||
var/left_delayed = prob(50)
|
||||
// Storing blink delay so mistimed blinks of lizards don't get cut short
|
||||
var/blink_delay = synchronized_blinking ? rand(0, RAND_BLINKING_DELAY) : 0
|
||||
var/sync_blinking = synchronized_blinking && (owner.get_organ_loss(ORGAN_SLOT_BRAIN) < BRAIN_DAMAGE_ASYNC_BLINKING)
|
||||
var/blink_delay = sync_blinking ? 0 : rand(0, RAND_BLINKING_DELAY)
|
||||
animate(eyelid_left, alpha = 0, time = 0)
|
||||
if (!synchronized_blinking && left_delayed)
|
||||
if (!sync_blinking && left_delayed)
|
||||
animate(time = blink_delay)
|
||||
animate(alpha = 255, time = 0)
|
||||
animate(time = duration)
|
||||
animate(alpha = 0, time = 0)
|
||||
animate(eyelid_right, alpha = 0, time = 0)
|
||||
if (!synchronized_blinking && !left_delayed)
|
||||
if (!sync_blinking && !left_delayed)
|
||||
animate(time = blink_delay)
|
||||
animate(alpha = 255, time = 0)
|
||||
animate(time = duration)
|
||||
@@ -509,7 +506,7 @@
|
||||
addtimer(CALLBACK(src, PROC_REF(animate_eyelids), owner), blink_delay + duration)
|
||||
|
||||
/obj/item/organ/eyes/proc/animate_eyelids(mob/living/carbon/human/parent)
|
||||
var/sync_blinking = synchronized_blinking && (parent.get_organ_loss(ORGAN_SLOT_BRAIN) < ASYNC_BLINKING_BRAIN_DAMAGE)
|
||||
var/sync_blinking = synchronized_blinking && (parent.get_organ_loss(ORGAN_SLOT_BRAIN) < BRAIN_DAMAGE_ASYNC_BLINKING)
|
||||
// Randomize order for unsynched animations
|
||||
if (sync_blinking || prob(50))
|
||||
var/list/anim_times = animate_eyelid(eyelid_left, parent, sync_blinking)
|
||||
@@ -532,7 +529,6 @@
|
||||
#undef RAND_BLINKING_DELAY
|
||||
#undef BLINK_DURATION
|
||||
#undef BLINK_LOOPS
|
||||
#undef ASYNC_BLINKING_BRAIN_DAMAGE
|
||||
|
||||
/// by default, returns the eyes' penlight_message var as a notice span. May do other things when overridden, such as eldritch insanity, or eye damage, or whatnot. Whatever you want, really.
|
||||
/obj/item/organ/eyes/proc/penlight_examine(mob/living/viewer)
|
||||
|
||||
Reference in New Issue
Block a user