Beanbag shot now throws a tile. Increases the spread on rubbershot / lasershot / weakbuckshot (#21501)

* Beanbag shot now throws a tile. Increases the spread on rubbershot / lasershot / weakbuckshot

* Apply suggestions from code review

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>

* makes it compile, uses starting.

---------

Co-authored-by: Contrabang <91113370+Contrabang@users.noreply.github.com>
This commit is contained in:
Qwertytoforty
2023-08-11 10:35:16 -04:00
committed by GitHub
parent 92db3304e5
commit bcce813e0a
2 changed files with 11 additions and 3 deletions
@@ -152,7 +152,7 @@
icon_state = "cshell"
projectile_type = /obj/item/projectile/bullet/pellet/rubber
pellets = 6
variance = 25
variance = 35
materials = list(MAT_METAL=4000)
@@ -173,7 +173,7 @@
projectile_type = /obj/item/projectile/bullet/pellet/weak
materials = list(MAT_METAL=250)
pellets = 10
variance = 25
variance = 35
muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL
muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL
@@ -257,7 +257,7 @@
icon_state = "lshell"
projectile_type = /obj/item/projectile/beam/scatter
pellets = 8
variance = 25
variance = 35
muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL
muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL
muzzle_flash_color = LIGHT_COLOR_DARKRED
@@ -12,6 +12,14 @@
damage = 5
stamina = 40
/obj/item/projectile/bullet/weakbullet/on_hit(atom/target, blocked = 0)
. = ..()
if(isliving(target))
var/mob/living/L = target
if(L.move_resist < INFINITY)
var/atom/throw_target = get_edge_target_turf(L, get_dir(src, get_step_away(L, starting)))
L.throw_at(throw_target, 1, 2)
/obj/item/projectile/bullet/weakbullet/booze
/obj/item/projectile/bullet/weakbullet/booze/on_hit(atom/target, blocked = 0)