diff --git a/CMLS.txt b/CMLS.txt new file mode 100644 index 00000000000..b51c7528854 --- /dev/null +++ b/CMLS.txt @@ -0,0 +1,118 @@ +# HOW TO CMLS + +There are only two things to worry about: The Gun and the Ammo Kind + +### AmmoKind +This defines all the settings for the casing, projectile, magazine, and ammobox. This datum, depending on the vars you set, will automatically: + - Generate a box and/or a crate that'll be added to the CMLS vendor + - Generate a projectile, casing, and magazine + - Load all the sprites from the associated icon file + +Lets say you want to add in 4.92x14mm Scrungy. This'll be a basic Medium AmmoKind. It would look something like this: +```C +/datum/ammo_kind/medium/q_4_92x14mm_scrungy + name = "4.92x14mm Scrungy" + bullet_flavor = "A very scrungy bullet." // You can paste in somme bullshit AI algovomit here, the longer the better, it will show up on the casing (but not the magazine!)." + casing_kind = "cartridge" // 'you load a 4.92x14mm Scrungy cartridge into the gun' + projectile_kind = "bullet" // 'you are hit by a 4.92x14mm Scrungy bullet!' + box_name = "box of 4.92x14mm Scrungy bullets" // name of the associated box of bullets + box_flavor = "Algovomit goes here" // desc of the box + crate_name = "crate of 4.92x14mm Scrungy bullets" // name of the associated crate + crate_flavor = "More algovomit" // desc of the crate + magazine_name = "compact magazine" // if your gun can eject a magazine, it makes a magazine with this name when you eject it + magazine_flavor = "Its a magazine!" // desc of that magazine + caliber = CALIBER_COMPACT // the caliber of the casing, boxes, crates, and magazines + sound_properties = CSP_PISTOL_LIGHT // the sounds this bullet makes (look up [code\modules\projectiles\ammo_casing_gun_sound_properties.dm]) + ammo_icon = 'icons/obj/ammo/compact.dmi' // the icon that the datum pulls all its sprites from (it does this automatically!) + damage_list = list( + "30" = 30, + "35" = 10, + "40" = 1, + "200" = 1, + ) // the list of damages this bullet will do. All statistical things are calculated by the datum from this list. If you have a really high value in there somewhere, the datum will interpret that as a crit, and generate a statblock accordingly. + damage_type = BRUTE // Damage type of the projectile, look up [code\__DEFINES\combat.dm] around line 6ish + damage_armor = "bullet" // the armor type the projectile checks against + pellet_count = 1 // number of pellets, used for shotguns + caseless = FALSE // Deletes the casing on shooting, not sure if it works +``` + +For any children of this AmmoKind, all you really need are the names and flavors. If any of the names or flavors are not set, the AmmoKind will automatically generate somewhat fitting names and flavors for whatever's missing. For instance, this is a perfectly valid AmmoKind: + +```C +/datum/ammo_kind/medium/q_4_92x14mm_scrungy + name = "4.92x14mm Scrungy" +``` + +It will inherit all the vars from ammo_kind/medium! + +If your AmmoKind doesn't have any special sprites (as in, the projectile, casing, box, crate, and magazine don't need to look any different from the parent AmmoKind), you're done for the AmmoKind section! Yay! We'll get into how to make it look different later. + +### Gun +Ballistic guns can be CMLSed! +Say you want to make a gun for that Scrungy round. A basic one would look like this: + +```C +/obj/item/gun/ballistic/scrungy_classic + name = "Superduper Scrungy Classic" + desc = "This gun sucks (and swallows)" + + use_cmls = TRUE // Forces the gun to use the CMLS system + var/damage_list = list( + "10" = 50, + "1" = 2, + "40" = 2, + ) // If set, these values will be used instead of the damages in AmmoKind + damage_type = BRUTE // Overrides the damage type of the projectile. Can be null to use the AmmoKind's value + damage_armor_type = "bullet" // Overrides the armor check of the projectile. Can be null to use the AmmoKind's value + ammo_kind = /datum/ammo_kind/medium/q_4_92x14mm_scrungy // the AmmoKind that this gun will use. It will set up everything on the gun, nice and easy + ammo_magazine_name = "%MAXAMMO% round clipazine" // Name of the magazine inside the gun, for the text used when you 'eject' the magazine + ammo_capacity = 10 // How many bullets can go in the gun + ammo_single_load = FALSE // Whether or not you can only load one bullet at a time + is_revolver = FALSE // when you go to eject the magazine, it instead just dumps out the casings, like a revolver + sound_magazine_eject = "gun_remove_empty_magazine" // sound it makes when you eject the magazine, if applicable + var/sound_magazine_insert = "gun_insert_full_magazine" // sound it makes when you insert a magazine, if applicable +``` + +And that's it! Your gun (should) be fully functional at this point! Do note that the AmmoKind sprite cataloguer does *not* handle the gun's sprites, those are still handled in the same way as before, so be sure your gun isn't invisible after your changes! + +### Sprites +AmmoKinds automatically read the icon states in their ammo_icon and catalogue all the sprites associated with the kind of ammo it is, handling all that mess on its end! The way it does this is that it runs through the names of each icon_state, reads certain keywords, and categorizes them accordingly. + +These names are made up of one of two sets of tokens: + +"CORB-suffix" for states with no variation (full boxes, empty boxes, etc) + +"CORB-suffix-partial-key" for states that vary based on the number of bullets in the associated box + +CORB can be one of four things: + - bullet + - box + - crate + - magazine + +Suffix can be one of four things: + - projectile + - full + - empty + - partial + +Partial can be one of three things: + - broad + - percent + - count + +Key depends on if Partial is percent or count + - For percent, it will display this sprite if the ammobox is less than this percent full of bullets + - For count, it will display this sprite if the ammobox contains this amount or less of bullets inside + +I'll expand on this later, but the attached images should explain at least some of it! + + + + + + + + + + diff --git a/_maps/map_files/CB-WIP/Bowie_County.dmm b/_maps/map_files/CB-WIP/Bowie_County.dmm index f6718eb9282..b2883e93f0d 100644 --- a/_maps/map_files/CB-WIP/Bowie_County.dmm +++ b/_maps/map_files/CB-WIP/Bowie_County.dmm @@ -2806,7 +2806,7 @@ /area/f13/building) "jU" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/rods/fifty, /turf/open/floor/wood_common, /area/f13/wasteland) diff --git a/_maps/map_files/CB-WIP/Dekalb.dmm b/_maps/map_files/CB-WIP/Dekalb.dmm index 6a11a55e520..9b36f2bc151 100644 --- a/_maps/map_files/CB-WIP/Dekalb.dmm +++ b/_maps/map_files/CB-WIP/Dekalb.dmm @@ -1561,7 +1561,7 @@ }, /area/f13/wasteland) "LS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "purpledirtyfull" }, diff --git a/_maps/map_files/CB-WIP/deerpinepass-alpha.dmm b/_maps/map_files/CB-WIP/deerpinepass-alpha.dmm index 9c7faf05923..770e2c8c9b3 100644 --- a/_maps/map_files/CB-WIP/deerpinepass-alpha.dmm +++ b/_maps/map_files/CB-WIP/deerpinepass-alpha.dmm @@ -1339,7 +1339,7 @@ /turf/closed/wall/r_wall/rust, /area/f13/wasteland) "kF" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "purpledirtyfull" }, diff --git a/_maps/map_files/Fortress Nash/FortNash1.dmm b/_maps/map_files/Fortress Nash/FortNash1.dmm index 15a13818f92..21897dfccf3 100644 --- a/_maps/map_files/Fortress Nash/FortNash1.dmm +++ b/_maps/map_files/Fortress Nash/FortNash1.dmm @@ -2759,7 +2759,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -59651,7 +59651,7 @@ /area/f13/building/church) "qPw" = ( /obj/effect/spawner/lootdrop/f13/weapon/gun/ammo/tier3, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -71526,7 +71526,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( diff --git a/_maps/map_files/Fortress Nash/FortNashLower.dmm b/_maps/map_files/Fortress Nash/FortNashLower.dmm index 2bfe6eac6e6..4615b6e8159 100644 --- a/_maps/map_files/Fortress Nash/FortNashLower.dmm +++ b/_maps/map_files/Fortress Nash/FortNashLower.dmm @@ -279,7 +279,7 @@ }, /area/f13/building/sewers) "aij" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -762,7 +762,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/tunnel) "aDN" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "aEe" = ( @@ -8932,7 +8932,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt{ color = "#363636" }, @@ -19394,7 +19394,7 @@ }, /area/f13/building/sewers) "nND" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/spawner/lootdrop/f13/blueprintLowPartsWeighted, /obj/effect/spawner/lootdrop/f13/weapon/gun/ballistic/highmid, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, @@ -20155,7 +20155,7 @@ /turf/open/indestructible/ground/inside/subway, /area/f13/building/sewers) "otS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "oud" = ( @@ -26964,7 +26964,7 @@ }, /area/f13/caves) "tSC" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark{ icon_state = "darkrusty" }, diff --git a/_maps/map_files/Fortress Nash/FortNashUpper1.dmm b/_maps/map_files/Fortress Nash/FortNashUpper1.dmm index 1f3b7570cb1..2a9d2bfcebf 100644 --- a/_maps/map_files/Fortress Nash/FortNashUpper1.dmm +++ b/_maps/map_files/Fortress Nash/FortNashUpper1.dmm @@ -6087,7 +6087,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Lower.dmm b/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Lower.dmm index c9368a3ecd9..1d8aeec2e8f 100644 --- a/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Lower.dmm +++ b/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Lower.dmm @@ -306,7 +306,7 @@ }, /area/f13/building/sewers) "aij" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -848,7 +848,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/tunnel) "aDN" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "aEe" = ( @@ -10034,7 +10034,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt{ color = "#363636" }, @@ -22024,7 +22024,7 @@ }, /area/f13/building/sewers) "nND" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/caves) "nNP" = ( @@ -22817,7 +22817,7 @@ /turf/open/floor/carpet/black, /area/f13/building) "otS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "oul" = ( @@ -30857,7 +30857,7 @@ }, /area/f13/caves) "tSC" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark{ icon_state = "darkrusty" }, diff --git a/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Upper.dmm b/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Upper.dmm index 45b91ca7fd3..664600e5f78 100644 --- a/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Upper.dmm +++ b/_maps/map_files/Pahrump-Old/Pahrump-Sunset-Upper.dmm @@ -8847,7 +8847,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Old/Pahrump-Sunset.dmm b/_maps/map_files/Pahrump-Old/Pahrump-Sunset.dmm index 0f553bd04b3..2919f1dac81 100644 --- a/_maps/map_files/Pahrump-Old/Pahrump-Sunset.dmm +++ b/_maps/map_files/Pahrump-Old/Pahrump-Sunset.dmm @@ -7430,7 +7430,7 @@ /area/f13/caves) "dgD" = ( /obj/effect/spawner/lootdrop/f13/weapon/gun/ammo/tier3, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -9176,7 +9176,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vault1, /area/f13/building) "dRT" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -12638,7 +12638,7 @@ /obj/machinery/light{ dir = 4 }, -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/building) "fnE" = ( @@ -16264,7 +16264,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/village) "gLG" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/machinery/light/small{ dir = 8 }, @@ -16579,7 +16579,7 @@ }, /area/f13/wasteland) "gSx" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt{ color = "#363636" }, @@ -22128,7 +22128,7 @@ dir = 8 }, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood{ icon_state = "housewood2" }, @@ -34415,7 +34415,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/building) "ovg" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/sheet/metal, /turf/open/floor/f13/wood, /area/f13/building) @@ -42189,7 +42189,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "rWL" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building) "rWN" = ( @@ -47093,7 +47093,7 @@ /turf/open/floor/f13, /area/f13/building) "udt" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/village) "udx" = ( @@ -49222,7 +49222,7 @@ /area/f13/brotherhood/surface) "uZd" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/rods/fifty, /turf/open/floor/f13/wood, /area/f13/village) diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Dungeons.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Dungeons.dmm index 0bb5c2a0ecb..3a2140a9d97 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Dungeons.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Dungeons.dmm @@ -8542,7 +8542,7 @@ /area/f13/vault) "gFD" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/structure/lattice{ layer = 3 }, @@ -12422,7 +12422,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark, /area/f13/enclave) "jRw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/effect/turf_decal/stripes/box, /turf/open/floor/f13{ @@ -13364,7 +13364,7 @@ /area/f13/brotherhood/rnd) "kGM" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/turf_decal/stripes/white/end, /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/enclave) diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset - Copy.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset - Copy.dmm index 3ced7628415..657ce04cada 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset - Copy.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset - Copy.dmm @@ -2743,7 +2743,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -76397,7 +76397,7 @@ }, /area/f13/building/abandoned) "qPw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -79790,7 +79790,7 @@ /area/f13/ruins) "rOp" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, @@ -92880,7 +92880,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( @@ -100407,7 +100407,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xtS" = ( diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper - Copy.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper - Copy.dmm index 9f034aa866a..d0a68020ed9 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper - Copy.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper - Copy.dmm @@ -7332,7 +7332,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper.dmm index 0a9f2a81a3a..357b252f777 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset-Upper.dmm @@ -7332,7 +7332,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset.dmm index 22b64ff03aa..df43d360ded 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/Pahrump-Sunset.dmm @@ -2743,7 +2743,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -76397,7 +76397,7 @@ }, /area/f13/building/abandoned) "qPw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -79790,7 +79790,7 @@ /area/f13/ruins) "rOp" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, @@ -92880,7 +92880,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( @@ -100407,7 +100407,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xtS" = ( diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (2).dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (2).dmm index d3825c1f0e3..db27d90e514 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (2).dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (2).dmm @@ -2751,7 +2751,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -76403,7 +76403,7 @@ }, /area/f13/building/abandoned) "qPw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -79790,7 +79790,7 @@ /area/f13/ruins) "rOp" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, @@ -92861,7 +92861,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( @@ -100406,7 +100406,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xtS" = ( diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (3).dmm b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (3).dmm index 9d90e2880b4..9a9aea604cb 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (3).dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Nash 3.0 WIP/catle nash (3).dmm @@ -7335,7 +7335,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Lower.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Lower.dmm index 2fdd40bed73..932a4ac26c4 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Lower.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Lower.dmm @@ -269,7 +269,7 @@ }, /area/f13/building/sewers) "aij" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -743,7 +743,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/tunnel) "aDN" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "aEe" = ( @@ -9920,7 +9920,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust{ color = "#363636" }, @@ -20316,7 +20316,7 @@ }, /area/f13/building/sewers) "nND" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/spawner/lootdrop/f13/blueprintLowPartsWeighted, /obj/effect/spawner/lootdrop/f13/weapon/gun/ballistic/highmid, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, @@ -21027,7 +21027,7 @@ /turf/open/indestructible/ground/inside/subway, /area/f13/building/sewers) "otS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "oud" = ( @@ -21245,7 +21245,7 @@ /turf/open/floor/plating/tunnel, /area/f13/caves) "oDZ" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/ore/blackpowder/fifty, /obj/item/stack/ore/blackpowder/fifty, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, @@ -27775,7 +27775,7 @@ }, /area/f13/caves) "tSC" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark{ icon_state = "darkrusty" }, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Upper.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Upper.dmm index a2a09c83de3..b62b3931b9e 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Upper.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset-Upper.dmm @@ -5468,7 +5468,7 @@ /turf/open/floor/f13/wood, /area/f13/building/mall) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset.dmm b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset.dmm index e8c67cdd7ef..ffdeecd685f 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/Pahrump-Sunset.dmm @@ -2970,7 +2970,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -61302,7 +61302,7 @@ /area/f13/building/abandoned) "qPw" = ( /obj/effect/spawner/lootdrop/f13/weapon/gun/ammo/tier3, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -72664,7 +72664,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( @@ -77832,7 +77832,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xuj" = ( diff --git a/_maps/map_files/Pahrump-Sunset - Backup/RedRiver.dmm b/_maps/map_files/Pahrump-Sunset - Backup/RedRiver.dmm index f970c6871e5..e033c96c722 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/RedRiver.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/RedRiver.dmm @@ -25218,7 +25218,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "oNI" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/structure/sign/poster/contraband/pinup_couch{ pixel_x = -32 }, diff --git a/_maps/map_files/Pahrump-Sunset - Backup/RockSprings.dmm b/_maps/map_files/Pahrump-Sunset - Backup/RockSprings.dmm index 666a835cc33..66cfe4d1675 100644 --- a/_maps/map_files/Pahrump-Sunset - Backup/RockSprings.dmm +++ b/_maps/map_files/Pahrump-Sunset - Backup/RockSprings.dmm @@ -24054,7 +24054,7 @@ /turf/open/floor/wood_common, /area/f13/building) "lyV" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/spawner/lootdrop/f13/weapon/gun/ballistic/mid, /obj/structure/sign/poster/contraband/revolver{ pixel_y = 32 @@ -29657,7 +29657,7 @@ /area/f13/building) "ose" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "osn" = ( @@ -45857,7 +45857,7 @@ "wlG" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/item/stack/rods/fifty, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "wlN" = ( diff --git a/_maps/map_files/Temp Map Storage/Dungeons -outdated.dmm b/_maps/map_files/Temp Map Storage/Dungeons -outdated.dmm index e0c3ef30a68..dd798b22b74 100644 --- a/_maps/map_files/Temp Map Storage/Dungeons -outdated.dmm +++ b/_maps/map_files/Temp Map Storage/Dungeons -outdated.dmm @@ -17167,7 +17167,7 @@ /turf/open/floor/carpet/black, /area/f13/vault) "reQ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust{ name = "metal plating" }, diff --git a/_maps/map_files/Temp Map Storage/Pahrump-Sunset - Outdated.dmm b/_maps/map_files/Temp Map Storage/Pahrump-Sunset - Outdated.dmm index 1768a16d0a3..c117c94d31c 100644 --- a/_maps/map_files/Temp Map Storage/Pahrump-Sunset - Outdated.dmm +++ b/_maps/map_files/Temp Map Storage/Pahrump-Sunset - Outdated.dmm @@ -7490,7 +7490,7 @@ /area/f13/caves) "dgD" = ( /obj/effect/spawner/lootdrop/f13/weapon/gun/ammo/tier3, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -9271,7 +9271,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vault1, /area/f13/building) "dRT" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -12820,7 +12820,7 @@ /obj/machinery/light{ dir = 4 }, -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/building) "fnE" = ( @@ -16480,7 +16480,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/village) "gLG" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/machinery/light/small{ dir = 8 }, @@ -16810,7 +16810,7 @@ }, /area/f13/wasteland) "gSx" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust{ color = "#363636" }, @@ -22485,7 +22485,7 @@ dir = 8 }, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood{ icon_state = "housewood2" }, @@ -34875,7 +34875,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/building) "ovg" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/sheet/metal, /turf/open/floor/f13/wood, /area/f13/building) @@ -42822,7 +42822,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "rWL" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building) "rWN" = ( @@ -47795,7 +47795,7 @@ /turf/open/floor/f13, /area/f13/building) "udt" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/village) "udx" = ( @@ -49952,7 +49952,7 @@ /area/f13/brotherhood/surface) "uZd" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/rods/fifty, /turf/open/floor/f13/wood, /area/f13/village) diff --git a/_maps/map_files/Temp Map Storage/Pahrump-Sunset-Lower - Outdated.dmm b/_maps/map_files/Temp Map Storage/Pahrump-Sunset-Lower - Outdated.dmm index 217d0c0897a..0b228443903 100644 --- a/_maps/map_files/Temp Map Storage/Pahrump-Sunset-Lower - Outdated.dmm +++ b/_maps/map_files/Temp Map Storage/Pahrump-Sunset-Lower - Outdated.dmm @@ -8900,7 +8900,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/rarewhite, /area/f13/brotherhood/dorms) "eOl" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -15435,7 +15435,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/brotherhood/leisure) "iMa" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/stack/ore/blackpowder/five, @@ -15796,7 +15796,7 @@ /area/f13/tunnel) "iWI" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/turf_decal/stripes/white/end, /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/enclave) @@ -16131,7 +16131,7 @@ }, /area/f13/brotherhood/reactor) "jgL" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/spawner/lootdrop/f13/blueprintLowPartsWeighted, /obj/effect/spawner/lootdrop/f13/weapon/gun/ballistic/highmid, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, @@ -17901,7 +17901,7 @@ }, /area/f13/brotherhood/leisure) "kos" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /area/f13/caves) "koC" = ( /obj/machinery/porta_turret/syndicate/vehicle_turret{ @@ -18302,7 +18302,7 @@ }, /area/f13/caves) "kBo" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_one, @@ -20222,7 +20222,7 @@ /turf/open/floor/plasteel/f13/vault_floor/plating, /area/f13/brotherhood/medical) "lLu" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /area/f13/building) "lLG" = ( /obj/structure/table, @@ -26793,7 +26793,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/bunker) "pZt" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "pZv" = ( @@ -30923,7 +30923,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust{ color = "#363636" }, @@ -32231,7 +32231,7 @@ /area/f13/tunnel) "tmc" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /area/f13/building) "tmf" = ( /obj/structure/flora/junglebush/c, @@ -33193,7 +33193,7 @@ /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "tOM" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/effect/turf_decal/stripes/box, /turf/open/floor/f13{ @@ -33647,7 +33647,7 @@ }, /area/f13/caves) "ugQ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid{ icon_state = "darkdirtysolid" }, diff --git a/_maps/map_files/coyote_bayou/Ashdown-Upper.dmm b/_maps/map_files/coyote_bayou/Ashdown-Upper.dmm index e8814583887..12f296d718a 100644 --- a/_maps/map_files/coyote_bayou/Ashdown-Upper.dmm +++ b/_maps/map_files/coyote_bayou/Ashdown-Upper.dmm @@ -6539,7 +6539,7 @@ "Vl" = ( /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/workshop/ashdown) "Vp" = ( diff --git a/_maps/map_files/coyote_bayou/Ashdown.dmm b/_maps/map_files/coyote_bayou/Ashdown.dmm index 6a003686061..9c7cb64df7a 100644 --- a/_maps/map_files/coyote_bayou/Ashdown.dmm +++ b/_maps/map_files/coyote_bayou/Ashdown.dmm @@ -10282,8 +10282,6 @@ /obj/item/ammo_box/c10mm/improvised, /obj/item/ammo_box/c45/improvised, /obj/item/ammo_box/m44box/improvised, -/obj/item/ammo_box/shotgun/improvised, -/obj/item/ammo_box/shotgun/improvised, /obj/effect/decal/cleanable/dirt, /obj/effect/spawner/lootdrop/f13/uncommon, /turf/open/floor/f13/wood, @@ -33649,7 +33647,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "oNI" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/structure/sign/poster/contraband/pinup_couch{ pixel_x = -32 }, diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper-2.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper-2.dmm index ba652e383ed..7ecc6afb75f 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper-2.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper-2.dmm @@ -6647,7 +6647,7 @@ /turf/open/floor/plasteel/f13/vault_floor/white, /area/f13/building/hospital) "yh" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "yi" = ( diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper.dmm index 74605811da1..0b9fc869e65 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana-Upper.dmm @@ -16099,7 +16099,7 @@ /turf/open/floor/carpet/arcade, /area/f13/bar/nash) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, @@ -45351,7 +45351,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/building) "wZx" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/f13/wood, /area/f13/building) diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana.dmm index 922d1e5463c..187bbedd620 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Nash_and_Texarkana.dmm @@ -2801,7 +2801,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -31070,7 +31070,7 @@ }, /area/f13/wasteland/city) "dFw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "floorrusty" }, @@ -53707,7 +53707,7 @@ /obj/machinery/light/broken{ dir = 8 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/sheet/metal/ten, /obj/item/stack/ore/blackpowder/twenty, /turf/open/floor/plasteel/f13/vault_floor/red/white, @@ -87890,7 +87890,7 @@ color = "#A47449"; dir = 8 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, @@ -90138,7 +90138,7 @@ /turf/open/floor/plasteel/vault, /area/f13/building/abandoned) "qPw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -93219,7 +93219,7 @@ }, /area/f13/wasteland/city) "rAw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/ore/blackpowder/fifty, /obj/item/stack/ore/blackpowder/fifty, /turf/open/floor/wood_common{ @@ -110373,7 +110373,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqw" = ( @@ -119487,7 +119487,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xtS" = ( diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Newboston-Upper.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Newboston-Upper.dmm index 4a02de7a38e..2df06dc7e4e 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Newboston-Upper.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Newboston-Upper.dmm @@ -2454,7 +2454,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland) "uU" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ dir = 4; icon_state = "yellowsiding" diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Newboston.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Newboston.dmm index d712bb4086a..0a112858e28 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Newboston.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Newboston.dmm @@ -3547,7 +3547,7 @@ }, /area/f13/wasteland) "cKo" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/outside/sidewalk, /area/f13/wasteland) "cKD" = ( @@ -4949,7 +4949,7 @@ }, /area/f13/followers) "dNR" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -5843,7 +5843,7 @@ }, /area/f13/followers) "ewL" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building) "ewW" = ( @@ -6089,7 +6089,7 @@ color = "#A47449"; dir = 8 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/building/workshop/nash) "eFL" = ( @@ -9898,7 +9898,7 @@ /turf/closed/wall/r_wall/rust, /area/f13/wasteland) "hwp" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood{ icon_state = "housewood2" }, @@ -12312,7 +12312,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/building) "jdo" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/locked_box/weapon/ammo/tier1, /turf/open/floor/f13{ icon_state = "bluedirtychess2" @@ -19680,7 +19680,7 @@ /area/f13/building) "oqg" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /turf/open/floor/f13{ dir = 10; @@ -19836,7 +19836,7 @@ }, /area/f13/building) "ovZ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -22229,7 +22229,7 @@ /turf/open/indestructible/ground/outside/sidewalk, /area/f13/wasteland) "qpD" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, diff --git a/_maps/map_files/coyote_bayou/Backup Nash/Texarkana_underground.dmm b/_maps/map_files/coyote_bayou/Backup Nash/Texarkana_underground.dmm index bdee2437e10..d90e4be81ba 100644 --- a/_maps/map_files/coyote_bayou/Backup Nash/Texarkana_underground.dmm +++ b/_maps/map_files/coyote_bayou/Backup Nash/Texarkana_underground.dmm @@ -358,7 +358,7 @@ }, /area/f13/building/sewers) "aij" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -1068,7 +1068,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/tunnel) "aDN" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "aEe" = ( @@ -10714,7 +10714,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt{ color = "#363636" }, @@ -24638,7 +24638,7 @@ }, /area/f13/building/sewers) "nND" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/caves) "nNJ" = ( @@ -25596,7 +25596,7 @@ /turf/open/floor/wood_common, /area/f13/building) "otS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "oul" = ( @@ -34971,7 +34971,7 @@ }, /area/f13/caves) "tSC" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark{ icon_state = "darkrusty" }, diff --git a/_maps/map_files/coyote_bayou/Dungeons.dmm b/_maps/map_files/coyote_bayou/Dungeons.dmm index 5494ffcaac3..9da19e68ebf 100644 --- a/_maps/map_files/coyote_bayou/Dungeons.dmm +++ b/_maps/map_files/coyote_bayou/Dungeons.dmm @@ -2035,7 +2035,7 @@ }, /area/f13/underground/cave) "aSe" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust{ name = "metal plating" }, @@ -10125,7 +10125,6 @@ "eqZ" = ( /obj/structure/rack, /obj/effect/turf_decal/bot, -/obj/item/ammo_box/shotgun/buck, /obj/effect/spawner/lootdrop/f13/uncommon, /obj/effect/spawner/lootdrop/f13/uncommon, /obj/effect/spawner/lootdrop/f13/uncommon, @@ -13767,8 +13766,6 @@ /obj/structure/table, /obj/item/stamp/hos, /obj/item/gun/ballistic/shotgun/trench, -/obj/item/ammo_box/shotgun/bean, -/obj/item/ammo_box/shotgun/bean, /turf/open/floor/carpet/black, /area/f13/vault) "fXa" = ( @@ -21581,7 +21578,6 @@ /area/f13/vault) "jEY" = ( /obj/structure/table/reinforced, -/obj/item/ammo_box/shotgun/buck, /obj/effect/turf_decal/stripes/red/full, /obj/structure/window/reinforced/spawner, /obj/structure/window/reinforced/spawner/west, @@ -23790,7 +23786,7 @@ /area/f13/brotherhood/rnd) "kGM" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/turf_decal/stripes/white/end, /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/enclave) @@ -40778,7 +40774,7 @@ /area/f13/brotherhood/leisure) "scW" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/structure/lattice{ layer = 3 }, @@ -49516,14 +49512,6 @@ /obj/effect/validball_spawner, /turf/open/floor/f13/wood, /area/f13/bunker) -"was" = ( -/obj/structure/rack, -/obj/item/ammo_box/shotgun/buck, -/obj/effect/spawner/lootdrop/f13/rare, -/turf/open/floor/f13{ - icon_state = "darkdirty" - }, -/area/f13/bunker) "wau" = ( /obj/structure/chair/office/dark{ dir = 8 @@ -56096,7 +56084,7 @@ qUU lzR lzR lzR -was +giY qEZ esJ qEZ diff --git a/_maps/map_files/coyote_bayou/Fenny would never make another map/Center WIP.dmm b/_maps/map_files/coyote_bayou/Fenny would never make another map/Center WIP.dmm index c90e3e95825..972389c8f23 100644 --- a/_maps/map_files/coyote_bayou/Fenny would never make another map/Center WIP.dmm +++ b/_maps/map_files/coyote_bayou/Fenny would never make another map/Center WIP.dmm @@ -4292,7 +4292,7 @@ /turf/closed/wall/f13/wood, /area/f13/building/church) "QX" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/ore/blackpowder/fifty, /obj/item/stack/ore/blackpowder/fifty, /turf/open/floor/wood_common{ diff --git a/_maps/map_files/coyote_bayou/Garland-City.dmm b/_maps/map_files/coyote_bayou/Garland-City.dmm index a9700a8b2d8..78e4eeb2e09 100644 --- a/_maps/map_files/coyote_bayou/Garland-City.dmm +++ b/_maps/map_files/coyote_bayou/Garland-City.dmm @@ -5503,7 +5503,6 @@ }, /area/f13/building) "eiS" = ( -/obj/item/ammo_casing/shotgun/buckshot, /obj/structure/nest/randomized{ randomizer_difficulty = 3; randomizer_kind = "mid level mobs"; @@ -5812,12 +5811,6 @@ /obj/effect/decal/cleanable/dirt, /turf/open/floor/f13/wood, /area/f13/caves) -"euF" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/turf/open/floor/f13{ - icon_state = "floorrusty" - }, -/area/f13/building) "euQ" = ( /obj/effect/decal/remains{ icon_state = "remains" @@ -11924,7 +11917,6 @@ /area/f13/building) "jeU" = ( /obj/structure/table, -/obj/item/ammo_casing/shotgun/buckshot, /obj/item/clothing/head/beret, /obj/item/clothing/ears/earmuffs, /turf/open/floor/f13{ @@ -12660,18 +12652,6 @@ icon_state = "horizontaltopbordertop1" }, /area/f13/wasteland) -"jMs" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/decal/cleanable/dirt, -/obj/structure/nest/randomized{ - randomizer_difficulty = 3; - randomizer_kind = "mid level mobs"; - randomizer_tag = "garland city police" - }, -/turf/open/floor/f13{ - icon_state = "floorrusty" - }, -/area/f13/building) "jMt" = ( /obj/structure/window/fulltile/house, /obj/structure/window/fulltile/house, @@ -14807,7 +14787,7 @@ /turf/open/indestructible/ground/inside/dirt, /area/f13/caves) "lqZ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "darkrustysolid" }, @@ -19883,7 +19863,6 @@ /area/f13/wasteland) "pbs" = ( /obj/structure/table, -/obj/item/ammo_casing/shotgun/buckshot, /obj/item/clothing/head/beret, /obj/item/clothing/ears/earmuffs, /obj/effect/spawner/lootdrop/f13/uncommon, @@ -21481,7 +21460,7 @@ }, /area/f13/building) "qmy" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/city) "qmC" = ( @@ -21572,7 +21551,7 @@ /obj/effect/decal/cleanable/dirt{ color = "#363636" }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/machinery/light/small{ dir = 1 }, @@ -28504,13 +28483,6 @@ icon_state = "housewood2" }, /area/f13/building) -"vEF" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/spawner/lootdrop/f13/uncommon, -/turf/open/floor/f13{ - icon_state = "floorrusty" - }, -/area/f13/building) "vFj" = ( /obj/effect/decal/cleanable/dirt, /turf/closed/mineral/random/high_chance, @@ -31461,7 +31433,7 @@ }, /area/f13/building) "xSS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -51146,7 +51118,7 @@ uhp tvr taP xbi -jMs +ran sBo wTd cnJ @@ -51401,8 +51373,8 @@ tvr slD piZ nhe -vEF -euF +oyf +juh aDl cxE uPg @@ -51658,7 +51630,7 @@ tvr nTg oqn tvr -euF +juh ran juh tvr @@ -53321,7 +53293,7 @@ juh npl npl qSw -euF +juh juh hIG glj @@ -53572,7 +53544,7 @@ tKh glj cnJ eUE -euF +juh cxE juh cdg @@ -85804,7 +85776,7 @@ jGm tvr juh vef -euF +juh tvr izO hfy @@ -86059,7 +86031,7 @@ kKq keg uhp nhe -euF +juh eiS juh mzE @@ -86316,7 +86288,7 @@ kKq wjB oqn tvr -euF +juh juh juh tvr diff --git a/_maps/map_files/coyote_bayou/Legacy Storage/Castle Nash.dmm b/_maps/map_files/coyote_bayou/Legacy Storage/Castle Nash.dmm index 4e4b50031b3..7487e5fcd87 100644 --- a/_maps/map_files/coyote_bayou/Legacy Storage/Castle Nash.dmm +++ b/_maps/map_files/coyote_bayou/Legacy Storage/Castle Nash.dmm @@ -2165,7 +2165,7 @@ /area/f13/wasteland) "gC" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, diff --git a/_maps/map_files/coyote_bayou/Legacy Storage/[wip]_mapping_resources.dmm b/_maps/map_files/coyote_bayou/Legacy Storage/[wip]_mapping_resources.dmm index b40e5f05740..28776e5b2b2 100644 --- a/_maps/map_files/coyote_bayou/Legacy Storage/[wip]_mapping_resources.dmm +++ b/_maps/map_files/coyote_bayou/Legacy Storage/[wip]_mapping_resources.dmm @@ -2933,7 +2933,7 @@ /turf/open/floor/wood_common, /area/f13/wasteland) "bAf" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/ore/blackpowder/fifty, /obj/item/stack/ore/blackpowder/fifty, /turf/open/floor/wood_common{ @@ -19293,7 +19293,7 @@ }, /area/f13/wasteland) "jLa" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/outside/desert, /area/f13/wasteland) "jLb" = ( @@ -22837,7 +22837,7 @@ /turf/open/indestructible/ground/inside/subway, /area/f13/wasteland) "lzQ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "floorrustysolid" }, @@ -26271,7 +26271,7 @@ /turf/open/indestructible/ground/outside/desert, /area/f13/wasteland) "npa" = ( -/obj/machinery/autolathe/ammo/improvised, +/obj/structure/CMLS_ammo_vending_machine/improvised, /turf/open/indestructible/ground/outside/desert, /area/f13/wasteland) "npj" = ( diff --git a/_maps/map_files/coyote_bayou/Legacy Storage/i_hate_fenny.dmm b/_maps/map_files/coyote_bayou/Legacy Storage/i_hate_fenny.dmm index 405be4bbe6a..5d51b64a7db 100644 --- a/_maps/map_files/coyote_bayou/Legacy Storage/i_hate_fenny.dmm +++ b/_maps/map_files/coyote_bayou/Legacy Storage/i_hate_fenny.dmm @@ -26072,7 +26072,7 @@ /area/f13/wasteland) "qcJ" = ( /obj/effect/decal/cleanable/dirt, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common{ color = "#779999" }, diff --git a/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper-2.dmm b/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper-2.dmm index d79e2227b16..6f573409e58 100644 --- a/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper-2.dmm +++ b/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper-2.dmm @@ -6359,7 +6359,7 @@ }, /area/f13/building) "yh" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "yi" = ( diff --git a/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper.dmm b/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper.dmm index 02146492726..2df38750972 100644 --- a/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper.dmm +++ b/_maps/map_files/coyote_bayou/Nash_and_Texarkana-Upper.dmm @@ -4079,7 +4079,7 @@ }, /area/f13/building/massfusion) "dbL" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust{ color = "#e4e4e4" @@ -11521,7 +11521,7 @@ /turf/open/floor/plasteel/dark, /area/f13/building) "idL" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/book/granter/crafting_recipe/gunsmith_one, /obj/item/book/granter/crafting_recipe/gunsmith_three, /obj/item/book/granter/crafting_recipe/gunsmith_two, @@ -18619,10 +18619,6 @@ /area/f13/building/hospital) "mBR" = ( /obj/structure/rack/shelf_metal, -/obj/item/ammo_box/shotgun/slug, -/obj/item/ammo_box/shotgun/slug, -/obj/item/ammo_box/shotgun/bean, -/obj/item/ammo_box/shotgun/bean, /obj/effect/turf_decal/stripes/white/box, /obj/effect/spawner/lootdrop/f13/rare, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, diff --git a/_maps/map_files/coyote_bayou/Nash_and_Texarkana.dmm b/_maps/map_files/coyote_bayou/Nash_and_Texarkana.dmm index 2c4059d81cd..8fc28f3c502 100644 --- a/_maps/map_files/coyote_bayou/Nash_and_Texarkana.dmm +++ b/_maps/map_files/coyote_bayou/Nash_and_Texarkana.dmm @@ -2572,7 +2572,7 @@ /turf/open/indestructible/ground/outside/dirt, /area/f13/wasteland/city) "akS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/mountain, /area/f13/caves) "akT" = ( @@ -5982,12 +5982,6 @@ icon_state = "horizontaltopborderbottom2left" }, /area/f13/wasteland/city/nash/theloop) -"axP" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/turf/open/indestructible/ground/outside/road{ - icon_state = "horizontaltopborderbottom0" - }, -/area/f13/wasteland/city/nash/theloop) "axQ" = ( /obj/structure/window/fulltile/house{ dir = 2; @@ -6961,7 +6955,7 @@ }, /area/f13/ruins) "aBx" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/machinery/light/small/broken, /turf/open/floor/f13/wood{ icon_state = "housewood2" @@ -10859,11 +10853,6 @@ icon_state = "horizontaltopborderbottom2right" }, /area/f13/wasteland/city/nash/downtown) -"aPt" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/decal/cleanable/dirt/dust, -/turf/open/indestructible/ground/outside/desert, -/area/f13/wasteland/city/nash/downtown) "aPu" = ( /obj/structure/car/rubbish3, /turf/open/indestructible/ground/outside/road{ @@ -11023,12 +11012,6 @@ icon_state = "innermaincornerinner - W" }, /area/f13/wasteland/city/nash/downtown) -"aPU" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/decal/cleanable/dirt/dust, -/obj/structure/spacevine, -/turf/open/indestructible/ground/outside/gravel, -/area/f13/wasteland/city/nash/downtown) "aPV" = ( /obj/item/ammo_casing/c9mm, /obj/structure/barricade/sandbags, @@ -11398,7 +11381,6 @@ anchored = 1 }, /obj/machinery/light, -/obj/item/ammo_box/shotgun/bean, /obj/effect/spawner/lootdrop/f13/uncommon, /obj/effect/spawner/lootdrop/f13/rare_parts, /obj/effect/spawner/lootdrop/f13/rare_parts, @@ -26561,7 +26543,7 @@ }, /area/f13/wasteland/city) "dFw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "floorrusty" }, @@ -45105,7 +45087,7 @@ /obj/machinery/light/broken{ dir = 8 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/sheet/metal/ten, /obj/item/stack/ore/blackpowder/twenty, /turf/open/floor/plasteel/f13/vault_floor/red/white, @@ -74272,12 +74254,6 @@ /obj/structure/flora/ausbushes/grassybush, /turf/open/indestructible/ground/outside/desert, /area/f13/wasteland/city) -"qAd" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/turf/open/indestructible/ground/outside/road{ - icon_state = "horizontalinnermain2left" - }, -/area/f13/wasteland/massfusion/entrance) "qAe" = ( /obj/structure/flora/rock/pile/largejungle{ icon_state = "bush3"; @@ -75406,7 +75382,7 @@ /turf/open/floor/plasteel/vault, /area/f13/building/abandoned) "qPw" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "bluerustysolid" }, @@ -91780,7 +91756,7 @@ /turf/open/floor/plasteel/f13/vault_floor/misc/cafeteria, /area/f13/building/hospital) "vqq" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "vqy" = ( @@ -92497,8 +92473,6 @@ /area/f13/wasteland/coyote/nash/southeastcornercamp) "vAk" = ( /obj/structure/table/wasteland, -/obj/item/ammo_box/shotgun/bean, -/obj/item/ammo_box/shotgun/bean, /obj/item/gun/ballistic/shotgun/hunting, /turf/open/floor/f13{ icon_state = "floorrusty" @@ -99187,7 +99161,7 @@ "xtP" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building/abandoned) "xtS" = ( @@ -137839,7 +137813,7 @@ gVf fBN eRU dZM -aPU +dRC aBe rbH hCc @@ -140150,7 +140124,7 @@ kPa kPa jPv rSY -aPt +kPa yag pJW pnF @@ -151150,7 +151124,7 @@ aOk nHY lmE axr -axP +gQR wUx chZ uvd @@ -154209,7 +154183,7 @@ ldJ aUQ oKR pYa -qAd +cIy kwY hsJ odj diff --git a/_maps/map_files/coyote_bayou/Newboston.dmm b/_maps/map_files/coyote_bayou/Newboston.dmm index 1119fc1143b..7bce59144b8 100644 --- a/_maps/map_files/coyote_bayou/Newboston.dmm +++ b/_maps/map_files/coyote_bayou/Newboston.dmm @@ -6782,7 +6782,7 @@ /turf/open/floor/f13/wood, /area/f13/village) "dNR" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -7933,7 +7933,7 @@ /turf/closed/mineral/random/low_chance, /area/f13/caves) "ewL" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood, /area/f13/building) "ewW" = ( @@ -13679,7 +13679,7 @@ }, /area/f13/wasteland/city/newboston/outdoors) "hwp" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13/wood{ icon_state = "housewood2" }, @@ -15494,7 +15494,7 @@ /area/f13/building) "iyT" = ( /obj/structure/table/wood/settler, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/stack/ore/blackpowder/fifty, /obj/item/stack/ore/blackpowder/fifty, /turf/open/floor/wood_common, @@ -16629,7 +16629,7 @@ /turf/open/floor/f13/wood, /area/f13/building) "jdo" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/item/locked_box/weapon/ammo/tier1, /turf/open/floor/f13{ icon_state = "bluedirtychess2" @@ -26656,7 +26656,7 @@ /area/f13/building/abandoned) "oqg" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/f13{ dir = 10; @@ -26804,7 +26804,7 @@ }, /area/f13/building) "ovZ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -30119,7 +30119,7 @@ /turf/closed/indestructible/f13/matrix, /area/f13/building/workshop/nash) "qpD" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_two, /obj/item/book/granter/crafting_recipe/gunsmith_three, @@ -37276,12 +37276,6 @@ icon_state = "horizontaltopbordertop0" }, /area/f13/wasteland/city/newboston/outdoors) -"uhO" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/decal/cleanable/dirt/dust, -/obj/effect/decal/cleanable/dirt/dust, -/turf/open/floor/f13/wood, -/area/f13/building) "uhX" = ( /obj/structure/table/wasteland, /obj/item/kirbyplants{ @@ -41222,7 +41216,7 @@ }, /area/f13/building) "wrQ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "wse" = ( @@ -82290,7 +82284,7 @@ aoT aoT rYO uAa -uhO +aoT aMU aMU xaJ diff --git a/_maps/map_files/coyote_bayou/Redwater.dmm b/_maps/map_files/coyote_bayou/Redwater.dmm index e6329d201cd..e134b69be3e 100644 --- a/_maps/map_files/coyote_bayou/Redwater.dmm +++ b/_maps/map_files/coyote_bayou/Redwater.dmm @@ -29642,7 +29642,7 @@ /area/f13/building) "leP" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/machinery/light/small{ dir = 1 }, @@ -37876,7 +37876,7 @@ /area/f13/building) "ose" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "osn" = ( @@ -48352,7 +48352,7 @@ }, /area/f13/building) "sjZ" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/f13{ icon_state = "darkrustysolid" }, @@ -58866,7 +58866,7 @@ "wlG" = ( /obj/effect/decal/cleanable/dirt/dust, /obj/item/stack/rods/fifty, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/wood_common, /area/f13/building) "wlN" = ( diff --git a/_maps/map_files/coyote_bayou/Texarkana_underground.dmm b/_maps/map_files/coyote_bayou/Texarkana_underground.dmm index 7678ee0fa47..3eeb7b746d3 100644 --- a/_maps/map_files/coyote_bayou/Texarkana_underground.dmm +++ b/_maps/map_files/coyote_bayou/Texarkana_underground.dmm @@ -306,7 +306,7 @@ }, /area/f13/building/sewers) "aij" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /obj/item/book/granter/crafting_recipe/gunsmith_four, /turf/open/floor/f13{ @@ -884,7 +884,7 @@ /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid, /area/f13/tunnel) "aDN" = ( -/obj/machinery/autolathe/ammo/unlocked_basic, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) "aEe" = ( @@ -3427,12 +3427,6 @@ /mob/living/simple_animal/hostile/ghoul, /turf/open/floor/plasteel/f13/vault_floor/yellow, /area/f13/tunnel) -"bMy" = ( -/obj/item/ammo_casing/shotgun/buckshot, -/obj/effect/decal/cleanable/dirt/dust, -/obj/effect/decal/cleanable/dirt/dust, -/turf/open/floor/plasteel/f13/vault_floor/yellow, -/area/f13/tunnel) "bMz" = ( /obj/machinery/light/small{ dir = 8; @@ -4174,7 +4168,6 @@ "bQh" = ( /obj/structure/rack, /obj/item/gun/ballistic/shotgun/trench, -/obj/item/ammo_box/shotgun/slug, /turf/open/floor/plasteel/f13/vault_floor/red{ icon_state = "reddirtyfull" }, @@ -5985,10 +5978,6 @@ icon_state = "purplefull" }, /area/f13/caves) -"cEo" = ( -/obj/item/ammo_casing/shotgun/improvised, -/turf/open/floor/plasteel/freezer, -/area/f13/caves) "cEI" = ( /obj/machinery/washing_machine, /turf/open/floor/f13{ @@ -6512,12 +6501,6 @@ "dbi" = ( /obj/structure/rack, /obj/effect/turf_decal/bot, -/obj/item/ammo_box/shotgun/buck, -/obj/item/ammo_box/shotgun/buck, -/obj/item/ammo_box/shotgun/buck, -/obj/item/ammo_box/shotgun/buck, -/obj/item/ammo_box/shotgun/bean, -/obj/item/ammo_box/shotgun/bean, /turf/open/floor/plasteel/darkred/side{ dir = 10 }, @@ -6762,7 +6745,6 @@ /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "dmm" = ( -/obj/item/ammo_casing/shotgun/buckshot, /obj/structure/wreck/trash/engine, /turf/open/floor/plasteel/f13/vault_floor/yellow, /area/f13/tunnel) @@ -9367,7 +9349,7 @@ /obj/effect/turf_decal/stripes/line{ dir = 1 }, -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /obj/effect/decal/cleanable/dirt/dust, /turf/open/floor/plasteel/darkred/side{ dir = 6 @@ -10546,7 +10528,6 @@ /area/f13/building) "ggk" = ( /obj/structure/table, -/obj/item/ammo_box/shotgun/slug, /obj/item/gun/ballistic/revolver/caravan_shotgun, /turf/open/floor/plasteel/f13/vault_floor/dark/darksolid{ icon_state = "darkdirtysolid" @@ -11888,7 +11869,7 @@ /turf/open/floor/plating/tunnel, /area/f13/caves) "hbA" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/building) "hbF" = ( @@ -18179,13 +18160,6 @@ }, /turf/open/indestructible/ground/inside/subway, /area/f13/tunnel) -"lxU" = ( -/obj/effect/decal/fakelattice, -/obj/item/ammo_casing/shotgun/improvised, -/turf/open/floor/plating/tunnel{ - icon_state = "tunnelrusty" - }, -/area/f13/caves) "lxV" = ( /turf/open/floor/plasteel/freezer, /area/f13/caves) @@ -20957,7 +20931,6 @@ /area/f13/tunnel) "nsW" = ( /obj/effect/decal/cleanable/dirt/dust, -/obj/item/ammo_casing/shotgun/improvised, /obj/machinery/porta_turret/syndicate/vehicle_turret{ desc = "An improvised ballistic turret - it looks exceptionally shoddy, yet stil functional. Safe to assume it's a repaired security system from whatever this place once was"; faction = list("raider"); @@ -21520,7 +21493,7 @@ }, /area/f13/building/sewers) "nND" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, /area/f13/caves) "nNJ" = ( @@ -22363,7 +22336,7 @@ /turf/open/floor/wood_common, /area/f13/building) "otS" = ( -/obj/machinery/autolathe/ammo, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/indestructible/ground/inside/subway, /area/f13/caves) "oul" = ( @@ -30436,7 +30409,6 @@ "tPZ" = ( /obj/structure/table/wood/settler, /obj/item/twohanded/legionaxe, -/obj/item/ammo_box/shotgun/incendiary, /turf/open/floor/f13{ icon_state = "greenrustyfull" }, @@ -30495,7 +30467,7 @@ }, /area/f13/caves) "tSC" = ( -/obj/machinery/autolathe/ammo/unlocked, +/obj/structure/CMLS_ammo_vending_machine, /turf/open/floor/plasteel/f13/vault_floor/dark{ icon_state = "darkrusty" }, @@ -31264,11 +31236,6 @@ icon_state = "darkrustysolid" }, /area/f13/tunnel) -"uzn" = ( -/obj/machinery/light/broken, -/obj/item/ammo_casing/shotgun/improvised, -/turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust, -/area/f13/caves) "uzo" = ( /obj/effect/spawner/lootdrop/trash, /obj/effect/decal/cleanable/dirt/dust, @@ -72253,7 +72220,7 @@ uEV aaA vxA pBn -lxU +rFR bCG aaa aak @@ -73543,7 +73510,7 @@ aaA ifg aaA pTg -cEo +lxV pzk ffU xXl @@ -74306,7 +74273,7 @@ uEV hHu hHu uEV -uzn +eNE aaA onl hHu @@ -75676,7 +75643,7 @@ bIj ceQ qjR ceQ -bMy +sxN wAv bSG boU diff --git a/code/__DEFINES/ammo.dm b/code/__DEFINES/ammo.dm index 0fdf998a342..d097c12a4cb 100644 --- a/code/__DEFINES/ammo.dm +++ b/code/__DEFINES/ammo.dm @@ -1,6 +1,13 @@ /*ALL DEFINES RELATED TO AMMO GO HERE*/ //Caliber defines +// hi, this is Jaeger, we redid weapon calibers and damage +// reference below +#define CALIBER_COMPACT "compact rounds" +#define CALIBER_MEDIUM "medium rounds" +#define CALIBER_LONG "long rounds" +#define CALIBER_SHOTGUN "shotgun rounds" +// deprecated defines #define CALIBER_22LR ".22LR rounds" #define CALIBER_BEE ".22LR bee rounds" #define CALIBER_MOUSE ".22LR mouseshot rounds" @@ -19,7 +26,7 @@ #define CALIBER_4570 ".45-70 rounds" #define CALIBER_50MG ".50MG rounds" #define CALIBER_2MM "2mmEC gauss slugs" -#define CALIBER_SHOTGUN "12 gauge shells" +#define CALIBER_SHOTGUN_DEPRECATED "12 gauge shells" // added _DEPRECATED #define CALIBER_CASELESS "4.73mm caseless" #define CALIBER_75 ".75 gyrojets" #define CALIBER_195 "1.95mm rounds" @@ -269,3 +276,53 @@ GLOBAL_LIST_INIT(ammo_material_multipliers, list( #define BULLET_IS_SURPLUS 2 #define BULLET_IS_MATCH 3 +/////// LE CORBS + +// ANATOMY OF A CORB STATE +// "[corb]-[suffix]-[part]-[key]" + +#define SUFFIX_FULL "full" // mandatory Full state for icons +#define SUFFIX_EMPTY "empty" // mandatory Empty state for icons +#define SUFFIX_PROJ "projectile" +#define SUFFIX_MAGAZINE_DEFAULT "default" +#define SUFFIX_PARTIAL "partial" + +#define CORB_BULLET "bullet" +#define CORB_BOX "box" +#define CORB_CRATE "crate" +#define CORB_MAGAZINE "magazine" + +#define PART_BROAD "broad" +#define PART_COUNT "count" +#define PART_PERCENT "percent" + +#define BULLET_FULL_STATE "[CORB_BULLET]-[SUFFIX_FULL]" +#define BULLET_EMPTY_STATE "[CORB_BULLET]-[SUFFIX_EMPTY]" +#define BULLET_PROJ_STATE "[CORB_BULLET]-[SUFFIX_PROJ]" +#define BOX_FULL_STATE "[CORB_BOX]-[SUFFIX_FULL]" +#define BOX_EMPTY_STATE "[CORB_BOX]-[SUFFIX_EMPTY]" +#define CRATE_FULL_STATE "[CORB_CRATE]-[SUFFIX_FULL]" +#define CRATE_EMPTY_STATE "[CORB_CRATE]-[SUFFIX_EMPTY]" +#define BOX_PARTIAL_STATE "[CORB_BOX]-[SUFFIX_PARTIAL]-[PART_BROAD]" +#define CRATE_PARTIAL_STATE "[CORB_CRATE]-[SUFFIX_PARTIAL]-[PART_BROAD]" +#define BOX_PARTIAL_COUNT_STATE "[CORB_CRATE]-[SUFFIX_PARTIAL]-[PART_COUNT]" +#define CRATE_PARTIAL_COUNT_STATE "[CORB_CRATE]-[SUFFIX_PARTIAL]-[PART_COUNT]" +#define BOX_PARTIAL_PERCENT_STATE "[CORB_CRATE]-[SUFFIX_PARTIAL]-[PART_PERCENT]" +#define CRATE_PARTIAL_PERCENT_STATE "[CORB_CRATE]-[SUFFIX_PARTIAL]-[PART_PERCENT]" +#define MAGAZINE_FULL_STATE "[CORB_MAGAZINE]-[SUFFIX_FULL]" +#define MAGAZINE_EMPTY_STATE "[CORB_MAGAZINE]-[SUFFIX_EMPTY]" +#define MAGAZINE_PARTIAL_STATE(pfx) "[pfx]-[SUFFIX_PARTIAL]-[PART_BROAD]" +#define MAGAZINE_PARTIAL_COUNT_STATE(pfx) "[pfx]-[SUFFIX_PARTIAL]-[PART_COUNT]" +#define MAGAZINE_PARTIAL_PERCENT_STATE(pfx) "[pfx]-[SUFFIX_PARTIAL]-[PART_PERCENT]" + +#define MAG_TOKEN_MAX_AMMO "%MAXAMMO%" + + +// #define BOX_PARTIAL_COUNT_STATE(count) "[CORB_BOX]-[PART_COUNT]-[count]" +// #define CRATE_PARTIAL_COUNT_STATE(count) "[CORB_CRATE]-[PART_COUNT]-[count]" +// #define BOX_PARTIAL_PERCENT_STATE(percent) "[CORB_BOX]-[PARTIAL_PERCENT]-[percent]" +// #define CRATE_PARTIAL_PERCENT_STATE(percent) "[CORB_CRATE]-[PARTIAL_PERCENT]-[percent]" + + + + diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index d77f42fb724..3c877acb144 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -412,12 +412,16 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define BULLET_RECOIL_RIFLE_SMALL (BULLET_RECOIL_BASE * 1.5) #define BULLET_RECOIL_RIFLE_MEDIUM (BULLET_RECOIL_BASE * 3) #define BULLET_RECOIL_RIFLE_LARGE (BULLET_RECOIL_BASE * 25) -#define BULLET_RECOIL_SHOTGUN (BULLET_RECOIL_BASE * 2) +// #define BULLET_RECOIL_SHOTGUN (BULLET_RECOIL_BASE * 2) // was moved during the CMLSening #define BULLET_RECOIL_GAUSS (BULLET_RECOIL_BASE * 25) #define BULLET_RECOIL_LASER (BULLET_RECOIL_BASE * 1) #define BULLET_RECOIL_HEAVY_LASER (BULLET_RECOIL_BASE * 3) #define BULLET_RECOIL_PLASMA (BULLET_RECOIL_BASE * 5) +#define BULLET_RECOIL_COMPACT (BULLET_RECOIL_BASE * 1) +#define BULLET_RECOIL_MEDIUM (BULLET_RECOIL_BASE * 3) +#define BULLET_RECOIL_LONG (BULLET_RECOIL_BASE * 25) +#define BULLET_RECOIL_SHOTGUN (BULLET_RECOIL_BASE * 2) /// Bullet damage defines /// .22 LR @@ -497,7 +501,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_PISTOL_10MM (BULLET_RECOIL_PISTOL_10MM * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_PISTOL_10MM (BULLET_WOUND_PISTOL_10MM * 2) -#define BULLET_DAMAGE_PISTOL_NEEDLE 16 +#define BULLET_DAMAGE_PISTOL_NEEDLE 30 #define BULLET_DAMAGE_PISTOL_NEEDLE_HANDLOAD (BULLET_DAMAGE_PISTOL_NEEDLE * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_PISTOL_NEEDLE_MATCH (BULLET_DAMAGE_PISTOL_NEEDLE * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_PISTOL_NEEDLE (BULLET_DAMAGE_PISTOL_NEEDLE * 0.5) @@ -516,7 +520,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_PISTOL_NEEDLE (BULLET_RECOIL_PISTOL_NEEDLE * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_PISTOL_NEEDLE (BULLET_WOUND_PISTOL_NEEDLE * 20) -#define BULLET_DAMAGE_PISTOL_38 36 +#define BULLET_DAMAGE_PISTOL_38 30 #define BULLET_DAMAGE_PISTOL_38_HANDLOAD (BULLET_DAMAGE_PISTOL_38 * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_PISTOL_38_MATCH (BULLET_DAMAGE_PISTOL_38 * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_PISTOL_38 (BULLET_DAMAGE_PISTOL_38 * 0.5) @@ -535,7 +539,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_PISTOL_38 (BULLET_RECOIL_PISTOL_38 * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_PISTOL_38 (BULLET_WOUND_PISTOL_38 * 2) -#define BULLET_DAMAGE_PISTOL_44 45 +#define BULLET_DAMAGE_PISTOL_44 30 #define BULLET_DAMAGE_PISTOL_44_HANDLOAD (BULLET_DAMAGE_PISTOL_44 * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_PISTOL_44_MATCH (BULLET_DAMAGE_PISTOL_44 * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_PISTOL_44 (BULLET_DAMAGE_PISTOL_44 * 0.5) @@ -554,7 +558,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_PISTOL_44 (BULLET_RECOIL_PISTOL_44 * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_PISTOL_44 (BULLET_WOUND_PISTOL_44 * 2) -#define BULLET_DAMAGE_PISTOL_14MM 50 +#define BULLET_DAMAGE_PISTOL_14MM 45 #define BULLET_DAMAGE_PISTOL_14MM_HANDLOAD (BULLET_DAMAGE_PISTOL_14MM * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_PISTOL_14MM_MATCH (BULLET_DAMAGE_PISTOL_14MM * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_PISTOL_14MM (BULLET_DAMAGE_PISTOL_14MM * 0.5) @@ -573,7 +577,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_PISTOL_14MM (BULLET_RECOIL_PISTOL_14MM * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_PISTOL_14MM (BULLET_WOUND_PISTOL_14MM * 2) -#define BULLET_DAMAGE_RIFLE_223 36 +#define BULLET_DAMAGE_RIFLE_223 45 #define BULLET_DAMAGE_RIFLE_223_HANDLOAD (BULLET_DAMAGE_RIFLE_223 * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_RIFLE_223_MATCH (BULLET_DAMAGE_RIFLE_223 * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_RIFLE_223 (BULLET_DAMAGE_RIFLE_223 * 0.2) @@ -592,7 +596,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_RIFLE_223 (BULLET_RECOIL_RIFLE_223 * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_RIFLE_223 (BULLET_WOUND_RIFLE_223 * 2) -#define BULLET_DAMAGE_RIFLE_5MM 30 +#define BULLET_DAMAGE_RIFLE_5MM 45 #define BULLET_DAMAGE_RIFLE_5MM_HANDLOAD (BULLET_DAMAGE_RIFLE_5MM * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_RIFLE_5MM_MATCH (BULLET_DAMAGE_RIFLE_5MM * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_RIFLE_5MM (BULLET_DAMAGE_RIFLE_5MM * 0.2) @@ -611,7 +615,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_RIFLE_5MM (BULLET_RECOIL_RIFLE_5MM * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_RIFLE_5MM (BULLET_WOUND_RIFLE_5MM * 2) -#define BULLET_DAMAGE_RIFLE_473 30 +#define BULLET_DAMAGE_RIFLE_473 45 #define BULLET_DAMAGE_RIFLE_473_HANDLOAD (BULLET_DAMAGE_RIFLE_473 * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_RIFLE_473_MATCH (BULLET_DAMAGE_RIFLE_473 * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_RIFLE_473 (BULLET_DAMAGE_RIFLE_473 * 0.2) @@ -630,7 +634,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_RIFLE_473 (BULLET_RECOIL_RIFLE_473 * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_RIFLE_473 (BULLET_WOUND_RIFLE_473 * 2) -#define BULLET_DAMAGE_RIFLE_308 45 +#define BULLET_DAMAGE_RIFLE_308 60 #define BULLET_DAMAGE_RIFLE_308_HANDLOAD (BULLET_DAMAGE_RIFLE_308 * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_RIFLE_308_MATCH (BULLET_DAMAGE_RIFLE_308 * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_RIFLE_308 (BULLET_DAMAGE_RIFLE_308 * 0.5) @@ -687,7 +691,7 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define RUBBERY_RECOIL_RIFLE_3006 (BULLET_RECOIL_RIFLE_3006 * RUBBERY_RECOIL_MULT) #define RUBBERY_WOUND_RIFLE_3006 (BULLET_WOUND_RIFLE_3006 * 4) -#define BULLET_DAMAGE_RIFLE_50MG 75 +#define BULLET_DAMAGE_RIFLE_50MG 60 #define BULLET_DAMAGE_RIFLE_50MG_HANDLOAD (BULLET_DAMAGE_RIFLE_50MG * BULLET_HANDLOAD_MULT_DAMAGE) #define BULLET_DAMAGE_RIFLE_50MG_MATCH (BULLET_DAMAGE_RIFLE_50MG * BULLET_MATCH_MULT_DAMAGE) #define BULLET_STAMINA_RIFLE_50MG (BULLET_DAMAGE_RIFLE_50MG * 0.5) @@ -839,6 +843,62 @@ GLOBAL_LIST_INIT(main_body_parts2words, list( #define BULLET_WOUND_ARROW_EXPLOSIVE 0 #define BULLET_WOUND_ARROW_EXPLOSIVE_NAKED_MULT 0 +// CMLS / Hunt Showdown - ificiation + +#define BULLET_DAMAGE_COMPACT 30 +#define BULLET_DAMAGE_COMPACT_HANDLOAD (BULLET_DAMAGE_COMPACT * BULLET_HANDLOAD_MULT_DAMAGE) +#define BULLET_DAMAGE_COMPACT_MATCH (BULLET_DAMAGE_COMPACT * BULLET_MATCH_MULT_DAMAGE) +#define BULLET_STAMINA_COMPACT (BULLET_DAMAGE_COMPACT * 0.5) +#define BULLET_RECOIL_COMPACT_HANDLOAD (BULLET_RECOIL_COMPACT * BULLET_HANDLOAD_MULT_RECOIL) +#define BULLET_RECOIL_COMPACT_MATCH (BULLET_RECOIL_COMPACT * BULLET_MATCH_MULT_RECOIL) +#define BULLET_SPEED_COMPACT (BULLET_SPEED_BASE * 0.90) +#define BULLET_SPEED_COMPACT_HANDLOAD (BULLET_SPEED_COMPACT * BULLET_HANDLOAD_MULT_SPEED) +#define BULLET_SPEED_COMPACT_MATCH (BULLET_SPEED_COMPACT * BULLET_MATCH_MULT_SPEED) +#define BULLET_WOUND_COMPACT 5 +#define BULLET_WOUND_COMPACT_HANDLOAD (BULLET_WOUND_COMPACT * BULLET_HANDLOAD_MULT_WOUND) +#define BULLET_WOUND_COMPACT_MATCH (BULLET_WOUND_COMPACT * BULLET_MATCH_MULT_WOUND) +#define BULLET_WOUND_COMPACT_NAKED_MULT 1 +#define RUBBERY_DAMAGE_COMPACT (BULLET_DAMAGE_COMPACT * RUBBERY_DAMAGE_MULT) +#define RUBBERY_STAMINA_COMPACT (BULLET_DAMAGE_COMPACT) +#define RUBBERY_RECOIL_COMPACT (BULLET_RECOIL_COMPACT * RUBBERY_RECOIL_MULT) +#define RUBBERY_WOUND_COMPACT (BULLET_WOUND_COMPACT * 2) + +#define BULLET_DAMAGE_MEDIUM 45 +#define BULLET_DAMAGE_MEDIUM_HANDLOAD (BULLET_DAMAGE_MEDIUM * BULLET_HANDLOAD_MULT_DAMAGE) +#define BULLET_DAMAGE_MEDIUM_MATCH (BULLET_DAMAGE_MEDIUM * BULLET_MATCH_MULT_DAMAGE) +#define BULLET_STAMINA_MEDIUM (BULLET_DAMAGE_MEDIUM * 0.2) +#define BULLET_RECOIL_MEDIUM_HANDLOAD (BULLET_RECOIL_MEDIUM * BULLET_HANDLOAD_MULT_RECOIL) +#define BULLET_RECOIL_MEDIUM_MATCH (BULLET_RECOIL_MEDIUM * BULLET_MATCH_MULT_RECOIL) +#define BULLET_SPEED_MEDIUM (BULLET_SPEED_BASE * 1.2 * 1.5) +#define BULLET_SPEED_MEDIUM_HANDLOAD (BULLET_SPEED_MEDIUM * BULLET_HANDLOAD_MULT_SPEED) +#define BULLET_SPEED_MEDIUM_MATCH (BULLET_SPEED_MEDIUM * BULLET_MATCH_MULT_SPEED) +#define BULLET_WOUND_MEDIUM 5 +#define BULLET_WOUND_MEDIUM_HANDLOAD (BULLET_WOUND_MEDIUM * BULLET_HANDLOAD_MULT_WOUND) +#define BULLET_WOUND_MEDIUM_MATCH (BULLET_WOUND_MEDIUM * BULLET_MATCH_MULT_WOUND) +#define BULLET_WOUND_MEDIUM_NAKED_MULT 1 +#define RUBBERY_DAMAGE_MEDIUM (BULLET_DAMAGE_MEDIUM * RUBBERY_DAMAGE_MULT) +#define RUBBERY_STAMINA_MEDIUM (BULLET_DAMAGE_MEDIUM) +#define RUBBERY_RECOIL_MEDIUM (BULLET_RECOIL_MEDIUM * RUBBERY_RECOIL_MULT) +#define RUBBERY_WOUND_MEDIUM (BULLET_WOUND_MEDIUM * 2) + +#define BULLET_DAMAGE_LONG 60 +#define BULLET_DAMAGE_LONG_HANDLOAD (BULLET_DAMAGE_LONG * BULLET_HANDLOAD_MULT_DAMAGE) +#define BULLET_DAMAGE_LONG_MATCH (BULLET_DAMAGE_LONG * BULLET_MATCH_MULT_DAMAGE) +#define BULLET_STAMINA_LONG (BULLET_DAMAGE_LONG * 0.5) +#define BULLET_RECOIL_RECOIL_LONG_HANDLOAD (BULLET_RECOIL_LONG * BULLET_HANDLOAD_MULT_RECOIL) +#define BULLET_RECOIL_RECOIL_LONG_MATCH (BULLET_RECOIL_LONG * BULLET_MATCH_MULT_RECOIL) +#define BULLET_SPEED_LONG (BULLET_SPEED_BASE * 2.5) +#define BULLET_SPEED_LONG_HANDLOAD (BULLET_SPEED_LONG 6 * BULLET_HANDLOAD_MULT_SPEED) +#define BULLET_SPEED_LONG_MATCH (BULLET_SPEED_LONG * BULLET_MATCH_MULT_SPEED) +#define BULLET_WOUND_LONG 25 +#define BULLET_WOUND_LONG_HANDLOAD (BULLET_WOUND_LONG * BULLET_HANDLOAD_MULT_WOUND) +#define BULLET_WOUND_LONG_MATCH (BULLET_WOUND_LONG * BULLET_MATCH_MULT_WOUND) +#define BULLET_WOUND_LONG_NAKED_MULT 1 +#define RUBBERY_DAMAGE_LONG (BULLET_DAMAGE_LONG * RUBBERY_DAMAGE_MULT) +#define RUBBERY_STAMINA_LONG (BULLET_DAMAGE_LONG) +#define RUBBERY_RECOIL_LONG (BULLET_RECOIL_LONG * RUBBERY_RECOIL_MULT) +#define RUBBERY_WOUND_LONG (BULLET_WOUND_LONG * 4) + /// Bullet damage falloff per tile defines #define BULLET_FALLOFF "bullet falloff per tile" #define BULLET_FALLOFF_PISTOL_LIGHT 3 diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 4f27159d473..adafa0afc37 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -83,6 +83,7 @@ #define INIT_ORDER_INPUT 90 #define INIT_ORDER_SOUNDS 85 #define INIT_ORDER_VIS 80 +#define INIT_ORDER_CMLS 79 #define INIT_ORDER_RESEARCH 75 #define INIT_ORDER_EVENTS 70 #define INIT_ORDER_JOBS 65 diff --git a/code/_globalvars/lists/maintenance_loot.dm b/code/_globalvars/lists/maintenance_loot.dm index 49cff542f74..5349e14e435 100644 --- a/code/_globalvars/lists/maintenance_loot.dm +++ b/code/_globalvars/lists/maintenance_loot.dm @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(trash_clothing, list( /obj/item/clothing/suit/armor/light/kit = 5, /obj/item/clothing/head/welding = 5 )) - +/* GLOBAL_LIST_INIT(trash_ammo, list( /obj/item/ammo_box/a308box/improvised = 2, /obj/item/ammo_box/a3006box/improvised = 2, @@ -194,7 +194,7 @@ GLOBAL_LIST_INIT(trash_ammo, list( /obj/item/ammo_box/magazine/m10mm/adv/simple = 1, /obj/item/ammo_box/c10mm/improvised = 5, /obj/item/ammo_box/c9mm/improvised = 5, - /obj/item/ammo_box/shotgun/improvised = 1, + /obj/item/ammo_box/generic/shotgun/improvised = 1, /obj/item/ammo_box/a357box/improvised = 3, /obj/item/ammo_box/m44box/improvised = 1, /obj/item/ammo_box/c45/improvised = 5, @@ -203,7 +203,7 @@ GLOBAL_LIST_INIT(trash_ammo, list( /obj/item/ammo_box/m22 = 3, /obj/item/ammo_box/rock/improvised = 3 )) - +*/ GLOBAL_LIST_INIT(trash_chem, list( /obj/item/storage/pill_bottle/chem_tin/radx = 10, /obj/item/reagent_containers/food/drinks/bottle/orangejuice = 20, @@ -322,9 +322,8 @@ GLOBAL_LIST_INIT(trash_misc, list( /obj/item/toy/crayon/spraycan = 5, /obj/item/laser_pointer = 5 )) - -GLOBAL_LIST_INIT(trash_mob_loot, GLOB.trash_ammo +\ - GLOB.trash_chem +\ +// GLOB.trash_ammo "+\" was below here, minus the "" +GLOBAL_LIST_INIT(trash_mob_loot, GLOB.trash_chem +\ GLOB.trash_clothing +\ GLOB.trash_craft +\ GLOB.trash_gun +\ @@ -551,34 +550,34 @@ GLOBAL_LIST_INIT(loot_t5_melee, list( )) GLOBAL_LIST_INIT(loot_t1_range, list( - /obj/item/ammo_box/shotgun/bean, +// /obj/item/ammo_box/generic/shotgun, /obj/item/gun/ballistic/revolver/caravan_shotgun, - /obj/item/ammo_box/shotgun/bean, +// /obj/item/ammo_box/generic/shotgun, /obj/item/gun/ballistic/rifle/mosin, - /obj/item/ammo_box/a308, +// /obj/item/ammo_box/generic/long/l308, /obj/item/gun/ballistic/revolver/police, - /obj/item/ammo_box/c22, +// /obj/item/ammo_box/generic/compact/c22, /obj/item/gun/ballistic/revolver/hobo/pepperbox, /obj/item/gun/ballistic/rifle/hunting, - /obj/item/ammo_box/a308, +// /obj/item/ammo_box/generic/long/l30, /obj/item/gun/ballistic/automatic/pistol/n99, - /obj/item/ammo_box/magazine/m10mm/adv/simple, +// /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/gun/ballistic/automatic/pistol/m1911, - /obj/item/ammo_box/magazine/m45, +// /obj/item/ammo_box/magazine/m45, /obj/item/gun/ballistic/automatic/pistol/ninemil, - /obj/item/ammo_box/magazine/m9mm, +// /obj/item/ammo_box/magazine/m9mm, /obj/item/gun/ballistic/automatic/pistol/n99, - /obj/item/ammo_box/magazine/m10mm/adv/simple, +// /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/gun/ballistic/automatic/varmint, - /obj/item/ammo_box/magazine/m556/rifle/small, +// /obj/item/ammo_box/magazine/m556/rifle/small, /obj/item/gun/ballistic/automatic/sportcarbine, - /obj/item/ammo_box/magazine/m22/extended, - /obj/item/ammo_box/m22 +// /obj/item/ammo_box/magazine/m22/extended, +// /obj/item/ammo_box/m22 )) GLOBAL_LIST_INIT(loot_t2_range, list( /obj/item/gun/ballistic/shotgun/hunting, - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, /obj/item/gun/ballistic/automatic/smg/mini_uzi/smg22, /obj/item/ammo_box/magazine/m22/extended, /obj/item/gun/ballistic/revolver/m29, @@ -610,7 +609,7 @@ GLOBAL_LIST_INIT(loot_t3_range, list( /obj/item/gun/ballistic/automatic/smg/greasegun, /obj/item/ammo_box/magazine/greasegun, /obj/item/gun/ballistic/shotgun/trench, - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, /obj/item/gun/energy/laser/wattz, /obj/item/stock_parts/cell/ammo/ec, /obj/item/gun/ballistic/revolver/needler, @@ -677,8 +676,7 @@ GLOBAL_LIST_INIT(loot_unique_range, list( GLOBAL_LIST_INIT(loot_t1_ammo, list( /obj/item/ammo_box/magazine/m9mm, - /obj/item/ammo_box/shotgun/buck, - /obj/item/ammo_box/shotgun/bean, + /obj/item/ammo_box/generic/shotgun/buck, /obj/item/ammo_box/c22, /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/ammo_box/magazine/m556/rifle/small @@ -698,7 +696,7 @@ GLOBAL_LIST_INIT(loot_t2_ammo, list( )) GLOBAL_LIST_INIT(loot_t3_ammo, list( - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, /obj/item/ammo_box/magazine/uzim9mm, /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/ammo_box/magazine/greasegun, diff --git a/code/controllers/subsystem/CMLS.dm b/code/controllers/subsystem/CMLS.dm new file mode 100644 index 00000000000..7f97c1ffa8b --- /dev/null +++ b/code/controllers/subsystem/CMLS.dm @@ -0,0 +1,469 @@ +SUBSYSTEM_DEF(cmls) + name = "CMLS" + flags = SS_BACKGROUND|SS_NO_FIRE + init_order = INIT_ORDER_CMLS + + var/num_ammo_states = 0 + + var/list/ammos = list() + var/list/ammodesigns = list() + var/list/design_cats = list() + + var/list/all_C_box = list() + var/list/all_C_crate = list() + var/list/all_C_bullet = list() + + var/list/all_M_box = list() + var/list/all_M_crate = list() + var/list/all_M_bullet = list() + + var/list/all_L_box = list() + var/list/all_L_crate = list() + var/list/all_L_bullet = list() + + var/list/all_S_box = list() + var/list/all_S_crate = list() + var/list/all_S_bullet = list() + + var/list/data_for_tgui = list() + var/list/tgui_cats = list() + var/list/tgui_full_cats = list() + + var/compact_ammo_per_box = 60 + var/compact_ammo_price_per_box = 10 + var/compact_ammo_per_crate = 600 + var/compact_ammo_price_per_crate = 100 + + var/medium_ammo_per_box = 30 + var/medium_ammo_price_per_box = 15 + var/medium_ammo_per_crate = 300 + var/medium_ammo_price_per_crate = 150 + + var/long_ammo_per_box = 20 + var/long_ammo_price_per_box = 20 + var/long_ammo_per_crate = 200 + var/long_ammo_price_per_crate = 200 + + var/shotgun_ammo_per_box = 12 + var/shotgun_ammo_price_per_box = 24 + var/shotgun_ammo_per_crate = 120 + var/shotgun_ammo_price_per_crate = 240 + +/datum/controller/subsystem/cmls/Initialize(start_timeofday) + InitGunNerdStuff() + . = ..() + to_chat(world, span_boldnotice("Initialized [LAZYLEN(ammos)] different ammo kinds! 🔫🐈")) + +/datum/controller/subsystem/cmls/proc/InitGunNerdStuff() + if(LAZYLEN(ammos)) + return // already done + ammos = list() + for(var/flt in subtypesof(/datum/ammo_kind)) + new flt() // it knows what its do + +/datum/controller/subsystem/cmls/proc/GetAmmoTypeDesigns() + if(!LAZYLEN(ammodesigns)) + InitGunNerdStuff() + return ammodesigns + +/datum/controller/subsystem/cmls/proc/ExtractCORB(txt) + switch(lowertext(txt)) + if(CORB_BULLET) + return CORB_BULLET + if(CORB_BOX) + return CORB_BOX + if(CORB_CRATE) + return CORB_CRATE + if(CORB_MAGAZINE) + return CORB_MAGAZINE + +///////////////////////////MAGAZINES/////////////////////////// +/datum/controller/subsystem/cmls/proc/SetupMagazine(obj/item/ammo_box/generic/magazine/ABM, kind, obj/item/ammo_box/generic/magazine/source) + if(!istype(ABM)) + return + if(!kind) + kind = ABM.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSetupMagazine(ABM, source) + +/datum/controller/subsystem/cmls/proc/SkinMagazine(obj/item/ammo_casing/generic/ABM, kind, soft) + if(!istype(ABM)) + return + if(!kind) + kind = ABM.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSkinBox(ABM, soft) + +/datum/controller/subsystem/cmls/proc/UpdateMagazine(obj/item/ammo_casing/generic/ABM) + if(!istype(ABM)) + return + var/datum/ammo_kind/ammou = GetAmmoKind(ABM.ammo_kind) + if(!ammou) + return + ammou.AKUpdateBox(ABM) + +///////////////////////////BULLETS/////////////////////////// +/datum/controller/subsystem/cmls/proc/SetupBullet(obj/item/ammo_casing/generic/AC, kind) + if(!istype(AC)) + return + if(!kind) + kind = AC.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSetupBullet(AC) + +/datum/controller/subsystem/cmls/proc/SkinBullet(obj/item/ammo_casing/generic/AC, kind, soft) + if(!istype(AC)) + return + if(!kind) + kind = AC.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSkinBullet(AC, soft) + +/datum/controller/subsystem/cmls/proc/UpdateBullet(obj/item/ammo_casing/generic/AC) + if(!istype(AC)) + return + var/datum/ammo_kind/ammou = GetAmmoKind(AC.ammo_kind) + if(!ammou) + return + ammou.AKUpdateBullet(AC) + +///////////////////////////BOXES/////////////////////////// +/datum/controller/subsystem/cmls/proc/SetupBox(obj/item/ammo_box/generic/mag, kind, CorB = CORB_BOX, gunthing = null) + if(!istype(mag)) + return + if(!kind) + kind = mag.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSetupBox(mag, CorB, gunthing) + +/datum/controller/subsystem/cmls/proc/SkinBox(obj/item/ammo_box/generic/mag, kind, bullets_too, CorB = CORB_BOX) + if(!istype(mag)) + return + if(!kind) + kind = mag.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + ammou.AKSkinBox(mag, CorB, bullets_too) + +/datum/controller/subsystem/cmls/proc/UpdateBox(obj/item/ammo_box/generic/mag, CorB = CORB_BOX) + if(!istype(mag)) + return + var/datum/ammo_kind/ammou = GetAmmoKind(mag.ammo_kind) + if(!ammou) + return + ammou.AKUpdateBox(mag, CorB) + +///////////////////////////GUNS/////////////////////////// +/// Makes a CMLS magazine for the gun, with specified vars +/datum/controller/subsystem/cmls/proc/SetupGun(obj/item/gun/ballistic/gun, kind) + if(!istype(gun)) + return + if(!GunCanCMLS(gun)) + return + if(!kind) + kind = gun.ammo_kind + var/datum/ammo_kind/ammou = GetAmmoKind(kind) + if(!ammou) + return + var/obj/item/ammo_box/generic/internal/mag = new(gun) + SetupBox(mag, kind, gunthing = gun) + +/datum/controller/subsystem/cmls/proc/GunCanCMLS(obj/item/gun/ballistic/gun) + if(!istype(gun)) + return FALSE + /// check if it has any of its damage vars set up, gotta have at least one! + var/can_haz_dmg = FALSE + if(!isnull(gun.damage)) + can_haz_dmg = TRUE + else if(LAZYLEN(gun.damage_list)) + can_haz_dmg = TRUE + else if(!isnull(gun.damage_low) && !isnull(gun.damage_high)) + can_haz_dmg = TRUE + if(!can_haz_dmg) + return FALSE // CMLS ammo inherently doesnt do damage, I think, probably + /// check if it has a valid ammo kind + var/datum/ammo_kind/ammou = GetAmmoKind(gun.ammo_kind) + if(!istype(ammou)) + return FALSE + return TRUE // should work + +///////////////////////////RESKINS/////////////////////////// +/// attempts to have the user transform a bullet into a different kind of bullet of the same CMLS type +/// brings up a dialog for the user to select a new bullet kind +/datum/controller/subsystem/cmls/proc/ReskinBullet(mob/user, obj/item/ammo_casing/generic/AC) + if(!user) + return + if(!istype(AC)) + to_chat(user, span_alert("That's not a kind of bullet you can reskin!")) + return + var/datum/ammo_kind/curr_ammou = GetAmmoKind(AC.ammo_kind) + if(!curr_ammou) + to_chat(user, span_alert("That bullet doesn't have a valid ammo kind!")) + return + var/list/prechoices + switch(AC.caliber) + if(CALIBER_COMPACT) + prechoices = all_C_bullet.Copy() + if(CALIBER_MEDIUM) + prechoices = all_M_bullet.Copy() + if(CALIBER_LONG) + prechoices = all_L_bullet.Copy() + if(CALIBER_SHOTGUN) + prechoices = all_S_bullet.Copy() + else + to_chat(user, span_alert("That bullet doesn't have a valid CMLS type!")) + return + if(!LAZYLEN(prechoices)) + to_chat(user, span_alert("There are no other bullet types to choose from!")) + return + var/list/pre_prechoices = list() + for(var/ammokind in prechoices) + if(!ispath(ammokind, /datum/ammo_kind)) + continue + var/datum/ammo_kind/ammou = prechoices[ammokind] + if(!istype(ammou)) + continue + pre_prechoices["[ammou.name]"] = ammou.type + var/mychoose = tgui_input_list( + user, + "Choose a new flavor for your bullet!", + "Pick a [AC.caliber] bullet", + pre_prechoices + ) + if(!mychoose) + to_chat(user, span_alert("Never mind!!")) + return + var/datum/ammo_kind/ammouback = GetAmmoKind(pre_prechoices[mychoose]) + if(!istype(ammouback)) + to_chat(user, span_alert("That's not a valid choice!")) + return + to_chat(user, span_green("Your bullet is now \a [ammouback.name]!")) + SkinBullet(AC, pre_prechoices[mychoose], TRUE) + +/// attempts to have the user transform a box into a different kind of box of the same CMLS type +/// brings up a dialog for the user to select a new box kind +/datum/controller/subsystem/cmls/proc/ReskinBox(mob/user, obj/item/ammo_box/generic/mag) + if(!user) + return + if(!istype(mag)) + to_chat(user, span_alert("That's not a kind of box you can reskin!")) + return + var/datum/ammo_kind/curr_ammou = GetAmmoKind(mag.ammo_kind) + if(!curr_ammou) + to_chat(user, span_alert("That box doesn't have a valid ammo kind!")) + return + var/CorB = ExtractCORB(mag.box_CorB || CORB_BOX) + var/list/prechoices + switch(curr_ammou.caliber) + if(CALIBER_COMPACT) + switch(CorB) + if(CORB_BOX) + prechoices = all_C_box.Copy() + if(CORB_CRATE) + prechoices = all_C_crate.Copy() + if(CALIBER_MEDIUM) + switch(CorB) + if(CORB_BOX) + prechoices = all_M_box.Copy() + if(CORB_CRATE) + prechoices = all_M_crate.Copy() + if(CALIBER_LONG) + switch(CorB) + if(CORB_BOX) + prechoices = all_L_box.Copy() + if(CORB_CRATE) + prechoices = all_L_crate.Copy() + if(CALIBER_SHOTGUN) + switch(CorB) + if(CORB_BOX) + prechoices = all_S_box.Copy() + if(CORB_CRATE) + prechoices = all_S_crate.Copy() + else + to_chat(user, span_alert("That box doesn't have a valid CMLS type!")) + return + if(!LAZYLEN(prechoices)) + to_chat(user, span_alert("There are no other box types to choose from!")) + return + var/list/pre_prechoices = list() + for(var/ammokind in prechoices) + if(!ispath(ammokind, /datum/ammo_kind)) + continue + var/datum/ammo_kind/ammou = prechoices[ammokind] + if(!istype(ammou)) + continue + pre_prechoices["[ammou.name]"] = ammou.type + var/mychoose = tgui_input_list( + user, + "Choose what your ammo box holds and converts any compatible ammo into!", + "Pick a [mag.caliber] box", + pre_prechoices + ) + if(!mychoose) + to_chat(user, span_alert("Never mind!!")) + return + var/datum/ammo_kind/ammouback = GetAmmoKind(pre_prechoices[mychoose]) + if(!istype(ammouback)) + to_chat(user, span_alert("That's not a valid choice!")) + return + to_chat(user, span_green("Your ammobox now holds (and will convert any compatible ammo) into \a [ammouback.name]!")) + SkinBox(mag, pre_prechoices[mychoose], TRUE, CorB) + +/datum/controller/subsystem/cmls/proc/RandomizeBox(obj/item/ammo_box/generic/mag) + if(!istype(mag)) + return + var/caliber = LAZYACCESS(mag.caliber, 1) + var/CorB = ExtractCORB(mag.box_CorB || CORB_BOX) + var/list/topickfrom + switch(caliber) + if(CALIBER_COMPACT) + switch(CorB) + if(CORB_BOX) + topickfrom = SScmls.all_C_box + if(CORB_CRATE) + topickfrom = SScmls.all_C_crate + if(CALIBER_MEDIUM) + switch(CorB) + if(CORB_BOX) + topickfrom = SScmls.all_M_box + if(CORB_CRATE) + topickfrom = SScmls.all_M_crate + if(CALIBER_LONG) + switch(CorB) + if(CORB_BOX) + topickfrom = SScmls.all_L_box + if(CORB_CRATE) + topickfrom = SScmls.all_L_crate + if(CALIBER_SHOTGUN) + switch(CorB) + if(CORB_BOX) + topickfrom = SScmls.all_S_box + if(CORB_CRATE) + topickfrom = SScmls.all_S_crate + else + return + SetupBox(mag, safepick(topickfrom)) + +/datum/controller/subsystem/cmls/proc/RandomizeBullet(obj/item/ammo_casing/generic/AC) + if(!istype(AC)) + return + var/caliber = LAZYACCESS(AC.caliber, 1) + var/list/topickfrom + switch(caliber) + if(CALIBER_COMPACT) + topickfrom = all_C_bullet + if(CALIBER_MEDIUM) + topickfrom = all_M_bullet + if(CALIBER_LONG) + topickfrom = all_L_bullet + if(CALIBER_SHOTGUN) + topickfrom = all_S_bullet + else + return + SetupBullet(AC, safepick(topickfrom)) + +/datum/controller/subsystem/cmls/proc/GetAmmoKind(kind) + var/datum/ammo_kind/ammou = LAZYACCESS(ammos, kind) + if(!ammou) + ammou = GetAmmokindByName(kind) + if(!ammou) + message_admins("Ammo kind [kind] not found!") + CRASH("Ammo kind [kind] not found!") + return ammou + +/datum/controller/subsystem/cmls/proc/GetAmmokindByName(ammoname) + for(var/datum/ammo_kind/ammou in ammos) + if(ammou.name == ammoname) + return ammou + return null + +/datum/controller/subsystem/cmls/proc/GetAmmokindByType(ammo_kind) + for(var/datum/ammo_kind/ammou in ammos) + if(istype(ammou, ammo_kind)) + return ammou + return null + +/// first checks if mag fits in gun, transfers ammo if it can, and vanishes if empty +/datum/controller/subsystem/cmls/proc/InsertCMLSmagIntoGun(mob/user, obj/item/gun/ballistic/gun, obj/item/ammo_box/generic/magazine/mag) + if(!user || !istype(gun) || !istype(mag)) + return + if(!gun.use_cmls) + return + /// dont really care about the gun, just its magazine + var/obj/item/ammo_box/generic/internal/gunmag = gun.magazine + if(!istype(gunmag)) + CRASH("CMLS Gun [gun] has no magazine!") + /// start stuffing ammo from mag into gunmag + for(var/obj/item/ammo_casing/AC in mag.stored_ammo) + var/did_load = gunmag.give_round(AC, mag.replace_spent_rounds) + if(did_load) + mag.stored_ammo -= AC + . ++ + if(!did_load || !gunmag.multiload) + break + if(.) + // if mag ran out of bullets, cease to exist + if(!LAZYLEN(mag.stored_ammo)) + to_chat(user, span_notice("You insert \the [mag] into \the [gun]!")) + qdel(mag) + playsound(user, gun.sound_magazine_insert, 60, 1) + else + to_chat(user, span_notice("You top off \the [gun] with [.] shell\s!")) + playsound(user, 'sound/weapons/bulletinsert.ogg', 60, 1) + if(!QDELETED(mag)) + mag.update_icon() + if(!gun.chambered) + gun.chamber_round() + if(!gunmag.replace_spent_rounds) + addtimer(CALLBACK(usr, GLOBAL_PROC_REF(playsound), gun, 'sound/weapons/gun_chamber_round.ogg', 100, 1), 3) + mag.update_icon() + gunmag.update_icon() + return TRUE + +/// if the gun has ammo, spawn a mag with that ammo and fill it with the ammo +/datum/controller/subsystem/cmls/proc/EjectCMLSmagFromGun(mob/user, obj/item/gun/ballistic/gun) + if(!user || !istype(gun)) + return + if(!gun.use_cmls) + return + var/obj/item/ammo_box/generic/internal/gunmag = gun.magazine + if(!istype(gunmag)) + CRASH("CMLS Gun [gun] has no magazine!") + if(!gunmag.ammo_count(TRUE)) + to_chat(user, span_alert("The [gun] is empty!")) + return + if(!gun.casing_ejector) // bolties + if(gun.is_revolver) + gun.eject_shells(user, TRUE) + else if(gun.chambered) + gun.pump(user) + gun.update_icon() + return // easy + /// okay now we gotta do the hard part + var/datum/ammo_kind/gun_AK = GetAmmoKind(gunmag.ammo_kind) + if(!gun_AK) + CRASH("CMLS Gun [gun] has no valid ammo kind!") + var/obj/item/ammo_box/generic/magazine/mag = new(get_turf(src)) + SetupMagazine(mag, gunmag.ammo_kind, gunmag) + to_chat(user, span_notice("You eject \the [gunmag] from \the [gun]!")) + playsound(user, gun.sound_magazine_eject, 60, 1) + mag.update_icon() + gunmag.update_icon() + gun.update_icon() + user.put_in_hands(mag) + return mag + + + + diff --git a/code/controllers/subsystem/research.dm b/code/controllers/subsystem/research.dm index c8c0819f278..f006f7b56bf 100644 --- a/code/controllers/subsystem/research.dm +++ b/code/controllers/subsystem/research.dm @@ -504,14 +504,17 @@ SUBSYSTEM_DEF(research) if(islist(techweb_designs) && clearall) QDEL_LIST(techweb_designs) var/list/returned = list() - for(var/path in subtypesof(/datum/design)) + for(var/path in subtypesof(/datum/design) + SScmls.GetAmmoTypeDesigns()) var/datum/design/DN = path - if(isnull(initial(DN.id))) - stack_trace("WARNING: Design with null ID detected. Build path: [initial(DN.build_path)]") - continue - else if(initial(DN.id) == DESIGN_ID_IGNORE) - continue - DN = new path + if(!istype(path, /datum/design)) + if(isnull(initial(DN.id))) + stack_trace("WARNING: Design with null ID detected. Build path: [initial(DN.build_path)]") + continue + else if(initial(DN.id) == DESIGN_ID_IGNORE) + continue + DN = new path + else + DN = path if(returned[initial(DN.id)]) stack_trace("WARNING: Design ID clash with ID [initial(DN.id)] detected! Path: [path]") errored_datums[DN] = initial(DN.id) diff --git a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm index e18b4b6a0b6..5a34ff82d52 100644 --- a/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm +++ b/code/datums/components/crafting/recipes/recipes_weapon_and_ammo.dm @@ -383,7 +383,7 @@ /* /datum/crafting_recipe/shotgunammo3p name = "12g 3p trainshot box" - result = /obj/item/ammo_box/shotgun/trainshot + result = /obj/item/ammo_box/generic/shotgun/trainshot reqs = list(/obj/item/stack/crafting/metalparts = 1, /obj/item/stack/sheet/prewar = 2, /obj/item/stack/sheet/metal = 1, @@ -759,7 +759,7 @@ reqs = list(/obj/item/screwdriver = 1, /obj/item/twohanded/baseball = 1, /obj/item/stack/crafting/metalparts = 2, - /obj/item/ammo_casing/shotgun = 1, + /obj/item/ammo_casing/generic/shotgun = 1, /obj/item/stack/rods = 1) tools = list(TOOL_WORKBENCH) time = 120 diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 79ec3d885cc..e3d84b49be6 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -360,6 +360,7 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) if(LAZYLEN(picked_materials)) new_item.set_custom_materials(picked_materials, 1 / multiplier) //Ensure we get the non multiplied amount + being_built.post_build(new_item) icon_state = icon_state_base busy = FALSE @@ -711,19 +712,19 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) desc = "An ammo bench that utilizes metal and other materials to make ammo and magazines." circuit = /obj/item/circuitboard/machine/autolathe/ammo stored_research = /datum/techweb/specialized/autounlocking/autolathe/ammo - categories = list( - "Handloaded Ammo", - "Handmade Magazines", - "Simple Ammo", - "Simple Magazines", - "Basic Ammo", - "Basic Magazines", - "Intermediate Ammo", - "Intermediate Magazines", - "Advanced Ammo", - "Advanced Magazines", - "Materials" - ) + // categories = list( + // "Handloaded Ammo", + // "Handmade Magazines", + // "Simple Ammo", + // "Simple Magazines", + // "Basic Ammo", + // "Basic Magazines", + // "Intermediate Ammo", + // "Intermediate Magazines", + // "Advanced Ammo", + // "Advanced Magazines", + // "Materials" + // ) allowed_materials = list( /datum/material/iron, /datum/material/titanium, @@ -734,9 +735,15 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) var/intermediate = 0 var/advanced = 0 /// does this bench accept books? - var/accepts_books = TRUE + var/accepts_books = FALSE // no, no it doesnt tooadvanced = TRUE //technophobes will still need to be able to make ammo //not anymore they wont +/obj/machinery/autolathe/ammo/Initialize() + categories = SScmls.design_cats // meow + . = ..() + + + /obj/machinery/autolathe/ammo/attackby(obj/item/O, mob/user, params) /* if(!busy && !stat) if(istype(O, /obj/item/storage/bag/casings)) @@ -757,27 +764,27 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) if(pre_insert_check(user, O)) insert_magazine_from_gun(user, O) return */ - if(panel_open && accepts_books) - if(!simple && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_one)) - to_chat(user, span_notice("You upgrade [src] with simple ammunition schematics.")) - simple = TRUE - qdel(O) - return - if(!basic && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_two)) - to_chat(user, span_notice("You upgrade [src] with basic ammunition schematics.")) - basic = TRUE - qdel(O) - return - else if(!intermediate && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_three)) - to_chat(user, span_notice("You upgrade [src] with intermediate ammunition schematics.")) - intermediate = TRUE - qdel(O) - return - else if(!advanced && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_four)) - to_chat(user, span_notice("You upgrade [src] with advanced ammunition schematics.")) - advanced = TRUE - qdel(O) - return + // if(panel_open && accepts_books) + // if(!simple && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_one)) + // to_chat(user, span_notice("You upgrade [src] with simple ammunition schematics.")) + // simple = TRUE + // qdel(O) + // return + // if(!basic && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_two)) + // to_chat(user, span_notice("You upgrade [src] with basic ammunition schematics.")) + // basic = TRUE + // qdel(O) + // return + // else if(!intermediate && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_three)) + // to_chat(user, span_notice("You upgrade [src] with intermediate ammunition schematics.")) + // intermediate = TRUE + // qdel(O) + // return + // else if(!advanced && istype(O, /obj/item/book/granter/crafting_recipe/gunsmith_four)) + // to_chat(user, span_notice("You upgrade [src] with advanced ammunition schematics.")) + // advanced = TRUE + // qdel(O) + // return return ..() /* /obj/machinery/autolathe/ammo/proc/insert_thing(obj/item/thing, obj/item/thing_bag, datum/component/material_container/mat_box) @@ -897,66 +904,67 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) to_chat(user, span_warning("There aren't any casings in \the [O] to recycle!")) */ /obj/machinery/autolathe/ammo/can_build(datum/design/D, amount = 1) - if("Handloaded Ammo" in D.category) - return ..() - if("Handmade Magazines" in D.category) - return ..() - if("Simple Ammo" in D.category) - if(simple == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Simple Magazines" in D.category) - if(simple == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Basic Ammo" in D.category) - if(basic == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Basic Magazines" in D.category) - if(basic == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Intermediate Ammo" in D.category) - if(intermediate == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Intermediate Magazines" in D.category) - if(intermediate == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Advanced Ammo" in D.category) - if(advanced == 0) - return FALSE - else - . = ..() - else - . = ..() - if("Advanced Magazines" in D.category) - if(advanced == 0) - return FALSE - else - . = ..() - else - . = ..() + . = ..() // it sure can! + // if("Handloaded Ammo" in D.category) + // return ..() + // if("Handmade Magazines" in D.category) + // return ..() + // if("Simple Ammo" in D.category) + // if(simple == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Simple Magazines" in D.category) + // if(simple == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Basic Ammo" in D.category) + // if(basic == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Basic Magazines" in D.category) + // if(basic == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Intermediate Ammo" in D.category) + // if(intermediate == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Intermediate Magazines" in D.category) + // if(intermediate == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Advanced Ammo" in D.category) + // if(advanced == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() + // if("Advanced Magazines" in D.category) + // if(advanced == 0) + // return FALSE + // else + // . = ..() + // else + // . = ..() /obj/machinery/autolathe/ammo/on_deconstruction() ..() @@ -993,12 +1001,12 @@ GLOBAL_VAR_INIT(lathe_reports_done, 0) icon_state_loading_other = "ammolathe_improv_o" circuit = /obj/item/circuitboard/machine/autolathe/ammo/improvised //stored_research = /datum/techweb/specialized/autounlocking/autolathe/ammo_improvised - categories = list( - "Handloaded Ammo", - "Handmade Magazines", - "Materials", - "Simple Magazines" - ) + // categories = list( + // "Handloaded Ammo", + // "Handmade Magazines", + // "Materials", + // "Simple Magazines" + // ) allowed_materials = list( /datum/material/iron, /datum/material/blackpowder) diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 64c49e582cf..806a78296aa 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -1781,8 +1781,8 @@ lethal_projectile = null lethal_projectile_sound = 'sound/f13weapons/shotgun.ogg' stun_projectile_sound = 'sound/f13weapons/shotgun.ogg' - casing_type_stun = /obj/item/ammo_casing/shotgun/rubbershot - casing_type_lethal = /obj/item/ammo_casing/shotgun/buckshot + casing_type_stun = /obj/item/ammo_casing/generic/shotgun/rubbershot + casing_type_lethal = /obj/item/ammo_casing/generic/shotgun/buckshot /obj/machinery/porta_turret/f13/turret_shotgun/raider name = "raider autoshotgun" @@ -1908,8 +1908,8 @@ lethal_projectile = null lethal_projectile_sound = 'sound/f13weapons/shotgun.ogg' stun_projectile_sound = 'sound/f13weapons/shotgun.ogg' - casing_type_stun = /obj/item/ammo_casing/shotgun/rubbershot - casing_type_lethal = /obj/item/ammo_casing/shotgun/buckshot/wide + casing_type_stun = /obj/item/ammo_casing/generic/shotgun/rubbershot + casing_type_lethal = /obj/item/ammo_casing/generic/shotgun/buckshot/wide /obj/machinery/porta_turret/f13/town/AMR_turret name = "allied big game point defense system" diff --git a/code/game/objects/effects/spawners/f13lootdrop.dm b/code/game/objects/effects/spawners/f13lootdrop.dm index a9990ad6e62..dfe7da78030 100644 --- a/code/game/objects/effects/spawners/f13lootdrop.dm +++ b/code/game/objects/effects/spawners/f13lootdrop.dm @@ -1378,14 +1378,14 @@ there should be very few of these spawns on the whole map. finding one should be name = "shotgun bat and ammo spawner" items = list( /obj/item/gun/ballistic/revolver/single_shotgun, - /obj/item/ammo_box/shotgun/improvised + /obj/item/ammo_box/generic/shotgun/improvised ) /obj/effect/spawner/bundle/f13/caravan_shotgun name = "caravan shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/revolver/caravan_shotgun, - /obj/item/ammo_box/shotgun/improvised + /obj/item/ammo_box/generic/shotgun/improvised ) /obj/effect/spawner/bundle/f13/mosin @@ -1406,7 +1406,7 @@ there should be very few of these spawns on the whole map. finding one should be name = "shotpistol and ammo spawner" items = list( /obj/item/gun/ballistic/revolver/shotpistol, - /obj/item/ammo_box/shotgun/buck + /obj/item/ammo_box/generic/shotgun/buck ) /obj/effect/spawner/bundle/f13/n99 @@ -1469,14 +1469,14 @@ there should be very few of these spawns on the whole map. finding one should be name = "hunting shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/hunting, - /obj/item/ammo_box/shotgun/buck + /obj/item/ammo_box/generic/shotgun/buck ) /obj/effect/spawner/bundle/f13/shotgunlever name = "lever action shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/automatic/combat/shotgunlever, - /obj/item/ammo_box/shotgun/buck + /obj/item/ammo_box/generic/shotgun/buck ) /obj/effect/spawner/bundle/f13/revolverm29 @@ -1651,14 +1651,14 @@ there should be very few of these spawns on the whole map. finding one should be name = "auto-5 shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/automatic/combat/auto5, - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, ) /obj/effect/spawner/bundle/f13/trenchshotgun name = "trench shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/trench, - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, ) /obj/effect/spawner/bundle/f13/wattz @@ -1721,16 +1721,16 @@ there should be very few of these spawns on the whole map. finding one should be name = "Neostead 2000 shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/automatic/combat/neostead, - /obj/item/ammo_box/shotgun/slug, - /obj/item/ammo_box/shotgun/buck + /obj/item/ammo_box/generic/shotgun/slug, + /obj/item/ammo_box/generic/shotgun/buck ) /obj/effect/spawner/bundle/f13/auto5 name = "Auto 5 shotgun and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/automatic/combat/auto5, - /obj/item/ammo_box/shotgun/buck, - /obj/item/ammo_box/shotgun/slug + /obj/item/ammo_box/generic/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/slug ) // Obsolete @@ -1870,7 +1870,7 @@ there should be very few of these spawns on the whole map. finding one should be name = "citykiller and ammo spawner" items = list( /obj/item/gun/ballistic/shotgun/automatic/combat/citykiller, - /obj/item/ammo_box/shotgun/buck + /obj/item/ammo_box/generic/shotgun/buck ) /obj/effect/spawner/bundle/f13/guns/p90 @@ -2019,8 +2019,8 @@ there should be very few of these spawns on the whole map. finding one should be loot = list( /obj/item/ammo_box/magazine/m9mm, - /obj/item/ammo_box/shotgun/buck, - /obj/item/ammo_box/shotgun/slug, + /obj/item/ammo_box/generic/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/slug, /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/ammo_box/magazine/m556/rifle/small ) @@ -2051,7 +2051,7 @@ there should be very few of these spawns on the whole map. finding one should be lootdoubles = TRUE loot = list( - /obj/item/ammo_box/shotgun/buck, + /obj/item/ammo_box/generic/shotgun/buck, /obj/item/ammo_box/magazine/uzim9mm, /obj/item/ammo_box/magazine/m10mm/adv/simple, /obj/item/ammo_box/magazine/greasegun, diff --git a/code/game/objects/effects/spawners/lootdrop.dm b/code/game/objects/effects/spawners/lootdrop.dm index c04a1a05613..05af6229fde 100644 --- a/code/game/objects/effects/spawners/lootdrop.dm +++ b/code/game/objects/effects/spawners/lootdrop.dm @@ -789,8 +789,8 @@ spawn_on_turf = FALSE loot = list("" = 25, /obj/item/ammo_box/magazine/wt550m9 = 1, - /obj/item/ammo_casing/shotgun/buckshot = 7, - /obj/item/ammo_casing/shotgun/rubbershot = 7, + /obj/item/ammo_casing/generic/shotgun/buckshot = 7, + /obj/item/ammo_casing/generic/shotgun/rubbershot = 7, /obj/item/ammo_casing/a308 = 15, /obj/item/ammo_box/a308 = 15, ) @@ -801,8 +801,8 @@ spawn_on_turf = FALSE loot = list("" = 50, /obj/item/ammo_box/magazine/wt550m9 = 2, - /obj/item/ammo_casing/shotgun/buckshot = 10, - /obj/item/ammo_casing/shotgun/rubbershot = 10, + /obj/item/ammo_casing/generic/shotgun/buckshot = 10, + /obj/item/ammo_casing/generic/shotgun/rubbershot = 10, /obj/item/ammo_casing/a308 = 7, /obj/item/ammo_box/a308 = 7, ) @@ -812,11 +812,11 @@ lootcount = 1 spawn_on_turf = FALSE loot = list("" = 50, - /obj/item/ammo_box/shotgun/loaded/buckshot = 5, - /obj/item/ammo_box/shotgun/loaded/beanbag = 5, - /obj/item/ammo_box/shotgun/loaded/incendiary = 5, - /obj/item/ammo_casing/shotgun/buckshot = 8, - /obj/item/ammo_casing/shotgun/rubbershot = 9, - /obj/item/ammo_casing/shotgun = 8, - /obj/item/ammo_casing/shotgun/incendiary = 10, + /obj/item/ammo_box/generic/shotgun/loaded/buckshot = 5, + /obj/item/ammo_box/generic/shotgun/loaded/beanbag = 5, + /obj/item/ammo_box/generic/shotgun/loaded/incendiary = 5, + /obj/item/ammo_casing/generic/shotgun/buckshot = 8, + /obj/item/ammo_casing/generic/shotgun/rubbershot = 9, + /obj/item/ammo_casing/generic/shotgun = 8, + /obj/item/ammo_casing/generic/shotgun/incendiary = 10, ) diff --git a/code/game/objects/effects/spawners/masterlootdrop.dm b/code/game/objects/effects/spawners/masterlootdrop.dm index e2de744c524..283ea437313 100644 --- a/code/game/objects/effects/spawners/masterlootdrop.dm +++ b/code/game/objects/effects/spawners/masterlootdrop.dm @@ -742,20 +742,8 @@ /obj/effect/spawner/lootdrop/f13/trash_ammo //all equal chance cause the boxes hold different amounts name = "trash ammo boxes" loot = list( - /obj/item/ammo_box/a308box/improvised = 1, - /obj/item/ammo_box/a3006box/improvised = 1, - /obj/item/ammo_box/m5mmbox/improvised = 1, - /obj/item/ammo_box/a556/improvised = 1, - /obj/item/ammo_box/c10mm/improvised = 1, - /obj/item/ammo_box/c9mm/improvised = 1, - /obj/item/ammo_box/shotgun/improvised = 1, - /obj/item/ammo_box/a357box/improvised = 1, - /obj/item/ammo_box/m44box/improvised = 1, - /obj/item/ammo_box/c45/improvised = 1, - /obj/item/ammo_box/m14mm/improvised = 1, - /obj/item/ammo_box/c4570box/improvised = 1, - /obj/item/ammo_box/m22 = 1, - /obj/item/ammo_box/rock/improvised = 1, + /obj/item/ammo_box/generic/compact = 1, + ) /obj/effect/spawner/lootdrop/f13/common_ammo @@ -771,8 +759,8 @@ /obj/item/ammo_box/a357box = 1, /obj/item/ammo_box/a357box/ratshot = 1, /obj/item/ammo_box/m44box = 1, - /obj/item/ammo_box/shotgun/buck = 1, - /obj/item/ammo_box/shotgun/slug = 1, + /obj/item/ammo_box/generic/shotgun/buck = 1, + /obj/item/ammo_box/generic/shotgun/slug = 1, ) /obj/effect/spawner/lootdrop/f13/uncommon_ammo @@ -788,8 +776,8 @@ /obj/item/ammo_box/c4570box/ratshot = 1, /obj/item/ammo_box/m44box = 1, /obj/item/ammo_box/a45lcbox = 1, - /obj/item/ammo_box/shotgun/buck = 1, - /obj/item/ammo_box/shotgun/slug = 1, + /obj/item/ammo_box/generic/shotgun/buck = 1, + /obj/item/ammo_box/generic/shotgun/slug = 1, /obj/item/ammo_box/a40mm/buck = 1, /obj/effect/spawner/lootdrop/f13/rare_ammo = 1, ) diff --git a/code/game/objects/effects/spawners/themed_loot_tables.dm b/code/game/objects/effects/spawners/themed_loot_tables.dm index 77ff00625c0..5604f81a80a 100644 --- a/code/game/objects/effects/spawners/themed_loot_tables.dm +++ b/code/game/objects/effects/spawners/themed_loot_tables.dm @@ -469,13 +469,13 @@ name = "ammospawner civilian" loot = list( /obj/item/ammo_box/c10mm/improvised = 10, - /obj/item/ammo_box/shotgun/improvised = 10, + /obj/item/ammo_box/generic/shotgun/improvised = 10, /obj/item/ammo_box/c38box/improvised = 10, /obj/item/ammo_box/m44box/improvised = 10, /obj/item/ammo_box/a556/sport/improvised = 5, /obj/item/ammo_box/c45/improvised = 5, - /obj/item/ammo_box/shotgun/buck = 5, - /obj/item/ammo_box/shotgun/bean = 5, + /obj/item/ammo_box/generic/shotgun/buck = 5, + /obj/item/ammo_box/generic/shotgun/bean = 5, /obj/item/ammo_box/c38 = 5, /obj/item/ammo_box/m22 = 5, /obj/item/ammo_box/c9mm = 5, @@ -492,7 +492,7 @@ name = "ammospawner military" loot = list( /obj/item/ammo_box/c45 = 15, - /obj/item/ammo_box/shotgun/slug = 15, + /obj/item/ammo_box/generic/shotgun/slug = 15, /obj/item/stock_parts/cell/ammo/ec = 15, /obj/item/ammo_box/a556 = 15, /obj/item/ammo_box/a762 = 10, diff --git a/code/game/objects/items/loadout_beacons.dm b/code/game/objects/items/loadout_beacons.dm index 7444e4486f9..5b512512278 100644 --- a/code/game/objects/items/loadout_beacons.dm +++ b/code/game/objects/items/loadout_beacons.dm @@ -499,9 +499,9 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/law/police/PopulateContents() new /obj/item/gun/ballistic/shotgun/police(src) - new /obj/item/ammo_box/shotgun/buck(src) //eeeevery flavor - new /obj/item/ammo_box/shotgun/bean(src) - new /obj/item/ammo_box/shotgun/rubber(src) //make sure these are okay + new /obj/item/ammo_box/generic/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/rifle/brushgun name = "brush gun case" @@ -666,7 +666,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/rifle/caravan_shotgun/PopulateContents() new /obj/item/gun/ballistic/revolver/caravan_shotgun(src) - //new /obj/item/ammo_box/shotgun/buck(src) //lots of shotshells, just one box + //new /obj/item/ammo_box/generic/shotgun/buck(src) //lots of shotshells, just one box new /obj/item/ammo_box/c4570box(src) new /obj/item/ammo_box/c4570/ratshot(src) @@ -675,7 +675,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/rifle/widowmaker/PopulateContents() new /obj/item/gun/ballistic/revolver/widowmaker(src) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/rifle/gras name = "Gras Rifle" @@ -1016,7 +1016,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/hobo/PopulateContents() new /obj/item/gun/ballistic/revolver/shotpistol(src) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/hobo/zipgun name = "Zip gun case" @@ -1057,7 +1057,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/hobo/single_shotgun/PopulateContents() new /obj/item/gun/ballistic/revolver/hobo/single_shotgun(src) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/hobo/knifegun name = "knife gun case" @@ -1320,14 +1320,14 @@ GLOBAL_LIST_EMPTY(loadout_boxes) /obj/item/storage/box/gun/pistol/taurpistol/PopulateContents() new /obj/item/gun/ballistic/revolver/taurjudge(src) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/rifle/shottybotty name = "S163 Shotgun case" /obj/item/storage/box/gun/rifle/shottybotty/PopulateContents() new /obj/item/gun/ballistic/shotgun/s163(src) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/item/storage/box/gun/rifle/foomas diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index b882dac0af7..3225e97360b 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -710,7 +710,7 @@ /obj/item/storage/box/lethalslugs/PopulateContents() for(var/i in 1 to 7) - new /obj/item/ammo_casing/shotgun(src) + new /obj/item/ammo_casing/generic/shotgun(src) /obj/item/storage/box/stunslug name = "box of stun slugs" @@ -720,7 +720,7 @@ /obj/item/storage/box/stunslug/PopulateContents() for(var/i in 1 to 7) - new /obj/item/ammo_casing/shotgun/stunslug(src) + new /obj/item/ammo_casing/generic/shotgun/stunslug(src) /obj/item/storage/box/techsslug name = "box of tech shotgun shells" @@ -730,7 +730,7 @@ /obj/item/storage/box/techsslug/PopulateContents() for(var/i in 1 to 7) - new /obj/item/ammo_casing/shotgun/techshell(src) + new /obj/item/ammo_casing/generic/shotgun/techshell(src) /obj/item/storage/box/fireshot name = "box of incendiary ammo" @@ -740,7 +740,7 @@ /obj/item/storage/box/fireshot/PopulateContents() for(var/i in 1 to 7) - new /obj/item/ammo_casing/shotgun/incendiary(src) + new /obj/item/ammo_casing/generic/shotgun/incendiary(src) /obj/item/storage/box/actionfigure name = "box of action figures" diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm index 4d963bd7858..a3ef43a356e 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm @@ -230,7 +230,7 @@ ..() new /obj/item/storage/box/firingpins(src) for(var/i in 1 to 3) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/structure/closet/secure_closet/armory3 name = "armory energy gun locker" req_access = list(ACCESS_ARMORY) @@ -258,7 +258,7 @@ new /obj/item/electrostaff(src) new /obj/item/electrostaff(src) for(var/i in 1 to 3) - new /obj/item/ammo_box/shotgun/buck(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) /obj/structure/closet/secure_closet/labor_camp_security name = "labor camp security locker" diff --git a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm index 73f7c2999b1..e9d811fbbef 100644 --- a/code/game/objects/structures/crates_lockers/closets/utility_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/utility_closets.dm @@ -204,4 +204,4 @@ /obj/structure/closet/ammunitionlocker/PopulateContents() ..() for(var/i in 1 to 8) - new /obj/item/ammo_casing/shotgun/beanbag(src) + new /obj/item/ammo_casing/generic/shotgun/beanbag(src) diff --git a/code/game/sound.dm b/code/game/sound.dm index 3cbd48ffdce..5d9792c4360 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -1,8 +1,8 @@ /proc/playsound( atom/source, soundin, - vol as num, - vary, + vol = 80, + vary = TRUE, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, diff --git a/code/modules/WVM/wvm.dm b/code/modules/WVM/wvm.dm index 495e3d4763c..1325115aa70 100644 --- a/code/modules/WVM/wvm.dm +++ b/code/modules/WVM/wvm.dm @@ -778,8 +778,8 @@ GLOBAL_VAR_INIT(vendor_cash, 0) new /datum/data/wasteland_equipment("45-70 Box (30 bullets)", /obj/item/ammo_box/c4570box, 15), new /datum/data/wasteland_equipment("Plasma Canisters (24 canisters)", /obj/item/ammo_box/plasmamusket, 15), new /datum/data/wasteland_equipment(".50 BMG Box (24 bullets)", /obj/item/ammo_box/a50MG, 15), - new /datum/data/wasteland_equipment("12 Gauge Buckshot box (24 shells)", /obj/item/ammo_box/shotgun/buck, 15), - new /datum/data/wasteland_equipment("12 Gauge Slug box (24 shells)", /obj/item/ammo_box/shotgun/slug, 15), + new /datum/data/wasteland_equipment("12 Gauge Buckshot box (24 shells)", /obj/item/ammo_box/generic/shotgun/buck, 15), + new /datum/data/wasteland_equipment("12 Gauge Slug box (24 shells)", /obj/item/ammo_box/generic/shotgun/slug, 15), new /datum/data/wasteland_equipment("40mm HE (2 shells)", /obj/item/ammo_box/a40mm, 15), new /datum/data/wasteland_equipment("Energy Cell (SEC)", /obj/item/stock_parts/cell/ammo/ec, 20), new /datum/data/wasteland_equipment("Microfusion Cell (MFC)", /obj/item/stock_parts/cell/ammo/mfc, 25), @@ -806,8 +806,8 @@ GLOBAL_VAR_INIT(vendor_cash, 0) new /datum/data/wasteland_equipment("45-70 Box (30 bullets)", /obj/item/ammo_box/c4570box, 15), new /datum/data/wasteland_equipment("Plasma Canisters (24 canisters)", /obj/item/ammo_box/plasmamusket, 15), new /datum/data/wasteland_equipment(".50 BMG Box (24 bullets)", /obj/item/ammo_box/a50MG, 15), - new /datum/data/wasteland_equipment("12 Gauge Buckshot box (24 shells)", /obj/item/ammo_box/shotgun/buck, 15), - new /datum/data/wasteland_equipment("12 Gauge Slug box (24 shells)", /obj/item/ammo_box/shotgun/slug, 15), + new /datum/data/wasteland_equipment("12 Gauge Buckshot box (24 shells)", /obj/item/ammo_box/generic/shotgun/buck, 15), + new /datum/data/wasteland_equipment("12 Gauge Slug box (24 shells)", /obj/item/ammo_box/generic/shotgun/slug, 15), new /datum/data/wasteland_equipment("40mm HE (2 shells)", /obj/item/ammo_box/a40mm, 15), new /datum/data/wasteland_equipment("Energy Cell (SEC)", /obj/item/stock_parts/cell/ammo/ec, 20), new /datum/data/wasteland_equipment("Microfusion Cell (MFC)", /obj/item/stock_parts/cell/ammo/mfc, 25), @@ -834,8 +834,8 @@ GLOBAL_VAR_INIT(vendor_cash, 0) new /datum/data/wasteland_equipment("14mm Bag", /obj/item/ammo_box/m14mm/improvised, 30), new /datum/data/wasteland_equipment(".30-06 Bag", /obj/item/ammo_box/a3006box/improvised, 30), new /datum/data/wasteland_equipment("45-70 Bag", /obj/item/ammo_box/c4570box/improvised, 30), - new /datum/data/wasteland_equipment("12 Gauge Buckshot box (12 shells)", /obj/item/ammo_box/shotgun/buck, 30), - new /datum/data/wasteland_equipment("12 Gauge Slug box (12 shells)", /obj/item/ammo_box/shotgun/slug, 30), + new /datum/data/wasteland_equipment("12 Gauge Buckshot box (12 shells)", /obj/item/ammo_box/generic/shotgun/buck, 30), + new /datum/data/wasteland_equipment("12 Gauge Slug box (12 shells)", /obj/item/ammo_box/generic/shotgun/slug, 30), new /datum/data/wasteland_equipment("Shoddy Energy Cell", /obj/item/stock_parts/cell/ammo/ec/bad, 30), new /datum/data/wasteland_equipment("Shoddy Microfusion Cell", /obj/item/stock_parts/cell/ammo/mfc/bad, 30), new /datum/data/wasteland_equipment("Shoddy Electron Charge Pack", /obj/item/stock_parts/cell/ammo/ecp/bad, 30), @@ -858,8 +858,8 @@ GLOBAL_VAR_INIT(vendor_cash, 0) new /datum/data/wasteland_equipment("14mm Bag", /obj/item/ammo_box/m14mm/improvised, 30), new /datum/data/wasteland_equipment("45-70 Bag", /obj/item/ammo_box/c4570box/improvised, 30), new /datum/data/wasteland_equipment(".30-06 Bag", /obj/item/ammo_box/a3006box/improvised, 30), - new /datum/data/wasteland_equipment("12 Gauge Buckshot box (12 shells)", /obj/item/ammo_box/shotgun/buck, 30), - new /datum/data/wasteland_equipment("12 Gauge Slug box (12 shells)", /obj/item/ammo_box/shotgun/slug, 30), + new /datum/data/wasteland_equipment("12 Gauge Buckshot box (12 shells)", /obj/item/ammo_box/generic/shotgun/buck, 30), + new /datum/data/wasteland_equipment("12 Gauge Slug box (12 shells)", /obj/item/ammo_box/generic/shotgun/slug, 30), new /datum/data/wasteland_equipment("Shoddy Energy Cell", /obj/item/stock_parts/cell/ammo/ec/bad, 30), new /datum/data/wasteland_equipment("Shoddy Microfusion Cell", /obj/item/stock_parts/cell/ammo/mfc/bad, 30), new /datum/data/wasteland_equipment("Shoddy Electron Charge Pack", /obj/item/stock_parts/cell/ammo/ecp/bad, 30), diff --git a/code/modules/antagonists/fugitive/fugitive_outfits.dm b/code/modules/antagonists/fugitive/fugitive_outfits.dm index adef4f1ed3e..f973ce505f3 100644 --- a/code/modules/antagonists/fugitive/fugitive_outfits.dm +++ b/code/modules/antagonists/fugitive/fugitive_outfits.dm @@ -129,7 +129,7 @@ id = /obj/item/card/id backpack_contents = list( - /obj/item/ammo_casing/shotgun/incapacitate = 6 + /obj/item/ammo_casing/generic/shotgun/incapacitate = 6 ) /datum/outfit/bountygrapple/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) diff --git a/code/modules/fallout/obj/spawners/lootdrops.dm b/code/modules/fallout/obj/spawners/lootdrops.dm index 7ff756d013c..1a7eb9e8a6c 100644 --- a/code/modules/fallout/obj/spawners/lootdrops.dm +++ b/code/modules/fallout/obj/spawners/lootdrops.dm @@ -71,7 +71,7 @@ /obj/item/ammo_box/m308 = 1, /obj/item/ammo_box/magazine/m223 = 1, /obj/item/ammo_box/m223 = 1, - /obj/item/ammo_casing/shotgun/buckshot = 1, + /obj/item/ammo_casing/generic/shotgun/buckshot = 1, /obj/item/weapon/stock_parts/cell = 1) */ /obj/effect/spawner/lootdrop/wmelee_low diff --git a/code/modules/jobs/job_types/bos.dm b/code/modules/jobs/job_types/bos.dm index d1745dc9ebb..ea431a9ecfa 100644 --- a/code/modules/jobs/job_types/bos.dm +++ b/code/modules/jobs/job_types/bos.dm @@ -402,7 +402,7 @@ Head Knight name = "Warden-Defender" backpack_contents = list( /obj/item/gun/ballistic/shotgun/hunting = 1, - /obj/item/ammo_box/shotgun/buck = 3, + /obj/item/ammo_box/generic/shotgun/buck = 3, ) */ @@ -852,7 +852,7 @@ Senior Knight name = "Knight-Defender" backpack_contents = list( /obj/item/gun/ballistic/shotgun/police=1, - /obj/item/ammo_box/shotgun/buck=2, + /obj/item/ammo_box/generic/shotgun/buck=2, /obj/item/gun/energy/laser/pistol=1, /obj/item/stock_parts/cell/ammo/ec=2, ) diff --git a/code/modules/jobs/job_types/followers.dm b/code/modules/jobs/job_types/followers.dm index 674c92a2c2e..1eb0f142035 100644 --- a/code/modules/jobs/job_types/followers.dm +++ b/code/modules/jobs/job_types/followers.dm @@ -568,9 +568,9 @@ Follower Volunteer name = "Followers Close Protection Guard" suit_store = /obj/item/gun/ballistic/shotgun/police backpack_contents = list( - /obj/item/ammo_box/shotgun/bean = 1, - /obj/item/ammo_box/shotgun/buck = 1, - /obj/item/ammo_box/shotgun/slug = 1, + /obj/item/ammo_box/generic/shotgun/bean = 1, + /obj/item/ammo_box/generic/shotgun/buck = 1, + /obj/item/ammo_box/generic/shotgun/slug = 1, ) /datum/outfit/loadout/guard_energy diff --git a/code/modules/jobs/job_types/khan.dm b/code/modules/jobs/job_types/khan.dm index 5e48adb9c59..ab7021fa6b5 100644 --- a/code/modules/jobs/job_types/khan.dm +++ b/code/modules/jobs/job_types/khan.dm @@ -195,7 +195,7 @@ belt = /obj/item/storage/belt/bandolier head = /obj/item/clothing/head/helmet/f13/khan backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/book/granter/trait/bigleagues = 1, /obj/item/reagent_containers/hypospray/medipen/stimpak = 3) @@ -321,7 +321,7 @@ glasses = /obj/item/clothing/glasses/sunglasses backpack_contents = list( /obj/item/ammo_box/magazine/d12g = 2, - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/restraints/legcuffs/bola/tactical = 1, /obj/item/reagent_containers/hypospray/medipen/stimpak = 3, /obj/item/book/granter/trait/bigleagues = 1) diff --git a/code/modules/jobs/job_types/legion.dm b/code/modules/jobs/job_types/legion.dm index d5bcf94f006..231fd4af4f7 100644 --- a/code/modules/jobs/job_types/legion.dm +++ b/code/modules/jobs/job_types/legion.dm @@ -368,7 +368,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al suit_store = /obj/item/gun/ballistic/shotgun/trench backpack_contents = list( /obj/item/gun/ballistic/revolver/ballisticfist = 1, - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/gun/ballistic/revolver/m29 = 1, ) @@ -438,7 +438,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al name = "Aspiring Prime Decanus" suit_store = /obj/item/twohanded/spear/lance backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/gun/ballistic/revolver/m29 = 1, /obj/item/ammo_box/m44 = 3, /obj/item/restraints/legcuffs/bola = 1, @@ -451,7 +451,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al backpack_contents = list( /obj/item/shield/riot/legion = 1, /obj/item/gun/ballistic/revolver/ballisticfist = 1, - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/restraints/legcuffs/bola = 1, ) @@ -802,8 +802,8 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al name = "Berserker" suit_store = /obj/item/gun/ballistic/shotgun/automatic/combat/shotgunlever backpack_contents = list( - /obj/item/ammo_box/shotgun/slug = 1, - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/slug = 1, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/twohanded/spear/lance = 1, /obj/item/melee/onehanded/knife/bayonet = 1, /obj/item/restraints/legcuffs/bola = 2, @@ -896,7 +896,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al name = "Skirmish" suit_store = /obj/item/gun/ballistic/shotgun/hunting backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 1, + /obj/item/ammo_box/generic/shotgun/buck = 1, /obj/item/melee/onehanded/knife/bayonet = 1, /obj/item/storage/backpack/spearquiver = 1, /obj/item/reagent_containers/pill/patch/healpoultice = 2, @@ -963,7 +963,7 @@ Weapons Lever shotgun, Grease gun, Repeater carbines, Revolvers, simple guns al name = "Born in the East" suit_store = /obj/item/gun/ballistic/revolver/widowmaker backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 3, + /obj/item/ammo_box/generic/shotgun/buck = 3, /obj/item/reagent_containers/food/drinks/bottle/molotov/filled = 2, /obj/item/lighter/greyscale = 1, ) diff --git a/code/modules/jobs/job_types/ncr.dm b/code/modules/jobs/job_types/ncr.dm index d6cad53016c..0e5317f313f 100644 --- a/code/modules/jobs/job_types/ncr.dm +++ b/code/modules/jobs/job_types/ncr.dm @@ -360,7 +360,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. suit_store = /obj/item/gun/ballistic/shotgun/trench //Over thereee over thereeeee spread the spread the word over thereeee head = /obj/item/clothing/head/f13/ncr/steelpot_goggles/trenchraider backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/clothing/mask/gas = 1, /obj/item/grenade/smokebomb = 2, /obj/item/melee/onehanded/knife/bayonet = 1, @@ -606,8 +606,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. name = "Veteran Ranger Shotgunner" suit_store = /obj/item/gun/ballistic/shotgun/automatic/combat/citykiller backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 3, - /obj/item/ammo_box/shotgun/trainshot = 1, + /obj/item/ammo_box/generic/shotgun/buck = 3, /obj/item/gun/ballistic/revolver/sequoia = 1, /obj/item/ammo_box/c4570box/knockback = 1, ) @@ -940,7 +939,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. /obj/item/gun/ballistic/automatic/pistol/m1911 = 1, /obj/item/ammo_box/magazine/m45 = 3, // /obj/item/storage/bag/money/small/ncrenlisted = 1, - /obj/item/ammo_box/shotgun/bean = 2, + /obj/item/ammo_box/generic/shotgun = 2, /obj/item/melee/classic_baton/militarypolice = 1, /obj/item/stack/crafting/armor_plate = 4, ) @@ -1103,7 +1102,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. suit_store = /obj/item/gun/ballistic/shotgun/hunting head = /obj/item/clothing/head/f13/ncr/steelpot_goggles backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/storage/box/ration/menu_one = 1, ) @@ -1183,7 +1182,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. name = "Sapper" suit_store = /obj/item/gun/ballistic/shotgun/hunting backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/shovel/trench = 1, /obj/item/stack/sheet/mineral/sandbags = 10, /obj/item/storage/box/ration/menu_eight = 1, @@ -1463,7 +1462,7 @@ Weapons Service Rifle, Grease Gun, 9mm pistol, all good. /obj/item/book/granter/trait/techno = 1, /obj/item/clothing/suit/armor/outfit/vest/utility = 1, /obj/item/gun/ballistic/shotgun/hunting = 1, - /obj/item/ammo_box/shotgun/buck = 1, + /obj/item/ammo_box/generic/shotgun/buck = 1, /obj/item/melee/onehanded/knife/survival = 1, /obj/item/metaldetector = 1, /obj/item/weldingtool/largetank = 1, diff --git a/code/modules/jobs/job_types/wasteland.dm b/code/modules/jobs/job_types/wasteland.dm index 887a49312ea..e31ff231680 100644 --- a/code/modules/jobs/job_types/wasteland.dm +++ b/code/modules/jobs/job_types/wasteland.dm @@ -222,8 +222,8 @@ Raider head = /obj/item/clothing/head/helmet/f13/raider/psychotic backpack_contents = list( ///obj/item/gun/ballistic/shotgun/automatic/combat/shotgunlever = 1, - ///obj/item/ammo_box/shotgun/buck = 1, - ///obj/item/ammo_box/shotgun/bean = 1, + ///obj/item/ammo_box/generic/shotgun/buck = 1, + ///obj/item/ammo_box/generic/shotgun/bean = 1, /obj/item/melee/onehanded/club/fryingpan = 1, /obj/item/grenade/chem_grenade/cleaner = 1, ) @@ -525,7 +525,7 @@ Raider /obj/item/restraints/legcuffs/bola = 2, /obj/item/melee/onehanded/slavewhip = 1, ///obj/item/gun/ballistic/shotgun/police = 1, - ///obj/item/ammo_box/shotgun/bean = 2, + ///obj/item/ammo_box/generic/shotgun/bean = 2, /obj/item/restraints/legcuffs/beartrap = 1, /obj/item/restraints/legcuffs = 1, /obj/item/storage/belt/shoulderholster = 1, @@ -579,7 +579,7 @@ Raider /obj/item/stack/sheet/mineral/titanium = 15, /obj/item/stack/ore/blackpowder/twenty = 1, // /obj/item/gun/ballistic/shotgun/automatic/combat/shotgunlever = 1, - // /obj/item/ammo_box/shotgun/slug = 2 + // /obj/item/ammo_box/generic/shotgun/slug = 2 ) /datum/outfit/loadout/nefarious_conman @@ -792,7 +792,7 @@ Raider /obj/item/shovel/trench = 1, /obj/item/cultivator/rake = 1, ///obj/item/gun/ballistic/revolver/single_shotgun = 1, - ///obj/item/ammo_box/shotgun/buck = 1, + ///obj/item/ammo_box/generic/shotgun/buck = 1, /obj/item/clothing/under/f13/jamrock = 1, /obj/item/clothing/head/scarecrow_hat = 1, /obj/item/clothing/shoes/winterboots = 1, @@ -967,7 +967,7 @@ Raider glasses = /obj/item/clothing/glasses/f13/biker //l_hand = /obj/item/gun/ballistic/revolver/caravan_shotgun backpack_contents = list(/obj/item/storage/box/vendingmachine=1, - ///obj/item/ammo_box/shotgun/buck = 2, + ///obj/item/ammo_box/generic/shotgun/buck = 2, ) /datum/outfit/loadout/gambler @@ -1106,7 +1106,7 @@ Raider mask = /obj/item/clothing/mask/balaclava //l_hand = /obj/item/gun/ballistic/revolver/caravan_shotgun backpack_contents = list( - // /obj/item/ammo_box/shotgun/slug=2, + // /obj/item/ammo_box/generic/shotgun/slug=2, /obj/item/reagent_containers/food/drinks/flask/russian=1, /obj/item/reagent_containers/food/drinks/bottle/vodka/badminka=1,) @@ -1507,7 +1507,7 @@ Raider r_hand = /obj/item/gun/ballistic/shotgun/police suit = /obj/item/clothing/suit/armor/medium/vest backpack_contents = list( - /obj/item/ammo_box/shotgun/buck = 2, + /obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/melee/onehanded/knife/hunting = 1, ) @@ -1988,7 +1988,7 @@ Raider /obj/item/clothing/under/f13/eighties = 1, /obj/item/clothing/under/f13/female/eighties = 1, ///obj/item/gun/ballistic/shotgun/trench = 1, - ///obj/item/ammo_box/shotgun/buck = 2, + ///obj/item/ammo_box/generic/shotgun/buck = 2, /obj/item/reagent_containers/pill/healingpowder = 2, /obj/item/reagent_containers/pill/patch/turbo = 2, /obj/item/reagent_containers/pill/patch/jet = 2 @@ -2001,7 +2001,7 @@ Raider /obj/item/clothing/under/f13/eighties = 1, /obj/item/clothing/under/f13/female/eighties = 1, ///obj/item/gun/ballistic/revolver/single_shotgun = 1, - ///obj/item/ammo_box/shotgun/buck = 1, + ///obj/item/ammo_box/generic/shotgun/buck = 1, ///obj/item/gun/ballistic/automatic/smg/greasegun/worn = 1, ///obj/item/ammo_box/magazine/greasegun = 2, /obj/item/reagent_containers/pill/healingpowder = 2 @@ -2014,7 +2014,7 @@ Raider /obj/item/clothing/under/f13/eighties = 1, /obj/item/clothing/under/f13/female/eighties = 1, ///obj/item/gun/ballistic/revolver/single_shotgun = 1, - ///obj/item/ammo_box/shotgun/slug = 1, + ///obj/item/ammo_box/generic/shotgun/slug = 1, /obj/item/reagent_containers/pill/healingpowder = 2, /obj/item/storage/belt/utility/full = 1, // /obj/item/book/granter/crafting_recipe/tribal/eighties = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/f13/insects.dm b/code/modules/mob/living/simple_animal/hostile/f13/insects.dm index d6306aeab44..223b1d852a7 100644 --- a/code/modules/mob/living/simple_animal/hostile/f13/insects.dm +++ b/code/modules/mob/living/simple_animal/hostile/f13/insects.dm @@ -504,7 +504,7 @@ a_intent = INTENT_HARM idlesound = list('sound/f13npc/bloatfly/fly.ogg') blood_volume = 0 - casingtype = /obj/item/ammo_casing/shotgun/bloatfly + casingtype = /obj/item/ammo_casing/generic/shotgun/bloatfly projectiletype = null projectilesound = 'sound/f13npc/bloatfly/shoot2.ogg' //sound_after_shooting = 'sound/f13npc/bloatfly/afterfire1.ogg' @@ -515,9 +515,9 @@ variation_list = list( MOB_COLOR_VARIATION(200, 200, 200, 255, 255, 255), MOB_CASING_LIST(\ - MOB_CASING_ENTRY(/obj/item/ammo_casing/shotgun/bloatfly, 4),\ - MOB_CASING_ENTRY(/obj/item/ammo_casing/shotgun/bloatfly/two, 3),\ - MOB_CASING_ENTRY(/obj/item/ammo_casing/shotgun/bloatfly/three, 3)\ + MOB_CASING_ENTRY(/obj/item/ammo_casing/generic/shotgun/bloatfly, 4),\ + MOB_CASING_ENTRY(/obj/item/ammo_casing/generic/shotgun/bloatfly/two, 3),\ + MOB_CASING_ENTRY(/obj/item/ammo_casing/generic/shotgun/bloatfly/three, 3)\ ) ) desc_short = "A gigantic fly that's more disgusting than actually threatening. Tends to dodge bullets." diff --git a/code/modules/mob/living/simple_animal/hostile/f13/raider.dm b/code/modules/mob/living/simple_animal/hostile/f13/raider.dm index c64f6b83fef..385bb9dcfca 100644 --- a/code/modules/mob/living/simple_animal/hostile/f13/raider.dm +++ b/code/modules/mob/living/simple_animal/hostile/f13/raider.dm @@ -54,7 +54,7 @@ /mob/living/simple_animal/hostile/raider/Initialize() // I dont, but, you can . = ..() if(random_trash_loot) - loot = GLOB.trash_ammo + GLOB.trash_chem + GLOB.trash_clothing + GLOB.trash_craft + GLOB.trash_gun + GLOB.trash_misc + GLOB.trash_money + GLOB.trash_mob + GLOB.trash_part + GLOB.trash_tool + loot = GLOB.trash_chem + GLOB.trash_clothing + GLOB.trash_craft + GLOB.trash_gun + GLOB.trash_misc + GLOB.trash_money + GLOB.trash_mob + GLOB.trash_part + GLOB.trash_tool /obj/effect/mob_spawn/human/corpse/raider name = "Raider" diff --git a/code/modules/mob/living/simple_animal/hostile/f13/supermutant.dm b/code/modules/mob/living/simple_animal/hostile/f13/supermutant.dm index f486d38d3b4..72f4847fefa 100644 --- a/code/modules/mob/living/simple_animal/hostile/f13/supermutant.dm +++ b/code/modules/mob/living/simple_animal/hostile/f13/supermutant.dm @@ -177,7 +177,7 @@ health = 130 retreat_distance = 3 minimum_distance = 2 - casingtype = /obj/item/ammo_casing/shotgun/improvised/simplemob + casingtype = /obj/item/ammo_casing/generic/shotgun/improvised/simplemob projectiletype = null projectilesound = 'sound/f13weapons/shotgun.ogg' sound_after_shooting = 'sound/weapons/shotguninsert.ogg' @@ -186,7 +186,7 @@ auto_fire_delay = GUN_BURSTFIRE_DELAY_FAST ranged_cooldown_time = 4 SECONDS loot = list( - /obj/item/ammo_box/shotgun/improvised, + /obj/item/ammo_box/generic/shotgun, /obj/item/gun/ballistic/revolver/widowmaker, /obj/effect/gibspawner/generic/animal ) @@ -523,7 +523,7 @@ /mob/living/simple_animal/hostile/supermutant/nightkin/rangedmutant/rain/proc/fire_release_wall(dir) for(var/mob/living/target in view(10, src)) - var/obj/item/ammo_casing/casing = new /obj/item/ammo_casing/shotgun/incendiary(get_turf(src)) + var/obj/item/ammo_casing/casing = new /obj/item/ammo_casing/generic/shotgun/incendiary(get_turf(src)) casing.factionize(faction) casing.fire_casing(target, src, null, null, null, ran_zone(), 0, null, null, null, src) qdel(casing) diff --git a/code/modules/mob/living/simple_animal/hostile/f13/wasteanimals.dm b/code/modules/mob/living/simple_animal/hostile/f13/wasteanimals.dm index 1cc31d12c50..0bc7c03e435 100644 --- a/code/modules/mob/living/simple_animal/hostile/f13/wasteanimals.dm +++ b/code/modules/mob/living/simple_animal/hostile/f13/wasteanimals.dm @@ -1165,7 +1165,7 @@ /mob/living/simple_animal/hostile/gelcube/Initialize() . = ..() if(random_trash_loot) - loot = GLOB.trash_ammo + GLOB.trash_chem + GLOB.trash_clothing + GLOB.trash_craft + GLOB.trash_gun + GLOB.trash_misc + GLOB.trash_money + GLOB.trash_mob + GLOB.trash_part + GLOB.trash_tool + loot = GLOB.trash_chem + GLOB.trash_clothing + GLOB.trash_craft + GLOB.trash_gun + GLOB.trash_misc + GLOB.trash_money + GLOB.trash_mob + GLOB.trash_part + GLOB.trash_tool //////////// diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index b0029f73c6b..8dee6f0234c 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -55,7 +55,7 @@ icon_living = "russianrangedelite" maxHealth = 150 health = 150 - casingtype = /obj/item/ammo_casing/shotgun/buckshot + casingtype = /obj/item/ammo_casing/generic/shotgun/buckshot loot = /obj/item/gun/ballistic/rifle/mosin /mob/living/simple_animal/hostile/russian/ranged/officer diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 869e0712f22..9fdda2eb2fd 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -158,7 +158,7 @@ rapid_fire_delay = 6 icon_state = "syndicate_shotgun" icon_living = "syndicate_shotgun" - casingtype = /obj/item/ammo_casing/shotgun/buckshot //buckshot (up to 72.5 brute) fired in a two-round burst + casingtype = /obj/item/ammo_casing/generic/shotgun/buckshot //buckshot (up to 72.5 brute) fired in a two-round burst /mob/living/simple_animal/hostile/renegade/syndicate/civilian minimum_distance = 10 diff --git a/code/modules/projectiles/CMLS/ammo_kinds.dm b/code/modules/projectiles/CMLS/ammo_kinds.dm new file mode 100644 index 00000000000..d7f81c72903 --- /dev/null +++ b/code/modules/projectiles/CMLS/ammo_kinds.dm @@ -0,0 +1,1058 @@ +#define PARTIAL_UNUSED FALSE +/// +/// HI HELLO WELCOME TO DAN AND BUNNY'S CLEVER CMLS AMMO SPRITE AUTOGENERATION SYSTEM YES +/// Is this you: I ADDED IN A NEW AMMO GUN AND NOW ITS INVISIBLE>????? +/// Invisible your ammo no more, cus we've got a system that'll make sure your ammo is visible and pretty IF you follow the rules!!! +/// Rule 1: ALL AMMO ICONS GO IN /icons/obj/ammo/ +/// this is cus we're gonna have one DMI per (visually distinct) ammo type, and we want them all in one place +/// this brings me to... +/// Rule 2: ONE AMMO TYPE PER DMI +/// this is so the automatic sprite compilation system can work its magic without me having to learn *actual* magic +/// trust me you'll thank me later +/// Rule 3: ICON STATES HAVE A RIGID NAMING STRUCTURE THAT MUST BE FOLLOWED +/// the system works off of a system of text identifiers in the sprite names themselves, which define what the sprite is for +/// that's right, the name itself defines if the sprite is an a bullet, a crate, a half-full ammobox, a speedloader with 2/16 bullets, etc +/// the system is as follows: +/// - All box and crate states follow the format "[crate or box]-[when to display it]" +/// - crate-full, box-empty, box-partial, crate-partial-percent-25, etc. +/// - There *must* be a box-full, box-empty, crate-full, and crate-empty state for the system to work +/// - if you don't have these, the system will spam the admins and default to plushies and everyone will laugh +/// - if you have a partial, you have two options: vague partial, or a specific(ish) partial +/// - vague partials are defined with box-partial or crate-partial, and are used to handle cases not handled by more specific partials +/// - It'll be used for any ammo count higher than the highest specific count partial (unless your highest count is equal to the ammo count (though in that case, the full state will be used)) +/// - It'll be used for any ammo percentage higher than the highest specific percent partial (unless you have a 100 percent partial) +/// - It'll be used if there are no specific partials set +/// - If there is no vague partial, the system will use the full state instead for ammo values between full and empty +/// - specific partials have two formats: count-# or percent-# +/// - count-# is used for specific(ish) bullet counts, like box-partial-count-5 +/// - if you have count partials, and the ammo count does not match any of them, the system will round up to the next highest valid partial +/// - percent-# is used for specific(ish) percentages of ammo in a box or crate, like box-partial-percent-25 +/// - if you have percent partials, the system will round the ammo count to a percentage, then find the highest partial that is less than or equal to that percentage +/// - if you have count partials set, those states will be used *if* the ammo count is equal to a valid count state, otherwise it defaults to the percent partials +/// - Be sure to include a 100 percent partial, to handle cases above the highest partial +/// - not required tho, it'll just default to the broad partial if it exists, or the full state otherwise +/// - All bullet states follow the format "bullet-[full or empty]" +/// - bullet-full, bullet-empty, etc. +/// - There *must* be a bullet-full and bullet-empty state for the system to work +/// Rule 4: Have fun! =3 +/// Rule 5: I wrote these rules before I finished it, so most of it is wrong, have fun! + +////////////////// +/// AMMO KINDS /// +/// ////////// /// +/// Defines the different kinds of functionally identical ammo types to be used by the CMLS system. +/// Defines its name, flavoring, CMLS status, and other largely meaningless properties. +/// Also defines the icon states for the ammo and the box, which are used to visually represent the ammo in the game. +/// so it does both box and bullet! wow! +/datum/ammo_kind + /// Base name of the ammo kind, used for the name of the ammo, the box, the crate, and the magazine, as well as the projectile + var/name = "2.22x22mm Sr. Compact" + /// Flavor text for the casing, used for the desc of the casing + var/bullet_flavor = "Some kind of bullet, designed in 1925 by Jean-Krousing von de la Krouse III as a way to turn brass into lead. \ + From the moment he laid eyes on the newest creation by Stubby Jack, he knew what he needed to do, and that was create the best \ + way to turn brass into lead. And so, he did. And it was good. And it was called the Gun Bullet." + /// "You load a 2.22x22mm Sr. Compact round into the chamber." + var/casing_kind = "round" + /// "You are hit by a 2.22x22mm Sr. Compact bullet!" + var/projectile_kind = "bullet" + + /// The name and desc of the associated box + var/box_name = null // set if you want te box to have a custom name + var/box_flavor = null // set if you want the box to have a custom flavor + + /// The name and desc of the associated crate + var/crate_name = null // set if you want te box to have a custom name + var/crate_flavor = null // set if you want the box to have a custom flavor + + /// The name and desc of the associated magazine (if the gun ejects a magazine) + var/magazine_name = null // set if you want te box to have a custom name + var/magazine_flavor = null // set if you want the box to have a custom flavor + + /// The caliber to be assigned to the casing, box, magazine, projectile, and, if applicable, the gun + var/caliber = CALIBER_COMPACT + /// when we're a box and someone tries to insert a bullet, don't convert it *if* the bullet's ammo_kind type is in this list + var/list/compatible_kinds = list() // currently doesnt work + /// the sound properies this bullet makes when fired, when not overwritten by the gun (usually it isnt, but they should be) + var/sound_properties = CSP_PISTOL_LIGHT // look up [code\modules\projectiles\ammo_casing_gun_sound_properties.dm] + /// The icon file the auto-cataloguer will use to collect the icon states + var/ammo_icon = 'icons/obj/ammo/compact.dmi' /// you'll want a separate DMI for each *visually distinct* ammo type + + /// Stuff relating to the damage and such of the bullet + /// Flat damage is the damage dealt in the abcense of a damage list or range + var/damage_flat = 0 + /// Damage list is a weighted list of damage values, which is rolled on to determine the damage dealt + var/list/damage_list = list() + /// Damage range is a range of damage values, which is rolled on to determine the damage dealt + var/list/damage_range = list() // list(10, 20) would be 10-20 damage, inclusive, equal distribution + /// Damage type is the type of damage dealt by the bullet + var/damage_type = BRUTE // look up [code\__DEFINES\combat.dm] around line 6ish + /// Damage armor is the armor type the bullet checks against + var/damage_armor = "bullet" // These arent defines because lol why would they? + /// how many pellets??? + var/pellet_count = 1 // only used for shotguns + var/caseless = FALSE // if the bullet is caseless, it will not leave a casing behind + + var/recoil = 4 // how much recoil the gun has when firing this bullet + + /// ammo has a box associated + var/has_box = TRUE + /// ammo has a crate associated + var/has_crate = TRUE + /// ammo has a bullet associated + var/has_bullet = TRUE // dunno how any of these would work if set to false, so, uh, dont + /// ammo has a magazine associated + var/has_magazine = TRUE + + /// don't touch anything below this line (cus it'll be overwritten!) + /// dont touch these, they're where the auto-generated icon states will go + var/list/bullet_states = list() + var/list/box_states = list() + var/list/crate_states = list() + var/list/magazine_states = list() + + /// No overly complicated system would be complete without the application of MAFFS!!! + /// Autogenerated on world init, whiich is good cus what the fukc is a kurtosis + var/damage_mean = 0 // the average damage dealt by the bullet + var/damage_median = 0 // the median damage dealt by the bullet + var/damage_mode = 0 // the mode damage dealt by the bullet + var/damage_max = 0 // the maximum damage dealt by the bullet + var/damage_min = 0 // the minimum damage dealt by the bullet + var/damage_variance = 0 // the variance of the damage dealt by the bullet + var/damage_stddev = 0 // the standard deviation of the damage dealt by the bullet + var/damage_skew = 0 // the skew of the damage dealt by the bullet + var/damage_kurtosis = 0 // the kurtosis of the damage dealt by the bullet + var/damage_entropy = 0 // the entropy of the damage dealt by the bullet + var/damage_critical = 0 // the critical damage dealt by the bullet + var/damage_critical_chance = 0 // the chance of a critical hit + + /// these are all set by SScmls, dont touch them cus they'll be overwritten + var/box_max_ammo = 0 + var/crate_max_ammo = 0 + /// these too + var/box_raw_cost = 0 + var/box_copper_cost = 0 + var/box_silver_cost = 0 + var/box_gold_cost = 0 + /// also these + var/crate_raw_cost = 0 + var/crate_copper_cost = 0 + var/crate_silver_cost = 0 + var/crate_gold_cost = 0 + +/datum/ammo_kind/New() + . = ..() + CompileStates() + CalcPrices() + CatalogueMe() + CalcSD() + GenerateTGUI() + GenerateAmmoTypeDesign() + +/datum/ammo_kind/proc/CalcPrices() + switch(caliber) + if(CALIBER_COMPACT) + box_raw_cost = SScmls.compact_ammo_price_per_box + crate_raw_cost = SScmls.compact_ammo_price_per_crate + box_max_ammo = SScmls.compact_ammo_per_box + crate_max_ammo = SScmls.compact_ammo_per_crate + if(CALIBER_MEDIUM) + box_raw_cost = SScmls.medium_ammo_price_per_box + crate_raw_cost = SScmls.medium_ammo_price_per_crate + box_max_ammo = SScmls.medium_ammo_per_box + crate_max_ammo = SScmls.medium_ammo_per_crate + if(CALIBER_LONG) + box_raw_cost = SScmls.long_ammo_price_per_box + crate_raw_cost = SScmls.long_ammo_price_per_crate + box_max_ammo = SScmls.long_ammo_per_box + crate_max_ammo = SScmls.long_ammo_per_crate + if(CALIBER_SHOTGUN) + box_raw_cost = SScmls.shotgun_ammo_price_per_box + crate_raw_cost = SScmls.shotgun_ammo_price_per_crate + box_max_ammo = SScmls.shotgun_ammo_per_box + crate_max_ammo = SScmls.shotgun_ammo_per_crate + box_gold_cost = round(box_raw_cost / 100) + box_silver_cost = round((box_raw_cost - (box_gold_cost * 100)) / 10) + box_copper_cost = round(box_raw_cost - (box_gold_cost * 100) - (box_silver_cost * 10)) + crate_gold_cost = round(crate_raw_cost / 100) + crate_silver_cost = round((crate_raw_cost - (crate_gold_cost * 100)) / 10) + crate_copper_cost = round(crate_raw_cost - (crate_gold_cost * 100) - (crate_silver_cost * 10)) + +/datum/ammo_kind/proc/CalcSD() // oh boy is it gonna tell me im 8.5"x6" again?~ + /// first, determine if we just use flat damage + if(!LAZYLEN(damage_list) && !LAZYLEN(damage_range)) + /// okay well first, check if we actually have a damage value set + if(isnull(damage_flat)) + message_admins("No damage values set for [name]!") + log_world("No damage values set for [name]!") + CRASH("No damage values set for [name]!") + damage_mean = damage_flat + damage_median = damage_flat + damage_mode = damage_flat + damage_max = damage_flat + damage_min = damage_flat + damage_variance = 0 + damage_stddev = 0 + damage_skew = 0 + damage_kurtosis = 0 + damage_entropy = 0 + return // phew, that was easy + /// next, determine if we use a damage list, we use this over a range if present + /// lists have the format list("dmg" = weight, "dmg" = weight, etc.) + /// so something like list(10 = 1, 20 = 2, 30 = 1) would be a 25% chance of 10, 50% chance of 20, and 25% chance of 30 + if(LAZYLEN(damage_list)) + var/total = 0 // sum of all weights + var/mean = 0 // mean of the damage + var/sqmean = 0 // mean of the squares of the damage + var/variance = 0 // variance of the damage + var/stddev = 0 // standard deviation of the damage + var/mode = 0 // the most common damage value + var/mode_count = 0 // the count of the most common damage value + var/entropy = 0 // the entropy of the damage list + var/dmg_min = 0 // the smallest damage value + var/dmg_max = 0 // the largest damage value + for(var/dam in damage_list) + var/dmg = text2num(dam) + var/weight = damage_list[dam] + total += weight + mean += dmg * weight + sqmean += dmg * dmg * weight + if(weight > mode_count) + mode_count = weight + mode = dmg + if(!dmg_min || dmg < dmg_min) + dmg_min = dmg + if(!dmg_max || dmg > dmg_max) + dmg_max = dmg + mean /= total + sqmean /= total + variance = sqmean - (mean * mean) + stddev = sqrt(variance) + /// calculate the entropy + for(var/dam in damage_list) + var/weight = damage_list[dam] + entropy += -1 * (weight / total) * log(1 * (weight / total)) + entropy /= log(2) // convert to base 2 + /// calculate the skew + var/skew = 0 + for(var/dam in damage_list) + var/dmg = text2num(dam) + var/weight = damage_list[dam] + skew += ((dmg - mean) * (dmg - mean) * (dmg - mean)) * weight + skew /= (total * stddev * stddev * stddev) + /// calculate the kurtosis + var/kurtosis = 0 // idk what kurtosis is but copilot seems to and its definitely smarter than me + for(var/dam in damage_list) + var/dmg = text2num(dam) + var/weight = damage_list[dam] + kurtosis += ((dmg - mean) * (dmg - mean) * (dmg - mean) * (dmg - mean)) * weight + kurtosis /= (total * stddev * stddev * stddev * stddev) + /// set the values + damage_mean = mean + damage_median = mode + damage_mode = mode + damage_max = dmg_max + damage_min = dmg_min + damage_variance = variance + damage_stddev = stddev + damage_skew = skew + damage_kurtosis = kurtosis + damage_entropy = entropy + /// now check if the highest number in the damage list is significantly higher than the mean + /// if so, this will be our critical damage, otherwise there's no critical damage + if(dmg_max > (mean + (stddev * 1.2))) + damage_critical = dmg_max + /// our damage list is weighted, so we need to calculate the chance of picking the highest value + damage_critical_chance = (damage_list["[dmg_max]"] / total) * 100 + // then, set the max damage to the number that is in the damage list just below the max + // this is so we dont have the readout say it does 20-9000 damage when it just crits for 9000 and does 20-80 normally + var/highest = 0 + var/second_highest = 0 + for(var/dam in damage_list) + var/dmg = text2num(dam) + if(dmg > highest) + second_highest = highest + highest = dmg + damage_max = second_highest + return + /// finally, determine if we use a damage range + if(LAZYLEN(damage_range)) + if(LAZYLEN(damage_range) < 2) // normalize for busted ranges + var/list/newlist = list(damage_range[1], damage_range[1]) + damage_range = newlist + if(LAZYLEN(damage_range) > 2) // normalize for busted ranges + var/list/newlist = list() + var/hiest = 0 + var/loest = 0 + for(var/dmg in damage_range) + if(!loest || dmg < loest) + loest = dmg + if(!hiest || dmg > hiest) + hiest = dmg + newlist += loest + newlist += hiest + damage_range = newlist + var/variance = 0 + var/stddev = 0 + var/entropy = 0 + var/skew = 0 + var/kurtosis = 0 + var/mean = (damage_range[1] + damage_range[2]) / 2 + var/sqmean = (damage_range[1] * damage_range[1] + damage_range[2] * damage_range[2]) / 2 + variance = sqmean - (mean * mean) + stddev = sqrt(variance) + /// calculate the entropy + entropy = -1 * (0.5 * log(0.5) + 0.5 * log(0.5)) / log(2) + /// calculate the skew + skew = 0 + for(var/dmg in damage_range) + skew += ((dmg - mean) * (dmg - mean) * (dmg - mean)) + skew /= (2 * stddev * stddev * stddev) + /// calculate the kurtosis + kurtosis = 0 + for(var/dmg in damage_range) + kurtosis += ((dmg - mean) * (dmg - mean) * (dmg - mean) * (dmg - mean)) + kurtosis /= (2 * stddev * stddev * stddev * stddev) + /// set the values + damage_mean = mean + damage_median = mean + damage_mode = mean + damage_max = max(damage_range[1], damage_range[2]) + damage_min = min(damage_range[1], damage_range[2]) + damage_variance = variance + damage_stddev = stddev + damage_skew = skew + damage_kurtosis = kurtosis + damage_entropy = entropy + return // good enough + /// if we get here, something went wrong + message_admins("No damage values set for [name]!") + log_world("No damage values set for [name]!") + CRASH("No damage values set for [name]!") + +/datum/ammo_kind/proc/CatalogueMe() + SScmls.ammos[type] = src + switch(caliber) + if(CALIBER_COMPACT) + if(has_bullet) + SScmls.all_C_bullet[type] = src + if(has_box) + SScmls.all_C_box[type] = src + if(has_crate) + SScmls.all_C_crate[type] = src + if(CALIBER_MEDIUM) + if(has_bullet) + SScmls.all_M_bullet[type] = src + if(has_box) + SScmls.all_M_box[type] = src + if(has_crate) + SScmls.all_M_crate[type] = src + if(CALIBER_LONG) + if(has_bullet) + SScmls.all_L_bullet[type] = src + if(has_box) + SScmls.all_L_box[type] = src + if(has_crate) + SScmls.all_L_crate[type] = src + if(CALIBER_SHOTGUN) + if(has_bullet) + SScmls.all_S_bullet[type] = src + if(has_box) + SScmls.all_S_box[type] = src + if(has_crate) + SScmls.all_S_crate[type] = src + +/datum/ammo_kind/proc/StoreState(CorB, suffix, partial, key, state) + var/list/statebox + CorB = SScmls.ExtractCORB(CorB) + switch(CorB) + if(CORB_BULLET) + statebox = bullet_states + if(CORB_BOX) + statebox = box_states + if(CORB_CRATE) + statebox = crate_states + if(CORB_MAGAZINE) + statebox = magazine_states + var/suffpart = "[suffix]" + if(partial) + suffpart = "[suffpart]-[partial]" + var/datum/ammo_istate_holder/holder = LAZYACCESS(statebox, suffpart) + if(!holder) + holder = new /datum/ammo_istate_holder(!key) // no key means we only want one state + statebox[suffpart] = holder + holder.AddState(state, key) + switch(CorB) + if(CORB_BULLET) + bullet_states = statebox + if(CORB_BOX) + box_states = statebox + if(CORB_CRATE) + crate_states = statebox + if(CORB_MAGAZINE) + magazine_states = statebox + holder.Sortify() + +/datum/ammo_kind/proc/GetState(CorB, suffix, partial, key) + var/list/statebox + CorB = SScmls.ExtractCORB(CorB) + switch(CorB) + if(CORB_BULLET) + statebox = bullet_states + if(CORB_BOX) + statebox = box_states + if(CORB_CRATE) + statebox = crate_states + if(CORB_MAGAZINE) + statebox = magazine_states + var/suffpart = "[suffix]" + if(partial) + suffpart = "[suffpart]-[partial]" + var/datum/ammo_istate_holder/holder = LAZYACCESS(statebox, suffpart) + if(!holder) + return PARTIAL_UNUSED + return holder.GetState(key) + +/datum/ammo_kind/proc/UsesPartial(CorB, partial) + var/list/statebox + switch(CorB) + if(CORB_BULLET) + statebox = bullet_states + if(CORB_BOX) + statebox = box_states + if(CORB_CRATE) + statebox = crate_states + if(CORB_MAGAZINE) + statebox = magazine_states + var/partiate = "[SUFFIX_PARTIAL]-[partial]" + var/datum/ammo_istate_holder/holder = LAZYACCESS(statebox, partiate) + if(!holder) + return FALSE + return TRUE + +/datum/ammo_kind/proc/GetLowestStateGreaterThanInput(CorB, partial, keyin) + var/list/statebox + CorB = SScmls.ExtractCORB(CorB) + switch(CorB) + if(CORB_BULLET) + CRASH("Bullet partials are not supported!") + if(CORB_BOX) + statebox = box_states + if(CORB_CRATE) + statebox = crate_states + if(CORB_MAGAZINE) + statebox = magazine_states + var/partate = "[SUFFIX_PARTIAL]-[partial]" + var/datum/ammo_istate_holder/holder = LAZYACCESS(statebox, partate) + if(!holder) + return PARTIAL_UNUSED + return holder.GetLowestGreaterThanInput("[keyin]") + + +/// reads our DMI and compiles a list of states for the icon +/datum/ammo_kind/proc/CompileStates() + var/list/my_states = icon_states(ammo_icon) + /// plushie error if the icon is valid (game wont compile if the icon doesnt exist), or it lacks the mandatory states (full and empty) + if(FailState(my_states)) // you fail the state game (Montanafornia isnt a state) + ammo_icon = 'icons/obj/plushes.dmi' + StoreState(CORB_BULLET, SUFFIX_FULL, null, null, "hairball") + StoreState(CORB_BULLET, SUFFIX_EMPTY, null, null, "fermis" ) + StoreState(CORB_BULLET, SUFFIX_PROJ, null, null, "fermis" ) + StoreState(CORB_BOX, SUFFIX_FULL, null, null, "kobold" ) + StoreState(CORB_BOX, SUFFIX_EMPTY, null, null, "fox" ) + StoreState(CORB_BOX, SUFFIX_PARTIAL, PART_BROAD, null, "fox" ) + StoreState(CORB_CRATE, SUFFIX_FULL, null, null, "bird" ) + StoreState(CORB_CRATE, SUFFIX_EMPTY, null, null, "sergal" ) + StoreState(CORB_CRATE, SUFFIX_PARTIAL, PART_BROAD, null, "sergal" ) + StoreState(CORB_MAGAZINE, SUFFIX_FULL, null, null, "hairball") + StoreState(CORB_MAGAZINE, SUFFIX_EMPTY, null, null, "hairball") + StoreState(CORB_MAGAZINE, SUFFIX_PARTIAL, PART_BROAD, null, "hairball") + // default to plushes if we can't find the icon + message_admins("No states found for [name]!") + CRASH("No states found for [name]!") + + /// just to flex my dikc about how many codersprites we have + /// these all need to have had the right names, or all is lost + if(has_bullet) + StoreState(CORB_BULLET, SUFFIX_FULL, null, null, BULLET_FULL_STATE ) + StoreState(CORB_BULLET, SUFFIX_EMPTY, null, null, BULLET_EMPTY_STATE) + StoreState(CORB_BULLET, SUFFIX_PROJ, null, null, BULLET_PROJ_STATE ) + if(has_box) + StoreState(CORB_BOX, SUFFIX_FULL, null, null, BOX_FULL_STATE ) + StoreState(CORB_BOX, SUFFIX_EMPTY, null, null, BOX_EMPTY_STATE ) + if(has_crate) + StoreState(CORB_CRATE, SUFFIX_FULL, null, null, CRATE_FULL_STATE ) + StoreState(CORB_CRATE, SUFFIX_EMPTY, null, null, CRATE_EMPTY_STATE ) + if(has_magazine) + StoreState(CORB_MAGAZINE, SUFFIX_FULL, null, null, MAGAZINE_FULL_STATE ) + StoreState(CORB_MAGAZINE, SUFFIX_EMPTY, null, null, MAGAZINE_EMPTY_STATE) + + + /// Now check for extra partials and add them to the list + /// ANATOMY OF A PARTIAL: [CORB]-[PARTIAL-or-magazine-suffix]-[COUNT OR PERCENT]-[NUMBER] + for(var/istate in my_states) + var/list/partial_breakup = splittext(istate, "-") + if(LAZYACCESS(partial_breakup, 2) != SUFFIX_PARTIAL) + continue + var/CorB = SScmls.ExtractCORB(LAZYACCESS(partial_breakup, 1)) + if(!LAZYACCESS(partial_breakup, 3)) // it was a broad partial + StoreState(CorB, SUFFIX_PARTIAL, PART_BROAD, null, istate) + continue + // a specific partial! maybe. first entry should be count or percent, the second a number + /// strip out any non-numaerical characters from the second entry + var/onum = LAZYACCESS(partial_breakup, 4) // "box-partial-something-number" + var/nunum = "" + for(var/i in 1 to LAZYLEN(onum)) + var/letr = onum[i] + if(letr in list("0","1","2","3","4","5","6","7","8","9")) // brilliant + nunum = "[nunum][letr]" + if(!nunum) + continue + /// now we have a number, we can check if it's a count or a percent + if(partial_breakup[3] == PART_COUNT) + StoreState(CorB, SUFFIX_PARTIAL, PART_COUNT, "[nunum]", istate) + continue + if(partial_breakup[3] == PART_PERCENT) + StoreState(CorB, SUFFIX_PARTIAL, PART_PERCENT, "[nunum]", istate) + continue + +/datum/ammo_kind/proc/FailState(states) + if(!LAZYLEN(states)) + return TRUE + if(has_bullet) + if(!("[BULLET_FULL_STATE]" in states)) + return TRUE + if(!("[BULLET_EMPTY_STATE]" in states)) + return TRUE + if(!("[BULLET_PROJ_STATE]" in states)) + return TRUE + if(has_box) + if(!("[BOX_FULL_STATE]" in states)) + return TRUE + if(!("[BOX_EMPTY_STATE]" in states)) + return TRUE + if(has_crate) + if(!("[CRATE_FULL_STATE]" in states)) + return TRUE + if(!("[CRATE_EMPTY_STATE]" in states)) + return TRUE + if(!has_bullet && !has_box && !has_crate) // then what're you doing here!!! + return TRUE + return FALSE + +/datum/ammo_kind/proc/CrudeInsertionSort(list/countstates) + if(!LAZYLEN(countstates)) + return list() + var/list/ordered = list() + ordered.len = LAZYLEN(countstates) + var/i = 1 + var/safety_counter = 100 + while(LAZYLEN(countstates) && safety_counter--) + var/lowest = null + for(var/istate in countstates) + var/ttn = text2num(istate) + if(!lowest) // THATS RIGHT WE USING INSERTION SORT BAYBEE + lowest = text2num(istate) + if(ttn < lowest) + lowest = ttn + if(lowest == null) + break // just error, idfk + ordered[i] = countstates["[lowest]"] + countstates -= ordered[i] + i++ + return ordered + +/// converts A and B from text to numbers, then returns a Tim sort friendly comparison that'll sort from smallest at the top to biggest at the bottom + +/// full overwrite of the bullet with our bullet data +/// Will change caliber! Be careful! +/datum/ammo_kind/proc/AKSetupBullet(obj/item/ammo_casing/generic/AC) + if(!istype(AC)) + return + AC.ammo_kind = type + AC.caliber = caliber + AC.sound_properties = sound_properties + AC.pellets = pellet_count + AKSetupProjectile(AC.BB) + AKSkinBullet(AC) + +/// Sets the actual functional properties of the bullet, like the damage, armor type, and damage type +/datum/ammo_kind/proc/AKSetupProjectile(obj/item/projectile/BB) + if(!istype(BB)) + return + BB.damage = damage_mean + BB.damage_type = damage_type + BB.flag = damage_armor // dunno why its flag on the projectile + BB.damage_list = damage_list + BB.damage_low = damage_min + BB.damage_high = damage_max + BB.name = GetBulletProjectileName(BB) + BB.icon = GetBulletIcon() + BB.icon_state = GetBulletProjectileIconState(BB) + BB.recoil = recoil + BB.desc = "If you can read this, you're too close!" + +/datum/ammo_kind/proc/ShouldConvertBullet(obj/item/ammo_casing/generic/AC) + if(!istype(AC)) + return FALSE + if(!LAZYLEN(compatible_kinds)) + return TRUE + for(var/ammokind in compatible_kinds) + if(ammokind == AC.ammo_kind) + return FALSE + return TRUE + +/// Sets the non-functional properties of the bullet, like the name, flavor, and icon state +/datum/ammo_kind/proc/AKSkinBullet(obj/item/ammo_casing/generic/AC, soft) + if(!istype(AC)) + return + if(soft) + if(!ShouldConvertBullet(AC)) + return + AC.ammo_kind = type + AC.name = GetBulletName(AC) + AC.desc = GetBulletFlavor(AC) + AC.icon = GetBulletIcon() + AC.icon_state = GetBulletIconState(AC) + +/// Updates the bullet's icon state +/datum/ammo_kind/proc/AKUpdateBullet(obj/item/ammo_casing/generic/AC) + if(!istype(AC)) + return + AC.icon_state = GetBulletIconState(AC) + +/// full overwrite of the box with our box data, including ammo count, max, etc +/datum/ammo_kind/proc/AKSetupBox(obj/item/ammo_box/generic/mag, CorB = CORB_BOX, obj/item/gun/ballistic/gunthing) + if(!istype(mag)) + return + mag.box_CorB = SScmls.ExtractCORB(CorB || mag.box_CorB) + mag.ammo_kind = type + mag.caliber = list(caliber) + switch(caliber) + if(CALIBER_COMPACT) + switch(CorB) + if(CORB_BOX) + mag.max_ammo = SScmls.compact_ammo_per_box + if(CORB_CRATE) + mag.max_ammo = SScmls.compact_ammo_per_crate + if(CORB_MAGAZINE) + mag.max_ammo = 1 + if(CALIBER_MEDIUM) + switch(CorB) + if(CORB_BOX) + mag.max_ammo = SScmls.medium_ammo_per_box + if(CORB_CRATE) + mag.max_ammo = SScmls.medium_ammo_per_crate + if(CORB_MAGAZINE) + mag.max_ammo = 1 + if(CALIBER_LONG) + switch(CorB) + if(CORB_BOX) + mag.max_ammo = SScmls.long_ammo_per_box + if(CORB_CRATE) + mag.max_ammo = SScmls.long_ammo_per_crate + if(CORB_MAGAZINE) + mag.max_ammo = 1 + if(CALIBER_SHOTGUN) + switch(CorB) + if(CORB_BOX) + mag.max_ammo = SScmls.shotgun_ammo_per_box + if(CORB_CRATE) + mag.max_ammo = SScmls.shotgun_ammo_per_crate + if(CORB_MAGAZINE) + mag.max_ammo = 1 + AKSkinBox(mag, TRUE) // just in case its fulla ammos + mag.start_empty = FALSE + if(istype(gunthing)) + mag.PrepForGun(gunthing) + mag.init_ammo() + AKUpdateBox(mag) + +/// full overwrite of the box with our box data, including ammo count, max, etc +/datum/ammo_kind/proc/AKSetupMagazine(obj/item/ammo_box/generic/magazine/mag, obj/item/ammo_box/generic/source) + if(!istype(mag) || !istype(source)) + return + mag.MagazineifyFrom(source) + mag.LoadFromSource(source) + AKSkinBox(mag, TRUE) // just in case its fulla ammos + AKUpdateBox(mag) + +/// Sets the non-functional properties of the box, like the name, flavor, and icon state +/datum/ammo_kind/proc/AKSkinBox(obj/item/ammo_box/generic/mag, bullets_too) + if(!istype(mag)) + return + var/CorB = SScmls.ExtractCORB(mag.box_CorB) + mag.ammo_kind = type + switch(CorB) + if(CORB_BULLET) + return + if(CORB_BOX) + mag.name = GetBoxName(mag) + mag.desc = GetBoxFlavor(mag) + if(CORB_CRATE) + mag.name = GetCrateName(mag) + mag.desc = GetCrateFlavor(mag) + if(CORB_MAGAZINE) + mag.name = GetMagazineName(mag) + mag.desc = GetMagazineFlavor(mag) + mag.icon = GetBoxIcon() + mag.icon_state = GetBoxIconState(mag) + if(bullets_too) + for(var/obj/item/ammo_casing/generic/AC in mag.contents) + AKSkinBullet(AC, TRUE) + +/// Updates the box's icon state +/datum/ammo_kind/proc/AKUpdateBox(obj/item/ammo_box/generic/mag) + if(!istype(mag)) + return + mag.icon_state = GetBoxIconState(mag) + +/// generates some guff for TGUI, for the vendor thing that totally exists +/// actually makes two, one for a box, one for a crate +/datum/ammo_kind/proc/GenerateTGUI() + var/list/dat = list() + /// first, the box + var/cmls + var/C_M_L_S = "???" + var/rawcost = 0 + var/coppercost = 0 + var/silvercost = 0 + var/goldcost = 0 + var/dam_flat = !LAZYLEN(damage_list) && !LAZYLEN(damage_range) ? damage_flat : "X" + var/dam_min = round(damage_min, 0.1) + var/dam_max = round(damage_max, 0.1) + var/dam_mean = round(damage_mean, 0.1) + var/dam_median = round(damage_median, 0.1) + var/dam_mode = round(damage_mode, 0.1) + var/dam_variance = round(damage_variance, 0.1) + var/dam_stddev = round(damage_stddev, 0.1) + var/dam_skew = round(damage_skew, 0.1) + var/dam_kurtosis = round(damage_kurtosis, 0.1) + var/dam_entropy = round(damage_entropy, 0.1) + var/dam_crit = damage_critical ? damage_critical : "X" + var/dam_crit_chance = damage_critical_chance ? round(damage_critical_chance, 0.1) : "X" + var/shorteneddesc = bullet_flavor + /// okay check if the highest damage value is significantly higher than the mean + /// we'll call that the crit value + if(LAZYLEN(shorteneddesc) > 100) + shorteneddesc = copytext(shorteneddesc, 1, 97) + "..." + if(has_box) + dat = list() + rawcost = SScmls.compact_ammo_price_per_box + switch(caliber) + if(CALIBER_COMPACT) + cmls = "Compact Ammo Boxes" + C_M_L_S = "C" + if(CALIBER_MEDIUM) + cmls = "Medium Ammo Boxes" + C_M_L_S = "M" + if(CALIBER_LONG) + cmls = "Long Ammo Boxes" + C_M_L_S = "L" + if(CALIBER_SHOTGUN) + cmls = "Shotgun Ammo Boxes" + C_M_L_S = "S" + goldcost = round(rawcost / 100) + silvercost = round((rawcost - (goldcost * 100)) / 10) + coppercost = round(rawcost - (goldcost * 100) - (silvercost * 10)) + dat["Category"] = cmls + dat["Name"] = "[name] Box ([C_M_L_S])" + dat["Crate"] = FALSE + dat["MaxAmmo"] = box_max_ammo + dat["Desc"] = bullet_flavor + dat["ShortDesc"] = shorteneddesc + dat["RawCost"] = rawcost + dat["CopperCost"] = coppercost + dat["SilverCost"] = silvercost + dat["GoldCost"] = goldcost + dat["C_M_L_S"] = C_M_L_S + dat["Caliber"] = caliber + dat["KindPath"] = "[type]" + dat["IsBox"] = TRUE + dat["IsCrate"] = FALSE + dat["DamageFlat"] = dam_flat + dat["DamageMin"] = dam_min + dat["DamageMax"] = dam_max + dat["DamageMean"] = dam_mean + dat["DamageMedian"] = dam_median + dat["DamageMode"] = dam_mode + dat["DamageVariance"] = dam_variance + dat["DamageStdDev"] = dam_stddev + dat["DamageSkew"] = dam_skew + dat["DamageKurtosis"] = dam_kurtosis + dat["DamageEntropy"] = dam_entropy + dat["DamageCrit"] = dam_crit + dat["DamageCritChance"] = dam_crit_chance + SScmls.data_for_tgui += list(dat) + /// then, the crate + if(has_crate) + dat = list() + rawcost = SScmls.compact_ammo_price_per_crate + coppercost = 0 + silvercost = 0 + goldcost = 0 + switch(caliber) + if(CALIBER_COMPACT) + cmls = "Compact Ammo Crates" + if(CALIBER_MEDIUM) + cmls = "Medium Ammo Crates" + if(CALIBER_LONG) + cmls = "Long Ammo Crates" + if(CALIBER_SHOTGUN) + cmls = "Shotgun Ammo Crates" + goldcost = round(rawcost / 100) + silvercost = round((rawcost - (goldcost * 100)) / 10) + coppercost = round(rawcost - (goldcost * 100) - (silvercost * 10)) + dat["Category"] = cmls + dat["Name"] = "[name] Crate ([C_M_L_S])" + dat["Desc"] = bullet_flavor + dat["Crate"] = TRUE + dat["MaxAmmo"] = crate_max_ammo + shorteneddesc = bullet_flavor + if(LAZYLEN(shorteneddesc) > 100) + shorteneddesc = copytext(shorteneddesc, 1, 97) + "..." + dat["ShortDesc"] = shorteneddesc + dat["RawCost"] = rawcost + dat["CopperCost"] = coppercost + dat["SilverCost"] = silvercost + dat["GoldCost"] = goldcost + dat["C_M_L_S"] = C_M_L_S + dat["Caliber"] = caliber + dat["KindPath"] = "[type]" + dat["IsBox"] = FALSE + dat["IsCrate"] = TRUE + dat["DamageFlat"] = dam_flat + dat["DamageMin"] = dam_min + dat["DamageMax"] = dam_max + dat["DamageMean"] = dam_mean + dat["DamageMedian"] = dam_median + dat["DamageMode"] = dam_mode + dat["DamageVariance"] = dam_variance + dat["DamageStdDev"] = dam_stddev + dat["DamageSkew"] = dam_skew + dat["DamageKurtosis"] = dam_kurtosis + dat["DamageEntropy"] = dam_entropy + dat["DamageCrit"] = dam_crit + dat["DamageCritChance"] = dam_crit_chance + SScmls.data_for_tgui += list(dat) + + +/// For the lathe to build our ammo without having to make a million other datums, PAUL +/// generates boxes! It's a box generator! +/datum/ammo_kind/proc/GenerateAmmoTypeDesign() + var/C_or_M_or_L_or_S = "???" + var/compactorsuch = "???" + switch(caliber) + if(CALIBER_COMPACT) + C_or_M_or_L_or_S = "C" + compactorsuch = "Compact Ammo" + if(CALIBER_MEDIUM) + C_or_M_or_L_or_S = "M" + compactorsuch = "Medium Ammo" + if(CALIBER_LONG) + C_or_M_or_L_or_S = "L" + compactorsuch = "Long Ammo" + if(CALIBER_SHOTGUN) + C_or_M_or_L_or_S = "S" + compactorsuch = "Shotgun Ammo" + if(has_box) + var/datum/design/ammolathe/amo = new() + amo.name = "[GetBoxName()] ([C_or_M_or_L_or_S])" + amo.id = ckey("[type]_[C_or_M_or_L_or_S]") + amo.build_path = /obj/item/ammo_box/generic + var/catbox = "[compactorsuch] Box" + SScmls.design_cats |= catbox + amo.box_CorB = CORB_BOX + amo.category = list("initial", "[catbox]") + amo.ammotype = type + /// and a crate + if(has_crate) + var/datum/design/ammolathe/amo_crate = new() + amo_crate.name = "[GetCrateName()] ([C_or_M_or_L_or_S])" + amo_crate.id = ckey("[type]_[C_or_M_or_L_or_S]_crate") + amo_crate.build_path = /obj/item/ammo_box/generic/crate + var/catcrate = "[compactorsuch] Crate" + SScmls.design_cats |= catcrate + amo_crate.box_CorB = CORB_CRATE + amo_crate.category = list("initial", "[catcrate]") + amo_crate.ammotype = type + + + +/datum/ammo_kind/proc/GetBulletIcon() + return ammo_icon + +/datum/ammo_kind/proc/GetBulletName(obj/item/ammo_casing/AC) + if(!AC) + return "[name] [casing_kind]" + if(!AC.BB) + return "Spent [name] [casing_kind]" + return "[name] [casing_kind]" + +/datum/ammo_kind/proc/GetBulletFlavor(obj/item/ammo_casing/AC) + if(!AC) + return "Probably a bullet? Not sure" + var/list/desclines = list() + if(bullet_flavor) + desclines += bullet_flavor + else + desclines += "This is some kind of bullet. It's probably dangerous if you put it into something that shoots it. Speaking of..." + desclines += span_notice("This is a [span_green("[capitalize("[caliber]")]")]! It'll fit in any gun or box that can hold [span_green("[capitalize("[caliber]")]")]!") + return desclines.Join("
") + +/datum/ammo_kind/proc/GetBulletProjectileName(obj/item/projectile/AC) + return "[name] [projectile_kind]" + +/datum/ammo_kind/proc/GetBulletProjectileIconState(obj/item/projectile/AC) + return GetState(CORB_BULLET, SUFFIX_PROJ, null, null) + +/datum/ammo_kind/proc/GetBulletIconState(obj/item/ammo_casing/AC) + if(!has_bullet) + CRASH("BULLET STATE REQUESTED FOR [name] BUT NO BULLET STATES DEFINED! might want to fix that") + if(!AC || !AC.BB) + return GetState(CORB_BULLET, SUFFIX_EMPTY, null, null) + return GetState(CORB_BULLET, SUFFIX_FULL, null, null) + +/datum/ammo_kind/proc/GetBoxName(obj/item/ammo_box/generic/mag) + if(mag?.rawname) + return mag.rawname + if(box_name) + return box_name + return "[name] box" + +/datum/ammo_kind/proc/GetCrateName(obj/item/ammo_box/generic/mag) + if(crate_name) + return crate_name + return "[name] crate" + +/datum/ammo_kind/proc/GetCrateFlavor(obj/item/ammo_box/generic/mag) + if(!mag) + return "A crate of ammo. It's a box, and it supposedly holds ammo. Neat!" + var/list/desclines = list() + if(crate_flavor) + desclines += crate_flavor + else + desclines += "This is some kind of crate that's supposed to hold ammo. It's pretty big, able to hold a lot more bullets than a box. Speaking of..." + desclines += span_notice("This is a [span_green("[capitalize("[caliber]")]")] crate! It'll hold any [span_green("[capitalize("[caliber]")]")] ammo!") + return desclines.Join("
") + +/datum/ammo_kind/proc/GetBoxFlavor(obj/item/ammo_box/generic/mag) + if(!mag) + return "A box of ammo. It's a box, and it supposedly holds ammo. Neat!" + var/list/desclines = list() + if(box_flavor) + desclines += box_flavor + else + desclines += "This is some kind of box that's supposed to hold ammo. It's pretty small, able to hold a few bullets. Speaking of..." + desclines += span_notice("This is a [span_green("[capitalize("[caliber]")]")] box! It'll hold any [span_green("[capitalize("[caliber]")]")] ammo!") + return desclines.Join("
") + +/datum/ammo_kind/proc/GetMagazineName(obj/item/ammo_box/generic/mag) + if(magazine_name) + return magazine_name + return "[name] magazine" + +/datum/ammo_kind/proc/GetMagazineFlavor(obj/item/ammo_box/generic/mag) + if(!mag) + return "A magazine of ammo. It's a box, and it supposedly holds ammo. Neat!" + var/list/desclines = list() + if(magazine_flavor) + desclines += magazine_flavor + else + desclines += "This is some kind of magazine that's supposed to hold ammo. It's pretty small, able to hold a few bullets. Speaking of..." + desclines += span_notice("This is a [span_green("[capitalize("[caliber]")]")] magazine! It'll hold any [span_green("[capitalize("[caliber]")]")] ammo!") + return desclines.Join("
") + +/datum/ammo_kind/proc/GetBoxIcon() + return ammo_icon + +/datum/ammo_kind/proc/GetBoxIconState(obj/item/ammo_box/generic/mag, box_or_crate_override) + if(!mag) + return GetState(CORB_BOX, SUFFIX_EMPTY, null, null) || GetState(CORB_CRATE, SUFFIX_EMPTY, null, null) + var/mag_size = mag.max_ammo + var/mag_loaded = mag.ammo_count(TRUE) // also get empties for revolvers (not that it matters) + var/CB = SScmls.ExtractCORB(box_or_crate_override || mag.box_CorB || CORB_BOX) + /// first, check if we are full! + if(mag_loaded >= mag_size) + return GetState(CB, SUFFIX_FULL, null, null ) + /// then, check if we are empty! + if(mag_loaded < 1) + return GetState(CB, SUFFIX_EMPTY, null, null) + /// finally, we are partial! We'll default to the broad partial, or "Full" if there is no broad partial, if there isnt a valid partial + /// first check if we have a specific match in the specifics + if(UsesPartial(CB, PART_COUNT)) + var/countstat = GetState(CB, SUFFIX_PARTIAL, PART_COUNT, "[mag_loaded]") // shoot in the dark and see if we have a count partial that matches our ammo count + if(countstat) + return countstat + var/vaguetry = GetLowestStateGreaterThanInput(CB, PART_COUNT, "[mag_loaded]") + if(vaguetry) + return vaguetry + // if not, check the percentages + if(UsesPartial(CB, PART_PERCENT)) + var/percent = round((mag_loaded / mag_size) * 100) + if(percent > 100) // we can't have more than 100% ammo, so if we do + percent = 100 + var/exactstate = GetState(CB, SUFFIX_PARTIAL, PART_PERCENT, "[percent]") + if(exactstate) + return exactstate + var/vaguetry = GetLowestStateGreaterThanInput(CB, PART_PERCENT, "[percent]") + if(vaguetry) + return vaguetry + return GetState(CB, SUFFIX_PARTIAL, PART_BROAD, null) || GetState(CB, SUFFIX_FULL, null, null) // default to full if we don't have a broad partial + + + + + + + + + + +///////////////////////////AMMO KINDS/////////////////////////// +/datum/ammo_istate_holder + var/list/states = list() + var/one_state = null + +/datum/ammo_istate_holder/proc/AddState(state, key) + if(!key) + one_state = state + else + states[key] = state + SScmls.num_ammo_states++ + +/datum/ammo_istate_holder/proc/GetState(key) + if(one_state) + return one_state // BABYALIEN ONEARTH + if(!LAZYLEN(states)) // nothing stored, perfectly valid, return PARTIAL_UNUSED + return PARTIAL_UNUSED + return LAZYACCESS(states, key) + +/// compares the input with our list of (hopefully) numbers +/// any key in our list that is a number greater than the input is stored +/// if more than one key is stored, the lowest key is returned +/// Basically it's looking for a key that is the lowest number greater than the input +/datum/ammo_istate_holder/proc/GetLowestGreaterThanInput(txtcount) + if(one_state) + return one_state // BABYALIEN ONEARTH + if(!LAZYLEN(states)) // nothing stored, perfectly valid, return PARTIAL_UNUSED + return PARTIAL_UNUSED + var/count = text2num(txtcount) + var/lowesthigher = null + for(var/key in states) + var/numkey = text2num(key) + if(numkey > count) + if(!lowesthigher || numkey < lowesthigher) + lowesthigher = numkey + if(!isnull(lowesthigher)) + return LAZYACCESS(states, "[lowesthigher]") + return FALSE + +/datum/ammo_istate_holder/proc/Sortify() + states = sort_list(states, /proc/cmp_text2num) + +/proc/cmp_text2num(A, B) + return text2num(A) - text2num(B) + + + + diff --git a/code/modules/projectiles/CMLS/ammo_vendor.dm b/code/modules/projectiles/CMLS/ammo_vendor.dm new file mode 100644 index 00000000000..aaa0e24a1ae --- /dev/null +++ b/code/modules/projectiles/CMLS/ammo_vendor.dm @@ -0,0 +1,129 @@ + +///////////////////////////////////////////////////////////////// +/// and a vending machine for the ammo, cus lathes are for chumps +/obj/structure/CMLS_ammo_vending_machine + name = "Ammo Vending Machine" + desc = "An Adventurer's Guild Port-A-Shop Ammo Vendor 2000, linked to the Guild's central armory (courtesey of the Great Eastern Hiveblob). \ + You can buy ammo boxes and crates here!" + icon = 'icons/obj/vending.dmi' + icon_state = "sustenance" + max_integrity = INFINITY + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ON_FIRE | UNACIDABLE | ACID_PROOF + +/obj/structure/CMLS_ammo_vending_machine/examine(mob/user) + . = ..() + . += "This machine is linked with your [span_notice("QuestBank account")], able to purchase things using the cash stored in your \ + [span_notice("Questbook")]. No need to insert coins! If you do try to insert coins, they'll instead be deposited into your \ + [span_notice("QuestBank account")]." + . += "Ammunition is divided into four categories: [span_notice("Compact")], [span_notice("Medium")], [span_notice("Long")], and \ + [span_notice("Shotgun")]. This part is important, as it defines which guns they'll fit in." + . += "In each category, there are a list of ammo types that you can purchase. The calibers and such are \ + [span_notice("cosmetic and largely interchangeable")], and can be changed to any other flavor of ammo within its C.M.L.S. category \ + at any time by [span_notice("Alt or Ctrl-Shift clicking")] on the ammo box or bullet." + . += "Ammo that is loaded into a gun will be automatically converted to the gun's prefered flavor of ammo." + +/obj/structure/CMLS_ammo_vending_machine/attackby(obj/item/I, mob/living/user, params, damage_override) + . = ..() + if(istype(I, /obj/item/stack/f13Cash) || istype(I, /obj/item/card)) + RelayDeposit(user) + +/obj/structure/CMLS_ammo_vending_machine/ui_interact(mob/user, datum/tgui/ui) + . = ..() + add_fingerprint(usr) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "AmmoVendor2000", capitalize(src.name)) + ui.open() + +/obj/structure/CMLS_ammo_vending_machine/ui_data(mob/user) + . = ..() + var/datum/quest_book/QB = SSeconomy.get_quest_book(user) + if(!QB) + .["QBcash"] = "ERROR!!!" + else + .["QBcash"] = CREDITS_TO_COINS(QB.unclaimed_points) + .["Username"] = user.real_name + .["UserCkey"] = user.ckey + .["UserQUID"] = SSeconomy.extract_quid(user) + /// and a handy helper to tell the player what CMLSes of their guns tha tthey have are + var/list/fount = list() + var/list/their_stuff = get_all_in_turf(user) + for(var/obj/item/gun/ballistic/gunB in their_stuff) + if(istype(gunB, /obj/item/gun/ballistic) && istype(gunB.magazine, /obj/item/ammo_box/generic)) + var/obj/item/ammo_box/generic/mag = gunB.magazine + var/cmls = LAZYACCESS(mag.caliber, 1) + switch(cmls) + if(CALIBER_COMPACT) + fount |= "Compact" + if(CALIBER_MEDIUM) + fount |= "Medium" + if(CALIBER_LONG) + fount |= "Long" + if(CALIBER_SHOTGUN) + fount |= "Shotgun" + .["TheirCMLSes"] = english_list(fount) + +/obj/structure/CMLS_ammo_vending_machine/ui_static_data(mob/user) + . = ..() + .["AllItems"] = SScmls.data_for_tgui + .["CurrencyUnit"] = SSeconomy.currency_unit + .["CurrencyName"] = SSeconomy.currency_name + .["CurrencyPlural"] = SSeconomy.currency_name_plural + +/obj/structure/CMLS_ammo_vending_machine/ui_act(action, params) + . = ..() + add_fingerprint(usr) + . = TRUE + var/mob/user = SSeconomy.quid2mob(params["UserQUID"]) + if(!user || !user.client) + return + if(action == "PurchaseAmmo") + var/datum/ammo_kind/AK = SScmls.GetAmmoKind(text2path(params["DesiredAmmoKind"])) + if(!istype(AK)) + to_chat(user, span_alert("That's not something for sale, I think?")) + return + PurchaseAmmo(user, AK, params["CrateOrBox"]) + if(action == "ClickedCashThing") + RelayDispenseTicket(user) + +/obj/structure/CMLS_ammo_vending_machine/proc/PurchaseAmmo(mob/user, datum/ammo_kind/AK, CorB = "Box") + if(!user || !AK) + return + var/datum/quest_book/QB = SSeconomy.get_quest_book(user) + if(!QB) + to_chat(user, span_alert("You don't have a Questbook! Wierd, cus everyone should have one. Maybe you lost it? Maybe contact an admin?")) + return + CorB = SScmls.ExtractCORB(CorB) + var/costus = 0 + if(CorB == CORB_BOX) + costus = AK.box_raw_cost + else if(CorB == CORB_CRATE) + costus = AK.crate_raw_cost + else + costus = INFINITY + if(!CanAfford(QB, costus)) + to_chat(user, span_alert("You can't afford that ammo!")) + return + QB.adjust_funds(COINS_TO_CREDITS(-costus), update_overall = TRUE) + var/obj/item/ammo_box/generic/mag = new(get_turf(user)) + AK.AKSetupBox(mag, CorB) + playsound(src, 'sound/machines/ammovendor_dispense.ogg', 80, TRUE) + to_chat(user, span_green("You've purchased a [mag.name] for [SSeconomy.format_currency(costus)]!")) + +/obj/structure/CMLS_ammo_vending_machine/proc/CanAfford(datum/quest_book/QB, costus) + if(!QB || !isnum(costus)) + return FALSE + return QB.unclaimed_points >= COINS_TO_CREDITS(costus) + +/obj/structure/CMLS_ammo_vending_machine/proc/RelayDeposit(mob/user) + var/datum/quest_book/QB = SSeconomy.get_quest_book(user) + if(!QB) + return + QB.operate_cash_machine() + +/obj/structure/CMLS_ammo_vending_machine/proc/RelayDispenseTicket(mob/user) + var/datum/quest_book/QB = SSeconomy.get_quest_book(user) + if(!QB) + return + QB.cash_out() + diff --git a/code/modules/projectiles/CMLS/compact.dm b/code/modules/projectiles/CMLS/compact.dm new file mode 100644 index 00000000000..e5e1896ee82 --- /dev/null +++ b/code/modules/projectiles/CMLS/compact.dm @@ -0,0 +1,105 @@ +/datum/ammo_kind/compact + name = "compact" + bullet_flavor = "A small, compact bullet. It's small, it's compact, and it's a bullet. Back in 2235, the Compact Bullet was designed by \ + Dr. Compact, hero of the Compact Wars, to be the most compact bullet in the galaxy. The sheer compactness of its load complemented \ + its compact design, and it was called the Compact Bullet." + casing_kind = "bullet" + projectile_kind = "bullet" + box_name = "box of compact bullets" + box_flavor = "A box of small bullets designed for small guns. Low damage and high capacity, compact bullets are the perfect choice for \ + those who like to shoot a lot of bullets." + crate_name = "crate of compact bullets" + crate_flavor = "A high-capacity crate of small bullets designed for small guns. Holds an absurd amount of bullets, which is good, because \ + compact bullets aren't as powerful as their larger counterparts." + magazine_name = "compact magazine" + magazine_flavor = "A small magazine designed for small guns. Holds compact bullets, which are small and compact. The compact magazine is the \ + perfect choice for those who like to shoot a lot of bullets." + caliber = CALIBER_COMPACT + sound_properties = CSP_PISTOL_LIGHT + ammo_icon = 'icons/obj/ammo/compact.dmi' + damage_list = list( + "30" = 60, + "45" = 30, + "60" = 9, + "200" = 1 + ) + +// Example + +/* +/datum/ammo_kind/compact/q_9x19mm + name = "9x19mm Parabellum" + bullet_flavor = "A 9x19mm Parabellum bullet. It's a bullet, and it's 9x19mm. The 9x19mm Parabellum was designed in 1902 by Georg Luger, \ + who was a big fan of the number 9 and the number 1. He combined them into the famed 9x19mm Parabellum, named after his daughter, \ + Parabellum Luger. Often chastized for its lack of stopping power and unlucky number, the 9x19mm Parabellum is still a popular choice \ + for those who like the number 9 and 1." + box_name = "box of 9x19mm Parabellum bullets" + crate_name = "crate of 9x19mm Parabellum bullets" + magazine_name = "9x19mm Parabellum magazine" + magazine_flavor = "A small magazine designed for small guns. Holds compact bullets, which are small and compact. The compact magazine is the \ + perfect choice for those who like to shoot a lot of bullets." + caliber = CALIBER_COMPACT + sound_properties = CSP_PISTOL_9MM + ammo_icon = 'icons/obj/ammo/compact.dmi' // this is an example please ignore +*/ +/datum/ammo_kind/compact/q_22lr + name = ".22 Long Rifle" + bullet_flavor = "The .22 Long Rifle, also known as the .22LR or 5.6×15mmR, is a long-established variety of .22 caliber rimfire ammunition originating from the United States." + box_name = "box of .22LR bullets" + crate_name = "crate of .22LR bullets" + magazine_name = ".22LR magazine" + magazine_flavor = "A magazine fitting .22LR bullets." + sound_properties = CSP_PISTOL_22 + +/datum/ammo_kind/compact/q_357 + name = ".357 Magnum" + bullet_flavor = "The .357 Magnum, .357 S&W Magnum, or 9×33mmR (as it is known in unofficial metric designation) is a smokeless powder cartridge with a 0.357 in (9.07 mm) bullet diameter. It was created by Smith & Wesson and Winchester." + box_name = "box of .357 Magnum bullets" + crate_name = "crate of .357 Magnum bullets" + magazine_name = ".357 Magnum magazine" + magazine_flavor = "A magazine fitting .357 Magnum bullets." + sound_properties = CSP_PISTOL_357 + +/datum/ammo_kind/compact/q_9mm + name = "9x19mm Parabellum" + bullet_flavor = "Originally designed by Austrian firearm designer Georg Luger in 1901, it is widely considered the most popular handgun and submachine gun cartridge due to its low cost, adequate stopping power and extensive availability." + box_name = "box of 9x19mm Parabellum bullets" + crate_name = "crate of 9x19mm Parabellum bullets" + magazine_name = "9x19mm Parabellum magazine" + magazine_flavor = "A magazine fitting 9x19mm Parabellum bullets." + sound_properties = CSP_PISTOL_9MM + +/datum/ammo_kind/compact/q_10mm + name = ".40 S&W" + bullet_flavor = "The .40 S&W (10.2×22mm) is a rimless pistol cartridge developed jointly by Smith & Wesson and Winchester in 1990. It was developed as a law enforcement cartridge designed to duplicate performance of the Federal Bureau of Investigation's (FBI) reduced-velocity 10mm Auto cartridge which could be retrofitted into medium-frame (9 mm size) semi-automatic handguns." + box_name = "box of .40 S&W bullets" + crate_name = "crate of .40 S&W bullets" + magazine_name = ".40 S&W magazine" + magazine_flavor = "A magazine fitting .40 S&W bullets." + sound_properties = CSP_PISTOL_10MM + +/datum/ammo_kind/compact/q_45 + name = ".45 ACP" + bullet_flavor = "The .45 ACP (Automatic Colt Pistol), also known as .45 Auto, .45 Automatic, or 11.43×23mm is a rimless straight-walled handgun cartridge designed by John Moses Browning in 1904, for use in his prototype Colt semi-automatic pistol." + box_name = "box of .45 ACP bullets" + crate_name = "crate of .45 ACP bullets" + magazine_name = ".45 ACP magazine" + magazine_flavor = "A magazine fitting .45 ACP bullets." + sound_properties = CSP_PISTOL_45 + +/datum/ammo_kind/compact/q_45lc + name = ".45 LC" + bullet_flavor = "The .45 Colt (11.43×33mmR), is a rimmed, straight-walled, handgun cartridge dating to 1872. It was originally a black-powder revolver round developed for the Colt Single Action Army revolver." + box_name = "box of .45 LC bullets" + crate_name = "crate of .45 LC bullets" + magazine_name = ".45 LC magazine" + magazine_flavor = "A magazine fitting .45 LC bullets." + sound_properties = CSP_PISTOL_45 + +/datum/ammo_kind/compact/q_needler + name = "10mm Needle" + bullet_flavor = "A strange, futuristic looking needle for use in strange and futuristic looking guns." + box_name = "capsule of 10mm Needles" + crate_name = "barrel of 10mm Needles" + magazine_name = "10mm Needle magazine" + magazine_flavor = "A magazine fitting 10mm Needles." diff --git a/code/modules/projectiles/CMLS/long.dm b/code/modules/projectiles/CMLS/long.dm new file mode 100644 index 00000000000..b5a9aa45b6a --- /dev/null +++ b/code/modules/projectiles/CMLS/long.dm @@ -0,0 +1,85 @@ + +/datum/ammo_kind/long + name = "long" + bullet_flavor = "A long bullet. It's a bullet with a long body and an equally long history. The Long Bullet was originally a handy carrying \ + case for several Compact Bullets, put together as a clever way to recycle old worn out bullets without violating the 79th Amendment. \ + Partway through the Gecko Wars, a wayward enchanted Gecko ballista shell struck an ammo cart full of Compact Bullets, and in the blast \ + melted them all together into several Long Bullets. Now, they didnt have guns that would accept these new Long Bullets, but their \ + heavy, aerodynamic design made them more than a replacement for Ashdown's Tactical Rock Stockpile, and so the Long Bullet was born. \ + Shortly after, the 79th Amendment was repealed, allowing for Long Bullets to actually be used in guns." + casing_kind = "cartridge" + projectile_kind = "slug" + box_name = "long bullet box" + box_flavor = "A box of really large bullets. Big, high powered, and perfect to rip through even the toughest of mutants with a single shot. \ + Their size and weight make them a bit impractical to carry lots of, but when you need to make a big hole, there's no better choice." + crate_name = "long bullet crate" + crate_flavor = "A high-capacity crate of Long Bullets. Big, heavy, and perfect for when you need to make a big hole in a lot of things. \ + While it does hold a lot more bullets than a box, it's still a bit impractical for anything other than against the toughest of mutants." + magazine_name = "long bullet magazine" + magazine_flavor = "A magazine of Long Bullets. Big, high powered, and perfect to rip through even the toughest of mutants with a single shot. \ + Their size and weight make them a bit impractical to carry lots of, but when you need to make a big hole, there's no better choice." + caliber = CALIBER_LONG + sound_properties = CSP_RIFLE_HEAVY + ammo_icon = 'icons/obj/ammo/long.dmi' + damage_list = list( + "45" = 30, + "60" = 65, + "75" = 4, + "200" = 1 + ) + +// Example + +/* +/datum/ammo_kind/long/q_30_06_springfield + name = ".30-06 Springfield" + bullet_flavor = "A .30-06 Springfield bullet. A classic bullet found in the hands of hunters, soldiers, and the occasional madman. The .30-06 \ + Springfield refers to the date it was designed, Springfield 30th, 6, a good year for high power, low drag bullets. Few can resist the \ + temptation of the .30-06 Springfield, a bullet that has been used to take down everything from deer to tanks." + box_name = "box of .30-06 Springfield bullets" + crate_name = "crate of .30-06 Springfield bullets" + magazine_name = ".30-06 Springfield magazine" + magazine_flavor = "A magazine of .30-06 Springfield bullets. Big, high powered, and perfect to rip through even the toughest of mutants with a single shot. \ + Their size and weight make them a bit impractical to carry lots of, but when you need to make a big hole, there's no better choice." + ammo_icon = 'icons/obj/ammo/long.dmi' +*/ + +/datum/ammo_kind/long/q_308 + name = ".308 Winchester" + bullet_flavor = "The .308 Winchester is a smokeless powder rimless bottlenecked rifle cartridge widely used for hunting, target shooting, police, military, and personal protection applications globally. It is similar, but not identical, to the 7.62×51mm NATO cartridge." + box_name = "box of .308 Winchester bullets" + crate_name = "crate of .308 Winchester bullets" + magazine_name = ".308 Winchester magazine" + magazine_flavor = "A magazine of .308 Winchester bullets." + +/datum/ammo_kind/long/q_3006 + name = ".30-06 Springfield" + bullet_flavor = "The .30-06 Springfield cartridge (pronounced 'thirty-aught-six'), 7.62×63mm in metric notation, and called the .30 Gov't '06 by Winchester, was introduced to the United States Army in 1906 and later standardized; it remained in military use until the late 1970s." + box_name = "box of .30-06 Springfield bullets" + crate_name = "crate of .30-06 Springfield bullets" + magazine_name = ".30-06 Springfield magazine" + magazine_flavor = "A magazine of .30-06 Springfield bullets." + +/datum/ammo_kind/long/q_4570 + name = ".45-70 Springfield" + bullet_flavor = "The .45-70, also known as the .45-70 Government, .45-70 Springfield, and .45-21⁄10'' Sharps, is a .45 caliber rifle cartridge originally holding 70 grains of black powder that was developed at the U.S. Army's Springfield Armory for use in the Springfield Model 1873." + box_name = "box of .45-70 Springfield bullets" + crate_name = "crate of .45-70 Springfield bullets" + magazine_name = ".45-70 Springfield magazine" + magazine_flavor = "A magazine of .45-70 Springfield bullets." + +/datum/ammo_kind/long/q_50bmg + name = ".50 BMG" + bullet_flavor = "The .50 BMG (.50 Browning Machine Gun), also known as 12.7×99mm NATO, and designated as the 50 Browning by the C.I.P., is a .50 in (12.7 mm) caliber cartridge developed for the M2 Browning heavy machine gun in the late 1910s, entering official service in 1921." + box_name = "box of .50 BMG bullets" + crate_name = "crate of .50 BMG bullets" + magazine_name = ".50 BMG magazine" + magazine_flavor = "A magazine of .50 BMG bullets." + +/datum/ammo_kind/long/q_76254r + name = "7.62x54mmR Russian" + bullet_flavor = "The 7.62×54mmR is a rimmed rifle cartridge developed by the Russian Empire and introduced as a service cartridge in 1891." + box_name = "box of 7.62x54mmR Russian bullets" + crate_name = "crate of 7.62x54mmR Russian bullets" + magazine_name = "7.62x54mmR Russian magazine" + magazine_flavor = "A magazine of 7.62x54mmR Russian bullets." diff --git a/code/modules/projectiles/CMLS/medium.dm b/code/modules/projectiles/CMLS/medium.dm new file mode 100644 index 00000000000..cf7c967df69 --- /dev/null +++ b/code/modules/projectiles/CMLS/medium.dm @@ -0,0 +1,112 @@ + +/datum/ammo_kind/medium + name = "medium" + bullet_flavor = "A generic medium bullet." + casing_kind = "cartridge" + projectile_kind = "bullet" + box_name = "medium bullet box" + box_flavor = "A box of medium-sized bullets. Packs enough punch to be effective, while small enough to fit more than a handful in \ + a single box. Typically used by assault rifles and heavy pistols." + crate_name = "medium bullet crate" + crate_flavor = "A high-capacity crate of medium-sized bullets. Packs enough punch to be effective, while small enough to fit more \ + than a handful in a single crate. Typically used by assault rifles and heavy pistols." + magazine_name = "medium magazine" + magazine_flavor = "A magazine of medium-sized bullets. Packs enough punch to be effective, while small enough to fit more than a handful in \ + a single magazine. Typically used by assault rifles and heavy pistols." + caliber = CALIBER_MEDIUM + ammo_icon = 'icons/obj/ammo/medium.dmi' + damage_list = list( + "30" = 25, + "45" = 55, + "60" = 15, + "75" = 4, + "200" = 1 + ) + +// Example + +/* +/datum/ammo_kind/medium/q_5_56x45mm + name = "5.56x45mm NATO" + bullet_flavor = "A 5.56x45mm NATO bullet. A classic bullet found literally anywhere that freedom rings. The 5.56x45mm NATO was designed in 1963 \ + by the Nash Alliance Treaty Organization, a group of wasteland settlements that banded together to fight off the hordes of mutants \ + and raiders. To simplify their production lines, they settled on the 5.56x45mm NATO, a bullet that was as easy to make as it was to \ + kill with. And so, the 5.56x45mm NATO was born." + box_name = "5.56x45mm NATO ammo box" + crate_name = "5.56x45mm NATO ammo crate" + magazine_name = "5.56x45mm NATO magazine" + magazine_flavor = "A magazine of 5.56x45mm NATO bullets. Packs enough punch to be effective, while small enough to fit more than a handful in \ + a single magazine. Typically used by assault rifles and heavy pistols." + ammo_icon = 'icons/obj/ammo/medium.dmi' +*/ +/datum/ammo_kind/medium/q_5mm + name = "5mm US" + bullet_flavor = "The 5mm US is a rimless bottlenecked intermediate cartridge family developed in the late 2030s in Belgium by the US." + box_name = "5mm US ammo box" + crate_name = "5mm US ammo crate" + magazine_name = "5mm US magazine" + magazine_flavor = "A magazine of 5mm US bullets." + +/datum/ammo_kind/medium/q_556x45mm + name = "5.56x45mm NATO" + bullet_flavor = "The 5.56×45mm NATO (official NATO nomenclature 5.56 NATO, commonly pronounced 'five-five-six') is a rimless bottlenecked intermediate cartridge family developed in the late 1970s in Belgium by FN Herstal." + box_name = "5.56x45mm NATO ammo box" + crate_name = "5.56x45mm NATO ammo crate" + magazine_name = "5.56x45mm NATO magazine" + magazine_flavor = "A magazine of 5.56x45mm NATO bullets." + +/datum/ammo_kind/medium/q_300blk + name = ".300 AAC Blackout" + bullet_flavor = "The .300 AAC Blackout (designated as the 300 BLK by the SAAMI and 300 AAC Blackout by the C.I.P), also known as 7.62×35 mm, is an intermediate cartridge developed in the United States by Advanced Armament Corporation (AAC) for use in the M4 carbine." + box_name = "5.56x45mm NATO ammo box" + crate_name = "5.56x45mm NATO ammo crate" + magazine_name = "5.56x45mm NATO magazine" + magazine_flavor = "A magazine of 5.56x45mm NATO bullets." + +/datum/ammo_kind/medium/q_44 + name = ".44 Magnum" + bullet_flavor = "The .44 Remington Magnum, also known as .44 Magnum or 10.9x33mmR (as it is known in unofficial metric designation), is a rimmed, large-bore cartridge originally designed for revolvers and quickly adopted for carbines and rifles." + box_name = ".44 Magnum ammo box" + crate_name = ".44 Magnum ammo crate" + magazine_name = ".44 Magnum magazine" + magazine_flavor = "A magazine of .44 Magnum bullets." + +/datum/ammo_kind/medium/q_10mm + name = "10mm Auto" + bullet_flavor = "The 10mm Auto (also known as the 10×25mm, official C.I.P. nomenclature: 10 mm Auto, official SAAMI nomenclature: 10mm Automatic) is a powerful and versatile semi-automatic pistol cartridge introduced in 1983." + box_name = "10mm Auto ammo box" + crate_name = "10mm Auto ammo crate" + magazine_name = "10mm Auto magazine" + magazine_flavor = "A magazine of 10mm Auto bullets." + +/datum/ammo_kind/medium/q_14mm + name = "14mm Magnum" + bullet_flavor = "The 14mm Magnum is a powerful and oversized pistol cartridge introduced in the late 2060s." + box_name = "14mm Magnum ammo box" + crate_name = "14mm Magnum ammo crate" + magazine_name = "14mm Magnum magazine" + magazine_flavor = "A magazine of 14mm Magnum bullets." + +/datum/ammo_kind/medium/q_473mm + name = "4.73mm Caseless" + bullet_flavor = "The 4.73mm Caseless is a caseless rifle cartridge introduced in the late 70s for use with the G11." + box_name = "4.73mm Caseless ammo box" + crate_name = "4.73mm Caseless ammo crate" + magazine_name = "4.73mm Caseless magazine" + magazine_flavor = "A magazine of 4.73mm Caseless bullets." + +/datum/ammo_kind/medium/q_939 + name = "9x39 Soviet" + bullet_flavor = "The 9×39 is based on the Soviet 7.62×39mm case, but with the neck expanded to fit a 9.2mm bullet." + box_name = "9x39 Soviet ammo box" + crate_name = "9x39 Soviet ammo crate" + magazine_name = "9x39 Soviet magazine" + magazine_flavor = "A magazine of 9x39 Soviet bullets." + +/datum/ammo_kind/medium/q_5728mm + name = "5.7×28mm NATO" + bullet_flavor = "The FN 5.7×28mm is a small-caliber, high-velocity, smokeless-powder, rebated, non-tapered, bottleneck, centerfire cartridge designed for pistols and personal defense weapons (PDW) uses, manufactured by FN Herstal." + box_name = "5.7×28mm NATO ammo box" + crate_name = "5.7×28mm NATO ammo crate" + magazine_name = "5.7×28mm NATO magazine" + magazine_flavor = "A magazine of 5.7×28mm NATO bullets." diff --git a/code/modules/projectiles/CMLS/shotgun.dm b/code/modules/projectiles/CMLS/shotgun.dm new file mode 100644 index 00000000000..8f0f8a01fdb --- /dev/null +++ b/code/modules/projectiles/CMLS/shotgun.dm @@ -0,0 +1,48 @@ + +/datum/ammo_kind/shotgun + name = "Shotgun" + bullet_flavor = "A shotgun shell. It's a large shell that emits a spray of smaller bullets. An unlikely creation by the Great Eastern Hiveblob, \ + the Shotgun Shell was designed as a gag for Their annual Hive Day celebration. 35 nodes of the Hiveblob merged and developed a line \ + of party favors for their non-hive guests, among them the Loop-de-Scoop, the Bouncing Bumble, and the Stacked Vixen. While the first \ + two were met with mild amusement, when the Stacked Vixen misfired and ejected its entire payload of Compact Bullets into the 'big bad \ + Queen of the North', it impressed Rusty, the CEO of Rustyville XII: A New Rust at the time, so much that he ordered a million of them. \ + After being rebranded as the 'Shoot-Gun Shell', the Shotgun Shell was born." + magazine_name = "handful of shotgun shells" + magazine_flavor = "A handful of shotgun shells. Hefty ammo packing a punch against anything lacking armor." + casing_kind = "shell" + projectile_kind = "pellet" + box_name = "shotgun shell box" + box_flavor = "A box of shotgun shells. Hefty ammo packing a punch against anything lacking armor." + crate_name = "crate of shotgun shells" + crate_flavor = "A crate of shotgun shells. Hefty ammo packing a punch against anything lacking armor." + caliber = CALIBER_SHOTGUN + sound_properties = CSP_SHOTGUN + ammo_icon = 'icons/obj/ammo/shotgun.dmi' + pellet_count = 4 + damage_list = list( + "11.25" = 55, + "15" = 35, + "18.75" = 9, + "50" = 1, + ) + +/datum/ammo_kind/shotgun/q_12_gauge + name = "12 gauge buckshot" + bullet_flavor = "A 12 gauge shotgun shell loaded with buckshot. A classic shell found in the hands of hunters, soldiers, and the occasional madman. The 12 Gauge \ + shotgun shell was designed in 1874 by the Winchester Repeating Arms Company, a company that was known for its repeating arms and \ + its company. The 12 Gauge shotgun shell was designed to be a versatile shell that could be used for hunting, sport shooting, and \ + home defense. It was so versatile that it was used in the Winchester Model 1897, a shotgun that was so versatile that it was used \ + in the Winchester Model 1897." + box_name = "box of 12 gauge shotgun shells" + crate_name = "crate of 12 gauge shotgun shells" + magazine_name = "handful of 12 gauge shotgun shells" + magazine_flavor = "A handful of 12 gauge shotgun shells. A classic shell found in the hands of hunters, soldiers, and the occasional madman." + ammo_icon = 'icons/obj/ammo/shotgun.dmi' + +/datum/ammo_kind/shotgun/q_40mm + name = "40mm buckshot" + bullet_flavor = "A low velocity series of pellets." + box_name = "box of 40mm shotgun shells" + crate_name = "crate of 40mm shotgun shells" + magazine_name = "handful of 40mm shotgun shells" + magazine_flavor = "A handful of 40mm shotgun shells. A classic shell found in the hands of hunters, soldiers, and the occasional madman." diff --git a/code/modules/projectiles/ammunition/_ammunition.dm b/code/modules/projectiles/ammunition/_ammo_casing_bullet_cartridge.dm similarity index 92% rename from code/modules/projectiles/ammunition/_ammunition.dm rename to code/modules/projectiles/ammunition/_ammo_casing_bullet_cartridge.dm index cf36d77e859..9fb3ce39ed0 100644 --- a/code/modules/projectiles/ammunition/_ammunition.dm +++ b/code/modules/projectiles/ammunition/_ammo_casing_bullet_cartridge.dm @@ -15,14 +15,14 @@ var/material_class = BULLET_IS_LIGHT_PISTOL /// Used to deduct the right amount of bullet mats from the bullet when fired var/casing_quality = BULLET_IS_SURPLUS - var/fire_sound = null //What sound should play when this ammo is fired - var/caliber = null //Which kind of guns it can be loaded into - NOT a list! - var/projectile_type = null //The bullet type to create when New() is called - var/obj/item/projectile/BB = null //The loaded bullet - var/pellets = 1 //Pellets for spreadshot - var/variance = 0 //Variance for inaccuracy fundamental to the casing - var/randomspread = 1 //Randomspread for automatics - var/delay = 0 //Delay for energy weapons + var/fire_sound = null //What sound should play when this ammo is fired + var/caliber = null //Which kind of guns it can be loaded into - NOT a list! + var/projectile_type = null //The bullet type to create when New() is called + var/obj/item/projectile/BB = null //The loaded bullet + var/pellets = 1 //Pellets for spreadshot + var/variance = 0 //Variance for inaccuracy fundamental to the casing + var/randomspread = 1 //Randomspread for automatics + var/delay = 0 //Delay for energy weapons /// Override this to make the gun check for a different cooldown rather than CLICK_CD_RANGE, which is 4 deciseconds. var/click_cooldown_override var/firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect //the visual effect appearing when the ammo is fired. @@ -35,6 +35,7 @@ var/sound_properties = CSP_PISTOL_LIGHT var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot. var/select_name = "energy" + var/caseless = FALSE // cus why not /obj/item/ammo_casing/Initialize(mapload, spent) setup_sound_datums() diff --git a/code/modules/projectiles/ammunition/_firing.dm b/code/modules/projectiles/ammunition/_firing.dm index 8dd0107211b..37dc9f6f3f3 100644 --- a/code/modules/projectiles/ammunition/_firing.dm +++ b/code/modules/projectiles/ammunition/_firing.dm @@ -51,6 +51,15 @@ user.DelayNextAction(considered_action = TRUE, immediate = FALSE) user.newtonian_move(get_dir(target, user)) update_icon() + + if(caseless) + moveToNullspace() + if(istype(fired_from, /obj/item/gun)) + var/obj/item/gun/gonne = fired_from + if(gonne.chambered == src) + gonne.chambered = null // harddels suffer + gonne.update_icon() + qdel(src) return 1 /obj/item/ammo_casing/proc/calc_spread(mob/living/user, spread = 0, distro = 0, variance = 0, atom/fired_from) @@ -91,22 +100,8 @@ if(isgun(fired_from)) var/obj/item/gun/G = fired_from + G.modify_projectile(BB) G.post_modify_projectile(BB) - //BB.damage *= G.damage_multiplier - BB.damage_mod = G.damage_multiplier - BB.armour_penetration *= G.penetration_multiplier - BB.pixels_per_second *= G.projectile_speed_multiplier - if(BB.zone_accuracy_type == ZONE_WEIGHT_GUNS_CHOICE) - BB.zone_accuracy_type = G.get_zone_accuracy_type() - //SEND_SIGNAL(src, COMSIG_GUN_SHOT, BB, G) // time to modify it more uwu - /* if(HAS_TRAIT(user, TRAIT_CRIT_SHOT)) // imma spend 12 points to shoot myself in the face - BB.ricochets_max = max(BB.ricochets_max, 10) //bouncy! - BB.ricochet_chance = max(BB.ricochet_chance, 100) //it wont decay so we can leave it at 100 for always bouncing - BB.ricochet_auto_aim_range = max(BB.ricochet_auto_aim_range, 3) - BB.ricochet_auto_aim_angle = max(BB.ricochet_auto_aim_angle, 360) //it can turn full circle and shoot you in the face because our aim? is insane. - BB.ricochet_decay_chance = 0 - BB.ricochet_decay_damage = max(BB.ricochet_decay_damage, 0.1) - BB.ricochet_incidence_leeway = 0 */ if(reagents && BB.reagents) reagents.trans_to(BB, reagents.total_volume) //For chemical darts/bullets diff --git a/code/modules/projectiles/ammunition/ballistic/pistol.dm b/code/modules/projectiles/ammunition/ballistic/compact.dm similarity index 55% rename from code/modules/projectiles/ammunition/ballistic/pistol.dm rename to code/modules/projectiles/ammunition/ballistic/compact.dm index ecd1b535b21..d8b2afadb39 100644 --- a/code/modules/projectiles/ammunition/ballistic/pistol.dm +++ b/code/modules/projectiles/ammunition/ballistic/compact.dm @@ -2,7 +2,7 @@ /obj/item/ammo_casing/c10mm name = "10mm FMJ bullet casing" desc = "A 10mm FMJ bullet casing." - caliber = CALIBER_10MM + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/c10mm material_class = BULLET_IS_MEDIUM_PISTOL casing_quality = BULLET_IS_SURPLUS @@ -15,7 +15,7 @@ /obj/item/ammo_casing/c10mm/improvised name = "shoddy 10mm bullet casing" desc = "A homemade 10mm FMJ bullet casing." - caliber = CALIBER_10MM + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/c10mm/improvised material_class = BULLET_IS_MEDIUM_PISTOL casing_quality = BULLET_IS_HANDLOAD @@ -43,7 +43,7 @@ /obj/item/ammo_casing/c9mm name = "9mm FMJ bullet casing" desc = "A 9mm FMJ bullet casing." - caliber = CALIBER_9MM + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/c9mm material_class = BULLET_IS_LIGHT_PISTOL casing_quality = BULLET_IS_SURPLUS @@ -81,50 +81,54 @@ projectile_type = /obj/item/projectile/bullet/c9mm/incendiary fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD -//14mm -/obj/item/ammo_casing/p14mm - name = "14mm FMJ bullet casing" - desc = "A 14mm FMJ bullet casing." - caliber = CALIBER_14MM - projectile_type = /obj/item/projectile/bullet/mm14 - material_class = BULLET_IS_HEAVY_PISTOL +// .357 +/obj/item/ammo_casing/a357 + name = ".357 FMJ bullet casing" + desc = "A .357 FMJ bullet casing." + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/bullet/a357 + material_class = BULLET_IS_MEDIUM_PISTOL custom_materials = list( - /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_HEAVY_BULLET, - /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER) - fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_PISTOL_14MM - -/obj/item/ammo_casing/p14mm/improvised - name = "shoddy 14mm bullet casing" - desc = "A handloaded 14mm bullet casing." - caliber = CALIBER_14MM - projectile_type = /obj/item/projectile/bullet/mm14 - material_class = BULLET_IS_HEAVY_PISTOL + /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_PISTOL_357 + +/obj/item/ammo_casing/a357/ratshot + name = ".357 ratshot shell casing" + desc = "A .357 ratshot shell casing." + projectile_type = /obj/item/projectile/bullet/pellet/shotgun_ratshot + pellets = 6 //6 pellets for 6 damage is 36 total, same as base cartridge, but less effective against armor, more effective against rats + variance = SHOTGUN_SPREAD_BASE + +/obj/item/ammo_casing/a357/ricochet + name = ".357 ricochet bullet casing" + desc = "A .357 ricochet bullet casing." + projectile_type = /obj/item/projectile/bullet/a357/ricochet + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS + +/obj/item/ammo_casing/a357/incendiary + name = ".357 incendiary bullet casing" + desc = "A .357 incendiary bullet casing." + projectile_type = /obj/item/projectile/bullet/a357/incendiary + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/a357/improvised + name = "shoddy .357 bullet casing" + desc = "A handmade .357 magnum bullet casing." + projectile_type = /obj/item/projectile/bullet/a357/improvised + material_class = BULLET_IS_MEDIUM_PISTOL casing_quality = BULLET_IS_HANDLOAD custom_materials = list( - /datum/material/iron = (MATS_PISTOL_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/p14mm/contam - name = "14mm contaminated bullet casing" - desc = "A 14mm contaminated bullet casing." - projectile_type = /obj/item/projectile/bullet/mm14/contam - fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_SURPLUS - -/* -/obj/item/ammo_casing/p14mm/uraniumtipped - name = "14mm uranium-tipped bullet casing" - desc = "A 14mm uranium-tipped bullet casing." - caliber = "14" - projectile_type = /obj/item/projectile/bullet/mm14/uraniumtipped -*/ + /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD // 22lr /obj/item/ammo_casing/a22 name = ".22lr bullet casing" desc = "A .22lr bullet casing." - caliber = CALIBER_22LR + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/c22 material_class = BULLET_IS_LIGHT_PISTOL casing_quality = BULLET_IS_HANDLOAD @@ -154,7 +158,7 @@ /obj/item/ammo_casing/bee name = ".22lr beellet casing" desc = "A hybernating bee inside a capsule." - caliber = CALIBER_BEE + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/bee material_class = BULLET_IS_LIGHT_PISTOL casing_quality = BULLET_IS_HANDLOAD @@ -167,7 +171,7 @@ /obj/item/ammo_casing/mouse name = ".22lr mouseshot casing" desc = "A tiny mouse nestled inside a capsule." - caliber = CALIBER_MOUSE + caliber = CALIBER_COMPACT projectile_type = /obj/item/projectile/bullet/mouse material_class = BULLET_IS_LIGHT_PISTOL casing_quality = BULLET_IS_HANDLOAD @@ -184,6 +188,99 @@ pellets = 4 // 4 for now, maybe 3 if its overboard fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD +// .45 + +/obj/item/ammo_casing/c45 + name = ".45 FMJ bullet casing" + desc = "A .45 FMJ bullet casing." + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/bullet/c45 + material_class = BULLET_IS_MEDIUM_PISTOL + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_PISTOL_45 + +/obj/item/ammo_casing/c45/improvised + name = "shoddy .45 bullet casing" + desc = "A handmade .45 bullet casing." + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/bullet/c45 + material_class = BULLET_IS_MEDIUM_PISTOL + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/c45/incendiary + name = ".45 incendiary bullet casing" + desc = "A .45 incendiary bullet casing." + projectile_type = /obj/item/projectile/bullet/c45/incendiary + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/c45/rubber + name = ".45 rubber bullet casing" + desc = "A .45 rubber bullet casing." + projectile_type = /obj/item/projectile/bullet/c45/rubber + material_class = BULLET_IS_MEDIUM_PISTOL + casing_quality = BULLET_IS_RUBBER + custom_materials = list( + /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD + +// needler pistol +/obj/item/ammo_casing/caseless/needle + name = "A needler round." + desc = "A dart for use in needler pistols." + icon_state = "needlecasing" + icon = 'icons/fallout/objects/guns/ammo.dmi' + caliber = CALIBER_COMPACT + force = 2 + throwforce = 1 + embedding = list("embed_chance"= 25) + projectile_type = /obj/item/projectile/bullet/needle + +/obj/item/ammo_casing/caseless/needle/improvised + name = "A jade needler round." + desc = "A dart for use in needler pistols." + icon_state = "needleimprovcase" + icon = 'icons/fallout/objects/guns/ammo.dmi' + caliber = CALIBER_COMPACT + force = 2 + throwforce = 1 + projectile_type = /obj/item/projectile/bullet/needle/improvised + +//throwin' rock, for throwin'. obtained via *rocks +/obj/item/ammo_casing/caseless/rock + name = "rock" + desc = "a nice hefty rock, for bashing over someone's head or throwing at someone's head. You can get your own with *rocks!" + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "rock" + item_state = "rock" + force = 15 + throwforce = 20 + throw_speed = 1 // you can see it comin' + throw_range = 10 //you can chuck a rock pretty far. good luck hitting anything though + w_class = WEIGHT_CLASS_TINY + resistance_flags = FIRE_PROOF + total_mass = TOTAL_MASS_SMALL_ITEM + attack_verb = list("attacked", "bashed", "brained", "thunked", "clobbered") + attack_speed = CLICK_CD_MELEE + max_integrity = 200 + armor = ARMOR_VALUE_GENERIC_ITEM + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/rock + is_pickable = TRUE + custom_materials = list(/datum/material/glass = 50) //rocks are made of silicon, same as sand + fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_ROCK + + + // BETA AMMO // Obsolete /obj/item/ammo_casing/testcasing name = "casing" diff --git a/code/modules/projectiles/ammunition/ballistic/generic_ammo_casing_bullet_cartridge.dm b/code/modules/projectiles/ammunition/ballistic/generic_ammo_casing_bullet_cartridge.dm new file mode 100644 index 00000000000..b1e2ae79acf --- /dev/null +++ b/code/modules/projectiles/ammunition/ballistic/generic_ammo_casing_bullet_cartridge.dm @@ -0,0 +1,33 @@ +/obj/item/ammo_casing/generic + projectile_type = /obj/item/projectile/generic + caliber = CALIBER_COMPACT + var/datum/ammo_kind/ammo_kind = /datum/ammo_kind/compact + +/obj/item/ammo_casing/generic/Initialize(mapload, ...) + . = ..() + SScmls.SetupBullet(src, ammo_kind) + +/obj/item/ammo_casing/generic/AltClick(mob/user) + . = ..() + SScmls.ReskinBullet(user, src) + +/obj/item/ammo_casing/generic/CtrlShiftClick(mob/user) + . = ..() + SScmls.ReskinBullet(user, src) + +/obj/item/ammo_casing/generic/examine(mob/user) + . = ..() + +// /obj/item/ammo_casing/generic/ready_proj(atom/target, mob/living/user, quiet, zone_override = "", damage_multiplier = 1, penetration_multiplier = 1, projectile_speed_multiplier = 1, fired_from, damage_threshold_penetration = 0) +// if(istype(loc, /obj/item/ammo_box/generic)) +// var/obj/item/ammo_box/generic/box = loc +// if(ammo_kind != box.ammo_kind) +// SScmls.SetupBullet(src, box.ammo_kind) +// . = ..() + +/obj/item/ammo_casing/generic/update_icon_state() + SScmls.UpdateBullet(src, ammo_kind) + + + + diff --git a/code/modules/projectiles/ammunition/ballistic/lmg.dm b/code/modules/projectiles/ammunition/ballistic/lmg.dm deleted file mode 100644 index 6b2a27d5acd..00000000000 --- a/code/modules/projectiles/ammunition/ballistic/lmg.dm +++ /dev/null @@ -1,38 +0,0 @@ -// 1.95x129mm (SAW) - -/obj/item/ammo_casing/mm195x129 - name = "1.95x129mm bullet casing" - desc = "A 1.95x129mm bullet casing." - icon_state = "762-casing" - caliber = CALIBER_195 - projectile_type = /obj/item/projectile/bullet/mm195x129 - sound_properties = CSP_RIFLE_LIGHT - -/obj/item/ammo_casing/mm195x129/ap - name = "1.95x129mm armor-piercing bullet casing" - desc = "A 1.95x129mm bullet casing designed with a hardened-tipped core to help penetrate armored targets." - projectile_type = /obj/item/projectile/bullet/mm195x129_ap - -/obj/item/ammo_casing/mm195x129/hollow - name = "1.95x129mm hollow-point bullet casing" - desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets." - projectile_type = /obj/item/projectile/bullet/mm195x129_hp - -/obj/item/ammo_casing/mm195x129/incen - name = "1.95x129mm incendiary bullet casing" - desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames." - projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129 - -/obj/item/ammo_casing/mm712x82/match - name = "7.12x82mm match bullet casing" - desc = "A 7.12x82mm bullet casing manufactured to unfailingly high standards, you could pull off some cool trickshots with this." - caliber = CALIBER_712 - projectile_type = /obj/item/projectile/bullet/mm712x82_match - -/obj/item/projectile/bullet/mm712x82_match - name = "7.12x82mm match bullet" - damage = 40 - ricochets_max = 2 - ricochet_chance = 60 - ricochet_auto_aim_range = 4 - ricochet_incidence_leeway = 35 diff --git a/code/modules/projectiles/ammunition/ballistic/long.dm b/code/modules/projectiles/ammunition/ballistic/long.dm new file mode 100644 index 00000000000..395815285aa --- /dev/null +++ b/code/modules/projectiles/ammunition/ballistic/long.dm @@ -0,0 +1,267 @@ +// .45-70 Gov't +/obj/item/ammo_casing/c4570 + name = ".45-70 FMJ bullet casing" + desc = "A .45-70 full metal jacket bullet casing." + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/c4570 + material_class = BULLET_IS_HEAVY_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_MEDIUM + +/obj/item/ammo_casing/c4570/ratshot + name = ".45-70 forager shell casing" + desc = "A .45-70 forager shell casing." + projectile_type = /obj/item/projectile/bullet/pellet/shotgun_ratshot + pellets = 10 //10 pellets for 6 damage is 60 total, same as base cartridge, but less effective against armor, more effective against rats + variance = SHOTGUN_SPREAD_BASE + +/obj/item/ammo_casing/c4570/improvised + name = "shoddy .45-70 bullet casing" + desc = "A homemade .45-70 bullet casing." + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/c4570/improvised + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD +/* +/obj/item/ammo_casing/c4570/surplus + name = ".45-70 bullet casing" + desc = "A .45-70 bullet casing." + caliber = CALIBER_4570 + projectile_type = /obj/item/projectile/bullet/c4570/surplus + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD +*/ +/obj/item/ammo_casing/c4570/explosive + name = ".45-70 explosive bullet casing" + desc = "A .45-70 explosive bullet casing." + projectile_type = /obj/item/projectile/bullet/c4570/explosive + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS + +/obj/item/ammo_casing/c4570/knockback + name = ".45-70 ultradense bullet casing" + desc = "A .45-70 ultradense bullet casing." + projectile_type = /obj/item/projectile/bullet/c4570/knockback + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_RUBBER + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + +//.50 BMG +/obj/item/ammo_casing/a50MG + name = ".50MG bullet casing" + desc = "A .50MG bullet casing." + caliber = CALIBER_LONG + icon_state = "50mg2" + projectile_type = /obj/item/projectile/bullet/a50MG + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_MATCH + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_MATCH_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_MATCH_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_MATCH_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + sound_properties = CSP_RIFLE_HEAVY + +/obj/item/ammo_casing/a50MG/improvised + name = "shoddy .50MG bullet casing" + desc = "A handmade .50MG bullet casing." + caliber = CALIBER_LONG + icon_state = "50mg2" + projectile_type = /obj/item/projectile/bullet/a50MG/improvised + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/a50MG/incendiary + name = ".50 MG incendiary bullet casing" + desc = "A .50 MG incendiary bullet casing." + icon_state = "50in2" + projectile_type = /obj/item/projectile/bullet/a50MG/incendiary + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + +/obj/item/ammo_casing/a50MG/explosive + name = ".50 MG explosive bullet casing" + desc = "Comes in 5 bullet racks...more then enough to kill anything that moves.." + icon_state = "50ex2" + projectile_type = /obj/item/projectile/bullet/a50MG/explosive + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + +/obj/item/ammo_casing/a50MG/rubber + name = ".50 MG rubber bullet casing" + desc = "Who makes .50 in rubber? This is going to kill someone." + projectile_type = /obj/item/projectile/bullet/a50MG/rubber + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/a50MG/penetrator + name = ".50 MG penetrator bullet casing" + desc = "This titanium-reinforced highpower bullet will penetrate anything. Yes. Anything." + projectile_type = /obj/item/projectile/bullet/a50MG/penetrator + icon_state = "50ap2" + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + +/obj/item/ammo_casing/a50MG/contam + name = "12.7mm contaminated bullet casing" + desc = "A 12.7mm explosive round where the explosive has been replaced with a chemical smoke payload." + icon_state = "50ex2" + projectile_type = /obj/item/projectile/bullet/a50MG/contam + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + +/* +/obj/item/ammo_casing/a50MG/uraniumtipped + name = "12.7mm uranium-tipped bullet casing" + desc = "Enriched uranium-tipped 12.7mm rifle rounds." + projectile_type = /obj/item/projectile/bullet/a50MG/uraniumtipped + icon_state = "50ap2" +*/ + +// 7.62 +/obj/item/ammo_casing/a308 + name = ".308 FMJ bullet casing" + desc = "A .308 FMJ bullet casing." + icon_state = "762-casing" + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/a308 + material_class = BULLET_IS_MEDIUM_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_MEDIUM_CASING + MATS_RIFLE_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER) + fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_MEDIUM + +/obj/item/ammo_casing/a308/improvised + name = "shoddy .308 bullet casing" + desc = "A handmade .308 bullet casing." + projectile_type = /obj/item/projectile/bullet/a308/improvised + material_class = BULLET_IS_MEDIUM_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_HANDLOAD +/* +/obj/item/ammo_casing/a762/sport + name = ".308 bullet casing" + desc = "A .308 sporting bullet casing." + projectile_type = /obj/item/projectile/bullet/a308/improvised + material_class = BULLET_IS_MEDIUM_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_RIFLE_MEDIUM_CASING + MATS_RIFLE_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER) + fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_SURPLUS +*/ +/obj/item/ammo_casing/a308/microshrapnel + name = ".308 microshrapnel bullet casing" + desc = "Like shrapnel, but smaller, and thus more annoying." + projectile_type = /obj/item/projectile/bullet/a308/microshrapnel + fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_MATCH + +/* +/obj/item/ammo_casing/a762/uraniumtipped + name = "7.62 uranium tipped bullet casing" + desc = "Not depleted uranium. Regular uranium." + projectile_type = /obj/item/projectile/bullet/a762/uraniumtipped +*/ + +/obj/item/ammo_casing/a308/rubber + name = ".308 rubber bullet casing" + desc = "A .308 rubber bullet casing, for training purposes." + projectile_type = /obj/item/projectile/bullet/a308/rubber + material_class = BULLET_IS_MEDIUM_RIFLE + casing_quality = BULLET_IS_RUBBER + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_HANDLOAD + +// .30-06 +/obj/item/ammo_casing/a3006 + name = ".30-06 FMJ bullet casing" + desc = "A .30-06 FMJ bullet casing." + icon_state = "762-casing" + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/a3006 + material_class = BULLET_IS_HEAVY_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_MEDIUM + +/obj/item/ammo_casing/a3006/rubber + name = ".30-06 FMJ bullet casing" + desc = "A .30-06 FMJ bullet casing." + icon_state = "762-casing" + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/a3006/rubber + material_class = BULLET_IS_HEAVY_RIFLE + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD + sound_properties = CSP_RIFLE_MEDIUM + + +/obj/item/ammo_casing/a3006/improvised + name = "shoddy .30-06 bullet casing" + desc = "A handmade .30-06 bullet casing." + projectile_type = /obj/item/projectile/bullet/a3006/improvised + material_class = BULLET_IS_HEAVY_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD + +// heavy needler +/obj/item/ammo_casing/caseless/needle/heavy + name = "A ruby needler round." + desc = "A heavy and long dart for use in needler heavy weaponary." + icon_state = "heavyneedlecase" + icon = 'icons/fallout/objects/guns/ammo.dmi' + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/heavyneedle + +// plasma +/obj/item/ammo_casing/caseless/plasmacaster + name = "Plasma can" + desc = "A single use can of plasma for the plasma musket." + caliber = CALIBER_LONG + icon_state = "plasmacan" + projectile_type = /obj/item/projectile/f13plasma/plasmacaster + firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy + +// flintlock minie +/obj/item/ammo_casing/caseless/flintlock/minie + name = "packed blackpowder minie cartridge" + desc = "A conical bullet designed to give flintlocks a bit more of a modern edge." + caliber = CALIBER_LONG + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "flintlock_casing_minie" + projectile_type = /obj/item/projectile/flintlock/minie + sound_properties = CSP_FLINTLOCK + custom_materials = list( + /datum/material/iron = MATS_FLINTLOCK_LIGHT_POWDER, // what casing? ~ uwu ~ + /datum/material/blackpowder = MATS_FLINTLOCK_HEAVY_POWDER) + w_class = WEIGHT_CLASS_SMALL + variance = CASING_SPREAD_SURPLUS diff --git a/code/modules/projectiles/ammunition/ballistic/medium.dm b/code/modules/projectiles/ammunition/ballistic/medium.dm new file mode 100644 index 00000000000..48ad2d83ba2 --- /dev/null +++ b/code/modules/projectiles/ammunition/ballistic/medium.dm @@ -0,0 +1,379 @@ +// 1.95x129mm (SAW) + +/obj/item/ammo_casing/mm195x129 + name = "1.95x129mm bullet casing" + desc = "A 1.95x129mm bullet casing." + icon_state = "762-casing" + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/mm195x129 + sound_properties = CSP_RIFLE_LIGHT + +/obj/item/ammo_casing/mm195x129/ap + name = "1.95x129mm armor-piercing bullet casing" + desc = "A 1.95x129mm bullet casing designed with a hardened-tipped core to help penetrate armored targets." + projectile_type = /obj/item/projectile/bullet/mm195x129_ap + +/obj/item/ammo_casing/mm195x129/hollow + name = "1.95x129mm hollow-point bullet casing" + desc = "A 1.95x129mm bullet casing designed to cause more damage to unarmored targets." + projectile_type = /obj/item/projectile/bullet/mm195x129_hp + +/obj/item/ammo_casing/mm195x129/incen + name = "1.95x129mm incendiary bullet casing" + desc = "A 1.95x129mm bullet casing designed with a chemical-filled capsule on the tip that when bursted, reacts with the atmosphere to produce a fireball, engulfing the target in flames." + projectile_type = /obj/item/projectile/bullet/incendiary/mm195x129 + +/obj/item/ammo_casing/mm712x82/match + name = "7.12x82mm match bullet casing" + desc = "A 7.12x82mm bullet casing manufactured to unfailingly high standards, you could pull off some cool trickshots with this." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/mm712x82_match + +/obj/item/projectile/bullet/mm712x82_match + name = "7.12x82mm match bullet" + damage = 40 + ricochets_max = 2 + ricochet_chance = 60 + ricochet_auto_aim_range = 4 + ricochet_incidence_leeway = 35 + +//.45 Long Colt bouncing +/obj/item/ammo_casing/a45lc + name = ".45 Long Colt bullet casing" + desc = "An archaic .45 long colt bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/a45lc + material_class = BULLET_IS_MEDIUM_PISTOL + custom_materials = list( + /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) + fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_MATCH + sound_properties = CSP_PISTOL_357 + +/obj/item/ammo_casing/a45lc/improvised + name = "shoddy .45 LC bullet casing" + desc = "An archaic .45 long colt bullet casing. Now about 25% worse." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/a45lc/improvised + material_class = BULLET_IS_MEDIUM_PISTOL + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_SURPLUS + +// 2mm EC +/obj/item/ammo_casing/c2mm + name = "2mm gauss projectile casing" + desc = "A 2mm gauss projectile casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/c2mm + material_class = BULLET_IS_GAUSS + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_GAUSS_CASING + MATS_GAUSS_BULLET, + /datum/material/blackpowder = MATS_GAUSS_POWDER, + /datum/material/titanium = MATS_GAUSS_BULLET) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + sound_properties = CSP_GAUSS + +/obj/item/ammo_casing/c2mm/blender + name = "2mm gauss blender projectile casing" + desc = "A 2mm gauss projectile casing, \"Blender\" variant. Bounces off walls at hypersonic speeds." + projectile_type = /obj/item/projectile/bullet/c2mm/blender + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH + custom_materials = list( + /datum/material/iron = MATS_GAUSS_CASING + MATS_GAUSS_BULLET * 1.1, + /datum/material/blackpowder = MATS_GAUSS_POWDER, + /datum/material/titanium = MATS_GAUSS_BULLET * 1.1) + + +//5mm (no match) + +/obj/item/ammo_casing/m5mm + name = "5mm FMJ bullet casing" + desc = "A 5mm bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/m5mm + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_LIGHT + +/obj/item/ammo_casing/m5mm/improvised + name = "shoddy 5mm bullet casing" + desc = "A handmade 5mm bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/m5mm/improvised + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/m5mm/shock + name = "5mm shock bullet casing" + desc = "A 5mm shock bullet casing." + projectile_type = /obj/item/projectile/bullet/m5mm/shock + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +// 5.56mm +/obj/item/ammo_casing/a556 + name = "5.56mm FMJ bullet casing" + desc = "A 5.56mm bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/a556 + material_class = BULLET_IS_LIGHT_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_LIGHT + +/obj/item/ammo_casing/a556/rubber + name = "5.56mm rubber bullet casing" + desc = "A 5.56mm rubber bullet casing, for training purposes." + projectile_type = /obj/item/projectile/bullet/a556/rubber + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_RUBBER + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/a556/microshrapnel + name = "5.56mm microshrapnel bullet casing" + desc = "Like shrapnel, but smaller, and thus more annoying." + projectile_type = /obj/item/projectile/bullet/a556/microshrapnel + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH + +/* +/obj/item/ammo_casing/a556/uranium_tipped + name = "5.56 uranium-tipped bullet casing" + desc = "Tax money well spent." + projectile_type = /obj/item/projectile/bullet/a556/uraniumtipped +*/ +/* +/obj/item/ammo_casing/a556/sport //.223 + name = ".223 bullet casing" + desc = "A .223 bullet casing." + projectile_type = /obj/item/projectile/bullet/a556/sport + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS +*/ +/obj/item/ammo_casing/a556/improvised + name = "shoddy 5.56 bullet casing" + desc = "A handmade 6.56 bullet casing." + projectile_type = /obj/item/projectile/bullet/a556/improvised + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +// .44 magnum +/obj/item/ammo_casing/m44 + name = ".44 magnum FMJ bullet casing" + desc = "A .44 magnum full metal jacket bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/m44 + material_class = BULLET_IS_HEAVY_PISTOL + custom_materials = list( + /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_HEAVY_BULLET, + /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_PISTOL_44 + +/obj/item/ammo_casing/m44/improvised + name = "shoddy .44 magnum bullet casing" + desc = "A homemade .44 magnum bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/m44/improvised + material_class = BULLET_IS_HEAVY_PISTOL + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_PISTOL_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/m44/incendiary + name = ".44 magnum incendiary bullet casing" + desc = "A .44 magnum incendiary bullet casing." + projectile_type = /obj/item/projectile/bullet/c45/incendiary + fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_HANDLOAD + +//14mm +/obj/item/ammo_casing/p14mm + name = "14mm FMJ bullet casing" + desc = "A 14mm FMJ bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/mm14 + material_class = BULLET_IS_HEAVY_PISTOL + custom_materials = list( + /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_HEAVY_BULLET, + /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_PISTOL_14MM + +/obj/item/ammo_casing/p14mm/improvised + name = "shoddy 14mm bullet casing" + desc = "A handloaded 14mm bullet casing." + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/bullet/mm14 + material_class = BULLET_IS_HEAVY_PISTOL + casing_quality = BULLET_IS_HANDLOAD + custom_materials = list( + /datum/material/iron = (MATS_PISTOL_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/p14mm/contam + name = "14mm contaminated bullet casing" + desc = "A 14mm contaminated bullet casing." + projectile_type = /obj/item/projectile/bullet/mm14/contam + fire_power = CASING_POWER_HEAVIER_PISTOL * CASING_POWER_MOD_SURPLUS + +/* +/obj/item/ammo_casing/p14mm/uraniumtipped + name = "14mm uranium-tipped bullet casing" + desc = "A 14mm uranium-tipped bullet casing." + caliber = "14" + projectile_type = /obj/item/projectile/bullet/mm14/uraniumtipped +*/ + +// deprecated musketball +/obj/item/ammo_casing/caseless/musketball + name = "Musketball" + desc = "This is a lead ball for a musket." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/F13/musketball + +// laser musket ammo +/obj/item/ammo_casing/caseless/lasermusket + name = "Battery" + desc = "A single use battery for the lasmusket." + caliber = CALIBER_MEDIUM + icon_state = "lasmusketbat" + projectile_type = /obj/item/projectile/beam/laser/musket + firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy + +// brick +/obj/item/ammo_casing/caseless/brick + name = "brick" + desc = "a weighty brick for bashing heads. You too might find some laying around with *brick" + icon = 'modular_coyote/icons/objects/brick.dmi' + icon_state = "brick" + item_state = "brick" + force = 15 + throwforce = 20 + throw_speed = 1 + throw_range = 10 + w_class = WEIGHT_CLASS_TINY + resistance_flags = FIRE_PROOF + total_mass = TOTAL_MASS_SMALL_ITEM + attack_verb = list("attacked", "bashed", "brained", "thunked", "clobbered") + attack_speed = CLICK_CD_MELEE + max_integrity = 200 + armor = ARMOR_VALUE_GENERIC_ITEM + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/brick + is_pickable = TRUE + custom_materials = list(/datum/material/glass = 50) + fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_ROCK + hitsound = 'sound/effects/brickthrow.ogg' + +/obj/item/ammo_casing/caseless/g11 + name = "4.73mm caseless cartridge" + desc = "An 4.73 self-contained caseless rifle cartridge." + caliber = CALIBER_MEDIUM + icon_state = "762-casing" + projectile_type = /obj/item/projectile/bullet/a473 + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH + sound_properties = CSP_RIFLE_LIGHT + +/obj/item/ammo_casing/caseless/g11/rubber + name = "4.73mm polyurethane cartridge" + projectile_type = /obj/item/projectile/bullet/a473/rubber + material_class = BULLET_IS_LIGHT_RIFLE + casing_quality = BULLET_IS_RUBBER + custom_materials = list( + /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/caseless/g11/incendiary + name = "4.73mm tracer cartridge" + projectile_type = /obj/item/projectile/bullet/a473/incendiary + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/* +/obj/item/ammo_casing/caseless/g11/uraniumtipped + name = "4.73mm U-235 cartridge" + projectile_type = /obj/item/projectile/bullet/a473/uraniumtipped +*/ + +/obj/item/ammo_casing/caseless/g11/dumdum + name = "4.73mm flat-nose cartridge" + projectile_type = /obj/item/projectile/bullet/a473/dumdum + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/caseless/g11/explosive + name = "4.73mm explosive caseless cartridge" + desc = "An explosive 4.73 self-contained caseless rifle cartridge." + projectile_type = /obj/item/projectile/bullet/a473/explosive + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH + +/obj/item/ammo_casing/caseless/g11/shock + name = "4.73mm electro-static discharge cartridge" + projectile_type = /obj/item/projectile/bullet/a473/shock + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD + +/obj/item/ammo_casing/caseless/g11/hv + name = "4.73mm highvelocity cartridge" + projectile_type = /obj/item/projectile/bullet/a473/hv + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH + +// balls +/obj/item/ammo_casing/caseless/flintlock + name = "packed blackpowder cartridge" + desc = "a measure of blackpowder and round musket ball." + caliber = CALIBER_MEDIUM + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "flintlock_casing" + projectile_type = /obj/item/projectile/flintlock + custom_materials = list( + /datum/material/iron = MATS_FLINTLOCK_LIGHT_BULLET, // what casing? ~ uwu ~ + /datum/material/blackpowder = MATS_FLINTLOCK_LIGHT_POWDER) + sound_properties = CSP_FLINTLOCK + custom_materials = list(/datum/material/blackpowder = 500) + w_class = WEIGHT_CLASS_SMALL + variance = CASING_SPREAD_FLINTLOCK + +/obj/item/ammo_casing/caseless/flintlock/rubber + name = "packed blackpowder rubber cartridge" + desc = "A superball mashed into a blackpowder cartridge. It's not very effective, but it's fun to shoot. Less than lethal?" + caliber = CALIBER_FLINTLOCK + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "flintlock_casing_rubber" + projectile_type = /obj/item/projectile/flintlock/rubber + sound_properties = CSP_FLINTLOCK + variance = CASING_SPREAD_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_FLINTLOCK_LIGHT_POWDER, // what casing? ~ uwu ~ + /datum/material/blackpowder = MATS_FLINTLOCK_HEAVY_POWDER) + w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/projectiles/ammunition/ballistic/revolver.dm b/code/modules/projectiles/ammunition/ballistic/revolver.dm deleted file mode 100644 index 061f0d4074f..00000000000 --- a/code/modules/projectiles/ammunition/ballistic/revolver.dm +++ /dev/null @@ -1,201 +0,0 @@ -// .357 -/obj/item/ammo_casing/a357 - name = ".357 FMJ bullet casing" - desc = "A .357 FMJ bullet casing." - caliber = CALIBER_357 - projectile_type = /obj/item/projectile/bullet/a357 - material_class = BULLET_IS_MEDIUM_PISTOL - custom_materials = list( - /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_PISTOL_357 - -/obj/item/ammo_casing/a357/ratshot - name = ".357 ratshot shell casing" - desc = "A .357 ratshot shell casing." - projectile_type = /obj/item/projectile/bullet/pellet/shotgun_ratshot - pellets = 6 //6 pellets for 6 damage is 36 total, same as base cartridge, but less effective against armor, more effective against rats - variance = SHOTGUN_SPREAD_BASE - -/obj/item/ammo_casing/a357/ricochet - name = ".357 ricochet bullet casing" - desc = "A .357 ricochet bullet casing." - projectile_type = /obj/item/projectile/bullet/a357/ricochet - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS - -/obj/item/ammo_casing/a357/incendiary - name = ".357 incendiary bullet casing" - desc = "A .357 incendiary bullet casing." - projectile_type = /obj/item/projectile/bullet/a357/incendiary - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/a357/improvised - name = "shoddy .357 bullet casing" - desc = "A handmade .357 magnum bullet casing." - projectile_type = /obj/item/projectile/bullet/a357/improvised - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD - -/* -// .38 special -/obj/item/ammo_casing/c38 - name = ".38 special bullet casing" - desc = "A .38 special bullet casing." - caliber = CALIBER_38 - projectile_type = /obj/item/projectile/bullet/c38 - material_class = BULLET_IS_MEDIUM_PISTOL - custom_materials = list( - /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/c38/improvised - name = "shoddy .38 special bullet casing" - desc = "A homemade .38 bullet casing." - projectile_type = /obj/item/projectile/bullet/c38/improvised - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/c38/rubber - name = ".38 special rubber bullet casing" - desc = "A .38 special rubber bullet casing. Some might call these useless, up until they're hit by em." - projectile_type = /obj/item/projectile/bullet/c38/rubber - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/c38/incendiary - name = ".38 special incendiary bullet casing" - desc = "A .38 special incendiary bullet casing. For when you want to be slightly less useless." - projectile_type = /obj/item/projectile/bullet/c38/incendiary - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_HANDLOAD -*/ -// .44 magnum -/obj/item/ammo_casing/m44 - name = ".44 magnum FMJ bullet casing" - desc = "A .44 magnum full metal jacket bullet casing." - caliber = CALIBER_44 - projectile_type = /obj/item/projectile/bullet/m44 - material_class = BULLET_IS_HEAVY_PISTOL - custom_materials = list( - /datum/material/iron = MATS_PISTOL_HEAVY_CASING + MATS_PISTOL_HEAVY_BULLET, - /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER) - fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_PISTOL_44 - -/obj/item/ammo_casing/m44/improvised - name = "shoddy .44 magnum bullet casing" - desc = "A homemade .44 magnum bullet casing." - caliber = CALIBER_44 - projectile_type = /obj/item/projectile/bullet/m44/improvised - material_class = BULLET_IS_HEAVY_PISTOL - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/m44/incendiary - name = ".44 magnum incendiary bullet casing" - desc = "A .44 magnum incendiary bullet casing." - projectile_type = /obj/item/projectile/bullet/c45/incendiary - fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_HANDLOAD - -// .45-70 Gov't -/obj/item/ammo_casing/c4570 - name = ".45-70 FMJ bullet casing" - desc = "A .45-70 full metal jacket bullet casing." - caliber = CALIBER_4570 - projectile_type = /obj/item/projectile/bullet/c4570 - material_class = BULLET_IS_HEAVY_RIFLE - custom_materials = list( - /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_RIFLE_MEDIUM - -/obj/item/ammo_casing/c4570/ratshot - name = ".45-70 forager shell casing" - desc = "A .45-70 forager shell casing." - projectile_type = /obj/item/projectile/bullet/pellet/shotgun_ratshot - pellets = 10 //10 pellets for 6 damage is 60 total, same as base cartridge, but less effective against armor, more effective against rats - variance = SHOTGUN_SPREAD_BASE - -/obj/item/ammo_casing/c4570/improvised - name = "shoddy .45-70 bullet casing" - desc = "A homemade .45-70 bullet casing." - caliber = CALIBER_4570 - projectile_type = /obj/item/projectile/bullet/c4570/improvised - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD -/* -/obj/item/ammo_casing/c4570/surplus - name = ".45-70 bullet casing" - desc = "A .45-70 bullet casing." - caliber = CALIBER_4570 - projectile_type = /obj/item/projectile/bullet/c4570/surplus - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD -*/ -/obj/item/ammo_casing/c4570/explosive - name = ".45-70 explosive bullet casing" - desc = "A .45-70 explosive bullet casing." - projectile_type = /obj/item/projectile/bullet/c4570/explosive - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS - -/obj/item/ammo_casing/c4570/knockback - name = ".45-70 ultradense bullet casing" - desc = "A .45-70 ultradense bullet casing." - projectile_type = /obj/item/projectile/bullet/c4570/knockback - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - -//.45 Long Colt bouncing -/obj/item/ammo_casing/a45lc - name = ".45 Long Colt bullet casing" - desc = "An archaic .45 long colt bullet casing." - caliber = CALIBER_45LC - projectile_type = /obj/item/projectile/bullet/a45lc - material_class = BULLET_IS_MEDIUM_PISTOL - custom_materials = list( - /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_MATCH - sound_properties = CSP_PISTOL_357 - -/obj/item/ammo_casing/a45lc/improvised - name = "shoddy .45 LC bullet casing" - desc = "An archaic .45 long colt bullet casing. Now about 25% worse." - caliber = CALIBER_45LC - projectile_type = /obj/item/projectile/bullet/a45lc/improvised - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_PISTOL * CASING_POWER_MOD_SURPLUS - diff --git a/code/modules/projectiles/ammunition/ballistic/rifle.dm b/code/modules/projectiles/ammunition/ballistic/rifle.dm deleted file mode 100644 index efcc3b5e709..00000000000 --- a/code/modules/projectiles/ammunition/ballistic/rifle.dm +++ /dev/null @@ -1,249 +0,0 @@ -// 7.62 -/obj/item/ammo_casing/a308 - name = ".308 FMJ bullet casing" - desc = "A .308 FMJ bullet casing." - icon_state = "762-casing" - caliber = CALIBER_308 - projectile_type = /obj/item/projectile/bullet/a308 - material_class = BULLET_IS_MEDIUM_RIFLE - custom_materials = list( - /datum/material/iron = MATS_RIFLE_MEDIUM_CASING + MATS_RIFLE_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER) - fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_RIFLE_MEDIUM - -/obj/item/ammo_casing/a308/improvised - name = "shoddy .308 bullet casing" - desc = "A handmade .308 bullet casing." - projectile_type = /obj/item/projectile/bullet/a308/improvised - material_class = BULLET_IS_MEDIUM_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_HANDLOAD -/* -/obj/item/ammo_casing/a762/sport - name = ".308 bullet casing" - desc = "A .308 sporting bullet casing." - projectile_type = /obj/item/projectile/bullet/a308/improvised - material_class = BULLET_IS_MEDIUM_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_RIFLE_MEDIUM_CASING + MATS_RIFLE_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER) - fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_SURPLUS -*/ -/obj/item/ammo_casing/a308/microshrapnel - name = ".308 microshrapnel bullet casing" - desc = "Like shrapnel, but smaller, and thus more annoying." - projectile_type = /obj/item/projectile/bullet/a308/microshrapnel - fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_MATCH - -/* -/obj/item/ammo_casing/a762/uraniumtipped - name = "7.62 uranium tipped bullet casing" - desc = "Not depleted uranium. Regular uranium." - projectile_type = /obj/item/projectile/bullet/a762/uraniumtipped -*/ - -/obj/item/ammo_casing/a308/rubber - name = ".308 rubber bullet casing" - desc = "A .308 rubber bullet casing, for training purposes." - projectile_type = /obj/item/projectile/bullet/a308/rubber - material_class = BULLET_IS_MEDIUM_RIFLE - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_MEDIUM_RIFLE * CASING_POWER_MOD_HANDLOAD - -// .30-06 -/obj/item/ammo_casing/a3006 - name = ".30-06 FMJ bullet casing" - desc = "A .30-06 FMJ bullet casing." - icon_state = "762-casing" - caliber = CALIBER_3006 - projectile_type = /obj/item/projectile/bullet/a3006 - material_class = BULLET_IS_HEAVY_RIFLE - custom_materials = list( - /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_RIFLE_MEDIUM - -/obj/item/ammo_casing/a3006/rubber - name = ".30-06 FMJ bullet casing" - desc = "A .30-06 FMJ bullet casing." - icon_state = "762-casing" - caliber = CALIBER_3006 - projectile_type = /obj/item/projectile/bullet/a3006/rubber - material_class = BULLET_IS_HEAVY_RIFLE - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD - sound_properties = CSP_RIFLE_MEDIUM - - -/obj/item/ammo_casing/a3006/improvised - name = "shoddy .30-06 bullet casing" - desc = "A handmade .30-06 bullet casing." - projectile_type = /obj/item/projectile/bullet/a3006/improvised - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD - -// 5.56mm -/obj/item/ammo_casing/a556 - name = "5.56mm FMJ bullet casing" - desc = "A 5.56mm bullet casing." - caliber = CALIBER_556 - projectile_type = /obj/item/projectile/bullet/a556 - material_class = BULLET_IS_LIGHT_RIFLE - custom_materials = list( - /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_RIFLE_LIGHT - -/obj/item/ammo_casing/a556/rubber - name = "5.56mm rubber bullet casing" - desc = "A 5.56mm rubber bullet casing, for training purposes." - projectile_type = /obj/item/projectile/bullet/a556/rubber - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/a556/microshrapnel - name = "5.56mm microshrapnel bullet casing" - desc = "Like shrapnel, but smaller, and thus more annoying." - projectile_type = /obj/item/projectile/bullet/a556/microshrapnel - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH - -/* -/obj/item/ammo_casing/a556/uranium_tipped - name = "5.56 uranium-tipped bullet casing" - desc = "Tax money well spent." - projectile_type = /obj/item/projectile/bullet/a556/uraniumtipped -*/ -/* -/obj/item/ammo_casing/a556/sport //.223 - name = ".223 bullet casing" - desc = "A .223 bullet casing." - projectile_type = /obj/item/projectile/bullet/a556/sport - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS -*/ -/obj/item/ammo_casing/a556/improvised - name = "shoddy 5.56 bullet casing" - desc = "A handmade 6.56 bullet casing." - projectile_type = /obj/item/projectile/bullet/a556/improvised - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -//5mm (no match) - -/obj/item/ammo_casing/m5mm - name = "5mm FMJ bullet casing" - desc = "A 5mm bullet casing." - caliber = CALIBER_5MM - projectile_type = /obj/item/projectile/bullet/m5mm - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_RIFLE_LIGHT - -/obj/item/ammo_casing/m5mm/improvised - name = "shoddy 5mm bullet casing" - desc = "A handmade 5mm bullet casing." - caliber = CALIBER_5MM - projectile_type = /obj/item/projectile/bullet/m5mm/improvised - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/m5mm/shock - name = "5mm shock bullet casing" - desc = "A 5mm shock bullet casing." - projectile_type = /obj/item/projectile/bullet/m5mm/shock - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -// 40mm (Grenade Launcher) -/obj/item/ammo_casing/a40mm - name = "40mm HE shell" - desc = "A cased high explosive grenade that can only be activated once fired out of a grenade launcher." - caliber = CALIBER_40MM - icon_state = "40mmHE" - projectile_type = /obj/item/projectile/bullet/a40mm/he - material_class = BULLET_IS_GRENADE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_GRENADE_CASING + MATS_GRENADE_BULLET, - /datum/material/blackpowder = MATS_GRENADE_POWDER) - fire_power = CASING_POWER_GRENADE * CASING_POWER_MOD_MATCH - sound_properties = CSP_40MM - -/obj/item/ammo_casing/a40mm/hedp - name = "40mm HEDP shell" - desc = "A cased dual purpose grenade that can only be activated once fired out of a grenade launcher." - caliber = CALIBER_40MM - icon_state = "40mmHEDP" - projectile_type = /obj/item/projectile/bullet/a40mm/hedp - -/obj/item/ammo_casing/a40mm/buck - name = "40mm buckshot shell" - desc = "A large caliber buckshot round, designed to be fired out of a grenade launcher." - caliber = CALIBER_40MM - icon_state = "40mmbuck" - projectile_type = /obj/item/projectile/bullet/pellet/shotgun_buckshot - custom_materials = list( - /datum/material/iron = MATS_GRENADE_CASING + MATS_SHOTGUN_BULLET, - /datum/material/blackpowder = MATS_SHOTGUN_POWDER) - pellets = 12 //96 damage. can't complain - variance = SHOTGUN_SPREAD_BASE - -// 2mm EC -/obj/item/ammo_casing/c2mm - name = "2mm gauss projectile casing" - desc = "A 2mm gauss projectile casing." - caliber = CALIBER_2MM - projectile_type = /obj/item/projectile/bullet/c2mm - material_class = BULLET_IS_GAUSS - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_GAUSS_CASING + MATS_GAUSS_BULLET, - /datum/material/blackpowder = MATS_GAUSS_POWDER, - /datum/material/titanium = MATS_GAUSS_BULLET) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - sound_properties = CSP_GAUSS - -/obj/item/ammo_casing/c2mm/blender - name = "2mm gauss blender projectile casing" - desc = "A 2mm gauss projectile casing, \"Blender\" variant. Bounces off walls at hypersonic speeds." - projectile_type = /obj/item/projectile/bullet/c2mm/blender - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - custom_materials = list( - /datum/material/iron = MATS_GAUSS_CASING + MATS_GAUSS_BULLET * 1.1, - /datum/material/blackpowder = MATS_GAUSS_POWDER, - /datum/material/titanium = MATS_GAUSS_BULLET * 1.1) diff --git a/code/modules/projectiles/ammunition/ballistic/shotgun.dm b/code/modules/projectiles/ammunition/ballistic/shotgun.dm index 584ac9fe35e..2ba8bcbeb4c 100644 --- a/code/modules/projectiles/ammunition/ballistic/shotgun.dm +++ b/code/modules/projectiles/ammunition/ballistic/shotgun.dm @@ -1,6 +1,6 @@ // Shotgun -/obj/item/ammo_casing/shotgun +/obj/item/ammo_casing/generic/shotgun name = "shotgun slug" desc = "A 12 gauge lead slug." icon = 'icons/fallout/objects/guns/ammo.dmi' @@ -15,7 +15,7 @@ fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_SURPLUS sound_properties = CSP_SHOTGUN -/obj/item/ammo_casing/shotgun/buckshot +/obj/item/ammo_casing/generic/shotgun/buckshot name = "buckshot shell" desc = "A 12 gauge buckshot shell." icon_state = "gshell" @@ -24,7 +24,7 @@ variance = SHOTGUN_SPREAD_BASE fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_SURPLUS -/obj/item/ammo_casing/shotgun/buckshot/wide +/obj/item/ammo_casing/generic/shotgun/buckshot/wide name = "supermagnum shell" desc = "A 12 gauge buckshot shell." icon_state = "gshell" @@ -32,7 +32,7 @@ pellets = 20 variance = 25 -/obj/item/ammo_casing/shotgun/needlerbuckshot +/obj/item/ammo_casing/generic/shotgun/needlerbuckshot name = "Crystal needler shotgun shell" desc = "A small gauge shell filled with crystal needlers." icon_state = "hnsg" @@ -49,7 +49,7 @@ fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_SURPLUS sound_properties = CSP_SHOTGUN -/obj/item/ammo_casing/shotgun/improvised +/obj/item/ammo_casing/generic/shotgun/improvised name = "improvised shell" desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards." icon_state = "improvshell" @@ -62,12 +62,12 @@ /datum/material/blackpowder = MATS_SHOTGUN_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/improvised/simplemob +/obj/item/ammo_casing/generic/shotgun/improvised/simplemob projectile_type = /obj/item/projectile/bullet/pellet/simplemob pellets = SHOTGUN_PELLET_IMPROVISED * 2 // double the pellets, but half the damage of each, doubles the effectiveness of armor variance = SHOTGUN_SPREAD_IMPROVISED * 3 -/obj/item/ammo_casing/shotgun/beanbag +/obj/item/ammo_casing/generic/shotgun/beanbag name = "beanbag slug" desc = "A weak beanbag slug for riot control." icon_state = "bshell" @@ -79,28 +79,28 @@ /datum/material/blackpowder = MATS_SHOTGUN_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/executioner +/obj/item/ammo_casing/generic/shotgun/executioner name = "executioner slug" desc = "A 12 gauge lead slug purpose built to annihilate flesh on impact." icon_state = "stunshell" projectile_type = /obj/item/projectile/bullet/shotgun_slug/executioner fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/pulverizer +/obj/item/ammo_casing/generic/shotgun/pulverizer name = "pulverizer slug" desc = "A 12 gauge lead slug purpose built to annihilate bones on impact." icon_state = "stunshell" projectile_type = /obj/item/projectile/bullet/shotgun_slug/pulverizer fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/incendiary +/obj/item/ammo_casing/generic/shotgun/incendiary name = "incendiary slug" desc = "An incendiary-coated shotgun slug." icon_state = "ishell" projectile_type = /obj/item/projectile/bullet/incendiary/shotgun fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/dragonsbreath +/obj/item/ammo_casing/generic/shotgun/dragonsbreath name = "dragonsbreath shell" desc = "A shotgun shell which fires a spread of incendiary pellets." icon_state = "ishell2" @@ -109,7 +109,7 @@ variance = 35 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/stunslug +/obj/item/ammo_casing/generic/shotgun/stunslug name = "taser slug" desc = "A stunning taser slug." icon_state = "stunshell" @@ -121,14 +121,14 @@ /datum/material/blackpowder = MATS_SHOTGUN_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/meteorslug +/obj/item/ammo_casing/generic/shotgun/meteorslug name = "meteorslug shell" desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired." icon_state = "mshell" projectile_type = /obj/item/projectile/bullet/shotgun_meteorslug fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/pulseslug +/obj/item/ammo_casing/generic/shotgun/pulseslug name = "pulse slug" desc = "A delicate device which can be loaded into a shotgun. The primer acts as a button which triggers the gain medium and fires a powerful \ energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \ @@ -137,14 +137,14 @@ projectile_type = /obj/item/projectile/beam/pulse/shotgun fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/frag12 +/obj/item/ammo_casing/generic/shotgun/frag12 name = "FRAG-12 slug" desc = "A high explosive breaching round for a 12 gauge shotgun." icon_state = "heshell" projectile_type = /obj/item/projectile/bullet/shotgun_frag12 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/rubbershot +/obj/item/ammo_casing/generic/shotgun/rubbershot name = "rubber shot" desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance." icon_state = "bshell" @@ -158,7 +158,7 @@ /datum/material/blackpowder = MATS_SHOTGUN_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_HANDLOAD -/obj/item/ammo_casing/shotgun/bloatfly +/obj/item/ammo_casing/generic/shotgun/bloatfly name = "bloatfly chunks" desc = "A gross pressurized stinger... thing that spits out a spray of gunk. ew." icon_state = "bshell" @@ -166,10 +166,10 @@ pellets = 1 variance = SHOTGUN_SPREAD_IMPROVISED -/obj/item/ammo_casing/shotgun/bloatfly/two +/obj/item/ammo_casing/generic/shotgun/bloatfly/two pellets = 2 -/obj/item/ammo_casing/shotgun/bloatfly/three +/obj/item/ammo_casing/generic/shotgun/bloatfly/three pellets = 3 /obj/item/projectile/bullet/pellet/bloatfly_chunk @@ -187,7 +187,7 @@ pixels_per_second = BULLET_SPEED_SHOTGUN_PELLET * 0.25 zone_accuracy_type = ZONE_WEIGHT_SHOTGUN -/obj/item/ammo_casing/shotgun/ion +/obj/item/ammo_casing/generic/shotgun/ion name = "ion shell" desc = "An advanced shotgun shell which uses a subspace ansible crystal to produce an effect similar to a standard ion rifle. \ The unique properties of the crystal split the pulse into a spread of individually weaker bolts." @@ -197,7 +197,7 @@ variance = 35 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/laserslug +/obj/item/ammo_casing/generic/shotgun/laserslug name = "scatter laser shell" desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a scatter laser weapon in a ballistic package." icon_state = "lshell" @@ -206,14 +206,14 @@ variance = 35 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/techshell +/obj/item/ammo_casing/generic/shotgun/techshell name = "unloaded technological shell" desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects." icon_state = "cshell" projectile_type = null fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/dart +/obj/item/ammo_casing/generic/shotgun/dart name = "shotgun dart" desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical." icon_state = "cshell" @@ -221,31 +221,31 @@ var/reagent_amount = 30 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/dart/Initialize() +/obj/item/ammo_casing/generic/shotgun/dart/Initialize() . = ..() create_reagents(reagent_amount, OPENCONTAINER) -/obj/item/ammo_casing/shotgun/dart/attackby() +/obj/item/ammo_casing/generic/shotgun/dart/attackby() return -/obj/item/ammo_casing/shotgun/dart/noreact +/obj/item/ammo_casing/generic/shotgun/dart/noreact name = "cryostasis shotgun dart" desc = "A dart for use in shotguns. Uses technology similar to cryostasis beakers to keep internal reagents from reacting. Can be injected with up to 10 units of any chemical." icon_state = "cnrshell" reagent_amount = 10 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/dart/noreact/Initialize() +/obj/item/ammo_casing/generic/shotgun/dart/noreact/Initialize() . = ..() ENABLE_BITFIELD(reagents.reagents_holder_flags, NO_REACT) -/obj/item/ammo_casing/shotgun/dart/bioterror +/obj/item/ammo_casing/generic/shotgun/dart/bioterror desc = "A shotgun dart filled with an obscene amount of lethal reagents. Heaven help whoever is shot with this." projectile_type = /obj/item/projectile/bullet/dart/piercing reagent_amount = 50 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/dart/bioterror/Initialize() +/obj/item/ammo_casing/generic/shotgun/dart/bioterror/Initialize() . = ..() reagents.add_reagent(/datum/reagent/toxin/amanitin, 12) //for a nasty surprise after you get shot and somehow escape and don't think to quickly purge, and even shock those who are loaded up on purging agents reagents.add_reagent(/datum/reagent/toxin/chloralhydrate, 6) @@ -255,7 +255,7 @@ reagents.add_reagent(/datum/reagent/toxin/acid, 5) reagents.add_reagent(/datum/reagent/consumable/frostoil, 10) //tempgun slowdown goes both ways and adds to the burn -/obj/item/ammo_casing/shotgun/incapacitate +/obj/item/ammo_casing/generic/shotgun/incapacitate name = "custom incapacitating shot" desc = "A shotgun casing filled with... something. used to incapacitate targets." icon_state = "bountyshell" @@ -265,7 +265,7 @@ custom_materials = list(/datum/material/iron=4000) fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/magnumshot +/obj/item/ammo_casing/generic/shotgun/magnumshot name = "12 gauge magnum buckshot shell" desc = "A 12 gauge magnum buckshot shell." icon_state = "magshell" @@ -274,7 +274,7 @@ variance = 15 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH -/obj/item/ammo_casing/shotgun/trainshot +/obj/item/ammo_casing/generic/shotgun/trainshot name = "12 gauge trainshot shell" desc = "It's a 12-gauge, 3-pellet tungsten trainshot shotgun shell. Sometimes referred to as the tungsten trinity." icon_state = "magshell" @@ -283,8 +283,85 @@ variance = 15 fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH +// 40mm (Grenade Launcher) +/obj/item/ammo_casing/a40mm + name = "40mm HE shell" + desc = "A cased high explosive grenade that can only be activated once fired out of a grenade launcher." + caliber = CALIBER_SHOTGUN + icon_state = "40mmHE" + projectile_type = /obj/item/projectile/bullet/a40mm/he + material_class = BULLET_IS_GRENADE + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_GRENADE_CASING + MATS_GRENADE_BULLET, + /datum/material/blackpowder = MATS_GRENADE_POWDER) + fire_power = CASING_POWER_GRENADE * CASING_POWER_MOD_MATCH + sound_properties = CSP_40MM + +/obj/item/ammo_casing/a40mm/hedp + name = "40mm HEDP shell" + desc = "A cased dual purpose grenade that can only be activated once fired out of a grenade launcher." + caliber = CALIBER_SHOTGUN + icon_state = "40mmHEDP" + projectile_type = /obj/item/projectile/bullet/a40mm/hedp + +/obj/item/ammo_casing/a40mm/buck + name = "40mm buckshot shell" + desc = "A large caliber buckshot round, designed to be fired out of a grenade launcher." + caliber = CALIBER_SHOTGUN + icon_state = "40mmbuck" + projectile_type = /obj/item/projectile/bullet/pellet/shotgun_buckshot + custom_materials = list( + /datum/material/iron = MATS_GRENADE_CASING + MATS_SHOTGUN_BULLET, + /datum/material/blackpowder = MATS_SHOTGUN_POWDER) + pellets = 12 //96 damage. can't complain + variance = SHOTGUN_SPREAD_BASE + +// big ass rockets +/obj/item/ammo_casing/caseless/rocket + name = "\improper Low Yield Rocket" + desc = "The PM-9LHE is an 84mm low-yield High Explosive rocket. Fire at people and pray." + caliber = CALIBER_SHOTGUN + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "m6a1" + projectile_type = /obj/item/projectile/bullet/a84mm_he + is_pickable = FALSE + custom_materials = list( + /datum/material/iron = MATS_ROCKET_CASING + MATS_ROCKET_BULLET, + /datum/material/blackpowder = MATS_ROCKET_POWDER) // great source of powder + sound_properties = CSP_MISC + +/obj/item/ammo_casing/caseless/rocket/hedp + name = "\improper High Explosive Dual Purpose Rocket" + desc = "The PM-9HEDP is an 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs." + icon_state = "og7v" + projectile_type = /obj/item/projectile/bullet/a84mm + +/obj/item/ammo_casing/caseless/rocket/incendiary + name = "\improper Incendiary Rocket" + desc = "The PM-9 I is an 84mm incendiary rocket. Fire with care." + icon_state = "rocketshell" + projectile_type = /obj/item/projectile/bullet/a84mm_incend + +/obj/item/ammo_casing/caseless/rocket/chem + name = "\improper Chemical Rocket" + desc = "The PM-9C is an 84mm chemical dispersement rocket. Fire with great shame." + icon_state = "pg7v" + projectile_type = /obj/item/projectile/bullet/a84mm_chem + +/obj/item/ammo_casing/caseless/rocket/big + name = "\improper High Yield HE Rocket" + desc = " The PM-9 HHE is like the low-yield HE rocket, but bigger." + icon_state = "m6a1" + projectile_type = /obj/item/projectile/bullet/a84mm_he_big + +/obj/item/ammo_casing/caseless/rocket/big/Initialize(mapload, set_snowflake_id) + . = ..() + transform *= 1.5 + special_transform = transform + // BETA STUFF // Obsolete -/obj/item/ammo_casing/shotgun/buckshot/test +/obj/item/ammo_casing/generic/shotgun/buckshot/test name = "buckshot shell" desc = "A 12 gauge buckshot shell." icon_state = "gshell" diff --git a/code/modules/projectiles/ammunition/ballistic/smg.dm b/code/modules/projectiles/ammunition/ballistic/smg.dm deleted file mode 100644 index 658a3627e00..00000000000 --- a/code/modules/projectiles/ammunition/ballistic/smg.dm +++ /dev/null @@ -1,44 +0,0 @@ -// .45 - -/obj/item/ammo_casing/c45 - name = ".45 FMJ bullet casing" - desc = "A .45 FMJ bullet casing." - caliber = CALIBER_45ACP - projectile_type = /obj/item/projectile/bullet/c45 - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_PISTOL_45 - -/obj/item/ammo_casing/c45/improvised - name = "shoddy .45 bullet casing" - desc = "A handmade .45 bullet casing." - caliber = CALIBER_45ACP - projectile_type = /obj/item/projectile/bullet/c45 - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/c45/incendiary - name = ".45 incendiary bullet casing" - desc = "A .45 incendiary bullet casing." - projectile_type = /obj/item/projectile/bullet/c45/incendiary - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/c45/rubber - name = ".45 rubber bullet casing" - desc = "A .45 rubber bullet casing." - projectile_type = /obj/item/projectile/bullet/c45/rubber - material_class = BULLET_IS_MEDIUM_PISTOL - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_PISTOL_MEDIUM_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_PISTOL_MEDIUM_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_HANDLOAD - diff --git a/code/modules/projectiles/ammunition/ballistic/sniper.dm b/code/modules/projectiles/ammunition/ballistic/sniper.dm deleted file mode 100644 index 166f0e4d49f..00000000000 --- a/code/modules/projectiles/ammunition/ballistic/sniper.dm +++ /dev/null @@ -1,75 +0,0 @@ -//.50 BMG - -/obj/item/ammo_casing/a50MG - name = ".50MG bullet casing" - desc = "A .50MG bullet casing." - caliber = CALIBER_50MG - icon_state = "50mg2" - projectile_type = /obj/item/projectile/bullet/a50MG - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_MATCH - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_MATCH_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_MATCH_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_MATCH_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - sound_properties = CSP_RIFLE_HEAVY - -/obj/item/ammo_casing/a50MG/improvised - name = "shoddy .50MG bullet casing" - desc = "A handmade .50MG bullet casing." - caliber = CALIBER_50MG - icon_state = "50mg2" - projectile_type = /obj/item/projectile/bullet/a50MG/improvised - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/a50MG/incendiary - name = ".50 MG incendiary bullet casing" - desc = "A .50 MG incendiary bullet casing." - icon_state = "50in2" - projectile_type = /obj/item/projectile/bullet/a50MG/incendiary - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - -/obj/item/ammo_casing/a50MG/explosive - name = ".50 MG explosive bullet casing" - desc = "Comes in 5 bullet racks...more then enough to kill anything that moves.." - icon_state = "50ex2" - projectile_type = /obj/item/projectile/bullet/a50MG/explosive - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - -/obj/item/ammo_casing/a50MG/rubber - name = ".50 MG rubber bullet casing" - desc = "Who makes .50 in rubber? This is going to kill someone." - projectile_type = /obj/item/projectile/bullet/a50MG/rubber - material_class = BULLET_IS_HEAVY_RIFLE - casing_quality = BULLET_IS_HANDLOAD - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_HEAVY_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_HEAVY_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/a50MG/penetrator - name = ".50 MG penetrator bullet casing" - desc = "This titanium-reinforced highpower bullet will penetrate anything. Yes. Anything." - projectile_type = /obj/item/projectile/bullet/a50MG/penetrator - icon_state = "50ap2" - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - -/obj/item/ammo_casing/a50MG/contam - name = "12.7mm contaminated bullet casing" - desc = "A 12.7mm explosive round where the explosive has been replaced with a chemical smoke payload." - icon_state = "50ex2" - projectile_type = /obj/item/projectile/bullet/a50MG/contam - fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_MATCH - -/* -/obj/item/ammo_casing/a50MG/uraniumtipped - name = "12.7mm uranium-tipped bullet casing" - desc = "Enriched uranium-tipped 12.7mm rifle rounds." - projectile_type = /obj/item/projectile/bullet/a50MG/uraniumtipped - icon_state = "50ap2" -*/ diff --git a/code/modules/projectiles/ammunition/caseless/_caseless.dm b/code/modules/projectiles/ammunition/caseless/_caseless.dm index 117c0e1f031..366ad791db9 100644 --- a/code/modules/projectiles/ammunition/caseless/_caseless.dm +++ b/code/modules/projectiles/ammunition/caseless/_caseless.dm @@ -5,70 +5,7 @@ custom_materials = list( /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - -/obj/item/ammo_casing/caseless/fire_casing(atom/target, mob/living/user, params, distro, quiet, zone_override, spread, damage_multiplier, penetration_multiplier, projectile_speed_multiplier, atom/fired_from) - if (..()) //successfully firing - moveToNullspace() - if(istype(fired_from, /obj/item/gun)) - var/obj/item/gun/gonne = fired_from - if(gonne.chambered == src) - gonne.chambered = null // harddels suffer - gonne.update_icon() - qdel(src) - return TRUE - else - return FALSE + caseless = TRUE /obj/item/ammo_casing/caseless/update_icon_state() icon_state = "[initial(icon_state)]" - -/obj/item/ammo_casing/caseless/needle - name = "A needler round." - desc = "A dart for use in needler pistols." - icon_state = "needlecasing" - icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = CALIBER_NEEDLE - force = 2 - throwforce = 1 - embedding = list("embed_chance"= 25) - projectile_type = /obj/item/projectile/bullet/needle - -/obj/item/ammo_casing/caseless/needle/heavy - name = "A ruby needler round." - desc = "A heavy and long dart for use in needler heavy weaponary." - icon_state = "heavyneedlecase" - icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = CALIBER_HNEEDLE - projectile_type = /obj/item/projectile/bullet/heavyneedle - -/obj/item/ammo_casing/caseless/needle/improvised - name = "A jade needler round." - desc = "A dart for use in needler pistols." - icon_state = "needleimprovcase" - icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = CALIBER_NEEDLE - force = 2 - throwforce = 1 - projectile_type = /obj/item/projectile/bullet/needle/improvised - -/obj/item/ammo_casing/caseless/musketball - name = "Musketball" - desc = "This is a lead ball for a musket." - caliber = CALIBER_MUSKET_BALL - projectile_type = /obj/item/projectile/bullet/F13/musketball - -/obj/item/ammo_casing/caseless/lasermusket - name = "Battery" - desc = "A single use battery for the lasmusket." - caliber = CALIBER_MUSKET_LASER - icon_state = "lasmusketbat" - projectile_type = /obj/item/projectile/beam/laser/musket - firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy - -/obj/item/ammo_casing/caseless/plasmacaster - name = "Plasma can" - desc = "A single use can of plasma for the plasma musket." - caliber = CALIBER_MUSKET_PLASMA - icon_state = "plasmacan" - projectile_type = /obj/item/projectile/f13plasma/plasmacaster - firing_effect_type = /obj/effect/temp_visual/dir_setting/firing_effect/energy diff --git a/code/modules/projectiles/ammunition/caseless/ballistic.dm b/code/modules/projectiles/ammunition/caseless/ballistic.dm deleted file mode 100644 index 76a280162e8..00000000000 --- a/code/modules/projectiles/ammunition/caseless/ballistic.dm +++ /dev/null @@ -1,55 +0,0 @@ -/obj/item/ammo_casing/caseless/g11 - name = "4.73mm caseless cartridge" - desc = "An 4.73 self-contained caseless rifle cartridge." - caliber = CALIBER_CASELESS - icon_state = "762-casing" - projectile_type = /obj/item/projectile/bullet/a473 - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, - /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH - sound_properties = CSP_RIFLE_LIGHT - -/obj/item/ammo_casing/caseless/g11/rubber - name = "4.73mm polyurethane cartridge" - projectile_type = /obj/item/projectile/bullet/a473/rubber - material_class = BULLET_IS_LIGHT_RIFLE - casing_quality = BULLET_IS_RUBBER - custom_materials = list( - /datum/material/iron = (MATS_RIFLE_LIGHT_CASING * MATS_AMMO_CASING_HANDLOAD_MULT) + (MATS_RIFLE_LIGHT_BULLET * MATS_AMMO_BULLET_HANDLOAD_MULT), - /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER * MATS_AMMO_POWDER_HANDLOAD_MULT) - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/caseless/g11/incendiary - name = "4.73mm tracer cartridge" - projectile_type = /obj/item/projectile/bullet/a473/incendiary - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/* -/obj/item/ammo_casing/caseless/g11/uraniumtipped - name = "4.73mm U-235 cartridge" - projectile_type = /obj/item/projectile/bullet/a473/uraniumtipped -*/ - -/obj/item/ammo_casing/caseless/g11/dumdum - name = "4.73mm flat-nose cartridge" - projectile_type = /obj/item/projectile/bullet/a473/dumdum - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/caseless/g11/explosive - name = "4.73mm explosive caseless cartridge" - desc = "An explosive 4.73 self-contained caseless rifle cartridge." - projectile_type = /obj/item/projectile/bullet/a473/explosive - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH - -/obj/item/ammo_casing/caseless/g11/shock - name = "4.73mm electro-static discharge cartridge" - projectile_type = /obj/item/projectile/bullet/a473/shock - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_HANDLOAD - -/obj/item/ammo_casing/caseless/g11/hv - name = "4.73mm highvelocity cartridge" - projectile_type = /obj/item/projectile/bullet/a473/hv - fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_MATCH diff --git a/code/modules/projectiles/ammunition/caseless/misc.dm b/code/modules/projectiles/ammunition/caseless/misc.dm index f15d3b56b78..53b49d58147 100644 --- a/code/modules/projectiles/ammunition/caseless/misc.dm +++ b/code/modules/projectiles/ammunition/caseless/misc.dm @@ -34,97 +34,3 @@ pellets = 1 variance = 5 sound_properties = CSP_MISC - -//throwin' rock, for throwin'. obtained via *rocks -/obj/item/ammo_casing/caseless/rock - name = "rock" - desc = "a nice hefty rock, for bashing over someone's head or throwing at someone's head. You can get your own with *rocks!" - icon = 'modular_coyote/icons/objects/c13ammo.dmi' - icon_state = "rock" - item_state = "rock" - force = 15 - throwforce = 20 - throw_speed = 1 // you can see it comin' - throw_range = 10 //you can chuck a rock pretty far. good luck hitting anything though - w_class = WEIGHT_CLASS_TINY - resistance_flags = FIRE_PROOF - total_mass = TOTAL_MASS_SMALL_ITEM - attack_verb = list("attacked", "bashed", "brained", "thunked", "clobbered") - attack_speed = CLICK_CD_MELEE - max_integrity = 200 - armor = ARMOR_VALUE_GENERIC_ITEM - caliber = CALIBER_ROCK - projectile_type = /obj/item/projectile/rock - is_pickable = TRUE - custom_materials = list(/datum/material/glass = 50) //rocks are made of silicon, same as sand - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_ROCK - -/obj/item/ammo_casing/caseless/brick - name = "brick" - desc = "a weighty brick for bashing heads. You too might find some laying around with *brick" - icon = 'modular_coyote/icons/objects/brick.dmi' - icon_state = "brick" - item_state = "brick" - force = 15 - throwforce = 20 - throw_speed = 1 - throw_range = 10 - w_class = WEIGHT_CLASS_TINY - resistance_flags = FIRE_PROOF - total_mass = TOTAL_MASS_SMALL_ITEM - attack_verb = list("attacked", "bashed", "brained", "thunked", "clobbered") - attack_speed = CLICK_CD_MELEE - max_integrity = 200 - armor = ARMOR_VALUE_GENERIC_ITEM - caliber = CALIBER_BRICK - projectile_type = /obj/item/projectile/brick - is_pickable = TRUE - custom_materials = list(/datum/material/glass = 50) - fire_power = CASING_POWER_LIGHT_PISTOL * CASING_POWER_MOD_SURPLUS - sound_properties = CSP_ROCK - hitsound = 'sound/effects/brickthrow.ogg' - -/obj/item/ammo_casing/caseless/flintlock - name = "packed blackpowder cartridge" - desc = "a measure of blackpowder and round musket ball." - caliber = CALIBER_FLINTLOCK - icon = 'modular_coyote/icons/objects/c13ammo.dmi' - icon_state = "flintlock_casing" - projectile_type = /obj/item/projectile/flintlock - custom_materials = list( - /datum/material/iron = MATS_FLINTLOCK_LIGHT_BULLET, // what casing? ~ uwu ~ - /datum/material/blackpowder = MATS_FLINTLOCK_LIGHT_POWDER) - sound_properties = CSP_FLINTLOCK - custom_materials = list(/datum/material/blackpowder = 500) - w_class = WEIGHT_CLASS_SMALL - variance = CASING_SPREAD_FLINTLOCK - -/obj/item/ammo_casing/caseless/flintlock/minie - name = "packed blackpowder minie cartridge" - desc = "A conical bullet designed to give flintlocks a bit more of a modern edge." - caliber = CALIBER_FLINTLOCK - icon = 'modular_coyote/icons/objects/c13ammo.dmi' - icon_state = "flintlock_casing_minie" - projectile_type = /obj/item/projectile/flintlock/minie - sound_properties = CSP_FLINTLOCK - custom_materials = list( - /datum/material/iron = MATS_FLINTLOCK_LIGHT_POWDER, // what casing? ~ uwu ~ - /datum/material/blackpowder = MATS_FLINTLOCK_HEAVY_POWDER) - w_class = WEIGHT_CLASS_SMALL - variance = CASING_SPREAD_SURPLUS - -/obj/item/ammo_casing/caseless/flintlock/rubber - name = "packed blackpowder rubber cartridge" - desc = "A superball mashed into a blackpowder cartridge. It's not very effective, but it's fun to shoot. Less than lethal?" - caliber = CALIBER_FLINTLOCK - icon = 'modular_coyote/icons/objects/c13ammo.dmi' - icon_state = "flintlock_casing_rubber" - projectile_type = /obj/item/projectile/flintlock/rubber - sound_properties = CSP_FLINTLOCK - variance = CASING_SPREAD_SURPLUS - custom_materials = list( - /datum/material/iron = MATS_FLINTLOCK_LIGHT_POWDER, // what casing? ~ uwu ~ - /datum/material/blackpowder = MATS_FLINTLOCK_HEAVY_POWDER) - w_class = WEIGHT_CLASS_SMALL - diff --git a/code/modules/projectiles/ammunition/caseless/rocket.dm b/code/modules/projectiles/ammunition/caseless/rocket.dm index 4b3cf3cd946..888c741c31f 100644 --- a/code/modules/projectiles/ammunition/caseless/rocket.dm +++ b/code/modules/projectiles/ammunition/caseless/rocket.dm @@ -1,45 +1,3 @@ -/obj/item/ammo_casing/caseless/rocket - name = "\improper Low Yield Rocket" - desc = "The PM-9LHE is an 84mm low-yield High Explosive rocket. Fire at people and pray." - caliber = CALIBER_ROCKET - icon = 'modular_coyote/icons/objects/c13ammo.dmi' - icon_state = "m6a1" - projectile_type = /obj/item/projectile/bullet/a84mm_he - is_pickable = FALSE - custom_materials = list( - /datum/material/iron = MATS_ROCKET_CASING + MATS_ROCKET_BULLET, - /datum/material/blackpowder = MATS_ROCKET_POWDER) // great source of powder - sound_properties = CSP_MISC - -/obj/item/ammo_casing/caseless/rocket/hedp - name = "\improper High Explosive Dual Purpose Rocket" - desc = "The PM-9HEDP is an 84mm High Explosive Dual Purpose rocket. Pointy end toward mechs." - icon_state = "og7v" - projectile_type = /obj/item/projectile/bullet/a84mm - -/obj/item/ammo_casing/caseless/rocket/incendiary - name = "\improper Incendiary Rocket" - desc = "The PM-9 I is an 84mm incendiary rocket. Fire with care." - icon_state = "rocketshell" - projectile_type = /obj/item/projectile/bullet/a84mm_incend - -/obj/item/ammo_casing/caseless/rocket/chem - name = "\improper Chemical Rocket" - desc = "The PM-9C is an 84mm chemical dispersement rocket. Fire with great shame." - icon_state = "pg7v" - projectile_type = /obj/item/projectile/bullet/a84mm_chem - -/obj/item/ammo_casing/caseless/rocket/big - name = "\improper High Yield HE Rocket" - desc = " The PM-9 HHE is like the low-yield HE rocket, but bigger." - icon_state = "m6a1" - projectile_type = /obj/item/projectile/bullet/a84mm_he_big - -/obj/item/ammo_casing/caseless/rocket/big/Initialize(mapload, set_snowflake_id) - . = ..() - transform *= 1.5 - special_transform = transform - /obj/item/ammo_casing/caseless/a75 desc = "A .75 bullet casing." caliber = CALIBER_75 diff --git a/code/modules/projectiles/boxes_magazines/_box_magazine.dm b/code/modules/projectiles/boxes_magazines/_box_magazine.dm index 3357094c1fb..6a769228486 100644 --- a/code/modules/projectiles/boxes_magazines/_box_magazine.dm +++ b/code/modules/projectiles/boxes_magazines/_box_magazine.dm @@ -36,6 +36,7 @@ var/start_ammo_count var/randomize_ammo_count = TRUE //am evil~ var/supposedly_a_problem = 0 + var/eject_one_casing_per_click = FALSE maptext_width = 48 //prevents ammo count from wrapping down into two lines /obj/item/ammo_box/Initialize(mapload, ...) @@ -97,27 +98,55 @@ return amount /obj/item/ammo_box/proc/fill_magazine(num_bullets = max_ammo, cock) - var/to_load = clamp(num_bullets, 0, max(0, max_ammo - LAZYLEN(stored_ammo))) - if(to_load < 1) - return - . = to_load - for(var/i in 1 to to_load) - stored_ammo += new ammo_type(src) - if(cock && istype(loc, /obj/item/gun/ballistic)) - var/obj/item/gun/ballistic/my_gun = loc - if(my_gun?.chambered?.BB) + if(replace_spent_rounds) + if(LAZYLEN(stored_ammo)) + QDEL_LIST(stored_ammo) + LAZYLENGTHEN(stored_ammo, max_ammo) + num_bullets = clamp(num_bullets, 0, LAZYLEN(stored_ammo)) + for(var/i in 1 to LAZYLEN(stored_ammo)) + var/be_spent = FALSE + if(i > num_bullets) + be_spent = TRUE + var/bluuet = new ammo_type(src, be_spent) + post_process_ammo(bluuet) + LAZYSET(stored_ammo, i, bluuet) + else + var/to_load = clamp(num_bullets, 0, max(0, max_ammo - LAZYLEN(stored_ammo))) + if(to_load < 1) return - my_gun?.chamber_round() + . = to_load + for(var/i in 1 to to_load) + var/obj/item/ammo_casing/bluuet = new ammo_type(src) + post_process_ammo(bluuet) + stored_ammo += bluuet + if(cock && istype(loc, /obj/item/gun/ballistic)) + var/obj/item/gun/ballistic/my_gun = loc + if(my_gun?.chambered?.BB) + return + my_gun?.chamber_round() + +/obj/item/ammo_box/proc/post_process_ammo(bluuet) + return + +/obj/item/ammo_box/proc/handle_ejection(mob/living/user, is_enbloc, put_it_in_their_hand, sounds_and_words) + return /obj/item/ammo_box/proc/get_round(keep = 0) - if (!stored_ammo.len) - return null - else - var/b = stored_ammo[stored_ammo.len] - stored_ammo -= b - if (keep) - stored_ammo.Insert(1,b) + if(replace_spent_rounds) + rotate() + var/b = LAZYACCESS(stored_ammo, 1) + if(!keep) + stored_ammo[1] = null return b + else + if (!stored_ammo.len) + return null + else + var/b = stored_ammo[stored_ammo.len] + stored_ammo -= b + if (keep) + stored_ammo.Insert(1,b) + return b /obj/item/ammo_box/proc/give_round(obj/item/ammo_casing/other_casing, replace_spent = 0) // Boxes don't have a caliber type, magazines do. Not sure if it's intended or not, but if we fail to find a caliber, then we fall back to ammo_type. @@ -196,16 +225,16 @@ to_chat(user, span_alert("There's already a glowing piece of metal in \the [src]! Quick, stick a casing in!")) return - if(istype(A, /obj/item/ammo_casing/)) + if(istype(A, /obj/item/ammo_casing)) if(change_caliber(user, A)) return TRUE if(load_from_casing(A, user, silent)) return TRUE - if(istype(A, /obj/item/ammo_box/)) + if(istype(A, /obj/item/ammo_box)) if(load_from_box(A, user, silent)) return TRUE if(COOLDOWN_FINISHED(src, supposedly_a_problem) && istype(A, /obj/item/gun)) - COOLDOWN_START(src, supposedly_a_problem, 1) // just a brief thing so that the game has time to load the thing before you try to load the thing again, thanks automatics + COOLDOWN_START(src, supposedly_a_problem, 2) // just a brief thing so that the game has time to load the thing before you try to load the thing again, thanks automatics return A.attackby(src, user, params, silent, replace_spent) /obj/item/ammo_box/proc/load_from_box(obj/item/ammo_box/other_ammobox, mob/user, silent) @@ -427,16 +456,32 @@ UpdateAmmoCountOverlay() //Behavior for magazines -/obj/item/ammo_box/magazine/proc/ammo_count() - return stored_ammo.len - -/obj/item/ammo_box/magazine/proc/empty_magazine() +/obj/item/ammo_box/proc/ammo_count(countempties = TRUE) + var/boolets = 0 + for(var/obj/item/ammo_casing/bullet in stored_ammo) + if(bullet && (bullet.BB || countempties)) + boolets++ + return boolets + +/obj/item/ammo_box/proc/empty_magazine() var/turf_mag = get_turf(src) for(var/obj/item/ammo in stored_ammo) ammo.forceMove(turf_mag) stored_ammo -= ammo - UpdateAmmoCountOverlay() + UpdateAmmoCountOverlay(FALSE) -/obj/item/ammo_box/magazine/handle_atom_del(atom/A) +/obj/item/ammo_box/handle_atom_del(atom/A) stored_ammo -= A update_icon() + +/obj/item/ammo_box/proc/rotate() + if(!length(stored_ammo)) + return + var/b = stored_ammo[1] + stored_ammo.Cut(1,2) + stored_ammo.Insert(0, b) + +/obj/item/ammo_box/proc/spin() + for(var/i in 1 to rand(0, max_ammo*2)) + rotate() + diff --git a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm index 4c711f11716..15de5ca08ce 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm @@ -7,23 +7,24 @@ //Shotguns -/obj/item/ammo_box/shotgun +/* +/obj/item/ammo_box/generic/shotgun icon = 'icons/fallout/objects/guns/ammo.dmi' max_ammo = 24 custom_materials = list(/datum/material/iron = MATS_SHOTGUN_BOX) - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun multiple_sprites = 2 caliber = list(CALIBER_SHOTGUN) w_class = WEIGHT_CLASS_SMALL randomize_ammo_count = FALSE -/obj/item/ammo_box/shotgun/slug +/obj/item/ammo_box/generic/shotgun/slug name = "Slug shotgun ammo box" desc = "A box full of shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun icon_state = "lbox" -/obj/item/ammo_box/shotgun/slug/crate +/obj/item/ammo_box/generic/shotgun/slug/crate name = "Slug shotgun ammo crate" desc = "A wooden crate full of shotgun shells." icon = 'modular_coyote/icons/objects/c13ammo.dmi' @@ -32,13 +33,13 @@ multiple_sprites = 4 max_ammo = 120 -/obj/item/ammo_box/shotgun/buck +/obj/item/ammo_box/generic/shotgun/buck name = "Buckshot shotgun ammo box" desc = "A box full of shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot icon_state = "gbox" -/obj/item/ammo_box/shotgun/buck/crate +/obj/item/ammo_box/generic/shotgun/buck/crate name = "Buckshot shotgun ammo crate" desc = "A wooden crate full of shotgun shells." icon = 'modular_coyote/icons/objects/c13ammo.dmi' @@ -47,19 +48,19 @@ multiple_sprites = 4 max_ammo = 120 -/obj/item/ammo_box/shotgun/magnum +/obj/item/ammo_box/generic/shotgun/magnum name = "Magnum buckshot shotgun ammo box" desc = "A box full of shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun/magnumshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/magnumshot icon_state = "mbox" -/obj/item/ammo_box/shotgun/bean +/obj/item/ammo_box/generic/shotgun/bean name = "Beanbag shotgun ammo box" desc = "A box full of shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun/beanbag + ammo_type = /obj/item/ammo_casing/generic/shotgun/beanbag icon_state = "bbox" -/obj/item/ammo_box/shotgun/bean/crate +/obj/item/ammo_box/generic/shotgun/bean/crate name = "Beanbag shotgun ammo crate" desc = "A wooden crate full of shotgun shells." icon = 'modular_coyote/icons/objects/c13ammo.dmi' @@ -68,13 +69,13 @@ multiple_sprites = 4 max_ammo = 120 -/obj/item/ammo_box/shotgun/rubber +/obj/item/ammo_box/generic/shotgun/rubber name = "Rubbershot shotgun ammo box" desc = "A box full of shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun/rubbershot + ammo_type = /obj/item/ammo_casing/generic/shotgun/rubbershot icon_state = "stunbox" -/obj/item/ammo_box/shotgun/rubber/crate +/obj/item/ammo_box/generic/shotgun/rubber/crate name = "Rubbershot shotgun ammo crate" desc = "A wooden crate full of shotgun shells." icon = 'modular_coyote/icons/objects/c13ammo.dmi' @@ -83,15 +84,15 @@ multiple_sprites = 4 max_ammo = 120 -/obj/item/ammo_box/shotgun/improvised +/obj/item/ammo_box/generic/shotgun/improvised name = "homemade shotgun shells" desc = "Recycled paper, plastic, little pieces of metal and gunpowder. Loud but not very effective." max_ammo = 24 multiple_sprites = 3 - ammo_type = /obj/item/ammo_casing/shotgun/improvised + ammo_type = /obj/item/ammo_casing/generic/shotgun/improvised icon_state = "improvshotbag" -/obj/item/ammo_box/shotgun/improvised/crate +/obj/item/ammo_box/generic/shotgun/improvised/crate name = "bulk homemade shotgun shells" desc = "A whole big bag of recycled paper, plastic, little pieces of metal and gunpowder. Loud but not very effective." icon = 'modular_coyote/icons/objects/c13ammo.dmi' @@ -100,18 +101,18 @@ multiple_sprites = 4 max_ammo = 120 -/obj/item/ammo_box/shotgun/incendiary +/obj/item/ammo_box/generic/shotgun/incendiary name = "Box of incendiary shotgun shells" desc = "A box full of incendiary shotgun shells." - ammo_type = /obj/item/ammo_casing/shotgun/incendiary + ammo_type = /obj/item/ammo_casing/generic/shotgun/incendiary icon_state = "mbox" -/obj/item/ammo_box/shotgun/trainshot +/obj/item/ammo_box/generic/shotgun/trainshot name = "trainshot shotshell ammo box" desc = "A box full of trainshot shells. For hunting trains, you suppose." - ammo_type = /obj/item/ammo_casing/shotgun/trainshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/trainshot icon_state = "trainshotbox" - +*/ /obj/item/ammo_box/flintlock name = "powderbag and musket balls" desc = "A sack full of musket balls and blackpowder." @@ -121,7 +122,7 @@ custom_materials = list(/datum/material/iron = MATS_PISTOL_SMALL_BOX) ammo_type = /obj/item/ammo_casing/caseless/flintlock multiple_sprites = 0 - caliber = list(CALIBER_FLINTLOCK) + caliber = list(CALIBER_MEDIUM) w_class = WEIGHT_CLASS_SMALL randomize_ammo_count = FALSE @@ -134,7 +135,7 @@ custom_materials = list(/datum/material/iron = MATS_PISTOL_SMALL_BOX) ammo_type = /obj/item/ammo_casing/caseless/flintlock/minie multiple_sprites = 0 - caliber = list(CALIBER_FLINTLOCK) + caliber = list(CALIBER_LONG) w_class = WEIGHT_CLASS_SMALL /obj/item/ammo_box/flintlock/rubber @@ -146,7 +147,7 @@ custom_materials = list(/datum/material/iron = MATS_PISTOL_SMALL_BOX) ammo_type = /obj/item/ammo_casing/caseless/flintlock/rubber multiple_sprites = 0 - caliber = list(CALIBER_FLINTLOCK) + caliber = list(CALIBER_MEDIUM) w_class = WEIGHT_CLASS_SMALL //.22 LR @@ -156,7 +157,7 @@ icon_state = "22rd" multiple_sprites = 2 ammo_type = /obj/item/ammo_casing/a22 - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) max_ammo = 120 w_class = WEIGHT_CLASS_SMALL custom_materials = list(/datum/material/iron = MATS_PISTOL_SMALL_BOX) @@ -214,7 +215,7 @@ icon_state = "needlecapsule" desc = "A capsule filled to the brim with needles" ammo_type = /obj/item/ammo_casing/caseless/needle - caliber = list(CALIBER_NEEDLE) + caliber = list(CALIBER_COMPACT) multiple_sprites = 2 max_ammo = 144 w_class = WEIGHT_CLASS_SMALL @@ -227,7 +228,7 @@ icon_state = "needleimprov" desc = "A capsule filled to the brim with needles" ammo_type = /obj/item/ammo_casing/caseless/needle/improvised - caliber = list(CALIBER_NEEDLE) + caliber = list(CALIBER_COMPACT) multiple_sprites = 2 max_ammo = 144 w_class = WEIGHT_CLASS_SMALL @@ -239,8 +240,8 @@ name = "Capsule full of crystal needles" icon_state = "needlerbox" desc = "A Box filled with crystal needles" - ammo_type = /obj/item/ammo_casing/shotgun/needlerbuckshot - caliber = list(CALIBER_SHOTGUNNEEDLER) + ammo_type = /obj/item/ammo_casing/generic/shotgun/needlerbuckshot + caliber = list(CALIBER_SHOTGUN) multiple_sprites = 2 max_ammo = 48 w_class = WEIGHT_CLASS_SMALL @@ -253,7 +254,7 @@ icon_state = "heavyneedles" desc = "A capsule filled with heavy duty ruby needles" ammo_type = /obj/item/ammo_casing/caseless/needle/heavy - caliber = list(CALIBER_HNEEDLE) + caliber = list(CALIBER_LONG) multiple_sprites = 2 max_ammo = 24 w_class = WEIGHT_CLASS_SMALL @@ -267,7 +268,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "9mmbox" multiple_sprites = 2 - caliber = list(CALIBER_9MM) + caliber = list(CALIBER_COMPACT) ammo_type = /obj/item/ammo_casing/c9mm max_ammo = 90 w_class = WEIGHT_CLASS_SMALL @@ -358,7 +359,7 @@ icon_state = "10mmbox" multiple_sprites = 2 ammo_type = /obj/item/ammo_casing/c10mm - caliber = list(CALIBER_10MM) + caliber = list(CALIBER_COMPACT) max_ammo = 60 w_class = WEIGHT_CLASS_SMALL custom_materials = list(/datum/material/iron = MATS_PISTOL_MEDIUM_BOX) @@ -413,7 +414,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "357box" multiple_sprites = 2 - caliber = list(CALIBER_357) + caliber = list(CALIBER_COMPACT) ammo_type = /obj/item/ammo_casing/a357 max_ammo = 50 custom_materials = list(/datum/material/iron = MATS_PISTOL_HEAVY_BOX) @@ -475,7 +476,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "44box" multiple_sprites = 2 - caliber = list(CALIBER_44) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/m44 max_ammo = 48 w_class = WEIGHT_CLASS_SMALL @@ -516,7 +517,7 @@ name = "ammo box (.45 Long Colt)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "ammobox" - caliber = list(CALIBER_45LC) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/a45lc max_ammo = 60 w_class = WEIGHT_CLASS_SMALL @@ -550,7 +551,7 @@ /obj/item/ammo_box/c45 name = "ammo box (.45 ACP)" icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = list(CALIBER_45ACP) + caliber = list(CALIBER_COMPACT) multiple_sprites = 2 icon_state = "45box" ammo_type = /obj/item/ammo_casing/c45 @@ -610,7 +611,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "4570box" multiple_sprites = 2 - caliber = list(CALIBER_4570) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/c4570 max_ammo = 30 w_class = WEIGHT_CLASS_SMALL @@ -672,7 +673,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "5mmbox" multiple_sprites = 2 - caliber = list(CALIBER_5MM) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/m5mm max_ammo = 60 w_class = WEIGHT_CLASS_SMALL @@ -714,7 +715,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "556box" multiple_sprites = 2 - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/a556 max_ammo = 50 w_class = WEIGHT_CLASS_SMALL @@ -795,7 +796,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "308box" multiple_sprites = 2 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a308 max_ammo = 40 w_class = WEIGHT_CLASS_SMALL @@ -832,7 +833,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "box30" multiple_sprites = 2 - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a3006 max_ammo = 30 w_class = WEIGHT_CLASS_SMALL @@ -931,7 +932,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "50box" multiple_sprites = 2 - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a50MG max_ammo = 24 w_class = WEIGHT_CLASS_SMALL @@ -996,7 +997,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "14mmbox" multiple_sprites = 2 - caliber = list(CALIBER_14MM) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/p14mm max_ammo = 36 w_class = WEIGHT_CLASS_SMALL @@ -1037,7 +1038,7 @@ name = "ammo box (4.73mm caseless)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "47box" - caliber = list(CALIBER_CASELESS) + caliber = list(CALIBER_MEDIUM) multiple_sprites = 2 ammo_type = /obj/item/ammo_casing/caseless/g11 w_class = WEIGHT_CLASS_SMALL @@ -1100,7 +1101,7 @@ icon_state = "lasmusketbox" multiple_sprites = 2 ammo_type = /obj/item/ammo_casing/caseless/lasermusket - caliber = list(CALIBER_MUSKET_LASER) + caliber = list(CALIBER_MEDIUM) max_ammo = 36 custom_materials = list(/datum/material/iron = MATS_RIFLE_SMALL_BOX) w_class = WEIGHT_CLASS_SMALL @@ -1113,7 +1114,7 @@ multiple_sprites = 2 ammo_type = /obj/item/ammo_casing/caseless/plasmacaster max_ammo = 24 - caliber = list(CALIBER_MUSKET_PLASMA) + caliber = list(CALIBER_LONG) custom_materials = list(/datum/material/iron = MATS_RIFLE_SMALL_BOX) w_class = WEIGHT_CLASS_SMALL randomize_ammo_count = FALSE @@ -1172,7 +1173,7 @@ name = "speed loader (.22 LR)" desc = "Designed to quickly reload revolvers." icon_state = "38" - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) ammo_type = /obj/item/ammo_casing/a22 max_ammo = 6 multiple_sprites = 1 @@ -1279,7 +1280,7 @@ desc = "Designed to quickly reload revolvers." icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "10mm" - caliber = list(CALIBER_45ACP) + caliber = list(CALIBER_COMPACT) ammo_type = /obj/item/ammo_casing/c45 max_ammo = 7 multiple_sprites = 1 @@ -1294,7 +1295,7 @@ name = "speed loader (.45 LC)" desc = "Designed to quickly reload revolvers." icon_state = "44" - caliber = list(CALIBER_45LC) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/a45lc max_ammo = 6 multiple_sprites = 1 @@ -1311,7 +1312,7 @@ name = "speed loader (.308)" desc = "Designed to quickly reload revolvers." icon_state = "rev308" - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a308 max_ammo = 10 multiple_sprites = 1 @@ -1370,7 +1371,7 @@ //Shotgun clips (sort out with the box versio if implemented) /* -/obj/item/ammo_box/shotgun +/obj/item/ammo_box/generic/shotgun name = "stripper clip (shotgun shells)" desc = "A stripper clip, designed to help with loading a shotgun slightly faster." icon = 'icons/obj/ammo.dmi' @@ -1379,25 +1380,25 @@ slot_flags = INV_SLOTBIT_BELT | INV_SLOTBIT_POCKET w_class = WEIGHT_CLASS_NORMAL w_volume = ITEM_VOLUME_STRIPPER_CLIP - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun max_ammo = 4 var/pixeloffsetx = 4 start_empty = TRUE */ -/obj/item/ammo_box/shotgun/loaded +/obj/item/ammo_box/generic/shotgun/loaded start_empty = FALSE -/obj/item/ammo_box/shotgun/loaded/rubbershot - ammo_type = /obj/item/ammo_casing/shotgun/rubbershot +/obj/item/ammo_box/generic/shotgun/loaded/rubbershot + ammo_type = /obj/item/ammo_casing/generic/shotgun/rubbershot -/obj/item/ammo_box/shotgun/loaded/buckshot - ammo_type = /obj/item/ammo_casing/shotgun/buckshot +/obj/item/ammo_box/generic/shotgun/loaded/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot -/obj/item/ammo_box/shotgun/loaded/beanbag - ammo_type = /obj/item/ammo_casing/shotgun/beanbag +/obj/item/ammo_box/generic/shotgun/loaded/beanbag + ammo_type = /obj/item/ammo_casing/generic/shotgun/beanbag -/obj/item/ammo_box/shotgun/loaded/incendiary - ammo_type = /obj/item/ammo_casing/shotgun/incendiary +/obj/item/ammo_box/generic/shotgun/loaded/incendiary + ammo_type = /obj/item/ammo_casing/generic/shotgun/incendiary /obj/item/ammo_box/musketbag/ name = "Bag of Musket Cartridges" @@ -1426,7 +1427,7 @@ name = "stripper clip (.308)" desc = "A stripper clip." icon_state = "308" - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a308 max_ammo = 5 multiple_sprites = 1 @@ -1454,7 +1455,7 @@ /obj/item/ammo_box/a22 name = "stripper clip (.22LR)" icon_state = "308" - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) ammo_type = /obj/item/ammo_casing/a22 max_ammo = 5 multiple_sprites = 1 @@ -1473,7 +1474,7 @@ desc = "A stripper clip." icon_state = "762" ammo_type = /obj/item/ammo_casing/a556 - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) max_ammo = 5 multiple_sprites = 1 custom_materials = list(/datum/material/iron = MATS_STRIPPER) @@ -1487,7 +1488,7 @@ icon_state = "needler" caliber = "needle" ammo_type = /obj/item/ammo_casing/caseless/needle - caliber = list(CALIBER_NEEDLE) + caliber = list(CALIBER_COMPACT) max_ammo = 5 multiple_sprites = 1 w_class = WEIGHT_CLASS_TINY @@ -1501,7 +1502,7 @@ icon_state = "50mg" caliber = "a50mg" ammo_type = /obj/item/ammo_casing/c2mm - caliber = list(CALIBER_2MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 5 multiple_sprites = 1 w_class = WEIGHT_CLASS_SMALL @@ -1514,7 +1515,7 @@ desc = "A rack of 2mm gauss blender ammo, for when you want to die and take everyone with you." icon_state = "50ap" ammo_type = /obj/item/ammo_casing/c2mm/blender - caliber = list(CALIBER_2MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 5 multiple_sprites = 1 w_class = WEIGHT_CLASS_SMALL @@ -1527,7 +1528,7 @@ desc = "A rack of .50 MG ammo, for when you really need something dead." icon_state = "50mg" ammo_type = /obj/item/ammo_casing/a50MG - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) max_ammo = 5 multiple_sprites = 1 w_class = WEIGHT_CLASS_SMALL @@ -1609,12 +1610,12 @@ name = "rifle magazine (.308) (+FIRE!)" ammo_type = /obj/item/ammo_casing/F13/m308/fire -/obj/item/ammo_box/shotgun/update_overlays() +/obj/item/ammo_box/generic/shotgun/update_overlays() . = ..() if(stored_ammo.len) var/offset = -4 for(var/A in stored_ammo) - var/obj/item/ammo_casing/shotgun/C = A + var/obj/item/ammo_casing/generic/shotgun/C = A offset += pixeloffsetx var/mutable_appearance/shell_overlay = mutable_appearance(icon, "[initial(C.icon_state)]-clip") shell_overlay.pixel_x += offset diff --git a/code/modules/projectiles/boxes_magazines/external/lmg.dm b/code/modules/projectiles/boxes_magazines/external/lmg.dm index 43b55e60815..3f34f28c41b 100644 --- a/code/modules/projectiles/boxes_magazines/external/lmg.dm +++ b/code/modules/projectiles/boxes_magazines/external/lmg.dm @@ -2,7 +2,7 @@ name = "box magazine (1.95x129mm)" icon_state = "a762-50" ammo_type = /obj/item/ammo_casing/mm195x129 - caliber = list(CALIBER_195) + caliber = list(CALIBER_MEDIUM) max_ammo = 50 /obj/item/ammo_box/magazine/mm195x129/hollow @@ -24,13 +24,13 @@ /obj/item/ammo_box/magazine/mm712x82/match name = "box magazine (Match 7.12x82mm)" ammo_type = /obj/item/ammo_casing/mm712x82/match - caliber = list(CALIBER_712) + caliber = list(CALIBER_MEDIUM) /obj/item/ammo_box/magazine/w3006 name = "sniper rifle magazine (.30-06)" icon_state = "sniper_mag" ammo_type = /obj/item/ammo_casing/a3006 - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) max_ammo = 7 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_MEDIUM_SMALL_RIFLE_MAGAZINE) @@ -43,7 +43,7 @@ name = "ammo box (5.56)" icon_state = "r80" ammo_type = /obj/item/ammo_casing/a556 - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) max_ammo = 60 w_class = WEIGHT_CLASS_NORMAL // suffer multiple_sprites = 2 @@ -58,7 +58,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "rpdm" ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 40 w_class = WEIGHT_CLASS_NORMAL multiple_sprites = 2 @@ -74,7 +74,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "ammobox" ammo_type = /obj/item/ammo_casing/caseless/flintlock - caliber = list(CALIBER_FLINTLOCK) + caliber = list(CALIBER_MEDIUM) max_ammo = 100 w_class = WEIGHT_CLASS_NORMAL custom_materials = list(/datum/material/iron = MATS_LIGHT_MEGA_CAN_MAGAZINE) @@ -87,7 +87,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "lanoe" ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 97 w_class = WEIGHT_CLASS_NORMAL // suffer multiple_sprites = 2 @@ -101,7 +101,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "lewis" ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 47 w_class = WEIGHT_CLASS_NORMAL multiple_sprites = 2 @@ -115,7 +115,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "bren" ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 30 w_class = WEIGHT_CLASS_SMALL multiple_sprites = 2 @@ -128,7 +128,7 @@ name = "ammo box (5mm)" icon_state = "cz53" ammo_type = /obj/item/ammo_casing/m5mm - caliber = list(CALIBER_5MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 240 w_class = WEIGHT_CLASS_GIGANTIC // agony multiple_sprites = 2 @@ -141,7 +141,7 @@ name = "ammo box (.308)" icon_state = "r80" ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 60 w_class = WEIGHT_CLASS_NORMAL multiple_sprites = 2 @@ -157,7 +157,7 @@ max_ammo = 80 w_class = WEIGHT_CLASS_BULKY slot_flags = INV_SLOTBIT_BELT | INV_SLOTBIT_BACK | INV_SLOTBIT_NECK //sling these big belts all over your fuckin self - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) custom_materials = list(/datum/material/iron = MATS_MEDIUM_BELT_MAGAZINE) /obj/item/ammo_box/magazine/mm308/empty diff --git a/code/modules/projectiles/boxes_magazines/external/pistol.dm b/code/modules/projectiles/boxes_magazines/external/pistol.dm index 12d4e172215..7741817f5af 100644 --- a/code/modules/projectiles/boxes_magazines/external/pistol.dm +++ b/code/modules/projectiles/boxes_magazines/external/pistol.dm @@ -16,7 +16,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "pistol22" ammo_type = /obj/item/ammo_casing/a22 - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) max_ammo = 16 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMALL_PISTOL_MAGAZINE) @@ -31,7 +31,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "22carbine" ammo_type = /obj/item/ammo_casing/a22 - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) max_ammo = 32 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_MEDIUM_PISTOL_MAGAZINE) @@ -46,7 +46,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "zip" ammo_type = /obj/item/ammo_casing/c9mm/improvised - caliber = ZIPGUN_AMMO_CALIBERS + caliber = CALIBER_COMPACT max_ammo = 5 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_PISTOL_SPEEDLOADER) @@ -58,7 +58,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "9mmp" ammo_type = /obj/item/ammo_casing/c9mm - caliber = list(CALIBER_9MM) + caliber = list(CALIBER_COMPACT) max_ammo = 10 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMALL_PISTOL_MAGAZINE) @@ -72,7 +72,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "9mmp" ammo_type = /obj/item/ammo_casing/bee - caliber = list(CALIBER_BEE, CALIBER_9MM) + caliber = list(CALIBER_BEE, CALIBER_COMPACT) max_ammo = 10 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMALL_PISTOL_MAGAZINE) @@ -83,7 +83,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "9mmp" ammo_type = /obj/item/ammo_casing/mouse - caliber = list(CALIBER_MOUSE, CALIBER_9MM) + caliber = list(CALIBER_MOUSE, CALIBER_COMPACT) max_ammo = 10 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMALL_PISTOL_MAGAZINE) @@ -95,7 +95,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "m9mmds" ammo_type = /obj/item/ammo_casing/c9mm - caliber = list(CALIBER_9MM) + caliber = list(CALIBER_COMPACT) max_ammo = 15 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_MEDIUM_PISTOL_MAGAZINE) @@ -108,7 +108,7 @@ name = "pistol magazine (10mm)" icon = 'icons/fallout/objects/guns/ammo.dmi' desc = "A gun magazine." - caliber = list(CALIBER_10MM) + caliber = list(CALIBER_COMPACT) custom_materials = list(/datum/material/iron = MATS_MEDIUM_PISTOL_MAGAZINE) w_class = WEIGHT_CLASS_TINY @@ -148,7 +148,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "45" ammo_type = /obj/item/ammo_casing/c45 - caliber = list(CALIBER_45ACP) + caliber = list(CALIBER_COMPACT) max_ammo = 8 multiple_sprites = 1 custom_materials = list(/datum/material/iron = MATS_MEDIUM_PISTOL_MAGAZINE) @@ -192,7 +192,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "50ae" ammo_type = /obj/item/ammo_casing/m44 - caliber = list(CALIBER_44) + caliber = list(CALIBER_MEDIUM) max_ammo = 8 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_HEAVY_PISTOL_MAGAZINE) @@ -226,7 +226,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "50ae" ammo_type = /obj/item/ammo_casing/p14mm - caliber = list(CALIBER_14MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 7 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_HEAVY_PISTOL_MAGAZINE) @@ -244,7 +244,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "5mmmag" ammo_type = /obj/item/ammo_casing/m5mm - caliber = list(CALIBER_5MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 20 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_HEAVY_PISTOL_MAGAZINE) @@ -258,7 +258,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "pistol47" ammo_type = /obj/item/ammo_casing/caseless/g11 - caliber = list(CALIBER_CASELESS) + caliber = list(CALIBER_MEDIUM) max_ammo = 18 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_HEAVY_PISTOL_MAGAZINE) @@ -272,7 +272,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "14mmmagnum" ammo_type = /obj/item/ammo_casing/p14mm - caliber = list(CALIBER_14MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 5 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_HEAVY_PISTOL_MAGAZINE) @@ -281,24 +281,24 @@ /obj/item/ammo_box/magazine/m14mmcustom/empty start_empty = 1 -// BETA STUFF // Obsolete -/obj/item/ammo_box/magazine/testbullet - name = "Bulletcrate" - icon = 'icons/fallout/objects/guns/ammo.dmi' - icon_state = "m9mmds" - ammo_type = /obj/item/ammo_casing/testcasing - caliber = list(CALIBER_9MM) - max_ammo = 100 - - +// needler capsule /obj/item/ammo_box/magazine/needlercapsule name = "Capsule filled with needlers" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "needlerpack" ammo_type = /obj/item/ammo_casing/caseless/needle - caliber = list(CALIBER_NEEDLE) + caliber = list(CALIBER_COMPACT) max_ammo = 24 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_LIGHT_RIFLE_MAGAZINE) w_class = WEIGHT_CLASS_TINY multiload = TRUE + +// BETA STUFF // Obsolete +/obj/item/ammo_box/magazine/testbullet + name = "Bulletcrate" + icon = 'icons/fallout/objects/guns/ammo.dmi' + icon_state = "m9mmds" + ammo_type = /obj/item/ammo_casing/testcasing + caliber = list(CALIBER_9MM) + max_ammo = 100 diff --git a/code/modules/projectiles/boxes_magazines/external/rifle.dm b/code/modules/projectiles/boxes_magazines/external/rifle.dm index bd773f08e5a..98d27f03d11 100644 --- a/code/modules/projectiles/boxes_magazines/external/rifle.dm +++ b/code/modules/projectiles/boxes_magazines/external/rifle.dm @@ -3,7 +3,7 @@ desc = "A well-worn magazine fitted for the surplus rifle." icon_state = "75-8" ammo_type = /obj/item/ammo_casing/c10mm - caliber = list(CALIBER_10MM) + caliber = list(CALIBER_COMPACT) max_ammo = 10 custom_materials = list(/datum/material/iron = MATS_LIGHT_SMALL_RIFLE_MAGAZINE) w_class = WEIGHT_CLASS_TINY @@ -18,7 +18,7 @@ name = "toploader magazine (5.56mm)" icon_state = "5.56m" ammo_type = /obj/item/ammo_casing/a556 - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) max_ammo = 30 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_LIGHT_RIFLE_MAGAZINE) @@ -32,7 +32,7 @@ name = "pipe rifle ammo belt (.357-ish)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "autopipe_belt" - caliber = AUTOPIPE_AMMO_CALIBERS + caliber = CALIBER_COMPACT ammo_type = /obj/item/ammo_casing/a357 max_ammo = 18 multiple_sprites = 2 @@ -49,7 +49,7 @@ /obj/item/ammo_box/magazine/m556/rifle name = "rifle magazine (5.56mm)" icon_state = "r20" - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) max_ammo = 20 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_LIGHT_RIFLE_MAGAZINE) @@ -97,7 +97,7 @@ /obj/item/ammo_box/magazine/m5mm name = "Assault Rifle Magazine (5mm)" icon_state = "r30" - caliber = list(CALIBER_5MM) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/m5mm max_ammo = 30 multiple_sprites = 2 @@ -111,7 +111,7 @@ name = "en-bloc clip (.30-06)" icon_state = "enbloc-8" ammo_type = /obj/item/ammo_casing/a3006 - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) randomize_ammo_count = FALSE max_ammo = 8 w_class = WEIGHT_CLASS_SMALL @@ -132,7 +132,7 @@ icon_state = "enbloc-8" randomize_ammo_count = FALSE ammo_type = /obj/item/ammo_casing/a308 - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 8 custom_materials = list(/datum/material/iron = MATS_STRIPPER) w_class = WEIGHT_CLASS_SMALL @@ -152,7 +152,7 @@ icon_state = "mag308" ammo_type = /obj/item/ammo_casing/a308 randomize_ammo_count = FALSE - caliber = list(CALIBER_308) + caliber = list(CALIBER_LONG) max_ammo = 10 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_MEDIUM_RIFLE_MAGAZINE) @@ -175,7 +175,7 @@ /obj/item/ammo_box/magazine/m473 name = "g11 magazine (4.73mm)" icon_state = "473mm" - caliber = list(CALIBER_CASELESS) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/caseless/g11 max_ammo = 50 multiple_sprites = 2 @@ -185,7 +185,7 @@ /obj/item/ammo_box/magazine/m473custom name = "g11 magazine (4.73mm)" icon_state = "473mmc" - caliber = list(CALIBER_CASELESS) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/caseless/g11 max_ammo = 30 multiple_sprites = 2 @@ -219,7 +219,7 @@ name = "Custom OstStrauss magazine" icon_state = "mg3" icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = list(CALIBER_556) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/a556 max_ammo = 35 multiple_sprites = 2 @@ -230,7 +230,7 @@ name = "4.7mm magazine" icon_state = "47mm" icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = list(CALIBER_CASELESS) + caliber = list(CALIBER_MEDIUM) ammo_type = /obj/item/ammo_casing/caseless/g11 max_ammo = 35 multiple_sprites = 2 @@ -244,7 +244,7 @@ name = "Stg-44 magazine chambered in 8mm kurz (.30-06)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "stgmag" - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a3006 max_ammo = 30 multiple_sprites = 2 @@ -259,7 +259,7 @@ name = "FG-42 magazine chambered in 8mm kurz (.30-06)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "fg42" - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a3006 max_ammo = 20 multiple_sprites = 2 @@ -274,7 +274,7 @@ name = "patrone 88 cartridge (30-06)" icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "3006" - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a3006 max_ammo = 5 multiple_sprites = 2 @@ -296,7 +296,7 @@ name = "Pzb39 Box magazine" icon_state = "pzb39" icon = 'icons/fallout/objects/guns/ammo.dmi' - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) ammo_type = /obj/item/ammo_casing/a50MG max_ammo = 10 multiple_sprites = 2 @@ -311,7 +311,7 @@ name = "2mm electromagnetic magazine" icon_state = "2mm" ammo_type = /obj/item/ammo_casing/c2mm - caliber = list(CALIBER_2MM) + caliber = list(CALIBER_MEDIUM) randomize_ammo_count = FALSE max_ammo = 10 multiple_sprites = 2 diff --git a/code/modules/projectiles/boxes_magazines/external/shotgun.dm b/code/modules/projectiles/boxes_magazines/external/shotgun.dm index e65d592792d..fd6f9e4b9a8 100644 --- a/code/modules/projectiles/boxes_magazines/external/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/external/shotgun.dm @@ -2,7 +2,7 @@ name = "shotgun magazine (12g buckshot)" desc = "A drum magazine." icon_state = "m12gb" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot caliber = list(CALIBER_SHOTGUN) max_ammo = 8 custom_materials = list(/datum/material/iron = MATS_SHOTGUN_MAGAZINE) @@ -15,32 +15,32 @@ /obj/item/ammo_box/magazine/m12g/stun name = "shotgun magazine (12g taser slugs)" icon_state = "m12gs" - ammo_type = /obj/item/ammo_casing/shotgun/stunslug + ammo_type = /obj/item/ammo_casing/generic/shotgun/stunslug /obj/item/ammo_box/magazine/m12g/slug name = "shotgun magazine (12g slugs)" icon_state = "m12gsl" - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun /obj/item/ammo_box/magazine/m12g/dragon name = "shotgun magazine (12g dragon's breath)" icon_state = "m12gf" - ammo_type = /obj/item/ammo_casing/shotgun/dragonsbreath + ammo_type = /obj/item/ammo_casing/generic/shotgun/dragonsbreath /obj/item/ammo_box/magazine/m12g/bioterror name = "shotgun magazine (12g bioterror)" icon_state = "m12gt" - ammo_type = /obj/item/ammo_casing/shotgun/dart/bioterror + ammo_type = /obj/item/ammo_casing/generic/shotgun/dart/bioterror /obj/item/ammo_box/magazine/m12g/meteor name = "shotgun magazine (12g meteor slugs)" icon_state = "m12gbc" - ammo_type = /obj/item/ammo_casing/shotgun/meteorslug + ammo_type = /obj/item/ammo_casing/generic/shotgun/meteorslug /obj/item/ammo_box/magazine/m12g/scatter name = "shotgun magazine (12g scatter laser shot slugs)" icon_state = "m12gb" - ammo_type = /obj/item/ammo_casing/shotgun/laserslug + ammo_type = /obj/item/ammo_casing/generic/shotgun/laserslug /* ---Fallout 13--- @@ -50,7 +50,7 @@ name = "shotgun drum magazine" desc = "A 12g drum magazine." icon_state = "riotmag" - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun caliber = list(CALIBER_SHOTGUN) max_ammo = 12 multiple_sprites = 2 @@ -58,7 +58,7 @@ w_class = WEIGHT_CLASS_NORMAL /obj/item/ammo_box/magazine/d12g/buck - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot /obj/item/ammo_box/magazine/d12g/empty start_empty = 1 @@ -68,7 +68,7 @@ desc = "A 12g magazine." icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "shotgunmag" - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun caliber = list(CALIBER_SHOTGUN) max_ammo = 8 multiple_sprites = 2 diff --git a/code/modules/projectiles/boxes_magazines/external/smg.dm b/code/modules/projectiles/boxes_magazines/external/smg.dm index e5e9139c8e9..27a17ff0242 100644 --- a/code/modules/projectiles/boxes_magazines/external/smg.dm +++ b/code/modules/projectiles/boxes_magazines/external/smg.dm @@ -8,7 +8,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "cg45" ammo_type = /obj/item/ammo_casing/c10mm - caliber = list(CALIBER_10MM) + caliber = list(CALIBER_COMPACT) max_ammo = 36 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG) @@ -22,7 +22,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "vss" ammo_type = /obj/item/ammo_casing/c9mm - caliber = list(CALIBER_9MM) + caliber = list(CALIBER_COMPACT) max_ammo = 30 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG) @@ -36,7 +36,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "grease" ammo_type = /obj/item/ammo_casing/c45 - caliber = list(CALIBER_45ACP) + caliber = list(CALIBER_COMPACT) max_ammo = 30 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG) @@ -77,7 +77,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "ppshDrum" ammo_type = /obj/item/ammo_casing/c9mm - caliber = list(CALIBER_9MM) + caliber = list(CALIBER_COMPACT) max_ammo = 71 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG_EXTENDED) @@ -91,7 +91,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "smg22" ammo_type = /obj/item/ammo_casing/a22 - caliber = list(CALIBER_22LR) + caliber = list(CALIBER_COMPACT) max_ammo = 180 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG_EXTENDED) @@ -105,7 +105,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "smg22" ammo_type = /obj/item/ammo_casing/bee - caliber = list(CALIBER_BEE, CALIBER_22LR) + caliber = list(CALIBER_BEE, CALIBER_COMPACT) max_ammo = 180 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG_EXTENDED) @@ -116,7 +116,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "tommydrum" ammo_type = /obj/item/ammo_casing/c45 - caliber = list(CALIBER_45ACP) + caliber = list(CALIBER_COMPACT) max_ammo = 50 custom_materials = list(/datum/material/iron = MATS_SMG_EXTENDED) w_class = WEIGHT_CLASS_NORMAL @@ -142,7 +142,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "14smg" ammo_type = /obj/item/ammo_casing/p14mm - caliber = list(CALIBER_14MM) + caliber = list(CALIBER_MEDIUM) max_ammo = 21 custom_materials = list(/datum/material/iron = MATS_SMG) w_class = WEIGHT_CLASS_SMALL @@ -167,7 +167,7 @@ icon = 'icons/fallout/objects/guns/ammo.dmi' icon_state = "5.56m" ammo_type = /obj/item/ammo_casing/c10mm - caliber = list(CALIBER_10MM) + caliber = list(CALIBER_COMPACT) max_ammo = 50 multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_SMG_EXTENDED) diff --git a/code/modules/projectiles/boxes_magazines/external/sniper.dm b/code/modules/projectiles/boxes_magazines/external/sniper.dm index 3a6114e124d..99c6f604c00 100644 --- a/code/modules/projectiles/boxes_magazines/external/sniper.dm +++ b/code/modules/projectiles/boxes_magazines/external/sniper.dm @@ -5,7 +5,7 @@ max_ammo = 8 randomize_ammo_count = FALSE ammo_type = /obj/item/ammo_casing/a50MG - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_STRIPPER) w_class = WEIGHT_CLASS_SMALL @@ -13,13 +13,13 @@ /obj/item/ammo_box/magazine/amr/bifrost name = "\improper MK-18 MOD 1 Mjolnir 8 round Aluminum magazine" ammo_type = /obj/item/ammo_casing/a3006 - caliber = list(CALIBER_3006) + caliber = list(CALIBER_LONG) /obj/item/ammo_box/magazine/spaagrifle name = "reloadable recoiless rifle magazine" ammo_type = /obj/item/ammo_casing/a50MG icon_state = "spaagrocket" - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) max_ammo = 1 custom_materials = list(/datum/material/iron = MATS_MISC) w_class = WEIGHT_CLASS_HUGE @@ -36,7 +36,7 @@ icon_state = "hcmag" max_ammo = 4 ammo_type = /obj/item/ammo_casing/a50MG - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) multiple_sprites= 2 custom_materials = list(/datum/material/iron = MATS_STRIPPER) w_class = WEIGHT_CLASS_SMALL @@ -64,7 +64,7 @@ icon_state = "boys" max_ammo = 5 ammo_type = /obj/item/ammo_casing/a50MG - caliber = list(CALIBER_50MG) + caliber = list(CALIBER_LONG) multiple_sprites = 2 custom_materials = list(/datum/material/iron = MATS_STRIPPER) w_class = WEIGHT_CLASS_SMALL diff --git a/code/modules/projectiles/boxes_magazines/generic_magazine_ammo_box.dm b/code/modules/projectiles/boxes_magazines/generic_magazine_ammo_box.dm new file mode 100644 index 00000000000..bb23b3c6417 --- /dev/null +++ b/code/modules/projectiles/boxes_magazines/generic_magazine_ammo_box.dm @@ -0,0 +1,97 @@ + +/obj/item/ammo_box/generic + name = "uninitialized ambiguous generic ammo box" + desc = "This ammo box can contain all sorts of stuff! It's a mystery!" + caliber = list(CALIBER_COMPACT) + ammo_type = /obj/item/ammo_casing/generic/compact // will NOT be overwritten by the ammo_kind + start_empty = TRUE // the base one is spawned by vendors, which will be filled by the ammo_kind + randomize_ammo_count = FALSE // the base one is spawned by vendors, which will be filled by the ammo_kind + var/wildspawned = FALSE // if it's wildspawned, it will be filled by the ammo_kind + var/datum/ammo_kind/ammo_kind = /datum/ammo_kind/compact + var/box_CorB = CORB_BOX + var/rawname = "" + +/obj/item/ammo_box/generic/Initialize(mapload, ...) + if(wildspawned) + SScmls.RandomizeBox(src) + . = ..() + +/obj/item/ammo_box/generic/AltClick(mob/user) + . = ..() + SScmls.ReskinBox(user, src) + +/obj/item/ammo_box/generic/CtrlShiftClick(mob/user) + . = ..() + SScmls.ReskinBox(user, src) + +/obj/item/ammo_box/generic/pop_casing(mob/user, to_ground, silent) + . = ..() + if(istype(., /obj/item/ammo_casing/generic)) + SScmls.SkinBullet(., ammo_kind, TRUE) + +/obj/item/ammo_box/generic/insert_round(obj/item/ammo_casing/other_casing, index) + . = ..() + if(istype(., /obj/item/ammo_casing/generic)) + SScmls.SkinBullet(., ammo_kind, TRUE) + +/obj/item/ammo_box/generic/update_icon_state() + . = ..() + SScmls.SkinBox(src, ammo_kind, FALSE) + +/obj/item/ammo_box/generic/examine(mob/user) + . = ..() + var/datum/ammo_kind/ACK = SScmls.GetAmmoKind(ammo_kind) + . += span_notice("Currently converting any [LAZYACCESS(caliber, 1)] into [ACK.GetBulletName()]") + . += span_notice("ALT click or CTRL+SHIFT click to change the what kind of [LAZYACCESS(caliber, 1)] it will convert!") + +/obj/item/ammo_box/generic/post_process_ammo(bluuet) + if(!istype(bluuet, /obj/item/ammo_casing/generic)) + return + SScmls.SetupBullet(bluuet, ammo_kind) + +/obj/item/ammo_box/generic/proc/PrepForGun(obj/item/gun/ballistic/gun) + if(!istype(gun, /obj/item/gun/ballistic)) + return + SetGunName(gun) + max_ammo = gun.ammo_capacity || 1 + multiload = !gun.ammo_single_load || TRUE + replace_spent_rounds = gun.is_revolver || FALSE + gun.magazine = src + +/obj/item/ammo_box/generic/proc/SetGunName(obj/item/gun/ballistic/gun) + rawname = istext(gun.ammo_magazine_name) ? gun.ammo_magazine_name : "[gun.name]" // you reload your Shoot Gun with 5.23x45mm bullets + rawname = replacetext(rawname, MAG_TOKEN_MAX_AMMO, "[max_ammo]") + +/// takes the ammo from the source and puts it into the box +/obj/item/ammo_box/generic/proc/LoadFromSource(obj/item/ammo_box/generic/source) + load_from_box(source, null, TRUE) + +/// creates a magazine version of the ammo box, as a metamagazine!!! +/obj/item/ammo_box/generic/proc/MagazineifyFrom(obj/item/ammo_box/generic/source) + caliber = source.caliber + ammo_type = source.ammo_type + ammo_kind = source.ammo_kind + name = source.name + desc = source.desc + max_ammo = source.max_ammo + multiload = source.multiload + replace_spent_rounds = source.replace_spent_rounds + start_empty = TRUE + box_CorB = CORB_MAGAZINE + + + + + +/// This is the basic Crate, to be turned into the big ammo container of your choice +/obj/item/ammo_box/generic/crate + box_CorB = CORB_CRATE + +/// This is what'll go inside generified guns, to have ammo put into us +/obj/item/ammo_box/generic/internal + fixed_mag = TRUE + +/obj/item/ammo_box/generic/magazine + start_empty = TRUE + + diff --git a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm index 18c34da6679..52b0772da06 100644 --- a/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm +++ b/code/modules/projectiles/boxes_magazines/internal/_cylinder.dm @@ -5,40 +5,6 @@ max_ammo = 7 replace_spent_rounds = 1 -/obj/item/ammo_box/magazine/internal/cylinder/ammo_count(countempties = 1) - var/boolets = 0 - for(var/obj/item/ammo_casing/bullet in stored_ammo) - if(bullet && (bullet.BB || countempties)) - boolets++ - return boolets - -/obj/item/ammo_box/magazine/internal/cylinder/fill_magazine(num_bullets) - if(LAZYLEN(stored_ammo)) - QDEL_LIST(stored_ammo) - LAZYLENGTHEN(stored_ammo, max_ammo) - num_bullets = clamp(num_bullets, 0, LAZYLEN(stored_ammo)) - for(var/i in 1 to LAZYLEN(stored_ammo)) - var/be_spent = FALSE - if(i > num_bullets) - be_spent = TRUE - var/bluuet = new ammo_type(src, be_spent) - LAZYSET(stored_ammo, i, bluuet) - -/obj/item/ammo_box/magazine/internal/cylinder/get_round(keep = 0) - rotate() - var/b = LAZYACCESS(stored_ammo, 1) - if(!keep) - stored_ammo[1] = null - return b - -/obj/item/ammo_box/magazine/internal/cylinder/proc/rotate() - var/b = stored_ammo[1] - stored_ammo.Cut(1,2) - stored_ammo.Insert(0, b) - -/obj/item/ammo_box/magazine/internal/cylinder/proc/spin() - for(var/i in 1 to rand(0, max_ammo*2)) - rotate() /* /obj/item/ammo_box/magazine/internal/cylinder/give_round(obj/item/ammo_casing/R, replace_spent = 0) if(!R || (caliber && R.caliber != caliber) || (!caliber && R.type != ammo_type)) diff --git a/code/modules/projectiles/boxes_magazines/internal/misc.dm b/code/modules/projectiles/boxes_magazines/internal/misc.dm index 03a8113b969..aee2a962c69 100644 --- a/code/modules/projectiles/boxes_magazines/internal/misc.dm +++ b/code/modules/projectiles/boxes_magazines/internal/misc.dm @@ -44,7 +44,7 @@ // BETA STUFF // Obsolete /obj/item/ammo_box/magazine/internal/shot/lethal/test - ammo_type = /obj/item/ammo_casing/shotgun/buckshot/test + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot/test max_ammo = 30 /obj/item/ammo_box/magazine/internal/cylinder/flintlock diff --git a/code/modules/projectiles/boxes_magazines/internal/revolver.dm b/code/modules/projectiles/boxes_magazines/internal/revolver.dm index 52ebe6f3f22..aa46c045c58 100644 --- a/code/modules/projectiles/boxes_magazines/internal/revolver.dm +++ b/code/modules/projectiles/boxes_magazines/internal/revolver.dm @@ -194,7 +194,7 @@ /obj/item/ammo_box/magazine/internal/cylinder/judge name = "Cylinder for a Judge" - ammo_type = /obj/item/ammo_casing/shotgun + ammo_type = /obj/item/ammo_casing/generic/shotgun caliber = list(CALIBER_SHOTGUN) max_ammo = 3 diff --git a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm index e3ec6063673..1f41e546205 100644 --- a/code/modules/projectiles/boxes_magazines/internal/shotgun.dm +++ b/code/modules/projectiles/boxes_magazines/internal/shotgun.dm @@ -1,6 +1,6 @@ /obj/item/ammo_box/magazine/internal/shot name = "shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot caliber = list(CALIBER_SHOTGUN) max_ammo = 4 multiload = 0 @@ -15,43 +15,43 @@ else return ..() /obj/item/ammo_box/magazine/internal/shot/trench - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 5 /obj/item/ammo_box/magazine/internal/shot/mino - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 3 /obj/item/ammo_box/magazine/internal/shot/needler - ammo_type = /obj/item/ammo_casing/shotgun/needlerbuckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/needlerbuckshot caliber = list(CALIBER_SHOTGUNNEEDLER) max_ammo = 6 /obj/item/ammo_box/magazine/internal/shot/tube name = "dual feed shotgun internal tube" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 6 /obj/item/ammo_box/magazine/internal/shot/lethal - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot /obj/item/ammo_box/magazine/internal/shot/shorty - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 2 /obj/item/ammo_box/magazine/internal/shot/com name = "combat shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 6 /obj/item/ammo_box/magazine/internal/shot/com/compact name = "compact combat shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 4 /obj/item/ammo_box/magazine/internal/shot/com/citykiller name = "city killer shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/buckshot + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot max_ammo = 12 /obj/item/ammo_box/magazine/internal/shot/single @@ -70,17 +70,17 @@ /obj/item/ammo_box/magazine/internal/shot/dual/simple name = "double-barrel shotgun internal magazine (simple)" - ammo_type = /obj/item/ammo_casing/shotgun/improvised + ammo_type = /obj/item/ammo_casing/generic/shotgun/improvised /obj/item/ammo_box/magazine/internal/shot/improvised name = "improvised shotgun internal magazine" caliber = SHOTGUNBAT_AMMO_CALIBERS - ammo_type = /obj/item/ammo_casing/shotgun/improvised + ammo_type = /obj/item/ammo_casing/generic/shotgun/improvised max_ammo = 1 /obj/item/ammo_box/magazine/internal/shot/police name = "police shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/beanbag + ammo_type = /obj/item/ammo_casing/generic/shotgun/beanbag max_ammo = 6 /obj/item/ammo_box/magazine/internal/shot/grenade @@ -91,7 +91,7 @@ /obj/item/ammo_box/magazine/internal/shot/bounty name = "triple-barrel shotgun internal magazine" - ammo_type = /obj/item/ammo_casing/shotgun/incapacitate + ammo_type = /obj/item/ammo_casing/generic/shotgun/incapacitate max_ammo = 3 /obj/item/ammo_box/magazine/internal/shot/tube44 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 720b8698d7c..8c9b3f6b3b3 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -1585,6 +1585,14 @@ GLOBAL_LIST_INIT(gun_yeet_words, list( playsound(src, "sound/weapons/punchmiss.ogg", 100, 1) return TRUE +/obj/item/gun/proc/modify_projectile(obj/item/projectile/BB) + //BB.damage *= G.damage_multiplier + BB.damage_mod = damage_multiplier + BB.armour_penetration *= penetration_multiplier + BB.pixels_per_second *= projectile_speed_multiplier + if(BB.zone_accuracy_type == ZONE_WEIGHT_GUNS_CHOICE) + BB.zone_accuracy_type = get_zone_accuracy_type() + /obj/item/gun/proc/post_modify_projectile(obj/item/projectile/BB) return @@ -1612,9 +1620,9 @@ GLOBAL_LIST_INIT(gun_yeet_words, list( new /obj/item/ammo_box/a308box(src) new /obj/item/ammo_box/a3006box(src) new /obj/item/ammo_box/a50MGbox(src) - new /obj/item/ammo_box/shotgun/slug(src) - new /obj/item/ammo_box/shotgun/buck(src) - new /obj/item/ammo_box/shotgun/improvised(src) + new /obj/item/ammo_box/generic/shotgun/slug(src) + new /obj/item/ammo_box/generic/shotgun/buck(src) +// new /obj/item/ammo_box/generic/shotgun/improvised(src) new /obj/item/ammo_box/m22(src) new /obj/item/ammo_box/c9mm(src) new /obj/item/ammo_box/c10mm(src) diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index babe2146528..2096cec375c 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -26,25 +26,64 @@ GLOBAL_LIST_EMPTY(gun_accepted_magazines) var/cock_sound = "gun_slide_lock" fire_sound = null //null tells the gun to draw from the casing instead of the gun for sound + /// Sets if this thing will use the cool CMLS gun-side damage and ammo properties (thanks bun!) + /// the following are CMLS vars! + var/use_cmls = TRUE // reject ballistic, embrace gameplay + /// without a damage_list defined, default to this damage + var/damage // if left null, and the rest of these damage vars are also null, the projectile will default to its own damage system + /// The damage list to use for this gun! format: list("dmg" = weight) so, list("15" = 5, "20" = 3, "1000" = 0.1) + var/damage_list = list( + "10" = 50, + "1" = 2, + "40" = 2, + ) + /// without a damage list defined, and both of these defined, will roll a random number between these two values + var/damage_high + var/damage_low + /// if not null, will override the projectile's damage type + var/damage_type + /// if not null, will override what kind of armor the projectile checks against + var/damage_armor_type + + var/datum/ammo_kind/ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + var/ammo_magazine_name = "%MAXAMMO% round clipazine" + var/ammo_capacity = 10 + var/ammo_single_load = FALSE + var/is_revolver = FALSE + + var/recoil_per_shot = 2 // degrees + + var/sound_magazine_eject = "gun_remove_empty_magazine" + var/sound_magazine_insert = "gun_insert_full_magazine" + /obj/item/gun/ballistic/Initialize() . = ..() - if(spawnwithmagazine) - if (!magazine) - if(init_mag_type) - magazine = new init_mag_type(src) - else - magazine = new mag_type(src) - if(magazine.fixed_mag) - gun_tags |= GUN_INTERNAL_MAG - allowed_mags |= mag_type - allowed_mags |= subtypesof(mag_type) - if(extra_mag_types) - if(islist(extra_mag_types) && LAZYLEN(extra_mag_types)) - allowed_mags |= extra_mag_types - else if (ispath(extra_mag_types)) - allowed_mags |= typesof(extra_mag_types) - if(LAZYLEN(disallowed_mags)) - allowed_mags -= disallowed_mags + if(use_cmls) + if(!SScmls.GunCanCMLS(src)) + message_admins("GUN [src] cannot use CMLS, please fix it! It also exploded, fix that too.") + log_world("GUN [src] cannot use CMLS, please fix it! It also exploded, fix that too.") + stack_trace("GUN [src] cannot use CMLS, please fix it! It also exploded, fix that too.") + explosion(src, 1, 1, 1, 1, TRUE, TRUE, 1) + return + SScmls.SetupGun(src) + else + if(spawnwithmagazine) + if (!magazine) + if(init_mag_type) + magazine = new init_mag_type(src) + else + magazine = new mag_type(src) + if(magazine.fixed_mag) + gun_tags |= GUN_INTERNAL_MAG + allowed_mags |= mag_type + allowed_mags |= subtypesof(mag_type) + if(extra_mag_types) + if(islist(extra_mag_types) && LAZYLEN(extra_mag_types)) + allowed_mags |= extra_mag_types + else if (ispath(extra_mag_types)) + allowed_mags |= typesof(extra_mag_types) + if(LAZYLEN(disallowed_mags)) + allowed_mags -= disallowed_mags register_magazines() chamber_round() update_icon() @@ -87,12 +126,22 @@ GLOBAL_LIST_EMPTY(gun_accepted_magazines) return // all done! icon_state = "[initial(icon_state)][sawn_off ? "-sawn" : ""]" +/obj/item/gun/ballistic/modify_projectile(obj/item/projectile/BB) + if(!isnull(damage)) BB.damage = damage + if(!isnull(damage_list)) BB.damage_list = damage_list + if(!isnull(damage_high)) BB.damage_high = damage_high + if(!isnull(damage_low)) BB.damage_low = damage_low + if(!isnull(damage_type)) BB.damage_type = damage_type + if(!isnull(damage_armor_type)) BB.flag = damage_armor_type + if(!isnull(recoil_per_shot)) BB.recoil = recoil_per_shot + // stop me~ you cant~ + /obj/item/gun/ballistic/proc/register_magazines() if(LAZYACCESS(GLOB.gun_accepted_magazines, "[type]")) return GLOB.gun_accepted_magazines["[type]"] = "" if(magazine && magazine.fixed_mag) - GLOB.gun_accepted_magazines["[type]"] = "This weapon has a fixed magazine that accepts [english_list(magazine.caliber)]." + GLOB.gun_accepted_magazines["[type]"] = "This weapon accepts [english_list(magazine.caliber)]." return var/list/names_of_mags = list() for(var/mag in allowed_mags) @@ -148,6 +197,9 @@ GLOBAL_LIST_EMPTY(gun_accepted_magazines) update_icon() return TRUE + if(SScmls.InsertCMLSmagIntoGun(user, src, A)) + return TRUE + if(istype(A, /obj/item/ammo_box)) var/obj/item/ammo_box/new_mag = A if(magazine?.fixed_mag) // fixed mag, just load bullets in @@ -236,8 +288,8 @@ GLOBAL_LIST_EMPTY(gun_accepted_magazines) /obj/item/gun/ballistic/proc/pump(mob/living/M, visible = TRUE) if(visible) - M.visible_message(span_warning("[M] [cock_wording]\s \the [src]."), span_warning("You [cock_wording] \the [src].")) - playsound(M, cock_sound, 60, 1) + M?.visible_message(span_warning("[M] [cock_wording]\s \the [src]."), span_warning("You [cock_wording] \the [src].")) + playsound(src, cock_sound, 60, 1) pump_unload(M) pump_reload(M) update_icon() //I.E. fix the desc @@ -264,6 +316,8 @@ GLOBAL_LIST_EMPTY(gun_accepted_magazines) return TRUE /obj/item/gun/ballistic/attack_self(mob/living/user) + if(SScmls.EjectCMLSmagFromGun(user, src, magazine)) + return TRUE if(magazine) if(magazine.fixed_mag || !casing_ejector) pump(user, TRUE) diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index e589b259fca..aa1b8ebee00 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -150,6 +150,9 @@ silenced = TRUE fire_sound_silenced = 'sound/f13weapons/american180.ogg' + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 180 + /obj/item/gun/ballistic/automatic/smg/american180/dp27 name = "Mini DP-27" desc = "A tiny replica DP-27, with a .22 pan magazine." @@ -196,6 +199,8 @@ silenced = TRUE fire_sound_silenced = 'sound/f13weapons/american180.ogg' + ammo_kind = /datum/ammo_kind/medium/q_939 + ammo_capacity = 20 /obj/item/gun/ballistic/automatic/c96auto name = "Mauser M712" @@ -218,6 +223,9 @@ /datum/firemode/semi_auto/fast ) + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 20 + /* * * * * * * * * * * * 14mm SMG * Heavy SMG @@ -247,6 +255,9 @@ ) fire_sound = 'sound/f13weapons/magnum_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_14mm + ammo_capacity = 20 + /* * * * * * * * * * * * Greasegun SMG! * Easy-handle .45ACP SMG @@ -278,6 +289,9 @@ suppressor_x_offset = 26 suppressor_y_offset = 19 + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 30 + /* * * * * * * * * * * * Worn greasegun SMG * Cruddy .45 SMG @@ -330,6 +344,9 @@ suppressor_y_offset = 16 fire_sound = 'sound/f13weapons/10mm_fire_03.ogg' + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 24 + /* * * * * * * * * * * * Worn 10mm SMG * Poor Baseline 10mm SMG @@ -384,6 +401,9 @@ suppressor_x_offset = 29 suppressor_y_offset = 16 + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 30 + /* * * * * * * * * * * * Uzi .22 SMG * Lighter .22 SMG @@ -415,6 +435,9 @@ suppressor_x_offset = 29 suppressor_y_offset = 16 + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 30 + /obj/item/gun/ballistic/automatic/smg/mini_uzi/smg22/mp22 name = ".22 MP5" desc = "A commercial version of the MP5 chambered in .22LR." @@ -447,6 +470,9 @@ damage_multiplier = GUN_LESS_DAMAGE_T1 can_suppress = TRUE + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 16 + //MP40: a uzi but with different flavor /obj/item/gun/ballistic/automatic/smg/mini_uzi/mp40 name = "Maschinenpistole 40" @@ -576,6 +602,9 @@ ) fire_sound = 'sound/f13weapons/10mm_fire_03.ogg' + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 36 + /* * * * * * * * * * * * Worn Carl Gustaf 10mm SMG * Poor Baseline 10mm SMG @@ -624,6 +653,9 @@ fire_sound = 'sound/weapons/gunshot_smg.ogg' + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 50 + /* * * * * * * * * * * * Whitelegs Thompson SMG * Tribal .45 SMG @@ -675,6 +707,9 @@ suppressor_y_offset = 16 fire_sound = 'sound/f13weapons/10mm_fire_03.ogg' + ammo_kind = /datum/ammo_kind/medium/q_5728mm + ammo_capacity = 50 + /* * * * * * * * * * * * Worn P90c SMG * Light 10mm SMG @@ -724,6 +759,8 @@ fire_sound = 'sound/weapons/Gunshot_silenced.ogg' fire_sound_silenced = 'sound/weapons/Gunshot_silenced.ogg' + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 60 /* * * * * * * * * * * * MP-5 SD SMG @@ -755,6 +792,9 @@ fire_sound = 'sound/weapons/Gunshot_silenced.ogg' fire_sound_silenced = 'sound/weapons/Gunshot_silenced.ogg' + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 30 + /* * * * * * * * * * * * PPSh SMG * Spraycan 9mm SMG @@ -784,6 +824,9 @@ scope_y_offset = 21 can_scope = TRUE + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 71 + /* * * * * * * * * * * * Sidewinder SMG * Multiammo SMG @@ -1007,6 +1050,8 @@ suppressor_y_offset = 31 fire_sound = 'sound/f13weapons/varmint_rifle.ogg' + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 20 /obj/item/gun/ballistic/automatic/m1carbine/covcarbine name = "T25 Assault Carbine" @@ -1131,6 +1176,9 @@ silenced = TRUE fire_sound_silenced = 'sound/weapons/Gunshot_large_silenced.ogg' + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 11 + /* * * * * * * * * * * * Commando Carbine * Silent .45 carbine @@ -1158,6 +1206,9 @@ scope_x_offset = 6 scope_y_offset = 14 + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 11 + /* * * * * * * * * * * * Combat Carbine * Baseline .45 carbine @@ -1181,6 +1232,9 @@ gun_tags = list(GUN_FA_MODDABLE) fire_sound = 'sound/f13weapons/combatrifle.ogg' + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 20 + /* * * * * * * * * * * * Trusty Combat Carbine * Slightly softer .45 carbine @@ -1266,6 +1320,10 @@ suppressor_y_offset = 31 fire_sound = 'sound/weapons/Gunshot2.ogg' + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 25 // based off of a ruger 10/22 + + /* * * * * * * * * * * * M1-22 carbine * .22 LR @@ -1347,7 +1405,8 @@ fire_sound = 'sound/f13weapons/varmint_rifle.ogg' can_scope = TRUE - + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 /* * * * * * * * * * * * * Matilda Rifle @@ -1378,6 +1437,9 @@ can_flashlight = FALSE fire_sound = 'sound/f13weapons/varmint_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + /* * * * * * * * * * * * Varmint Rifle w/ 20rd mag * Light semi-auto rifle @@ -1389,7 +1451,7 @@ * * * * * * * * * * */ /obj/item/gun/ballistic/automatic/varmint/extended - init_mag_type = /obj/item/ammo_box/magazine/m556/rifle + ammo_capacity = 60 /* * * * * * * * * * * * Verminkiller Rifle @@ -1558,6 +1620,10 @@ fire_sound = 'sound/f13weapons/varmint_rifle.ogg' reskinnable_component = /datum/component/reskinnable/service_rifle + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + + /* * * * * * * * * * * * * * * * * Famas G80{generation} * Whole generation of them. Upgrades in tier for their loot spawns. Worn spawn famas, Famas G1, P47, M41 @@ -1585,6 +1651,9 @@ can_scope = FALSE can_suppress = TRUE + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 25 + /obj/item/gun/ballistic/automatic/famas/pristine name = "Fusil D'assaut F1" desc = "A Famas, restored to a brand new state. Used heavily by french forces and the GIGN before the war." @@ -1689,7 +1758,8 @@ suppressor_y_offset = 15 fire_sound = 'sound/f13weapons/marksman_rifle.ogg' - + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 // * * * * * // * G43 rifle * @@ -1722,6 +1792,9 @@ can_bayonet = FALSE fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 + /obj/item/gun/ballistic/automatic/ww1selfloader // tier above the G43 rifle. Powerful yet slow. name = "Selbstlader 1906 Rifle" desc = "A Selbstlader 1906 self-loading rifle. This rifle was patented back in the Great War. It now seeks service in the hands of the user. It seems the wood is a bit worn down but the caliber packs one hell of a punch." @@ -1744,6 +1817,9 @@ can_suppress = TRUE fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 5 + // Civilian version of the G43, uses 5mm and has a 15 round capacity, faster firerate. /obj/item/gun/ballistic/automatic/gewehr41civ name = "5mm Civilian G10 Rifle" @@ -1768,6 +1844,9 @@ can_bayonet = FALSE fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/medium/q_5mm + ammo_capacity = 15 + /obj/item/gun/ballistic/automatic/gewehr41civ/tox name = "Custom G41 rifle" desc = "A customized G41 rifle. While it can not hold a suppressor, it's still just as sturdy as before. The rifle itself is made of a lovingly made and polished maple wood. A scene of a moth and cat is etched into the stock of the rifle. The metal is engraved with baroque motifs. A weapon fit, for the Queen." @@ -1791,6 +1870,9 @@ can_bayonet = FALSE fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 + // Worn Marksman Carbine /obj/item/gun/ballistic/automatic/marksman/worn @@ -1886,6 +1968,9 @@ scope_y_offset = 11 fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 8 + /* * * * * * * * * * * * Enfield SLR Rifle * Baseline semi-auto 7.62mm rifle @@ -1924,6 +2009,9 @@ scope_y_offset = 11 fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 + /obj/item/gun/ballistic/automatic/slr/stinki name = "Custom Enfield SLR" desc = "A custom self-loading rifle in .308. Semi-auto only." @@ -2002,6 +2090,9 @@ if(.) return + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 8 + /* * * * * * * * * * * * Old Glory Rifle * Heavier semi-auto 7.62mm rifle @@ -2078,6 +2169,9 @@ auto_eject_sound = 'sound/weapons/magout.ogg' fire_sound = 'sound/f13weapons/hunting_rifle.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 8 + /* * * * * * * * * * * * Sniper Rifle * Sniper semi-auto 7.62mm rifle @@ -2108,6 +2202,9 @@ fire_sound = 'sound/f13weapons/hunting_rifle.ogg' zoom_factor = 2 + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 8 + /* * * * * * * * * * * * Gold Sniper Rifle * Pretty Sniper semi-auto 7.62mm rifle @@ -2164,7 +2261,7 @@ /obj/item/gun/ballistic/automatic/marksman/sniper/sniperranger name = "compact sniper rifle" - desc = "A DKS 501, chambered in .30-06. With a light polymer body, it's suited for long treks through the desert. This particular model is lighter and faster." + desc = "A DKS 501, chambered in .30-06. With a light polymer body, it's suited for long treks through the desert. This particular model is lighter and faster." weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY damage_multiplier = GUN_EXTRA_DAMAGE_0 @@ -2210,6 +2307,8 @@ suppressor_y_offset = 28 reskinnable_component = null + ammo_capacity = 60 + /* * * * * * * * * * * * R91 assault rifle * Baseline 5.56mm autorifle @@ -2243,6 +2342,9 @@ suppressor_state = "ar_suppressor" fire_sound = 'sound/f13weapons/varmint_rifle.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + /* * * * * * * * * * * * Infiltrator service rifle * Quiet 5.56mm autorifle @@ -2297,6 +2399,9 @@ can_bayonet = FALSE fire_sound = 'sound/weapons/Gunshot_large_silenced.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + /* * * * * * * * * * * * Type 93 assault rifle * Chinese 5.56mm AN-94-like rifle @@ -2325,6 +2430,9 @@ suppressor_y_offset = 27 fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + /* * * * * * * * * * * * Worn Type 93 assault rifle * Chinese 5.56mm autorifle @@ -2385,6 +2493,8 @@ zoom_factor = 1.2 fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 /* * * * * * * * * * * P47 Battle rifle @@ -2419,6 +2529,9 @@ zoom_factor = 0.9 fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + /obj/item/gun/ballistic/automatic/p47merek name = "Custom P47 Rifle" desc = "A personalized P47 battle rifle, the firemode has been changed to become much slower while missing a built in scope which has to be replaced. The ammo counter still works." @@ -2476,6 +2589,9 @@ fire_sound = 'sound/f13weapons/bozar_fire.ogg' zoom_factor = 1.2 + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 20 + /* * * * * * * * * * * * Assault Carbine Rifle * Baseline 5mm autorifle @@ -2514,6 +2630,9 @@ fire_sound = 'sound/f13weapons/assault_carbine.ogg' reskinnable_component = /datum/component/reskinnable/auto_556 + ammo_kind = /datum/ammo_kind/medium/q_5mm + ammo_capacity = 30 + /* * * * * * * * * * * * Police Assault Rifle * Baseline 5mm autorifle @@ -2728,6 +2847,9 @@ can_suppress = TRUE fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_5mm + ammo_capacity = 30 + /obj/item/gun/ballistic/automatic/ak556/custom // Custom name = "Custom Ak-74 assault rifle" desc = "A AK74 assault rifle. Rechambered in 5mm Rifle NATO , this assault rifle was the answer for a more lighter and far more easier to carry. Even allows for being able to be slung around or against the back or hip of someone. This one seems to be an all black version, no wooden furniture in sight it seems." @@ -2773,6 +2895,9 @@ can_scope = FALSE can_suppress = TRUE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 8 + /obj/item/gun/ballistic/automatic/aksmol name = "Ak74u" desc = "A AK74u assault rifle. Rechambered in 5.56x45 NATO, this assault rifle was the answer for a more lighter assault rifle. This one comes with wood furniture and has no stock, hits a shy bit harder, slower firerate, and allows much easier carry at the cost of higher recoil." @@ -2797,6 +2922,9 @@ can_suppress = TRUE fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + /obj/item/gun/ballistic/automatic/aksmol/aldric //custom weapon, unused. name = "Ak74u Custom" desc = "A customized AK74u assault rifle. Rechambered in 5.45x39 NATO, this assault rifle was the answer for a more lighter assault rifle. This one comes with wood furniture and has no stock, allowing much easier carry at the cost of higher recoil." @@ -2872,6 +3000,9 @@ ) fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + //259 dps pristine version /obj/item/gun/ballistic/automatic/fnfal/pristine damage_multiplier = GUN_EXTRA_DAMAGE_T2 @@ -2897,7 +3028,7 @@ init_mag_type = /obj/item/ammo_box/magazine/m308 weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_LESS_DAMAGE_T2 + damage_multiplier = GUN_EXTRA_DAMAGE_0 cock_delay = GUN_COCK_RIFLE_BASE init_recoil = AUTORIFLE_RECOIL(2.5, 2.5) init_firemodes = list ( @@ -2909,6 +3040,9 @@ zoom_factor = 1.1 fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + /obj/item/gun/ballistic/automatic/z34rifle/needlercustom name = "The People's Rifle" desc = "A Chinese-made Type 79 marksman rifle, a knockoff of the soviet Dragunov SVD produced for the PRC's army units and special forces. This one appears to be particularly weathered from time in the wastes, a faded red cloth wrapped around a scuffed stock, some scratches on the gun metal, and some text etched onto the PSO-1 scope in Chinese." @@ -3029,6 +3163,9 @@ can_suppress = TRUE can_flashlight = FALSE + ammo_kind = /datum/ammo_kind/medium/q_473mm + ammo_capacity = 30 + /obj/item/gun/ballistic/automatic/rifle47mm/china name = "Chinese 4.7mm assault rifle" desc = "A QBZ-95-1 assault rifle rechambered in 4.7mm caseless ammo, a odd collab between West Germany's 4.7mm cartridge and the PLA. Despite the new caliber type, it performs like its own original caliber. The gun seems to fire quicker and is a shy bit more accurate with lesser recoil!" @@ -3101,6 +3238,8 @@ /datum/firemode/semi_auto/slow ) + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 /* * * * * * * * * * * * L1A1 Self Loading Rifle @@ -3128,6 +3267,9 @@ /datum/firemode/semi_auto/slow ) + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + //custom gun /obj/item/gun/ballistic/automatic/fg42tox name = "Custom FG-42 rifle" @@ -3154,7 +3296,8 @@ zoom_factor = 0.9 fire_sound = 'sound/f13weapons/fg42.ogg' - + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 20 /obj/item/gun/ballistic/automatic/democracy name = "M36 'Justice' battle rifle" @@ -3179,6 +3322,9 @@ can_suppress = TRUE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 20 + /* * * * * * * * * * * * Browning Automatic BAR Rifle * Baseline 7.62 autorifle @@ -3207,6 +3353,9 @@ gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 20 + /* * * * * * * * * * * * G11 Rifle * Fancy 4.73mm autorifle @@ -3234,6 +3383,9 @@ gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION can_scope = TRUE + ammo_kind = /datum/ammo_kind/medium/q_473mm + ammo_capacity = 50 + // Custom rifle, loadout only. ETA to becoming a 5mm or 5.56 rifle TBA /obj/item/gun/ballistic/automatic/g36 //unused, note from Tox: Will redo entirely eventually name = " G36C Assault rifle" @@ -3257,6 +3409,9 @@ can_suppress = TRUE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + //worn g11 /obj/item/gun/ballistic/automatic/g11/tox @@ -3309,6 +3464,9 @@ knife_x_offset = 25 knife_y_offset = 12 + ammo_kind = /datum/ammo_kind/medium/q_473mm + ammo_capacity = 50 + /obj/item/gun/ballistic/automatic/wt550/worn name = "WT-550 Sporting Carbine" desc = "A WT-550 locked to semi-automatic and marketed for sport shooting or home defense. This one looks like it has seen better days." @@ -3356,6 +3514,9 @@ ) fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 60 + /* * * * * * * * * * * * LSW LMG * Mobile 5.56mm LMG @@ -3385,6 +3546,9 @@ can_scope = FALSE fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 60 + //hefty and clonky /obj/item/gun/ballistic/automatic/lewis name = "Lewis automatic rifle" @@ -3405,6 +3569,9 @@ /datum/firemode/automatic/rpm150 ) + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 97 + /obj/item/gun/ballistic/automatic/lewis/dp27 name = "DP-27" desc = "An old Soviet light machinegun with a high capacity pan magazine." @@ -3456,6 +3623,9 @@ /datum/firemode/automatic/rpm200 ) + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 30 + /obj/item/gun/ballistic/automatic/bren/custom name = "Custom Bren gun" desc = "A rather heavy gun that served as the primary British infantry LMG throughout the second world war." @@ -3495,13 +3665,15 @@ weapon_class = WEAPON_CLASS_RIFLE added_spread = GUN_SPREAD_SUPERAWFUL weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_LESS_DAMAGE_T6 + damage_multiplier = GUN_LESS_DAMAGE_T3 init_recoil = LMG_RECOIL(1.2, 1.2) slowdown = GUN_SLOWDOWN_RIFLE_LMG * 2 init_firemodes = list( /datum/firemode/automatic/rpm150 ) + ammo_kind = /datum/ammo_kind/medium/q_5mm + ammo_capacity = 100 /* * * * * * * * * * * * RPD-72 @@ -3537,6 +3709,9 @@ can_bayonet = FALSE can_flashlight = FALSE + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 40 + /* * * * * * * * * * * * Oststrauß * 5.56 German LMG @@ -3572,6 +3747,8 @@ can_bayonet = FALSE can_flashlight = FALSE + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 60 /obj/item/gun/ballistic/automatic/concussive name = "Latos Systems Cromwell-55 shotgun rifle" @@ -3595,6 +3772,10 @@ can_suppress = FALSE can_bayonet = FALSE can_flashlight = FALSE + is_revolver = TRUE + + ammo_kind = /datum/ammo_kind/shotgun/q_40mm + ammo_capacity = 8 /* * * * * * * * * * * * Browning M1919 MMG @@ -3627,6 +3808,9 @@ var/require_twohands = FALSE fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 80 + /obj/item/gun/ballistic/automatic/m1919/update_icon() icon_state = "M38[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/20, 1)*20 : "-empty"]" item_state = "M38[cover_open ? "open" : "closed"][magazine ? "mag" : "nomag"]" @@ -3707,6 +3891,9 @@ can_scope = TRUE fire_sound = 'sound/f13weapons/needler.ogg' + ammo_kind = /datum/ammo_kind/compact/q_needler + ammo_capacity = 24 + /obj/item/gun/ballistic/automatic/needlerrifle/custom name = "Advanced Violet Needler Rifle" desc = "A custom and violet colored NR-43 prototype needle rifle also known as the 'Turan' in its country of origin. Manufactured by Latos Systems in a facility in Miskolc,Hungary. While this carbine is quick and lightweight, what it likes in firepower, it makes up for a rather peculiar design, built in scope, and expansive ammo capsules. A wise soldier once said.. 'Tell 'em to make it count.'." @@ -3762,6 +3949,8 @@ can_scope = FALSE fire_sound = 'sound/f13weapons/needler.ogg' + ammo_kind = /datum/ammo_kind/compact/q_needler + ammo_capacity = 60 /obj/item/gun/ballistic/automatic/needlersmg name = "Worn S-27 Akula Needler SMG" @@ -3789,6 +3978,9 @@ can_scope = FALSE fire_sound = 'sound/f13weapons/needler.ogg' + ammo_kind = /datum/ammo_kind/compact/q_needler + ammo_capacity = 15 + /obj/item/gun/ballistic/automatic/stg44custom name = "Custom Engraved STG-44" desc = "A customized and engraved STG-44. The STG-44 is a German assault rifle, champered in 8mm kurz, or .30-06 for similiar caliber, it is a striking piece of creation. The wood stock is replaced with proper and sturdy birch wood, the metal engraved with baroque motifs. On the barrel is the name 'Freyja'. Seems this gun is able to have a scope on it alongside supressor." @@ -3818,6 +4010,9 @@ can_scope = TRUE fire_sound = 'sound/f13weapons/fg42.ogg' + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 30 + /* * * * * * * * * * * TG78 Anti Material Rifle. * Uses .50 cal @@ -3849,7 +4044,8 @@ can_bayonet = FALSE can_flashlight = FALSE - + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 5 //custom ptrs rifle @@ -3878,6 +4074,9 @@ can_flashlight = FALSE can_scope = TRUE + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 5 + // Bolter Assault rifle. // Has insane recoil but makes up for extreme damage // low ROF but the damage makes up for it witha T2. Unique tier, might be too stronk @@ -3904,6 +4103,9 @@ can_bayonet = FALSE can_flashlight = FALSE + ammo_kind = /datum/ammo_kind/medium/q_14mm + ammo_capacity = 21 + /obj/item/gun/ballistic/automatic/compact14mmrifle/custom name = "Custom T55E1 Assault Carbine" desc = "A T55E1 assault compact assault rifle. Chambered in 10mm, it seems to be a custom assault carbine. It is much lighter than its bigger counterpart." @@ -3958,6 +4160,9 @@ zoom_factor = 1.2 fire_sound = 'sound/f13weapons/gauss_rifle.ogg' + ammo_kind = /datum/ammo_kind/compact/q_needler + ammo_capacity = 10 + /* * * * * * * * * * * * xl70e3 * Fancy 5.56mm autorifle @@ -3984,3 +4189,6 @@ gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION zoom_factor = 1.2 can_scope = FALSE + + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 60 diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index e3bc934aba2..8890e1e382f 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -19,6 +19,9 @@ if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing)) chamber_round() + ammo_kind = /datum/ammo_kind/shotgun/q_40mm + ammo_capacity = 1 + //pump grenade launcher /obj/item/gun/ballistic/shotgun/grenade @@ -39,6 +42,9 @@ /datum/firemode/semi_auto/slower ) + ammo_kind = /datum/ammo_kind/shotgun/q_40mm + ammo_capacity = 3 + /obj/item/gun/ballistic/revolver/grenadelauncher/cyborg desc = "A 6-shot grenade launcher." name = "multi grenade launcher" diff --git a/code/modules/projectiles/guns/ballistic/pistol.dm b/code/modules/projectiles/guns/ballistic/pistol.dm index b630bd2aa08..2e0b44c78ab 100644 --- a/code/modules/projectiles/guns/ballistic/pistol.dm +++ b/code/modules/projectiles/guns/ballistic/pistol.dm @@ -65,6 +65,9 @@ silenced = TRUE fire_sound_silenced = 'sound/f13weapons/22pistol.ogg' + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 16 + /obj/item/gun/ballistic/automatic/pistol/pistol22/val name = "Mini VAL" desc = "An absurdly tiny VAL rifle. You can barely reach its trigger." @@ -108,8 +111,9 @@ can_scope = FALSE can_bayonet = FALSE - - + ammo_kind = /datum/ammo_kind/medium/q_14mm + ammo_capacity = 4 + is_revolver = TRUE /* * * * * * * * * * * * Browning Hi-Power @@ -136,6 +140,9 @@ suppressor_y_offset = 19 fire_sound = 'sound/f13weapons/ninemil.ogg' + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 15 + //M3 common 9mm pistol. Same as the browning but as a M3 series pistol. Slightly better damager at T1 /obj/item/gun/ballistic/automatic/pistol/ninemil/m3civ name = "M3 Civillian Pistol" @@ -281,6 +288,8 @@ suppressor_y_offset = 19 fire_sound = 'sound/f13weapons/ninemil.ogg' + ammo_kind = /datum/ammo_kind/medium/q_5728mm + ammo_capacity = 20 //loadout 5mms, mirrored but with different names. /obj/item/gun/ballistic/automatic/pistol/fivemilimeterpistol/custom1 //5mm caliber pistol. flat 5mm viarable damage, but slower ROF @@ -360,6 +369,9 @@ disallowed_mags = list(/obj/item/ammo_box/magazine/m9mm/doublestack) damage_multiplier = GUN_EXTRA_DAMAGE_T3 + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 10 + //Luger. pretty much the same as a C93, same smol magazine, same semi-auto old gun /obj/item/gun/ballistic/automatic/pistol/ninemil/c93/luger name = "9mm Luger" @@ -438,6 +450,9 @@ reskinnable_component = /datum/component/reskinnable/beretta9 + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 15 + //9mm carbine: pistol capacity, but two shot burst. needs suppressor set correctly /obj/item/gun/ballistic/automatic/pistol/beretta/carbine name = "9mm carbine" @@ -532,6 +547,9 @@ can_suppress = TRUE can_scope = FALSE + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 15 + /* * * * * * * * * * * MEDIUM PISTOLS * * * * * * * * * */ @@ -564,6 +582,9 @@ suppressor_y_offset = 15 fire_sound = 'sound/f13weapons/10mm_fire_02.ogg' + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 12 + /* * * * * * * * * * * * Executive Pistol Burst Only * Burst Medium pistol @@ -650,7 +671,8 @@ can_scope = TRUE can_suppress = TRUE - + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 10 // Tox's C96. slightly less damage for a 9mm pistol, but bigger magazine and better recoil ----> Updated note: Uses 10 magazine only now, can be buffed slightly. /obj/item/gun/ballistic/automatic/pistol/type17/tox //custom @@ -686,6 +708,9 @@ init_mag_type = /obj/item/ammo_box/magazine/internal/no3pistol mag_type = /obj/item/ammo_box/magazine/internal/no3pistol + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 10 + /* * * * * * * * * * * * Sig P220 * Light Mediumer pistol @@ -718,6 +743,9 @@ lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 8 + /obj/item/gun/ballistic/automatic/pistol/sig/trusty //wiggles x 2 name = "Trusty Sig P220" desc = "The P220 Sig Sauer. A Swiss designed pistol that is compact and has an average rate of fire for a pistol. A trusty copy valued for its reliability." @@ -809,6 +837,9 @@ /datum/firemode/semi_auto/fast, ) + ammo_kind = /datum/ammo_kind/medium/q_10mm + ammo_capacity = 12 + /* * * * * * * * * * * * M1911 Semi-Auto * Light Medium pistol @@ -838,6 +869,9 @@ suppressor_y_offset = 20 fire_sound = 'sound/f13weapons/45revolver.ogg' + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 8 + /* * * * * * * * * * * * M1911 Custom Semi-Auto * Lighter Medium pistol @@ -914,6 +948,9 @@ fire_sound = 'sound/f13weapons/45revolver.ogg' gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION // Tacticool + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 8 + /* * * * * * * * * * * * * * * HEAVY SEMI-AUTO PISTOLS * * * * * * * * * * * * * * */ @@ -942,6 +979,9 @@ can_suppress = FALSE fire_sound = 'sound/f13weapons/44mag.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * * El Capitan Semi-Auto * Big Heavy pistol @@ -965,6 +1005,9 @@ ) fire_sound = 'sound/f13weapons/magnum_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * * Automag Semi-Auto * Cooler Heavy pistol @@ -984,13 +1027,17 @@ mag_type = /obj/item/ammo_box/magazine/m44/automag weapon_class = WEAPON_CLASS_SMALL weapon_weight = GUN_ONE_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_T1 + damage_multiplier = GUN_EXTRA_DAMAGE_0 init_firemodes = list( /datum/firemode/semi_auto/slow ) can_suppress = FALSE fire_sound = 'sound/f13weapons/44mag.ogg' gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION + + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * .44 automag copycats. same as the original one with or without added flavor * * * * * * * * * */ @@ -1021,6 +1068,9 @@ can_scope = FALSE fire_sound = 'sound/f13weapons/44mag.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * * 14mm Semi-Auto * Super Heavy pistol @@ -1045,6 +1095,9 @@ can_suppress = FALSE fire_sound = 'sound/f13weapons/magnum_fire.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * * 14mm Compact Semi-Auto * super Heavy pistol @@ -1068,6 +1121,9 @@ /datum/firemode/semi_auto/slow ) + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + /* * * * * * * * * * * * * K8 Assault Pistol * Custom gun for Seerman @@ -1100,6 +1156,9 @@ can_suppress = FALSE fire_sound = 'sound/f13weapons/cyberbang.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 15 + /obj/item/gun/ballistic/automatic/pistol/lugerrevolver name = "Zünder-14 Pistol" desc = "A Zünder-14 pistol. Zunder means 'detonator' in German. Comes with a side-mounted rail mount for scopes. Manufactured by Leo Armaments, this over engineered pistol is a literal toggle-lock semi-automatic pistol/revolver hybrid. Chambered in a heavy .44, the trigger is slightly lighter and easy to press. What were Leo Armaments thinking?" @@ -1121,6 +1180,8 @@ can_suppress = FALSE fire_sound = 'sound/f13weapons/cyberbang.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 6 /obj/item/gun/ballistic/automatic/pistol/lugerrevolver/tox name = "Custom Zünder-14 Pistol" @@ -1164,6 +1225,9 @@ can_suppress = FALSE fire_sound = 'sound/f13weapons/cyberbang.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 10 + //4.7mm caseless pistol. Alternative ammo type to the 5mm with slight differences. Spawn tier with shy less damage than a baseline 5mm firearm. /obj/item/gun/ballistic/automatic/pistol/pistol47mm name = "4.7mm A39 Pistol" @@ -1185,6 +1249,8 @@ can_scope = FALSE can_suppress = TRUE + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 /obj/item/gun/ballistic/automatic/pistol/needlerpistol name = "NP-149/40" @@ -1233,6 +1299,9 @@ /datum/firemode/semi_auto/slow ) + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 8 + ///////////////////////////////// // TEMPORARY REMOVE AFTER BETA // /////////////////////////////////obsolete diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index b1be6c69682..921ef7e5ee8 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -19,6 +19,7 @@ var/select = 0 //doesn't do anything? equipsound = 'sound/f13weapons/equipsounds/pistolequip.ogg' reloading_time = 0.5 SECONDS + is_revolver = TRUE /obj/item/gun/ballistic/revolver/Initialize() . = ..() @@ -45,7 +46,7 @@ to_chat(user, span_alert("[src] is empty!")) update_icon() -/obj/item/gun/ballistic/revolver/proc/eject_shells(mob/living/user, just_empties = TRUE) +/obj/item/gun/ballistic/proc/eject_shells(mob/living/user, just_empties = TRUE) if(!magazine) return FALSE var/num_unloaded = 0 @@ -138,6 +139,9 @@ /datum/firemode/semi_auto/faster ) + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/detective/derringer name = ".22LR derringer" desc = "A small four barrel derringer, designed to fire two barrels at a time." @@ -148,6 +152,9 @@ /datum/firemode/burst/two/faster ) + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 4 + /obj/item/gun/ballistic/revolver/detective/derringer/update_icon_state() if(!magazine || !get_ammo(TRUE, FALSE) || !chambered?.BB) icon_state = "[initial(icon_state)]_open" @@ -197,6 +204,8 @@ ) fire_sound = 'sound/f13weapons/45revolver.ogg' + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 7 /* * * * * * * * * * * * Hermes revolver @@ -215,7 +224,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/cylinder/hermes weapon_class = WEAPON_CLASS_SMALL weapon_weight = GUN_ONE_HAND_AKIMBO - damage_multiplier = GUN_EXTRA_DAMAGE_0 + damage_multiplier = GUN_EXTRA_DAMAGE_T1 // 7 shots made this shit way too cumbersome, added an extra damage up for the loss in damage gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION init_recoil = HANDGUN_RECOIL(1, 1) init_firemodes = list( @@ -224,6 +233,9 @@ ) use_casing_sounds = TRUE + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 6 + /* * * * * * * * * * * HEAVY REVOLVERS * * * * * * * * * * */ @@ -249,6 +261,9 @@ ) fire_sound = 'sound/f13weapons/357magnum.ogg' + ammo_kind = /datum/ammo_kind/compact/q_357 + ammo_capacity = 6 + //full auto .357 revolver. shoots wayfast /obj/item/gun/ballistic/revolver/colt357/auto name = "auto-revolver" @@ -290,6 +305,9 @@ use_casing_sounds = TRUE + ammo_kind = /datum/ammo_kind/compact/q_357 + ammo_capacity = 6 + /* * * * * * * * * * * * Mateba revolver * Cool? heavy revolver @@ -360,6 +378,9 @@ fire_sound = 'sound/f13weapons/policepistol.ogg' gun_accuracy_zone_type = ZONE_WEIGHT_AUTOMATIC // limbfucker2000 + ammo_kind = /datum/ammo_kind/compact/q_357 + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/police/webley name = "Webley Revolver" desc = "The Webley Revolver was the pre-war standard issue service pistol for the armed forces of the United Kingdom, and countries of the British Empire." @@ -403,6 +424,10 @@ init_firemodes = list( /datum/firemode/semi_auto/slow ) + + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 6 + /* * * * * * * * * * * * Pearly .44 magnum revolver * Cute heavier revolver @@ -500,6 +525,9 @@ ) fire_sound = 'sound/f13weapons/44revolver.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 6 + /* * * * * * * * * * * * * * * Lemat Revolver * -9mm chambering @@ -528,6 +556,9 @@ /datum/firemode/semi_auto ) + ammo_kind = /datum/ammo_kind/compact/q_9mm + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/Lemat/customrevolvers //custom revolver name = "'Cain' 9mm revolver" desc = "A custom 9 shot revolver!" @@ -599,6 +630,7 @@ init_firemodes = list( /datum/firemode/semi_auto/slower ) + /* * * * * * * * * * * * M2045 Magnum Revolver Rifle * Heavy revolver rifle @@ -625,7 +657,8 @@ zoom_amt = 10 zoom_out_amt = 13 - + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 /* * * * * * * * * * * * * Colt Buntline revolver @@ -655,6 +688,9 @@ can_suppress = FALSE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/compact/q_45lc + ammo_capacity = 6 + /* * * * * * * * * * * * Judge revolver * + 3 shot shotgun revolver @@ -680,6 +716,9 @@ can_suppress = FALSE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 3 + //4.7mm revolver. 6 shots, caseless ammo and shy extra damage. Spawn gun, fires faster /obj/item/gun/ballistic/revolver/revolver47mm name = "4.7mm revolver 2190 edition." @@ -701,6 +740,9 @@ can_suppress = FALSE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/medium/q_473mm + ammo_capacity = 6 + //5mm revolver. More ammo than 4.7mm at 7 shots a cylinder, hits harder but fires slower. spawn gun /obj/item/gun/ballistic/revolver/revolver5mm name = "5mm break-action revolver" @@ -722,6 +764,9 @@ can_suppress = FALSE can_bayonet = FALSE + ammo_kind = /datum/ammo_kind/medium/q_5mm + ammo_capacity = 7 + // heavy duty needler revolving rifle /obj/item/gun/ballistic/revolver/needlerrifle name = "OT-64 Heavy Needler rifle" @@ -745,6 +790,9 @@ fire_sound = 'sound/f13weapons/needler.ogg' + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 3 + /* * * * * * * * * * * * Hunting revolver * Super heavy revolver @@ -771,6 +819,9 @@ /datum/firemode/semi_auto/slower ) + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/hunting/custom name = "Deireadh le ceantar revolver" desc = "A scopable double action revolver chambered in 45-70. It seems custom made and fairly weaker than its original counterpart." @@ -812,6 +863,9 @@ else icon_state = "[initial(icon_state)]" + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 1 + /* * * * * * * * * * * * Degraded hunting revolver * Really heavy revolver @@ -829,6 +883,10 @@ init_firemodes = list( /datum/firemode/semi_auto/slower ) + + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 6 + /* * * * * * * * * * * * Sequoia revolvers * Super heavy revolver @@ -848,7 +906,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev4570 weapon_class = WEAPON_CLASS_SMALL weapon_weight = GUN_ONE_HAND_AKIMBO - damage_multiplier = GUN_EXTRA_DAMAGE_0 //it does plenty of damage without a boost >.> + damage_multiplier = GUN_EXTRA_DAMAGE_T1 //it does plenty of damage without a boost (>.>) (<.<) but it's cool init_recoil = HANDGUN_RECOIL(1.2, 1.2) gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION init_firemodes = list( @@ -856,13 +914,16 @@ ) fire_sound = 'sound/f13weapons/sequoia.ogg' + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/sequoia/bayonet name = "bladed ranger sequoia" desc = "This large, double-action revolver is a trademark weapon of the Desert Rangers. It features a dark finish with intricate engravings etched all around the weapon. Engraved along the barrel are the words 'For Honorable Service,' and 'Against All Tyrants.' The hand grip has a blade attached to the bottom. You know, for stabbin'." icon_state = "sequoia_b" item_state = "sequoia" mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev4570 - force = GUN_MELEE_FORCE_PISTOL_HEAVY * 1.5 + force = GUN_MELEE_FORCE_PISTOL_HEAVY * 3 weapon_class = WEAPON_CLASS_SMALL weapon_weight = GUN_ONE_HAND_AKIMBO damage_multiplier = GUN_EXTRA_DAMAGE_0 @@ -905,6 +966,9 @@ ) fire_sound = 'sound/f13weapons/45revolver.ogg' + ammo_kind = /datum/ammo_kind/compact/q_45lc + ammo_capacity = 6 + /obj/item/gun/ballistic/revolver/derringerLC name = ".45 LC derringer" desc = "A classy, pearl handled derringer firing .45LC in a compact package." @@ -927,6 +991,9 @@ else icon_state = "[initial(icon_state)]" + ammo_kind = /datum/ammo_kind/compact/q_45lc + ammo_capacity = 1 + /* * * * * * * * * * * * .223 revolver * Quirky revolver @@ -953,6 +1020,9 @@ ) fire_sound = 'sound/f13weapons/magnum_fire.ogg' + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 5 + /* * * * * * * * * * * * Needler 'revolver' * Wounding revolver @@ -977,6 +1047,9 @@ fire_sound = 'sound/weapons/gunshot_silenced.ogg' fire_sound_silenced = 'sound/weapons/gunshot_silenced.ogg' + ammo_kind = /datum/ammo_kind/compact/q_needler + ammo_capacity = 10 + /obj/item/gun/ballistic/revolver/needler/ultra name = "Ultracite needler" desc = "An ultracite enhanced needler pistol." //Sounds like lame bethesda stuff to me diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 6c7fd9fdc0f..fa9dea94ec6 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -103,11 +103,13 @@ ) fire_sound = 'sound/f13weapons/cowboyrepeaterfire.ogg' + ammo_kind = /datum/ammo_kind/compact/q_357 + ammo_capacity = 12 + /* * * * * * * * * * * * * * * * * .22LR Lever Action Rifle * 20 round capacity * My hands are stupid and I must game -* 我的社會信用太低所以我不能離開家 * Its In .22 I Don't Know What Else I Can Put Here * * * * * * * * * * * * * * * * * */ /obj/item/gun/ballistic/rifle/repeater/trainer @@ -135,6 +137,9 @@ ) fire_sound = 'sound/f13weapons/cowboyrepeaterfire.ogg' + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 20 + /* * * * * * * * * * * * * * * * * .22LR Mares Leg * 10 round capacity @@ -167,6 +172,9 @@ ) fire_sound = 'sound/f13weapons/cowboyrepeaterfire.ogg' + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 20 + /* * * * * * * * * * * * * * * * * Volcanic pistol * -6 round capacity @@ -196,6 +204,9 @@ ) reskinnable_component = /datum/component/reskinnable/volcanic + ammo_kind = /datum/ammo_kind/compact/q_45 + ammo_capacity = 5 + /* * * * * * * * * * * * Coyote Repeater * Baseline Repeater Tribal Skin @@ -211,7 +222,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/tube357 weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_T1 + damage_multiplier = GUN_EXTRA_DAMAGE_T2 init_recoil = CARBINE_RECOIL(1, 1) init_firemodes = list( /datum/firemode/semi_auto/slow @@ -240,6 +251,9 @@ ) fire_sound = 'sound/f13weapons/44mag.ogg' + ammo_kind = /datum/ammo_kind/medium/q_44 + ammo_capacity = 12 + /* * * * * * * * * * * * Trail Repeater Tribal * Rain Stick @@ -255,7 +269,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/tube44 weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_T1 + damage_multiplier = GUN_EXTRA_DAMAGE_T2 init_recoil = RIFLE_RECOIL(1, 2) init_firemodes = list( /datum/firemode/semi_auto/slow @@ -285,6 +299,9 @@ ) fire_sound = 'sound/f13weapons/brushgunfire.ogg' + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 10 + /* * * * * * * * * * * * Brush Repeater Tribal * Medicine Stick @@ -300,7 +317,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/tube4570 weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_0 + damage_multiplier = GUN_EXTRA_DAMAGE_T1 init_recoil = RIFLE_RECOIL(1, 2) gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION init_firemodes = list( @@ -331,6 +348,10 @@ ) fire_sound = 'sound/f13weapons/brushgunfire.ogg' + + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 7 + /* * * * * * * * * * * * Ranger repeater tribal * Smell-The-Roses @@ -346,7 +367,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/tube380 weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_T1 + damage_multiplier = GUN_EXTRA_DAMAGE_T2 init_recoil = RIFLE_RECOIL(1, 2) gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION init_firemodes = list( @@ -411,6 +432,9 @@ /datum/firemode/semi_auto/slower ) + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 5 + /obj/item/gun/ballistic/rifle/hunting/attackby(obj/item/A, mob/user, params) ..() if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter)) @@ -428,7 +452,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/boltaction/hunting weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_0 + damage_multiplier = GUN_EXTRA_DAMAGE_T1 init_recoil = RIFLE_RECOIL(1, 1) gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION can_scope = TRUE @@ -458,6 +482,9 @@ weapon_weight = GUN_TWO_HAND_ONLY damage_multiplier = GUN_EXTRA_DAMAGE_0 + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 5 + /obj/item/gun/ballistic/rifle/hunting/remington/attackby(obj/item/A, mob/user, params) //DO NOT BUBBA YOUR STANDARD ISSUE RIFLE SOLDIER! if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter)) return @@ -493,6 +520,9 @@ zoom_out_amt = 13 can_scope = FALSE + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 3 + /obj/item/gun/ballistic/rifle/hunting/paciencia/attackby(obj/item/A, mob/user, params) //no sawing off this one if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter)) return @@ -538,6 +568,9 @@ /datum/firemode/semi_auto/slower ) + ammo_kind = /datum/ammo_kind/long/q_76254r + ammo_capacity = 5 + //lee speed /obj/item/gun/ballistic/rifle/leespeedster name = "Lee Einfield 'Speed' rifle." @@ -560,6 +593,9 @@ /datum/firemode/semi_auto/fastest ) + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 + /obj/item/gun/ballistic/rifle/mosin/mini name = "Mini-mosin" desc = "A tiny replica of a classic russian rifle. the stock barely fits your shoulder!" @@ -576,6 +612,9 @@ transform *= 0.6 special_transform = transform + ammo_kind = /datum/ammo_kind/compact/q_22lr + ammo_capacity = 5 + /* * * * * * * * * * * * Laser Mosin Bolt-Action Rifle * Moist Bolt-Action Laser @@ -591,6 +630,8 @@ fire_sound = 'sound/f13weapons/lasmusket_fire.ogg' mag_type = /obj/item/ammo_box/magazine/internal/shot/lasmusket/mosin + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 5 /* * * * * * * * * * * * SMLE Bolt-Action Rifle @@ -630,6 +671,9 @@ ) reskinnable_component = /datum/component/reskinnable/enfield + ammo_kind = /datum/ammo_kind/long/q_308 + ammo_capacity = 10 + /obj/item/gun/ballistic/rifle/enfield/attackby(obj/item/A, mob/user, params) ..() if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter)) @@ -692,7 +736,10 @@ /datum/firemode/semi_auto/slower ) reskinnable_component = /datum/component/reskinnable/gras + is_revolver = TRUE + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 1 /obj/item/gun/ballistic/rifle/antique/tankgun name = "Mauser TankGewehr M1918" @@ -713,6 +760,7 @@ can_scope = FALSE can_bayonet = FALSE can_suppress = FALSE + is_revolver = TRUE init_firemodes = list( /datum/firemode/semi_auto/slower @@ -720,6 +768,9 @@ fire_sound = 'sound/f13weapons/antimaterialfire.ogg' cock_sound = 'sound/f13weapons/antimaterialreload.ogg' + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 1 + /obj/item/gun/ballistic/rifle/antique/tankgun/custom name = "Custom TankGewehr M1918" desc = "A custom made TGM1918 rifle. This rifle still weighs a staggering 40+ pounds, but the gun is engraved and the wood akin to that of birch. A fancy AT rifle for those that pack heat. On the butt of the gun is a scene of a moth chasing a feline." @@ -770,6 +821,10 @@ init_firemodes = list( /datum/firemode/semi_auto/slower ) + is_revolver = TRUE + + ammo_kind = /datum/ammo_kind/long/q_3006 + ammo_capacity = 1 /obj/item/gun/ballistic/rifle/antique/gross/marty name = "sawed off Martini Henry" @@ -817,6 +872,9 @@ ) gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION + ammo_kind = /datum/ammo_kind/medium/q_556x45mm + ammo_capacity = 30 + scope_state = "scope_short" scope_x_offset = 4 scope_y_offset = 12 @@ -972,6 +1030,9 @@ fire_sound = 'sound/f13weapons/antimaterialfire.ogg' cock_sound = 'sound/f13weapons/antimaterialreload.ogg' + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 5 + /obj/item/gun/ballistic/rifle/mag/antimaterial/loadout desc = "The Hecate II is a heavy, high-powered bolt action sniper rifle chambered in .50 caliber ammunition. Not only lacks an iron sight, but due to unmaintained age it doesn't punch as hard." damage_multiplier = GUN_EXTRA_DAMAGE_T3 @@ -1001,7 +1062,8 @@ fire_sound = 'sound/f13weapons/antimaterialfire.ogg' cock_sound = 'sound/f13weapons/antimaterialreload.ogg' - + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 10 /obj/item/gun/ballistic/rifle/mauserrifle name = "Mauser Model 1871" @@ -1015,7 +1077,7 @@ righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_LESS_DAMAGE_T4 + damage_multiplier = GUN_EXTRA_DAMAGE_T2 init_recoil = RIFLE_RECOIL (1.4 , 0.9) cock_delay = GUN_COCK_RIFLE_BASE gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION @@ -1028,6 +1090,9 @@ fire_sound = 'sound/f13weapons/fg42.ogg' cock_sound = 'sound/f13weapons/antimaterialreload.ogg' + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 8 + /obj/item/gun/ballistic/rifle/gewehr88 name = "Model 1888 commission rifle" desc = "A Model 1888 commission rifle. This rifle interestingly enough has the ability to eject the clip, also seems to require it itself to fire. This specific model was made so it is extra sturdy. It seems to be in perfect condition with freshly new wood varnish!" @@ -1040,7 +1105,7 @@ righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_LESS_DAMAGE_T2 + damage_multiplier = GUN_EXTRA_DAMAGE_T3 init_recoil = RIFLE_RECOIL (1.2 , 0.7) cock_delay = GUN_COCK_RIFLE_BASE gun_accuracy_zone_type = ZONE_WEIGHT_PRECISION @@ -1055,7 +1120,8 @@ force = 30 force_wielded = 35 - + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 8 //no scope, less capacity, more common /obj/item/gun/ballistic/rifle/mag/boys @@ -1081,6 +1147,9 @@ fire_sound = 'sound/f13weapons/antimaterialfire.ogg' cock_sound = 'sound/f13weapons/antimaterialreload.ogg' + ammo_kind = /datum/ammo_kind/long/q_50bmg + ammo_capacity = 3 + // BETA // Obsolete /obj/item/gun/ballistic/rifle/rifletesting name = "hunting" diff --git a/code/modules/projectiles/guns/ballistic/shotgun.dm b/code/modules/projectiles/guns/ballistic/shotgun.dm index 66cdddd3054..0f219f8a0b4 100644 --- a/code/modules/projectiles/guns/ballistic/shotgun.dm +++ b/code/modules/projectiles/guns/ballistic/shotgun.dm @@ -132,6 +132,9 @@ sawn_desc = "Short and concealable, terribly uncomfortable to fire, but worse on the other end." fire_sound = 'sound/f13weapons/caravan_shotgun.ogg' + ammo_kind = /datum/ammo_kind/long/q_4570 + ammo_capacity = 2 + /obj/item/gun/ballistic/revolver/caravan_shotgun/attackby(obj/item/A, mob/user, params) ..() if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter) | istype(A, /obj/item/twohanded/chainsaw)) @@ -174,6 +177,10 @@ /datum/firemode/semi_auto/shotgun_fixed, /datum/firemode/burst/two/shotgun_fixed, ) + + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 2 + sawn_desc = "Someone took the time to chop the last few inches off the barrel and stock of this shotgun. Now, the wide spread of this hand-cannon's short-barreled shots makes it perfect for short-range crowd control." fire_sound = 'sound/f13weapons/max_sawn_off.ogg' @@ -224,6 +231,9 @@ /datum/firemode/semi_auto/shotgun_fixed ) + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 1 + fire_sound = 'sound/f13weapons/max_sawn_off.ogg' /obj/item/gun/ballistic/revolver/shotpistol/update_icon_state() @@ -264,6 +274,10 @@ init_firemodes = list( /datum/firemode/semi_auto/slower ) + is_revolver = TRUE + + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 5 // Haha johnathan you're fucking my sawed off shotgun // /obj/item/gun/ballistic/shotgun/hunting/update_icon_state() @@ -320,7 +334,7 @@ weapon_weight = GUN_TWO_HAND_ONLY damage_multiplier = GUN_EXTRA_DAMAGE_0 slot_flags = INV_SLOTBIT_BACK | INV_SLOTBIT_BELT - + is_revolver = TRUE var/stock = FALSE can_flashlight = TRUE gunlight_state = "flightangle" @@ -330,6 +344,9 @@ /datum/firemode/semi_auto/slower ) + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 6 + /obj/item/gun/ballistic/shotgun/police/AltClick(mob/living/user) . = ..() if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user))) @@ -380,7 +397,7 @@ weapon_weight = GUN_TWO_HAND_ONLY damage_multiplier = GUN_EXTRA_DAMAGE_0 cock_delay = GUN_COCK_SHOTGUN_FAST - + is_revolver = TRUE can_bayonet = TRUE bayonet_state = "bayonet" knife_x_offset = 24 @@ -395,7 +412,8 @@ else icon_state = "[initial(icon_state)]" - + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 4 /* * * * * * * * * * * * @@ -432,6 +450,10 @@ lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + is_revolver = TRUE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 4 + /obj/item/gun/ballistic/shotgun/ /* * * * * * * * * * * * * Semi-auto shotguns * @@ -478,6 +500,9 @@ casing_ejector = TRUE // makes it eject casings -- and not need pumping!!! fire_sound = 'sound/f13weapons/auto5.ogg' + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 4 + /obj/item/gun/ballistic/shotgun/automatic/combat/auto5/worn name = " Venn Family Shotgun" desc = "A semi automatic shotgun with a four round tube. Has an etching into the side." @@ -527,6 +552,10 @@ knife_x_offset = 23 knife_y_offset = 23 + is_revolver = TRUE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 5 + /* * * * * * * * * * * * Lever-Action shotgun Restocked * Speedy pump shotgun, with stock @@ -566,7 +595,7 @@ mag_type = /obj/item/ammo_box/magazine/internal/shot/trench weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_0 + damage_multiplier = GUN_EXTRA_DAMAGE_T1 cock_delay = GUN_COCK_SHOTGUN_FAST init_firemodes = list( /datum/firemode/semi_auto/slow @@ -597,6 +626,9 @@ var/toggled = FALSE var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 12 + /obj/item/gun/ballistic/shotgun/automatic/combat/neostead/examine(mob/user) . = ..() . += span_notice("Alt-click to switch tubes.") @@ -676,6 +708,10 @@ fire_sound = 'sound/f13weapons/riot_shotgun.ogg' init_recoil = AUTOSHOTGUN_RECOIL(1, 1) + is_revolver = TRUE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 8 + /obj/item/gun/ballistic/shotgun/needles name = "Pz87 pump-action shotgun" desc = "A Pz87 shotgun. Manufactured by Latos Systems in collaboration with the Swiss navy and Remington, this shotgun has a internal 6+1 internal tube capacity. Unlike traditional ballistics, it fires micro-needles. A prototype shotgun that never saw the light of combat and battle." @@ -693,6 +729,9 @@ fire_sound = 'sound/f13weapons/needler.ogg' init_recoil = AUTOSHOTGUN_RECOIL(1, 1) + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 7 + /* * * * * * * * * * * * Jackhammer shotgun * Magazine automatic! shotgun @@ -716,6 +755,9 @@ ) init_recoil = AUTOSHOTGUN_RECOIL(1, 0.8) + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 8 + // Ballistic Fist Keywords: Damage max 42, Shotgun /obj/item/gun/ballistic/revolver/ballisticfist name = "ballistic fist" @@ -735,6 +777,10 @@ ) init_recoil = SHOTGUN_RECOIL(1, 1) + is_revolver = TRUE + ammo_kind = /datum/ammo_kind/shotgun/q_12_gauge + ammo_capacity = 2 + // BETA // Obsolete /obj/item/gun/ballistic/shotgun/shotttesting name = "shotgun" diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index fca0992be9f..c254e77dd67 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -90,7 +90,7 @@ for(var/A in modkits) . += A -/obj/item/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K) +/obj/item/gun/energy/kinetic_accelerator/modify_projectile(obj/item/projectile/kinetic/K) K.kinetic_gun = src //do something special on-hit, easy! for(var/A in get_modkits()) var/obj/item/borg/upgrade/modkit/M = A diff --git a/code/modules/projectiles/projectile/bullets/cmls.dm b/code/modules/projectiles/projectile/bullets/cmls.dm new file mode 100644 index 00000000000..0e8762eeaf7 --- /dev/null +++ b/code/modules/projectiles/projectile/bullets/cmls.dm @@ -0,0 +1,624 @@ +// C M L S / Hunt Showdown-fication + +// sorting is as follows +// basetype +// example +// actual bullets + +/obj/item/projectile/bullet/generic/compact + name = "generic compact bullet" + damage = BULLET_DAMAGE_COMPACT // 30 + damage_list = list("30" = 60, "45" = 30, "60" = 9, "200" = 1) + stamina = BULLET_STAMINA_COMPACT + spread = BULLET_SPREAD_SURPLUS + recoil = BULLET_RECOIL_COMPACT + + wound_bonus = BULLET_WOUND_COMPACT + bare_wound_bonus = BULLET_WOUND_COMPACT_NAKED_MULT + wound_falloff_tile = BULLET_WOUND_FALLOFF_PISTOL_LIGHT + + pixels_per_second = BULLET_SPEED_COMPACT + damage_falloff = BULLET_FALLOFF_DEFAULT_PISTOL_LIGHT + +/obj/item/projectile/bullet/generic/compact/cexample + name = "this is an example compact projectile! the template goes (type)(caliber). so, for example, this one would be c(example)!" + +/obj/item/projectile/bullet/generic/compact/c22 + name = ".22LR bullet" + +/obj/item/projectile/bullet/generic/compact/c9mm + name = "9mm bullet" + +/obj/item/projectile/bullet/generic/compact/cneedle + name = "amethyst needle" + +/obj/item/projectile/bullet/generic/compact/c10mm + name = "10mm bullet" + +/obj/item/projectile/bullet/generic/compact/c45 + name = ".45 bullet" + +/obj/item/projectile/bullet/generic/compact/c357 + name = ".357 bullet" + +/obj/item/ammo_casing/generic/compact/generic + name = "generic compact bullet casing" + desc = "A generic compact bullet casing." + caliber = CALIBER_COMPACT + projectile_type = /obj/item/projectile/bullet/generic/compact/cexample + material_class = BULLET_IS_MEDIUM_PISTOL + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_PISTOL_MEDIUM_CASING + MATS_PISTOL_MEDIUM_BULLET, + /datum/material/blackpowder = MATS_PISTOL_MEDIUM_POWDER) + fire_power = CASING_POWER_MEDIUM_PISTOL * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_PISTOL_10MM + +/obj/item/ammo_casing/generic/compact/cexample + name = "compact template bullet casing" + desc = "A compact template bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/compact/cexample + +/obj/item/ammo_casing/generic/compact/c22 + name = ".22 LR bullet casing" + desc = "A .22 LR bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/compact/c22 + +/obj/item/ammo_casing/generic/compact/c9mm + name = "9mm bullet casing" + desc = "A 9mm bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/compact/c9mm + +/obj/item/ammo_casing/caseless/cneedle + name = "A needler round." + desc = "A dart for use in needler pistols." + icon_state = "needlecasing" + icon = 'icons/fallout/objects/guns/ammo.dmi' + caliber = CALIBER_COMPACT + force = 2 + throwforce = 1 + embedding = list("embed_chance"= 25) + projectile_type = /obj/item/projectile/bullet/generic/compact/cneedle + +/obj/item/ammo_casing/generic/compact/c10mm + name = "10mm bullet casing" + desc = "A 10mm bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/compact/c10mm + +/obj/item/ammo_casing/generic/compact/c357 + name = ".357 bullet casing" + desc = "A 10mm bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/compact/c357 + +/obj/item/ammo_box/generic/compact + name = "(COMPACT / Generic) ammo box" + icon = 'icons/fallout/objects/guns/ammo.dmi' + icon_state = "10mmbox" + multiple_sprites = 2 + ammo_type = /obj/item/ammo_casing/generic/compact + caliber = list(CALIBER_COMPACT) + max_ammo = 60 + w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/iron = MATS_PISTOL_MEDIUM_BOX) + randomize_ammo_count = FALSE + +/obj/item/ammo_box/generic/compact/template + name = "(COMPACT / Template) ammo box" + icon_state = "10mmbox" + ammo_type = /obj/item/ammo_casing/generic/compact/cexample + +/obj/item/ammo_box/generic/compact/c22 + name = "(COMPACT / .22LR) ammo box" + icon_state = "22box" + ammo_type = /obj/item/ammo_casing/generic/compact/c22 + +/obj/item/ammo_box/generic/compact/c9mm + name = "(COMPACT / 9mm) ammo box" + icon_state = "9mmbox" + ammo_type = /obj/item/ammo_casing/generic/compact/c9mm + +/obj/item/ammo_box/generic/compact/cneedle + name = "(COMPACT / Amethyst Needle) ammo box" + icon_state = "9mmbox" + ammo_type = /obj/item/ammo_casing/caseless/cneedle + +/obj/item/ammo_box/generic/compact/c10mm + name = "(COMPACT / 10mm) ammo box" + icon_state = "10mmbox" + ammo_type = /obj/item/ammo_casing/generic/compact/c10mm + +/obj/item/ammo_box/generic/compact/c357 + name = "(COMPACT / .357) ammo box" + icon_state = "357box" + ammo_type = /obj/item/ammo_casing/generic/compact/c357 + +/obj/item/ammo_box/generic/compact/crate + name = "(COMPACT / Generic) ammo crate" + desc = "A wooden crate of ammo." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 300 + +/obj/item/ammo_box/generic/compact/crate/template + name = "(COMPACT / Template) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/compact/cexample + +/obj/item/ammo_box/generic/compact/crate/c22 + name = "(COMPACT / .22LR) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/compact/c22 + +/obj/item/ammo_box/generic/compact/crate/c9mm + name = "(COMPACT / 9mm) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/compact/c9mm + +/obj/item/ammo_box/generic/compact/crate/cneedle + name = "(COMPACT / Amethyst Needle) ammo crate" + ammo_type = /obj/item/ammo_casing/caseless/cneedle + +/obj/item/ammo_box/generic/compact/crate/c10mm + name = "(COMPACT / 10mm) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/compact/c10mm + +/obj/item/ammo_box/generic/compact/crate/c357 + name = "(COMPACT / .357) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/compact/c357 + +/obj/item/projectile/bullet/generic/medium + name = "generic medium bullet" + damage = BULLET_DAMAGE_MEDIUM // 45 + damage_list = list("30" = 25, "45" = 50, "60" = 20, "75" = 4, "200" = 1) + stamina = BULLET_STAMINA_MEDIUM + spread = BULLET_SPREAD_SURPLUS + recoil = BULLET_RECOIL_MEDIUM + + wound_bonus = BULLET_WOUND_MEDIUM + bare_wound_bonus = BULLET_WOUND_MEDIUM_NAKED_MULT + wound_falloff_tile = BULLET_WOUND_FALLOFF_PISTOL_LIGHT + + pixels_per_second = BULLET_SPEED_MEDIUM + damage_falloff = BULLET_FALLOFF_DEFAULT_PISTOL_LIGHT + +/obj/item/projectile/bullet/generic/medium/mexample + name = "this is an example medium projectile! the template goes (type)(caliber). so, for example, this one would be m(example)!" + +/obj/item/projectile/bullet/generic/medium/m44 + name = ".44 bullet" + +/obj/item/projectile/bullet/generic/medium/m14mm + name = "14mm bullet" + +/obj/item/projectile/bullet/generic/medium/m45lc + name = ".45LC bullet" + +/obj/item/projectile/bullet/generic/medium/m473 + name = "4.73 bullet" + +/obj/item/projectile/bullet/generic/medium/m556 + name = "5.56 bullet" + +/obj/item/projectile/bullet/generic/medium/m5mm + name = "5mm bullet" + +/obj/item/projectile/bullet/generic/medium/m2mm + name = "2mm gauss projectile" + +/obj/item/ammo_casing/generic/medium + name = "generic medium bullet casing" + desc = "A generic medium bullet casing." + caliber = CALIBER_MEDIUM + projectile_type = /obj/item/projectile/bullet/generic/medium/mexample + material_class = BULLET_IS_LIGHT_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_LIGHT_CASING + MATS_RIFLE_LIGHT_BULLET, + /datum/material/blackpowder = MATS_RIFLE_LIGHT_POWDER) + fire_power = CASING_POWER_LIGHT_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_LIGHT + +/obj/item/ammo_casing/generic/medium/template + name = "medium bullet casing template" + desc = "A medium bullet casing template. Follow me if you want to live." + projectile_type = /obj/item/projectile/bullet/generic/medium/mexample + +/obj/item/ammo_casing/generic/medium/m44 + name = ".44 bullet casing" + desc = "A .44 bullet casing" + projectile_type = /obj/item/projectile/bullet/generic/medium/m44 + +/obj/item/ammo_casing/generic/medium/m14mm + name = "14mm bullet casing" + desc = "A 14mm bullet casing" + projectile_type = /obj/item/projectile/bullet/generic/medium/m14mm + +/obj/item/ammo_casing/generic/medium/m45lc + name = ".45 Long Colt bullet casing" + desc = "A .45 Long Colt bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/medium/m45lc + +/obj/item/ammo_casing/generic/medium/m473 + name = "4.73mm caseless bullet casing" + desc = "A chalky brick of propellent with a bullet inside." + projectile_type = /obj/item/projectile/bullet/generic/medium/m473 + +/obj/item/ammo_casing/generic/medium/m556 + name = "5.56 bullet casing" + desc = "A 5.56 bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/medium/m556 + +/obj/item/ammo_casing/generic/medium/m5mm + name = "5mm bullet casing" + desc = "A 5mm bullet casing template." + projectile_type = /obj/item/projectile/bullet/generic/medium/m5mm + +/obj/item/ammo_casing/generic/medium/m2mm + name = "2mm electromagnetic cartridge" + desc = "A 2mm electromagnetic cartridge." + projectile_type = /obj/item/projectile/bullet/generic/medium/m2mm + +/obj/item/ammo_box/generic/medium + name = "(MEDIUM / Generic) ammo box" + icon = 'icons/fallout/objects/guns/ammo.dmi' + icon_state = "308box" + multiple_sprites = 2 + caliber = list(CALIBER_LONG) + ammo_type = /obj/item/ammo_casing/generic/medium + max_ammo = 40 + w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/iron = MATS_RIFLE_MEDIUM_BOX) + randomize_ammo_count = FALSE + +/obj/item/ammo_box/generic/medium/template + name = "(MEDIUM / Template) ammo box" + icon_state = "556box" + ammo_type = /obj/item/ammo_casing/generic/medium/template + +/obj/item/ammo_box/generic/medium/m44 + name = "(MEDIUM / .44) ammo box" + icon_state = "556box" + ammo_type = /obj/item/ammo_casing/generic/medium/m44 + +/obj/item/ammo_box/generic/medium/m14mm + name = "(MEDIUM / 14mm) ammo box" + icon_state = "14mmbox" + ammo_type = /obj/item/ammo_casing/generic/medium/m14mm + +/obj/item/ammo_box/generic/medium/m45lc + name = "(MEDIUM / .45 Long Colt) ammo box" + icon_state = "45box" + ammo_type = /obj/item/ammo_casing/generic/medium/m45lc + +/obj/item/ammo_box/generic/medium/m473 + name = "(MEDIUM / 4.73mm) ammo box" + icon_state = "47box" + ammo_type = /obj/item/ammo_casing/generic/medium/m473 + +/obj/item/ammo_box/generic/medium/m556 + name = "(MEDIUM / 5.56mm) ammo box" + icon_state = "556box" + ammo_type = /obj/item/ammo_casing/generic/medium/m556 + +/obj/item/ammo_box/generic/medium/m5mm + name = "(MEDIUM / 5mm) ammo box" + icon_state = "5mmbox" + ammo_type = /obj/item/ammo_casing/generic/medium/m5mm + +/obj/item/ammo_box/generic/medium/m2mm + name = "(MEDIUM / 2mm Electromagnetic Cartridge) ammo box" + icon_state = "5mmbox" + ammo_type = /obj/item/ammo_casing/generic/medium/m2mm + +/obj/item/ammo_box/generic/medium/crate + name = "(MEDIUM / Generic) ammo crate" + desc = "A wooden crate of ammo." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 200 + +/obj/item/ammo_box/generic/medium/crate/m44 + name = "(MEDIUM / .44) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m14mm + name = "(MEDIUM / 14mm) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m45lc + name = "(MEDIUM / .45 Long Colt) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m473 + name = "(MEDIUM / 4.73mm) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m556 + name = "(MEDIUM / 5.56mm) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m5mm + name = "(MEDIUM / 5mm) ammo crate" + +/obj/item/ammo_box/generic/medium/crate/m5mm + name = "(MEDIUM / 2mm Electromagnetic Cartridge) ammo crate" + +/obj/item/projectile/bullet/generic/long + name = "generic long bullet" + damage = BULLET_DAMAGE_LONG // 60 + damage_list = list("45" = 35, "60" = 50, "75" = 14, "200" = 1) + stamina = BULLET_STAMINA_LONG + spread = BULLET_SPREAD_SURPLUS + recoil = BULLET_RECOIL_LONG + + wound_bonus = BULLET_WOUND_LONG + bare_wound_bonus = BULLET_WOUND_LONG_NAKED_MULT + wound_falloff_tile = BULLET_WOUND_FALLOFF_PISTOL_LIGHT + + pixels_per_second = BULLET_SPEED_LONG + damage_falloff = BULLET_FALLOFF_DEFAULT_PISTOL_LIGHT + +/obj/item/projectile/bullet/generic/long/lexample + name = "this is an example long projectile! the template goes (type)(caliber). so, for example, this one would be lexample!" + +/obj/item/projectile/bullet/generic/long/l308 + name = ".308 bullet" + +/obj/item/projectile/bullet/generic/long/l3006 + name = ".30-06 bullet" + +/obj/item/projectile/bullet/generic/long/lheavyneedle + name = "ruby needle" + +/obj/item/projectile/bullet/generic/long/l50mg + name = ".50MG bullet" + +/obj/item/projectile/bullet/generic/long/l4570 + name = ".45-70 bullet" + +/obj/item/ammo_casing/generic/long + name = "generic long ammo casing" + desc = "A generic long ammo casing." + icon_state = "762-casing" + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/generic/long + material_class = BULLET_IS_HEAVY_RIFLE + custom_materials = list( + /datum/material/iron = MATS_RIFLE_HEAVY_CASING + MATS_RIFLE_HEAVY_BULLET, + /datum/material/blackpowder = MATS_RIFLE_HEAVY_POWDER) + fire_power = CASING_POWER_HEAVY_RIFLE * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_RIFLE_MEDIUM + +/obj/item/ammo_casing/generic/long/template + name = "template long ammo casing" + desc = "A template long ammo casing. Follow the Leader" + projectile_type = /obj/item/projectile/bullet/generic/long/lexample + +/obj/item/ammo_casing/generic/long/l308 + name = ".308 bullet casing" + desc = "A .308 bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/long/l308 + +/obj/item/ammo_casing/generic/long/l3006 + name = ".30-06 bullet casing" + desc = "A .30-06 bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/long/l3006 + +/obj/item/ammo_casing/generic/long/l4570 + name = ".45-70 bullet casing" + desc = "A .45-70 bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/long/l4570 + +/obj/item/ammo_casing/generic/long/l50mg + name = ".50MG bullet casing" + desc = "A .50MG bullet casing." + projectile_type = /obj/item/projectile/bullet/generic/long/l50mg + +/obj/item/ammo_casing/caseless/needle/heavy + name = "A ruby needler round." + desc = "A heavy and long dart for use in needler heavy weaponary." + icon_state = "heavyneedlecase" + icon = 'icons/fallout/objects/guns/ammo.dmi' + caliber = CALIBER_LONG + projectile_type = /obj/item/projectile/bullet/generic/long/lheavyneedle + +/obj/item/ammo_box/generic/long + name = "(LONG / Generic) ammo box" + icon = 'icons/fallout/objects/guns/ammo.dmi' + icon_state = "box30" + multiple_sprites = 2 + caliber = list(CALIBER_LONG) + ammo_type = /obj/item/ammo_casing/generic/long + max_ammo = 30 + w_class = WEIGHT_CLASS_SMALL + custom_materials = list(/datum/material/iron = MATS_RIFLE_MEDIUM_BOX) + randomize_ammo_count = FALSE + +/obj/item/ammo_box/generic/long/l308 + name = "(LONG / .308) ammo box" + icon_state = "308box" + ammo_type = /obj/item/ammo_casing/generic/long/l308 + +/obj/item/ammo_box/generic/long/l3006 + name = "(LONG / .30-06) ammo box" + icon_state = "308box" + ammo_type = /obj/item/ammo_casing/generic/long/l3006 + +/obj/item/ammo_box/generic/long/l4570 + name = "(LONG / .45-70) ammo box" + icon_state = "308box" + ammo_type = /obj/item/ammo_casing/generic/long/l4570 + +/obj/item/ammo_box/generic/long/l50mg + name = "(LONG / .50MG) ammo box" + icon_state = "308box" + ammo_type = /obj/item/ammo_casing/generic/long/l50mg + +/obj/item/ammo_box/generic/long/lheavyneedle + name = "(LONG / Ruby Needle) ammo box" + icon_state = "308box" + ammo_type = /obj/item/ammo_casing/caseless/needle/heavy + +/obj/item/ammo_box/generic/long/crate + name = "(LONG / Generic) ammo crate" + desc = "A wooden crate of ammo." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 150 + +/obj/item/ammo_box/generic/long/crate/l308 + name = "(LONG / .308) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/long/l308 + +/obj/item/ammo_box/generic/long/crate/l3006 + name = "(LONG / .30-06) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/long/l3006 + +/obj/item/ammo_box/generic/long/crate/l4570 + name = "(LONG / .45-70) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/long/l4570 + +/obj/item/ammo_box/generic/long/crate/l50mg + name = "(LONG / .50MG) ammo crate" + ammo_type = /obj/item/ammo_casing/generic/long/l50mg + +/obj/item/ammo_box/generic/long/crate/lheavyneedle + name = "(LONG / Ruby Needle) ammo crate" + ammo_type = /obj/item/ammo_casing/caseless/needle/heavy + +/obj/item/projectile/bullet/shotgun/sbuck + name = "generic buckshot pellet" + damage = BULLET_DAMAGE_SHOTGUN_PELLET + damage_list = list("8" = 50, "10" = 25, "12" = 25) + stamina = BULLET_STAMINA_SHOTGUN_PELLET + spread = BULLET_SPREAD_SURPLUS + recoil = BULLET_RECOIL_SHOTGUN_PELLET + + wound_bonus = BULLET_WOUND_SHOTGUN_PELLET + bare_wound_bonus = BULLET_WOUND_SHOTGUN_PELLET_NAKED_MULT + wound_falloff_tile = BULLET_WOUND_FALLOFF_PISTOL_LIGHT + + pixels_per_second = BULLET_SPEED_SHOTGUN_PELLET + damage_falloff = BULLET_FALLOFF_DEFAULT_PISTOL_LIGHT + + zone_accuracy_type = ZONE_WEIGHT_SHOTGUN + +/obj/item/projectile/bullet/shotgun/buck/s12ga + name = "12 gauge buckshot pellet" + +/obj/item/ammo_casing/generic/shotgun/buck + name = "buckshot shell" + desc = "A generic buckshot shell." + icon_state = "gshell" + projectile_type = /obj/item/projectile/bullet/shotgun/buck + pellets = SHOTGUN_PELLET_BASE + variance = SHOTGUN_SPREAD_BASE + fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_SURPLUS + +/obj/item/ammo_casing/generic/shotgun/buck/s12ga + name = "12 gauge buckshot shell" + desc = "A 12 gauge buckshot shell." + icon_state = "gshell" + projectile_type = /obj/item/projectile/bullet/shotgun/buck/s12ga + +/obj/item/ammo_casing/generic/shotgun + name = "generic shotgun slug" + desc = "A generic shotgun slug." + icon = 'icons/fallout/objects/guns/ammo.dmi' + icon_state = "bbshell" + caliber = CALIBER_SHOTGUN + projectile_type = /obj/item/projectile/bullet/shotgun_slug + material_class = BULLET_IS_SHOTGUN + casing_quality = BULLET_IS_SURPLUS + custom_materials = list( + /datum/material/iron = MATS_SHOTGUN_CASING + MATS_SHOTGUN_BULLET, + /datum/material/blackpowder = MATS_SHOTGUN_POWDER) + fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_SURPLUS + sound_properties = CSP_SHOTGUN + +/obj/item/projectile/bullet/shotgun/s12ga + name = "12 gauge slug" + +/obj/item/projectile/bullet/shotgun/explosive + name = "generic explosive slug" + damage = BULLET_DAMAGE_SHOTGUN_SLUG * BULLET_DAMAGE_EXPLOSIVE + stamina = BULLET_STAMINA_SHOTGUN_SLUG * BULLET_STAMINA_EXPLOSIVE + spread = BULLET_SPREAD_SURPLUS + recoil = BULLET_RECOIL_SHOTGUN_SLUG + + wound_bonus = BULLET_WOUND_SHOTGUN_SLUG * BULLET_WOUND_EXPLOSIVE + bare_wound_bonus = BULLET_WOUND_SHOTGUN_SLUG_NAKED_MULT * BULLET_NAKED_WOUND_EXPLOSIVE + wound_falloff_tile = BULLET_WOUND_FALLOFF_PISTOL_LIGHT + + pixels_per_second = BULLET_SPEED_SHOTGUN_SLUG + damage_falloff = BULLET_FALLOFF_DEFAULT_PISTOL_LIGHT + + zone_accuracy_type = ZONE_WEIGHT_SEMI_AUTO + + knockdown = 50 + +/obj/item/projectile/bullet/shotgun/sexplosive/on_hit(atom/target, blocked = FALSE) + ..() + explosion(target, -1, 0, 1) + return BULLET_ACT_HIT + +/obj/item/projectile/bullet/shotgun/explosive/s12ga + name = "12 gauge explosive slug" + +/obj/item/ammo_casing/generic/shotgun/sexplosive + name = "explosive shotgun round template" + desc = "A high explosive template." + icon_state = "heshell" + projectile_type = /obj/item/projectile/bullet/shotgun/sexplosive + fire_power = CASING_POWER_SHOTGUN * CASING_POWER_MOD_MATCH + +/obj/item/ammo_box/generic/shotgun + name = "(SHOTGUN / Generic Buckshot) ammo box" + icon = 'icons/fallout/objects/guns/ammo.dmi' + max_ammo = 24 + custom_materials = list(/datum/material/iron = MATS_SHOTGUN_BOX) + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot + multiple_sprites = 2 + caliber = list(CALIBER_SHOTGUN) + w_class = WEIGHT_CLASS_SMALL + randomize_ammo_count = FALSE + +/obj/item/ammo_box/generic/shotgun/slug + name = "(SHOTGUN / Generic Slug) ammo box" + desc = "A box full of shotgun shells." + ammo_type = /obj/item/ammo_casing/generic/shotgun + icon_state = "lbox" + +/obj/item/ammo_box/generic/shotgun/slug/crate + name = "(SHOTGUN / Generic Slug) ammo crate" + desc = "A wooden crate full of shotgun shells." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 120 + +/obj/item/ammo_box/generic/shotgun/buck + name = "(SHOTGUN / Generic Buckshot) ammo box" + desc = "A box full of shotgun shells." + ammo_type = /obj/item/ammo_casing/generic/shotgun/buckshot + icon_state = "12gbox" + +/obj/item/ammo_box/generic/shotgun/buck/s12ga + name = "(SHOTGUN / 12 Gauge Buckshot) ammo box" + ammo_type = /obj/item/ammo_casing/generic/shotgun/buck/s12ga + +/obj/item/ammo_box/generic/shotgun/buck/crate + name = "(SHOTGUN / Generic Buckshot) ammo crate" + desc = "A wooden crate full of shotgun shells." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 120 + +/obj/item/ammo_box/generic/shotgun/buck/s12ga/crate + name = "(SHOTGUN / 12 Gauge Buckshot) ammo crate" + desc = "A wooden crate full of shotgun shells." + icon = 'modular_coyote/icons/objects/c13ammo.dmi' + icon_state = "wood_ammobox" + w_class = WEIGHT_CLASS_NORMAL + multiple_sprites = 4 + max_ammo = 120 diff --git a/code/modules/projectiles/projectile/bullets/rifle.dm b/code/modules/projectiles/projectile/bullets/rifle.dm index 6e8e79cb62f..fd041032b10 100644 --- a/code/modules/projectiles/projectile/bullets/rifle.dm +++ b/code/modules/projectiles/projectile/bullets/rifle.dm @@ -1,3 +1,9 @@ + +// hi bestie. we used to have this REALLY complicated set of cartridges, but we've since moved past that since CMLS / Hunt Showdown-ification!!! +// Let's start this from the top, again, because I ripped this shit to shreds. The values below are just for posterity sake, and, are not at all how we ACTUALLY do things around here anymore. +// see projectile/bullets/cmls.dm for ballistic weapons nonsense +// okay bestie, take care + //////////////////// // 5.56 MM & .223 // //////////////////// diff --git a/code/modules/projectiles/projectile/projectile_generic.dm b/code/modules/projectiles/projectile/projectile_generic.dm new file mode 100644 index 00000000000..9daea81d200 --- /dev/null +++ b/code/modules/projectiles/projectile/projectile_generic.dm @@ -0,0 +1,2 @@ +/// cool file, Dan +/obj/item/projectile/generic diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index a0270eaa740..7de36dc158b 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -101,6 +101,9 @@ other types of metals and chemistry for reagents). materials = design_materials // baby shark, doo doo doo doo doo doo doo /// heres a cute shark: <(OvO)> +/datum/design/proc/post_build(atom/built) + return + /datum/design/proc/material_cost_autobalance() if(ispath(build_path, /obj/item/ammo_box)) var/list/design_materials = list() diff --git a/code/modules/research/designs/ammolathe_designs.dm b/code/modules/research/designs/ammolathe_designs.dm index 8507e123328..a5742d9a036 100644 --- a/code/modules/research/designs/ammolathe_designs.dm +++ b/code/modules/research/designs/ammolathe_designs.dm @@ -2,6 +2,8 @@ build_type = AMMOLATHE /// Automatically sets the ammo's material cost through Dynamic Stuff~ autocalc_materials = TRUE + var/box_CorB = CORB_BOX + var/datum/ammo_kind/ammotype /// spawns some ammo boxes, rips the material data, and then trashes them /datum/design/ammolathe/AutocalcMaterialCosts() @@ -31,6 +33,12 @@ material_list[mat] *= GLOB.ammo_material_multipliers[mat] materials = material_list +/// sets the resulting generic ammo thing to be a bit less generic +/datum/design/ammolathe/post_build(atom/built) + if(!istype(built, /obj/item/ammo_box/generic)) + return + SScmls.SetupBox(built, ammotype, box_CorB) + //materials /datum/design/ammolathe/metalplate name = "Metal" @@ -59,8 +67,11 @@ maxstack = 50 autocalc_materials = FALSE -/* --Tier 1 Ammo and Magazines-- */ -//Tier 1 Magazines +/// dont need THESE anymore! +////////// was a / * --Tier 1 Ammo and Magazines-- ////// was a * / +//Tier 1 Magazines // we don't use these anymore +////////// was a / * +/* /datum/design/ammolathe/zip9mm name = "zipgun clip (9mm)" id = "zip9m" @@ -172,7 +183,7 @@ materials = list(/datum/material/iron = 4000) build_path = /obj/item/ammo_box/magazine/m45/empty category = list("initial", "Simple Magazines", "Handmade Magazines") - +////// was a * / //Tier 1 Ammo /datum/design/ammolathe/musket name = "flintlock ball pouch" @@ -187,35 +198,35 @@ materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) build_path = /obj/item/ammo_box/flintlock/rubber category = list("initial", "Simple Ammo") - +////////// was a / * /datum/design/ammolathe/beanbag name = "beanbag shotgun box" id = "beanbag" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/bean + build_path = /obj/item/ammo_box/generic/shotgun/bean category = list("initial", "Simple Ammo") /datum/design/ammolathe/beanbagcrate name = "beanbag shotgun crate" id = "beanbagcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/bean/crate + build_path = /obj/item/ammo_box/generic/shotgun/bean/crate category = list("initial", "Simple Ammo") /datum/design/ammolathe/rubbershot name = "rubbershot shotgun box" id = "rubbershot" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/rubber + build_path = /obj/item/ammo_box/generic/shotgun/rubber category = list("initial", "Simple Ammo") /datum/design/ammolathe/rubbershotcrate name = "rubbershot shotgun crate" id = "rubbershotcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/rubber/crate + build_path = /obj/item/ammo_box/generic/shotgun/rubber/crate category = list("initial", "Simple Ammo") - +////// was a * / /datum/design/ammolathe/c10mm name = "10mm FMJ ammo box" id = "c10mm_lathe" @@ -262,23 +273,23 @@ name = "buckshot shotgun box" id = "lethalshot" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/buck + build_path = /obj/item/ammo_box/generic/shotgun/buck category = list("initial", "Simple Ammo") /datum/design/ammolathe/lethalshotcrate name = "buckshot shotgun crate" id = "lethalshotcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/buck/crate + build_path = /obj/item/ammo_box/generic/shotgun/buck/crate category = list("initial", "Simple Ammo") - +////////// was a / * /datum/design/ammolathe/incendshot name = "incendiary shotgun box" id = "incendshot" materials = list (/datum/material/iron = 12000, /datum/material/blackpowder = 5000) - build_path = /obj/item/ammo_box/shotgun/incendiary + build_path = /obj/item/ammo_box/generic/shotgun/incendiary category = list("initial", "Simple Ammo") - +////// was a * / /datum/design/ammolathe/a308 name = ".308 ammo box" id = "a308" @@ -293,7 +304,7 @@ build_path = /obj/item/ammo_box/a308box/crate category = list("initial", "Simple Ammo") -/* +////////// was a / * /datum/design/ammolathe/c38 name = ".38 ammo box" id = "c38" @@ -307,7 +318,7 @@ materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) build_path = /obj/item/ammo_box/c38box/rubber category = list("initial", "Simple Ammo") -*/ +////// was a * / /datum/design/ammolathe/a223 name = ".223 ammo box" id = "a223" @@ -336,7 +347,7 @@ build_path = /obj/item/ammo_box/a50MGbox/rubber/crate category = list("initial", "Basic Ammo") -/* --Tier 2 Ammo And Magazines-- */ +////////// was a / * --Tier 2 Ammo And Magazines-- ////// was a * / //Tier 2 Magazines /datum/design/ammolathe/tube44 name = "empty speed loader tube (.44)" @@ -510,26 +521,26 @@ build_path = /obj/item/ammo_box/m5mmbox/crate category = list("initial", "Basic Ammo") -/* +////////// was a / * /datum/design/ammolathe/magnumshot name = "magnum buckshot shotgun box" id = "magnumshot" materials = list(/datum/material/iron = 10000, /datum/material/blackpowder = 1500) - build_path = /obj/item/ammo_box/shotgun/magnum + build_path = /obj/item/ammo_box/generic/shotgun/magnum category = list("initial", "Basic Ammo") -*/ +////// was a * / /datum/design/ammolathe/slugshot name = "slug shotgun box" id = "slugshot" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1500) - build_path = /obj/item/ammo_box/shotgun/slug + build_path = /obj/item/ammo_box/generic/shotgun/slug category = list("initial", "Basic Ammo") /datum/design/ammolathe/slugshotcrate name = "slug shotgun crate" id = "slugshotcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1500) - build_path = /obj/item/ammo_box/shotgun/slug/crate + build_path = /obj/item/ammo_box/generic/shotgun/slug/crate category = list("initial", "Basic Ammo") /datum/design/ammolathe/a3006 @@ -680,7 +691,7 @@ build_path = /obj/item/ammo_box/a308box/rubber/crate category = list("initial", "Basic Ammo") -/* --Tier 3 Ammo and Magazines -- */ +////////// was a / * --Tier 3 Ammo and Magazines -- ////// was a * / //Tier 3 Magazines /datum/design/ammolathe/speedloader4570 @@ -909,14 +920,14 @@ materials = list(/datum/material/iron = 15000, /datum/material/blackpowder = 2000) category = list("initial", "Intermediate Ammo") -/*/datum/design/ammolathe/a45op +////////// was a / ////// was a * /datum/design/ammolathe/a45op name = ".45 ACP +P ammo box" id = "a45op" materials = list(/datum/material/iron = 14000, /datum/material/blackpowder = 2000) build_path = /obj/item/ammo_box/c45/op - category = list("initial", "Intermediate Ammo")*/ + category = list("initial", "Intermediate Ammo")////// was a * / -/* --Tier 4 Ammo and Magazines-- */ +////////// was a / * --Tier 4 Ammo and Magazines-- ////// was a * / //Tier 4 Magazines /datum/design/ammolathe/m10mm_p90 name = "empty toploader magazine (10mm)" @@ -965,14 +976,14 @@ build_path = /obj/item/ammo_box/magazine/cz53/empty category = list("initial", "Advanced Magazines") -/* +////////// was a / * /datum/design/ammolathe/m556_rifle_extended name = "empty extended rifle magazine (5.56mm)" id = "m556_rifle_extended" materials = list(/datum/material/iron = 8000) build_path = /obj/item/ammo_box/magazine/m556/rifle/extended/empty category = list("initial", "Advanced Magazines") -*/ +////// was a * / /datum/design/ammolathe/m473 name = "empty g11 magazine (4.73mm)" id = "m473" @@ -1095,16 +1106,16 @@ build_path = /obj/item/ammo_box/a40mm/buck category = list("initial", "Advanced Ammo") -/* +////////// was a / * /datum/design/ammolathe/m473incin name = "4.73mm incendiary caseless ammo box" id = "m473incin" materials = list(/datum/material/iron = 20000, /datum/material/blackpowder = 3000) build_path = /obj/item/ammo_box/m473/incendiary category = list("initial", "Advanced Ammo") -*/ +////// was a * / -/* +////////// was a / * /datum/design/ammolathe/m473u235 name = "4.73mm uranium-tipped caseless ammo box" id = "m473u235" @@ -1133,7 +1144,7 @@ materials = list(/datum/material/iron = 12000, /datum/material/titanium = 15000, /datum/material/blackpowder = 3000) build_path = /obj/item/ammo_box/m473/hv category = list("initial", "Advanced Ammo") -*/ +////// was a * / /datum/design/ammolathe/a357ricochet name = ".357 ricochet ammo" @@ -1273,7 +1284,7 @@ build_path = /obj/item/ammo_box/c45/rubber/crate category = list("initial", "Handloaded Ammo") -/* +////////// was a / * /datum/design/ammolathe/improvised/c38 name = ".38 bag" id = "handloader_c38" @@ -1287,7 +1298,7 @@ materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) build_path = /obj/item/ammo_box/c38box/rubber category = list("initial", "Handloaded Ammo") -*/ + /datum/design/ammolathe/improvised/a357 name = ".357 Magnum bag" id = "handloader_a357_lathe" @@ -1376,28 +1387,28 @@ name = "shotgun shell bag" id = "handloader_lethalshot" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/improvised + build_path = /obj/item/ammo_box/generic/shotgun/improvised category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/lethalshotcrate name = "bulk shotgun shell bag" id = "handloader_lethalshotcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/improvised/crate + build_path = /obj/item/ammo_box/generic/shotgun/improvised/crate category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/beanbag name = "beanbag shotgun box" id = "handloader_beanbag" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/bean + build_path = /obj/item/ammo_box/generic/shotgun/bean category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/beanbagcrate name = "beanbag shotgun crate" id = "handloader_beanbagcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/bean/crate + build_path = /obj/item/ammo_box/generic/shotgun/bean/crate category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/needlershotgunbox @@ -1411,14 +1422,14 @@ name = "rubbershot shotgun box" id = "handloader_rubbershot" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/rubber + build_path = /obj/item/ammo_box/generic/shotgun/rubber category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/rubbershotcrate name = "rubbershot shotgun crate" id = "handloader_rubbershotcrate" materials = list(/datum/material/iron = 8000, /datum/material/blackpowder = 1000) - build_path = /obj/item/ammo_box/shotgun/rubber/crate + build_path = /obj/item/ammo_box/generic/shotgun/rubber/crate category = list("initial", "Handloaded Ammo") /datum/design/ammolathe/improvised/a223 @@ -1462,3 +1473,4 @@ materials = list(/datum/material/iron = 20000, /datum/material/blackpowder = 2000) build_path = /obj/item/ammo_box/a50MGbox/improvised/crate category = list("initial", "Handloaded Ammo") +*/ diff --git a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm index 019c9c124bd..a6761faff95 100644 --- a/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm +++ b/code/modules/research/designs/autolathe_desings/autolathe_designs_sec_and_hacked.dm @@ -12,7 +12,7 @@ build_type = AUTOLATHE materials = list(/datum/material/iron = 250) materials = list(/datum/material/iron = 1000) - build_path = /obj/item/ammo_casing/shotgun/beanbag + build_path = /obj/item/ammo_casing/generic/shotgun/beanbag category = list("initial", "Security") /datum/design/rubbershot @@ -20,7 +20,7 @@ id = "rubber_shot" build_type = AUTOLATHE materials = list(/datum/material/iron = 4000) - build_path = /obj/item/ammo_casing/shotgun/rubbershot + build_path = /obj/item/ammo_casing/generic/shotgun/rubbershot category = list("initial", "Security") /datum/design/c38 @@ -93,7 +93,7 @@ id = "shotgun_slug" build_type = AUTOLATHE | NO_PUBLIC_LATHE materials = list(/datum/material/iron = 4000) - build_path = /obj/item/ammo_casing/shotgun + build_path = /obj/item/ammo_casing/generic/shotgun category = list("hacked", "Security") /datum/design/buckshot_shell @@ -101,7 +101,7 @@ id = "buckshot_shell" build_type = AUTOLATHE | NO_PUBLIC_LATHE materials = list(/datum/material/iron = 4000) - build_path = /obj/item/ammo_casing/shotgun/buckshot + build_path = /obj/item/ammo_casing/generic/shotgun/buckshot category = list("hacked", "Security") /datum/design/shotgun_dart @@ -109,7 +109,7 @@ id = "shotgun_dart" build_type = AUTOLATHE | NO_PUBLIC_LATHE materials = list(/datum/material/iron = 4000) - build_path = /obj/item/ammo_casing/shotgun/dart + build_path = /obj/item/ammo_casing/generic/shotgun/dart category = list("hacked", "Security") /datum/design/incendiary_slug @@ -117,7 +117,7 @@ id = "incendiary_slug" build_type = AUTOLATHE | NO_PUBLIC_LATHE materials = list(/datum/material/iron = 4000) - build_path = /obj/item/ammo_casing/shotgun/incendiary + build_path = /obj/item/ammo_casing/generic/shotgun/incendiary category = list("hacked", "Security") */ diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 7ccab539880..609ab4617d1 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -144,7 +144,7 @@ id = "sec_shellclip" build_type = PROTOLATHE materials = list(/datum/material/iron = 5000) - build_path = /obj/item/ammo_box/shotgun + build_path = /obj/item/ammo_box/generic/shotgun category = list("Ammo") departmental_flags = DEPARTMENTAL_FLAG_SECURITY @@ -192,7 +192,7 @@ id = "stunshell" build_type = PROTOLATHE materials = list(/datum/material/iron = 200) - build_path = /obj/item/ammo_casing/shotgun/stunslug + build_path = /obj/item/ammo_casing/generic/shotgun/stunslug category = list("Ammo") departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_SCIENCE @@ -202,7 +202,7 @@ id = "techshotshell" build_type = PROTOLATHE materials = list(/datum/material/iron = 1000, /datum/material/glass = 200) - build_path = /obj/item/ammo_casing/shotgun/techshell + build_path = /obj/item/ammo_casing/generic/shotgun/techshell category = list("Ammo") departmental_flags = DEPARTMENTAL_FLAG_SECURITY | DEPARTMENTAL_FLAG_SCIENCE @@ -212,7 +212,7 @@ id = "shotgundartcryostatis" build_type = PROTOLATHE materials = list(/datum/material/iron = 3500) - build_path = /obj/item/ammo_casing/shotgun/dart/noreact + build_path = /obj/item/ammo_casing/generic/shotgun/dart/noreact category = list("Ammo") departmental_flags = DEPARTMENTAL_FLAG_MEDICAL diff --git a/code/modules/supplykit/supplykit_items/supplykit_ammo.dm b/code/modules/supplykit/supplykit_items/supplykit_ammo.dm index f998efd424f..ab1b453ce6e 100644 --- a/code/modules/supplykit/supplykit_items/supplykit_ammo.dm +++ b/code/modules/supplykit/supplykit_items/supplykit_ammo.dm @@ -18,12 +18,12 @@ /datum/supplykit_item/ammo/box12buck name = "12 gauge buckshot box" desc = "A box containing 12 rounds of 12 gauge buckshot." - item = /obj/item/ammo_box/shotgun/buck + item = /obj/item/ammo_box/generic/shotgun/buck /datum/supplykit_item/ammo/box12slug name = "12 gauge slug box" desc = "A box containing 12 rounds of 12 gauge slugs." - item = /obj/item/ammo_box/shotgun/slug + item = /obj/item/ammo_box/generic/shotgun/slug /datum/supplykit_item/ammo/box22 name = ".22LR ammo box" diff --git a/code/modules/supplykit/supplykit_items/supplykit_ammospec.dm b/code/modules/supplykit/supplykit_items/supplykit_ammospec.dm index 36041829f30..2105dfe401a 100644 --- a/code/modules/supplykit/supplykit_items/supplykit_ammospec.dm +++ b/code/modules/supplykit/supplykit_items/supplykit_ammospec.dm @@ -13,23 +13,23 @@ limited_stock = -1 //-1 is infinite stock. otherwise, limits how many you can buy. also prevents discounts restricted_roles = list() //for restricting by job type */ - +/* /datum/supplykit_item/ammospec/box12rubber name = "12 gauge rubber shot box" desc = "A box containing 12 rounds of 12 gauge rubber shot." - item = /obj/item/ammo_box/shotgun/rubber + item = /obj/item/ammo_box/generic/shotgun/rubber /datum/supplykit_item/ammospec/box12bean name = "12 gauge beanbag box" desc = "A box containing 12 rounds of 12 gauge beanbags." - item = /obj/item/ammo_box/shotgun/bean + item = /obj/item/ammo_box/generic/shotgun/bean /datum/supplykit_item/ammospec/box12improv name = "12 gauge improvised bag" desc = "A box containing 12 rounds of 12 gauge improvised shot." - item = /obj/item/ammo_box/shotgun/improvised + item = /obj/item/ammo_box/generic/shotgun/improvised cost = 5 - +*/ /datum/supplykit_item/ammospec/box22rubber name = ".22LR nonlethal box" desc = "A box containing 60 rounds of .22LR rubber ammunition." diff --git a/fortune13.dme b/fortune13.dme index 62d5b47e7a8..ea5b7144093 100644 --- a/fortune13.dme +++ b/fortune13.dme @@ -340,6 +340,7 @@ #include "code\controllers\subsystem\blackbox.dm" #include "code\controllers\subsystem\callback.dm" #include "code\controllers\subsystem\chat.dm" +#include "code\controllers\subsystem\CMLS.dm" #include "code\controllers\subsystem\communications.dm" #include "code\controllers\subsystem\COOLBOOKss.dm" #include "code\controllers\subsystem\damage.dm" @@ -3202,18 +3203,15 @@ #include "code\modules\projectiles\multichance_projectile_hit_behaviour.dm" #include "code\modules\projectiles\pins.dm" #include "code\modules\projectiles\projectile.dm" -#include "code\modules\projectiles\ammunition\_ammunition.dm" +#include "code\modules\projectiles\ammunition\_ammo_casing_bullet_cartridge.dm" #include "code\modules\projectiles\ammunition\_firing.dm" -#include "code\modules\projectiles\ammunition\ballistic\lmg.dm" -#include "code\modules\projectiles\ammunition\ballistic\pistol.dm" -#include "code\modules\projectiles\ammunition\ballistic\revolver.dm" -#include "code\modules\projectiles\ammunition\ballistic\rifle.dm" +#include "code\modules\projectiles\ammunition\ballistic\compact.dm" +#include "code\modules\projectiles\ammunition\ballistic\generic_ammo_casing_bullet_cartridge.dm" +#include "code\modules\projectiles\ammunition\ballistic\long.dm" +#include "code\modules\projectiles\ammunition\ballistic\medium.dm" #include "code\modules\projectiles\ammunition\ballistic\shotgun.dm" -#include "code\modules\projectiles\ammunition\ballistic\smg.dm" -#include "code\modules\projectiles\ammunition\ballistic\sniper.dm" #include "code\modules\projectiles\ammunition\caseless\_caseless.dm" #include "code\modules\projectiles\ammunition\caseless\arrow.dm" -#include "code\modules\projectiles\ammunition\caseless\ballistic.dm" #include "code\modules\projectiles\ammunition\caseless\ferromagnetic.dm" #include "code\modules\projectiles\ammunition\caseless\foam.dm" #include "code\modules\projectiles\ammunition\caseless\misc.dm" @@ -3233,6 +3231,7 @@ #include "code\modules\projectiles\ammunition\special\syringe.dm" #include "code\modules\projectiles\boxes_magazines\_box_magazine.dm" #include "code\modules\projectiles\boxes_magazines\ammo_boxes.dm" +#include "code\modules\projectiles\boxes_magazines\generic_magazine_ammo_box.dm" #include "code\modules\projectiles\boxes_magazines\external\grenade.dm" #include "code\modules\projectiles\boxes_magazines\external\lmg.dm" #include "code\modules\projectiles\boxes_magazines\external\magweapon.dm" @@ -3252,6 +3251,12 @@ #include "code\modules\projectiles\boxes_magazines\internal\rifle.dm" #include "code\modules\projectiles\boxes_magazines\internal\shotgun.dm" #include "code\modules\projectiles\boxes_magazines\internal\toy.dm" +#include "code\modules\projectiles\CMLS\ammo_kinds.dm" +#include "code\modules\projectiles\CMLS\ammo_vendor.dm" +#include "code\modules\projectiles\CMLS\compact.dm" +#include "code\modules\projectiles\CMLS\long.dm" +#include "code\modules\projectiles\CMLS\medium.dm" +#include "code\modules\projectiles\CMLS\shotgun.dm" #include "code\modules\projectiles\guns\ballistic.dm" #include "code\modules\projectiles\guns\energy.dm" #include "code\modules\projectiles\guns\hoboguns.dm" @@ -3298,7 +3303,9 @@ #include "code\modules\projectiles\projectile\magic.dm" #include "code\modules\projectiles\projectile\megabuster.dm" #include "code\modules\projectiles\projectile\plasma.dm" +#include "code\modules\projectiles\projectile\projectile_generic.dm" #include "code\modules\projectiles\projectile\bullets\_incendiary.dm" +#include "code\modules\projectiles\projectile\bullets\cmls.dm" #include "code\modules\projectiles\projectile\bullets\dart_syringe.dm" #include "code\modules\projectiles\projectile\bullets\dnainjector.dm" #include "code\modules\projectiles\projectile\bullets\ferromagnetic.dm" diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index da3a39ffc80..720a55a7858 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/ammo/compact.dmi b/icons/obj/ammo/compact.dmi new file mode 100644 index 00000000000..48483c6ade5 Binary files /dev/null and b/icons/obj/ammo/compact.dmi differ diff --git a/icons/obj/ammo/compact_9x19mmparabellum.dmi b/icons/obj/ammo/compact_9x19mmparabellum.dmi new file mode 100644 index 00000000000..600ce08ee86 Binary files /dev/null and b/icons/obj/ammo/compact_9x19mmparabellum.dmi differ diff --git a/icons/obj/ammo/long.dmi b/icons/obj/ammo/long.dmi new file mode 100644 index 00000000000..fac4122871e Binary files /dev/null and b/icons/obj/ammo/long.dmi differ diff --git a/icons/obj/ammo/long_3006springfield.dmi b/icons/obj/ammo/long_3006springfield.dmi new file mode 100644 index 00000000000..ac71df9198e Binary files /dev/null and b/icons/obj/ammo/long_3006springfield.dmi differ diff --git a/icons/obj/ammo/medium.dmi b/icons/obj/ammo/medium.dmi new file mode 100644 index 00000000000..a276b2f510c Binary files /dev/null and b/icons/obj/ammo/medium.dmi differ diff --git a/icons/obj/ammo/medium_556x45mmNATO.dmi b/icons/obj/ammo/medium_556x45mmNATO.dmi new file mode 100644 index 00000000000..c01edf11487 Binary files /dev/null and b/icons/obj/ammo/medium_556x45mmNATO.dmi differ diff --git a/icons/obj/ammo/shotgun.dmi b/icons/obj/ammo/shotgun.dmi new file mode 100644 index 00000000000..1e5241b7db4 Binary files /dev/null and b/icons/obj/ammo/shotgun.dmi differ diff --git a/icons/obj/ammo/shotgun_12g_buck.dmi b/icons/obj/ammo/shotgun_12g_buck.dmi new file mode 100644 index 00000000000..1e5241b7db4 Binary files /dev/null and b/icons/obj/ammo/shotgun_12g_buck.dmi differ diff --git a/icons/obj/plushes.dmi b/icons/obj/plushes.dmi index fb1645a8faf..a08f0bdd22c 100644 Binary files a/icons/obj/plushes.dmi and b/icons/obj/plushes.dmi differ diff --git a/modular_sunset/code/mob/renegade.dm b/modular_sunset/code/mob/renegade.dm index 7fc53bfcaa8..397234443e0 100644 --- a/modular_sunset/code/mob/renegade.dm +++ b/modular_sunset/code/mob/renegade.dm @@ -150,7 +150,7 @@ ranged_cooldown_time = 2 SECONDS auto_fire_delay = GUN_AUTOFIRE_DELAY_NORMAL projectilesound = 'sound/f13weapons/shotgun.ogg' - casingtype = /obj/item/ammo_casing/shotgun + casingtype = /obj/item/ammo_casing/generic/shotgun robust_searching = TRUE speak = list( "Come get some!", @@ -322,7 +322,7 @@ ranged_cooldown_time = 3 projectiletype = null projectilesound = 'sound/f13weapons/auto5.ogg' - casingtype = /obj/item/ammo_casing/shotgun/buckshot + casingtype = /obj/item/ammo_casing/generic/shotgun/buckshot loot = list(/obj/effect/spawner/lootdrop/f13/uncommon, /obj/effect/gibspawner/human) loot_drop_amount = 5 loot_amount_random = TRUE diff --git a/sound/machines/ammovendor_dispense.ogg b/sound/machines/ammovendor_dispense.ogg new file mode 100644 index 00000000000..ee8a80690c0 Binary files /dev/null and b/sound/machines/ammovendor_dispense.ogg differ diff --git a/testing.dmm b/testing.dmm index 66a2b44c822..57d7bbbc5d4 100644 --- a/testing.dmm +++ b/testing.dmm @@ -131,7 +131,7 @@ "dG" = (/obj/structure/rack,/obj/item/stack/sheet/glass/ten,/obj/item/stack/sheet/glass/ten,/obj/item/stack/sheet/glass/ten,/obj/item/stack/rods/twentyfive,/turf/open/floor/plating/f13,/area/space) "dH" = (/turf/open/indestructible/ground/outside/sidewalk{icon_state = "verticalleftborderleft2"},/area/space) "dJ" = (/obj/effect/decal/cleanable/dirt,/obj/structure/flora/grass/wasteland{icon_state = "tall_grass_2"; pixel_x = -4; pixel_y = 13},/turf/open/indestructible/ground/outside/desert,/area/space) -"dL" = (/obj/effect/decal/cleanable/dirt,/obj/machinery/autolathe/ammo,/turf/open/floor/f13/wood,/area/space) +"dL" = (/obj/effect/decal/cleanable/dirt,/obj/structure/CMLS_ammo_vending_machine,/turf/open/floor/f13/wood,/area/space) "dM" = (/obj/structure/window/fulltile/house{icon_state = "storewindowbottom"},/turf/open/floor/f13{icon_state = "floorrustysolid"},/area/space) "dN" = (/obj/structure/rack,/obj/item/seeds/chili,/obj/item/seeds/coffee,/obj/item/seeds/tea,/obj/item/seeds/xander,/obj/item/seeds/grass,/obj/item/seeds/grass,/obj/item/seeds/ambrosia,/obj/item/seeds/poppy/broc,/obj/item/seeds/wheat/rice,/obj/item/seeds/cotton,/obj/item/seeds/grass,/obj/item/seeds/wheat,/obj/effect/spawner/lootdrop/f13/seedspawner,/obj/effect/spawner/lootdrop/f13/seedspawner,/turf/open/indestructible/ground/outside/dirt,/area/space) "dP" = (/obj/structure/chair/stool/retro/backed{dir = 4},/turf/open/floor/wood_common/f13/old,/area/space) @@ -209,7 +209,7 @@ "fL" = (/obj/structure/chair/wood{dir = 1},/turf/open/floor/f13/wood,/area/space) "fM" = (/obj/structure/wreck/trash/four_barrels,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust,/area/space) "fP" = (/obj/structure/flora/grass/wasteland{icon_state = "tall_grass_2"; layer = 6; pixel_x = -6; pixel_y = 13},/obj/structure/flora/tree/tall{icon_state = "tree_3"; pixel_x = -19; pixel_y = 9},/turf/open/indestructible/ground/outside/sidewalk{icon_state = "verticalleftborderlefttop"},/area/space) -"fQ" = (/obj/machinery/autolathe/ammo/unlocked,/obj/item/book/granter/crafting_recipe/gunsmith_one,/obj/item/book/granter/crafting_recipe/gunsmith_two,/obj/item/book/granter/crafting_recipe/gunsmith_three,/obj/machinery/light/small{dir = 4},/turf/open/floor/wood_common/f13/old,/area/space) +"fQ" = (/obj/structure/CMLS_ammo_vending_machine,/obj/item/book/granter/crafting_recipe/gunsmith_one,/obj/item/book/granter/crafting_recipe/gunsmith_two,/obj/item/book/granter/crafting_recipe/gunsmith_three,/obj/machinery/light/small{dir = 4},/turf/open/floor/wood_common/f13/old,/area/space) "fR" = (/turf/open/indestructible/ground/outside/road{icon_state = "horizontaltopborderbottom2left"},/area/space) "fT" = (/obj/structure/wreck/trash/halftire,/turf/open/indestructible/ground/outside/sidewalk{dir = 1; icon_state = "outerpavement"},/area/space) "fU" = (/obj/structure/table/reinforced,/turf/open/floor/f13{icon_state = "bluerustysolid"},/area/space) @@ -791,7 +791,7 @@ "vm" = (/obj/effect/decal/cleanable/dirt,/turf/open/indestructible/ground/outside/sidewalk,/area/space) "vn" = (/obj/machinery/light/small{dir = 4},/turf/open/floor/plasteel/f13/vault_floor/misc/bar,/area/space) "vo" = (/obj/structure/billboard/cola/pristine,/obj/effect/decal/cleanable/dirt,/turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust,/area/space) -"vp" = (/obj/machinery/autolathe/ammo/unlocked,/obj/item/book/granter/crafting_recipe/gunsmith_two,/obj/item/book/granter/crafting_recipe/gunsmith_three,/obj/item/book/granter/crafting_recipe/gunsmith_one,/turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust,/area/space) +"vp" = (/obj/structure/CMLS_ammo_vending_machine,/obj/item/book/granter/crafting_recipe/gunsmith_two,/obj/item/book/granter/crafting_recipe/gunsmith_three,/obj/item/book/granter/crafting_recipe/gunsmith_one,/turf/open/floor/plasteel/f13/vault_floor/misc/vaultrust,/area/space) "vq" = (/obj/structure/table/wood/poker,/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass{pixel_x = 9; pixel_y = 10},/obj/item/reagent_containers/food/drinks/drinkingglass/shotglass,/turf/open/floor/wood_common/f13/stage_b,/area/space) "vu" = (/turf/open/indestructible/ground/outside/sidewalk{icon_state = "verticalleftborderlefttop"},/area/space) "vv" = (/obj/structure/curtain,/turf/open/floor/f13{icon_state = "whitegreenrustychess"},/area/space) diff --git a/tgui/packages/tgui/interfaces/AmmoVendor2000.js b/tgui/packages/tgui/interfaces/AmmoVendor2000.js new file mode 100644 index 00000000000..5f51e57f392 --- /dev/null +++ b/tgui/packages/tgui/interfaces/AmmoVendor2000.js @@ -0,0 +1,699 @@ +/* eslint-disable max-len */ +import { + useBackend, + useLocalState, +} from '../backend'; +import { + AnimatedNumber, + Box, + Button, + Flex, + Icon, + Input, + NoticeBox, + Section, + Stack, + Tabs, + ToggleBox, // i love togglebox cus I made it +} from '../components'; +import { toFixed } from 'common/math'; +import { + formatMoney, +} from '../format'; +import { Window } from '../layouts'; +import { createSearch } from 'common/string'; +import { marked } from 'marked'; +import { sanitizeText } from '../sanitize'; + +const SideButtonWidth = "100px"; +const BuyButtonWidth = "100px"; +const QBOK = -!!CONNECTED!!-; +const WindowTitle = "Adventurer's Ammo Supply PRO v0.8β"; +const TickOn = ; +const TickOff = ; + +// Styles +const AmmoEntryOuterStyle = {}; + +const AmmoDescStyle = {}; + +const HelloUserStyle = { + "font-size": "16px", + "font-weight": "bold", + "border-bottom": "2px solid rgba(255, 255, 255, 0.5)", +}; + +const ConnectionOKStyle = { + "font-size": "12px", + "font-weight": "bold", + "border": "2px solid rgba(0, 255, 0, 0.5)", +}; + +const SideButtonStyle = {}; + +const EntryHeaderStyle = { + "font-size": "16px", + "font-weight": "bold", + "padding": "0px", + "margin": "0px", + "border-bottom": "2px solid rgba(255, 255, 255, 0.5)", +}; +const ItemEntryStatsStyle = { + "font-size": "10px", + "margin": "0px", + "padding": "3px", + "border-bottom": "1px inset rgba(255, 255, 255, 0.5)", + "line-height": "1.2", +}; + +const ItemEntryDescStyle = { + "font-size": "12px", + "margin": "4px", + "padding": "4px", +}; + +const ItemEntryContainerStyle = { + "border": "3px inset #FFF", + // "#a4bad6" in rgba, plus 2 shades brighter + "color": "rgba(194, 226, 244, 1)", + "background-color": "#223322", +}; + + + + +/* + * This is the main window of the AmmoVendor2000 interface. Cool! + */ +export const AmmoVendor2000 = (props, context) => { + const { act, data } = useBackend(context); + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + +
+
+
+ ); +}; + +/* + * This is the top chunk of the window + * with the user name and QBank connection status + * Also contains the currency amount and search bar + */ +const TopChunk = (props, context) => { + const { act, data } = useBackend(context); + const { + Username, + QBcash, + CurrencyUnit, + CurrencyName, + CurrencyPlural, + } = data; + const HiThere = `Welcome, ${Username}!`; + + return ( + + {/* The left chunk, welcome and connection */} + + + + + {HiThere} + + + + + Guild QBank Account Connection: + {QBOK} + + + + + {/* The right chunk, currency amount and search bar */} + + + + + + + + + + + + + + ); +}; + + +/* + * This is the button that shows the cash! + */ + +const YourCash = (props, context) => { + const { act, data } = useBackend(context); + const { + Username, + UserQUID, + QBcash = 0, + CurrencyUnit = "₡", + } = data; + + return ( + + ); +}; + +/* + * This is the search box +*/ +const SearchBox = (props, context) => { + const { act, data } = useBackend(context); + const [ + searchText, + setSearchText, + ] = useLocalState(context, 'searchText', ''); + + return ( + setSearchText(value)} + placeholder="Search for ammo..." + /> + ); +}; + +/* + * This is the button that sets Box mode + */ +const BoxToggler = (props, context) => { + const { act, data } = useBackend(context); + + const [ + CrateMode, + setCrateMode, + ] = useLocalState(context, 'CrateMode', false); + + return ( + + ); +}; + +/* + * This is the button that sets Crate mode + */ +const CrateToggler = (props, context) => { + const { act, data } = useBackend(context); + + const [ + CrateMode, + setCrateMode, + ] = useLocalState(context, 'CrateMode', false); + + return ( + + ); +}; + +// The actual item entry slug +// ANATOMY OF AN ALLITEMS ENTRY: +// { +// "Category": "Compact Ammo Boxes", +// "Name": "9mm Box", +// "Desc": "A box of 9mm ammo. Also theres a heckload of text!", +// "ShortDesc": "A box of 9mm ammo. Also the...", +// "RawCost": 152, // in copper +// "CopperCost": 2, +// "SilverCost": 5, +// "GoldCost": 1, +// "C_M_L_S": "C", +// "Caliber": "Compact", +// "KindPath": "/datum/ammo_kind/compact/9mm", +// "MaxAmmo": 50, +// "IsCrate": 0, +// "IsBox": 1, +// "DamageFlat": 10 OR X, // X is a string, if so, dont display it +// vv these are sown ONLY IF DamageFlat is NOT a number +// "DamageMin": 5, +// "DamageMax": 15, +// "DamageMean": 10, +// "DamageMedian": 10, +// "DamageMode": 10, +// "DamageVariance": 0, +// "DamageStdDev": 0, +// "DamageSkew": 0, +// "DamageKurtosis": 0, +// "DamageEntropy": 0 +// "DamageCrit": 20, +// "DamageCritChance": 0.9%, +// } + + +/* + * This is the set of tabs that allow to choose ammo type + */ +const TabQuad = (props, context) => { + const { act, data } = useBackend(context); + const { + AmmoTypes, + } = data; + + const [ + SelectedTab, + setSelectedTab, + ] = useLocalState(context, 'SelectedTab', 1); + + // 2x2 + return ( + + + + + { + setSelectedTab(1); + act('JustUpdate'); + }}> + Compact Ammo + + { + setSelectedTab(2); + act('JustUpdate'); + }}> + Medium Ammo + + + + + + { + setSelectedTab(3); + act('JustUpdate'); + }}> + Long Ammo + + { + setSelectedTab(4); + act('JustUpdate'); + }}> + Shotgun Ammo + + + + + + ); +}; + +/* + * This is the main window of the AmmoVendor2000 interface. + */ +const MainWindow = (props, context) => { + const { act, data } = useBackend(context); + const { + AllItems = [], + Username, + UserQUID, + QBcash, + CurrencyUnit, + CurrencyName, + CurrencyPlural, + } = data; + + const [ + SelectedTab, + setSelectedTab, + ] = useLocalState(context, 'SelectedTab', 1); + + const [ + CrateMode, + setCrateMode, + ] = useLocalState(context, 'CrateMode', false); + + const [ + searchText, + setSearchText, + ] = useLocalState(context, 'searchText', ''); + + // list of entries in the local state that have been clicked to be expanded + // this is used to keep track of which entries are expanded + // all without one of my buggy toggleboxes + const [ + ExpandedEntries, + setExpandedEntries, + ] = useLocalState(context, 'ExpandedEntries', []); + + const TrueCategory + = searchText.length > 0 + ? "Search Results" + : SelectedTab === 1 + ? CrateMode ? "Compact Ammo Crates" : "Compact Ammo Boxes" + : SelectedTab === 2 + ? CrateMode ? "Medium Ammo Crates" : "Medium Ammo Boxes" + : SelectedTab === 3 + ? CrateMode ? "Long Ammo Crates" : "Long Ammo Boxes" + : SelectedTab === 4 + ? CrateMode ? "Shotgun Ammo Crates" : "Shotgun Ammo Boxes" + : "EVERYTHING"; + + const testSearch = createSearch(searchText, item => { + return item.Name + item.Desc; + }); + + // if search contains text, filter the list to only show items that match + // and then filter out any entries that have isCrate set to true if CrateMode is false + // and vice versa + // if search does not contain anything, only show entries where + // Category = TrueCategory + const EntryList = searchText.length > 0 + ? AllItems + .filter(testSearch) + .filter(item => CrateMode ? item.IsCrate : item.IsBox) + : AllItems + .filter(item => item.Category === TrueCategory); + + if (EntryList.length === 0) { + return ( + + {searchText.length === 0 + ? 'No items in this category!' + : 'No results found.'} + + ); + } + return ( + + + {TrueCategory} + + {EntryList.map((item, i) => ( + + + + + + + + + +