Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHARP Rifle Revived #6938

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
b9e86e9
init
Shad0vvs Dec 18, 2022
dae306f
init
Shad0vvs Dec 21, 2022
41d849b
stanfixes(but not varnames cuz im evil)
Shad0vvs Dec 21, 2022
9daa652
timerfixes(why does nobody use this flag???)
Shad0vvs Dec 22, 2022
e362593
to be fixed
Shad0vvs Dec 24, 2022
b77650a
bugfix city
Shad0vvs Dec 26, 2022
b5b7026
delayed firing mode add
Shad0vvs Dec 26, 2022
f32a033
var update fixo
Shad0vvs Dec 26, 2022
b5698e5
bugfix+nomoregloblist
Shad0vvs Dec 27, 2022
93a4790
guh
Shad0vvs Dec 31, 2022
b47f062
moved to grenadey
Shad0vvs Jan 5, 2023
b80e584
grammar
Shad0vvs Jan 5, 2023
305c643
soundfixes
Shad0vvs Jan 5, 2023
c2f149c
smallbuff
Shad0vvs Jan 5, 2023
156cad8
stanfix (this sucks)
Shad0vvs Jan 6, 2023
8cb8aed
carlac made me rebase
Shad0vvs Jan 6, 2023
ed587ef
g4
Shad0vvs Jan 6, 2023
2a794e7
regex
Shad0vvs Jan 6, 2023
c7ff749
FOR CM TESTING (NO PICKING ALLOWED)
Shad0vvs Jan 6, 2023
d5e1159
TRUE BRANCH (dont use if TM unless you know the diff)
Shad0vvs Jan 6, 2023
d7ed359
oops typo
Shad0vvs Jan 6, 2023
018b8db
i removed choice oops
Shad0vvs Jan 7, 2023
91f0c35
spelling
Shad0vvs Jan 7, 2023
ab715cb
Merge branch 'master' into SHARP
Shad0vvs Jan 7, 2023
1af4656
Apply suggestions from code review
Shad0vvs Jan 7, 2023
b0ab198
Merge remote-tracking branch 'upstream/master' into sharp_revive
Nomoresolvalou Jun 2, 2024
9aca609
SHARP time baby let's gooooo
Nomoresolvalou Aug 12, 2024
ccd5dd2
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 12, 2024
0a079ff
code fixes
Nomoresolvalou Aug 12, 2024
6f04c2a
missed a comma... OOPS
Nomoresolvalou Aug 12, 2024
d597494
sprite fixes
Nomoresolvalou Aug 14, 2024
56cc9b5
sound changes
Nomoresolvalou Aug 14, 2024
33895a2
more sound changes
Nomoresolvalou Aug 14, 2024
9747e5f
mag harn and sprite changes
Nomoresolvalou Aug 14, 2024
18e067f
rate of fire and HEDP damage changes
Nomoresolvalou Aug 14, 2024
36d01ed
HIDP direct hit buff
Nomoresolvalou Aug 14, 2024
8867b60
Update uscm.dmi
Blundir Aug 15, 2024
117b936
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 17, 2024
043f1fc
SHARP datum integration
Nomoresolvalou Aug 17, 2024
cab0cf5
SHARP ammo now in WO supply beacon
Nomoresolvalou Aug 18, 2024
5672fe2
dmi fix again
Nomoresolvalou Aug 21, 2024
6ccf319
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 22, 2024
c487969
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 22, 2024
1d2bb3f
WO fix
Nomoresolvalou Aug 22, 2024
076de7e
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 22, 2024
33df5d3
grenade DMI fix again
Nomoresolvalou Aug 22, 2024
7e0dc15
SHARP lineart
Nomoresolvalou Aug 23, 2024
d348904
Merge branch 'master' into sharp_revive
Nomoresolvalou Aug 23, 2024
c1eb3a7
DMI FIXINGF YEEEEAS
Nomoresolvalou Aug 23, 2024
59dbad8
code fixes (we love single letter vars!!!!!)
Nomoresolvalou Aug 25, 2024
4bbf5d2
corrected shard sprites
Nomoresolvalou Sep 11, 2024
27e2b13
fixes tankbelt map color and buff HE and flechette
Nomoresolvalou Sep 11, 2024
b22a2aa
fixes
Blundir Sep 11, 2024
1ad813f
firemode toggle inspection text
Nomoresolvalou Sep 11, 2024
220d225
Merge branch 'sharp_revive' of https://github.com/Nomoresolvalou/cmss…
Nomoresolvalou Sep 11, 2024
ed82c19
fire rate buff
Nomoresolvalou Sep 12, 2024
4ac3831
HIDP mine level 1 buff (same as direct hit HIDP)
Nomoresolvalou Sep 12, 2024
a2445b4
balloonchat for firemode toggle
Nomoresolvalou Sep 13, 2024
7ef8d6d
Update code/modules/projectiles/guns/specialist/sharp.dm
kiVts Sep 13, 2024
d9df7cc
Update code/modules/projectiles/guns/specialist/sharp.dm
kiVts Sep 13, 2024
ba26a86
MHEDP buff, SAC disarm, bullet & acid explosion
Nomoresolvalou Sep 14, 2024
ee30cdd
syntax betterments
Nomoresolvalou Sep 14, 2024
b394716
wield_time nerf
Nomoresolvalou Sep 15, 2024
bbeb09e
direct HEDP falloff decreased (suicide bomber xeno)
Nomoresolvalou Sep 15, 2024
6e51100
HEDP direct hit falloff buff (xeno suicide bombs)
Nomoresolvalou Sep 15, 2024
153eeb8
fire rate nerf: revengeance
Nomoresolvalou Sep 16, 2024
e3f0c54
swap mag sprite to be same color as ammo
Nomoresolvalou Sep 18, 2024
a4970c3
explosion delay increase, HEDP direct nerf
Nomoresolvalou Sep 18, 2024
b6a8010
direct hit balloons, mine layer above objects
Nomoresolvalou Sep 22, 2024
db04ccd
balloons, now with color!
Nomoresolvalou Sep 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions code/__DEFINES/conflict.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#define AMMO_MP (1<<21)
/// Handles sentry flamers glob
#define AMMO_FLAME (1<<22)
// If the projectile hits a dense turf it'll do on_hit_turf on the turf just in front of the turf instead of on the turf itself (This one does not work on mobs)
#define AMMO_STRIKES_SURFACE_ONLY (1<<23)
// NOTE: Don't add flags past 1<<23, it'll break things due to BYOND limitations. You can usually use a Component instead.

