Netgun Upgrade

This commit is contained in:
Chompstation Bot
2021-06-23 16:30:49 +00:00
parent 968067d0e7
commit 7736ba260f
2 changed files with 41 additions and 1 deletions

View File

@@ -1,15 +1,55 @@
//Contains the Energy Net Gun code and information/lore
/obj/item/weapon/gun/energy/netgun
<<<<<<< HEAD
name = "\"Varmint Catcher\" energy net gun"
desc = "A Hephaestus-designed, usually dubbed 'non-lethal capture device' energy net launcher, \
for when you wanna capture feracious predators." //YW edit - small change to description
catalogue_data = list(/datum/category_item/catalogue/information/organization/hephaestus)
||||||| parent of 7f5d51a928... Merge pull request #10729 from klaasjared/Netgun-Upgrade
name = "energy net gun"
desc = "Specially made-to-order by Xenonomix, the XX-1 \"Varmint Catcher\" is designed to trap even the most unruly of creatures for safe transport."
=======
name = "energy net gun"
desc = "Specially made-to-order by Xenonomix, the \"Varmint Catcher\" is designed to trap even the most unruly of creatures for safe transport."
description_fluff = "The Xenonomix Brand XX-1 Energy Net Cannon is a marvel of technology that is used heavily by several departments within NanoTrasen. \
Whether by scientific departments when capturing specimens on alien worlds to study or by security forces to detain unruly crew, NanoTrasen is deeply \
appreciative of the \"Varmint Catcher\" Netgun System. WARNING!: Xenonomix and NanoTrasen are not responsible for any injuries caused by the device \
in any aspect, thank you for understanding."
>>>>>>> 7f5d51a928... Merge pull request #10729 from klaasjared/Netgun-Upgrade
icon = 'icons/obj/gun_vr.dmi'
icon_state = "netgun"
item_state = "gun" // Placeholder
charge_meter = 0
fire_sound = 'sound/weapons/eluger.ogg'
origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 5, TECH_MAGNET = 3)
projectile_type = /obj/item/projectile/beam/energy_net
charge_cost = 800
fire_delay = 50
/obj/item/weapon/gun/energy/netgun/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)]"