mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Tracking Slugs (#10287)
This commit is contained in:
@@ -83,6 +83,12 @@
|
||||
desc = "Track with this."
|
||||
var/id = 1.0
|
||||
|
||||
/obj/item/implant/tracking/Initialize()
|
||||
var/list/tracking_list = list()
|
||||
for(var/obj/item/implant/tracking/T in implants)
|
||||
tracking_list += T
|
||||
id = length(tracking_list) + 1
|
||||
. = ..()
|
||||
|
||||
/obj/item/implant/tracking/get_data()
|
||||
. = {"<b>Implant Specifications:</b><BR>
|
||||
|
||||
@@ -44,12 +44,6 @@
|
||||
if(src.case.imp)
|
||||
if(istype(src.case.imp, /obj/item/implant))
|
||||
dat += src.case.imp.get_data()
|
||||
if(istype(src.case.imp, /obj/item/implant/tracking))
|
||||
dat += {"ID (1-100):
|
||||
<A href='byond://?src=\ref[src];tracking_id=-10'>-</A>
|
||||
<A href='byond://?src=\ref[src];tracking_id=-1'>-</A> [case.imp:id]
|
||||
<A href='byond://?src=\ref[src];tracking_id=1'>+</A>
|
||||
<A href='byond://?src=\ref[src];tracking_id=10'>+</A><BR>"}
|
||||
else
|
||||
dat += "The implant casing is empty."
|
||||
else
|
||||
@@ -65,11 +59,6 @@
|
||||
return
|
||||
if ((usr.contents.Find(src)) || ((in_range(src, usr) && istype(src.loc, /turf))))
|
||||
usr.set_machine(src)
|
||||
if (href_list["tracking_id"])
|
||||
var/obj/item/implant/tracking/T = src.case.imp
|
||||
T.id += text2num(href_list["tracking_id"])
|
||||
T.id = min(100, T.id)
|
||||
T.id = max(1, T.id)
|
||||
|
||||
if (istype(src.loc, /mob))
|
||||
attack_self(src.loc)
|
||||
|
||||
@@ -261,6 +261,14 @@
|
||||
pickup_sound = 'sound/items/pickup/ammobox.ogg'
|
||||
starts_with = list(/obj/item/ammo_casing/shotgun/incendiary = 8)
|
||||
|
||||
/obj/item/storage/box/trackingslugs
|
||||
name = "box of tracking slugs"
|
||||
desc = "It has a picture of a shotgun shell and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
icon_state = "trackingshot_box"
|
||||
drop_sound = 'sound/items/drop/ammobox.ogg'
|
||||
pickup_sound = 'sound/items/pickup/ammobox.ogg'
|
||||
starts_with = list(/obj/item/ammo_casing/shotgun/tracking = 4)
|
||||
|
||||
/obj/item/storage/box/sniperammo
|
||||
name = "box of 14.5mm shells"
|
||||
desc = "It has a picture of a gun and several warning symbols on the front.<br>WARNING: Live ammunition. Misuse may result in serious injury or death."
|
||||
|
||||
@@ -45,14 +45,8 @@ emp_act
|
||||
//Shrapnel
|
||||
if(!(species.flags & NO_EMBED) && P.can_embed())
|
||||
var/armor = getarmor_organ(organ, "bullet")
|
||||
if(prob(20 + max(P.damage - armor, -10)))
|
||||
var/obj/item/SP = new P.shrapnel_type()
|
||||
SP.edge = TRUE
|
||||
SP.sharp = TRUE
|
||||
SP.name = (P.name != "shrapnel")? "[P.name] shrapnel" : "shrapnel"
|
||||
SP.desc = "[SP.desc] It looks like it was fired from [P.shot_from]."
|
||||
SP.forceMove(organ)
|
||||
organ.embed(SP)
|
||||
if(prob(20 + max(P.damage + P.embed_chance - armor, -10)))
|
||||
P.do_embed(organ)
|
||||
|
||||
return (..(P , def_zone))
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun
|
||||
name = "shotgun slug"
|
||||
desc = "A 12 gauge slug."
|
||||
desc = "A 12-gauge slug."
|
||||
icon_state = "slshell"
|
||||
spent_icon = "slshell-spent"
|
||||
caliber = "shotgun"
|
||||
@@ -111,7 +111,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/pellet
|
||||
name = "shotgun shell"
|
||||
desc = "A 12 gauge shell."
|
||||
desc = "A 12-gauge shell."
|
||||
icon_state = "gshell"
|
||||
spent_icon = "gshell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/pellet/shotgun
|
||||
@@ -119,7 +119,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/blank
|
||||
name = "shotgun shell"
|
||||
desc = "A blank shell."
|
||||
desc = "A 12-gauge blank shell."
|
||||
icon_state = "blshell"
|
||||
spent_icon = "blshell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/blank
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/practice
|
||||
name = "shotgun shell"
|
||||
desc = "A practice shell."
|
||||
desc = "A 12-gauge practice shell."
|
||||
icon_state = "pshell"
|
||||
spent_icon = "pshell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/practice
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/beanbag
|
||||
name = "beanbag shell"
|
||||
desc = "A beanbag shell."
|
||||
desc = "A 12-gauge beanbag shell."
|
||||
icon_state = "bshell"
|
||||
spent_icon = "bshell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/beanbag
|
||||
@@ -145,7 +145,7 @@
|
||||
//is blocked by clothing that stops tasers and is vulnerable to EMP
|
||||
/obj/item/ammo_casing/shotgun/stunshell
|
||||
name = "stun shell"
|
||||
desc = "A 12 gauge taser cartridge."
|
||||
desc = "A 12-gauge taser cartridge."
|
||||
icon_state = "stunshell"
|
||||
spent_icon = "stunshell-spent"
|
||||
projectile_type = /obj/item/projectile/energy/electrode/stunshot
|
||||
@@ -159,7 +159,7 @@
|
||||
//Does not stun, only blinds, but has area of effect.
|
||||
/obj/item/ammo_casing/shotgun/flash
|
||||
name = "flash shell"
|
||||
desc = "A chemical shell used to signal distress or provide illumination."
|
||||
desc = "A 12-gauge chemical shell used to signal distress or provide illumination."
|
||||
icon_state = "fshell"
|
||||
spent_icon = "fshell-spent"
|
||||
projectile_type = /obj/item/projectile/energy/flash/flare
|
||||
@@ -168,7 +168,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/incendiary
|
||||
name = "incendiary shell"
|
||||
desc = "A 12 gauge incendiary shell."
|
||||
desc = "A 12-gauge incendiary shell."
|
||||
icon_state = "ishell"
|
||||
spent_icon = "ishell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/shotgun/incendiary
|
||||
@@ -179,10 +179,17 @@
|
||||
desc = "A 12-gauge shotgun slug fitted with a single-use ion pulse generator."
|
||||
icon_state = "empshell"
|
||||
spent_icon = "empshell-spent"
|
||||
projectile_type = /obj/item/projectile/ion
|
||||
projectile_type = /obj/item/projectile/ion
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 260, MATERIAL_URANIUM = 200)
|
||||
reload_sound = 'sound/weapons/reload_shell_emp.ogg'
|
||||
|
||||
/obj/item/ammo_casing/shotgun/tracking
|
||||
name = "tracking slug"
|
||||
desc = "A 12-gauge shotgun slug fitted with a tracking implant, set to activate upon embedding flesh."
|
||||
icon_state = "trackingshell"
|
||||
spent_icon = "trackingshell-spent"
|
||||
projectile_type = /obj/item/projectile/bullet/tracking
|
||||
|
||||
/obj/item/ammo_casing/tranq
|
||||
name = "PPS shell"
|
||||
desc = "A .50 cal PPS bullet casing."
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
|
||||
var/incinerate = 0
|
||||
var/embed = 0 // whether or not the projectile can embed itself in the mob
|
||||
var/embed_chance = 0 // a flat bonus to the % chance to embed
|
||||
var/shrapnel_type //type of shrapnel the projectile leaves in its target.
|
||||
|
||||
var/p_x = 16
|
||||
@@ -135,6 +136,16 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/projectile/proc/do_embed(var/obj/item/organ/external/organ)
|
||||
var/obj/item/SP = new shrapnel_type(organ)
|
||||
SP.edge = TRUE
|
||||
SP.sharp = TRUE
|
||||
SP.name = (name != "shrapnel") ? "[initial(name)] shrapnel" : "shrapnel"
|
||||
SP.desc += " It looks like it was fired from [shot_from]."
|
||||
SP.forceMove(organ)
|
||||
organ.embed(SP)
|
||||
return SP
|
||||
|
||||
/obj/item/projectile/proc/get_structure_damage()
|
||||
if(damage_type == BRUTE || damage_type == BURN)
|
||||
return damage
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
name = "shrapnel" //'shrapnel' sounds more dangerous (i.e. cooler) than 'pellet'
|
||||
icon_state = "pellets"
|
||||
damage = 20
|
||||
//icon_state = "bullet" //TODO: would be nice to have it's own icon state
|
||||
var/pellets = 4 //number of pellets
|
||||
var/range_step = 2 //projectile will lose a fragment each time it travels this distance. Can be a non-integer.
|
||||
var/base_spread = 90 //lower means the pellets spread more across body parts. If zero then this is considered a shrapnel explosion instead of a shrapnel cone
|
||||
@@ -164,6 +163,22 @@
|
||||
sharp = 0
|
||||
incinerate = 10
|
||||
|
||||
/obj/item/projectile/bullet/tracking
|
||||
name = "tracking shot"
|
||||
damage = 20
|
||||
embed_chance = 60 // this thing was designed to embed, so it has a 80% base chance to embed (damage + this flat increase)
|
||||
agony = 20
|
||||
shrapnel_type = /obj/item/implant/tracking
|
||||
|
||||
/obj/item/projectile/bullet/tracking/do_embed(obj/item/organ/external/organ)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/obj/item/implant/tracking/T = .
|
||||
T.implanted = TRUE
|
||||
T.imp_in = organ.owner
|
||||
T.part = organ
|
||||
LAZYADD(organ.implants, T)
|
||||
|
||||
//Should do about 80 damage at 1 tile distance (adjacent), and 50 damage at 3 tiles distance.
|
||||
//Overall less damage than slugs in exchange for more damage at very close range and more embedding
|
||||
/obj/item/projectile/bullet/pellet/shotgun
|
||||
|
||||
@@ -20,6 +20,10 @@
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 4000)
|
||||
build_path = /obj/item/ammo_casing/shotgun/stunshell
|
||||
|
||||
/datum/design/item/weapon/stunshell/tracking
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3500, MATERIAL_URANIUM = 250)
|
||||
build_path = /obj/item/ammo_casing/shotgun/tracking
|
||||
|
||||
/datum/design/item/weapon/chemsprayer
|
||||
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, MATERIAL_GLASS = 1000)
|
||||
|
||||
8
html/changelogs/geeves-tracking_shot.yml
Normal file
8
html/changelogs/geeves-tracking_shot.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
author: Geeves
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "Added tracking slugs, shotgun rounds that contain tracking implants, to be shot into things."
|
||||
- rscadd: "Added a box of four tracking slugs to the armory. Allowed RnD to produce them as well."
|
||||
- tweak: "Tracker implant IDs can no longer be configured, instead they spawn with their ID set to the correct next index."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 81 KiB |
@@ -9543,6 +9543,7 @@
|
||||
pixel_x = -4;
|
||||
pixel_y = 4
|
||||
},
|
||||
/obj/item/storage/box/trackingslugs,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/security/armory)
|
||||
"arH" = (
|
||||
|
||||
Reference in New Issue
Block a user