[MIRROR] [READY]Hostile mobs can attack assemblies (#5821)

* [READY]Hostile mobs can attack assemblies (#36157)

* new fenotype

* attack

* Update items.dm

* Update assemblies.dm

* Update assemblies.dm

* Update items.dm

* [READY]Hostile mobs can attack assemblies
This commit is contained in:
CitadelStationBot
2018-03-05 14:38:30 -06:00
committed by Poojawa
parent c72201e605
commit 848b12db64
2 changed files with 9 additions and 2 deletions
+3 -1
View File
@@ -674,6 +674,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
return 0
/obj/item/attack_animal(mob/living/simple_animal/M)
if (obj_flags & CAN_BE_HIT)
return ..()
return 0
/obj/item/mech_melee_attack(obj/mecha/M)
@@ -820,4 +822,4 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
// Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped
/obj/item/proc/get_part_rating()
return 0
return 0
@@ -106,7 +106,7 @@
if(!search_objects)
. = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden,/obj/item/device/electronic_assembly))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
@@ -209,6 +209,11 @@
return FALSE
return TRUE
if(istype(the_target, /obj/item/device/electronic_assembly))
var/obj/item/device/electronic_assembly/O = the_target
if(O.combat_circuits)
return TRUE
if(istype(the_target, /obj/structure/destructible/clockwork/ocular_warden))
var/obj/structure/destructible/clockwork/ocular_warden/OW = the_target
if(OW.target != src)