From 5232728ee747832bd31c71f98e871868ce481525 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Mon, 7 Oct 2019 05:25:47 +0200 Subject: [PATCH 1/2] Ports "Adds three new .38 ammo types", also lazily adding .357 AP --- code/game/machinery/computer/teleporter.dm | 4 +- .../objects/items/implants/implant_track.dm | 16 +++++- code/game/objects/items/teleportation.dm | 2 +- .../ammunition/ballistic/revolver.dm | 26 +++++++++- .../projectiles/boxes_magazines/ammo_boxes.dm | 21 ++++++++ .../projectile/bullets/revolver.dm | 49 +++++++++++++++++-- .../research/designs/weapon_designs.dm | 30 ++++++++++++ code/modules/research/techweb/all_nodes.dm | 12 ++--- code/modules/uplink/uplink_items.dm | 8 ++- 9 files changed, 151 insertions(+), 17 deletions(-) diff --git a/code/game/machinery/computer/teleporter.dm b/code/game/machinery/computer/teleporter.dm index b9b95eecd0..9e0bea08ab 100644 --- a/code/game/machinery/computer/teleporter.dm +++ b/code/game/machinery/computer/teleporter.dm @@ -124,12 +124,12 @@ L[avoid_assoc_duplicate_keys(A.name, areaindex)] = R for(var/obj/item/implant/tracking/I in GLOB.tracked_implants) - if(!I.imp_in || !isliving(I.loc)) + if(!I.imp_in || !isliving(I.loc) || !I.allow_teleport) continue else var/mob/living/M = I.loc if(M.stat == DEAD) - if(M.timeofdeath + 6000 < world.time) + if(M.timeofdeath + I.lifespan_postmortem < world.time) continue if(is_eligible(I)) L[avoid_assoc_duplicate_keys(M.real_name, areaindex)] = I diff --git a/code/game/objects/items/implants/implant_track.dm b/code/game/objects/items/implants/implant_track.dm index 913c577f2c..fc7539af9e 100644 --- a/code/game/objects/items/implants/implant_track.dm +++ b/code/game/objects/items/implants/implant_track.dm @@ -1,7 +1,19 @@ /obj/item/implant/tracking name = "tracking implant" desc = "Track with this." - activated = 0 + activated = FALSE + var/lifespan_postmortem = 6000 //for how many deciseconds after user death will the implant work? + var/allow_teleport = TRUE //will people implanted with this act as teleporter beacons? + +/obj/item/implant/tracking/c38 + name = "TRAC implant" + desc = "A smaller tracking implant that supplies power for only a few minutes." + var/lifespan = 3000 //how many deciseconds does the implant last? + allow_teleport = FALSE + +/obj/item/implant/tracking/c38/Initialize() + . = ..() + QDEL_IN(src, lifespan) /obj/item/implant/tracking/New() ..() @@ -21,7 +33,7 @@ var/dat = {"Implant Specifications:
Name: Tracking Beacon
Life: 10 minutes after death of host
- Important Notes: None
+ Important Notes: Implant also works as a teleporter beacon.

