Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit febf1c4

Browse files
committed
TGS Test merge #13185
2 parents 8cf60dc + 2b75935 commit febf1c4

36 files changed

Lines changed: 10104 additions & 9711 deletions

File tree

_maps/map_files/mining/Lavaland.dmm

Lines changed: 9779 additions & 9677 deletions
Large diffs are not rendered by default.

code/game/mecha/equipment/tools/mining_tools.dm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
/turf/closed/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
7474
for(var/turf/closed/mineral/M in range(drill.chassis,1))
7575
if(get_dir(drill.chassis,M)&drill.chassis.dir)
76-
M.gets_drilled()
76+
M.attempt_drill()
7777
drill.log_message("Drilled through [src]", LOG_MECHA)
7878
drill.move_ores()
7979

@@ -167,4 +167,4 @@
167167
mineral_scan_pulse(get_turf(src))
168168

169169
#undef DRILL_BASIC
170-
#undef DRILL_HARDENED
170+
#undef DRILL_HARDENED

code/game/objects/items/grenades/plastic.dm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
var/boom_sizes = list(0, 0, 3)
2020
var/can_attach_mob = FALSE
2121
var/full_damage_on_mobs = FALSE
22+
var/alert_admins = TRUE
2223

2324
/obj/item/grenade/plastic/Initialize()
2425
. = ..()
@@ -120,7 +121,8 @@
120121
return
121122
target = AM
122123

123-
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_VERBOSEJMP(target)] with [det_time] second fuse")
124+
if(alert_admins)
125+
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_VERBOSEJMP(target)] with [det_time] second fuse")
124126
log_game("[key_name(user)] planted [name] on [target.name] at [AREACOORD(user)] with a [det_time] second fuse")
125127

126128
notify_ghosts("[user] has planted \a [src] on [target] with a [det_time] second fuse!", source = target, action = NOTIFY_ORBIT, header = "Bomb Planted" )

code/game/turfs/simulated/floor.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
/turf/open/floor/proc/gets_drilled()
126126
return
127127

128+
/turf/open/floor/proc/attempt_drilled()
129+
return
130+
128131
/turf/open/floor/proc/break_tile_to_plating()
129132
var/turf/open/floor/plating/T = make_plating()
130133
if(!istype(T))

code/game/turfs/simulated/minerals.dm

Lines changed: 104 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
2222
var/scan_state = "" //Holder for the image we display when we're pinged by a mining scanner
2323
var/defer_change = FALSE
24+
var/hardness = 1 //how hard the material is, we'll have to have more powerful stuff if we want to blast harder materials.
2425

2526
/turf/closed/mineral/Initialize()
2627
if (!canSmoothWith)
@@ -62,13 +63,15 @@
6263
if(I.use_tool(src, user, 40, volume=50))
6364
if(ismineralturf(src))
6465
to_chat(user, span_notice("You finish cutting into the rock."))
65-
gets_drilled(user)
66+
attempt_drill(user)
6667
SSblackbox.record_feedback("tally", "pick_used_mining", 1, I.type)
6768
else
6869
return attack_hand(user)
6970

70-
/turf/closed/mineral/proc/gets_drilled()
71+
/turf/closed/mineral/proc/gets_drilled(mob/user, triggered_by_explosion = FALSE, override_bonus = FALSE)
7172
if (mineralType && (mineralAmt > 0))
73+
if(triggered_by_explosion && !override_bonus)
74+
mineralAmt += 2 //bonus if it was exploded, USE EXPLOSIVES WOOO
7275
new mineralType(src, mineralAmt)
7376
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
7477
for(var/obj/effect/temp_visual/mining_overlay/M in src)
@@ -80,17 +83,33 @@
8083
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
8184
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
8285

86+
/turf/closed/mineral/proc/attempt_drill(mob/user,triggered_by_explosion = FALSE, power = 1)
87+
hardness -= power
88+
if(hardness <= 0)
89+
gets_drilled(user,triggered_by_explosion)
90+
else
91+
update_icon()
92+
93+
/turf/closed/mineral/proc/update_icon()
94+
if(hardness != initial(hardness))
95+
var/mutable_appearance/cracks = mutable_appearance('icons/turf/mining.dmi',"rock_cracks",ON_EDGED_TURF_LAYER)
96+
var/matrix/M = new
97+
M.Translate(4,4)
98+
cracks.transform = M
99+
add_overlay(cracks)
100+
101+
83102
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
84103
if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS))
85-
gets_drilled()
104+
attempt_drill()
86105
..()
87106

88107
/turf/closed/mineral/attack_alien(mob/living/carbon/alien/M)
89108
to_chat(M, span_notice("You start digging into the rock..."))
90109
playsound(src, 'sound/effects/break_stone.ogg', 50, 1)
91110
if(do_after(M, 4 SECONDS, target = src))
92111
to_chat(M, span_notice("You tunnel into the rock."))
93-
gets_drilled(M)
112+
attempt_drill(M)
94113

