mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into CraftingTable
Conflicts: code/modules/mob/living/carbon/human/human_defense.dm code/modules/power/cable.dm Fixing conflicts
This commit is contained in:
@@ -19,13 +19,12 @@
|
||||
/turf/simulated/mineral/ex_act(severity)
|
||||
switch(severity)
|
||||
if(3.0)
|
||||
return
|
||||
if (prob(75))
|
||||
src.gets_drilled()
|
||||
if(2.0)
|
||||
if (prob(70))
|
||||
src.mineralAmt -= 1 //some of the stuff gets blown up
|
||||
if (prob(90))
|
||||
src.gets_drilled()
|
||||
if(1.0)
|
||||
src.mineralAmt -= 2 //some of the stuff gets blown up
|
||||
src.gets_drilled()
|
||||
return
|
||||
|
||||
@@ -63,7 +62,7 @@
|
||||
|
||||
/turf/simulated/mineral/random
|
||||
name = "Mineral deposit"
|
||||
var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25/*, "Adamantine" =5*/, "Cave" = 1)//Currently, Adamantine won't spawn as it has no uses. -Durandan
|
||||
var/mineralSpawnChanceList = list("Uranium" = 5, "Iron" = 50, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Plasma" = 25, "Gibtonite" = 5/*, "Adamantine" =5*/, "Cave" = 1)//Currently, Adamantine won't spawn as it has no uses. -Durandan
|
||||
var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
|
||||
|
||||
/turf/simulated/mineral/random/New()
|
||||
@@ -88,7 +87,8 @@
|
||||
M = new/turf/simulated/mineral/plasma(src)
|
||||
if("Cave")
|
||||
new/turf/simulated/floor/plating/asteroid/airless/cave(src)
|
||||
|
||||
if("Gibtonite")
|
||||
M = new/turf/simulated/mineral/gibtonite(src)
|
||||
/*if("Adamantine")
|
||||
M = new/turf/simulated/mineral/adamantine(src)*/
|
||||
if(M)
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
/turf/simulated/mineral/random/high_chance
|
||||
mineralChance = 25
|
||||
mineralSpawnChanceList = list("Uranium" = 10, "Iron" = 30, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Plasma" = 25)
|
||||
mineralSpawnChanceList = list("Uranium" = 10, "Iron" = 30, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Plasma" = 25, "Gibtonite" = 8)
|
||||
|
||||
/turf/simulated/mineral/uranium
|
||||
name = "Uranium deposit"
|
||||
@@ -163,6 +163,92 @@
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
|
||||
////////////////////////////////Gibtonite
|
||||
/turf/simulated/mineral/gibtonite
|
||||
name = "Diamond deposit" //honk
|
||||
icon_state = "rock_Diamond"
|
||||
mineralName = "Gibtonite"
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
spread = 1
|
||||
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 = 0 //How far into the lifecycle of gibtonite we are, 0 is untouched, 1 is active and attempting to detonate, 2 is benign and ready for extraction
|
||||
var/activated_ckey = null //These are to track who triggered the gibtonite deposit for logging purposes
|
||||
var/activated_name = null
|
||||
|
||||
/turf/simulated/mineral/gibtonite/New()
|
||||
det_time = rand(8,10) //So you don't know exactly when the hot potato will explode
|
||||
..()
|
||||
|
||||
/turf/simulated/mineral/gibtonite/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/device/analyzer) && stage == 1)
|
||||
user.visible_message("<span class='notice'>You use the analyzer to locate where to cut off the chain reaction and attempt to stop it...</span>")
|
||||
defuse()
|
||||
if(istype(I, /obj/item/weapon/pickaxe))
|
||||
src.activated_ckey = "[user.ckey]"
|
||||
src.activated_name = "[user.name]"
|
||||
..()
|
||||
|
||||
/turf/simulated/mineral/gibtonite/proc/explosive_reaction()
|
||||
if(stage == 0)
|
||||
icon_state = "rock_Gibtonite_active"
|
||||
name = "Gibtonite deposit"
|
||||
desc = "An active gibtonite reserve. Run!"
|
||||
stage = 1
|
||||
visible_message("<span class='warning'>There was gibtonite inside! It's going to explode!</span>")
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/log_str = "[src.activated_ckey]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> [src.activated_name] has triggered a gibtonite deposit reaction <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>."
|
||||
log_game(log_str)
|
||||
countdown()
|
||||
|
||||
/turf/simulated/mineral/gibtonite/proc/countdown()
|
||||
spawn(0)
|
||||
while(stage == 1 && det_time > 0 && mineralAmt >= 1)
|
||||
det_time--
|
||||
sleep(5)
|
||||
if(stage == 1 && det_time <= 0 && mineralAmt >= 1)
|
||||
var/turf/bombturf = get_turf(src)
|
||||
mineralAmt = 0
|
||||
explosion(bombturf,1,3,5, adminlog = 0)
|
||||
if(stage == 0 || stage == 2)
|
||||
return
|
||||
|
||||
/turf/simulated/mineral/gibtonite/proc/defuse()
|
||||
if(stage == 1)
|
||||
icon_state = "rock_Gibtonite"
|
||||
desc = "An inactive gibtonite reserve. The ore can be extracted."
|
||||
stage = 2
|
||||
if(det_time < 0)
|
||||
det_time = 0
|
||||
visible_message("<span class='notice'>The chain reaction was stopped! The gibtonite had [src.det_time] reactions left till the explosion!</span>")
|
||||
|
||||
/turf/simulated/mineral/gibtonite/gets_drilled()
|
||||
if(stage == 0 && mineralAmt >= 1) //Gibtonite deposit is activated
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
|
||||
explosive_reaction()
|
||||
return
|
||||
if(stage == 1 && mineralAmt >= 1) //Gibtonite deposit goes kaboom
|
||||
var/turf/bombturf = get_turf(src)
|
||||
mineralAmt = 0
|
||||
explosion(bombturf,1,2,5, adminlog = 0)
|
||||
if(stage == 2) //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/weapon/twohanded/required/gibtonite/G = new /obj/item/weapon/twohanded/required/gibtonite/(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/turf/simulated/floor/plating/asteroid/airless/gibtonite_remains/G = ChangeTurf(/turf/simulated/floor/plating/asteroid/airless/gibtonite_remains)
|
||||
G.fullUpdateMineralOverlays()
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/airless/gibtonite_remains
|
||||
var/det_time = 0
|
||||
var/stage = 0
|
||||
|
||||
////////////////////////////////End Gibtonite
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/airless/cave
|
||||
var/length = 100
|
||||
|
||||
@@ -350,7 +436,7 @@
|
||||
if(3.0)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(70))
|
||||
if (prob(20))
|
||||
src.gets_dug()
|
||||
if(1.0)
|
||||
src.gets_dug()
|
||||
|
||||
@@ -60,10 +60,55 @@
|
||||
desc = "Completely useless"
|
||||
icon_state = "slag"
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite
|
||||
name = "Gibtonite ore"
|
||||
desc = "Extremely explosive if struck with mining equipment, Gibtonite is often used by miners to speed up their work by using it as a mining charge. This material is illegal to possess by unauthorized personnel under space law."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "Gibtonite ore"
|
||||
item_state = "Gibtonite ore"
|
||||
w_class = 4
|
||||
throw_range = 0
|
||||
anchored = 1 //Forces people to carry it by hand, no pulling!
|
||||
var/primed = 0
|
||||
var/det_time = 100
|
||||
var/quality = 1 //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better
|
||||
|
||||
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/pickaxe) && !primed)
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
|
||||
primed = 1
|
||||
icon_state = "Gibtonite active"
|
||||
user.visible_message("<span class='warning'>[user] strikes the [src], causing a chain reaction!</span>")
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/notify_admins = 0
|
||||
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
notify_admins = 1
|
||||
if(notify_admins)
|
||||
message_admins("[key_name(usr)]<A HREF='?_src_=holder;adminmoreinfo=\ref[usr]'>?</A> has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
log_game("[key_name(usr)] has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
spawn(det_time)
|
||||
if(primed)
|
||||
if(quality == 3)
|
||||
explosion(src.loc,2,4,9,adminlog = notify_admins)
|
||||
if(quality == 2)
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
if(quality == 1)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
del(src)
|
||||
if(istype(I, /obj/item/device/analyzer) && primed)
|
||||
primed = 0
|
||||
user.visible_message("<span class='notice'>The chain reaction was stopped! ...The ore's quality went down.</span>")
|
||||
icon_state = "Gibtonite ore"
|
||||
quality = 1
|
||||
..()
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/weapon/ore/ex_act()
|
||||
return
|
||||
|
||||
/*****************************Coin********************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user