diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm index 1c93444aad..6d460dd850 100644 --- a/code/modules/mining/mine_turfs.dm +++ b/code/modules/mining/mine_turfs.dm @@ -34,6 +34,19 @@ var/list/mining_overlay_cache = list() var/datum/artifact_find/artifact_find var/ignore_mapgen + var/ore_types = list( + "iron" = /obj/item/weapon/ore/iron, + "uranium" = /obj/item/weapon/ore/uranium, + "gold" = /obj/item/weapon/ore/gold, + "silver" = /obj/item/weapon/ore/silver, + "diamond" = /obj/item/weapon/ore/diamond, + "phoron" = /obj/item/weapon/ore/phoron, + "osmium" = /obj/item/weapon/ore/osmium, + "hydrogen" = /obj/item/weapon/ore/hydrogen, + "silicates" = /obj/item/weapon/ore/glass, + "carbonaceous rock" = /obj/item/weapon/ore/coal + ) + has_resources = 1 /turf/simulated/mineral/ignore_mapgen @@ -154,6 +167,16 @@ var/list/mining_overlay_cache = list() mined_ore = 2 //some of the stuff gets blown up GetDrilled() + if(severity <= 2) // Now to expose the ore lying under the sand. + spawn(1) // Otherwise most of the ore is lost to the explosion, which makes this rather moot. + var/losses = rand(0.5, 1) // Between 0% to 50% loss due to booms. + for(var/ore in resources) + var/amount_to_give = Ceiling(resources[ore] * losses) // Should result in at least one piece of ore. + for(var/i=1, i <= amount_to_give, i++) + var/oretype = ore_types[ore] + new oretype(src) + resources[ore] = 0 + /turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj) // Emitter blasts diff --git a/html/changelogs/Neerti-MiningBooms.yml b/html/changelogs/Neerti-MiningBooms.yml new file mode 100644 index 0000000000..c5123dc30e --- /dev/null +++ b/html/changelogs/Neerti-MiningBooms.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: Neerti + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Mining can now be done with explosives. The effectiveness depends on the spot chosen to explode, so using an ore scanner is advised."