diff --git a/code/modules/mob/living/simple_mob/combat.dm b/code/modules/mob/living/simple_mob/combat.dm
index 1dce673601..b38317b964 100644
--- a/code/modules/mob/living/simple_mob/combat.dm
+++ b/code/modules/mob/living/simple_mob/combat.dm
@@ -98,6 +98,16 @@
if(reload_count >= reload_max)
try_reload()
return FALSE
+
+ //CHOMP Addition: This section here is special snowflake code for metroids only, or for whatever else in the future that you want to have move and shoot at the same time. Basically, this is a non-stupid version of the above intended for ranged vore mobs i.e. metroids. ranged_attack_delay is stupid because it sleeps the entire mob. This new ranged_cooldown_time is smarter in the sense that it is an internalized timer. Try not to confuse the names.
+ if(ranged_cooldown_time) //If you have a non-zero number in a mob's variables, this pattern begins.
+ if(ranged_cooldown <= world.time) //Further down, a timer keeps adding to the ranged_cooldown variable automatically.
+ visible_message("\The [src] fires at \the [A]!") //Leave notice of shooting.
+ shoot(A) //Perform the shoot action
+ if(casingtype) //If the mob is designated to leave casings...
+ new casingtype(loc) //... leave the casing.
+ ranged_cooldown = world.time + ranged_cooldown_time //Special addition here. This is a timer. Keeping updating the time after shooting. Add that ranged cooldown time specified in the mob to the world time.
+ return TRUE //End these commands here.
visible_message("\The [src] fires at \the [A]!")
shoot(A)
@@ -106,10 +116,9 @@
if(ranged_attack_delay)
ranged_post_animation(A)
-
+
return TRUE
-
// Shoot a bullet at something.
/mob/living/simple_mob/proc/shoot(atom/A)
if(A == get_turf(src))
@@ -134,6 +143,7 @@
if(needs_reload)
reload_count++
+
// if(distance >= special_attack_min_range && distance <= special_attack_max_range)
// return TRUE
@@ -240,7 +250,6 @@
set_AI_busy(FALSE)
-
// Override these four for special custom animations (like the GOLEM).
/mob/living/simple_mob/proc/melee_pre_animation(atom/A)
do_windup_animation(A, melee_attack_delay)
diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm
index 6687b1f380..03fc4e6c47 100644
--- a/code/modules/mob/living/simple_mob/simple_mob.dm
+++ b/code/modules/mob/living/simple_mob/simple_mob.dm
@@ -108,6 +108,8 @@
var/melee_attack_delay = 2 // If set, the mob will do a windup animation and can miss if the target moves out of the way.
var/ranged_attack_delay = null
var/special_attack_delay = null
+ var/ranged_cooldown = 0 //CHOMP Addition. This is part of a timer in combat.dm.
+ var/ranged_cooldown_time = 0 //CHOMP Addition: This variable can be thrown into mob variables in order to allow the mob to move AND shoot at the same time. The previous "ranged_attack_delay" is a dumb way of handling ranged attacks because it sleeps the entire mob - this one uses an internalized timer so it is slightly smarter.
//Special attacks
// var/special_attack_prob = 0 // The chance to ATTEMPT a special_attack_target(). If it fails, it will do a regular attack instead.
diff --git a/code/modules/pda/app.dm b/code/modules/pda/app.dm
index eb64125ee9..99c9822019 100644
--- a/code/modules/pda/app.dm
+++ b/code/modules/pda/app.dm
@@ -41,14 +41,14 @@
pda.play_ringtone()
if(blink && !(src in pda.notifying_programs))
- pda.overlays += image('icons/obj/pda.dmi', "pda-r")
+ pda.overlays += image(icon, "pda-r")
pda.notifying_programs |= src
/datum/data/pda/proc/unnotify()
if(src in pda.notifying_programs)
pda.notifying_programs -= src
if(!pda.notifying_programs.len)
- pda.overlays -= image('icons/obj/pda.dmi', "pda-r")
+ pda.overlays -= image(icon, "pda-r")
// An app has a button on the home screen and its own UI
/datum/data/pda/app
diff --git a/code/modules/pda/pda.dm b/code/modules/pda/pda.dm
index 2c3b368730..f05a1056fd 100644
--- a/code/modules/pda/pda.dm
+++ b/code/modules/pda/pda.dm
@@ -300,7 +300,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(can_use(usr))
start_program(find_program(/datum/data/pda/app/main_menu))
notifying_programs.Cut()
- overlays -= image('icons/obj/pda.dmi', "pda-r")
+ overlays -= image(icon, "pda-r")
to_chat(usr, "You press the reset button on \the [src].")
else
to_chat(usr, "You cannot do this while restrained.")