More flash shell tweaks, autolathe recipes

Tweaks the flash shell some more.
Tweaks shotgun stun shells, adds spent icon.
Additional autolathe ammo recipes.
This commit is contained in:
mwerezak
2015-02-11 18:41:55 -05:00
parent 9e3667540c
commit 630369b9dd
9 changed files with 93 additions and 28 deletions

View File

@@ -294,6 +294,24 @@
hidden = 1 hidden = 1
category = "Arms and Ammunition" category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_stetchkin
name = "ammunition (9mm)"
path = /obj/item/ammo_magazine/mc9mm
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_stetchkin_flash
name = "ammunition (9mm, flash)"
path = /obj/item/ammo_magazine/mc9mm/flash
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_c20r
name = "ammunition (12mm)"
path = /obj/item/ammo_magazine/a12mm
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/shotgun /datum/autolathe/recipe/shotgun
name = "ammunition (slug, shotgun)" name = "ammunition (slug, shotgun)"
path = /obj/item/ammo_casing/shotgun path = /obj/item/ammo_casing/shotgun
@@ -306,6 +324,12 @@
hidden = 1 hidden = 1
category = "Arms and Ammunition" category = "Arms and Ammunition"
/datum/autolathe/recipe/stunshell
name = "ammunition (stun cartridge, shotgun)"
path = /obj/item/ammo_casing/shotgun/stunshell
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/rcd /datum/autolathe/recipe/rcd
name = "rapid construction device" name = "rapid construction device"
path = /obj/item/weapon/rcd path = /obj/item/weapon/rcd

View File

@@ -176,6 +176,34 @@
new /obj/item/ammo_casing/shotgun/pellet(src) new /obj/item/ammo_casing/shotgun/pellet(src)
new /obj/item/ammo_casing/shotgun/pellet(src) new /obj/item/ammo_casing/shotgun/pellet(src)
/obj/item/weapon/storage/box/flashshells
name = "box of illumination shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
new /obj/item/ammo_casing/shotgun/flash(src)
/obj/item/weapon/storage/box/stunshells
name = "box of stun shells"
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
New()
..()
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
new /obj/item/ammo_casing/shotgun/stunshell(src)
/obj/item/weapon/storage/box/flashbangs /obj/item/weapon/storage/box/flashbangs
name = "box of flashbangs (WARNING)" name = "box of flashbangs (WARNING)"
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>" desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"

View File

@@ -10,6 +10,7 @@
var/caliber = "" //Which kind of guns it can be loaded into var/caliber = "" //Which kind of guns it can be loaded into
var/projectile_type //The bullet type to create when New() is called var/projectile_type //The bullet type to create when New() is called
var/obj/item/projectile/BB = null //The loaded bullet - make it so that the projectiles are created only when needed? var/obj/item/projectile/BB = null //The loaded bullet - make it so that the projectiles are created only when needed?
var/spent_icon = null
/obj/item/ammo_casing/New() /obj/item/ammo_casing/New()
..() ..()
@@ -19,6 +20,12 @@
pixel_y = rand(-10, 10) pixel_y = rand(-10, 10)
set_dir(pick(cardinal)) set_dir(pick(cardinal))
//removes the projectile from the ammo casing
/obj/item/ammo_casing/proc/expend()
. = BB
BB = null
update_icon()
/obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob) /obj/item/ammo_casing/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/screwdriver)) if(istype(W, /obj/item/weapon/screwdriver))
if(!BB) if(!BB)
@@ -36,6 +43,10 @@
user << "\blue You inscribe \"[label_text]\" into \the [initial(BB.name)]." user << "\blue You inscribe \"[label_text]\" into \the [initial(BB.name)]."
BB.name = "[initial(BB.name)] (\"[label_text]\")" BB.name = "[initial(BB.name)] (\"[label_text]\")"
/obj/item/ammo_casing/update_icon()
if(spent_icon && !BB)
icon_state = spent_icon
/obj/item/ammo_casing/examine(mob/user) /obj/item/ammo_casing/examine(mob/user)
..() ..()
if (!BB) if (!BB)
@@ -62,7 +73,7 @@
throw_range = 10 throw_range = 10
var/list/stored_ammo = list() var/list/stored_ammo = list()
var/mag_type = SPEEDLOADER //ammo_magazines can only be used with compatible guns var/mag_type = SPEEDLOADER //ammo_magazines can only be used with compatible guns. This is not a bitflag, the load_method var on guns is.
var/caliber = "357" var/caliber = "357"
var/max_ammo = 7 var/max_ammo = 7

View File

@@ -1,7 +1,9 @@
/obj/item/ammo_magazine/a357 /obj/item/ammo_magazine/a357
name = "ammo box (.357)" //name = "ammo box (.357)"
desc = "A box of .357 ammo" //desc = "A box of .357 ammo"
icon_state = "357" //icon_state = "357"
name = "speed loader (.357)"
icon_state = "T38"
caliber = "357" caliber = "357"
ammo_type = /obj/item/ammo_casing/a357 ammo_type = /obj/item/ammo_casing/a357
max_ammo = 7 max_ammo = 7

View File

