Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
Acensti committed Sep 24, 2021
1 parent 9d05c0b commit c6401a7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
10 changes: 7 additions & 3 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
18 changes: 18 additions & 0 deletions hippiestation/code/game/data_huds.dm
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit c6401a7

Please sign in to comment.