P90K Revamp

This commit is contained in:
Aroliacue
2023-07-12 07:39:22 +10:00
parent de5cfad619
commit 31bb617dc9
13 changed files with 121 additions and 33 deletions
@@ -428,6 +428,7 @@
matter = list(MAT_STEEL = 1000, MAT_PLASTEEL = 2000)
// P90
/* CHOMPEDIT Commented out, moved to zz_magazines_ch.dm *
/obj/item/ammo_magazine/m9mmp90
name = "large capacity top mounted magazine (9mm armor-piercing)"
icon_state = "p90"
@@ -440,6 +441,7 @@
/obj/item/ammo_magazine/m9mmp90/empty
initial_ammo = 0
* CHOMPEDIT Commented out, moved to zz_magazines_ch.dm */
// Stripper Clip
/obj/item/ammo_magazine/clip/c9mm
@@ -38,23 +38,23 @@
path = /obj/item/ammo_magazine/a57/rubber
/datum/category_item/autolathe/arms/smg_p90
name = "large capacity top mounted magazine (5.7x28mm standard)"
path = /obj/item/ammo_magazine/m9mmp90
name = "P90K Top-Mounted Magazine (5.7x28mm Standard)"
path = /obj/item/ammo_magazine/a57p90
hidden = 1
/datum/category_item/autolathe/arms/smg_p90/ap
name = "large capacity top mounted magazine (5.7x28mm armor-piercing)"
path = /obj/item/ammo_magazine/m9mmp90/ap
name = "P90K Top-Mounted Magazine (5.7x28mm Armor-Piercing)"
path = /obj/item/ammo_magazine/a57p90/ap
hidden = 1
/datum/category_item/autolathe/arms/smg_p90/rubber
name = "large capacity top mounted magazine (5.7x28mm rubber)"
path = /obj/item/ammo_magazine/m9mmp90/rubber
name = "P90K Top-Mounted Magazine (5.7x28mm Rubber)"
path = /obj/item/ammo_magazine/a57p90/rubber
hidden = 1
/datum/category_item/autolathe/arms/smg_p90/hp
name = "large capacity top mounted magazine (5.7x28mm hollow-point)"
path = /obj/item/ammo_magazine/m9mmp90/hp
name = "P90K Top-Mounted Magazine (5.7x28mm Hollow-Point)"
path = /obj/item/ammo_magazine/a57p90/hp
hidden = 1
/datum/category_item/autolathe/arms/svd_762
@@ -1,24 +1,45 @@
//Overrides
/obj/item/ammo_magazine/m9mmp90 //congratulations you are now being converted 5.7x28mm, a.k.a the round the p90 actually uses.
name = "large capacity top mounted magazine (5.7x28mm standard)" //Standard boolet. Cheaper to make.
ammo_type = /obj/item/ammo_casing/a57
matter = list(MAT_STEEL = 2700)
caliber = "5.7x28mm"
/obj/item/ammo_magazine/m9mmp90/hp
name = "large capacity top mounted magazine (5.7x28mm armor-piercing)"
/*
* P90 MAGAZINES
*/
/obj/item/ammo_magazine/a57p90 //congratulations you are now being converted 5.7x28mm, a.k.a the round the p90 actually uses.
name = "\improper P90K Top-Mounted Magazine (5.7x28mm Standard)"
desc = "A 50-round magazine for the P90K, loaded with caseless ammunition."
icon_state = "p90"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/a57
matter = list(MAT_STEEL = 2500) // Reduced from 2700 to 2500 for rounding.
caliber = "5.7x28mm"
max_ammo = 50
multiple_sprites = 1
/obj/item/ammo_magazine/a57p90/ap
name = "\improper P90K Top-Mounted Magazine (5.7x28mm Armor-Piercing)"
desc = "A 50-round magazine for the P90K, loaded with caseless armor-piercing ammunition."
ammo_type = /obj/item/ammo_casing/a57/ap
matter = list(MAT_STEEL = 3000)
/obj/item/ammo_magazine/m9mmp90/rubber
name = "large capacity top mounted magazine (5.7x28mm rubber)"
/obj/item/ammo_magazine/a57p90/rubber
name = "\improper P90K Top-Mounted Magazine (5.7x28mm Rubber)"
desc = "A 50-round magazine for the P90K, loaded with less-than-lethal caseless rubber ammunition."
ammo_type = /obj/item/ammo_casing/a57/rubber
matter = list(MAT_STEEL = 2000) // Slightly cheaper.
/obj/item/ammo_magazine/m9mmp90/ap
name = "large capacity top mounted magazine (5.7x28mm hollow-point)"
/obj/item/ammo_magazine/a57p90/hp
name = "\improper P90K Top-Mounted Magazine (5.7x28mm Hollow-Point)"
desc = "A 50-round magazine for the P90K, loaded with caseless hollow-point ammunition."
ammo_type = /obj/item/ammo_casing/a57/hp
matter = list(MAT_STEEL = 3000)
/obj/item/ammo_magazine/a57p90/empty
initial_ammo = 0
/*
* PLACEHOLDER
*/
/obj/item/ammo_magazine/m762svd //You are now being converted to 7.62x54mmR :3
name = "\improper SVD magazine (7.62x54mmR)"
icon = 'icons/obj/ammo_ch.dmi'
@@ -17,25 +17,34 @@
icon_state = "gshell"
projectile_type = /obj/item/projectile/bullet/shotgun/buckshot/shell
//New stuff
/*
* P90 ROUNDS
*/
/obj/item/ammo_casing/a57
desc = "A standard 5.7x28mm round"
name = "\improper 5.7x28mm cartridge"
desc = "A standard caseless 5.7x28mm round."
caliber = "5.7x28mm"
projectile_type = /obj/item/projectile/bullet/a57
matter = list(DEFAULT_WALL_MATERIAL = 60)
caseless = 1 // Does not leave casings when fired. Better for performance and garbage cleanup.
/obj/item/ammo_casing/a57/ap
desc = "An armor piercing 5.7x28mm round"
desc = "A caseless armor-piercing 5.7x28mm round."
projectile_type = /obj/item/projectile/bullet/a57/ap
/obj/item/ammo_casing/a57/hp
desc = "A hollow point 5.7x28mm round"
projectile_type = /obj/item/projectile/bullet/a57/ap
desc = "A caseless hollow-point 5.7x28mm round."
projectile_type = /obj/item/projectile/bullet/a57/hp
/obj/item/ammo_casing/a57/rubber
desc = "A rubber 5.7x28mm round"
desc = "A caseless rubber 5.7x28mm round."
projectile_type = /obj/item/projectile/bullet/pistol/rubber
/*
* PLACEHOLDER
*/
/obj/item/ammo_casing/a762x25
desc = "A standard 7.62x25mm Tokarev round"
caliber = "7.62x25mm"
@@ -175,4 +184,4 @@
/obj/item/ammo_casing/a45lc/rubber
desc = "A long silver bullet... Has a rubber tip, and .45 LC stamped into the base."
projectile_type = /obj/item/projectile/bullet/rifle/a45lc/rubber
@@ -395,6 +395,7 @@
transform = transform.Translate(-16,0)
// CHOMPEdit end: Uzi tilting
/* CHOMPEDIT Commented out, moved to automatic_ch.dm *
/obj/item/weapon/gun/projectile/automatic/p90
name = "personal defense weapon"
desc = "The H90K is a compact, large capacity submachine gun produced by MarsTech. Despite its fierce reputation, it still manages to feel like a toy. Uses 9mm rounds."
@@ -416,6 +417,7 @@
/obj/item/weapon/gun/projectile/automatic/p90/update_icon()
icon_state = "p90smg-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 6) : "empty"]"
* CHOMPEDIT Commented out, moved to automatic_ch.dm */
/obj/item/weapon/gun/projectile/automatic/tommygun
name = "\improper Tommy Gun"
@@ -1,3 +1,55 @@
//
///
/// This is where reworked automatic weapons will be moved to. The P90 is an example of how these weapons should be laid out for readability (without all the comments).
/// Please make sure to categorize the weapons properly!
///
//
/*
* SUBMACHINE GUNS
*/
/obj/item/weapon/gun/projectile/automatic/p90
name = "\improper P90K PDW"
desc = "The P90K Personal Defense Weapon is a MarsTech-assembled modernized variation of the ancient FN P90, a compact, high-capacity submachine gun of human origin. Its fierce reputation owes to its minimal recoil and ergonomic design. Chambered in 5.7x28mm caseless rounds."
description_fluff = "The leading civilian-sector high-quality small arms subsidiary of Hephaestus Industries, MarsTech has been the provider of choice for law enforcement and security forces for over 300 years."
icon = 'icons/obj/gun_ch.dmi'
item_icons = list(
slot_l_hand_str = 'icons/mob/items/lefthand_guns_ch.dmi',
slot_r_hand_str = 'icons/mob/items/righthand_guns_ch.dmi',
)
icon_state = "p90smgnew" // Defines the name for the icon (inventory) state.
item_state = "p90new" // Defines the name for the item (visibly held) state.
wielded_item_state = "p90new-wielded" // Defines the name for the wielded (two-handed) state.
slot_flags = SLOT_BELT|SLOT_BACK // The inventory slots this weapon can occupy. Most weapons can go on the suit slot by default, so long as you're wearing a vest.
w_class = ITEMSIZE_LARGE // Takes up more space in inventories than a pistol.
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2) // The tech levels you get from deconstructing this item.
recoil = 0 // No screenshake on firing.
one_handed_penalty = 15 // Slight accuracy penalty when firing one-handed.
auto_eject = 1 // Auto-ejects magazine when it's empty.
auto_eject_sound = 'sound/weapons/smg_empty_alarm.ogg'
caliber = "5.7x28mm" // The type of caliber the gun accepts. Will not accept magazines loaded with the wrong caliber, even if they're listed in allowed_magazines.
ammo_type = /obj/item/ammo_casing/a57 // Should always be an ammo casing that uses the same caliber as the gun's listed for.
load_method = MAGAZINE
magazine_type = /obj/item/ammo_magazine/a57p90 // The magazine type it spawns with.
allowed_magazines = list(/obj/item/ammo_magazine/a57p90) // What kind of magazine(s) it can load.
firemodes = list(
list(mode_name="semi-automatic", burst=1, fire_delay=0),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-15,-15), dispersion=list(0.0, 0.6, 1.0))
)
/obj/item/weapon/gun/projectile/automatic/p90/update_icon() // Code for visually updating the item depending on current magazine capacity.
icon_state = "p90smgnew-[ammo_magazine ? round(ammo_magazine.stored_ammo.len, 6) : "empty"]"
/*
* RIFLES
*/
/obj/item/weapon/gun/projectile/automatic/fal
name = "FN-FAL"
desc = "A 20th century Assault Rifle originally designed by Fabrique National. Famous for its use by mercs in grinding proxy wars in backwater nations. This reproduction was probably made for similar purposes."
@@ -1219,11 +1219,9 @@
. = ..()
transform = transform.Translate(-16,0)
/obj/item/weapon/gun/projectile/automatic/p90 //Finally a gun that exists irl. oh wait fuck they decided to chamber the p90 in 9mm //Fixed bb
/obj/item/weapon/gun/projectile/automatic/p90
muzzle_velocity = 715 //Guestimation. Will hopefully be able to replace with actual 5.7mm at some point. //Done
desc = "The H90K is a compact, large capacity submachine gun produced by MarsTech. Despite its fierce reputation, it still manages to feel like a toy. Uses 5.7x28mm rounds."
caliber = "5.7x28mm"
allowed_magazines = list(/obj/item/ammo_magazine/m9mmp90)
allowed_magazines = list(/obj/item/ammo_magazine/a57p90)
/obj/item/weapon/gun/projectile/automatic/tommygun //Phew, an actual gun that fires the correct cartridge.
auto_loading_type = OPEN_BOLT