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 00000000000..495c6df2b42 --- /dev/null +++ b/code/modules/mob/living/simple_animal/hostile/glockroach.dm @@ -0,0 +1,69 @@ +/obj/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/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 + mob_biotypes = MOB_ORGANIC|MOB_BUG + response_disarm_continuous = "shoos" + response_disarm_simple = "shoo" + response_harm_continuous = "splats" + response_harm_simple = "splat" + 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/gun/pistol/shot.ogg' + projectiletype = /obj/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/code/modules/projectiles/ammunition/ballistic/pistol.dm b/code/modules/projectiles/ammunition/ballistic/pistol.dm index d58e0ca1bdd..01e37e4d6ff 100644 --- a/code/modules/projectiles/ammunition/ballistic/pistol.dm +++ b/code/modules/projectiles/ammunition/ballistic/pistol.dm @@ -47,4 +47,3 @@ desc = "A .50AE bullet casing." caliber = ".50" projectile_type = /obj/projectile/bullet/a50AE - diff --git a/icons/mob/animal.dmi b/icons/mob/animal.dmi index 346aadefeb5..d385ece769c 100644 Binary files a/icons/mob/animal.dmi and b/icons/mob/animal.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 58404faa6e0..dce6b7a9ba5 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2240,6 +2240,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"