Skip to content

Commit

Permalink
blank ammo (shiptest-ss13#3352)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
pending sprites!
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
add: Added new blank shells for training drills!
refactor: Minor refactor of design disks to reduce repeated code
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
FalloutFalcon authored and MysticalFaceLesS committed Sep 28, 2024
1 parent 54c63e6 commit 0b7d5fd
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 62 deletions.
12 changes: 12 additions & 0 deletions code/modules/cargo/packs/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,18 @@
cost = 500
contains = list(/obj/item/ammo_box/a12g/slug)

/datum/supply_pack/ammo/blank_shells
name = "Blank Shell Crate"
desc = "Contains a box of blank shells."
cost = 500
contains = list(/obj/item/ammo_box/a12g/blanks)

/datum/supply_pack/ammo/blank_ammo_disk
name = "Blank Ammo Design Disk Crate"
desc = "Run your own training drills!"
cost = 1000
contains = list(/obj/item/disk/design_disk/blanks)

/datum/supply_pack/ammo/techshells
name = "Unloaded Shotgun Technological Shells Crate"
desc = "Contains a box of 7 versatile tech shells, capable of producing a variety of deadly effects for any situation. Some assembly required."
Expand Down
28 changes: 0 additions & 28 deletions code/modules/mining/lavaland/necropolis_chests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,34 +150,6 @@
if(28)
new /obj/item/clothing/suit/armor/ascetic(src)

//KA modkit design discs
/obj/item/disk/design_disk/modkit_disc
name = "KA Mod Disk"
desc = "A design disc containing the design for a unique kinetic accelerator modkit. It's compatible with a research console."
illustration = "accel"
color = "#6F6F6F"
var/modkit_design = /datum/design/unique_modkit

/obj/item/disk/design_disk/modkit_disc/Initialize()
. = ..()
blueprints[1] = new modkit_design

/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe
name = "Offensive Mining Explosion Mod Disk"
modkit_design = /datum/design/unique_modkit/offensive_turf_aoe

/obj/item/disk/design_disk/modkit_disc/rapid_repeater
name = "Rapid Repeater Mod Disk"
modkit_design = /datum/design/unique_modkit/rapid_repeater

/obj/item/disk/design_disk/modkit_disc/resonator_blast
name = "Resonator Blast Mod Disk"
modkit_design = /datum/design/unique_modkit/resonator_blast

/obj/item/disk/design_disk/modkit_disc/bounty
name = "Death Syphon Mod Disk"
modkit_design = /datum/design/unique_modkit/bounty

/datum/design/unique_modkit
category = list("Mining Designs", "Cyborg Upgrade Modules") //can't be normally obtained
build_type = PROTOLATHE | MECHFAB
Expand Down
7 changes: 7 additions & 0 deletions code/modules/projectiles/ammunition/ballistic/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
icon_state = "incendiary"
projectile_type = /obj/projectile/bullet/incendiary/shotgun

/obj/item/ammo_casing/shotgun/blank
name = "blank shell"
desc = "A shell packed with powder but no projectile."
icon_state = "blank"
projectile_type = /obj/projectile/bullet/pellet/blank
custom_materials = list(/datum/material/iron=250)

/obj/item/ammo_casing/shotgun/improvised
name = "improvised shell"
desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards."
Expand Down
6 changes: 6 additions & 0 deletions code/modules/projectiles/boxes_magazines/ammo_boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,12 @@
icon_state = "12gbox-rubbershot"
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot

/obj/item/ammo_box/a12g/blanks
name = "ammo box (12g blanks)"
desc = "A box of 12-gauge blank shells, designed for training."
icon_state ="12gbox-slug"
ammo_type = /obj/item/ammo_casing/shotgun/blank

/obj/item/ammo_box/c9mm
name = "ammo box (9mm)"
desc = "A box of standard 9mm ammo."
Expand Down
6 changes: 6 additions & 0 deletions code/modules/projectiles/projectile/bullets/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,9 @@
damage = 30
armour_penetration = -25
tile_dropoff = 3

/obj/projectile/bullet/pellet/blank
name = "blank"
damage = 30
range = 2
armour_penetration = -70
78 changes: 54 additions & 24 deletions code/modules/research/designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,72 +97,102 @@ other types of metals and chemistry for reagents).
color = "#8b70ff"
illustration = "design"
custom_materials = list(/datum/material/iron =300, /datum/material/glass =100)
var/disk_name = "Design Disk"
var/design_name
var/list/blueprints = list()
var/list/starting_blueprints = list()
var/starting_blueprints = list()
var/max_blueprints = 1

/obj/item/disk/design_disk/Initialize()
. = ..()
pixel_x = base_pixel_x + rand(-5, 5)
pixel_y = base_pixel_y + rand(-5, 5)
blueprints = new/list(max_blueprints)
if(design_name)
name = jointext(list(disk_name, design_name), " - ")
if(length(starting_blueprints))
for(var/design in starting_blueprints)
blueprints += new design()

/obj/item/disk/design_disk/adv
name = "Advanced Component Design Disk"
disk_name = "Advanced Design Disk"
color = "#bed876"
desc = "A disk for storing device design data for construction in lathes. This one has a little bit of extra storage space."
custom_materials = list(/datum/material/iron =300, /datum/material/glass = 100, /datum/material/silver = 50)
max_blueprints = 3

