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

Shazbot's Armory [WIP] #7540

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 14 additions & 2 deletions code/modules/projectiles/ammunition/ammo_casings.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,12 +265,24 @@
reagents.add_reagent("sodium_thiopental", 6)

/obj/item/ammo_casing/shotgun/tranquilizer
name = "tranquilizer darts"
desc = "A tranquilizer round used to subdue individuals utilizing stimulants."
name = "anti-stimulant darts"
desc = "An anti-stimulant round used to subdue individuals utilizing stimulants."
icon_state = "nshell"
projectile_type = /obj/item/projectile/bullet/dart/syringe/tranquilizer
materials = list(MAT_METAL=250)

/obj/item/ammo_casing/shotgun/dart/special
caliber = "dart"
icon_state = "emptiedart"
projectile_type = /obj/item/projectile/bullet/dart/g20

/obj/item/ammo_casing/shotgun/dart/special/tranquilizer
icon_state = "tranqdart"

/obj/item/ammo_casing/shotgun/dart/special/tranquilizer/New()
..()
reagents.add_reagent("ketamine", 10)

/obj/item/ammo_casing/a556
desc = "A 5.56mm bullet casing."
caliber = "a556"
Expand Down
7 changes: 7 additions & 0 deletions code/modules/projectiles/ammunition/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@
ammo_type = /obj/item/ammo_casing/shotgun/tranquilizer
materials = list(MAT_METAL=1750)

/obj/item/ammo_box/tranqdarts
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm willing to bet this looks like a box, but behaves like a speedloader. This is inconsistent with the way things work currently on Paradise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, all ammo boxes except shotgun shells, .38, .357, 7.62 stripper clip, and capslook like boxed and act like speed loaders. This would include 10mm, 9mm, .45 caliber, .45 caliber rubber, 40mm, 7.62mm boxes, foam force darts, and riot foam darts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with loose pistol/rifle rounds in boxes acting like speedloaders -> mags. Only shotgun shells and bigger should need to be loaded in manually due to their size and encumbrance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it would help, since these aren't shotgun shells but rather their own thing, I can change them from being a 20g style shell and make them into a normal copper shell casing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I have changed them to 9x39mm rifle rounds and updated all the icons and names to match.

name = "ammo box (20G tranquilizer darts)"
icon_state = "tranqbox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/shotgun/dart/speacial/tranquilizer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and again here

max_ammo = 20


//FOAM DARTS
/obj/item/ammo_box/foambox
Expand Down
52 changes: 52 additions & 0 deletions code/modules/projectiles/ammunition/magazines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,17 @@
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 6

/obj/item/ammo_box/magazine/internal/dart
name = "single shot dart gun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/dart/speacial/tranquilizer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doot doot

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doot

caliber = "dart"
max_ammo = 1

/obj/item/ammo_box/magazine/internal/shot/dominator
name = "quad shotgun internal magazine"
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
max_ammo = 4

/obj/item/ammo_box/magazine/internal/grenadelauncher
name = "grenade launcher internal magazine"
ammo_type = /obj/item/ammo_casing/a40mm
Expand Down Expand Up @@ -202,6 +213,19 @@
/obj/item/ammo_box/magazine/m10mm/empty/update_icon()
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "8" : "0"]"

/obj/item/ammo_box/magazine/m10mmL
name = "large pistol magazine (10mm)"
desc = "A gun magazine."
icon_state = "9x19L"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/c10mm
caliber = "10mm"
max_ammo = 18

/obj/item/ammo_box/magazine/m10mmL/update_icon()
..()
icon_state = "[initial(icon_state)]-[Ceiling(ammo_count(0)/18)]"

/obj/item/ammo_box/magazine/m45
name = "handgun magazine (.45)"
icon_state = "45"
Expand Down Expand Up @@ -310,6 +334,18 @@
..()
icon_state = "9x19p-[ammo_count() ? "8" : "0"]"

/obj/item/ammo_box/magazine/pistolm9mm/short
name = "shortend pistol magazine (9mm)"
max_ammo = 6

/obj/item/ammo_box/magazine/pistolm9mm/large
name = "long pistol magazine (9mm)"
max_ammo = 30

/obj/item/ammo_box/magazine/pistolm9mm/large/update_icon()
..()
icon_state = "9x19L-[ammo_count() ? "1" : "0"]"

