#define MINING_MESSAGE_COOLDOWN 20 /**********************Mineral deposits**************************/ /turf/closed/mineral //wall piece name = "rock" icon = 'icons/turf/mining.dmi' icon_state = "rock" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = null baseturfs = /turf/open/floor/plating/asteroid/airless initial_gas_mix = AIRLESS_ATMOS opacity = TRUE density = TRUE blocks_air = TRUE layer = EDGED_TURF_LAYER initial_temperature = 293.15 // base_icon_state = "smoothrocks" var/smooth_icon = 'icons/turf/smoothrocks.dmi' var/environment_type = "asteroid" var/turf/open/floor/plating/turf_type = /turf/open/floor/plating/asteroid/airless var/obj/item/stack/ore/mineralType = null var/mineralAmt = 3 var/last_act = 0 var/scan_state = "" //Holder for the image we display when we're pinged by a mining scanner var/defer_change = 0 // If true you can mine the mineral turf with your hands var/weak_turf = FALSE /turf/closed/mineral/Initialize(mapload) if (!canSmoothWith) canSmoothWith = list(/turf/closed/mineral, /turf/closed/indestructible) . = ..() var/matrix/M = new M.Translate(-4, -4) transform = M icon = smooth_icon /turf/closed/mineral/proc/Spread_Vein() var/spreadChance = initial(mineralType.spreadChance) if(spreadChance) for(var/dir in GLOB.cardinals) if(prob(spreadChance)) var/turf/T = get_step(src, dir) var/turf/closed/mineral/random/M = T if(istype(M) && !M.mineralType) M.Change_Ore(mineralType) /turf/closed/mineral/proc/Change_Ore(ore_type, random = 0) if(random) mineralAmt = rand(1, 5) if(ispath(ore_type, /obj/item/stack/ore)) //If it has a scan_state, switch to it var/obj/item/stack/ore/the_ore = ore_type scan_state = initial(the_ore.scan_state) // I SAID. SWITCH. TO. IT. mineralType = ore_type // Everything else assumes that this is typed correctly so don't set it to non-ores thanks. //GS13 EDIT, XENOARCH if(ispath(ore_type, /obj/item/strangerock)) mineralType = ore_type /turf/closed/mineral/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) if(turf_type) underlay_appearance.icon = initial(turf_type.icon) underlay_appearance.icon_state = initial(turf_type.icon_state) return TRUE return ..() /turf/closed/mineral/attackby(obj/item/pickaxe/I, mob/user, params) if (!user.IsAdvancedToolUser()) to_chat(usr, "You don't have the dexterity to do this!") return if(I.tool_behaviour == TOOL_MINING) var/turf/T = user.loc if (!isturf(T)) return if(last_act + (40 * I.toolspeed) > world.time)//prevents message spam return last_act = world.time to_chat(user, "You start picking...") if(I.use_tool(src, user, 40, volume=50)) var/range = I.digrange //Store the current digrange so people don't cheese digspeed swapping for faster mining var/list/dug_tiles = list() if(ismineralturf(src)) if(I.digrange > 0) for(var/turf/closed/mineral/M in range(user,range)) if(get_dir(user,M) & user.dir) M.gets_drilled(user) dug_tiles += M to_chat(user, "You finish cutting into the rock.") if(!(src in dug_tiles)) gets_drilled(user) SSblackbox.record_feedback("tally", "pick_used_mining", 1, I.type) else return attack_hand(user) /turf/closed/mineral/attack_hand(mob/user) if(!weak_turf) return ..() var/turf/user_turf = user.loc if (!isturf(user_turf)) return if(last_act + MINING_MESSAGE_COOLDOWN > world.time)//prevents message spam return last_act = world.time to_chat(user, "You start pulling out pieces of [src] with your hands...") if(!do_after(user, 15 SECONDS, target = src)) return if(ismineralturf(src)) to_chat(user, "You finish pulling apart [src].") gets_drilled(user) /turf/closed/mineral/proc/gets_drilled(user, give_exp = FALSE) if (mineralType && (mineralAmt > 0)) new mineralType(src, mineralAmt) SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType) // if(ishuman(user)) // var/mob/living/carbon/human/H = user // if(give_exp) // if (mineralType && (mineralAmt > 0)) // H.mind.adjust_experience(/datum/skill/mining, initial(mineralType.mine_experience) * mineralAmt) // else // H.mind.adjust_experience(/datum/skill/mining, 4) for(var/obj/effect/temp_visual/mining_overlay/M in src) qdel(M) var/flags = NONE if(defer_change) // TODO: make the defer change var a var for any changeturf flag flags = CHANGETURF_DEFER_CHANGE ScrapeAway(null, flags) addtimer(CALLBACK(src, PROC_REF(AfterChange)), 1, TIMER_UNIQUE) playsound(src, 'sound/effects/break_stone.ogg', 50, TRUE) //beautiful destruction /turf/closed/mineral/attack_animal(mob/living/simple_animal/user, list/modifiers) if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS)) gets_drilled(user) ..() /turf/closed/mineral/attack_alien(mob/living/carbon/alien/user, list/modifiers) to_chat(user, "You start digging into the rock...") playsound(src, 'sound/effects/break_stone.ogg', 50, TRUE) if(do_after(user, 4 SECONDS, target = src)) to_chat(user, "You tunnel into the rock.") gets_drilled(user) /turf/closed/mineral/attack_hulk(mob/living/carbon/human/H) ..() if(do_after(H, 50, target = src)) playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) H.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk") gets_drilled(H) return TRUE /turf/closed/mineral/Bumped(atom/movable/AM) ..() if(ishuman(AM)) var/mob/living/carbon/human/H = AM var/obj/item/I = H.is_holding_tool_quality(TOOL_MINING) if(I) attackby(I, H) return else if(iscyborg(AM)) var/mob/living/silicon/robot/R = AM if(R.module_active && R.module_active.tool_behaviour == TOOL_MINING) attackby(R.module_active, R) return else return /turf/closed/mineral/acid_melt() ScrapeAway() /turf/closed/mineral/ex_act(severity, target, origin) ..() switch(severity) if(3) if (prob(75)) gets_drilled(null, FALSE) if(2) if (prob(90)) gets_drilled(null, FALSE) if(1) gets_drilled(null, FALSE) return /turf/closed/mineral/random var/list/mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /obj/item/stack/ore/titanium = 11, /turf/closed/mineral/gibtonite = 4, /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/stack/ore/calorite = 1, /obj/item/strangerock = 5) //Currently, Adamantine won't spawn as it has no uses. -Durandan var/mineralChance = 13 /turf/closed/mineral/random/Initialize(mapload) mineralSpawnChanceList = typelist("mineralSpawnChanceList", mineralSpawnChanceList) . = ..() if (prob(mineralChance)) var/path = pickweight(mineralSpawnChanceList) if(ispath(path, /turf)) var/stored_flags = 0 if(flags_1 & NO_RUINS_1) stored_flags |= NO_RUINS_1 var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR) T.flags_1 |= stored_flags T.baseturfs = src.baseturfs if(ismineralturf(T)) var/turf/closed/mineral/M = T M.turf_type = src.turf_type M.mineralAmt = rand(1, 5) M.environment_type = src.environment_type src = M M.levelupdate() else src = T T.levelupdate() else Change_Ore(path, 1) Spread_Vein(path) /turf/closed/mineral/random/high_chance icon_state = "rock_highchance" mineralChance = 25 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45, /obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20, /obj/item/strangerock = 10, /obj/item/stack/ore/calorite = 20,) //GS13 EDIT /turf/closed/mineral/random/high_chance/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 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45, /obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20, /obj/item/strangerock = 10, /obj/item/stack/ore/calorite = 20,) //GS13 EDIT /turf/closed/mineral/random/low_chance icon_state = "rock_lowchance" mineralChance = 6 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 2, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 4, /obj/item/stack/ore/titanium = 4, /obj/item/stack/ore/silver = 6, /obj/item/stack/ore/plasma = 15, /obj/item/stack/ore/iron = 40, /turf/closed/mineral/gibtonite = 2, /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/strangerock = 5, /obj/item/stack/ore/calorite = 1,) //GS13 EDIT /turf/closed/mineral/random/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 mineralChance = 10 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11, /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /turf/closed/mineral/gibtonite/volcanic = 4, /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/strangerock = 5, /obj/item/stack/ore/calorite = 1,) //GS13 EDIT /turf/closed/mineral/random/snow name = "snowy mountainside" icon = 'icons/turf/mining.dmi' smooth_icon = 'icons/turf/walls/mountain_wall.dmi' icon_state = "mountainrock" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = list (/turf/closed) defer_change = TRUE environment_type = "snow" turf_type = /turf/open/floor/plating/asteroid/snow/icemoon baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS weak_turf = TRUE /turf/closed/mineral/random/snow/Change_Ore(ore_type, random = 0) . = ..() if(mineralType) smooth_icon = 'icons/turf/walls/icerock_wall.dmi' icon = 'icons/turf/walls/icerock_wall.dmi' icon_state = "icerock_wall-0" // base_icon_state = "icerock_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER /turf/closed/mineral/random/snow mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11, /obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /turf/closed/mineral/gibtonite/ice/icemoon = 4, /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/strangerock = 3, /obj/item/stack/ore/calorite = 1,) //GS13 EDIT /turf/closed/mineral/random/snow/underground baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon // abundant ore mineralChance = 20 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 10, /obj/item/stack/ore/diamond = 4, /obj/item/stack/ore/gold = 20, /obj/item/stack/ore/titanium = 22, /obj/item/stack/ore/silver = 24, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 20, /obj/item/stack/ore/bananium = 1, /turf/closed/mineral/gibtonite/ice/icemoon = 8, /obj/item/stack/ore/bluespace_crystal = 2, /obj/item/strangerock = 6, /obj/item/stack/ore/calorite = 2,) //GS13 EDIT /turf/closed/mineral/random/snow/high_chance mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45, /obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20, /obj/item/stack/ore/calorite = 20,) //GS13 EDIT /turf/closed/mineral/random/labormineral icon_state = "rock_labor" mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8, /obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/iron = 95, /turf/closed/mineral/gibtonite = 2) /turf/closed/mineral/random/labormineral/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 mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8, /obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/bluespace_crystal = 1, /turf/closed/mineral/gibtonite/volcanic = 2, /obj/item/stack/ore/iron = 95) // Subtypes for mappers placing ores manually. /turf/closed/mineral/random/labormineral/ice name = "snowy mountainside" icon = 'icons/turf/mining.dmi' smooth_icon = 'icons/turf/walls/mountain_wall.dmi' icon_state = "mountainrock" // base_icon_state = "mountain_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = list (/turf/closed) defer_change = TRUE environment_type = "snow" turf_type = /turf/open/floor/plating/asteroid/snow/icemoon baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS defer_change = TRUE mineralSpawnChanceList = list( /obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8, /obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/bluespace_crystal = 1, /turf/closed/mineral/gibtonite/volcanic = 2, /obj/item/stack/ore/iron = 95) /turf/closed/mineral/random/labormineral/ice/Change_Ore(ore_type, random = 0) . = ..() if(mineralType) smooth_icon = 'icons/turf/walls/icerock_wall.dmi' icon = 'icons/turf/walls/icerock_wall.dmi' icon_state = "icerock_wall-0" // base_icon_state = "icerock_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER /turf/closed/mineral/iron mineralType = /obj/item/stack/ore/iron scan_state = "rock_Iron" /turf/closed/mineral/iron/ice environment_type = "snow_cavern" icon_state = "icerock_iron" smooth_icon = 'icons/turf/walls/icerock_wall.dmi' // base_icon_state = "icerock_wall" // smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER turf_type = /turf/open/floor/plating/asteroid/snow/ice baseturfs = /turf/open/floor/plating/asteroid/snow/ice initial_gas_mix = FROZEN_ATMOS defer_change = TRUE /turf/closed/mineral/uranium mineralType = /obj/item/stack/ore/uranium scan_state = "rock_Uranium" /turf/closed/mineral/diamond mineralType = /obj/item/stack/ore/diamond scan_state = "rock_Diamond" /turf/closed/mineral/diamond/ice environment_type = "snow_cavern" icon_state = "icerock_diamond" smooth_icon = 'icons/turf/walls/icerock_wall.dmi' // base_icon_state = "icerock_wall" // smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER turf_type = /turf/open/floor/plating/asteroid/snow/ice baseturfs = /turf/open/floor/plating/asteroid/snow/ice initial_gas_mix = FROZEN_ATMOS defer_change = TRUE /turf/closed/mineral/gold mineralType = /obj/item/stack/ore/gold scan_state = "rock_Gold" /turf/closed/mineral/gold/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/silver mineralType = /obj/item/stack/ore/silver scan_state = "rock_Silver" /turf/closed/mineral/silver/ice/icemoon 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/titanium mineralType = /obj/item/stack/ore/titanium scan_state = "rock_Titanium" /turf/closed/mineral/plasma mineralType = /obj/item/stack/ore/plasma scan_state = "rock_Plasma" /turf/closed/mineral/plasma/ice environment_type = "snow_cavern" icon_state = "icerock_plasma" smooth_icon = 'icons/turf/walls/icerock_wall.dmi' // base_icon_state = "icerock_wall" // smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER turf_type = /turf/open/floor/plating/asteroid/snow/ice baseturfs = /turf/open/floor/plating/asteroid/snow/ice initial_gas_mix = FROZEN_ATMOS defer_change = TRUE /turf/closed/mineral/bananium mineralType = /obj/item/stack/ore/bananium mineralAmt = 3 scan_state = "rock_Bananium" /turf/closed/mineral/bscrystal mineralType = /obj/item/stack/ore/bluespace_crystal mineralAmt = 1 scan_state = "rock_BScrystal" /turf/closed/mineral/bscrystal/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/volcanic environment_type = "basalt" turf_type = /turf/open/floor/plating/asteroid/basalt baseturfs = /turf/open/floor/plating/asteroid/basalt initial_gas_mix = LAVALAND_DEFAULT_ATMOS /turf/closed/mineral/volcanic/lava_land_surface environment_type = "basalt" turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface defer_change = TRUE /turf/closed/mineral/ash_rock //wall piece name = "rock" icon = 'icons/turf/mining.dmi' smooth_icon = 'icons/turf/walls/rock_wall.dmi' icon_state = "rock2" // base_icon_state = "rock_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = list (/turf/closed) baseturfs = /turf/open/floor/plating/ashplanet/wateryrock initial_gas_mix = LAVALAND_DEFAULT_ATMOS environment_type = "waste" turf_type = /turf/open/floor/plating/ashplanet/rocky defer_change = TRUE /turf/closed/mineral/snowmountain name = "snowy mountainside" icon = 'icons/turf/mining.dmi' smooth_icon = 'icons/turf/walls/mountain_wall.dmi' icon_state = "mountainrock" // base_icon_state = "mountain_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = list (/turf/closed) baseturfs = /turf/open/floor/plating/asteroid/snow initial_gas_mix = FROZEN_ATMOS environment_type = "snow" turf_type = /turf/open/floor/plating/asteroid/snow defer_change = TRUE /turf/closed/mineral/snowmountain/icemoon turf_type = /turf/open/floor/plating/asteroid/snow/icemoon baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS /turf/closed/mineral/snowmountain/cavern name = "ice cavern rock" icon = 'icons/turf/mining.dmi' smooth_icon = 'icons/turf/walls/icerock_wall.dmi' icon_state = "icerock" // base_icon_state = "icerock_wall" smooth = SMOOTH_MORE|SMOOTH_BORDER canSmoothWith = list (/turf/closed) baseturfs = /turf/open/floor/plating/asteroid/snow/ice environment_type = "snow_cavern" turf_type = /turf/open/floor/plating/asteroid/snow/ice /turf/closed/mineral/snowmountain/cavern/icemoon baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon initial_gas_mix = ICEMOON_DEFAULT_ATMOS //GIBTONITE /turf/closed/mineral/gibtonite mineralAmt = 1 scan_state = "rock_Gibtonite" var/det_time = 8 //Countdown till explosion, but also rewards the player for how close you were to detonation when you defuse it var/stage = GIBTONITE_UNSTRUCK //How far into the lifecycle of gibtonite we are var/activated_ckey = null //These are to track who triggered the gibtonite deposit for logging purposes var/activated_name = null var/mutable_appearance/activated_overlay /turf/closed/mineral/gibtonite/Initialize(mapload) det_time = rand(8,10) //So you don't know exactly when the hot potato will explode . = ..() /turf/closed/mineral/gibtonite/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/mining_scanner) || istype(I, /obj/item/t_scanner/adv_mining_scanner) && stage == 1) user.visible_message("[user] holds [I] to [src]...", "You use [I] to locate where to cut off the chain reaction and attempt to stop it...") defuse() ..() /turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null, triggered_by_explosion = 0) if(stage == GIBTONITE_UNSTRUCK) activated_overlay = mutable_appearance('icons/turf/smoothrocks.dmi', "rock_Gibtonite_inactive", ON_EDGED_TURF_LAYER) //shows in gaps between pulses if there are any add_overlay(activated_overlay) name = "gibtonite deposit" desc = "An active gibtonite reserve. Run!" stage = GIBTONITE_ACTIVE visible_message("There's gibtonite inside! It's going to explode!") var/turf/bombturf = get_turf(src) var/notify_admins = !is_mining_level(z) if(!triggered_by_explosion) log_game("[key_name(user)] has triggered a gibtonite deposit reaction at [AREACOORD(bombturf)].") else log_game("An explosion has triggered a gibtonite deposit reaction at [AREACOORD(bombturf)]") countdown(notify_admins) /turf/closed/mineral/gibtonite/proc/countdown(notify_admins = FALSE) set waitfor = FALSE while(istype(src, /turf/closed/mineral/gibtonite) && stage == GIBTONITE_ACTIVE && det_time > 0 && mineralAmt >= 1) flick_overlay_view(image('icons/turf/smoothrocks.dmi', src, "rock_Gibtonite_active"), src, 5) //makes the animation pulse one time per tick det_time-- sleep(5) if(istype(src, /turf/closed/mineral/gibtonite)) if(stage == GIBTONITE_ACTIVE && det_time <= 0 && mineralAmt >= 1) var/turf/bombturf = get_turf(src) mineralAmt = 0 stage = GIBTONITE_DETONATE explosion(bombturf,1,3,5, adminlog = notify_admins) /turf/closed/mineral/gibtonite/proc/defuse() if(stage == GIBTONITE_ACTIVE) cut_overlay(activated_overlay) activated_overlay.icon_state = "rock_Gibtonite_inactive" add_overlay(activated_overlay) desc = "An inactive gibtonite reserve. The ore can be extracted." stage = GIBTONITE_STABLE if(det_time < 0) det_time = 0 visible_message("The chain reaction stopped! The gibtonite had [det_time] reactions left till the explosion!") /turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = FALSE) if(stage == GIBTONITE_UNSTRUCK && mineralAmt >= 1) //Gibtonite deposit is activated playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,TRUE) explosive_reaction(user, triggered_by_explosion) return if(stage == GIBTONITE_ACTIVE && mineralAmt >= 1) //Gibtonite deposit goes kaboom var/turf/bombturf = get_turf(src) mineralAmt = 0 stage = GIBTONITE_DETONATE explosion(bombturf,1,2,5, adminlog = FALSE) if(stage == GIBTONITE_STABLE) //Gibtonite deposit is now benign and extractable. Depending on how close you were to it blowing up before defusing, you get better quality ore. var/obj/item/gibtonite/G = new (src) if(det_time <= 0) G.quality = 3 G.icon_state = "Gibtonite ore 3" if(det_time >= 1 && det_time <= 2) G.quality = 2 G.icon_state = "Gibtonite ore 2" var/flags = NONE if(defer_change) flags = CHANGETURF_DEFER_CHANGE ScrapeAway(null, flags) addtimer(CALLBACK(src, PROC_REF(AfterChange)), 1, TIMER_UNIQUE) /turf/closed/mineral/gibtonite/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/gibtonite/ice environment_type = "snow_cavern" icon_state = "icerock_Gibtonite" smooth_icon = 'icons/turf/walls/icerock_wall.dmi' // base_icon_state = "icerock_wall" // smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER turf_type = /turf/open/floor/plating/asteroid/snow/ice baseturfs = /turf/open/floor/plating/asteroid/snow/ice initial_gas_mix = FROZEN_ATMOS defer_change = TRUE /turf/closed/mineral/gibtonite/ice/icemoon 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/strong name = "Very strong rock" desc = "Seems to be stronger than the other rocks in the area. Only a master of mining techniques could destroy this." 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 = 1 smooth_icon = 'icons/turf/walls/rock_wall.dmi' // base_icon_state = "rock_wall" // smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER // /turf/closed/mineral/strong/attackby(obj/item/I, mob/user, params) // if(!ishuman(user)) // to_chat(usr, "Only a more advanced species could break a rock such as this one!") // return FALSE // if(user.mind?.get_skill_level(/datum/skill/mining) >= SKILL_LEVEL_MASTER) // . = ..() // else // to_chat(usr, "The rock seems to be too strong to destroy. Maybe I can break it once I become a master miner.") /turf/closed/mineral/strong/gets_drilled(mob/user) if(!ishuman(user)) return // see attackby var/mob/living/carbon/human/H = user // if(!(H.mind?.get_skill_level(/datum/skill/mining) >= SKILL_LEVEL_MASTER)) // return drop_ores() H.client.give_award(/datum/award/achievement/skill/legendary_miner, H) var/flags = NONE if(defer_change) // TODO: make the defer change var a var for any changeturf flag flags = CHANGETURF_DEFER_CHANGE ScrapeAway(flags=flags) addtimer(CALLBACK(src, PROC_REF(AfterChange)), 1, TIMER_UNIQUE) playsound(src, 'sound/effects/break_stone.ogg', 50, TRUE) //beautiful destruction // H.mind?.adjust_experience(/datum/skill/mining, 100) //yay! /turf/closed/mineral/strong/proc/drop_ores() if(prob(10)) new /obj/item/stack/sheet/mineral/mythril(src, 5) else new /obj/item/stack/sheet/mineral/adamantine(src, 5) /turf/closed/mineral/strong/acid_melt() return /turf/closed/mineral/strong/ex_act(severity, target, origin) return #undef MINING_MESSAGE_COOLDOWN