/obj/item/disk/design_disk/super
name = "Super Component Design Disk"
disk_name = "Super Design Disk"
color = "#c25454"
desc = "A disk for storing device design data for construction in lathes. This one has more extra storage space."
custom_materials = list(/datum/material/iron =300, /datum/material/glass = 100, /datum/material/silver = 50, /datum/material/gold = 50)
max_blueprints = 5

/obj/item/disk/design_disk/elite
name = "Elite Component Design Disk"
disk_name = "Elite Design Disk"
color = "#333333"
desc = "A disk for storing device design data for construction in lathes. This one has absurd amounts of extra storage space."
custom_materials = list(/datum/material/iron =300, /datum/material/glass = 100, /datum/material/silver = 100, /datum/material/gold = 100, /datum/material/bluespace = 50)
max_blueprints = 10

//Disks with content
/obj/item/disk/design_disk/ammo_c10mm
name = "Design Disk - 10mm Ammo"
design_name = "10mm Ammo"
desc = "A design disk containing the pattern for a refill box of standard 10mm ammo, used in Stechkin pistols."

/obj/item/disk/design_disk/ammo_c10mm/Initialize()
. = ..()
blueprints[1] = new /datum/design/c10mm()

starting_blueprints = (/datum/design/c10mm)

/obj/item/disk/design_disk/disposable_gun
name = "design disk - disposable gun"
design_name = "Disposable gun"
desc = "A design disk containing designs for a cheap and disposable gun."
illustration = "gun"
max_blueprints = 2

/obj/item/disk/design_disk/disposable_gun/Initialize()
. = ..()
blueprints[1] = new /datum/design/disposable_gun()
starting_blueprints = list(/datum/design/disposable_gun)

/obj/item/disk/design_disk/clip_mechs
name = "design disk - CLIP exosuit modifications"
design_name = "CLIP exosuit modifications"
desc = "A design disk containing specifications for CLIP-custom exosuit conversions."
color = "#57b8f0"
max_blueprints = 2

/obj/item/disk/design_disk/clip_mechs/Initialize()
. = ..()
blueprints[1] = new /datum/design/clip_ripley_upgrade()
blueprints[2] = new /datum/design/clip_durand_upgrade()
starting_blueprints = list(/datum/design/clip_ripley_upgrade, /datum/design/clip_durand_upgrade)

/obj/item/disk/design_disk/ammo_c9mm
name = "Design Disk - 9mm Ammo"
design_name = "9mm Ammo"
desc = "A design disk containing the pattern for a refill box of standard 9mm ammo, used in Commander pistols."

/obj/item/disk/design_disk/ammo_c9mm/Initialize()
. = ..()
blueprints[1] = new /datum/design/c9mmautolathe()
starting_blueprints = list(/datum/design/c9mmautolathe)

/obj/item/disk/design_disk/blanks
design_name = "Blank Ammo"
starting_blueprints = list(/datum/design/blank_shell)


/obj/item/disk/design_disk/ammo_1911
design_name = "1911 Magazine"
desc = "A design disk containing the pattern for the classic 1911's seven round .45ACP magazine."
illustration = "ammo"
starting_blueprints = list(/datum/design/colt_1911_magazine)

//KA modkit design discs
/obj/item/disk/design_disk/modkit_disc
design_name = "KA Mod"
desc = "A design disc containing the design for a unique kinetic accelerator modkit. It's compatible with a research console."
illustration = "accel"
color = "#6F6F6F"
starting_blueprints = list(/datum/design/unique_modkit)

/obj/item/disk/design_disk/modkit_disc/mob_and_turf_aoe
design_name = "Offensive Mining Explosion Mod"
starting_blueprints = list(/datum/design/unique_modkit/offensive_turf_aoe)

/obj/item/disk/design_disk/modkit_disc/rapid_repeater
design_name = "Rapid Repeater Mod"
starting_blueprints = list(/datum/design/unique_modkit/rapid_repeater)

/obj/item/disk/design_disk/modkit_disc/resonator_blast
design_name = "Resonator Blast Mod"
starting_blueprints = list(/datum/design/unique_modkit/resonator_blast)

/obj/item/disk/design_disk/modkit_disc/bounty
design_name = "Death Syphon Mod"
starting_blueprints = list(/datum/design/unique_modkit/bounty)
8 changes: 8 additions & 0 deletions code/modules/research/designs/autolathe_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,14 @@
build_path = /obj/item/ammo_casing/shotgun/beanbag
category = list("initial", "Security", "Ammo")

/datum/design/blank_shell
name = "Shotgun Blank"
id = "blank_shell"
build_type = AUTOLATHE | PROTOLATHE
materials = list(/datum/material/iron = 2000)
build_path = /obj/item/ammo_casing/shotgun/blank
category = list("Security", "Ammo")

/datum/design/riot_dart
name = "Foam Riot Dart"
id = "riot_dart"
Expand Down
10 changes: 0 additions & 10 deletions code/modules/ruins/spaceruin_code/bigderelict1.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,3 @@
/obj/item/paper/crumpled/ruins/bigderelict1/coward
icon_state = "scrap_bloodied"
default_raw_text = "If anyone finds this, please, don't let my kids know I died a coward.."

/obj/item/disk/design_disk/ammo_1911
name = "design disk - 1911 magazine"
desc = "A design disk containing the pattern for the classic 1911's seven round .45ACP magazine."
illustration = "ammo"

/obj/item/disk/design_disk/ammo_1911/Initialize()
. = ..()
var/datum/design/colt_1911_magazine/M = new
blueprints[1] = M
Binary file modified icons/obj/ammo_shotshells.dmi
Binary file not shown.

0 comments on commit 0b7d5fd

Please sign in to comment.