Skip to content

Commit

Permalink
Xenoarch digsite scanner tweaks (#33528)
Browse files Browse the repository at this point in the history
* Clearer digsites in scanner

* better line

* description update

* only for subsequents

Co-authored-by: SECBATON GRIFFON <sage>
  • Loading branch information
SECBATON-GRIFFON authored Oct 21, 2022
1 parent 371a0ff commit 297b524
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions code/modules/research/xenoarchaeology/tools/tools_digsitelocator.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/obj/item/device/xenoarch_scanner
name = "xenoarchaeological digsite locator"
desc = "A scanner that checks the surrounding area for potential xenoarch digsites. If it finds any, It will briefly make them visible. Requires mesons for optimal use."
desc = "A scanner that scans the surrounding area for potential xenoarch digsites, highlighting them temporarily in a colour associated with their responsive reagent. Requires mesons for optimal use."
icon = 'icons/obj/xenoarchaeology.dmi'
icon_state = "digsitelocator"
item_state = "analyzer"
Expand All @@ -15,10 +15,10 @@
/obj/item/device/xenoarch_scanner/adv
name = "advanced xenoarchaeological digsite locator"
icon_state = "digsitelocator_adv"
desc = "A scanner that scans the surrounding area for potential xenoarch digsites, highlighting them temporarily in a colour associated with their responsive reagent. Requires mesons for optimal use."
desc = "A scanner that scans the surrounding area for potential xenoarch digsites, highlighting them temporarily in a colour associated with their responsive reagent, along with a flashing red circle mark for larger artifacts. Requires mesons for optimal use."
adv = TRUE

/obj/item/device/xenoarch_scanner/adv/examine(mob/user)
/obj/item/device/xenoarch_scanner/examine(mob/user)
..()
to_chat(user, "<span class = 'notice'>It has a list of colour codes:</span>")
for(var/i in color_from_find_reagent)
Expand All @@ -33,16 +33,29 @@
playtoolsound(src, 50)
for(var/turf/unsimulated/mineral/M in range(7, user))
if(M.finds.len)
var/datum/find/F = M.finds[1]
var/image/I = image('icons/turf/mine_overlays.dmi', loc = M, icon_state = "find_overlay[pick("1","2","3")]", layer = UNDER_HUD_LAYER)
I.color = color_from_find_reagent[F.responsive_reagent]
I.plane = HUD_PLANE
C.images += I
var/n = 0
var/list/image/IS = list()
var/totalfinds = M.finds.len
for(var/datum/find/F in M.finds)
n++
var/image/I = image('icons/turf/mine_overlays.dmi', loc = M, icon_state = "find_overlay[rand(1,3)]", layer = UNDER_HUD_LAYER)
IS.Add(I)
I.color = color_from_find_reagent[F.responsive_reagent]
I.plane = HUD_PLANE
if(n > 1)
var/matrix/TR = matrix()
TR.Scale(((totalfinds + 1) - n) / totalfinds, ((totalfinds + 1) - n) / totalfinds)
I.transform = TR
var/list/col = rgb2num(I.color)
I.filters = filter(type="outline",color=rgb(255-col[1],255-col[2],255-col[3]))
C.images += I
spawn(1 SECONDS)
animate(I, alpha = 0, time = 4 SECONDS)
for(var/image/I in IS)
animate(I, alpha = 0, time = 4 SECONDS)
spawn(5 SECONDS)
if(C)
C.images -= I
for(var/image/I in IS)
if(C)
C.images -= I
if (adv && M.artifact_find)
var/image/I = image('icons/turf/mine_overlays.dmi', loc = M, icon_state = "artifact_overlay", layer = UNDER_HUD_LAYER)
I.plane = HUD_PLANE
Expand Down

0 comments on commit 297b524

Please sign in to comment.