/// Projectile is shrpanel which allow it to skip some collisions
Expand Down
1 change: 1 addition & 0 deletions code/__DEFINES/weapon_stats.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ As such, don't expect any values assigned to common firearms to even consider ho
//How many ticks you have to wait between firing. Burst delay uses the same variable!
*/

#define FIRE_DELAY_TIER_SHARP 40
#define FIRE_DELAY_TIER_AMR 30
#define FIRE_DELAY_TIER_VULTURE 20
#define FIRE_DELAY_TIER_SNIPER 15
Expand Down
59 changes: 59 additions & 0 deletions code/datums/supply_packs/spec_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,65 @@
containername = "M4RA Scout Impact Magazine Crate"
group = "Weapons Specialist Ammo"

//SHARP

/datum/supply_packs/ammo_grenadier_sharp_mix
name = "SHARP Operator Mixed Magazine Crate (explosive x2, flechette x2, incendiary x2)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
)
cost = 40
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Mixed Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_explosive
name = "SHARP Operator Explosive Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Explosive Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_flechette
name = "SHARP Operator Flechette Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
/obj/item/ammo_magazine/rifle/sharp/flechette,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator Flechette Magazine Crate"
group = "Weapons Specialist Ammo"

/datum/supply_packs/ammo_grenadier_sharp_incendiary
name = "SHARP Operator incendiary Magazine Crate (x5)"
contains = list(
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
)
cost = 30
containertype = /obj/structure/closet/crate/ammo
containername = "SHARP Operator incendiary Magazine Crate"
group = "Weapons Specialist Ammo"

//M240-T