95114
/turf/closed/mineral/Bumped(atom/movable/AM)
96115
..()
@@ -116,12 +135,16 @@
116135
switch(severity)
117136
if(3)
118137
if (prob(75))
119-
gets_drilled(null, 1)
138+
attempt_drill(null,TRUE,2)
139+
else if(prob(90))
140+
attempt_drill(null,TRUE,1)
120141
if(2)
121142
if (prob(90))
122-
gets_drilled(null, 1)
143+
attempt_drill(null,TRUE,2)
144+
else
145+
attempt_drill(null,TRUE,1)
123146
if(1)
124-
gets_drilled(null, 1)
147+
attempt_drill(null,TRUE,3)
125148
return
126149

127150
/turf/closed/mineral/Spread(turf/T)
@@ -153,7 +176,7 @@
153176

154177
if(T && ismineralturf(T))
155178
var/turf/closed/mineral/M = T
156-
M.mineralAmt = rand(1, 5)
179+
M.mineralAmt = rand(1, 5) + max(0,((hardness - 1) * 2)) //2 bonus ore for every hardness above 1
157180
M.environment_type = src.environment_type
158181
M.turf_type = src.turf_type
159182
M.baseturfs = src.baseturfs
@@ -243,6 +266,17 @@
243266
baseturfs = /turf/open/floor/plating/asteroid/basalt/icemoon
244267
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
245268

269+
/turf/closed/mineral/random/volcanic/hard
270+
name = "hardened basalt"
271+
icon_state = "rock_hard"
272+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
273+
mineralChance = 15
274+
hardness = 2
275+
276+
mineralSpawnChanceList = list(
277+
/turf/closed/mineral/uranium/volcanic/hard = 5, /turf/closed/mineral/diamond/volcanic/hard = 1, /turf/closed/mineral/gold/volcanic/hard = 10, /turf/closed/mineral/titanium/volcanic/hard = 11, /turf/closed/mineral/magmite/volcanic/hard = 0.5,
278+
/turf/closed/mineral/silver/volcanic/hard = 12, /turf/closed/mineral/plasma/volcanic/hard = 20, /turf/closed/mineral/iron/volcanic/hard = 20, /turf/closed/mineral/dilithium/volcanic/hard = 2, /turf/closed/mineral/gibtonite/volcanic/hard = 4, /turf/closed/mineral/bscrystal/volcanic/hard = 2, /turf/open/floor/plating/asteroid/airless/cave/volcanic = 1)
279+
246280
/turf/closed/mineral/random/snow
247281
name = "snowy mountainside"
248282
icon = 'icons/turf/mining.dmi'
@@ -308,6 +342,10 @@
308342
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
309343
defer_change = TRUE
310344

345+
/turf/closed/mineral/iron/volcanic/hard
346+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
347+
hardness = 2
348+
311349
/turf/closed/mineral/iron/ice
312350
environment_type = "snow_cavern"
313351
icon_state = "icerock_iron"
@@ -336,6 +374,10 @@
336374
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
337375
defer_change = TRUE
338376

377+
/turf/closed/mineral/uranium/volcanic/hard
378+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
379+
hardness = 2
380+
339381
/turf/closed/mineral/uranium/ice
340382
environment_type = "snow_cavern"
341383
icon_state = "icerock_Uranium"
@@ -364,6 +406,10 @@
364406
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
365407
defer_change = TRUE
366408

409+
/turf/closed/mineral/diamond/volcanic/hard
410+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
411+
hardness = 2
412+
367413
/turf/closed/mineral/diamond/ice
368414
environment_type = "snow_cavern"
369415
icon_state = "icerock_diamond"
@@ -392,6 +438,10 @@
392438
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
393439
defer_change = TRUE
394440

441+
/turf/closed/mineral/gold/volcanic/hard
442+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
443+
hardness = 2
444+
395445
/turf/closed/mineral/gold/ice
396446
environment_type = "snow_cavern"
397447
icon_state = "icerock_gold"
@@ -420,6 +470,10 @@
420470
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
421471
defer_change = TRUE
422472

473+
/turf/closed/mineral/silver/volcanic/hard
474+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
475+
hardness = 2
476+
423477
/turf/closed/mineral/silver/ice
424478
environment_type = "snow_cavern"
425479
icon_state = "icerock_silver"
@@ -448,6 +502,10 @@
448502
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
449503
defer_change = TRUE
450504

505+
/turf/closed/mineral/titanium/volcanic/hard
506+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
507+
hardness = 2
508+
451509
/turf/closed/mineral/titanium/ice
452510
environment_type = "snow_cavern"
453511
icon_state = "icerock_titanium"
@@ -476,6 +534,10 @@
476534
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
477535
defer_change = TRUE
478536

537+
/turf/closed/mineral/plasma/volcanic/hard
538+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
539+
hardness = 2
540+
479541
/turf/closed/mineral/plasma/ice
480542
environment_type = "snow_cavern"
481543
icon_state = "icerock_plasma"
@@ -528,6 +590,10 @@
528590
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
529591
defer_change = TRUE
530592

