diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b5ea96960cf..08350f7b3e9 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -126,7 +126,7 @@ return ..() //////////////HOSTILE MOB TARGETTING AND AGGRESSION//////////// -/* Hippie edit - overriden in hippie code + /mob/living/simple_animal/hostile/proc/ListTargets()//Step 1, find out what we can see if(!search_objects) . = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide @@ -137,8 +137,12 @@ if(can_see(targets_from, HM, vision_range)) . += HM else - . = oview(vision_range, targets_from) -*/ + . = list() // The following code is only very slightly slower than just returning oview(vision_range, targets_from), but it saves us much more work down the line, particularly when bees are involved + for (var/obj/A in oview(vision_range, targets_from)) + . += A + for (var/mob/A in oview(vision_range, targets_from)) + . += A + /mob/living/simple_animal/hostile/proc/FindTarget(var/list/possible_targets, var/HasTargetsList = 0)//Step 2, filter down possible targets to things we actually care about . = list() if(!HasTargetsList) diff --git a/hippiestation/code/game/data_huds.dm b/hippiestation/code/game/data_huds.dm new file mode 100644 index 00000000000..8194f33447a --- /dev/null +++ b/hippiestation/code/game/data_huds.dm @@ -0,0 +1,18 @@ + +/mob/living/carbon/human/proc/sec_hud_set_threat_status(mob/living/carbon/human/user, clear = FALSE) + var/list/hud_images = list() + var/image/holder_threat + holder_threat = image('icons/mob/hud.dmi', src, "hudalert-red", HUD_LAYER) + holder_threat.appearance_flags = RESET_COLOR|RESET_TRANSFORM + var/icon/I = icon(icon, icon_state, dir) + holder_threat.pixel_y = I.Height() - world.icon_size + hud_images += holder_threat + stored_hud_images += hud_images + if(istype(user.glasses, /obj/item/clothing/glasses/hud/threat)) + var/obj/item/clothing/glasses/hud/threat/scanner = user.glasses + if(clear) + scanner.threat_list -= src + if(src in scanner.threat_list) + user.client.images += hud_images + else + user.client.images -= stored_hud_images