Implant Details:
Function: Continuously transmits low power signal. Useful for tracking.
diff --git a/code/game/objects/items/teleportation.dm b/code/game/objects/items/teleportation.dm index 1ccc88d892..da806908df 100644 --- a/code/game/objects/items/teleportation.dm +++ b/code/game/objects/items/teleportation.dm @@ -80,7 +80,7 @@ else var/mob/living/M = W.loc if (M.stat == DEAD) - if (M.timeofdeath + 6000 < world.time) + if (M.timeofdeath + W.lifespan_postmortem < world.time) continue var/turf/tr = get_turf(W) diff --git a/code/modules/projectiles/ammunition/ballistic/revolver.dm b/code/modules/projectiles/ammunition/ballistic/revolver.dm index b45d01d7d8..6232ca4d69 100644 --- a/code/modules/projectiles/ammunition/ballistic/revolver.dm +++ b/code/modules/projectiles/ammunition/ballistic/revolver.dm @@ -6,6 +6,11 @@ caliber = "357" projectile_type = /obj/item/projectile/bullet/a357 +/obj/item/ammo_casing/a357/ap + name = ".357 armor-piercing bullet casing" + desc = "A .357 armor-piercing bullet casing." + projectile_type = /obj/item/projectile/bullet/a357/ap + // 7.62x38mmR (Nagant Revolver) /obj/item/ammo_casing/n762 @@ -20,9 +25,26 @@ name = ".38 rubber bullet casing" desc = "A .38 rubber bullet casing." caliber = "38" - projectile_type = /obj/item/projectile/bullet/c38 + projectile_type = /obj/item/projectile/bullet/c38/rubber /obj/item/ammo_casing/c38/lethal name = ".38 bullet casing" desc = "A .38 bullet casing" - projectile_type = /obj/item/projectile/bullet/c38lethal + projectile_type = /obj/item/projectile/bullet/c38 + +/obj/item/ammo_casing/c38/trac + name = ".38 TRAC bullet casing" + desc = "A .38 \"TRAC\" bullet casing." + projectile_type = /obj/item/projectile/bullet/c38/trac + +/obj/item/ammo_casing/c38/hotshot + name = ".38 Hot Shot bullet casing" + desc = "A .38 Hot Shot bullet casing." + caliber = "38" + projectile_type = /obj/item/projectile/bullet/c38/hotshot + +/obj/item/ammo_casing/c38/iceblox + name = ".38 Iceblox bullet casing" + desc = "A .38 Iceblox bullet casing." + caliber = "38" + projectile_type = /obj/item/projectile/bullet/c38/iceblox \ No newline at end of file diff --git a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm index 7cd27e8592..ba6a8e2454 100644 --- a/code/modules/projectiles/boxes_magazines/ammo_boxes.dm +++ b/code/modules/projectiles/boxes_magazines/ammo_boxes.dm @@ -3,13 +3,19 @@ desc = "Designed to quickly reload revolvers." icon_state = "357" ammo_type = /obj/item/ammo_casing/a357 + caliber = "357" max_ammo = 7 multiple_sprites = 1 +/obj/item/ammo_box/a357/ap + name = "speed loader (.357 AP)" + ammo_type = /obj/item/ammo_casing/a357/ap + /obj/item/ammo_box/c38 name = "speed loader (.38 rubber)" desc = "Designed to quickly reload revolvers." icon_state = "38" + caliber = "38" ammo_type = /obj/item/ammo_casing/c38 max_ammo = 6 multiple_sprites = 1 @@ -19,6 +25,21 @@ name = "speed loader (.38)" ammo_type = /obj/item/ammo_casing/c38/lethal +/obj/item/ammo_box/c38/trac + name = "speed loader (.38 TRAC)" + desc = "Designed to quickly reload revolvers. TRAC bullets embed a tracking implant within the target's body." + ammo_type = /obj/item/ammo_casing/c38/trac + +/obj/item/ammo_box/c38/hotshot + name = "speed loader (.38 Hot Shot)" + desc = "Designed to quickly reload revolvers. Hot Shot bullets contain an incendiary payload." + ammo_type = /obj/item/ammo_casing/c38/hotshot + +/obj/item/ammo_box/c38/iceblox + name = "speed loader (.38 Iceblox)" + desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload." + ammo_type = /obj/item/ammo_casing/c38/iceblox + /obj/item/ammo_box/c9mm name = "ammo box (9mm)" icon_state = "9mmbox" diff --git a/code/modules/projectiles/projectile/bullets/revolver.dm b/code/modules/projectiles/projectile/bullets/revolver.dm index d3af474d76..3bbfe437fe 100644 --- a/code/modules/projectiles/projectile/bullets/revolver.dm +++ b/code/modules/projectiles/projectile/bullets/revolver.dm @@ -13,16 +13,59 @@ // .38 (Detective's Gun) /obj/item/projectile/bullet/c38 + name = ".38 bullet" + damage = 25 + +/obj/item/projectile/bullet/c38/rubber name = ".38 rubber bullet" damage = 15 stamina = 48 -/obj/item/projectile/bullet/c38lethal - name = ".38 bullet" - damage = 25 +/obj/item/projectile/bullet/c38/trac + name = ".38 TRAC bullet" + damage = 10 + +/obj/item/projectile/bullet/c38/trac/on_hit(atom/target, blocked = FALSE) + . = ..() + var/mob/living/carbon/M = target + var/obj/item/implant/tracking/c38/imp + for(var/obj/item/implant/tracking/c38/TI in M.implants) //checks if the target already contains a tracking implant + imp = TI + return + if(!imp) + imp = new /obj/item/implant/tracking/c38(M) + imp.implant(M) + +/obj/item/projectile/bullet/c38/hotshot //similar to incendiary bullets, but do not leave a flaming trail + name = ".38 Hot Shot bullet" + damage = 20 + +/obj/item/projectile/bullet/c38/hotshot/on_hit(atom/target, blocked = FALSE) + . = ..() + if(iscarbon(target)) + var/mob/living/carbon/M = target + M.adjust_fire_stacks(6) + M.IgniteMob() + +/obj/item/projectile/bullet/c38/iceblox //see /obj/item/projectile/temp for the original code + name = ".38 Iceblox bullet" + damage = 20 + var/temperature = 100 + +/obj/item/projectile/bullet/c38/iceblox/on_hit(atom/target, blocked = FALSE) + . = ..() + if(isliving(target)) + var/mob/living/M = target + M.adjust_bodytemperature(((100-blocked)/100)*(temperature - M.bodytemperature)) + // .357 (Syndie Revolver) /obj/item/projectile/bullet/a357 name = ".357 bullet" damage = 60 + +/obj/item/projectile/bullet/a357/ap + name = ".357 armor-piercing bullet" + damage = 45 + armour_penetration = 45 \ No newline at end of file diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index 214ef36afe..7dd85ea18c 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -17,6 +17,36 @@ id = "sec_38lethal" build_path = /obj/item/ammo_box/c38/lethal +/datum/design/c38_trac + name = "Speed Loader (.38 TRAC)" + desc = "Designed to quickly reload revolvers. TRAC bullets embed a tracking implant within the target's body." + id = "c38_trac" + build_type = PROTOLATHE + materials = list(MAT_METAL = 20000, MAT_SILVER = 5000, MAT_GOLD = 1000) + build_path = /obj/item/ammo_box/c38/trac + category = list("Ammo") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/c38_hotshot + name = "Speed Loader (.38 Hot Shot)" + desc = "Designed to quickly reload revolvers. Hot Shot bullets contain an incendiary payload." + id = "c38_hotshot" + build_type = PROTOLATHE + materials = list(MAT_METAL = 20000, MAT_PLASMA = 5000) + build_path = /obj/item/ammo_box/c38/hotshot + category = list("Ammo") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + +/datum/design/c38_iceblox + name = "Speed Loader (.38 Iceblox)" + desc = "Designed to quickly reload revolvers. Iceblox bullets contain a cryogenic payload." + id = "c38_iceblox" + build_type = PROTOLATHE + materials = list(MAT_METAL = 20000, MAT_PLASMA = 5000) + build_path = /obj/item/ammo_box/c38/iceblox + category = list("Ammo") + departmental_flags = DEPARTMENTAL_FLAG_SECURITY + ////////////// //WT550 Mags// ////////////// diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 038a41b3cd..5a2493184f 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -508,7 +508,7 @@ display_name = "Subdermal Implants" description = "Electronic implants buried beneath the skin." prereq_ids = list("biotech", "datatheory") - design_ids = list("implanter", "implantcase", "implant_chem", "implant_tracking", "locator") + design_ids = list("implanter", "implantcase", "implant_chem", "implant_tracking", "locator", "c38_trac") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) export_price = 5000 @@ -676,12 +676,12 @@ research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2750) export_price = 5000 -/datum/techweb_node/tech_shell - id = "tech_shell" - display_name = "Technological Shells" - description = "They're more technological than regular shot." +/datum/techweb_node/exotic_ammo + id = "exotic_ammo" + display_name = "Exotic Ammunition" + description = "They won't know what hit em." prereq_ids = list("weaponry", "ballistic_weapons") - design_ids = list("techshotshell") + design_ids = list("techshotshell", "c38_hotshot", "c38_iceblox") research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3500) export_price = 5000 diff --git a/code/modules/uplink/uplink_items.dm b/code/modules/uplink/uplink_items.dm index 09e955d2f9..3b51b7c9a0 100644 --- a/code/modules/uplink/uplink_items.dm +++ b/code/modules/uplink/uplink_items.dm @@ -767,9 +767,15 @@ datum/uplink_item/stealthy_weapons/taeclowndo_shoes desc = "A speed loader that contains seven additional .357 Magnum rounds; usable with the Syndicate revolver. \ For when you really need a lot of things dead." item = /obj/item/ammo_box/a357 - cost = 4 + cost = 3 exclude_modes = list(/datum/game_mode/nuclear/clown_ops) +/datum/uplink_item/ammo/revolver/ap + name = ".357 Armor Piercing Speed Loader" + desc = "A speed loader that contains seven additional .357 AP Magnum rounds; usable with the Syndicate revolver. \ + Cuts through like a hot knife through butter." + item = /obj/item/ammo_box/a357/ap + /datum/uplink_item/ammo/a40mm name = "40mm Grenade" desc = "A 40mm HE grenade for use with the M-90gl's under-barrel grenade launcher. \ From b95f910a4e8d8a076bceca5de3573cd3a5512e3d Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Mon, 7 Oct 2019 17:32:16 +0200 Subject: [PATCH 2/2] macros --- code/game/objects/items/implants/implant_track.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/implants/implant_track.dm b/code/game/objects/items/implants/implant_track.dm index fc7539af9e..4398688cee 100644 --- a/code/game/objects/items/implants/implant_track.dm +++ b/code/game/objects/items/implants/implant_track.dm @@ -2,13 +2,13 @@ name = "tracking implant" desc = "Track with this." activated = FALSE - var/lifespan_postmortem = 6000 //for how many deciseconds after user death will the implant work? + var/lifespan_postmortem = 10 MINUTES //for how many deciseconds after user death will the implant work? var/allow_teleport = TRUE //will people implanted with this act as teleporter beacons? /obj/item/implant/tracking/c38 name = "TRAC implant" desc = "A smaller tracking implant that supplies power for only a few minutes." - var/lifespan = 3000 //how many deciseconds does the implant last? + var/lifespan = 5 MINUTES //how many deciseconds does the implant last? allow_teleport = FALSE /obj/item/implant/tracking/c38/Initialize()