mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Resprites all mineral overlays (from mining scanners) (#92725)
This commit is contained in:
@@ -70,15 +70,12 @@
|
||||
var/turf/t = get_turf(src)
|
||||
mineral_scan_pulse(t, range, src)
|
||||
|
||||
/proc/mineral_scan_pulse(turf/T, range = world.view, obj/item/scanner)
|
||||
var/list/minerals = list()
|
||||
/proc/mineral_scan_pulse(turf/start_turf, range = world.view, obj/item/scanner)
|
||||
var/vents_nearby = FALSE
|
||||
var/undiscovered = FALSE
|
||||
var/radar_volume = 30
|
||||
for(var/turf/closed/mineral/mineral in RANGE_TURFS(range, T))
|
||||
if(mineral.scan_state)
|
||||
minerals += mineral
|
||||
for(var/obj/structure/ore_vent/vent in range(range, T))
|
||||
|
||||
for(var/obj/structure/ore_vent/vent in range(range, start_turf))
|
||||
if(!vents_nearby && (!vent.discovered || !vent.tapped))
|
||||
vents_nearby = TRUE
|
||||
if(vent.discovered)
|
||||
@@ -87,27 +84,33 @@
|
||||
radar_volume = max(potential_volume, radar_volume)
|
||||
vent.add_mineral_overlays()
|
||||
|
||||
if(LAZYLEN(minerals))
|
||||
for(var/turf/closed/mineral/M in minerals)
|
||||
var/obj/effect/temp_visual/mining_overlay/oldC = locate(/obj/effect/temp_visual/mining_overlay) in M
|
||||
if(oldC)
|
||||
qdel(oldC)
|
||||
var/obj/effect/temp_visual/mining_overlay/C = new /obj/effect/temp_visual/mining_overlay(M)
|
||||
C.icon_state = M.scan_state
|
||||
for(var/turf/closed/mineral/mineral in RANGE_TURFS(range, start_turf))
|
||||
if(!mineral.scan_state)
|
||||
continue
|
||||
|
||||
var/obj/effect/temp_visual/mining_overlay/scan_overlay = locate(/obj/effect/temp_visual/mining_overlay) in mineral
|
||||
if(!scan_overlay)
|
||||
scan_overlay = new(mineral)
|
||||
scan_overlay.icon_state = mineral.scan_state
|
||||
continue
|
||||
|
||||
deltimer(scan_overlay.timerid)
|
||||
scan_overlay.timerid = QDEL_IN_STOPPABLE(scan_overlay, scan_overlay.duration)
|
||||
animate(scan_overlay, alpha = 0, time = scan_overlay.duration, easing = scan_overlay.easing_style)
|
||||
|
||||
if(vents_nearby && scanner)
|
||||
if(undiscovered)
|
||||
playsound(scanner, 'sound/machines/radar-ping.ogg', radar_volume, FALSE)
|
||||
scanner.balloon_alert_to_viewers("ore vent nearby")
|
||||
else
|
||||
playsound(scanner, 'sound/machines/sonar-ping.ogg', radar_volume, FALSE)
|
||||
scanner.balloon_alert_to_viewers("ore vent nearby")
|
||||
scanner.spasm_animation(1.5 SECONDS)
|
||||
|
||||
/obj/effect/temp_visual/mining_overlay
|
||||
plane = HIGH_GAME_PLANE
|
||||
layer = FLASH_LAYER
|
||||
icon = 'icons/effects/ore_visuals.dmi'
|
||||
appearance_flags = 0 //to avoid having TILE_BOUND in the flags, so that the 480x480 icon states let you see it no matter where you are
|
||||
appearance_flags = NONE // to avoid having TILE_BOUND in the flags, so that the 480x480 icon states let you see it no matter where you are
|
||||
duration = 35
|
||||
pixel_x = -224
|
||||
pixel_y = -224
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
mats_per_unit = list(/datum/material/uranium=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
mine_experience = 6
|
||||
scan_state = "rock_Uranium"
|
||||
scan_state = "rock_uranium"
|
||||
spreadChance = 5
|
||||
merge_type = /obj/item/stack/ore/uranium
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
mats_per_unit = list(/datum/material/iron=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/iron
|
||||
mine_experience = 1
|
||||
scan_state = "rock_Iron"
|
||||
scan_state = "rock_iron"
|
||||
spreadChance = 20
|
||||
merge_type = /obj/item/stack/ore/iron
|
||||
|
||||
@@ -153,7 +153,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mats_per_unit = list(/datum/material/plasma=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
mine_experience = 5
|
||||
scan_state = "rock_Plasma"
|
||||
scan_state = "rock_plasma"
|
||||
spreadChance = 8
|
||||
merge_type = /obj/item/stack/ore/plasma
|
||||
|
||||
@@ -169,7 +169,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mine_experience = 3
|
||||
mats_per_unit = list(/datum/material/silver=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
scan_state = "rock_Silver"
|
||||
scan_state = "rock_silver"
|
||||
spreadChance = 5
|
||||
merge_type = /obj/item/stack/ore/silver
|
||||
|
||||
@@ -181,7 +181,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mine_experience = 5
|
||||
mats_per_unit = list(/datum/material/gold=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
scan_state = "rock_Gold"
|
||||
scan_state = "rock_gold"
|
||||
spreadChance = 5
|
||||
merge_type = /obj/item/stack/ore/gold
|
||||
|
||||
@@ -193,7 +193,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mats_per_unit = list(/datum/material/diamond=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
mine_experience = 10
|
||||
scan_state = "rock_Diamond"
|
||||
scan_state = "rock_diamond"
|
||||
merge_type = /obj/item/stack/ore/diamond
|
||||
|
||||
/obj/item/stack/ore/diamond/five
|
||||
@@ -207,7 +207,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mats_per_unit = list(/datum/material/bananium=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
mine_experience = 15
|
||||
scan_state = "rock_Bananium"
|
||||
scan_state = "rock_bananium"
|
||||
merge_type = /obj/item/stack/ore/bananium
|
||||
|
||||
/obj/item/stack/ore/titanium
|
||||
@@ -218,7 +218,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
mats_per_unit = list(/datum/material/titanium=SHEET_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/titanium
|
||||
mine_experience = 3
|
||||
scan_state = "rock_Titanium"
|
||||
scan_state = "rock_titanium"
|
||||
spreadChance = 5
|
||||
merge_type = /obj/item/stack/ore/titanium
|
||||
|
||||
|
||||
Reference in New Issue
Block a user