Merge pull request #48 from shellspeed1/mech-capacitor-and-scanner-update

Ports some code improvements and gives odyessy, ripley, and firefighter scanners and capacitors.
This commit is contained in:
quotefox
2019-10-29 03:23:41 +00:00
committed by GitHub
13 changed files with 289 additions and 116 deletions
@@ -78,7 +78,7 @@
var/do_ranged = 0
for(var/equip in mecha.equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = equip
if(ME.range & RANGED)
if(ME.range & MECHA_RANGED)
do_ranged = 1
break
if(do_ranged)
@@ -144,7 +144,7 @@
ME.rearm()
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = RANGED)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = MECHA_RANGED)
. = list()
if(mecha)
for(var/equip in mecha.equipment)
@@ -160,7 +160,7 @@
if(mecha)
mecha_reload()
mecha_face_target(A)
var/list/possible_weapons = get_mecha_equip_by_flag(RANGED)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_RANGED)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons) //so we don't favor mecha.equipment[1] forever
if(ME.action(A))
@@ -173,7 +173,7 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/AttackingTarget()
if(mecha)
var/list/possible_weapons = get_mecha_equip_by_flag(MELEE)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_MELEE)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons)
mecha_face_target(target)