Fixes Embed check (#28961)

fix embed
This commit is contained in:
SpaceLoveSs13
2024-07-20 10:15:04 +05:30
committed by GitHub
parent aa4d8bf1ef
commit f87d978c78
2 changed files with 2 additions and 3 deletions

View File

@@ -807,7 +807,7 @@
if(!log_override && firer && original && !do_not_log)
log_combat(firer, original, "fired at", src, "from [get_area_name(src, TRUE)]")
//note: mecha projectile logging is handled in /obj/item/mecha_parts/mecha_equipment/weapon/action(). try to keep these messages roughly the sameish just for consistency's sake.
if(direct_target && (get_dist(direct_target, get_turf(fired_from)) <= 1)) // point blank shots // SKYRAT EDIT - ORIGINAL: if(direct_target && (get_dist(direct_target, get_turf(src)) <= 1))
if(direct_target && (get_dist(direct_target, get_turf(src)) <= 1)) // point blank shots
process_hit(get_turf(direct_target), direct_target)
if(QDELETED(src))
return

View File

@@ -8,10 +8,9 @@
TEST_ASSERT_EQUAL(bullet.get_embed().embed_chance, 100, "embed_chance failed to modify")
bullet.preparePixelProjectile(victim, firer)
bullet.fire(get_angle(firer, victim), victim)
/* // SKYRAT EDIT REMOVAL START - TODO - Figure out why it's not embedding during the unit test and fix it.
// SKYRAT EDIT REMOVAL START - TODO - Figure out why it's not embedding during the unit test and fix it.
var/list/components = victim.GetComponents(/datum/component/embedded)
TEST_ASSERT_EQUAL(components.len, 1, "Projectile with 100% embed chance didn't embed, or embedded multiple times")
var/datum/component/embedded/comp = components[1]
TEST_ASSERT_EQUAL(comp.weapon.get_embed().embed_chance, 100, "embed_chance modification did not transfer to shrapnel")
// SKYRATEDIT REMOVAL END
*/