mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Adds an action speed modifier system (#522)
* Adds an action speed modifier system (#53023) * Adds an action speed modifier system Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
@@ -984,20 +984,6 @@
|
||||
set_usable_hands(usable_hands - 1)
|
||||
|
||||
|
||||
/mob/living/carbon/do_after_coefficent()
|
||||
. = ..()
|
||||
var/datum/component/mood/mood = src.GetComponent(/datum/component/mood) //Currently, only carbons or higher use mood, move this once that changes.
|
||||
if(mood)
|
||||
switch(mood.sanity) //Alters do_after delay based on how sane you are
|
||||
if(-INFINITY to SANITY_DISTURBED)
|
||||
. *= 1.25
|
||||
if(SANITY_NEUTRAL to INFINITY)
|
||||
. *= 0.90
|
||||
|
||||
for(var/i in status_effects)
|
||||
var/datum/status_effect/S = i
|
||||
. *= S.interact_speed_modifier()
|
||||
|
||||
/mob/living/carbon/proc/create_internal_organs()
|
||||
for(var/X in internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
|
||||
@@ -1158,10 +1158,6 @@
|
||||
riding_datum.handle_vehicle_layer()
|
||||
. = ..(target, force, check_loc)
|
||||
|
||||
/mob/living/carbon/human/do_after_coefficent()
|
||||
. = ..()
|
||||
. *= physiology.do_after_speed
|
||||
|
||||
/mob/living/carbon/human/updatehealth()
|
||||
. = ..()
|
||||
dna?.species.spec_updatehealth(src)
|
||||
|
||||
@@ -23,7 +23,5 @@
|
||||
|
||||
var/hunger_mod = 1 //% of hunger rate taken per tick.
|
||||
|
||||
var/do_after_speed = 1 //Speed mod for do_after. Lower is better. If temporarily adjusting, please only modify using *= and /=, so you don't interrupt other calculations.
|
||||
|
||||
/datum/physiology/New()
|
||||
armor = new
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
set_nutrition(rand(NUTRITION_LEVEL_START_MIN, NUTRITION_LEVEL_START_MAX))
|
||||
. = ..()
|
||||
update_config_movespeed()
|
||||
initialize_actionspeed()
|
||||
update_movespeed(TRUE)
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
var/list/movespeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
||||
/// The calculated mob speed slowdown based on the modifiers list
|
||||
var/cached_multiplicative_slowdown
|
||||
/// List of action speed modifiers applying to this mob
|
||||
var/list/actionspeed_modification //Lazy list, see mob_movespeed.dm
|
||||
/// List of action speed modifiers ignored by this mob. List -> List (id) -> List (sources)
|
||||
var/list/actionspeed_mod_immunities //Lazy list, see mob_movespeed.dm
|
||||
/// The calculated mob action speed slowdown based on the modifiers list
|
||||
var/cached_multiplicative_actions_slowdown
|
||||
/// List of action hud items the user has
|
||||
var/list/datum/action/actions
|
||||
/// A special action? No idea why this lives here
|
||||
|
||||
Reference in New Issue
Block a user