Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
9f89217
mining ayyy
ToasterBiome Jan 29, 2022
0e4efbb
default power is 1 + fix plasma cutter
ToasterBiome Jan 30, 2022
37d90c0
mining charges + hardness changes + lightens icon
ToasterBiome Feb 3, 2022
d5d4078
admins
ToasterBiome Feb 3, 2022
4e521e4
Update minerals.dm
ToasterBiome Feb 4, 2022
05aa605
Update minerals.dm
ToasterBiome Feb 4, 2022
b42ece4
Update minerals.dm
ToasterBiome Feb 4, 2022
c427698
Update mining_charges.dm
ToasterBiome Feb 4, 2022
bb3cf62
Update minerals.dm
ToasterBiome Feb 4, 2022
1046543
upgrades
ToasterBiome Feb 11, 2022
d4a2fcf
fixes bugs
ToasterBiome Feb 11, 2022
36d3076
Update world_anvil.dm
ToasterBiome Feb 12, 2022
9e99453
ow
ToasterBiome Feb 12, 2022
8eb5814
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 14, 2022
cdfe35e
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 14, 2022
86a319e
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 14, 2022
a66f18d
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 14, 2022
d3dd91b
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 14, 2022
9d4db17
Update code/modules/mining/equipment/mining_charges.dm
ToasterBiome Feb 14, 2022
14f8a30
fixes stuff
ToasterBiome Feb 15, 2022
45b7c42
Update code/modules/mining/lavaland/world_anvil.dm
ToasterBiome Feb 17, 2022
c77d7a3
bad cowbot
ToasterBiome Feb 18, 2022
a345f29
fixingg buggsss
ToasterBiome Feb 19, 2022
2b37ef2
Update kinetic_accelerator.dm
ToasterBiome Feb 19, 2022
46d2dbc
new spritz
ToasterBiome Feb 27, 2022
e75eaa4
no free c4
ToasterBiome Feb 27, 2022
ae8a5bb
Update energy.dmi
ToasterBiome Feb 28, 2022
397a810
Update mining_charges.dm
ToasterBiome Mar 1, 2022
778c5d8
Merge branch 'master' into hardrockhotel
ToasterBiome Mar 10, 2022
2466a77
Update resonator.dm
ToasterBiome Mar 10, 2022
4feaf03
Update resonator.dm
ToasterBiome Mar 10, 2022
e1a64dc
inhands
ToasterBiome Mar 11, 2022
c8eb06d
adv plasmacutter inhand sure
ToasterBiome Mar 11, 2022
2b75935
Update world_anvil.dm
ToasterBiome Mar 14, 2022
82e4ec9
no ghosts
ToasterBiome Mar 21, 2022
fce0440
Update minerals.dm
ToasterBiome Mar 21, 2022
1f2366e
yeah this is probably fine
ToasterBiome Mar 22, 2022
4e1ac8a
Update mining_charges.dm
ToasterBiome Mar 23, 2022
15cb19f
Update mining_charges.dm
ToasterBiome Mar 23, 2022
8c19977
Update mining_charges.dm
ToasterBiome Mar 25, 2022
ebf3e66
Update mining_charges.dm
ToasterBiome Mar 25, 2022
af5efd6
Update world_anvil.dm
ToasterBiome Mar 26, 2022
065c044
Merge branch 'hardrockhotel' of https://github.com/ToasterBiome/Yogst…
ToasterBiome Mar 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19,456 changes: 9,779 additions & 9,677 deletions _maps/map_files/mining/Lavaland.dmm

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions code/game/mecha/equipment/tools/mining_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
/turf/closed/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill)
for(var/turf/closed/mineral/M in range(drill.chassis,1))
if(get_dir(drill.chassis,M)&drill.chassis.dir)
M.gets_drilled()
M.attempt_drill()
drill.log_message("Drilled through [src]", LOG_MECHA)
drill.move_ores()

Expand Down Expand Up @@ -167,4 +167,4 @@
mineral_scan_pulse(get_turf(src))

#undef DRILL_BASIC
#undef DRILL_HARDENED
#undef DRILL_HARDENED
9 changes: 6 additions & 3 deletions code/game/objects/items/grenades/plastic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
var/boom_sizes = list(0, 0, 3)
var/can_attach_mob = FALSE
var/full_damage_on_mobs = FALSE
var/alert_admins = TRUE

/obj/item/grenade/plastic/Initialize()
. = ..()
Expand Down Expand Up @@ -101,7 +102,7 @@
det_time = newtime
to_chat(user, "Timer set for [det_time] seconds.")

/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag)
/obj/item/grenade/plastic/afterattack(atom/movable/AM, mob/user, flag, notify_ghosts = TRUE)
. = ..()
aim_dir = get_dir(user,AM)
if(!flag)
Expand All @@ -120,10 +121,12 @@
return
target = AM

