Skip to content

Commit

Permalink
what even is a delta
Browse files Browse the repository at this point in the history
  • Loading branch information
BeagleGaming1 committed Jul 10, 2023
1 parent 5f542d2 commit 38db63d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions code/modules/mob/living/carbon/xenomorph/Embryo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
GLOB.player_embryo_list -= src
. = ..()

/obj/item/alien_embryo/process()
/obj/item/alien_embryo/process(delta_time)
if(!affected_mob) //The mob we were gestating in is straight up gone, we shouldn't be here
STOP_PROCESSING(SSobj, src)
qdel(src)
Expand Down Expand Up @@ -72,24 +72,24 @@
if(affected_mob.in_stasis == STASIS_IN_CRYO_CELL)
return FALSE //If they are in cryo, the embryo won't grow.

process_growth()
process_growth(delta_time)

/obj/item/alien_embryo/proc/process_growth()
/obj/item/alien_embryo/proc/process_growth(delta_time)
var/datum/hive_status/hive = GLOB.hive_datum[hivenumber]
/// The total time the person is hugged divided by stages until burst
var/per_stage_hugged_time = CONFIG_GET(number/embryo_burst_timer) / 5
//Low temperature seriously hampers larva growth (as in, way below livable), so does stasis
if(!hive.hardcore) // Cannot progress if the hive has entered hardcore mode.
if(affected_mob.in_stasis || affected_mob.bodytemperature < 170)
if(stage < 5)
counter += 0.33 * hive.larva_gestation_multiplier
counter += 0.33 * hive.larva_gestation_multiplier * delta_time
if(stage == 4) // Stasis affects late-stage less
counter += 0.11 * hive.larva_gestation_multiplier
counter += 0.11 * hive.larva_gestation_multiplier * delta_time
else if(HAS_TRAIT(affected_mob, TRAIT_NESTED)) //Hosts who are nested in resin nests provide an ideal setting, larva grows faster
counter += 1.5 * hive.larva_gestation_multiplier //Currently twice as much, can be changed
counter += 1.5 * hive.larva_gestation_multiplier * delta_time //Currently twice as much, can be changed
else
if(stage < 5)
counter += 1 * hive.larva_gestation_multiplier
counter += 1 * hive.larva_gestation_multiplier * delta_time

if(stage < 5 && counter >= per_stage_hugged_time)
counter = 0
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@

var/datum/mutator_set/hive_mutators/mutators = new
var/tier_slot_multiplier = 1
var/larva_gestation_multiplier = 2
var/larva_gestation_multiplier = 1
var/bonus_larva_spawn_chance = 1
var/hijack_burrowed_surge = FALSE //at hijack, start spawning lots of burrowed
/// how many burrowed is going to spawn during larva surge
Expand Down

0 comments on commit 38db63d

Please sign in to comment.