Kinetic Accelerator

This commit is contained in:
Fox-McCloud
2015-01-15 21:58:51 -05:00
parent baa88a7463
commit 73d59113c3
7 changed files with 24 additions and 34 deletions
@@ -222,19 +222,33 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
/obj/item/weapon/gun/energy/kinetic_accelerator
name = "proto-kinetic accelerator"
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified to the legal limit on power output, and often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
icon_state = "freezegun"
item_state = "shotgun"
desc = "According to Nanotrasen accounting, this is mining equipment. It's been modified for extreme power output to crush rocks, but often serves as a miner's first defense against hostile alien life; it's not very powerful unless used in a low pressure environment."
icon_state = "kineticgun"
item_state = "kineticgun"
icon_override = 'icons/mob/in-hand/guns.dmi'
projectile_type = "/obj/item/projectile/kinetic"
cell_type = "/obj/item/weapon/cell/crap"
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
charge_cost = 5000
cell_type = "/obj/item/weapon/cell/crap"
var/overheat = 0
var/recent_reload = 1
/obj/item/weapon/gun/energy/kinetic_accelerator/Fire()
overheat = 1
spawn(20)
overheat = 0
recent_reload = 0
..()
/obj/item/weapon/gun/energy/kinetic_accelerator/attack_self(var/mob/living/user/L)
if(overheat || recent_reload)
return
power_supply.give(5000)
playsound(src.loc, 'sound/weapons/shotgunpump.ogg', 60, 1)
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
recent_reload = 1
update_icon()
return
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
+4 -28
View File
@@ -187,38 +187,15 @@ obj/item/projectile/kinetic/New()
range--
if(range <= 0)
new /obj/item/effect/kinetic_blast(src.loc)
delete()
del(src)
/obj/item/projectile/kinetic/on_hit(var/atom/target)
/obj/item/projectile/kinetic/on_hit(atom/target)
var/turf/target_turf= get_turf(target)
if(istype(target_turf, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.GetDrilled()
new /obj/item/effect/kinetic_blast(target_turf)
..(target,blocked)
/obj/item/projectile/kinetic/Bump(atom/A as mob|obj|turf|area)
if(!loc) return
if(A == firer)
loc = A.loc
return
if(src)//Do not add to this if() statement, otherwise the meteor won't delete them
if(A)
var/turf/target_turf = get_turf(A)
//testing("Bumped [A.type], on [target_turf.type].")
if(istype(target_turf, /turf/unsimulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.GetDrilled()
// Now we bump as a bullet, if the atom is a non-turf.
if(!isturf(A))
..(A)
qdel(src) // Comment this out if you want to shoot through the asteroid, ERASER-style.
return 1
else
qdel(src)
return 0
..()
/obj/item/effect/kinetic_blast
name = "kinetic explosion"
@@ -228,5 +205,4 @@ obj/item/projectile/kinetic/New()
/obj/item/effect/kinetic_blast/New()
spawn(4)
del(src)
del(src)