mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 13:30:42 +01:00
Fixes a lot of bugs. (#16187)
* Fixes a lot of bugs. * fix more shit --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -46,33 +46,26 @@ note dizziness decrements automatically in the mob's Life() proc.
|
||||
/mob/var/is_jittery = 0
|
||||
/mob/var/jitteriness = 0//Carbon
|
||||
/mob/proc/make_jittery(var/amount)
|
||||
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
|
||||
return
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/make_jittery(amount)
|
||||
jitteriness = min(1000, jitteriness + amount) // store what will be new value
|
||||
// clamped to max 1000
|
||||
if(jitteriness > 100 && !is_jittery)
|
||||
if(jitteriness > 100 && !is_jittery && stat != DEAD && !(status_flags & FAKEDEATH))
|
||||
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
|
||||
is_jittery = TRUE
|
||||
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)
|
||||
|
||||
if(stat == DEAD || (status_flags & FAKEDEATH))
|
||||
break
|
||||
sleep(1)
|
||||
//endwhile - reset the pixel offsets to zero
|
||||
is_jittery = 0
|
||||
is_jittery = FALSE
|
||||
pixel_x = old_x
|
||||
pixel_y = old_y
|
||||
|
||||
|
||||
@@ -242,12 +242,12 @@
|
||||
msg += "<span class='warning'><B>[get_pronoun("He")] [get_pronoun("has")] engorged veins, which appear a vibrant red!</B></span>\n"
|
||||
|
||||
var/distance = get_dist(user,src)
|
||||
if(istype(user, /mob/abstract/observer) || user.stat == 2) // ghosts can see anything
|
||||
if(istype(user, /mob/abstract/observer) || user.stat == DEAD) // ghosts can see anything
|
||||
distance = 1
|
||||
|
||||
if(src.stat && !(src.species.flags & NO_BLOOD)) // No point checking pulse of a species that doesn't have one.
|
||||
if((src.stat || (status_flags & FAKEDEATH)) && !(src.species.flags & NO_BLOOD)) // No point checking pulse of a species that doesn't have one.
|
||||
msg += "<span class='warning'>[get_pronoun("He")] [get_pronoun("is")]n't responding to anything around [get_pronoun("him")] and seems to be unconscious.</span>\n"
|
||||
if((stat == DEAD || is_asystole() || src.losebreath) && distance <= 3 || (status_flags & FAKEDEATH))
|
||||
if(distance <= 3 && ((stat == DEAD || is_asystole() || src.losebreath) || (status_flags & FAKEDEATH)))
|
||||
msg += "<span class='warning'>[get_pronoun("He")] [get_pronoun("does")] not appear to be breathing.</span>\n"
|
||||
|
||||
else if (src.stat)
|
||||
|
||||
@@ -1900,7 +1900,7 @@
|
||||
//Get fluffy numbers
|
||||
/mob/living/carbon/human/proc/blood_pressure()
|
||||
if(status_flags & FAKEDEATH)
|
||||
return list(Floor(species.bp_base_systolic+rand(-5,5))*0.25, Floor(species.bp_base_disatolic+rand(-5,5)*0.25))
|
||||
return list(Floor(species.bp_base_systolic+rand(-5,5))*0.25, Floor(species.bp_base_disatolic+rand(-5,5))*0.25)
|
||||
var/blood_result = get_blood_circulation()
|
||||
return list(Floor((species.bp_base_systolic+rand(-5,5))*(blood_result/100)), Floor((species.bp_base_disatolic+rand(-5,5))*(blood_result/100)))
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
set desc = "Style your hair."
|
||||
set category = "IC"
|
||||
|
||||
if(!use_check_and_message())
|
||||
to_chat(src, SPAN_WARNING("You can't tie your hair when you are incapacitated!"))
|
||||
if(use_check_and_message())
|
||||
return
|
||||
|
||||
if(h_style)
|
||||
|
||||
@@ -183,6 +183,10 @@ proc/get_radio_key_from_channel(var/channel)
|
||||
return say_dead(message)
|
||||
return
|
||||
|
||||
if(silent)
|
||||
to_chat(src, SPAN_WARNING("You try to speak, but nothing comes out!"))
|
||||
return
|
||||
|
||||
var/message_mode = parse_message_mode(message, "headset")
|
||||
|
||||
var/regex/emote = regex("^(\[\\*^\])\[^*\]+$")
|
||||
|
||||
@@ -851,7 +851,7 @@
|
||||
//Wakes the mob up from sleeping
|
||||
/mob/living/simple_animal/proc/wake_up()
|
||||
if (stat != DEAD)
|
||||
set_stat(UNCONSCIOUS)
|
||||
set_stat(CONSCIOUS)
|
||||
resting = 0
|
||||
canmove = 1
|
||||
wander = 1
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
to_chat(src, SPAN_DANGER("You're muzzled and cannot speak!"))
|
||||
return
|
||||
|
||||
if(silent)
|
||||
to_chat(src, SPAN_WARNING("You try to speak, but nothing comes out!"))
|
||||
return
|
||||
|
||||
var/had_speaking = !!speaking
|
||||
speaking = speaking ? speaking : parse_language(message)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user