diff --git a/code/modules/mob/living/simple_animal/hostile/glockroach.dm b/code/modules/mob/living/simple_animal/hostile/glockroach.dm new file mode 100644 index 000000000000..80df2189392d --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/glockroach.dm @@ -0,0 +1,64 @@ +/obj/item/projectile/glockroachbullet + damage = 10 //same damage as a hivebot + damage_type = BRUTE + + +/obj/item/ammo_casing/glockroach + name = "0.9mm bullet casing" + desc = "A... 0.9mm bullet casing? What?" + projectile_type = /obj/item/projectile/glockroachbullet + +/mob/living/simple_animal/hostile/glockroach //copypasted from cockroach.dm so i could use the shooting code in hostile.dm + name = "glockroach" + desc = "HOLY SHIT, THAT COCKROACH HAS A GUN!" + icon_state = "glockroach" + icon_dead = "cockroach" + health = 1 + maxHealth = 1 + turns_per_move = 5 + loot = list(/obj/effect/decal/cleanable/insectguts) + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 270 + maxbodytemp = INFINITY + pass_flags = PASSTABLE | PASSGRILLE | PASSMOB + mob_size = MOB_SIZE_TINY + speak_emote = list("chitters") + density = FALSE + ventcrawler = VENTCRAWLER_ALWAYS + gold_core_spawnable = HOSTILE_SPAWN + verb_say = "chitters" + verb_ask = "chitters inquisitively" + verb_exclaim = "chitters loudly" + verb_yell = "chitters loudly" + projectilesound = 'sound/weapons/shot.ogg' + projectiletype = /obj/item/projectile/glockroachbullet + casingtype = /obj/item/ammo_casing/glockroach + ranged = 1 + var/squish_chance = 50 + del_on_death = 1 + +/mob/living/simple_animal/hostile/glockroach/death(gibbed) + if(SSticker.mode && SSticker.mode.station_was_nuked) //If the nuke is going off, then cockroaches are invincible. Keeps the nuke from killing them, cause cockroaches are immune to nukes. + return + ..() + +/mob/living/simple_animal/hostile/glockroach/Crossed(var/atom/movable/AM) + if(ismob(AM)) + if(isliving(AM)) + var/mob/living/A = AM + if(A.mob_size > MOB_SIZE_SMALL && !(A.movement_type & FLYING)) + if(prob(squish_chance)) + A.visible_message("[A] squashed [src].", "You squashed [src].") + adjustBruteLoss(1) //kills a normal cockroach + else + visible_message("[src] avoids getting crushed.") + else + if(isstructure(AM)) + if(prob(squish_chance)) + AM.visible_message("[src] was crushed under [AM].") + adjustBruteLoss(1) + else + visible_message("[src] avoids getting crushed.") + +/mob/living/simple_animal/hostile/glockroach/ex_act() //Explosions are a terrible way to handle a cockroach. + return diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index f6a65a54c8ce..43342abb7342 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/sound/weapons/shot.ogg b/sound/weapons/shot.ogg new file mode 100644 index 000000000000..fcf8ad62346b Binary files /dev/null and b/sound/weapons/shot.ogg differ diff --git a/yogstation.dme b/yogstation.dme index 4cd45eed6a24..07a2bf327903 100644 --- a/yogstation.dme +++ b/yogstation.dme @@ -2198,6 +2198,7 @@ #include "code\modules\mob\living\simple_animal\hostile\eyeballs.dm" #include "code\modules\mob\living\simple_animal\hostile\faithless.dm" #include "code\modules\mob\living\simple_animal\hostile\giant_spider.dm" +#include "code\modules\mob\living\simple_animal\hostile\glockroach.dm" #include "code\modules\mob\living\simple_animal\hostile\goose.dm" #include "code\modules\mob\living\simple_animal\hostile\headcrab.dm" #include "code\modules\mob\living\simple_animal\hostile\hivebot.dm"