Skip to content

Commit

Permalink
5 second delay
Browse files Browse the repository at this point in the history
  • Loading branch information
blackdav123 committed Jan 16, 2025
1 parent afd71db commit 6a44cf7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/datums/components/chem_booster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
var/movement_boost = 0
///How much time left on vali heal till necrosis occurs
var/vali_necro_timer
///When you last gained greenblood from attacking. Used to trigger greenblood decaying.
var/last_attack_time = 0
///How much time until greenblood decaying occurs
var/greenblood_decay_timer

/**
* This list contains the vali stat increases that correspond to each reagent
Expand Down Expand Up @@ -185,6 +189,9 @@

/datum/component/chem_booster/process()
if(!boost_on)
greenblood_decay_timer = world.time - last_attack_time
if(greenblood_decay_timer < 5 SECONDS)
return
if(resource_storage_current >= resource_decay_amount)
update_resource(-resource_decay_amount)
return
Expand Down Expand Up @@ -385,6 +392,7 @@
if(resource_storage_current >= resource_storage_max)
return
update_resource(round(10*connected_weapon.attack_speed/11))
last_attack_time = world.time

///Adds or removes resource from the suit. Signal gets sent at every 25% of stored resource
/datum/component/chem_booster/proc/update_resource(amount)
Expand Down

0 comments on commit 6a44cf7

Please sign in to comment.