Skip to content

Commit

Permalink
Merge pull request #285 from KittyNoodle/rifle
Browse files Browse the repository at this point in the history
Autorifles 2.0
  • Loading branch information
dwasint authored Oct 23, 2023
2 parents 10bac4a + 0c44192 commit a4106ec
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 59 deletions.
34 changes: 0 additions & 34 deletions code/modules/research/designs/weapon_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -126,40 +126,6 @@
departmental_flags = DEPARTMENT_BITFLAG_SECURITY
autolathe_exportable = FALSE

/datum/design/mag_autorifle
name = "WT-550 Autorifle Magazine (4.6x30mm) (Lethal)"
desc = "A 20 round magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle"
build_type = PROTOLATHE | AWAY_LATHE
materials = list(/datum/material/iron = 4000)
build_path = /obj/item/ammo_box/magazine/wt550m9
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/ap_mag
name = "WT-550 Autorifle Armour Piercing Magazine (4.6x30mm AP) (Lethal)"
desc = "A 20 round armour piercing magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_ap"
materials = list(/datum/material/iron = 6000, /datum/material/silver = 600)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtap
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/ic_mag
name = "WT-550 Autorifle Incendiary Magazine (4.6x30mm IC) (Lethal/Highly Destructive)"
desc = "A 20 round armour piercing magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_ic"
materials = list(/datum/material/iron = 6000, /datum/material/silver = 600, /datum/material/glass = 1000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtic
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/pin_testing
name = "Test-Range Firing Pin"
desc = "This safety firing pin allows firearms to be operated within proximity to a firing range."
Expand Down
8 changes: 4 additions & 4 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,6 @@
"seclite",
"zipties",
"inspector",
"mag_autorifle",
"rubber_c35", //monkestation edit: taco sec
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000)
Expand Down Expand Up @@ -1526,7 +1525,8 @@
design_ids = list(
"pin_testing",
"tele_shield",
"lethal_c35", //monkestation edit: taco sec
"lethal_c35", //monkestation edit: paco sec
"mag_autorifle_rub", //monkestation edit: autorifles
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
discount_experiments = list(/datum/experiment/ordnance/explosive/pressurebomb = 5000)
Expand All @@ -1538,6 +1538,8 @@
prereq_ids = list("adv_engi", "weaponry")
design_ids = list(
"pin_loyalty",
"mag_autorifle", //monkestation edit: autorifles
"mag_autorifle_salt", //monkestation edit: autorifles
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
discount_experiments = list(/datum/experiment/scanning/points/machinery_tiered_scan/tier3_mechbay = 2500)
Expand Down Expand Up @@ -1605,8 +1607,6 @@
"c38_hotshot",
"c38_iceblox",
"techshotshell",
"mag_autorifle_ap",
"mag_autorifle_ic",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)

Expand Down
48 changes: 48 additions & 0 deletions monkestation/code/game/objects/items/guns/wt_ammo.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/obj/item/ammo_box/magazine/wt550m9/wtrub
name = "wt550 magazine (Rubber 4.6x30mm)"
icon = 'monkestation/icons/obj/guns/ammo.dmi'
icon_state = "46x30mmtR-20"
base_icon_state = "46x30mmtR"
ammo_type = /obj/item/ammo_casing/c46x30mm/rub

/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[round(ammo_count(), 4)]"

/obj/item/ammo_casing/c46x30mm/rub
name = "4.6x30mm rubber bullet casing"
desc = "A 4.6x30mm rubber bullet casing."
projectile_type = /obj/projectile/bullet/c46x30mm/rub

/obj/projectile/bullet/c46x30mm/rub
name = "4.6x30mm rubber bullet"
damage = 4
stamina = 35
embedding = null
sharpness = NONE

/obj/item/ammo_box/magazine/wt550m9/wtsalt
name = "wt550 magazine (Saltshot 4.6x30mm)"
icon = 'monkestation/icons/obj/guns/ammo.dmi'
icon_state = "46x30mmtS-20"
base_icon_state = "46x30mmtS"
ammo_type = /obj/item/ammo_casing/c46x30mm/salt

/obj/item/ammo_box/magazine/wt550m9/wtic/update_icon_state()
. = ..()
icon_state = "[base_icon_state]-[round(ammo_count(), 4)]"

/obj/item/ammo_casing/c46x30mm/salt
name = "4.6x30mm saltshot bullet casing"
desc = "A 4.6x30mm saltshot bullet casing."
projectile_type = /obj/projectile/bullet/c46x30mm/salt

/obj/projectile/bullet/c46x30mm/salt
name = "4.6x30mm saltshot bullet"
damage = 0
stamina = 30
embedding = null
sharpness = NONE

/obj/item/gun/ballistic/automatic/wt550/no_mag
spawnwithmagazine = FALSE
40 changes: 40 additions & 0 deletions monkestation/code/modules/cargo/crates/imports.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,43 @@
cost = CARGO_CRATE_VALUE * 4
contains = list(/obj/item/ammo_box/n762 = 6)
crate_name = "Emergency Crate"

/datum/supply_pack/imports/wt550
name = "WT-550 Autorifle Crate"
desc = "A proper ballistic option for a proper ballistic officer."
cost = CARGO_CRATE_VALUE * 30
contains = list(
/obj/item/gun/ballistic/automatic/wt550/no_mag = 2,
/obj/item/ammo_box/magazine/wt550m9/wtrub = 4,
)
crate_name = "Autorifle Crate"
access = ACCESS_ARMORY
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon

/datum/supply_pack/imports/wt550ammo/nonlethal
name = "WT-550 Non-Lethal Ammo Crate"
desc = "A supply of non-lethal ammunition for the WT-550 autorifle."
cost = CARGO_CRATE_VALUE * 5
contains = list(
/obj/item/ammo_box/magazine/wt550m9/wtrub = 3,
/obj/item/ammo_box/magazine/wt550m9/wtsalt = 3,
)
crate_name = "wt-550 non-lethal ammo crate"
access = ACCESS_ARMORY
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon

/datum/supply_pack/imports/wt550ammo
name = "WT-550 Ammo Crate"
desc = "A supply of spare and exotic lethal ammunition for the WT-550 autorifle."
cost = CARGO_CRATE_VALUE * 6
contains = list(
/obj/item/ammo_box/magazine/wt550m9 = 2,
/obj/item/ammo_box/magazine/wt550m9/wtap = 2,
/obj/item/ammo_box/magazine/wt550m9/wtic = 2,
)
crate_name = "wt-550 ammo crate"
access = ACCESS_ARMORY
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon
21 changes: 0 additions & 21 deletions monkestation/code/modules/cargo/crates/security.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,6 @@
crate_name = "secway crate"
crate_type = /obj/structure/closet/crate/large

/datum/supply_pack/security/armory/wt550
name = "WT-550 Autorifle Crate"
desc = "A proper ballistic option for a proper ballistic officer."
cost = CARGO_CRATE_VALUE * 7
contains = list(
/obj/item/gun/ballistic/automatic/wt550 = 2,
/obj/item/ammo_box/magazine/wt550m9 = 2,
)
crate_name = "Autorifle Crate"

/datum/supply_pack/security/armory/wt550ammo
name = "WT-550 Ammo Crate"
desc = "A supply of spare and exotic ammunition for the WT-550 autorifle."
cost = CARGO_CRATE_VALUE * 4
contains = list(
/obj/item/ammo_box/magazine/wt550m9 = 2,
/obj/item/ammo_box/magazine/wt550m9/wtap = 2,
/obj/item/ammo_box/magazine/wt550m9/wtic = 2,
)
crate_name = "wt-550 ammo crate"

/datum/supply_pack/security/armory/combatknives
name = "Combat Knives Crate"
desc = "Three combat knives guaranteed to fit snugly inide any Nanotrasen standard boot. Warranty void if you stab your own ankle."
Expand Down
56 changes: 56 additions & 0 deletions monkestation/code/modules/research/designs/security_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,59 @@
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO,
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle
name = "WT-550 Autorifle Magazine (4.6x30mm) (Lethal)"
desc = "A 20 round magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle"
build_type = PROTOLATHE | AWAY_LATHE
materials = list(/datum/material/iron = 12000)
build_path = /obj/item/ammo_box/magazine/wt550m9
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/ap_mag
name = "WT-550 Autorifle Armour Piercing Magazine (4.6x30mm AP) (Lethal)"
desc = "A 20 round armour piercing magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_ap"
materials = list(/datum/material/iron = 15000, /datum/material/silver = 600)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtap
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/ic_mag
name = "WT-550 Autorifle Incendiary Magazine (4.6x30mm IC) (Lethal/Highly Destructive)"
desc = "A 20 round armour piercing magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_ic"
materials = list(/datum/material/iron = 15000, /datum/material/silver = 600, /datum/material/glass = 1000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtic
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/rub_mag
name = "WT-550 Autorifle Rubber Magazine (4.6x30mm R) (Lethal)"
desc = "A 20 round rubber magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_rub"
materials = list(/datum/material/iron = 6000)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtrub
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY

/datum/design/mag_autorifle/salt_mag
name = "WT-550 Autorifle Saltshot Magazine (4.6x30mm SALT) (Non-Lethal)"
desc = "A 20 round saltshot magazine for the out of date WT-550 Autorifle."
id = "mag_autorifle_salt"
materials = list(/datum/material/iron = 6000, /datum/material/plasma = 600)
build_path = /obj/item/ammo_box/magazine/wt550m9/wtsalt
category = list(
RND_CATEGORY_WEAPONS + RND_SUBCATEGORY_WEAPONS_AMMO
)
departmental_flags = DEPARTMENT_BITFLAG_SECURITY
11 changes: 11 additions & 0 deletions monkestation/code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,14 @@
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 1000, TECHWEB_POINT_TYPE_NANITES = 2500)
hidden = TRUE
experimental = TRUE

/datum/techweb_node/adv_ballistics
id = "adv_ballistics"
display_name = "Advanced Ballistics"
description = "The most sophisticated methods of shooting people."
prereq_ids = list("adv_weaponry")
design_ids = list(
"mag_autorifle_ap",
"mag_autorifle_ic",
)
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
Binary file modified monkestation/code/modules/security/icons/paco_ammo.dmi
Binary file not shown.
Binary file added monkestation/icons/obj/guns/ammo.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -5540,6 +5540,7 @@
#include "monkestation\code\game\objects\items\guns\crank_guns.dm"
#include "monkestation\code\game\objects\items\guns\shotguns.dm"
#include "monkestation\code\game\objects\items\guns\SRN.dm"
#include "monkestation\code\game\objects\items\guns\wt_ammo.dm"
#include "monkestation\code\game\objects\items\implants\hardlight.dm"
#include "monkestation\code\game\objects\items\objects\items\robot\robot_upgrades.dm"
#include "monkestation\code\game\objects\items\storage\book.dm"
Expand Down

0 comments on commit a4106ec

Please sign in to comment.