[MIRROR] Dizzy and jittery components (#11273)

Co-authored-by: Will <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-07-30 16:20:22 -07:00
committed by GitHub
parent 105391bfee
commit fb4d35fb7a
26 changed files with 210 additions and 129 deletions

View File

@@ -35,7 +35,7 @@
if(xc.feral + H.nutrition < 150) if(xc.feral + H.nutrition < 150)
to_chat(usr, span_warning("Your hunger prevents you from regaining focus.")) to_chat(usr, span_warning("Your hunger prevents you from regaining focus."))
feral_passing = FALSE feral_passing = FALSE
if(H.jitteriness >= 100) if(H.get_jittery() >= 100)
to_chat(usr, span_warning("Your jitterness prevents you from regaining focus.")) to_chat(usr, span_warning("Your jitterness prevents you from regaining focus."))
feral_passing = FALSE feral_passing = FALSE
if(feral_passing) if(feral_passing)

View File

@@ -0,0 +1,85 @@
/*
dizzy process - wiggles the client's pixel offset over time
*/
/datum/component/dizzy_shake
var/mob/owner
var/dizziness
/datum/component/dizzy_shake/Initialize()
if (!ismob(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_LIVING_LIFE, PROC_REF(process_life))
RegisterSignal(owner, COMSIG_MOB_DEATH, PROC_REF(mob_death))
addtimer(CALLBACK(src, PROC_REF(handle_tick)), 1, TIMER_DELETE_ME) // Needs to be a LOT faster than life ticks
/datum/component/dizzy_shake/proc/process_life()
SIGNAL_HANDLER
if(QDELETED(parent))
return
//Resting
if(owner.resting)
dizziness -= 15
else
dizziness -= 3
// Handle jitters
if(dizziness <= 0)
qdel(src)
return
/datum/component/dizzy_shake/proc/handle_tick()
if(QDELETED(parent))
return
// Handle wobbles
if(dizziness <= 0)
qdel(src)
return
if(dizziness > 100 && owner.client)
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
owner.client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
owner.client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
addtimer(CALLBACK(src, PROC_REF(handle_tick)), 1, TIMER_DELETE_ME)
/datum/component/dizzy_shake/proc/mob_death()
SIGNAL_HANDLER
dizziness = 0
qdel(src)
/datum/component/dizzy_shake/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_LIVING_LIFE)
UnregisterSignal(owner, COMSIG_MOB_DEATH)
// Reset the pixel offsets to zero
if(owner.client)
owner.client.pixel_x = 0
owner.client.pixel_y = 0
owner = null
. = ..()
/* Dizzy
value of dizziness ranges from 0 to 1000
below 100 is not dizzy
*/
/mob/proc/make_dizzy(var/amount)
if(amount < 0 && get_dizzy() == 0) // If removing, check if we're already empty!
return
var/datum/component/dizzy_shake/DC = LoadComponent(/datum/component/dizzy_shake);
DC.dizziness = max(min(1000, DC.dizziness + amount),0) // store what will be new value
// clamped to max 1000
/mob/proc/clear_dizzy()
qdel(GetComponent(/datum/component/dizzy_shake))
/mob/proc/get_dizzy()
var/datum/component/dizzy_shake/DC = GetComponent(/datum/component/dizzy_shake);
if(!DC)
return 0
return max(DC.dizziness,0)

View File

@@ -0,0 +1,86 @@
/*
jittery process - wiggles the mob's pixel offset over time
*/
/datum/component/jittery_shake
var/mob/owner
var/jitteriness
/datum/component/jittery_shake/Initialize()
if (!ismob(parent))
return COMPONENT_INCOMPATIBLE
owner = parent
RegisterSignal(owner, COMSIG_LIVING_LIFE, PROC_REF(process_life))
RegisterSignal(owner, COMSIG_MOB_DEATH, PROC_REF(mob_death))
addtimer(CALLBACK(src, PROC_REF(handle_tick)), 1, TIMER_DELETE_ME) // Needs to be a LOT faster than life ticks
/datum/component/jittery_shake/proc/process_life()
SIGNAL_HANDLER
if(QDELETED(parent))
return
//Resting
if(owner.resting)
jitteriness -= 15
else
jitteriness -= 3
// Handle jitters
if(jitteriness <= 0)
qdel(src)
return
/datum/component/jittery_shake/proc/handle_tick()
if(QDELETED(parent))
return
// Handle jitters
if(jitteriness <= 0)
qdel(src)
return
// Shakey shakey
if(jitteriness > 100)
var/amplitude = min(4, jitteriness / 100)
owner.pixel_x = owner.old_x + rand(-amplitude, amplitude)
owner.pixel_y = owner.old_y + rand(-amplitude/3, amplitude/3)
addtimer(CALLBACK(src, PROC_REF(handle_tick)), 1, TIMER_DELETE_ME)
/datum/component/jittery_shake/proc/mob_death()
SIGNAL_HANDLER
jitteriness = 0
qdel(src)
/datum/component/jittery_shake/Destroy(force = FALSE)
UnregisterSignal(owner, COMSIG_LIVING_LIFE)
UnregisterSignal(owner, COMSIG_MOB_DEATH)
// Reset the pixel offsets to zero
owner.pixel_x = owner.old_x
owner.pixel_y = owner.old_y
owner = null
. = ..()
/* jitteriness
value of jittery ranges from 0 to 1000
below 100 is not jittery
*/
/mob/proc/make_jittery(var/amount)
if(amount < 0 && get_jittery() == 0) // If removing, check if we're already empty!
return
var/datum/component/jittery_shake/JC = LoadComponent(/datum/component/jittery_shake);
JC.jitteriness = max(min(1000, JC.jitteriness + amount),0) // store what will be new value
// clamped to max 1000
/mob/proc/clear_jittery()
qdel(GetComponent(/datum/component/jittery_shake))
/mob/proc/get_jittery()
var/datum/component/jittery_shake/JC = GetComponent(/datum/component/jittery_shake);
if(!JC)
return 0
return max(JC.jitteriness,0)

View File

@@ -19,7 +19,7 @@
return return
if(prob(5) && prob(7)) if(prob(5) && prob(7))
owner.stuttering = max(15, owner.stuttering) owner.stuttering = max(15, owner.stuttering)
if(owner.jitteriness < 50) if(owner.get_jittery() < 50)
owner.make_jittery(65) owner.make_jittery(65)
/datum/component/nervousness_disability/Destroy(force = FALSE) /datum/component/nervousness_disability/Destroy(force = FALSE)

View File

@@ -79,7 +79,7 @@
var/shock = 0.75*owner.traumatic_shock var/shock = 0.75*owner.traumatic_shock
//Caffeinated or otherwise overexcited xenochimera can become feral and have special messages //Caffeinated or otherwise overexcited xenochimera can become feral and have special messages
var/jittery = max(0, owner.jitteriness - 100) var/jittery = max(0, owner.get_jittery() - 100)
//Are we in danger of ferality? //Are we in danger of ferality?
var/danger = FALSE var/danger = FALSE

View File

@@ -65,9 +65,9 @@ BONUS
if(1) if(1)
to_chat(M, span_notice("You feel bloated.")) to_chat(M, span_notice("You feel bloated."))
if(!M.jitteriness) if(!M.get_jittery())
to_chat(M, span_notice("You feel a bit jittery.")) to_chat(M, span_notice("You feel a bit jittery."))
M.jitteriness = 10 M.make_jittery(100 + rand(12,16))
if(2) if(2)
if(ishuman(M)) if(ishuman(M))

View File

@@ -65,7 +65,7 @@ Bonus
switch(A.stage) switch(A.stage)
if(2 to 3) if(2 to 3)
if(prob(power) && H.stat) if(prob(power) && H.stat)
H.jitteriness += (2 * power) H.make_jittery(2 * power)
H.emote("twitch") H.emote("twitch")
to_chat(H, span_notice("[pick("you feel energetic!", "You feel well-rested.", "You feel great!")]")) to_chat(H, span_notice("[pick("you feel energetic!", "You feel well-rested.", "You feel great!")]"))
if(4 to 5) if(4 to 5)

View File

@@ -35,7 +35,7 @@
span_userdanger("You have a panic attack!") span_userdanger("You have a panic attack!")
) )
affected_mob.AdjustConfused(rand(12, 16)) affected_mob.AdjustConfused(rand(12, 16))
affected_mob.jitteriness = rand(12, 16) affected_mob.make_jittery(100 + rand(12, 16))
if(prob(2)) if(prob(2))
affected_mob.visible_message( affected_mob.visible_message(
span_danger("[affected_mob] coughs up butterflies!"), span_danger("[affected_mob] coughs up butterflies!"),

View File

@@ -199,7 +199,7 @@
minor_problems += "<br>" + span_warning("Ethanol intoxication detected - suggest close observation to alleviate risk of injury.") minor_problems += "<br>" + span_warning("Ethanol intoxication detected - suggest close observation to alleviate risk of injury.")
if(user.getHalLoss()) if(user.getHalLoss())
minor_problems += "<br>" + span_warning("Mild concussion detected - advising bed rest until feeling better.") minor_problems += "<br>" + span_warning("Mild concussion detected - advising bed rest until feeling better.")
if(user.jitteriness || user.dizziness) if(user.get_jittery() || user.get_dizzy())
minor_problems += "<br>" + span_warning("Neurological symptoms detected - advising bed rest until feeling better.") //Resting fixes dizziness and jitteryness! minor_problems += "<br>" + span_warning("Neurological symptoms detected - advising bed rest until feeling better.") //Resting fixes dizziness and jitteryness!
else else
minor_problems += "<br>" + span_notice("No anatomical issues detected.") minor_problems += "<br>" + span_notice("No anatomical issues detected.")

View File

@@ -100,7 +100,8 @@
if("permanent sleeping") if("permanent sleeping")
owner.sleeping = max(owner.sleeping+10,10) owner.sleeping = max(owner.sleeping+10,10)
if("jittery") if("jittery")
owner.make_jittery(100) if(owner.get_jittery() < 100)
owner.make_jittery(100)
if("paralysed") if("paralysed")
owner.paralysis = max(owner.paralysis,10) owner.paralysis = max(owner.paralysis,10)
if("cough") if("cough")

View File

@@ -39,7 +39,7 @@
"IT HURTS.", "IT HURTS.",
"Your body feels as if it's trying to rip itself open..." "Your body feels as if it's trying to rip itself open..."
) )
if(prob(20) && our_human.jitteriness < 50) if(prob(20) && our_human.get_jittery() < 50)
our_human.make_jittery(120) our_human.make_jittery(120)
to_chat(our_human, span_danger(pick(pain_message))) to_chat(our_human, span_danger(pick(pain_message)))

