mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
Adds Bola Blaster (#19222)
* Adds Bola Blaster * Thick material blocks bolas
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/obj/item/gun/energy/bolagun
|
||||
name = "bola blaster"
|
||||
desc = "Specially made-to-order by Xenonomix, the \"Bola-Blaster\" launches an energy net that consolodates around the target's legs to hinder their movement!."
|
||||
icon_state = "netgun"
|
||||
item_state = "gun" // Placeholder
|
||||
|
||||
fire_sound = 'sound/weapons/eluger.ogg'
|
||||
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_MAGNET = 3)
|
||||
projectile_type = /obj/item/projectile/bola/energy
|
||||
charge_cost = 400 //Low energy cost.
|
||||
fire_delay = 10 //Rapid fire!
|
||||
|
||||
/obj/item/gun/energy/bolagun/update_icon()
|
||||
if(power_supply == null)
|
||||
if(modifystate)
|
||||
icon_state = "[modifystate]_open"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]_open"
|
||||
return
|
||||
else if(charge_meter)
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
|
||||
//make sure that rounding down will not give us the empty state even if we have charge for a shot left.
|
||||
if(power_supply.charge < charge_cost)
|
||||
ratio = 0
|
||||
else
|
||||
ratio = max(round(ratio, 0.25) * 100, 25)
|
||||
|
||||
if(modifystate)
|
||||
icon_state = "[modifystate][ratio]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][ratio]"
|
||||
|
||||
else if(power_supply)
|
||||
if(modifystate)
|
||||
icon_state = "[modifystate]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)]"
|
||||
@@ -282,13 +282,22 @@
|
||||
|
||||
/obj/item/projectile/bola/on_hit(var/atom/target, var/blocked = 0)
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/M = target
|
||||
var/mob/living/carbon/human/human_target = target
|
||||
var/obj/item/handcuffs/legcuffs/bola/B = new(src.loc)
|
||||
if(!B.place_legcuffs(M,firer))
|
||||
for(var/obj/item/clothing/cloth in list(human_target.wear_suit, human_target.w_uniform, human_target.shoes)) //Check if we have a thick material covering our feet.
|
||||
if((cloth.body_parts_covered & FEET) && (cloth.item_flags & THICKMATERIAL))
|
||||
..()
|
||||
return
|
||||
if(!B.place_legcuffs(human_target,firer))
|
||||
if(B)
|
||||
qdel(B)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bola/energy
|
||||
name = "energy_bola"
|
||||
icon_state = "bola_energy"
|
||||
damage = 0
|
||||
|
||||
/obj/item/projectile/webball
|
||||
name = "ball of web"
|
||||
icon_state = "bola"
|
||||
|
||||
Reference in New Issue
Block a user