mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
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:
@@ -294,6 +294,24 @@
|
||||
hidden = 1
|
||||
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
|
||||
name = "ammunition (slug, shotgun)"
|
||||
path = /obj/item/ammo_casing/shotgun
|
||||
@@ -306,6 +324,12 @@
|
||||
hidden = 1
|
||||
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
|
||||
name = "rapid construction device"
|
||||
path = /obj/item/weapon/rcd
|
||||
|
||||
@@ -176,6 +176,34 @@
|
||||
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
|
||||
name = "box of flashbangs (WARNING)"
|
||||
desc = "<B>WARNING: These devices are extremely dangerous and can cause blindness or deafness in repeated use.</B>"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/caliber = "" //Which kind of guns it can be loaded into
|
||||
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/spent_icon = null
|
||||
|
||||
/obj/item/ammo_casing/New()
|
||||
..()
|
||||
@@ -19,6 +20,12 @@
|
||||
pixel_y = rand(-10, 10)
|
||||
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)
|
||||
if(istype(W, /obj/item/weapon/screwdriver))
|
||||
if(!BB)
|
||||
@@ -36,6 +43,10 @@
|
||||
user << "\blue You inscribe \"[label_text]\" into \the [initial(BB.name)]."
|
||||
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)
|
||||
..()
|
||||
if (!BB)
|
||||
@@ -62,7 +73,7 @@
|
||||
throw_range = 10
|
||||
|
||||
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/max_ammo = 7
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
/obj/item/ammo_magazine/a357
|
||||
name = "ammo box (.357)"
|
||||
desc = "A box of .357 ammo"
|
||||
icon_state = "357"
|
||||
//name = "ammo box (.357)"
|
||||
//desc = "A box of .357 ammo"
|
||||
//icon_state = "357"
|
||||
name = "speed loader (.357)"
|
||||
icon_state = "T38"
|
||||
caliber = "357"
|
||||
ammo_type = /obj/item/ammo_casing/a357
|
||||
max_ammo = 7
|
||||
|
||||
@@ -84,13 +84,21 @@
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
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
|
||||
name = "stun shell"
|
||||
desc = "A 12 gauge taser cartridge."
|
||||
icon_state = "stunshell"
|
||||
spent_icon = "stunshell-spent"
|
||||
projectile_type = /obj/item/projectile/energy/electrode/stunshot
|
||||
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
|
||||
name = "flash shell"
|
||||
desc = "A flash shell used to provide illumination."
|
||||
@@ -98,13 +106,6 @@
|
||||
projectile_type = /obj/item/projectile/energy/flash/flare
|
||||
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
|
||||
desc = "A 7.62mm bullet casing."
|
||||
caliber = "a762"
|
||||
@@ -129,6 +130,7 @@
|
||||
projectile_type = /obj/item/projectile/bullet/chameleon
|
||||
caliber = ".45"
|
||||
|
||||
/*
|
||||
/obj/item/ammo_casing/a418
|
||||
desc = "A .418 bullet casing."
|
||||
caliber = "357"
|
||||
@@ -138,3 +140,4 @@
|
||||
desc = "A .666 bullet casing."
|
||||
caliber = "357"
|
||||
projectile_type = /obj/item/projectile/bullet/cyanideround
|
||||
*/
|
||||
@@ -54,9 +54,8 @@
|
||||
M << "<span class='danger'>Your fingers are much too large for the trigger guard!</span>"
|
||||
return 0
|
||||
if((CLUMSY in M.mutations) && prob(40) && can_fire()) //Clumsy handling
|
||||
var/obj/in_chamber = get_next_projectile()
|
||||
if(in_chamber)
|
||||
if(process_projectile(in_chamber, user, user, pick("l_foot", "r_foot")))
|
||||
var/obj/P = get_next_projectile()
|
||||
if(P && process_projectile(P, user, user, pick("l_foot", "r_foot")))
|
||||
handle_post_fire(user, user)
|
||||
user.visible_message(
|
||||
"<span class='danger'>[user] shoots \himself in the foot with \the [src]!</span>",
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
/obj/item/weapon/gun/projectile/handle_post_fire()
|
||||
..()
|
||||
if(chambered)
|
||||
chambered.BB = null
|
||||
chambered.expend()
|
||||
switch(handle_casings)
|
||||
if(EJECT_CASINGS) //eject casing onto ground.
|
||||
chambered.loc = get_turf(src)
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
var/light_duration = 5
|
||||
|
||||
/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
|
||||
|
||||
//blind adjacent people
|
||||
@@ -29,10 +28,9 @@
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, 1)
|
||||
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/effect/sparks(src.loc)
|
||||
new /obj/effect/decal/cleanable/ash(src.loc)
|
||||
new /obj/effect/effect/smoke/illumination(src.loc, brightness=max(flash_range*2, brightness), lifetime=light_duration)
|
||||
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(T)
|
||||
new /obj/effect/effect/smoke/illumination(T, brightness=max(flash_range*2, brightness), lifetime=light_duration)
|
||||
|
||||
//blinds people like the flash round, but can also be used for temporary illumination
|
||||
/obj/item/projectile/energy/flash/flare
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
Reference in New Issue
Block a user