View File

@@ -1,82 +1,3 @@
/*
adds a dizziness amount to a mob
use this rather than directly changing var/dizziness
since this ensures that the dizzy_process proc is started
currently only humans get dizzy
value of dizziness ranges from 0 to 1000
below 100 is not dizzy
*/
/mob/var/dizziness = 0//Carbon
/mob/var/is_dizzy = 0
/mob/proc/make_dizzy(var/amount)
if(!ishuman(src)) // for the moment, only humans get dizzy
return
dizziness = min(1000, dizziness + amount) // store what will be new value
// clamped to max 1000
if(dizziness > 100 && !is_dizzy)
spawn(0)
dizzy_process()
/*
dizzy process - wiggles the client's pixel offset over time
spawned from make_dizzy(), will terminate automatically when dizziness gets <100
note dizziness decrements automatically in the mob's Life() proc.
*/
/mob/proc/dizzy_process()
is_dizzy = 1
while(dizziness > 100)
if(client)
var/amplitude = dizziness*(sin(dizziness * 0.044 * world.time) + 1) / 70
client.pixel_x = amplitude * sin(0.008 * dizziness * world.time)
client.pixel_y = amplitude * cos(0.008 * dizziness * world.time)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_dizzy = 0
if(client)
client.pixel_x = 0
client.pixel_y = 0
// jitteriness - copy+paste of dizziness
/mob/var/is_jittery = 0
/mob/var/jitteriness = 0//Carbon
/mob/proc/make_jittery(var/amount)
if(!ishuman(src)) // for the moment, only humans get dizzy
return
jitteriness = min(1000, jitteriness + amount) // store what will be new value
// clamped to max 1000
if(jitteriness > 100 && !is_jittery)
spawn(0)
jittery_process()
// Typo from the oriignal coder here, below lies the jitteriness process. So make of his code what you will, the previous comment here was just a copypaste of the above.
/mob/proc/jittery_process()
//var/old_x = pixel_x
//var/old_y = pixel_y
is_jittery = 1
while(jitteriness > 100)
// var/amplitude = jitteriness*(sin(jitteriness * 0.044 * world.time) + 1) / 70
// pixel_x = amplitude * sin(0.008 * jitteriness * world.time)
// pixel_y = amplitude * cos(0.008 * jitteriness * world.time)
var/amplitude = min(4, jitteriness / 100)
pixel_x = old_x + rand(-amplitude, amplitude)
pixel_y = old_y + rand(-amplitude/3, amplitude/3)
sleep(1)
//endwhile - reset the pixel offsets to zero
is_jittery = 0
pixel_x = old_x
pixel_y = old_y
//handles up-down floaty effect in space and zero-gravity //handles up-down floaty effect in space and zero-gravity
/mob/var/is_floating = 0 /mob/var/is_floating = 0
/mob/var/floatiness = 0 /mob/var/floatiness = 0