/datum/supply_packs/ammo_pyro_mix
Expand Down
17 changes: 13 additions & 4 deletions code/game/gamemodes/colonialmarines/whiskey_outpost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,7 @@
var/list/supplies = list(
"10x24mm, slugs, buckshot, and 10x20mm rounds",
"Explosives and grenades",
"SHARP ammo",
"Rocket ammo",
"Sniper ammo",
"Anti-Material Sniper ammo",
Expand Down Expand Up @@ -641,11 +642,14 @@
if("Explosives and grenades")
supply_drop = 5
to_chat(usr, SPAN_NOTICE("Explosives and grenades will now drop!"))
if("Pyrotechnician tanks")
if("SHARP ammo")
supply_drop = 6
to_chat(usr, SPAN_NOTICE("SHARP ammo will now drop!"))
if("Pyrotechnician tanks")
supply_drop = 7
to_chat(usr, SPAN_NOTICE("Pyrotechnician tanks will now drop!"))
if("Scout ammo")
supply_drop = 7
supply_drop = 8
to_chat(usr, SPAN_NOTICE("Scout ammo will now drop!"))
else
return
Expand Down Expand Up @@ -747,12 +751,17 @@
if(5) // Give them explosives + Grenades for the Grenade spec. Might be too many grenades, but we'll find out.
spawnitems = list(/obj/item/storage/box/explosive_mines,
/obj/item/storage/belt/grenade/full)
if(6) // Pyrotech
if(6) // SHARP ammo
spawnitems = list(/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/explosive,
/obj/item/ammo_magazine/rifle/sharp/incendiary,
/obj/item/ammo_magazine/rifle/sharp/flechette,)
if(7) // Pyrotech
var/fuel = pick(/obj/item/ammo_magazine/flamer_tank/large/B, /obj/item/ammo_magazine/flamer_tank/large/X)
spawnitems = list(/obj/item/ammo_magazine/flamer_tank/large,
/obj/item/ammo_magazine/flamer_tank/large,
fuel)
if(7) // Scout
if(8) // Scout
spawnitems = list(/obj/item/ammo_magazine/rifle/m4ra/custom,
/obj/item/ammo_magazine/rifle/m4ra/custom,
/obj/item/ammo_magazine/rifle/m4ra/custom/incendiary,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("WEAPONS SPECIALIST SETS (CHOOSE 1)", 0, null, null, null),
list("Demolitionist Set", 0, /obj/item/storage/box/spec/demolitionist, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Heavy Grenadier Set", 0, /obj/item/storage/box/spec/heavy_grenadier, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("SHARP Operator Set", 0, /obj/item/storage/box/spec/sharp_operator, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Pyro Set", 0, /obj/item/storage/box/spec/pyro, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Scout Set", 0, /obj/item/storage/box/spec/scout, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_REGULAR),
list("Sniper Set", 0, /obj/item/storage/box/spec/sniper, MARINE_CAN_BUY_ESSENTIALS, VENDOR_ITEM_RECOMMENDED),
Expand All @@ -25,6 +26,11 @@ GLOBAL_LIST_INIT(cm_vending_gear_spec, list(
list("84mm High-Explosive Rocket", 40, /obj/item/ammo_magazine/rocket, null, VENDOR_ITEM_REGULAR),
list("84mm White-Phosphorus Rocket", 40, /obj/item/ammo_magazine/rocket/wp, null, VENDOR_ITEM_REGULAR),

list("EXTRA SHARP AMMUNITION", 0, null, null, null),
list("SHARP 9X-E Sticky Explosive Dart magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/explosive, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-T Sticky incendiary Dart magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/incendiary, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-F Flechette Dart Magazine (darts)", 40, /obj/item/ammo_magazine/rifle/sharp/flechette, null, VENDOR_ITEM_REGULAR),

list("EXTRA GRENADES", 0, null, null, null),
list("M40 HEDP Grenades x6", 40, /obj/effect/essentials_set/hedp_6_pack, null, VENDOR_ITEM_REGULAR),
list("M40 HIDP Incendiary Grenades x6", 40, /obj/effect/essentials_set/hidp_6_pack, null, VENDOR_ITEM_REGULAR),
Expand Down
5 changes: 5 additions & 0 deletions code/game/machinery/vending/vendor_types/wo_vendors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@
list("84mm High-Explosive Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket, VENDOR_ITEM_REGULAR),
list("84mm White-Phosphorus Rocket", floor(scale * 1), /obj/item/ammo_magazine/rocket/wp, VENDOR_ITEM_REGULAR),

list("EXTRA SHARP AMMUNITION", -1, null, null, null),
list("SHARP 9X-E Sticky Explosive Dart magazine (darts)", round(scale * 1.5), /obj/item/ammo_magazine/rifle/sharp/explosive, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-T Sticky incendiary Dart magazine (darts)", round(scale * 1), /obj/item/ammo_magazine/rifle/sharp/incendiary, null, VENDOR_ITEM_REGULAR),
list("SHARP 9X-F Flechette Dart Magazine (darts)", round(scale * 1), /obj/item/ammo_magazine/rifle/sharp/flechette, null, VENDOR_ITEM_REGULAR),

list("EXTRA GRENADES", -1, null, null, null),
list("M40 HEDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hedp_6_pack, VENDOR_ITEM_REGULAR),
list("M40 HIDP Grenade Pack (x6)", floor(scale * 1.5), /obj/effect/essentials_set/hidp_6_pack, VENDOR_ITEM_REGULAR),
Expand Down
8 changes: 7 additions & 1 deletion code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,17 @@
var/burn_damage = 40
var/applied_fire_stacks = 5
var/xeno_yautja_reduction = 0.75
var/reagent = new /datum/reagent/napalm/ut()

/obj/effect/particle_effect/smoke/phosphorus/weak
time_to_live = 2
smokeranking = SMOKE_RANK_MED
burn_damage = 30
xeno_yautja_reduction = 0.5

/obj/effect/particle_effect/smoke/phosphorus/sharp
reagent = new /datum/reagent/napalm/blue()

/obj/effect/particle_effect/smoke/phosphorus/Move()
. = ..()
for(var/mob/living/carbon/affected_mob in get_turf(src))
Expand Down Expand Up @@ -351,7 +355,6 @@
if(isyautja(affected_mob) || isxeno(affected_mob))
damage *= xeno_yautja_reduction

var/reagent = new /datum/reagent/napalm/ut()
affected_mob.burn_skin(damage)
affected_mob.adjust_fire_stacks(applied_fire_stacks, reagent)
affected_mob.IgniteMob()
Expand Down Expand Up @@ -761,6 +764,9 @@
/datum/effect_system/smoke_spread/phosphorus/weak
smoke_type = /obj/effect/particle_effect/smoke/phosphorus/weak

/datum/effect_system/smoke_spread/phosphorus/sharp
smoke_type = /obj/effect/particle_effect/smoke/phosphorus/sharp

/datum/effect_system/smoke_spread/cn20
smoke_type = /obj/effect/particle_effect/smoke/cn20

Expand Down
118 changes: 117 additions & 1 deletion code/game/objects/items/explosives/mine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

if(!customizable)
set_tripwire()
return;
return

if(!detonator)
active = TRUE
Expand Down Expand Up @@ -339,3 +339,119 @@
/obj/item/explosive/mine/sebb/prime()
new /obj/item/explosive/grenade/sebb/primed(get_turf(src))
qdel(src)

/obj/item/explosive/mine/sharp
name = "\improper P9 SHARP explosive dart"
desc = "An experimental P9 SHARP proximity triggered explosive dart designed by Armat Systems for use by the United States Colonial Marines. This one has full 360 detection range."
icon_state = "sharp_explosive_mine"
angle = 360
var/disarmed = FALSE
var/explosion_size = 100
var/explosion_falloff = 50
var/mine_level = 1
var/deploy_time = 0
var/mine_state = ""

/obj/item/explosive/mine/sharp/proc/upgrade_mine()
mine_level++
icon_state = mine_state + "_[mine_level]"

/obj/item/explosive/mine/sharp/check_for_obstacles(mob/living/user)
return FALSE

/obj/item/explosive/mine/sharp/attackby(obj/item/W, mob/user)
return

/obj/item/explosive/mine/sharp/set_tripwire()
if(!active && !tripwire)
for(var/direction in CARDINAL_ALL_DIRS)
var/tripwire_loc = get_turf(get_step(loc,direction))
tripwire = new(tripwire_loc)
tripwire.linked_claymore = src
active = TRUE

/obj/item/explosive/mine/sharp/prime(mob/user)
set waitfor = FALSE
if(!cause_data)
cause_data = create_cause_data(initial(name), user)
if(mine_level == 1)
explosion_size = 100
else if(mine_level == 2)
explosion_size = 115
else if(mine_level == 3)
explosion_size = 130
else
explosion_size = 145
cell_explosion(loc, explosion_size, explosion_falloff, EXPLOSION_FALLOFF_SHAPE_LINEAR, CARDINAL_ALL_DIRS, cause_data)
playsound(loc, 'sound/weapons/gun_sharp_explode.ogg', 100)
qdel(src)

/obj/item/explosive/mine/sharp/disarm()
anchored = FALSE
active = FALSE
triggered = FALSE
icon_state = "sharp_mine_disarmed"
QDEL_NULL(tripwire)
disarmed = TRUE
add_to_garbage(src)

/obj/item/explosive/mine/sharp/attack_self(mob/living/user)
if(disarmed)
return
. = ..()

/obj/item/explosive/mine/sharp/deploy_mine(mob/user)
if(disarmed)
return
if(!hard_iff_lock && user)
iff_signal = user.faction


cause_data = create_cause_data(initial(name), user)
if(user)
user.drop_inv_item_on_ground(src)
setDir(user ? user.dir : dir) //The direction it is planted in is the direction the user faces at that time
activate_sensors()
update_icon()
deploy_time = world.time
mine_state = icon_state
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 30 SECONDS, TIMER_DELETE_ME)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 60 SECONDS, TIMER_DELETE_ME)
addtimer(CALLBACK(src, TYPE_PROC_REF(/obj/item/explosive/mine/sharp, upgrade_mine)), 90 SECONDS, TIMER_DELETE_ME)
for(var/mob/living/carbon/mob in range(1, src))
try_to_prime(mob)

/obj/item/explosive/mine/sharp/attack_alien()
if(disarmed)
..()
else
return

/obj/item/explosive/mine/sharp/incendiary
name = "\improper P9 SHARP incendiary dart"
desc = "An experimental P9 SHARP proximity triggered explosive dart designed by Armat Systems for use by the United States Colonial Marines. This one has full 360 detection range."
icon_state = "sharp_incendiary_mine"

/obj/item/explosive/mine/sharp/incendiary/prime(mob/user)
set waitfor = FALSE
if(!cause_data)
cause_data = create_cause_data(initial(name), user)
if(mine_level == 1)
var/datum/effect_system/smoke_spread/phosphorus/smoke = new /datum/effect_system/smoke_spread/phosphorus/sharp
var/smoke_radius = 2
smoke.set_up(smoke_radius, 0, loc)
smoke.start()
playsound(loc, 'sound/weapons/gun_sharp_explode.ogg', 100)
else if(mine_level == 2)
var/datum/reagent/napalm/green/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 2)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
else if(mine_level == 3)
var/datum/reagent/napalm/ut/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 2)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
else
var/datum/reagent/napalm/ut/reagent = new()
new /obj/flamer_fire(loc, cause_data, reagent, 3)
playsound(loc, 'sound/weapons/gun_flamethrower3.ogg', 45)
qdel(src)
54 changes: 53 additions & 1 deletion code/game/objects/items/shards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
icon_state = "phoron"
source_sheet_type = /obj/item/stack/sheet/glass/phoronglass


// Shrapnel.
// on_embed is called from projectile.dm, bullet_act(obj/projectile/P).
// on_embedded_movement is called from human.dm, handle_embedded_objects().
Expand Down Expand Up @@ -265,3 +264,56 @@
/obj/item/shard/shrapnel/tutorial
damage_on_move = 0


/obj/item/sharp
name = "sharp dart shrapnel"
desc = "It looks like a used 9X-E Sticky Explosive Dart, useless now."
icon = 'icons/obj/items/weapons/projectiles.dmi'
icon_state = "sharp_explosive_dart"
sharp = IS_SHARP_ITEM_BIG
w_class = SIZE_SMALL
edge = TRUE
force = 0
throwforce = 0
garbage = TRUE
var/damage_on_move = 3
var/count = 1

/obj/item/sharp/Initialize(mapload, dir)
. = ..()
if(dir && dir <= 6)
turn_object(90)
else
turn_object(270)

/obj/item/sharp/proc/on_embed(mob/embedded_mob, obj/limb/target_organ)
return

/obj/item/sharp/proc/on_embedded_movement(mob/living/embedded_mob)
if(!ishuman(embedded_mob))
return
var/mob/living/carbon/human/H = embedded_mob
if(H.species.flags & NO_SHRAPNEL)
return
var/obj/limb/organ = embedded_organ
if(istype(organ))
organ.take_damage(damage_on_move * count, 0, 0, no_limb_loss = TRUE)
embedded_mob.pain.apply_pain(damage_on_move * count)

/obj/item/sharp/proc/turn_object(amount)
var/matrix/initial_matrix = matrix(transform)
initial_matrix.Turn(amount)
apply_transform(initial_matrix)

/obj/item/sharp/explosive
name = "\improper 9X-E Sticky Explosive Dart"

/obj/item/sharp/incendiary
name = "\improper 9X-T Sticky Incendiary Dart"
desc = "It looks like a used 9X-T Sticky Incendiary Dart, useless now."
icon_state = "sharp_incendiary_dart"

/obj/item/sharp/flechette
name = "\improper 9X-F Flechette Dart"
desc = "It looks like a used 9X-F Flechette Dart, useless now."
icon_state = "sharp_flechette_dart"
Loading
Loading