mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +01:00
TG Mining Update
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
var/ore_pickup_rate = 15
|
||||
var/sheet_per_ore = 1
|
||||
var/point_upgrade = 1
|
||||
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("bananium" = 30), ("diamond" = 40), ("plasma" = 40))
|
||||
var/list/ore_values = list(("sand" = 1), ("iron" = 1), ("plasma" = 15), ("silver" = 16), ("gold" = 18), ("uranium" = 30), ("diamond" = 50), ("bananium" = 60))
|
||||
var/list/supply_consoles = list("Science", "Robotics", "Research Director's Desk", "Mechanic", "Engineering" = list("metal", "glass", "plasma"), "Chief Engineer's Desk" = list("metal", "glass", "plasma"), "Atmospherics" = list("metal", "glass", "plasma"), "Bar" = list("uranium", "plasma"))
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/New()
|
||||
@@ -79,28 +79,33 @@
|
||||
qdel(O) //... garbage collect
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/process()
|
||||
if(!panel_open) //If the machine is partially dissassembled, it should not process minerals
|
||||
var/turf/T = get_turf(get_step(src, input_dir))
|
||||
var/i
|
||||
if(!panel_open && powered()) //If the machine is partially disassembled and/or depowered, it should not process minerals
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
var/i = 0
|
||||
if(T)
|
||||
if(locate(/obj/item/weapon/ore) in T)
|
||||
for (i = 0; i < ore_pickup_rate; i++)
|
||||
var/obj/item/weapon/ore/O = locate() in T
|
||||
if(O)
|
||||
process_sheet(O)
|
||||
else
|
||||
for(var/obj/item/weapon/ore/O in T)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
else
|
||||
var/obj/structure/ore_box/B = locate() in T
|
||||
if(B)
|
||||
for(var/obj/item/weapon/ore/O in B.contents)
|
||||
if (i >= ore_pickup_rate)
|
||||
break
|
||||
else
|
||||
var/obj/structure/ore_box/B = locate() in T
|
||||
if(B)
|
||||
for (i = 0; i < ore_pickup_rate; i++)
|
||||
var/obj/item/weapon/ore/O = locate() in B.contents
|
||||
if(O)
|
||||
process_sheet(O)
|
||||
else
|
||||
break
|
||||
else if (!O || !O.refined_type)
|
||||
continue
|
||||
else
|
||||
process_sheet(O)
|
||||
i++
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
|
||||
if (!powered())
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/I = usr.get_active_hand()
|
||||
if(istype(I) && !istype(inserted_id))
|
||||
@@ -249,7 +254,7 @@
|
||||
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
|
||||
var/obj/item/stack/sheet/glassstack = stack_list[/obj/item/stack/sheet/glass]
|
||||
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
|
||||
|
||||
|
||||
var/desired = input("How much?", "How much would you like to smelt?", 1) as num
|
||||
var/obj/item/stack/sheet/plasmaglass/plasglassout = new
|
||||
plasglassout.amount = min(desired, 50, glassstack.amount, plasmastack.amount)
|
||||
@@ -287,6 +292,17 @@
|
||||
s.forceMove(loc)
|
||||
s.layer = initial(s.layer)
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/**********************Mining Equipment Locker**************************/
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor
|
||||
@@ -304,17 +320,22 @@
|
||||
new /datum/data/mining_equipment("Whiskey", /obj/item/weapon/reagent_containers/food/drinks/bottle/whiskey, 100),
|
||||
new /datum/data/mining_equipment("Cigar", /obj/item/clothing/mask/cigarette/cigar/havana, 150),
|
||||
new /datum/data/mining_equipment("Soap", /obj/item/weapon/soap/nanotrasen, 200),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 250),
|
||||
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 300),
|
||||
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 300),
|
||||
new /datum/data/mining_equipment("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 400),
|
||||
new /datum/data/mining_equipment("Hivelord Stabilizer", /obj/item/weapon/hivelordstabilizer , 400),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 500),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 600),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 800),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 1200),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 1500),
|
||||
new /datum/data/mining_equipment("Silver Pickaxe", /obj/item/weapon/pickaxe/silver, 1000),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack/carbondioxide/mining, 2000),
|
||||
new /datum/data/mining_equipment("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 2000),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 2500),
|
||||
new /datum/data/mining_equipment("Super Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator/super, 3000),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
|
||||
)
|
||||
|
||||
@@ -339,6 +360,17 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(user as mob)
|
||||
if(..())
|
||||
return
|
||||
@@ -548,6 +580,13 @@
|
||||
var/burst_time = 50
|
||||
var/fieldlimit = 3
|
||||
|
||||
/obj/item/weapon/resonator/upgraded
|
||||
name = "upgraded resonator"
|
||||
desc = "An upgraded version of the resonator that can produce more fields at once."
|
||||
icon_state = "resonator_u"
|
||||
origin_tech = "magnets=3;combat=3"
|
||||
fieldlimit = 5
|
||||
|
||||
/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator)
|
||||
var/turf/T = get_turf(target)
|
||||
if(locate(/obj/effect/resonance) in T)
|
||||
@@ -904,3 +943,22 @@
|
||||
volume = 40
|
||||
throw_range = 7
|
||||
w_class = 3 //same as syndie harness
|
||||
|
||||
/*********************Hivelord stabilizer****************/
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer
|
||||
name = "hivelord stabilizer"
|
||||
icon = 'icons/obj/chemical.dmi'
|
||||
icon_state = "bottle19"
|
||||
desc = "Inject a hivelord core with this stabilizer to preserve its healing powers indefinitely."
|
||||
w_class = 1
|
||||
origin_tech = "biotech=1"
|
||||
|
||||
/obj/item/weapon/hivelordstabilizer/afterattack(obj/item/M, mob/user)
|
||||
var/obj/item/asteroid/hivelord_core/C = M
|
||||
if(!istype(C, /obj/item/asteroid/hivelord_core))
|
||||
user << "<span class='warning'>The stabilizer only works on hivelord cores.</span>"
|
||||
return ..()
|
||||
C.preserved = 1
|
||||
user << "<span class='notice'>You inject the hivelord core with the stabilizer. It will no longer go inert.</span>"
|
||||
qdel(src)
|
||||
|
||||
@@ -71,6 +71,14 @@
|
||||
/obj/item/weapon/pickaxe/proc/playDigSound()
|
||||
playsound(src, pick(digsound),20,1)
|
||||
|
||||
/obj/item/weapon/pickaxe/silver
|
||||
name = "silver-plated pickaxe"
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30 //mines faster than a normal pickaxe, bought from mining vendor
|
||||
origin_tech = "materials=3;engineering=2"
|
||||
desc = "A silver-plated pickaxe that mines slightly faster than standard-issue."
|
||||
|
||||
/obj/item/weapon/pickaxe/diamond
|
||||
name = "diamond-tipped pickaxe"
|
||||
icon_state = "dpickaxe"
|
||||
|
||||
@@ -89,6 +89,7 @@ var/global/list/rockTurfEdgeCache
|
||||
|
||||
/turf/simulated/mineral/proc/HideRock()
|
||||
if(hidden)
|
||||
name = "rock"
|
||||
icon_state = "rock"
|
||||
return
|
||||
|
||||
@@ -135,6 +136,7 @@ var/global/list/rockTurfEdgeCache
|
||||
if("BScrystal")
|
||||
M = new/turf/simulated/mineral/bscrystal(src)
|
||||
if(M)
|
||||
M.mineralAmt = rand(1, 5)
|
||||
src = M
|
||||
M.levelupdate()
|
||||
return
|
||||
@@ -240,7 +242,7 @@ var/global/list/rockTurfEdgeCache
|
||||
/turf/simulated/mineral/bscrystal
|
||||
name = "bluespace crystal deposit"
|
||||
icon_state = "rock_BScrystal"
|
||||
mineralType = /obj/item/bluespace_crystal
|
||||
mineralType = /obj/item/weapon/ore/bluespace_crystal
|
||||
mineralName = "Bluespace crystal"
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
/obj/item/weapon/ore/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = I
|
||||
if(W.remove_fuel(15))
|
||||
if(W.remove_fuel(15) && refined_type)
|
||||
new refined_type(get_turf(src.loc))
|
||||
qdel(src)
|
||||
else if(W.isOn())
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "uranium ore"
|
||||
icon_state = "Uranium ore"
|
||||
origin_tech = "materials=5"
|
||||
points = 18
|
||||
points = 30
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
name = "plasma ore"
|
||||
icon_state = "Plasma ore"
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
points = 36
|
||||
points = 15
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
name = "silver ore"
|
||||
icon_state = "Silver ore"
|
||||
origin_tech = "materials=3"
|
||||
points = 18
|
||||
points = 16
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
name = "diamond ore"
|
||||
icon_state = "Diamond ore"
|
||||
origin_tech = "materials=6"
|
||||
points = 36
|
||||
points = 50
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
name = "bananium ore"
|
||||
icon_state = "Clown ore"
|
||||
origin_tech = "materials=4"
|
||||
points = 27
|
||||
points = 60
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/amt_plasma = 0
|
||||
var/amt_uranium = 0
|
||||
var/amt_clown = 0
|
||||
var/amt_bluespace = 0
|
||||
|
||||
for (var/obj/item/weapon/ore/C in contents)
|
||||
if (istype(C,/obj/item/weapon/ore/diamond))
|
||||
@@ -49,6 +50,8 @@
|
||||
amt_uranium++;
|
||||
if (istype(C,/obj/item/weapon/ore/bananium))
|
||||
amt_clown++;
|
||||
if (istype(C,/obj/item/weapon/ore/bluespace_crystal))
|
||||
amt_bluespace++
|
||||
|
||||
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
|
||||
if (amt_gold)
|
||||
@@ -67,6 +70,8 @@
|
||||
dat += text("Uranium ore: [amt_uranium]<br>")
|
||||
if (amt_clown)
|
||||
dat += text("Bananium ore: [amt_clown]<br>")
|
||||
if (amt_bluespace)
|
||||
dat += text("Bluespace crystals: [amt_bluespace]<br>")
|
||||
|
||||
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
|
||||
user << browse("[dat]", "window=orebox")
|
||||
|
||||
Reference in New Issue
Block a user