Skip to content

Commit

Permalink
green bot firing
Browse files Browse the repository at this point in the history
  • Loading branch information
Halonexus committed May 11, 2024
1 parent fa0b0cc commit caa8945
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/ordeal/green.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@

/// Can't move/attack when it's TRUE
var/reloading = FALSE
var/firing_time = 0
/// When at 12 - it will start "reloading"
var/fire_count = 0

Expand All @@ -156,6 +157,7 @@
/mob/living/simple_animal/hostile/ordeal/green_bot_big/OpenFire(atom/A)
if(reloading)
return FALSE
firing_time = world.time
fire_count += 1
if(fire_count >= 12)
StartReloading()
Expand All @@ -165,6 +167,8 @@
/mob/living/simple_animal/hostile/ordeal/green_bot_big/AttackingTarget(atom/attacked_target)
if(reloading)
return FALSE
if(world.time < firing_time + 1.2 SECONDS)
return FALSE
. = ..()
if(.)
if(!istype(attacked_target, /mob/living))
Expand Down

0 comments on commit caa8945

Please sign in to comment.