Skip to content

Commit

Permalink
Dizziness status QOL/tweaks (#3933)
Browse files Browse the repository at this point in the history
# About the pull request
Reduces maximum dizziness value, prevents screen from spinning when
buckling or resting and adds associated chat messages.



# Explain why it's good for the game
Clarity and ways to prevent nausea for people suffering from motion
sickness are good.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: Messages suggesting to lie down when dizzy and when the effect is
over.
add: Prevents the screen from spinning when buckled or resting
tweak: Maximum dizzy value lowered by half
/:cl:
  • Loading branch information
GoldenDarkness55 authored Jul 25, 2023
1 parent fd71dac commit 47f8cad
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,8 @@ below 100 is not dizzy
if(!istype(src, /mob/living/carbon/human)) // for the moment, only humans get dizzy
return

dizziness = min(1000, dizziness + amount) // store what will be new value
// clamped to max 1000
dizziness = min(500, dizziness + amount) // store what will be new value
// clamped to max 500
if(dizziness > 100 && !is_dizzy)
INVOKE_ASYNC(src, PROC_REF(dizzy_process))

Expand All @@ -609,16 +609,22 @@ note dizziness decrements automatically in the mob's Life() proc.
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)

if(buckled || resting)
client.pixel_x = 0
client.pixel_y = 0
else
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)
if(prob(1))
to_chat(src, "The dizziness is becoming unbearable! It should pass faster if you lie down.")
sleep(1)
//endwhile - reset the pixel offsets to zero
is_dizzy = 0
if(client)
client.pixel_x = 0
client.pixel_y = 0
to_chat(src, "The dizziness has passed, you're starting to feel better.")

// jitteriness - copy+paste of dizziness

Expand Down

0 comments on commit 47f8cad

Please sign in to comment.