mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 20:45:28 +01:00
Merge branch 'master' of https://github.com/tgstation/-tg-station into miningpoints
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
name = "ore redemption machine"
|
||||
desc = "A machine that accepts ore and instantly transforms it into workable material sheets, but cannot produce alloys such as Plasteel. Points for ore are generated based on type and can be redeemed at a mining equipment locker."
|
||||
icon = 'icons/obj/machines/mining_machines.dmi'
|
||||
icon_state = "stacker"
|
||||
icon_state = "ore_redemption"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
var/obj/machinery/mineral/stacking_unit_console/CONSOLE
|
||||
@@ -62,8 +62,8 @@
|
||||
var/obj/item/stack/sheet/mineral/gold/M = new /obj/item/stack/sheet/mineral/gold(src)
|
||||
return M
|
||||
if(istype(O, /obj/item/weapon/ore/plasma))
|
||||
var/obj/item/stack/sheet/mineral/plasma/M = new /obj/item/stack/sheet/mineral/plasma(src)
|
||||
points += 10
|
||||
var/obj/item/stack/sheet/mineral/plasma/M = new /obj/item/stack/sheet/mineral/plasma(src)
|
||||
return M
|
||||
if(istype(O, /obj/item/weapon/ore/glass))
|
||||
points += 1
|
||||
@@ -155,21 +155,18 @@
|
||||
var/obj/item/weapon/card/id/inserted_id
|
||||
var/list/prize_list = list(
|
||||
new /datum/data/mining_equipment("Chili", /obj/item/weapon/reagent_containers/food/snacks/hotchili, 100),
|
||||
new /datum/data/mining_equipment("Salad", /obj/item/weapon/reagent_containers/food/snacks/validsalad, 300),
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 500),
|
||||
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 500),
|
||||
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 500),
|
||||
new /datum/data/mining_equipment("Stimulant Pills", /obj/item/weapon/storage/pill_bottle/stimulant, 700),
|
||||
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 1000),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 1500),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c500, 5000),
|
||||
new /datum/data/mining_equipment("Multitool", /obj/item/device/multitool, 100),
|
||||
new /datum/data/mining_equipment("Toolbox", /obj/item/weapon/storage/toolbox/mechanical, 300),
|
||||
new /datum/data/mining_equipment("Pickaxe", /obj/item/weapon/pickaxe, 100),
|
||||
new /datum/data/mining_equipment("Stimulant pills", /obj/item/weapon/storage/pill_bottle/stimulant, 700),
|
||||
new /datum/data/mining_equipment("Alien toy", /obj/item/clothing/mask/facehugger/toy, 1000),
|
||||
new /datum/data/mining_equipment("Laser pointer", /obj/item/device/laser_pointer, 1500),
|
||||
new /datum/data/mining_equipment("Space cash", /obj/item/weapon/spacecash/c500, 5000),
|
||||
new /datum/data/mining_equipment("Drill", /obj/item/weapon/pickaxe/drill, 500),
|
||||
new /datum/data/mining_equipment("Jackhammer", /obj/item/weapon/pickaxe/jackhammer, 1000),
|
||||
new /datum/data/mining_equipment("Wormhole Jaunter", /obj/item/device/wormhole_jaunter, 1000),
|
||||
new /datum/data/mining_equipment("Blast Shield", /obj/item/weapon/shield/riot/mining, 2000),
|
||||
new /datum/data/mining_equipment("Sonic Jackhammer", /obj/item/weapon/pickaxe/jackhammer, 1000),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 1000),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 1500),
|
||||
new /datum/data/mining_equipment("Kinetic accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 2500),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide, 5000),)
|
||||
|
||||
/datum/data/mining_equipment/
|
||||
@@ -239,8 +236,8 @@
|
||||
/obj/item/device/wormhole_jaunter
|
||||
name = "wormhole jaunter"
|
||||
desc = "A single use device harnessing outdated wormhole technology, Nanotrasen has since turned its eyes to blue space for more accurate teleportation. The wormholes it creates are unpleasant to travel through, to say the least."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "hand_tele"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "Jaunter"
|
||||
item_state = "electronic"
|
||||
throwforce = 0
|
||||
w_class = 2.0
|
||||
@@ -267,10 +264,13 @@
|
||||
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100)
|
||||
J.target = chosen_beacon
|
||||
try_move_adjacent(J)
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
del(src)
|
||||
|
||||
/obj/effect/portal/wormhole/jaunt_tunnel
|
||||
name = "jaunt tunnel"
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "bhole3"
|
||||
desc = "A stable hole in the universe made by a wormhole jaunter. Turbulent doesn't even begin to describe how rough passage through one of these is, but at least it will always get you somewhere near a beacon."
|
||||
|
||||
/obj/effect/portal/wormhole/jaunt_tunnel/teleport(atom/movable/M)
|
||||
@@ -291,17 +291,73 @@
|
||||
T.add_vomit_floor(L)
|
||||
playsound(L, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
//Mining Blast Shield
|
||||
/obj/item/weapon/shield/riot/mining
|
||||
name = "blast shield"
|
||||
desc = "Originally conceived as an attempt to protect miners from gibtonite explosions, these shields are much more effective at protecting miners from hostile wildlife on the asteroid."
|
||||
//Mining Resonator
|
||||
|
||||
/obj/item/weapon/resonator
|
||||
name = "resonator"
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "resonator"
|
||||
item_state = "resonator"
|
||||
desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in a vaccuum."
|
||||
w_class = 3
|
||||
force = 10
|
||||
throwforce = 10
|
||||
var/cooldown = 0
|
||||
|
||||
/obj/item/weapon/resonator/proc/CreateResonance(var/target)
|
||||
if(cooldown <= 0)
|
||||
playsound(src,'sound/effects/stealthoff.ogg',50,1)
|
||||
new /obj/effect/resonance(get_turf(target))
|
||||
cooldown = 1
|
||||
spawn(25)
|
||||
cooldown = 0
|
||||
|
||||
/obj/item/weapon/resonator/attack_self(mob/user as mob)
|
||||
CreateResonance(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/resonator/attack(var/atom/A)
|
||||
CreateResonance(A)
|
||||
..()
|
||||
|
||||
/obj/effect/resonance
|
||||
name = "resonance field"
|
||||
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures."
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shield1"
|
||||
layer = 4.1
|
||||
mouse_opacity = 0
|
||||
var/resonance_damage = 30
|
||||
|
||||
/obj/effect/resonance/New()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
if(!istype(proj_turf, /turf))
|
||||
return
|
||||
if(istype(proj_turf, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = proj_turf
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
M.gets_drilled()
|
||||
spawn(5)
|
||||
del(src)
|
||||
else
|
||||
var/datum/gas_mixture/environment = proj_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure < 50)
|
||||
name = "strong resonance"
|
||||
resonance_damage = 60
|
||||
spawn(50)
|
||||
playsound(src,'sound/effects/sparks4.ogg',50,1)
|
||||
for(var/mob/living/L in src.loc)
|
||||
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
|
||||
L.adjustBruteLoss(resonance_damage)
|
||||
del(src)
|
||||
|
||||
//Fakehugger Toy
|
||||
/obj/item/clothing/mask/facehugger/toy
|
||||
desc = "A commemorative toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something."
|
||||
desc = "A toy often used to play pranks on other miners by putting it in their beds. It takes a bit to recharge after latching onto something."
|
||||
throwforce = 0
|
||||
sterile = 1
|
||||
tint = 3
|
||||
tint = 3 //Makes it feel more authentic when it latches on
|
||||
|
||||
/obj/item/clothing/mask/facehugger/toy/examine()//So that giant red text about probisci doesn't show up.
|
||||
if(desc)
|
||||
|
||||
@@ -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,87 @@
|
||||
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"
|
||||
..()
|
||||
|
||||
////////////////////////////////End Gibtonite
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/airless/cave
|
||||
var/length = 100
|
||||
|
||||
@@ -256,6 +337,9 @@
|
||||
user << "\blue You finish cutting into the rock."
|
||||
gets_drilled()
|
||||
|
||||
if(istype(W, /obj/item/weapon/resonator))
|
||||
var/obj/item/weapon/resonator/R = W
|
||||
R.CreateResonance(src)
|
||||
else
|
||||
return attack_hand(user)
|
||||
return
|
||||
@@ -350,7 +434,7 @@
|
||||
if(3.0)
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(70))
|
||||
if (prob(20))
|
||||
src.gets_dug()
|
||||
if(1.0)
|
||||
src.gets_dug()
|
||||
@@ -437,6 +521,9 @@
|
||||
icon_state = "asteroid_dug"
|
||||
return
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/proc/countdown()//This is here to stop runtimes in the event that changeturf() causes asteroid plating to take gibtonite procs
|
||||
return
|
||||
|
||||
/turf/proc/updateMineralOverlays()
|
||||
src.overlays.Cut()
|
||||
|
||||
|
||||
@@ -60,10 +60,51 @@
|
||||
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)
|
||||
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)
|
||||
if(quality == 2)
|
||||
explosion(src.loc,1,2,5)
|
||||
if(quality == 1)
|
||||
explosion(src.loc,-1,1,3)
|
||||
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