/obj/item/ammo_box/magazine/smgm45
name = "SMG magazine (.45)"
icon_state = "c20r45"
Expand Down Expand Up @@ -355,6 +391,22 @@
max_ammo = 30
multiple_sprites = 2

/obj/item/ammo_box/magazine/stan
name = "assault rifle magazine (5.56mm)"
icon_state = "stan"
origin_tech = "combat=5"
ammo_type = /obj/item/ammo_casing/a556
caliber = "a556"
max_ammo = 30

/obj/item/ammo_box/magazine/stan/update_icon()
icon_state = "[initial(icon_state)]-[Ceiling(ammo_count(0)/max_ammo)]"

/obj/item/ammo_box/magazine/stan/short
name = "short assault rifle magazine (5.56mm)"
icon_state = "stan-s"
max_ammo = 10

/obj/item/ammo_box/magazine/m12g
name = "shotgun magazine (12g slugs)"
desc = "A drum magazine."
Expand Down
43 changes: 39 additions & 4 deletions code/modules/projectiles/guns/projectile/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"

/obj/item/weapon/gun/projectile/automatic/wt550
name = "security auto rifle"
desc = "An outdated personal defense weapon utilized by law enforcement. The WT-550 Automatic Rifle fires 4.6x30mm rounds."
name = "security assault pistol"
desc = "An outdated personal defense weapon utilized by law enforcement reintroduced into service as an assault pistol. The WT-550 Automatic Rifle fires 4.6x30mm rounds."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WT-550 Automatic Rifle should be changed to assault pistol.

icon_state = "wt550"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/wt550m9
fire_delay = 2
can_suppress = 0
can_suppress = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can_suppress = TRUE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tested this, it works with the 1, and I have yet to see any other gun use TRUE.

Copy link
Contributor

@Citinited Citinited Jun 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's a boolean variable, you may as well use TRUE / FALSE (I'm led to believe it's standard practice to? @tigercat2000 ). 1 / 0 does work though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shazbot194 if its a binary yes/no, we should be using TRUE/FALSE afaik in accordance with Paradise coding standards - but I could be entirely mistaken there.

Pre-existing code isn't all up to standard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I will change it, it was just confusing to me as to why TRUE/FALSE isn't in use in other places.

burst_size = 1
actions_types = list()

/obj/item/weapon/gun/projectile/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][suppressed ? "-s" : ""]"

/obj/item/weapon/gun/projectile/automatic/mini_uzi
name = "\improper 'Type U3' Uzi"
Expand Down Expand Up @@ -265,3 +265,38 @@
/obj/item/weapon/gun/projectile/automatic/lasercarbine/update_icon()
..()
icon_state = "lasercarbine[magazine ? "-[Ceiling(get_ammo(0)/5)*5]" : ""]"

/obj/item/weapon/gun/projectile/automatic/m4
name = "tran sol combat rifle"
desc = "An ancient yet robust assault rile used by Tran-Solar Federation's ground fighting forces."
icon_state = "m-4"
item_state = "arg"
slot_flags = 0
w_class = WEIGHT_CLASS_HUGE
origin_tech = "combat=6;engineering=4"
mag_type = /obj/item/ammo_box/magazine/stan
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRUE

burst_size = 3
fire_delay = 1

/obj/item/weapon/gun/projectile/automatic/m4/update_icon()
if(magazine)
if(magazine.max_ammo>29)
icon_state = "[initial(icon_state)]-l[suppressed ? "-su" : ""]"
else
icon_state = "[initial(icon_state)]-s[suppressed ? "-su" : ""]"
else
icon_state = "[initial(icon_state)]-e[suppressed ? "-su" : ""]"

/obj/item/weapon/gun/projectile/automatic/m4/sp1
name = "sporting rifle"
desc = "A sporting version of the assault rile used by Tran-Solar Federation's ground fighting forces."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rile -> rifle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did I miss that one.

icon_state = "SP-1"
burst_size = 1
actions_types = list()


/obj/item/weapon/gun/projectile/automatic/m4/sp1/New()
magazine = new /obj/item/ammo_box/magazine/stan/short(src)
..()
51 changes: 51 additions & 0 deletions code/modules/projectiles/guns/projectile/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,53 @@
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return

/obj/item/weapon/gun/projectile/automatic/pistol/auto
name = "stechkin mkII pistol"
desc = "A larger version of the classic stechkin, meant to be used by assault parties."
icon_state = "auto-pistol"
origin_tech = "combat=4;materials=2;syndicate=4"
mag_type = /obj/item/ammo_box/magazine/m10mmL
burst_size = 3
fire_delay = 1
actions_types = list(/datum/action/item_action/toggle_firemode)

