ADD: New weapon - Mining Grenade Launcher (#24093)

* ADD: New weapon - Mining Grenade Launcher

* Update code/game/mecha/equipment/weapons/weapons.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

* Update code/game/mecha/equipment/weapons/weapons.dm

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>

---------

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Сиротка
2024-02-27 17:36:24 -05:00
committed by GitHub
co-authored by Luc
parent 19758d1c55
commit cca550e206
3 changed files with 39 additions and 3 deletions
+15 -3
View File
@@ -516,6 +516,10 @@
var/fauna_boost = 4
/// Image overlaid on explosion.
var/static/image/explosion_image
/// Radius of explosion
var/power = 1
/// Drill power of grenade
var/drill_power = 2
/obj/structure/mining_bomb/Initialize(mapload, atom/movable/firer)
. = ..()
@@ -534,16 +538,24 @@
/obj/structure/mining_bomb/proc/boom(atom/movable/firer)
visible_message("<span class='danger'>[src] explodes!</span>")
playsound(src, 'sound/magic/magic_missile.ogg', 200, vary = TRUE)
for(var/turf/T in circleviewturfs(src, 2))
for(var/turf/T in circleviewturfs(src, drill_power))
if(ismineralturf(T))
var/turf/simulated/mineral/mineral_turf = T
mineral_turf.gets_drilled(firer)
for(var/mob/living/mob in range(1, src))
for(var/mob/living/mob in range(power, src))
mob.apply_damage(damage * (ishostile(mob) ? fauna_boost : 1), BRUTE, spread_damage = TRUE)
if(!ishostile(mob) || !firer)
continue
var/mob/living/simple_animal/hostile/hostile_mob = mob
hostile_mob.GiveTarget(firer)
for(var/obj/object in range(1, src))
for(var/obj/object in range(power, src))
object.take_damage(damage, BRUTE, BOMB)
qdel(src)
/obj/item/projectile/bullet/reusable/mining_bomb/mecha
ammo_type = /obj/structure/mining_bomb/mecha
/obj/structure/mining_bomb/mecha
damage = 15
power = 2
drill_power = 3