From 27d8f0786181104860f2b6262addf6be93fcf33f Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Fri, 20 Jan 2023 10:11:44 +0100 Subject: [PATCH] Fixes drinks allowing you to go into negative speed values. (#15604) Co-authored-by: Matt Atlas --- .../mob/living/carbon/human/human_movement.dm | 4 +- .../Chemistry-Reagents-Food-Drinks.dm | 1 - html/changelogs/mattatlas-tgoids.yml | 41 +++++++++++++++++++ 3 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 html/changelogs/mattatlas-tgoids.yml diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 4f2ba99c9c8..a4d2e036085 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -50,14 +50,14 @@ if(HAS_FLAG(mutations, mRun)) tally = 0 - tally += move_delay_mod + tally += max(0, tally + move_delay_mod) var/obj/item/I = get_active_hand() if(istype(I)) tally += I.slowdown if(tally > 0 && (CE_SPEEDBOOST in chem_effects)) - tally = max(0, tally-3) + tally = max(0, tally - 3) var/turf/T = get_turf(src) if(T) // changelings don't get movement costs diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm index 0ccba88043d..02efd61380f 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Food-Drinks.dm @@ -2069,7 +2069,6 @@ /singleton/reagent/drink/nuka_cola/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) ..() if(alien != IS_DIONA) - M.add_chemical_effect(CE_SPEEDBOOST, 1) M.make_jittery(20) M.druggy = max(M.druggy, 30) M.dizziness += 5 diff --git a/html/changelogs/mattatlas-tgoids.yml b/html/changelogs/mattatlas-tgoids.yml new file mode 100644 index 00000000000..a41ed6b67bb --- /dev/null +++ b/html/changelogs/mattatlas-tgoids.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes drinks allowing you to go into negative speed values."