Files
Polaris/code/modules/projectiles/guns/alien.dm
unknown 39b467c9da New bullet types, projectile rewrite
* Refactors projectile Bump()
* Converts projectile_type var strings to paths
* Reorganizes bullet projectile paths
* Made a pass through all the bullet_act() definitions. Mainly ensured that damage_type is checked when dealing damage to certain objects. Removed stupid /turf bullet_act() override, replaced with on_hit() overrides on the relevant projectiles.

* Adds shotgun pellets projectile. Adds Raptor's shotgun slug sprite.
* Gives stunshots more of their own identity, refluffs them as taser cartridges for shotguns. They still aren't obtainable anywhere unless spawned.
* Makes projectiles pass through girders and cultgirders with a certain probability, unless the girder itself was clicked.
* Projectiles are also able to pass through grilles. Low damage projectiles have a chance to be blocked by grilles. High damage projectiles have a chance to have some damage absorbed by the grille.
* Makes projectiles for blanks invisible.
* Adds flash bullet types
* Adds support for 'penetrating' projectiles
* Swaps .45 and 9mm projectile types. .45s hit slightly harder, 9mils have more ammo capacity.
2015-02-06 20:09:32 -05:00

121 lines
3.4 KiB
Plaintext

//Vox pinning weapon.
/obj/item/weapon/gun/launcher/spikethrower
name = "Vox spike thrower"
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
var/last_regen = 0
var/spike_gen_time = 100
var/max_spikes = 3
var/spikes = 3
release_force = 30
icon = 'icons/obj/gun.dmi'
icon_state = "spikethrower3"
item_state = "spikethrower"
fire_sound_text = "a strange noise"
fire_sound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/gun/launcher/spikethrower/New()
..()
processing_objects.Add(src)
last_regen = world.time
/obj/item/weapon/gun/launcher/spikethrower/Del()
processing_objects.Remove(src)
..()
/obj/item/weapon/gun/launcher/spikethrower/process()
if(spikes < max_spikes && world.time > last_regen + spike_gen_time)
spikes++
last_regen = world.time
update_icon()
/obj/item/weapon/gun/launcher/spikethrower/examine(mob/user)
..(user)
user << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining."
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
icon_state = "spikethrower[spikes]"
/obj/item/weapon/gun/launcher/spikethrower/emp_act(severity)
return
/obj/item/weapon/gun/launcher/spikethrower/special_check(user)
if(istype(user,/mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species && H.species.name != "Vox" && H.species.name != "Vox Armalis")
user << "\red \The [src] does not respond to you!"
return 0
return 1
/obj/item/weapon/gun/launcher/spikethrower/update_release_force()
return
/obj/item/weapon/gun/launcher/spikethrower/load_into_chamber()
if(in_chamber) return 1
if(spikes < 1) return 0
spikes--
in_chamber = new /obj/item/weapon/spike(src)
return 1
/obj/item/weapon/gun/launcher/spikethrower/Fire(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, params, reflex = 0)
if(..()) update_icon()
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
/obj/item/weapon/gun/energy/noisecannon
name = "alien heavy cannon"
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
icon = 'icons/obj/gun.dmi' //Actual on-sprite is handled by icon_override.
icon_state = "noisecannon"
item_state = "noisecannon"
recoil = 1
force = 10
projectile_type = /obj/item/projectile/energy/sonic
cell_type = "/obj/item/weapon/cell/super"
fire_delay = 40
fire_sound = 'sound/effects/basscannon.ogg'
var/mode = 1
sprite_sheets = list(
"Vox Armalis" = 'icons/mob/species/armalis/held.dmi'
)
/obj/item/weapon/gun/energy/noisecannon/attack_hand(mob/user as mob)
if(loc != user)
var/mob/living/carbon/human/H = user
if(istype(H))
if(H.species.name == "Vox Armalis")
..()
return
user << "\red \The [src] is far too large for you to pick up."
return
/obj/item/weapon/gun/energy/noisecannon/load_into_chamber() //Does not have ammo.
in_chamber = new projectile_type(src)
return 1
/obj/item/weapon/gun/energy/noisecannon/update_icon()
return
//Projectile.
/obj/item/projectile/energy/sonic
name = "distortion"
icon = 'icons/obj/machines/particle_accelerator2.dmi'
icon_state = "particle"
damage = 60
damage_type = BRUTE
flag = "bullet"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
embed = 0
weaken = 5
stun = 5
/obj/item/projectile/energy/sonic/proc/split()
//TODO: create two more projectiles to either side of this one, fire at targets to the side of target turf.
return