/obj/item/weapon/gun/projectile/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "-18" : ""][chambered ? "" : "-e"][suppressed ? "-s" : ""]"
return


/obj/item/weapon/gun/projectile/automatic/pistol/civi
name = "civilian pistol"
desc = "A remake of the stechkin in 9mm with some slight alterations."
icon_state = "civi"
mag_type = /obj/item/ammo_box/magazine/pistolm9mm
var/mag_icon = ""

/obj/item/weapon/gun/projectile/automatic/pistol/civi/update_icon()
..()
if(magazine)
if(magazine.max_ammo == 30)
mag_icon = "-l"
else
mag_icon = ""
else
mag_icon = ""
icon_state = "[initial(icon_state)][mag_icon][suppressed ? "-s" : ""][chambered ? "" : "-e"]"
return

/obj/item/weapon/gun/projectile/automatic/pistol/civi/cargo //The crew version with only 6 rounds

/obj/item/weapon/gun/projectile/automatic/pistol/civi/cargo/New()
magazine = new /obj/item/ammo_box/magazine/pistolm9mm/short(src)
..()

/obj/item/weapon/gun/projectile/automatic/pistol/civi/long //Syndi/military version with 30 rounds

/obj/item/weapon/gun/projectile/automatic/pistol/civi/long/New()
magazine = new /obj/item/ammo_box/magazine/pistolm9mm/large(src)
..()

/obj/item/weapon/gun/projectile/automatic/pistol/m1911
name = "\improper M1911"
desc = "A classic .45 handgun with a small magazine capacity."
Expand Down Expand Up @@ -48,6 +95,10 @@
mag_type = /obj/item/ammo_box/magazine/m45/enforcer45
can_suppress = 0

/obj/item/weapon/gun/projectile/automatic/pistol/enforcer45/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"

/obj/item/weapon/gun/projectile/automatic/pistol/deagle/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
Expand Down
59 changes: 59 additions & 0 deletions code/modules/projectiles/guns/projectile/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,62 @@

if(desc)
to_chat(user, desc)

// Dominator

/obj/item/weapon/gun/projectile/revolver/doublebarrel/dominator
name = "Dominator"
desc = "Death comes for you."
icon_state = "dominator"
item_state = "shotgun"
w_class = WEIGHT_CLASS_NORMAL
force = 10
mag_type = /obj/item/ammo_box/magazine/internal/shot/dominator
unique_rename = 0
unique_reskin = 0
can_unsuppress = 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FALSE

suppressed = 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRUE

fire_sound = 'sound/weapons/Gunshot_silenced.ogg'

/obj/item/weapon/gun/projectile/revolver/doublebarrel/Dominator/sawoff()
return

/////////////////
// Dart Pistol //
/////////////////


/obj/item/weapon/gun/projectile/revolver/tranqpistol
name = "Tranquilizer Pistol"
desc = "A new tranqualiser pistol meant to help subdue wild prisoners.."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tranqualiser -> Tranquilizer

Also finish with 3 or 4 full stops, never 2.

Copy link
Contributor

@Citinited Citinited Jun 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tranqualiser

Also ... not ..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

said both of these already, nerd ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

D;D;D;

icon_state = "tranq-pistol"
force = 10
mag_type = /obj/item/ammo_box/magazine/internal/dart

/obj/item/weapon/gun/projectile/revolver/tranqpistol/update_icon()
if(get_ammo() > 0)
icon_state = "[initial(icon_state)][chambered.BB ? "-l" : ""][chambered ? "-c" : ""]"
else
icon_state = "[initial(icon_state)]"


/obj/item/weapon/gun/projectile/revolver/tranqpistol/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
update_icon()

/obj/item/weapon/gun/projectile/revolver/tranqpistol/attack_self(mob/living/user)
var/num_unloaded = 0
while(get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
update_icon()
CB.loc = get_turf(loc)
CB.update_icon()
num_unloaded++
if(num_unloaded)
to_chat(user, "<span class = 'notice'>You open the [src] and unload the shell.</span>")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, as in having [src] it should automatically add the the, but try it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The the on the [src] is redundant -- just use [src]

else
to_chat(user, "<span class='notice'>[src] is empty.</span>")