From caa8945025887fb8cd373540e4169be92908d2a2 Mon Sep 17 00:00:00 2001 From: Halonexus Date: Sat, 11 May 2024 20:14:50 +0300 Subject: [PATCH] green bot firing --- code/modules/mob/living/simple_animal/hostile/ordeal/green.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm b/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm index 94cceabd0164..e0285ee05661 100644 --- a/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm +++ b/code/modules/mob/living/simple_animal/hostile/ordeal/green.dm @@ -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 @@ -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() @@ -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))