View File

@@ -89,9 +89,6 @@
update_canmove() update_canmove()
dizziness = 0
jitteriness = 0
layer = MOB_LAYER layer = MOB_LAYER
sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS

View File

@@ -77,12 +77,6 @@
if(ingested) ingested.metabolize() if(ingested) ingested.metabolize()
if(bloodstr) bloodstr.metabolize() if(bloodstr) bloodstr.metabolize()
// decrement dizziness counter, clamped to 0
if(resting)
dizziness = max(0, dizziness - 5)
else
dizziness = max(0, dizziness - 1)
updatehealth() updatehealth()
return //TODO: DEFERRED return //TODO: DEFERRED

View File

@@ -255,12 +255,13 @@
msg += "[T.He] [T.is] wearing [icon2html(wear_id,user.client)]<a href='byond://?src=\ref[src];lookitem_desc_only=\ref[wear_id]'>\a [wear_id]</a>." msg += "[T.He] [T.is] wearing [icon2html(wear_id,user.client)]<a href='byond://?src=\ref[src];lookitem_desc_only=\ref[wear_id]'>\a [wear_id]</a>."
//Jitters //Jitters
if(is_jittery) var/jitter = get_jittery()
if(jitteriness >= 300) if(jitter)
if(jitter >= 300)
msg += span_boldwarning("[T.He] [T.is] convulsing violently!") msg += span_boldwarning("[T.He] [T.is] convulsing violently!")
else if(jitteriness >= 200) else if(jitter >= 200)
msg += span_warning("[T.He] [T.is] extremely jittery.") msg += span_warning("[T.He] [T.is] extremely jittery.")
else if(jitteriness >= 100) else if(jitter >= 100)
msg += span_warning("[T.He] [T.is] twitching ever so slightly.") msg += span_warning("[T.He] [T.is] twitching ever so slightly.")
//splints //splints

