Adds a smaller device cell for use in non-weapon devices

This commit is contained in:
Anewbe
2016-10-08 15:34:18 -05:00
parent 426659c1d2
commit 771d8b9e4b
9 changed files with 35 additions and 13 deletions

View File

@@ -34,7 +34,10 @@
/obj/item/weapon/gun/energy/New()
..()
power_supply = new /obj/item/weapon/cell/device(src)
if(cell_type)
power_supply = new cell_type(src)
else
power_supply = new /obj/item/weapon/cell/device/weapon(src)
if(self_recharge)
processing_objects.Add(src)
update_icon()
@@ -168,7 +171,7 @@
/obj/item/weapon/gun/energy/proc/start_recharge()
if(power_supply == null)
power_supply = new /obj/item/weapon/cell/device(src)
power_supply = new /obj/item/weapon/cell/device/weapon(src)
self_recharge = 1
processing_objects.Add(src)
update_icon()

View File

@@ -29,9 +29,11 @@
desc = "A modified version of the HI G40E, this one fires less concentrated energy bolts designed for target practice."
projectile_type = /obj/item/projectile/beam/practice
cell_type = /obj/item/weapon/cell/device
firemodes = list(
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 240),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 60),
list(mode_name="normal", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 48),
list(mode_name="suppressive", projectile_type=/obj/item/projectile/beam/practice, charge_cost = 12),
)
obj/item/weapon/gun/energy/retro

View File

@@ -267,7 +267,15 @@ other types of metals and chemistry for reagents).
materials = list(DEFAULT_WALL_MATERIAL = 350, "glass" = 25)
build_path = /obj/item/weapon/cell/device
category = "Misc"
sort_string = "DAAAE"
sort_string = "DAABA"
/datum/design/item/powercell/weapon
name = "weapon"
build_type = PROTOLATHE
id = "weapon"
materials = list(DEFAULT_WALL_MATERIAL = 700, "glass" = 50)
category = "Misc"
sort_string = "DAABB"
/datum/design/item/hud
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)

View File

@@ -18,6 +18,7 @@
origin_tech = list(TECH_COMBAT = 2, TECH_BIO = 4)
agonyforce = 10 //It's not supposed to be great at stunning human beings.
var/stasisforce = 60 //How much stasis it does to slimes, and 1/3rd to non-slimes.
hitcost = 48 //Less zap for less cost
/obj/item/weapon/melee/baton/slime/attack(mob/M, mob/user)
if(istype(M, /mob/living/simple_animal/xeno))