message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_VERBOSEJMP(target)] with [det_time] second fuse")
if(alert_admins)
message_admins("[ADMIN_LOOKUPFLW(user)] planted [name] on [target.name] at [ADMIN_VERBOSEJMP(target)] with [det_time] second fuse")
log_game("[key_name(user)] planted [name] on [target.name] at [AREACOORD(user)] with a [det_time] second fuse")

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

moveToNullspace() //Yep

Expand Down
3 changes: 3 additions & 0 deletions code/game/turfs/simulated/floor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
/turf/open/floor/proc/gets_drilled()
return

/turf/open/floor/proc/attempt_drilled()
return

/turf/open/floor/proc/break_tile_to_plating()
var/turf/open/floor/plating/T = make_plating()
if(!istype(T))
Expand Down
113 changes: 104 additions & 9 deletions code/game/turfs/simulated/minerals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
var/scan_state = "" //Holder for the image we display when we're pinged by a mining scanner
var/defer_change = FALSE
var/hardness = 1 //how hard the material is, we'll have to have more powerful stuff if we want to blast harder materials.

/turf/closed/mineral/Initialize()
if (!canSmoothWith)
Expand Down Expand Up @@ -62,13 +63,15 @@
if(I.use_tool(src, user, 40, volume=50))
if(ismineralturf(src))
to_chat(user, span_notice("You finish cutting into the rock."))
gets_drilled(user)
attempt_drill(user)
SSblackbox.record_feedback("tally", "pick_used_mining", 1, I.type)
else
return attack_hand(user)

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

/turf/closed/mineral/proc/attempt_drill(mob/user,triggered_by_explosion = FALSE, power = 1)
hardness -= power
if(hardness <= 0)
gets_drilled(user,triggered_by_explosion)
else
update_icon()

/turf/closed/mineral/proc/update_icon()
if(hardness != initial(hardness))
var/mutable_appearance/cracks = mutable_appearance('icons/turf/mining.dmi',"rock_cracks",ON_EDGED_TURF_LAYER)
var/matrix/M = new
M.Translate(4,4)
cracks.transform = M
add_overlay(cracks)


/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS))
gets_drilled()
attempt_drill()
..()

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

/turf/closed/mineral/Bumped(atom/movable/AM)
..()
Expand All @@ -116,12 +135,16 @@
switch(severity)
if(3)
if (prob(75))
gets_drilled(null, 1)
attempt_drill(null,TRUE,2)
else if(prob(90))
attempt_drill(null,TRUE,1)
if(2)
if (prob(90))
gets_drilled(null, 1)
attempt_drill(null,TRUE,2)
else
attempt_drill(null,TRUE,1)
if(1)
gets_drilled(null, 1)
attempt_drill(null,TRUE,3)
return

/turf/closed/mineral/Spread(turf/T)
Expand Down Expand Up @@ -153,7 +176,7 @@

if(T && ismineralturf(T))
var/turf/closed/mineral/M = T
M.mineralAmt = rand(1, 5)
M.mineralAmt = rand(1, 5) + max(0,((hardness - 1) * 2)) //2 bonus ore for every hardness above 1
M.environment_type = src.environment_type
M.turf_type = src.turf_type
M.baseturfs = src.baseturfs
Expand Down Expand Up @@ -243,6 +266,17 @@
baseturfs = /turf/open/floor/plating/asteroid/basalt/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS

/turf/closed/mineral/random/volcanic/hard
name = "hardened basalt"
icon_state = "rock_hard"
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
mineralChance = 15
hardness = 2

mineralSpawnChanceList = list(
/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,
/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)

/turf/closed/mineral/random/snow
name = "snowy mountainside"
icon = 'icons/turf/mining.dmi'
Expand Down Expand Up @@ -308,6 +342,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/iron/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/iron/ice
environment_type = "snow_cavern"
icon_state = "icerock_iron"
Expand Down Expand Up @@ -336,6 +374,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/uranium/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/uranium/ice
environment_type = "snow_cavern"
icon_state = "icerock_Uranium"
Expand Down Expand Up @@ -364,6 +406,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/diamond/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/diamond/ice
environment_type = "snow_cavern"
icon_state = "icerock_diamond"
Expand Down Expand Up @@ -392,6 +438,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/gold/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/gold/ice
environment_type = "snow_cavern"
icon_state = "icerock_gold"
Expand Down Expand Up @@ -420,6 +470,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/silver/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/silver/ice
environment_type = "snow_cavern"
icon_state = "icerock_silver"
Expand Down Expand Up @@ -448,6 +502,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/titanium/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/titanium/ice
environment_type = "snow_cavern"
icon_state = "icerock_titanium"
Expand Down Expand Up @@ -476,6 +534,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/plasma/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/plasma/ice
environment_type = "snow_cavern"
icon_state = "icerock_plasma"
Expand Down Expand Up @@ -528,6 +590,10 @@
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/bscrystal/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/bscrystal/ice
environment_type = "snow_cavern"
icon_state = "icerock_BScrystal"
Expand Down Expand Up @@ -555,6 +621,9 @@
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
defer_change = TRUE

