mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +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")
|
||||
|
||||
@@ -153,6 +153,11 @@
|
||||
var/ore_eaten = 1
|
||||
var/chase_time = 100
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/New()
|
||||
..()
|
||||
ore_types_eaten += pick(/obj/item/weapon/ore/silver, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/diamond)
|
||||
ore_eaten = rand(1,3)
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(var/new_target)
|
||||
target = new_target
|
||||
if(target != null)
|
||||
@@ -182,8 +187,8 @@
|
||||
if(!(O.type in ore_types_eaten))
|
||||
ore_types_eaten += O.type
|
||||
qdel(O)
|
||||
if(ore_eaten > 5)//Limit the scope of the reward you can get, or else things might get silly
|
||||
ore_eaten = 5
|
||||
if(ore_eaten > 10)//Limit the scope of the reward you can get, or else things might get silly
|
||||
ore_eaten = 10
|
||||
visible_message("<span class='notice'>The ore was swallowed whole!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time
|
||||
@@ -272,11 +277,13 @@
|
||||
icon = 'icons/obj/food/food.dmi'
|
||||
icon_state = "boiledrorocore"
|
||||
var/inert = 0
|
||||
var/preserved = 0
|
||||
|
||||
/obj/item/asteroid/hivelord_core/New()
|
||||
spawn(1200)
|
||||
inert = 1
|
||||
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
|
||||
spawn(2400)
|
||||
if(!preserved)
|
||||
inert = 1
|
||||
desc = "The remains of a hivelord that have become useless, having been left alone too long after being harvested."
|
||||
|
||||
/obj/item/asteroid/hivelord_core/attack(mob/living/M as mob, mob/living/user as mob)
|
||||
if(ishuman(M))
|
||||
|
||||
@@ -207,6 +207,24 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
var/overheat_time = 16
|
||||
var/recent_reload = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/super
|
||||
name = "super-kinetic accelerator"
|
||||
desc = "An upgraded, superior version of the proto-kinetic accelerator."
|
||||
icon_state = "kineticgun_u"
|
||||
projectile_type = "/obj/item/projectile/kinetic/super"
|
||||
overheat_time = 15
|
||||
fire_delay = 15
|
||||
origin_tech = "combat=3;powerstorage=2"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/hyper
|
||||
name = "hyper-kinetic accelerator"
|
||||
desc = "An upgraded, even more superior version of the proto-kinetic accelerator."
|
||||
icon_state = "kineticgun_h"
|
||||
projectile_type = "/obj/item/projectile/kinetic/hyper"
|
||||
overheat_time = 13
|
||||
fire_delay = 13
|
||||
origin_tech = "combat=4;powerstorage=3"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
flags = NODROP
|
||||
|
||||
|
||||
@@ -218,6 +218,16 @@
|
||||
damage_type = BRUTE
|
||||
flag = "bomb"
|
||||
range = 3
|
||||
var/splash = 0
|
||||
|
||||
/obj/item/projectile/kinetic/super
|
||||
damage = 11
|
||||
range = 4
|
||||
|
||||
/obj/item/projectile/kinetic/hyper
|
||||
damage = 12
|
||||
range = 5
|
||||
splash = 1
|
||||
|
||||
obj/item/projectile/kinetic/New()
|
||||
var/turf/proj_turf = get_turf(src)
|
||||
@@ -243,6 +253,11 @@ obj/item/projectile/kinetic/New()
|
||||
var/turf/simulated/mineral/M = target_turf
|
||||
M.gets_drilled(firer)
|
||||
new /obj/item/effect/kinetic_blast(target_turf)
|
||||
if(src.splash)
|
||||
for(var/turf/T in range(splash, target_turf))
|
||||
if(istype(T, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.gets_drilled(firer)
|
||||
|
||||
/obj/item/effect/kinetic_blast
|
||||
name = "kinetic explosion"
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
on_reaction(var/datum/reagents/holder, var/created_volume)
|
||||
feedback_add_details("slime_cores_used","[replacetext(name," ","_")]")
|
||||
if(holder.my_atom)
|
||||
var/obj/item/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
var/obj/item/weapon/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
|
||||
//Cerulean
|
||||
slimepsteroid2
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
|
||||
reliability = 100
|
||||
build_path = /obj/item/bluespace_crystal/artificial
|
||||
build_path = /obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
category = list("Bluespace")
|
||||
|
||||
/datum/design/bag_holding
|
||||
|
||||
@@ -60,6 +60,36 @@
|
||||
id = "jackhammer"
|
||||
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_DIAMOND = 6000)
|
||||
materials = list(MAT_METAL = 6000, MAT_GLASS = 2000, MAT_SILVER = 2000, MAT_DIAMOND = 6000)
|
||||
build_path = /obj/item/weapon/pickaxe/drill/jackhammer
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/superaccelerator
|
||||
name = "Super-Kinetic Accelerator"
|
||||
desc = "An upgraded version of the proto-kinetic accelerator, with superior damage, speed and range."
|
||||
id = "superaccelerator"
|
||||
req_tech = list("materials" = 5, "powerstorage" = 4, "engineering" = 4, "magnets" = 4, "combat" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000)
|
||||
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/super
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/hyperaccelerator
|
||||
name = "Hyper-Kinetic Accelerator"
|
||||
desc = "An upgraded version of the proto-kinetic accelerator, with even more superior damage, speed and range."
|
||||
id = "hyperaccelerator"
|
||||
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6, "combat" = 4)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 8000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_GOLD = 2000, MAT_DIAMOND = 2000)
|
||||
build_path = /obj/item/weapon/gun/energy/kinetic_accelerator/hyper
|
||||
category = list("Mining")
|
||||
|
||||
/datum/design/superresonator
|
||||
name = "Upgraded Resonator"
|
||||
desc = "An upgraded version of the resonator that allows more fields to be active at once."
|
||||
id = "superresonator"
|
||||
req_tech = list("materials" = 4, "powerstorage" = 3, "engineering" = 3, "magnets" = 3)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_METAL = 4000, MAT_GLASS = 1500, MAT_SILVER = 2000, MAT_URANIUM = 2000)
|
||||
build_path = /obj/item/weapon/resonator/upgraded
|
||||
category = list("Mining")
|
||||
@@ -1,39 +1,40 @@
|
||||
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/bluespace_crystal
|
||||
/obj/item/weapon/ore/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "bluespace_crystal"
|
||||
w_class = 1
|
||||
origin_tech = "bluespace=4;materials=3"
|
||||
points = 50
|
||||
var/blink_range = 8 // The teleport range when crushed/thrown at someone.
|
||||
|
||||
/obj/item/bluespace_crystal/New()
|
||||
/obj/item/weapon/ore/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/bluespace_crystal/attack_self(var/mob/user)
|
||||
/obj/item/weapon/ore/bluespace_crystal/attack_self(var/mob/user)
|
||||
blink_mob(user)
|
||||
user.drop_item()
|
||||
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
/obj/item/weapon/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
if(L.z in config.admin_levels)
|
||||
src.visible_message("<span class=warning>[src]'s fragments begin rapidly vibrating and blink out of existence.<span>")
|
||||
qdel(src)
|
||||
return
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
/obj/item/weapon/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
// Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/bluespace_crystal/artificial
|
||||
/obj/item/weapon/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=2"
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
@@ -25,8 +25,8 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
|
||||
@@ -49,10 +49,10 @@
|
||||
/obj/machinery/computer/telescience/initialize()
|
||||
..()
|
||||
for(var/i = 1; i <= starting_crystals; i++)
|
||||
crystals += new /obj/item/bluespace_crystal/artificial(null) // starting crystals
|
||||
crystals += new /obj/item/weapon/ore/bluespace_crystal/artificial(null) // starting crystals
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/bluespace_crystal))
|
||||
if(istype(W, /obj/item/weapon/ore/bluespace_crystal))
|
||||
if(crystals.len >= max_crystals)
|
||||
user << "<span class='warning'>There are not enough crystal slots.</span>"
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user