Merge pull request #6765 from Mechoid/BrainmechTargFix

Brainmechs can use guns again.
This commit is contained in:
Atermonera
2020-02-29 15:03:43 -08:00
committed by GitHub
3 changed files with 13 additions and 1 deletions
+1 -1
View File
@@ -72,7 +72,7 @@
var/obj/item/projectile/P = A
P.dispersion = deviation
process_accuracy(P, chassis.occupant, target)
P.launch_projectile_from_turf(target, chassis.occupant.zone_sel.selecting, chassis.occupant, params)
P.launch_projectile_from_turf(target, chassis.get_pilot_zone_sel(), chassis.occupant, params)
else if(istype(A, /atom/movable))
var/atom/movable/AM = A
AM.throw_at(target, 7, 1, chassis)
+11
View File
@@ -0,0 +1,11 @@
/*
* Helper file for Exosuit / Mecha code.
*/
// Returns, at least, a usable target body position, for things like guns.
/obj/mecha/proc/get_pilot_zone_sel()
if(!occupant || !occupant.zone_sel || occupant.stat)
return BP_TORSO
return occupant.zone_sel.selecting
+1
View File
@@ -783,6 +783,7 @@
#include "code\game\mecha\mecha.dm"
#include "code\game\mecha\mecha_construction_paths.dm"
#include "code\game\mecha\mecha_control_console.dm"
#include "code\game\mecha\mecha_helpers.dm"
#include "code\game\mecha\mecha_parts.dm"
#include "code\game\mecha\mecha_wreckage.dm"
#include "code\game\mecha\combat\combat.dm"