View File

@@ -1390,12 +1390,8 @@
//Resting //Resting
if(resting) if(resting)
dizziness = max(0, dizziness - 15)
jitteriness = max(0, jitteriness - 15)
adjustHalLoss(-3) adjustHalLoss(-3)
else else
dizziness = max(0, dizziness - 3)
jitteriness = max(0, jitteriness - 3)
adjustHalLoss(-1) adjustHalLoss(-1)
if (drowsyness) if (drowsyness)

View File

@@ -133,7 +133,7 @@
message_data[2] = pick(M.say_verbs) message_data[2] = pick(M.say_verbs)
. = 1 . = 1
else if((CE_SPEEDBOOST in chem_effects) || (is_jittery && !stuttering)) // motor mouth, check for stuttering so anxiety doesn't do hyperzine text else if((CE_SPEEDBOOST in chem_effects) || (get_jittery() >= 100 && !stuttering)) // motor mouth, check for stuttering so anxiety doesn't do hyperzine text
// Despite trying to url/html decode these, byond is just being bad and I dunno. // Despite trying to url/html decode these, byond is just being bad and I dunno.
var/static/regex/speedboost_initial = new (@"&[a-z]{2,5};|&#\d{2};","g") var/static/regex/speedboost_initial = new (@"&[a-z]{2,5};|&#\d{2};","g")
// Not herestring because bad vs code syntax highlight panics at apostrophe // Not herestring because bad vs code syntax highlight panics at apostrophe

