Merge pull request #2096 from Neerti/7/10/2016_mining_booms

Explosive Mining!
This commit is contained in:
EmperorJon
2016-07-10 13:26:19 +01:00
committed by GitHub
2 changed files with 59 additions and 0 deletions

View File

@@ -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

View File

@@ -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."