Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Dart gun & 5.7x28mm mag fixs #340

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 174 additions & 0 deletions code/modules/projectiles/ammunition/calibers/normal/a5_7mm.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
/datum/ammo_caliber/a5_7mm
caliber = "5.7x28mm"

//* Casings

/obj/item/ammo_casing/a5_7mm
icon = 'icons/modules/projectiles/casings/slim.dmi'
icon_state = "small"
desc = "A 5.7x28mm bullet casing."
caliber = /datum/ammo_caliber/a5_7mm
projectile_type = /obj/projectile/bullet/pistol/lap
materials_base = list(MAT_STEEL = 30, MAT_COPPER = 30)

/obj/item/ammo_casing/a5_7mm/ap
desc = "A 5.7x28mm armor-piercing bullet casing."
icon_state = "small-reinf"
projectile_type = /obj/projectile/bullet/pistol/ap
materials_base = list(MAT_STEEL = 80, MAT_COPPER = 30)

/obj/item/ammo_casing/a5_7mm/hp
icon_state = "small-tech"
desc = "A 5.7x28mm hollow-point bullet casing."
projectile_type = /obj/projectile/bullet/pistol/hp
materials_base = list(MAT_STEEL = 60, MAT_COPPER = 30)

/obj/item/ammo_casing/a5_7mm/hunter
desc = "A 5.7x28mm hunting bullet casing."
icon_state = "small-silver"
projectile_type = /obj/projectile/bullet/pistol/hunter
materials_base = list(MAT_STEEL = 30, MAT_COPPER = 50)

//* Magazines

/obj/item/ammo_magazine/a5_7mm
ammo_caliber = /datum/ammo_caliber/a5_7mm
ammo_preload = /obj/item/ammo_casing/a5_7mm

/obj/item/ammo_magazine/a5_7mm/nt_les
name = "magazine (5.7x28mm)"
desc = "A durable top-loading magazine, designed for withstanding rough treatment."
icon = 'icons/modules/projectiles/magazines/old_magazine_stick.dmi'
icon_state = "ntles-1"
base_icon_state = "ntles"
rendering_system = GUN_RENDERING_STATES
rendering_count = 1
ammo_max = 20

/obj/item/ammo_magazine/a5_7mm/nt_les/ap
name = "magazine (5.7x28mm armor piercing)"
rendering_static_overlay = "ap"
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap

/obj/item/ammo_magazine/a5_7mm/nt_les/hp
name = "magazine (5.7x28mm hollow-point)"
rendering_static_overlay = "hp"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hp

/obj/item/ammo_magazine/a5_7mm/nt_les/hunter
name = "magazine (5.7x28mm hunter)"
rendering_static_overlay = "hunter"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hunter

/obj/item/ammo_magazine/a5_7mm/nt_les/empty
ammo_current = 0

/obj/item/ammo_magazine/a5_7mm/nt_les/highcap
name = "high capacity magazine (5.7x28mm)"
icon_state = "ntles-high-1"
base_icon_state = "ntles-high"
ammo_max = 50

/obj/item/ammo_magazine/a5_7mm/nt_les/highcap/ap
name = "high capacity magazine (5.7x28mm armor piercing)"
rendering_static_overlay = "ap"
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap
/obj/item/ammo_magazine/a5_7mm/nt_les/highcap/hp
name = "high capacity magazine (5.7x28mm hollow-point)"
rendering_static_overlay = "hp"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hp

/obj/item/ammo_magazine/a5_7mm/nt_les/highcap/hunter
name = "high capacity magazine (5.7x28mm hunter)"
rendering_static_overlay = "hunter"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hunter

/obj/item/ammo_magazine/a5_7mm/nt_les/highcap/empty
ammo_current = 0

//Harpy SMG

/obj/item/ammo_magazine/a5_7mm/harpy_smg
name = "NT-SMG-8 magazine (5.7x28mm)"
desc = "A compact double stack aluminum magazine."
icon = 'icons/modules/projectiles/magazines/old_magazine_stick.dmi'
icon_state = "harpy"
rendering_count = 1
rendering_system = GUN_RENDERING_STATES
ammo_max = 40

/obj/item/ammo_magazine/a5_7mm/harpy_smg/ap
name = "NT-SMG-8 magazine (5.7x28mm armor piercing)"
rendering_static_overlay = "ap"
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap

//Fiveseven mags
/obj/item/ammo_magazine/a5_7mm/five_seven
name = "fiveseven magazine (5.7x28mm)"
desc = "A sturdy double stack magazine with a reinforced spring, designed for withstanding rough treatment."
icon = 'icons/modules/projectiles/magazines/old_magazine_stick.dmi'
icon_state = "fiveseven-0"
base_icon_state = "fiveseven"
materials_base = list(MAT_STEEL = 300)
rendering_system = GUN_RENDERING_STATES
rendering_count = 1
ammo_caliber = /datum/ammo_caliber/a5_7mm
ammo_preload = /obj/item/ammo_casing/a5_7mm
ammo_max = 20