View File

@@ -999,7 +999,7 @@
if(!(M.species.allergens & allergen_type)) if(!(M.species.allergens & allergen_type))
var/bonus = M.food_preference(allergen_type) var/bonus = M.food_preference(allergen_type)
M.adjust_nutrition((nutrition + bonus) * removed) M.adjust_nutrition((nutrition + bonus) * removed)
M.dizziness = max(0, M.dizziness + adj_dizzy) M.make_dizzy(adj_dizzy)
M.drowsyness = max(0, M.drowsyness + adj_drowsy) M.drowsyness = max(0, M.drowsyness + adj_drowsy)
M.AdjustSleeping(adj_sleepy) M.AdjustSleeping(adj_sleepy)
if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055 if(adj_temp > 0 && M.bodytemperature < 310) // 310 is the normal bodytemp. 310.055
@@ -2203,7 +2203,7 @@
M.add_chemical_effect(CE_SPEEDBOOST, 1) M.add_chemical_effect(CE_SPEEDBOOST, 1)
M.make_jittery(20) M.make_jittery(20)
M.druggy = max(M.druggy, 30) M.druggy = max(M.druggy, 30)
M.dizziness += 5 M.make_dizzy(5)
M.drowsyness = 0 M.drowsyness = 0
/datum/reagent/drink/grenadine //Description implies that the grenadine we would be working with does not contain fruit, so no allergens. /datum/reagent/drink/grenadine //Description implies that the grenadine we would be working with does not contain fruit, so no allergens.
@@ -2515,8 +2515,7 @@
M.adjustOxyLoss(-4 * removed) M.adjustOxyLoss(-4 * removed)
M.heal_organ_damage(2 * removed, 2 * removed) M.heal_organ_damage(2 * removed, 2 * removed)
M.adjustToxLoss(-2 * removed) M.adjustToxLoss(-2 * removed)
if(M.dizziness) M.make_dizzy(-15)
M.dizziness = max(0, M.dizziness - 15)
if(M.confused) if(M.confused)
M.Confuse(-5) M.Confuse(-5)
@@ -3073,7 +3072,7 @@
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
M.adjust_nutrition((M.food_preference(allergen_type) / 2) * removed) //RS edit M.adjust_nutrition((M.food_preference(allergen_type) / 2) * removed) //RS edit
M.jitteriness = max(M.jitteriness - 3, 0) M.make_jittery(-3)
/datum/reagent/ethanol/beer/lite /datum/reagent/ethanol/beer/lite
name = REAGENT_LITEBEER name = REAGENT_LITEBEER
@@ -3134,7 +3133,7 @@
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
if(M.species.robo_ethanol_drunk || !(M.isSynthetic())) if(M.species.robo_ethanol_drunk || !(M.isSynthetic()))
M.dizziness +=5 M.make_dizzy(5)
/datum/reagent/ethanol/firepunch /datum/reagent/ethanol/firepunch
name = REAGENT_FIREPUNCH name = REAGENT_FIREPUNCH
@@ -3172,7 +3171,7 @@
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
..() ..()
M.dizziness = max(0, M.dizziness - 5) M.make_dizzy(-5)
M.drowsyness = max(0, M.drowsyness - 3) M.drowsyness = max(0, M.drowsyness - 3)
M.AdjustSleeping(-2) M.AdjustSleeping(-2)
if(M.bodytemperature > 310) if(M.bodytemperature > 310)

