From 2434f634d66c0ac7eb0ed0b66c095a437adf0f7f Mon Sep 17 00:00:00 2001 From: LiquidPotroh Date: Fri, 29 Nov 2024 04:08:18 +0300 Subject: [PATCH 1/2] intent targeting --- code/modules/projectiles/projectile.dm | 3 +++ code/modules/spacepods/equipment.dm | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 2c68d8c9cb3..74e1e0e6f30 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -393,6 +393,8 @@ Angle = round(get_angle(src, current)) if(spread) Angle += (rand() - 0.5) * spread + if(firer) + hit_crawling_mobs_chance = firer.a_intent == INTENT_HELP ? 0 : 100 // Turn right away var/matrix/M = new M.Turn(Angle) @@ -422,6 +424,7 @@ current = curloc yo = new_y - curloc.y xo = new_x - curloc.x + hit_crawling_mobs_chance = 100 set_angle(get_angle(curloc, original)) diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index e6e738083de..5f12052c114 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -38,12 +38,12 @@ projone.firer = usr projone.firer_source_atom = src projone.def_zone = BODY_ZONE_CHEST - projone.hit_crawling_mobs_chance = 33 // temporal soulution (or permanent), until weapons targeting rework + projone.hit_crawling_mobs_chance = usr.a_intent == INTENT_HELP ? 0 : 100 projtwo.starting = get_turf(my_atom) projtwo.firer = usr projtwo.firer_source_atom = src projtwo.def_zone = BODY_ZONE_CHEST - projtwo.hit_crawling_mobs_chance = 33 + projtwo.hit_crawling_mobs_chance = usr.a_intent == INTENT_HELP ? 0 : 100 spawn() playsound(src, fire_sound, 50, 1) projone.dumbfire(my_atom.dir) From 195f4d0db9caf9d71b8c60ecd2e4a95c813cd6e5 Mon Sep 17 00:00:00 2001 From: LiquidPotroh Date: Fri, 29 Nov 2024 16:36:05 +0300 Subject: [PATCH 2/2] very important commit --- code/modules/spacepods/equipment.dm | 2 -- 1 file changed, 2 deletions(-) diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 5f12052c114..460a91cc7fd 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -38,12 +38,10 @@ projone.firer = usr projone.firer_source_atom = src projone.def_zone = BODY_ZONE_CHEST - projone.hit_crawling_mobs_chance = usr.a_intent == INTENT_HELP ? 0 : 100 projtwo.starting = get_turf(my_atom) projtwo.firer = usr projtwo.firer_source_atom = src projtwo.def_zone = BODY_ZONE_CHEST - projtwo.hit_crawling_mobs_chance = usr.a_intent == INTENT_HELP ? 0 : 100 spawn() playsound(src, fire_sound, 50, 1) projone.dumbfire(my_atom.dir)