mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
refactor: Datumizes ore. (#27043)
* refactor: Datumizes ore. * tiny fixes * set script PR number * Update code/datums/ores.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Signed-off-by: warriorstar-orion <orion@snowfrost.garden> * review comments * qdel existing ore before set * fix how gibtonite reaction count is calculated * rename and unify return values for digging --------- Signed-off-by: warriorstar-orion <orion@snowfrost.garden> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
|
||||
/obj/item/mining_scanner/admin/attack_self(mob/user)
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
if(M.scan_state)
|
||||
M.icon_state = M.scan_state
|
||||
if(M.ore?.scan_icon_state)
|
||||
M.icon_state = M.ore.scan_icon_state
|
||||
qdel(src)
|
||||
|
||||
/obj/item/t_scanner/adv_mining_scanner
|
||||
@@ -61,7 +61,7 @@
|
||||
/proc/mineral_scan_pulse(turf/T, range = world.view)
|
||||
var/list/minerals = list()
|
||||
for(var/turf/simulated/mineral/M in range(range, T))
|
||||
if(M.scan_state)
|
||||
if(M.ore?.scan_icon_state)
|
||||
minerals += M
|
||||
if(LAZYLEN(minerals))
|
||||
for(var/turf/simulated/mineral/M in minerals)
|
||||
@@ -69,7 +69,7 @@
|
||||
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
|
||||
C.icon_state = M.ore.scan_icon_state
|
||||
|
||||
/obj/effect/temp_visual/mining_overlay
|
||||
plane = FULLSCREEN_PLANE
|
||||
|
||||
@@ -81,8 +81,9 @@
|
||||
S.start()
|
||||
for(var/turf/simulated/mineral/rock in circlerangeturfs(location, boom_sizes[3]))
|
||||
var/distance = get_dist_euclidian(location, rock)
|
||||
if(distance <= boom_sizes[3])
|
||||
rock.mineralAmt += 3 // if rock is going to get drilled, add bonus mineral amount
|
||||
if(distance <= boom_sizes[3] && rock.ore)
|
||||
rock.ore.drop_max += 3 // if rock is going to get drilled, add bonus mineral amount
|
||||
rock.ore.drop_min += 3
|
||||
rock.gets_drilled()
|
||||
for(var/mob/living/carbon/C in circlerange(location, boom_sizes[3]))
|
||||
var/distance = get_dist_euclidian(location, C)
|
||||
|
||||
Reference in New Issue
Block a user