/obj/item/ammo_magazine/a5_7mm/five_seven/ap
name = "magazine (5.7x28mm armor piercing)"
rendering_static_overlay = "ap"
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap

/obj/item/ammo_magazine/a5_7mm/five_seven/hp
name = "magazine (5.7x28mm hollow-point)"
rendering_static_overlay = "hp"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hp

/obj/item/ammo_magazine/a5_7mm/five_seven/hunter
name = "magazine (5.7x28mm hunter)"
rendering_static_overlay = "hunter"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hunter

/obj/item/ammo_magazine/a5_7mm/five_seven/empty
ammo_current = 0

/obj/item/ammo_magazine/a5_7mm/five_seven/highcap
name = "high capacity fiveseven magazine (5.7x28mm)"
desc = "A sturdy, extra long double stack magazine with a reinforced spring, designed for withstanding rough treatment."
icon_state = "fiveseven-high-1"
base_icon_state = "fiveseven-high"
ammo_max = 30

/obj/item/ammo_magazine/a5_7mm/five_seven/highcap/ap
name = "high capacity magazine (5.7x28mm armor piercing)"
rendering_static_overlay = "ap"
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap
/obj/item/ammo_magazine/a5_7mm/five_seven/highcap/hp
name = "high capacity magazine (5.7x28mm hollow-point)"
rendering_static_overlay = "hp"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hp

/obj/item/ammo_magazine/a5_7mm/five_seven/highcap/hunter
name = "high capacity magazine (5.7x28mm hunter)"
rendering_static_overlay = "hunter"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hunter

/obj/item/ammo_magazine/a5_7mm/five_seven/highcap/empty
ammo_current = 0

/obj/item/ammo_magazine/a5_7mm/p90
name = "high capacity top mounted magazine (5.7x28mm armor-piercing)"
icon_state = "p90-1"
base_icon_state = "p90"
rendering_system = GUN_RENDERING_STATES
ammo_preload = /obj/item/ammo_casing/a5_7mm/ap
ammo_max = 50

/obj/item/ammo_magazine/a5_7mm/p90/hunter
name = "high capacity top mounted magazine (5.7x28mm hunter)"
ammo_preload = /obj/item/ammo_casing/a5_7mm/hunter

/obj/item/ammo_magazine/a5_7mm/p90/empty
ammo_current = 0
73 changes: 73 additions & 0 deletions code/modules/projectiles/ammunition/calibers/special/dart.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/datum/ammo_caliber/dart
caliber = "dart"

//* Casings *//

/obj/item/ammo_casing/dart/chemdart
name = "chemical dart"
desc = "A casing containing a small hardened, hollow dart."
icon_state = "dart"
caliber = /datum/ammo_caliber/dart
projectile_type = /obj/projectile/bullet/chemdart

/obj/item/ammo_casing/dart/chemdart/small
name = "short chemical dart"
icon_state = "dartsmall"
desc = "A casing containing a small hardened, hollow dart."
projectile_type = /obj/projectile/bullet/chemdart/small

//* Magazines *//

/obj/item/ammo_magazine/chemdart
name = "dart cartridge"
desc = "A rack of hollow darts."

icon = 'icons/modules/projectiles/magazines/darts.dmi'
icon_state = "darts-5"
base_icon_state = "darts"
rendering_system = GUN_RENDERING_STATES
rendering_count = 5

item_state = "rcdammo"
origin_tech = list(TECH_MATERIAL = 2)
magazine_type = MAGAZINE_TYPE_NORMAL
ammo_caliber = /datum/ammo_caliber/dart
ammo_preload = /obj/item/ammo_casing/dart/chemdart
ammo_max = 5

/obj/item/ammo_magazine/chemdart/small
name = "small dart cartridge"
desc = "A rack of hollow darts."

icon_state = "darts_small-5"
base_icon_state = "darts_small"
rendering_system = GUN_RENDERING_STATES
rendering_count = 3

origin_tech = list(TECH_MATERIAL = 2)
ammo_preload = /obj/item/ammo_casing/dart/chemdart/small
ammo_max = 3

//* Projectiles *//

/obj/projectile/bullet/chemdart
name = "dart"
icon_state = "dart"
damage = 5
var/reagent_amount = 15
range = WORLD_ICON_SIZE * 15

muzzle_type = null

/obj/projectile/bullet/chemdart/Initialize(mapload)
. = ..()
create_reagents(reagent_amount)

/obj/projectile/bullet/chemdart/on_hit(var/atom/target, var/blocked = 0, var/def_zone = null)
if(blocked < 2 && isliving(target))
var/mob/living/L = target
if(L.can_inject(target_zone=def_zone))
reagents.trans_to_mob(L, reagent_amount, CHEM_INJECT)

/obj/projectile/bullet/chemdart/small
reagent_amount = 10
Binary file added icons/modules/projectiles/casings/slim.dmi
Binary file not shown.
Loading