593+
/turf/closed/mineral/bscrystal/volcanic/hard
594+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
595+
hardness = 2
596+
531597
/turf/closed/mineral/bscrystal/ice
532598
environment_type = "snow_cavern"
533599
icon_state = "icerock_BScrystal"
@@ -555,6 +621,9 @@
555621
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
556622
defer_change = TRUE
557623

624+
/turf/closed/mineral/volcanic/lava_land_surface/hard
625+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
626+
558627
/turf/closed/mineral/ash_rock //wall piece
559628
name = "rock"
560629
icon = 'icons/turf/mining.dmi'
@@ -674,7 +743,7 @@
674743
det_time = 0
675744
visible_message(span_notice("The chain reaction was stopped! The gibtonite had [det_time] reactions left till the explosion!"))
676745

677-
/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = 0)
746+
/turf/closed/mineral/gibtonite/attempt_drill(mob/user, triggered_by_explosion = 0)
678747
if(stage == GIBTONITE_UNSTRUCK && mineralAmt >= 1) //Gibtonite deposit is activated
679748
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
680749
explosive_reaction(user, triggered_by_explosion)
@@ -707,6 +776,10 @@
707776
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
708777
defer_change = TRUE
709778

779+
/turf/closed/mineral/gibtonite/volcanic/hard
780+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
781+
hardness = 2
782+
710783
/turf/closed/mineral/gibtonite/ice
711784
environment_type = "snow_cavern"
712785
icon_state = "icerock_Gibtonite"
@@ -720,3 +793,25 @@
720793
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
721794
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
722795
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
796+
797+
/turf/closed/mineral/magmite
798+
mineralType = /obj/item/magmite
799+
spread = 0
800+
scan_state = "rock_Magmite"
801+
802+
/turf/closed/mineral/magmite/gets_drilled(mob/user, triggered_by_explosion = FALSE)
803+
if(!triggered_by_explosion)
804+
mineralAmt = 0
805+
..(user,triggered_by_explosion,TRUE)
806+
807+
/turf/closed/mineral/magmite/volcanic
808+
environment_type = "basalt"
809+
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
810+
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
811+
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
812+
defer_change = TRUE
813+
814+
/turf/closed/mineral/magmite/volcanic/hard
815+
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
816+
hardness = 2
817+

code/modules/mining/equipment/kinetic_crusher.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
if(ismineralturf(target_turf))
155155
var/turf/closed/mineral/M = target_turf
156156
new /obj/effect/temp_visual/kinetic_blast(M)
157-
M.gets_drilled(firer)
157+
M.attempt_drill(firer)
158158
..()
159159

160160
//trophies
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/obj/item/grenade/plastic/miningcharge
2+
name = "mining charge"
3+
desc = "Used to make big holes in rocks. Only works on rocks!"
4+
icon_state = "mining-charge"
5+
det_time = 5 //uses real world seconds cause screw you i guess
6+
boom_sizes = list(1,2,4)
7+
alert_admins = FALSE
8+
9+
/obj/item/grenade/plastic/miningcharge/Initialize()
10+
. = ..()
11+
plastic_overlay = mutable_appearance(icon, "[icon_state]_active", ON_EDGED_TURF_LAYER)
12+
13+
/obj/item/grenade/plastic/miningcharge/attack_self(mob/user)
14+
if(nadeassembly)
15+
nadeassembly.attack_self(user)
16+
17+
/obj/item/grenade/plastic/miningcharge/afterattack(atom/movable/AM, mob/user, flag)
18+
if(ismineralturf(AM))
19+
..()
20+
else
21+
to_chat(user,span_warning("The charge only works on rocks!"))
22+
23+
/obj/item/grenade/plastic/miningcharge/prime()
24+
var/turf/closed/mineral/location = get_turf(target)
25+
location.attempt_drill(null,TRUE,3) //orange says it doesnt include the actual middle
26+
for(var/turf/closed/mineral/rock in orange(boom_sizes[3],location))
27+
var/distance = get_dist(location,rock)
28+
if(distance <= boom_sizes[1])
29+
rock.attempt_drill(null,TRUE,3)
30+
else if (distance <= boom_sizes[2])
31+
rock.attempt_drill(null,TRUE,2)
32+
else if (distance <= boom_sizes[3])
33+
rock.attempt_drill(null,TRUE,1)
34+
qdel(src)
35+
36+
/obj/item/grenade/plastic/miningcharge/deconstruct(disassembled = TRUE) //no gibbing a miner with pda bombs
37+
if(!QDELETED(src))
38+
qdel(src)

code/modules/mining/equipment/resonator.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
if(ismineralturf(T))
9898
var/turf/closed/mineral/M = T
9999
replicate(M)
100-
M.gets_drilled(creator)
100+
M.attempt_drill(creator)
101101
check_pressure(T)
102102
playsound(T,'sound/weapons/resonator_blast.ogg',50,1)
103103
for(var/mob/living/L in T)

0 commit comments

Comments
 (0)