@@ -84,13 +84,21 @@
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
matter = list("metal" = 500) matter = list("metal" = 500)
//Can stun in one hit if aimed at the head, but
//is blocked by clothing that stops tasers and is vulnerable to EMP
/obj/item/ammo_casing/shotgun/stunshell /obj/item/ammo_casing/shotgun/stunshell
name = "stun shell" name = "stun shell"
desc = "A 12 gauge taser cartridge." desc = "A 12 gauge taser cartridge."
icon_state = "stunshell" icon_state = "stunshell"
spent_icon = "stunshell-spent"
projectile_type = /obj/item/projectile/energy/electrode/stunshot projectile_type = /obj/item/projectile/energy/electrode/stunshot
matter = list("metal" = 1250, "glass" = 1250) matter = list("metal" = 1250, "glass" = 1250)
/obj/item/ammo_casing/shotgun/stunshell/emp_act(severity)
if(prob(100/severity)) BB = null
update_icon()
//Does not stun, only blinds, but has area of effect.
/obj/item/ammo_casing/shotgun/flash /obj/item/ammo_casing/shotgun/flash
name = "flash shell" name = "flash shell"
desc = "A flash shell used to provide illumination." desc = "A flash shell used to provide illumination."
@@ -98,13 +106,6 @@
projectile_type = /obj/item/projectile/energy/flash/flare projectile_type = /obj/item/projectile/energy/flash/flare
matter = list("metal" = 250, "glass" = 250) matter = list("metal" = 250, "glass" = 250)
/obj/item/ammo_casing/shotgun/dart
name = "shotgun dart"
desc = "A dart for use in shotguns."
icon_state = "dart"
projectile_type = /obj/item/projectile/energy/dart
matter = list("metal" = 12500)
/obj/item/ammo_casing/a762 /obj/item/ammo_casing/a762
desc = "A 7.62mm bullet casing." desc = "A 7.62mm bullet casing."
caliber = "a762" caliber = "a762"
@@ -129,6 +130,7 @@
projectile_type = /obj/item/projectile/bullet/chameleon projectile_type = /obj/item/projectile/bullet/chameleon
caliber = ".45" caliber = ".45"
/*
/obj/item/ammo_casing/a418 /obj/item/ammo_casing/a418
desc = "A .418 bullet casing." desc = "A .418 bullet casing."
caliber = "357" caliber = "357"
@@ -138,3 +140,4 @@
desc = "A .666 bullet casing." desc = "A .666 bullet casing."
caliber = "357" caliber = "357"
projectile_type = /obj/item/projectile/bullet/cyanideround projectile_type = /obj/item/projectile/bullet/cyanideround
*/

View File

@@ -54,9 +54,8 @@
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>" M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
return 0 return 0
if((CLUMSY in M.mutations) && prob(40) && can_fire()) //Clumsy handling if((CLUMSY in M.mutations) && prob(40) && can_fire()) //Clumsy handling
var/obj/in_chamber = get_next_projectile() var/obj/P = get_next_projectile()
if(in_chamber) if(P && process_projectile(P, user, user, pick("l_foot", "r_foot")))
if(process_projectile(in_chamber, user, user, pick("l_foot", "r_foot")))
handle_post_fire(user, user) handle_post_fire(user, user)
user.visible_message( user.visible_message(
"<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>", "<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>",

View File

@@ -60,7 +60,7 @@
/obj/item/weapon/gun/projectile/handle_post_fire() /obj/item/weapon/gun/projectile/handle_post_fire()
..() ..()
if(chambered) if(chambered)
chambered.BB = null chambered.expend()
switch(handle_casings) switch(handle_casings)
if(EJECT_CASINGS) //eject casing onto ground. if(EJECT_CASINGS) //eject casing onto ground.
chambered.loc = get_turf(src) chambered.loc = get_turf(src)

View File

@@ -16,8 +16,7 @@
var/light_duration = 5 var/light_duration = 5
/obj/item/projectile/energy/flash/on_impact(var/atom/A) /obj/item/projectile/energy/flash/on_impact(var/atom/A)
var/turf/T = get_turf(A) var/turf/T = flash_range? src.loc : get_turf(A)
if(!istype(T)) return if(!istype(T)) return
//blind adjacent people //blind adjacent people
@@ -29,10 +28,9 @@
playsound(src, 'sound/effects/snap.ogg', 50, 1) playsound(src, 'sound/effects/snap.ogg', 50, 1)
src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>") src.visible_message("<span class='warning'>\The [src] explodes in a bright flash!</span>")
//use src.loc so that ash doesn't end up inside windows new /obj/effect/decal/cleanable/ash(src.loc) //always use src.loc so that ash doesn't end up inside windows
new /obj/effect/effect/sparks(src.loc) new /obj/effect/effect/sparks(T)
new /obj/effect/decal/cleanable/ash(src.loc) new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration)
new /obj/effect/effect/smoke/illumination(src.loc, brightness=max(flash_range*2, brightness), lifetime=light_duration)
//blinds people like the flash round, but can also be used for temporary illumination //blinds people like the flash round, but can also be used for temporary illumination
/obj/item/projectile/energy/flash/flare /obj/item/projectile/energy/flash/flare

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB