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

@@ -98,4 +98,4 @@
/datum/uplink_item/item/ammo/cell
name = "weapon cell"
path = /obj/item/weapon/cell/device
path = /obj/item/weapon/cell/device/weapon

View File

@@ -30,9 +30,14 @@
force = 0
throw_speed = 5
throw_range = 7
maxcharge = 2400
maxcharge = 480
matter = list("metal" = 350, "glass" = 50)
/obj/item/weapon/cell/device/weapon
name = "weapon power cell"
desc = "A small power cell designed to power handheld weaponry."
maxcharge = 2400
/obj/item/weapon/cell/crap
name = "\improper rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT

View File

@@ -40,6 +40,7 @@
/obj/item/weapon/wrench,
/obj/item/device/multitool,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/stack/cable_coil,
/obj/item/device/t_scanner,
/obj/item/device/analyzer,
@@ -54,7 +55,6 @@
/obj/item/weapon/material/hatchet,
/obj/item/device/analyzer/plant_analyzer,
/obj/item/weapon/extinguisher/mini,
/obj/item/device/flashlight/maglight,
/obj/item/weapon/tape_roll,
/obj/item/device/integrated_electronics/wirer,
)
@@ -97,7 +97,6 @@
/obj/item/device/pda,
/obj/item/taperoll,
/obj/item/device/megaphone,
/obj/item/device/flashlight/pen,
/obj/item/clothing/mask/surgical,
/obj/item/clothing/head/surgery,
/obj/item/clothing/gloves,
@@ -105,6 +104,7 @@
/obj/item/clothing/glasses,
/obj/item/weapon/crowbar,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/extinguisher/mini
)
@@ -156,6 +156,7 @@
/obj/item/device/taperecorder,
/obj/item/clothing/glasses,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/reagent_containers/spray/luminol,
/obj/item/weapon/sample,
/obj/item/weapon/forensics/sample_kit/powder,
@@ -236,6 +237,7 @@
can_hold = list(
/obj/item/clothing/glasses,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/grenade,
/obj/item/device/pda,
/obj/item/device/radio/headset,
@@ -263,6 +265,7 @@
/obj/item/device/gps,
/obj/item/device/measuring_tape,
/obj/item/device/flashlight,
/obj/item/weapon/cell/device,
/obj/item/weapon/pickaxe,
/obj/item/device/depth_scanner,
/obj/item/device/camera,

View File

@@ -30,7 +30,7 @@
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
..()
bcell = new/obj/item/weapon/cell/device(src)
bcell = new/obj/item/weapon/cell/device/weapon(src)
update_icon()
return

View File

@@ -121,7 +121,7 @@
new /obj/item/device/flash(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/weapon/cell/device/weapon(src)
new /obj/item/clothing/accessory/holster/waist(src)
new /obj/item/weapon/melee/telebaton(src)
new /obj/item/clothing/head/beret/sec/corporate/hos(src)
@@ -167,7 +167,7 @@
new /obj/item/weapon/reagent_containers/spray/pepper(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/weapon/gun/energy/gun(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/weapon/cell/device/weapon(src)
new /obj/item/weapon/storage/box/holobadge(src)
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
@@ -214,7 +214,7 @@
new /obj/item/clothing/under/rank/security/corp(src)
new /obj/item/ammo_magazine/c45m/rubber(src)
new /obj/item/weapon/gun/energy/taser(src)
new /obj/item/weapon/cell/device(src)
new /obj/item/weapon/cell/device/weapon(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/device/flashlight/maglight(src)
return

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))