View File

@@ -102,7 +102,7 @@
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/datum/component/xenochimera/xc = M.get_xenochimera_component() var/datum/component/xenochimera/xc = M.get_xenochimera_component()
if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.get_jittery() < 100) //Same check as feral triggers to stop them immediately re-feralling
xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm. xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
if (xc.feral <=0) //check if they're unferalled if (xc.feral <=0) //check if they're unferalled
xc.feral = 0 xc.feral = 0
@@ -468,7 +468,7 @@
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/datum/component/xenochimera/xc = M.get_xenochimera_component() var/datum/component/xenochimera/xc = M.get_xenochimera_component()
if(xc && xc.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.jitteriness < 100) // same check as feral triggers to stop them immediately re-feralling if(xc && xc.feral > 0 && H.nutrition > 100 && H.traumatic_shock < min(60, H.nutrition/10) && H.get_jittery() < 100) // same check as feral triggers to stop them immediately re-feralling
xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm. xc.feral -= removed * 3 // should calm them down quick, provided they're actually in a state to STAY calm.
if (xc.feral <=0) //check if they're unferalled if (xc.feral <=0) //check if they're unferalled
xc.feral = 0 xc.feral = 0
@@ -558,7 +558,7 @@
if(ishuman(M)) if(ishuman(M))
var/mob/living/carbon/human/H = M var/mob/living/carbon/human/H = M
var/datum/component/xenochimera/xc = M.get_xenochimera_component() var/datum/component/xenochimera/xc = M.get_xenochimera_component()
if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.jitteriness < 100) //Same check as feral triggers to stop them immediately re-feralling if(xc && xc.feral > 0 && H.nutrition > 150 && H.traumatic_shock < 20 && H.get_jittery() < 100) //Same check as feral triggers to stop them immediately re-feralling
xc.feral -= removed * 3 //Should calm them down quick, provided they're actually in a state to STAY calm. xc.feral -= removed * 3 //Should calm them down quick, provided they're actually in a state to STAY calm.
if(xc.feral <=0) //Check if they're unferalled if(xc.feral <=0) //Check if they're unferalled
xc.feral = 0 xc.feral = 0

View File

@@ -1053,7 +1053,7 @@
/datum/reagent/ethylredoxrazine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed) /datum/reagent/ethylredoxrazine/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
M.dizziness = 0 M.clear_dizzy()
M.drowsyness = 0 M.drowsyness = 0
M.stuttering = 0 M.stuttering = 0
M.SetConfused(0) M.SetConfused(0)
@@ -1065,7 +1065,7 @@
/datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) /datum/reagent/ethylredoxrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
M.dizziness = 0 M.clear_dizzy()
M.drowsyness = 0 M.drowsyness = 0
M.stuttering = 0 M.stuttering = 0
M.SetConfused(0) M.SetConfused(0)

View File

@@ -14,8 +14,7 @@
M.Confuse(-8*removed) M.Confuse(-8*removed)
if(M.eye_blurry) if(M.eye_blurry)
M.eye_blurry = max(M.eye_blurry - 25*removed, 0) M.eye_blurry = max(M.eye_blurry - 25*removed, 0)
if(M.jitteriness) M.make_jittery(-25*removed)
M.make_jittery(min(-25*removed,0))
/datum/reagent/numbing_enzyme /datum/reagent/numbing_enzyme
name = REAGENT_NUMBENZYME name = REAGENT_NUMBENZYME

View File

