mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
* Kills `seconds_per_tick` from status effect `tick`, replaces it with `seconds_between_ticks` to clarify some things (#77219) ## About The Pull Request https://github.com/tgstation/tgstation/pull/66573#discussion_r861157216 `status_effect/proc/tick(seconds_per_tick)` is wildly misleading and I feel like I should address it For a majority of status effects, they process on fast processing but do not tick every fastprocessing tick This means that using `seconds_per_tick` here is not giving you the seconds between status effect ticks, it's giving you seconds between processing ticks (`0.2`) This is how it's misleading - If you have a tick interval of `1 SECONDS`, you'd think `seconds_per_tick` is, well, one. But it's actually one-fifth. So all of your effects are now 80% weaker. I have replaced the use of `seconds_per_tick` in tick with `seconds_between_ticks`. This number is, quite simply, the initial tick interval of the status effect divided by ten. An effect with the tick interval of `1 SECONDS` has a `seconds_between_ticks` of 1. As a consequence, some things which were inadvertently made weaker, such as fire and some heretic things (at a glance), are now a little stronger. ## Why It's Good For The Game See above. Makes it more clear what you're doing when working with effects. ## Changelog 🆑 Melbert code: Updated some status effect tick code to be more clear of how long is elapsing between ticks. Some effects that were inadvertently weakened are now stronger as a result (fire and some heretic effects). /🆑 * Kills `seconds_per_tick` from status effect `tick`, replaces it with `seconds_between_ticks` to clarify some things * Modular updates --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
42 lines
1.4 KiB
Plaintext
42 lines
1.4 KiB
Plaintext
/// How many wetstacks does the clothing's status effect apply to its wearer
|
|
#define STATUS_EFFECT_STACKS 5
|
|
|
|
/datum/component/wetsuit
|
|
dupe_mode = COMPONENT_DUPE_UNIQUE
|
|
|
|
/datum/component/wetsuit/RegisterWithParent()
|
|
. = ..()
|
|
RegisterSignal(parent, COMSIG_ITEM_EQUIPPED, PROC_REF(apply_wetsuit_status_effect))
|
|
RegisterSignal(parent, COMSIG_ITEM_DROPPED, PROC_REF(remove_wetsuit_status_effect))
|
|
|
|
/datum/component/wetsuit/UnregisterFromParent()
|
|
. = ..()
|
|
UnregisterSignal(parent, list(
|
|
COMSIG_ITEM_EQUIPPED,
|
|
COMSIG_ITEM_DROPPED,
|
|
))
|
|
|
|
/// A proc for all akula clothing which has the 'special tech' to keep their wearers slippery
|
|
/datum/component/wetsuit/proc/apply_wetsuit_status_effect(obj/item/source, mob/living/user, slot)
|
|
if(slot == ITEM_SLOT_HANDS)
|
|
return FALSE
|
|
if(!HAS_TRAIT(user, TRAIT_SLICK_SKIN))
|
|
return FALSE
|
|
|
|
user.apply_status_effect(/datum/status_effect/grouped/wetsuit, REF(source))
|
|
|
|
/// A proc to remove the wetsuit status effect
|
|
/datum/component/wetsuit/proc/remove_wetsuit_status_effect(obj/item/source, mob/living/user, slot)
|
|
user.remove_status_effect(/datum/status_effect/grouped/wetsuit, REF(source))
|
|
|
|
/// The status effect which `apply_wetsuit_status_effect` gives
|
|
/datum/status_effect/grouped/wetsuit
|
|
id = "wetsuit"
|
|
alert_type = null
|
|
tick_interval = 10 SECONDS
|
|
|
|
/datum/status_effect/grouped/wetsuit/tick(seconds_between_ticks)
|
|
owner.set_wet_stacks(STATUS_EFFECT_STACKS)
|
|
|
|
#undef STATUS_EFFECT_STACKS
|