mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
## 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). /🆑
18 lines
917 B
Plaintext
18 lines
917 B
Plaintext
/// Tests that no runtimes are thrown when a mob is on fire
|
|
/datum/unit_test/burning
|
|
|
|
/datum/unit_test/burning/Run()
|
|
var/mob/living/carbon/human/dummy = allocate(/mob/living/carbon/human/consistent)
|
|
var/initial_temp = dummy.bodytemperature
|
|
// Light this baby up
|
|
dummy.set_fire_stacks(20)
|
|
dummy.ignite_mob()
|
|
TEST_ASSERT(dummy.on_fire, "Dummy is not on fire despite having 20 fire stacks and being ignited.")
|
|
// Manually tick it a few times
|
|
var/datum/status_effect/fire_handler/fire_stacks/handler = locate() in dummy.status_effects
|
|
for(var/i in 1 to 5)
|
|
handler.tick_interval = world.time - 1
|
|
handler.process()
|
|
TEST_ASSERT(dummy.fire_stacks < 20, "Dummy should have decayed firestacks, but did not. (Dummy stacks: [dummy.fire_stacks]).")
|
|
TEST_ASSERT(dummy.bodytemperature > initial_temp, "Dummy did not heat up despite being on fire. (Dummy temp: [dummy.bodytemperature], initial temp: [initial_temp])")
|