mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Resprites all mineral overlays (from mining scanners) (#92725)
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
points = 50
|
||||
refined_type = /obj/item/stack/sheet/bluespace_crystal
|
||||
grind_results = list(/datum/reagent/bluespace = 20)
|
||||
scan_state = "rock_BScrystal"
|
||||
scan_state = "rock_bscrystal"
|
||||
merge_type = /obj/item/stack/ore/bluespace_crystal
|
||||
/// The teleport range when crushed/thrown at someone.
|
||||
var/blink_range = 8
|
||||
|
||||
@@ -85,12 +85,12 @@
|
||||
/turf/closed/mineral/proc/Change_Ore(ore_type, random = 0)
|
||||
if(random)
|
||||
mineralAmt = rand(1, 5)
|
||||
if(ispath(ore_type, /obj/item/stack/ore)) //If it has a scan_state, switch to it
|
||||
if(ispath(ore_type, /obj/item/stack/ore)) // If it has a scan_state, switch to it
|
||||
var/obj/item/stack/ore/the_ore = ore_type
|
||||
scan_state = initial(the_ore.scan_state) // I SAID. SWITCH. TO. IT.
|
||||
mineralType = ore_type // Everything else assumes that this is typed correctly so don't set it to non-ores thanks.
|
||||
if(ispath(ore_type, /obj/item/boulder))
|
||||
scan_state = "rock_Boulder" //Yes even the lowly boulder has a scan state
|
||||
scan_state = "rock_boulder" // Yes even the lowly boulder has a scan state
|
||||
spawned_boulder = /obj/item/boulder/gulag_expanded
|
||||
|
||||
/**
|
||||
@@ -545,7 +545,7 @@
|
||||
|
||||
/turf/closed/mineral/iron
|
||||
mineralType = /obj/item/stack/ore/iron
|
||||
scan_state = "rock_Iron"
|
||||
scan_state = "rock_iron"
|
||||
|
||||
/turf/closed/mineral/iron/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -565,7 +565,7 @@
|
||||
|
||||
/turf/closed/mineral/uranium
|
||||
mineralType = /obj/item/stack/ore/uranium
|
||||
scan_state = "rock_Uranium"
|
||||
scan_state = "rock_uranium"
|
||||
|
||||
/turf/closed/mineral/uranium/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -575,7 +575,7 @@
|
||||
|
||||
/turf/closed/mineral/diamond
|
||||
mineralType = /obj/item/stack/ore/diamond
|
||||
scan_state = "rock_Diamond"
|
||||
scan_state = "rock_diamond"
|
||||
|
||||
/turf/closed/mineral/diamond/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -595,7 +595,7 @@
|
||||
|
||||
/turf/closed/mineral/gold
|
||||
mineralType = /obj/item/stack/ore/gold
|
||||
scan_state = "rock_Gold"
|
||||
scan_state = "rock_gold"
|
||||
|
||||
/turf/closed/mineral/gold/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -605,7 +605,7 @@
|
||||
|
||||
/turf/closed/mineral/silver
|
||||
mineralType = /obj/item/stack/ore/silver
|
||||
scan_state = "rock_Silver"
|
||||
scan_state = "rock_silver"
|
||||
|
||||
/turf/closed/mineral/silver/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -620,7 +620,7 @@
|
||||
|
||||
/turf/closed/mineral/titanium
|
||||
mineralType = /obj/item/stack/ore/titanium
|
||||
scan_state = "rock_Titanium"
|
||||
scan_state = "rock_titanium"
|
||||
|
||||
/turf/closed/mineral/titanium/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -630,7 +630,7 @@
|
||||
|
||||
/turf/closed/mineral/plasma
|
||||
mineralType = /obj/item/stack/ore/plasma
|
||||
scan_state = "rock_Plasma"
|
||||
scan_state = "rock_plasma"
|
||||
|
||||
/turf/closed/mineral/plasma/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -651,7 +651,7 @@
|
||||
/turf/closed/mineral/bananium
|
||||
mineralType = /obj/item/stack/ore/bananium
|
||||
mineralAmt = 3
|
||||
scan_state = "rock_Bananium"
|
||||
scan_state = "rock_bananium"
|
||||
|
||||
/turf/closed/mineral/bananium/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -662,7 +662,7 @@
|
||||
/turf/closed/mineral/bscrystal
|
||||
mineralType = /obj/item/stack/ore/bluespace_crystal
|
||||
mineralAmt = 1
|
||||
scan_state = "rock_BScrystal"
|
||||
scan_state = "rock_bscrystal"
|
||||
|
||||
/turf/closed/mineral/bscrystal/volcanic
|
||||
turf_type = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -770,7 +770,7 @@
|
||||
/turf/closed/mineral/gibtonite
|
||||
mineralAmt = 1
|
||||
MAP_SWITCH(, icon_state = "rock_Gibtonite_inactive")
|
||||
scan_state = "rock_Gibtonite"
|
||||
scan_state = "rock_gibtonite"
|
||||
var/det_time = 8 //Countdown till explosion, but also rewards the player for how close you were to detonation when you defuse it
|
||||
var/stage = GIBTONITE_UNSTRUCK //How far into the lifecycle of gibtonite we are
|
||||
var/activated_ckey = null //These are to track who triggered the gibtonite deposit for logging purposes
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 5.7 KiB |
Reference in New Issue
Block a user