mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Parasite progression adjustment (#10889)
This commit is contained in:
@@ -8,9 +8,19 @@
|
||||
var/stage = 1
|
||||
var/max_stage = 4
|
||||
var/stage_ticker = 0
|
||||
var/infection_speed = 2 //Will be determined by get_infect_speed()
|
||||
var/infect_speed_high = 35 //The fastest this parasite will advance stages
|
||||
var/infect_speed_low = 15 //The slowest this parasite will advance stages
|
||||
var/stage_interval = 600 //time between stages, in seconds
|
||||
var/subtle = 0 //will the body reject the parasite naturally?
|
||||
|
||||
/obj/item/organ/internal/parasite/Initialize()
|
||||
. = ..()
|
||||
get_infect_speed()
|
||||
|
||||
/obj/item/organ/internal/parasite/proc/get_infect_speed() //Slightly randomizes how fast each infection progresses.
|
||||
infection_speed = rand(infect_speed_low, infect_speed_high) / 10
|
||||
|
||||
/obj/item/organ/internal/parasite/process()
|
||||
..()
|
||||
|
||||
@@ -18,10 +28,11 @@
|
||||
return
|
||||
|
||||
if(stage < max_stage)
|
||||
stage_ticker += 2 //process ticks every ~2 seconds
|
||||
stage_ticker += infection_speed
|
||||
|
||||
if(stage_ticker >= stage*stage_interval)
|
||||
stage = min(stage+1,max_stage)
|
||||
get_infect_speed() //Each stage may progress faster or slower than the previous one
|
||||
stage_effect()
|
||||
|
||||
/obj/item/organ/internal/parasite/handle_rejection()
|
||||
|
||||
Reference in New Issue
Block a user