@@ -196,12 +196,12 @@
M.SetStunned(0) M.SetStunned(0)
M.SetParalysis(0) M.SetParalysis(0)
M.silent = 0 M.silent = 0
M.dizziness = 0 M.clear_dizzy()
M.clear_jittery()
M.drowsyness = 0 M.drowsyness = 0
M.stuttering = 0 M.stuttering = 0
M.SetConfused(0) M.SetConfused(0)
M.SetSleeping(0) M.SetSleeping(0)
M.jitteriness = 0
M.radiation = 0 M.radiation = 0
M.ExtinguishMob() M.ExtinguishMob()
M.fire_stacks = 0 M.fire_stacks = 0

View File

@@ -859,7 +859,7 @@
/datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) /datum/reagent/impedrezene/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_DIONA) if(alien == IS_DIONA)
return return
M.jitteriness = max(M.jitteriness - 5, 0) M.make_jittery(-5)
if(prob(80)) if(prob(80))
M.adjustBrainLoss(0.1 * removed) M.adjustBrainLoss(0.1 * removed)
if(prob(50)) if(prob(50))

View File

@@ -140,6 +140,6 @@ Targeted spells have two useful flags: INCLUDEUSER and SELECTABLE. These are exp
target.buckled = null target.buckled = null
target.Blind(amt_eye_blind) target.Blind(amt_eye_blind)
target.eye_blurry += amt_eye_blurry target.eye_blurry += amt_eye_blurry
target.dizziness += amt_dizziness target.make_dizzy(amt_dizziness)
target.Confuse(amt_confused) target.Confuse(amt_confused)
target.stuttering += amt_stuttering target.stuttering += amt_stuttering

View File

@@ -102,7 +102,7 @@
to_chat(H, span_red("[pick(messages)]")) to_chat(H, span_red("[pick(messages)]"))
if(prob(50)) if(prob(50))
H.dizziness += rand(3,5) H.make_dizzy(rand(3,5))
if(feeling_type == CANNIBAL_FEELING) if(feeling_type == CANNIBAL_FEELING)
H.nutrition = H.nutrition / 1.5 H.nutrition = H.nutrition / 1.5
@@ -118,7 +118,7 @@
to_chat(H, span_red("<font size='[num2text(rand(1,5))]'> " + span_bold("[pick(drastic_messages)]") + " </font>")) to_chat(H, span_red("<font size='[num2text(rand(1,5))]'> " + span_bold("[pick(drastic_messages)]") + " </font>"))
if(prob(10)) if(prob(10))
H.dizziness += rand(3,5) H.make_dizzy(rand(3,5))
if(feeling_type == CANNIBAL_FEELING) if(feeling_type == CANNIBAL_FEELING)
H.nutrition = H.nutrition / 2 H.nutrition = H.nutrition / 2
return 1 return 1
@@ -135,9 +135,9 @@
to_chat(H, span_red("[pick(messages)]")) to_chat(H, span_red("[pick(messages)]"))
if(prob(50)) if(prob(50))
H.dizziness += rand(3,5) H.make_dizzy(rand(3,5))
else if(prob(25)) else if(prob(25))
H.dizziness += rand(5,15) H.make_dizzy(rand(5,15))
if(feeling_type == CANNIBAL_FEELING) if(feeling_type == CANNIBAL_FEELING)
H.nutrition = H.nutrition / 4 H.nutrition = H.nutrition / 4
return 1 return 1

View File

@@ -553,6 +553,8 @@
#include "code\datums\components\recursive_move.dm" #include "code\datums\components\recursive_move.dm"
#include "code\datums\components\resize_guard.dm" #include "code\datums\components\resize_guard.dm"
#include "code\datums\components\swarm.dm" #include "code\datums\components\swarm.dm"
#include "code\datums\components\animations\dizzy.dm"
#include "code\datums\components\animations\jittery.dm"
#include "code\datums\components\antags\antag.dm" #include "code\datums\components\antags\antag.dm"
#include "code\datums\components\antags\changeling\changeling.dm" #include "code\datums\components\antags\changeling\changeling.dm"
#include "code\datums\components\antags\changeling\helpers\absorbed_dna.dm" #include "code\datums\components\antags\changeling\helpers\absorbed_dna.dm"