/turf/closed/mineral/volcanic/lava_land_surface/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'

/turf/closed/mineral/ash_rock //wall piece
name = "rock"
icon = 'icons/turf/mining.dmi'
Expand Down Expand Up @@ -674,7 +743,7 @@
det_time = 0
visible_message(span_notice("The chain reaction was stopped! The gibtonite had [det_time] reactions left till the explosion!"))

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

/turf/closed/mineral/gibtonite/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

/turf/closed/mineral/gibtonite/ice
environment_type = "snow_cavern"
icon_state = "icerock_Gibtonite"
Expand All @@ -720,3 +793,25 @@
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
initial_gas_mix = ICEMOON_DEFAULT_ATMOS

/turf/closed/mineral/magmite
mineralType = /obj/item/magmite
spread = 0
scan_state = "rock_Magmite"

/turf/closed/mineral/magmite/gets_drilled(mob/user, triggered_by_explosion = FALSE)
if(!triggered_by_explosion)
mineralAmt = 0
..(user,triggered_by_explosion,TRUE)

/turf/closed/mineral/magmite/volcanic
environment_type = "basalt"
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
defer_change = TRUE

/turf/closed/mineral/magmite/volcanic/hard
smooth_icon = 'icons/turf/smoothrocks_hard.dmi'
hardness = 2

2 changes: 1 addition & 1 deletion code/modules/mining/equipment/kinetic_crusher.dm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
if(ismineralturf(target_turf))
var/turf/closed/mineral/M = target_turf
new /obj/effect/temp_visual/kinetic_blast(M)
M.gets_drilled(firer)
M.attempt_drill(firer)
..()

//trophies
Expand Down
45 changes: 45 additions & 0 deletions code/modules/mining/equipment/mining_charges.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/obj/item/grenade/plastic/miningcharge
name = "mining charge"
desc = "Used to make big holes in rocks. Only works on rocks!"
icon_state = "mining-charge"
det_time = 5 //uses real world seconds cause screw you i guess
boom_sizes = list(1,3,5)
alert_admins = FALSE

/obj/item/grenade/plastic/miningcharge/Initialize()
. = ..()
plastic_overlay = mutable_appearance(icon, "[icon_state]_active", ON_EDGED_TURF_LAYER)

/obj/item/grenade/plastic/miningcharge/attack_self(mob/user)
if(nadeassembly)
nadeassembly.attack_self(user)

/obj/item/grenade/plastic/miningcharge/afterattack(atom/movable/AM, mob/user, flag, notify_ghosts = FALSE)
if(ismineralturf(AM))
..()
else
to_chat(user,span_warning("The charge only works on rocks!"))

/obj/item/grenade/plastic/miningcharge/prime()
var/turf/closed/mineral/location = get_turf(target)
location.attempt_drill(null,TRUE,3) //orange says it doesnt include the actual middle
for(var/turf/closed/mineral/rock in circlerangeturfs(location,boom_sizes[3]))
var/distance = get_dist_euclidian(location,rock)
if(distance <= boom_sizes[1])
rock.attempt_drill(null,TRUE,3)
else if (distance <= boom_sizes[2])
rock.attempt_drill(null,TRUE,2)
else if (distance <= boom_sizes[3])
rock.attempt_drill(null,TRUE,1)
for(var/mob/living/carbon/C in circlerange(location,boom_sizes[3]))
if(ishuman(C) && C.soundbang_act(1, 0))
to_chat(C, span_warning("<font size='2'><b>You are knocked down by the power of the mining charge!</font></b>"))
var/distance = get_dist_euclidian(location,C)
C.Knockdown((boom_sizes[3] - distance) * 1 SECONDS) //1 second for how close you are to center if you're in range
C.adjustEarDamage(0, (boom_sizes[3] - distance) * 5) //5 ear damage for every tile you're closer to the center
qdel(src)


/obj/item/grenade/plastic/miningcharge/deconstruct(disassembled = TRUE) //no gibbing a miner with pda bombs
if(!QDELETED(src))
qdel(src)
2 changes: 1 addition & 1 deletion code/modules/mining/equipment/resonator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
if(ismineralturf(T))
var/turf/closed/mineral/M = T
replicate(M)
M.gets_drilled(creator)
M.attempt_drill(creator)
check_pressure(T)
playsound(T,'sound/weapons/resonator_blast.ogg',50,1)
for(var/mob/living/L in T)
Expand Down
Loading