Added an exciting new item for R&D to research!

Advanced Energy Gun 
    Tired of having to run back to a recharge station because your guns run out of charge? No more! Using advanced miniaturization techniques, we have managed to shove a fully functional nuclear reactor into the grip of an otherwise standard energy gun. Space requirements resulted in the removal of the standard recharger port you don't need because of the awesome reactor we added!

(Note: reactor not entirely stable. Minor radiation leaks have been reported, along with occasional reactor failure.)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1113 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
n3ophyt3@gmail.com
2011-02-24 06:06:34 +00:00
parent 12bd3f5b7f
commit d26492bc80
3 changed files with 52 additions and 0 deletions

View File

@@ -15,6 +15,9 @@ obj/machinery/recharger
if (src.charging || src.charging2)
return
if (istype(G, /obj/item/weapon/gun/energy))
if (istype(G, /obj/item/weapon/gun/energy/general/nuclear))
user << "Your gun's recharge port was removed to make room for a miniaturized reactor."
return
user.drop_item()
G.loc = src
src.charging = G

View File

@@ -959,6 +959,39 @@ obj/item/weapon/gun/revolver/attackby(obj/item/weapon/ammo/a357/A as obj, mob/us
var/mode = 2
nuclear
name = "Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
var/critfail = 0
New()
charge()
proc/charge()
if(charges < maximum_charges)
if(failcheck())
charges++ //If the gun isn't fully charged, and it doesn't suffer a failure, add a charge.
update_icon()
if(!critfail)
spawn(50) charge()
proc/failcheck()
if (prob(src.reliability)) return 1 //No failure
if (prob(src.reliability))
for (var/mob/M in range(0,src)) //Only a minor failure, enjoy your radiation if you're in the same tile or carrying it
if (src in M.contents)
M << "\red Your gun feels pleasantly warm for a moment."
else
M << "\red You feel a warm sensation."
src.loc:radiation += rand(1,40)
else
for (var/mob/M in range(rand(1,4),src)) //Big failure, TIME FOR RADIATION BITCHES
if (src in M.contents)
M << "\red Your gun's reactor overloads!"
M << "\red You feel a wave of heat wash over you."
M.radiation += 100
critfail = 1 //break the gun so it stops recharging
update_icon()
var/ratio = src.charges / maximum_charges
ratio = round(ratio, 0.25) * 100

View File

@@ -633,6 +633,22 @@ datum
reliability_base = 74
build_path = "/obj/item/device/mass_spectrometer/adv"
/////////////////////////////////////////
/////////////////Weapons/////////////////
/////////////////////////////////////////
nuclear_gun
name = "Advanced Energy Gun"
desc = "An energy gun with an experimental miniaturized reactor."
id = "nuclear_gun"
req_tech = list("combat" = 2, "materials" = 5, "powerstorage" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 5000, "$glass" = 1000, "$uranium" = 500)
reliability_base = 76
build_path = "/obj/item/weapon/gun/energy/general/nuclear"
/////////////////////////////////////////
//////////////////Test///////////////////
/////////////////////////////////////////