Conflicts:
	code/modules/power/port_gen.dm
This commit is contained in:
Markolie
2015-07-30 03:08:33 +02:00
80 changed files with 3783 additions and 3300 deletions
+4 -10
View File
@@ -136,8 +136,6 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_debug_del_all,
/client/proc/reload_admins,
/client/proc/restart_controller,
/client/proc/remake_distribution_map,
/client/proc/show_distribution_map,
/client/proc/enable_debug_verbs,
/client/proc/callproc,
/client/proc/callproc_datum,
@@ -228,19 +226,15 @@ var/list/admin_verbs_mentor = list(
set name = "Invisimin"
set category = "Admin"
set desc = "Toggles ghost-like invisibility (Don't abuse this)"
if(holder && mob)
if(mob.invisibility == INVISIBILITY_OBSERVER)
mob.invisibility = initial(mob.invisibility)
mob << "\red <b>Invisimin off. Invisibility reset.</b>"
mob.icon_state = "ghost"
mob.icon = 'icons/mob/human.dmi'
mob.update_icons()
mob << "<span class='danger'>Invisimin off. Invisibility reset.</span>"
//TODO: Make some kind of indication for the badmin that they are currently invisible
else
mob.invisibility = INVISIBILITY_OBSERVER
mob << "\blue <b>Invisimin on. You are now as invisible as a ghost.</b>"
mob.icon_state = "ghost"
mob.icon = 'icons/mob/mob.dmi'
mob << "<span class='notice'>Invisimin on. You are now as invisible as a ghost.</span>"
/client/proc/player_panel()
set name = "Player Panel"
@@ -194,6 +194,7 @@
name = "plasmaman miner suit"
icon_state = "plasmamanMiner_suit"
armor = list(melee = 40, bullet = 5, laser = 10, energy = 5, bomb = 50, bio = 100, rad = 50)
slowdown = 2
/obj/item/clothing/head/helmet/space/eva/plasmaman/miner
name = "plasmaman miner helmet"
+1 -1
View File
@@ -467,7 +467,7 @@
reagents = list("water" = 10)
fruit = list("banana" = 1)
items = list(
/obj/item/weapon/ore/clown,
/obj/item/weapon/ore/bananium,
)
result = /obj/item/weapon/reagent_containers/food/snacks/clownstears
+10
View File
@@ -74,6 +74,16 @@
sideslist = list("heads")
credits = 20
/obj/item/weapon/coin/antagtoken
name = "antag token"
icon_state = "coin_valid_valid"
cmineral = "valid"
desc = "A novelty coin that helps the heart know what hard evidence cannot prove."
sideslist = list("valid", "salad")
credits = 20
/obj/item/weapon/coin/antagtoken/New()
return
/obj/item/weapon/coin/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if(istype(W, /obj/item/stack/cable_coil))
+319 -180
View File
@@ -3,63 +3,123 @@
/obj/machinery/mineral/ore_redemption
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."
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 vendor."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "ore_redemption"
density = 1
anchored = 1.0
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
input_dir = NORTH
output_dir = SOUTH
req_one_access = list(
access_mining_station,
access_chemistry,
access_bar,
access_research,
access_ce,
access_virology
access_ce
)
var/datum/materials/materials = new
var/stack_amt = 50; //amount to stack before releasing
var/stk_types = list()
var/stk_amt = list()
var/stack_list[0] //Key: Type. Value: Instance of type.
var/obj/item/weapon/card/id/inserted_id
var/points = 0
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))
/obj/machinery/mineral/ore_redemption/New()
spawn( 5 )
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/ore_redemption(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/manipulator(null)
component_parts += new /obj/item/weapon/stock_parts/micro_laser(null)
component_parts += new /obj/item/device/assembly/igniter(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/mineral/ore_redemption/RefreshParts()
var/ore_pickup_rate_temp = 15
var/point_upgrade_temp = 1
var/sheet_per_ore_temp = 1
for(var/obj/item/weapon/stock_parts/matter_bin/B in component_parts)
sheet_per_ore_temp = B.rating
for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts)
ore_pickup_rate_temp = 15 * M.rating
for(var/obj/item/weapon/stock_parts/micro_laser/L in component_parts)
point_upgrade_temp = L.rating
ore_pickup_rate = ore_pickup_rate_temp
point_upgrade = point_upgrade_temp
sheet_per_ore = sheet_per_ore_temp
/obj/machinery/mineral/ore_redemption/proc/process_sheet(obj/item/weapon/ore/O)
var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O)
if(processed_sheet)
var/datum/material/mat = materials.getMaterial(O.oretag)
mat.stored += processed_sheet.amount //Stack the sheets
O.loc = null //Let the old sheet garbage collect
while(mat.stored > stack_amt) //Get rid of excessive stackage
var/obj/item/stack/sheet/out = new mat.sheettype(output.loc)
out.amount = stack_amt-mat.stored
mat.stored -= out.amount
if(!(processed_sheet in stack_list)) //It's the first of this sheet added
var/obj/item/stack/sheet/s = new processed_sheet(src,0)
s.amount = 0
stack_list[processed_sheet] = s
var/obj/item/stack/sheet/storage = stack_list[processed_sheet]
storage.amount += sheet_per_ore //Stack the sheets
O.loc = null //Let the old sheet...
qdel(O) //... garbage collect
/obj/machinery/mineral/ore_redemption/process()
var/turf/T = get_turf(input)
if(T)
var/obj/item/weapon/ore/O
for(O in T)
process_sheet(O)
for(var/obj/structure/ore_box/B in T)
for(O in B.contents)
process_sheet(O)
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(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
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
/obj/machinery/mineral/ore_redemption/attackby(var/obj/item/weapon/W, var/mob/user, params)
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))
if(!user.drop_item())
return
I.loc = src
inserted_id = I
interact(user)
return
if(exchange_parts(user, W))
return
if(default_deconstruction_crowbar(W))
return
if(default_unfasten_wrench(user, W))
return
if(default_deconstruction_screwdriver(user, "ore_redemption-open", "ore_redemption", W))
updateUsrDialog()
return
if(panel_open)
if(istype(W, /obj/item/weapon/crowbar))
empty_content()
default_deconstruction_crowbar(W)
return 1
..()
/obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O)
if(O.oretag)
var/datum/material/mat = materials.getMaterial(O.oretag)
var/obj/item/stack/sheet/M = new mat.sheettype(src)
points += mat.value
if(O.refined_type)
var/obj/item/stack/sheet/M = O.refined_type
points += O.points * point_upgrade
return M
del(O)//No refined type? Purge it.
qdel(O)//No refined type? Purge it.
return
/obj/machinery/mineral/ore_redemption/attack_hand(user as mob)
@@ -68,9 +128,11 @@
interact(user)
/obj/machinery/mineral/ore_redemption/interact(mob/user)
user.set_machine(src)
var/obj/item/stack/sheet/s
var/dat
dat += text("<b>Ore Redemption Machine</b><br><br>")
dat += text("This machine only accepts ore. Gibtonite and Slag are not accepted.<br><br>")
dat += text("Current unclaimed points: [points]<br>")
@@ -80,24 +142,31 @@
else
dat += text("No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>")
for(var/O in materials.storage)
var/datum/material/mat = materials.getMaterial(O)
if(mat.stored > 0)
dat += text("[capitalize(mat.processed_name)]: [mat.stored] <A href='?src=\ref[src];release=[mat.id]'>Release</A><br>")
for(var/O in stack_list)
s = stack_list[O]
if(s.amount > 0)
if(O == stack_list[1])
dat += "<br>" //just looks nicer
dat += text("[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
dat += text("<br>This unit can hold stacks of [stack_amt] sheets of each mineral type.<br><br>")
if((/obj/item/stack/sheet/metal in stack_list) && (/obj/item/stack/sheet/mineral/plasma in stack_list))
var/obj/item/stack/sheet/metalstack = stack_list[/obj/item/stack/sheet/metal]
var/obj/item/stack/sheet/plasmastack = stack_list[/obj/item/stack/sheet/mineral/plasma]
if(min(metalstack.amount, plasmastack.amount))
dat += text("Plasteel Alloy (Metal + Plasma): <A href='?src=\ref[src];plasteel=1'>Smelt</A><BR>")
dat += text("<HR><b>Mineral Value List:</b><BR>[get_ore_values()]")
user << browse("[dat]", "window=console_stacking_machine")
dat += text("<br><div class='statusDisplay'><b>Mineral Value List:</b><BR>[get_ore_values()]</div>")
var/datum/browser/popup = new(user, "console_stacking_machine", "Ore Redemption Machine", 400, 500)
popup.set_content(dat)
popup.open()
return
/obj/machinery/mineral/ore_redemption/proc/get_ore_values()
var/dat = "<table border='0' width='300'>"
for(var/mat_id in materials.storage)
var/datum/material/mat = materials.getMaterial(mat_id)
dat += "<tr><td>[capitalize(mat.processed_name)]</td><td>[mat.value]</td></tr>"
for(var/ore in ore_values)
var/value = ore_values[ore]
dat += "<tr><td>[capitalize(ore)]</td><td>[value * point_upgrade]</td></tr>"
dat += "</table>"
return dat
@@ -111,35 +180,80 @@
inserted_id.verb_pickup()
inserted_id = null
if(href_list["choice"] == "claim")
inserted_id.mining_points += points
points = 0
src << "Points transferred."
if(access_mining_station in inserted_id.access)
inserted_id.mining_points += points
points = 0
else
usr << "<span class='warning'>Required access not found.</span>"
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "\red No valid ID."
if(href_list["release"] && istype(inserted_id))
if(check_access(inserted_id))
var/release=href_list["release"]
var/datum/material/mat = materials.getMaterial(release)
if(!mat) return
var/desired = input("How much?","How much [mat.processed_name] to eject?",mat.stored) as num
if(desired==0) return
var/obj/item/stack/sheet/out = new mat.sheettype()
out.amount = min(mat.stored,desired)
mat.stored=desired
else usr << "<span class='warning'>No valid ID.</span>"
if(href_list["release"])
if(check_access(inserted_id) || allowed(usr)) //Check the ID inside, otherwise check the user.
if(!(text2path(href_list["release"]) in stack_list)) return
var/obj/item/stack/sheet/inp = stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type()
var/desired = input("How much?", "How much to eject?", 1) as num
out.amount = min(desired,50,inp.amount)
if(out.amount >= 1)
inp.amount -= out.amount
unload_mineral(out)
if(inp.amount < 1)
stack_list -= text2path(href_list["release"])
else
usr << "<span class='warning'>Required access not found.</span>"
if(href_list["plasteel"])
if(check_access(inserted_id) || allowed(usr))
if(!(/obj/item/stack/sheet/metal in stack_list)) return
if(!(/obj/item/stack/sheet/mineral/plasma in stack_list)) return
var/obj/item/stack/sheet/metalstack = stack_list[/obj/item/stack/sheet/metal]
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/plasteel/plasteelout = new
plasteelout.amount = min(desired,50,metalstack.amount,plasmastack.amount)
if(plasteelout.amount >= 1)
metalstack.amount -= plasteelout.amount
plasmastack.amount -= plasteelout.amount
unload_mineral(plasteelout)
else
usr << "<span class='warning'>Required access not found.</span>"
updateUsrDialog()
return
/obj/machinery/mineral/ore_redemption/ex_act()
return //So some chucklefuck doesn't ruin miners reward with an explosion
/obj/machinery/mineral/ore_redemption/ex_act(severity, target)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
if(severity == 1)
if(prob(50))
empty_content()
qdel(src)
else if(severity == 2)
if(prob(25))
empty_content()
qdel(src)
//empty the redemption machine by stacks of at most max_amount (50 at this time) size
/obj/machinery/mineral/ore_redemption/proc/empty_content()
var/obj/item/stack/sheet/s
for(var/O in stack_list)
s = stack_list[O]
while(s.amount > s.max_amount)
new s.type(loc,s.max_amount)
s.use(s.max_amount)
s.loc = loc
s.layer = initial(s.layer)
/**********************Mining Equipment Locker**************************/
/obj/machinery/mineral/equipment_locker
/obj/machinery/mineral/equipment_vendor
name = "mining equipment vendor"
desc = "An equipment vendor for miners, points collected at an ore redemption machine can be spent here."
icon = 'icons/obj/machines/mining_machines.dmi'
@@ -148,24 +262,24 @@
anchored = 1.0
var/obj/item/weapon/card/id/inserted_id
var/list/prize_list = list(
new /datum/data/mining_equipment("Stimpack MediPen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/stimpack, 50),
new /datum/data/mining_equipment("Teporone MediPen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/teporone, 50),
new /datum/data/mining_equipment("MediPen Bundle", /obj/item/weapon/storage/box/autoinjector/utility, 200),
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("Advanced Scanner", /obj/item/device/t_scanner/adv_mining_scanner, 300),
new /datum/data/mining_equipment("Laser Pointer", /obj/item/device/laser_pointer, 400),
new /datum/data/mining_equipment("Alien Toy", /obj/item/clothing/mask/facehugger/toy, 450),
new /datum/data/mining_equipment("Mining Drone", /mob/living/simple_animal/hostile/mining_drone/, 500),
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 650),
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 650),
new /datum/data/mining_equipment("Sonic Jackhammer", /obj/item/weapon/pickaxe/jackhammer, 800),
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 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, 5000),
new /datum/data/mining_equipment("Point Card", /obj/item/weapon/card/mining_point_card, 500),
new /datum/data/mining_equipment("Stimpack", /obj/item/weapon/reagent_containers/hypospray/autoinjector/stimpack, 50),
new /datum/data/mining_equipment("Teporone MediPen", /obj/item/weapon/reagent_containers/hypospray/autoinjector/teporone, 50),
new /datum/data/mining_equipment("MediPen Bundle", /obj/item/weapon/storage/box/autoinjector/utility, 200),
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("Mining Drone", /mob/living/simple_animal/hostile/mining_drone, 500),
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("Space Cash", /obj/item/weapon/spacecash/c1000, 2000),
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
)
@@ -179,12 +293,24 @@
src.equipment_path = path
src.cost = cost
/obj/machinery/mineral/equipment_locker/attack_hand(user as mob)
/obj/machinery/mineral/equipment_vendor/New()
..()
component_parts = list()
component_parts += new /obj/item/weapon/circuitboard/mining_equipment_vendor(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/matter_bin(null)
component_parts += new /obj/item/weapon/stock_parts/console_screen(null)
RefreshParts()
/obj/machinery/mineral/equipment_vendor/attack_hand(user as mob)
if(..())
return
interact(user)
/obj/machinery/mineral/equipment_locker/interact(mob/user)
/obj/machinery/mineral/equipment_vendor/interact(mob/user)
user.set_machine(src)
var/dat
dat +="<div class='statusDisplay'>"
if(istype(inserted_id))
@@ -192,15 +318,16 @@
else
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
dat += "</div>"
dat += "<HR><b>Equipment point cost list:</b><BR><table border='0' width='200'>"
dat += "<br><b>Equipment point cost list:</b><BR><table border='0' width='200'>"
for(var/datum/data/mining_equipment/prize in prize_list)
dat += "<tr><td>[prize.equipment_name]</td><td>[prize.cost]</td><td><A href='?src=\ref[src];purchase=\ref[prize]'>Purchase</A></td></tr>"
dat += "</table>"
user << browse("[dat]", "window=mining_equipment_locker")
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
popup.set_content(dat)
popup.open()
return
/obj/machinery/mineral/equipment_locker/Topic(href, href_list)
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
if(..())
return
if(href_list["choice"])
@@ -212,10 +339,11 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
usr.drop_item()
if(!usr.drop_item())
return
I.loc = src
inserted_id = I
else usr << "\red No valid ID."
else usr << "<span class='danger'>No valid ID.</span>"
if(href_list["purchase"])
if(istype(inserted_id))
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
@@ -228,38 +356,45 @@
updateUsrDialog()
return
/obj/machinery/mineral/equipment_locker/attackby(obj/item/I as obj, mob/user as mob, params)
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/mining_voucher))
RedeemVoucher(I, user)
return
if(istype(I,/obj/item/weapon/card/id))
var/obj/item/weapon/card/id/C = usr.get_active_hand()
if(istype(C) && !istype(inserted_id))
usr.drop_item()
if(!usr.drop_item())
return
C.loc = src
inserted_id = C
interact(user)
return
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
updateUsrDialog()
return
if(panel_open)
if(istype(I, /obj/item/weapon/crowbar))
default_deconstruction_crowbar(I)
return 1
..()
/obj/machinery/mineral/equipment_locker/proc/RedeemVoucher(voucher, redeemer)
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") in list("Mining Drill", "Kinetic Accelerator", "Mining Drone", "Advanced Scanner", "Cancel")
if(!selection || !Adjacent(redeemer))
/obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/weapon/mining_voucher/voucher, mob/redeemer)
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner")
if(!selection || !Adjacent(redeemer) || voucher.loc != redeemer)
return
switch(selection)
if("Mining Drill")
new /obj/item/weapon/pickaxe/drill(src.loc)
if("Kinetic Accelerator")
new /obj/item/weapon/gun/energy/kinetic_accelerator(src.loc)
if("Resonator")
new /obj/item/weapon/resonator(src.loc)
if("Mining Drone")
new /mob/living/simple_animal/hostile/mining_drone(src.loc)
new /obj/item/weapon/weldingtool/hugetank(src.loc)
if("Advanced Scanner")
new /obj/item/device/t_scanner/adv_mining_scanner(src.loc)
if("Cancel")
return
del(voucher)
qdel(voucher)
/obj/machinery/mineral/equipment_locker/ex_act(severity)
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
@@ -272,7 +407,7 @@
/obj/item/weapon/mining_voucher
name = "mining voucher"
desc = "A token to redeem a piece of equipment. Use it on a mining equipment locker."
desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor."
icon = 'icons/obj/items.dmi'
icon_state = "mining_voucher"
w_class = 1
@@ -324,17 +459,17 @@
var/list/L = list()
for(var/obj/item/device/radio/beacon/B in world)
var/turf/T = get_turf(B)
if((T.z in config.station_levels))
if(T.z == ZLEVEL_STATION)
L += B
if(!L.len)
user << "<span class='notice'>The [src.name] failed to create a wormhole.</span>"
return
var/chosen_beacon = pick(L)
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon, lifespan=100)
var/obj/effect/portal/wormhole/jaunt_tunnel/J = new /obj/effect/portal/wormhole/jaunt_tunnel(get_turf(src), chosen_beacon)
J.target = chosen_beacon
try_move_adjacent(J)
playsound(src,'sound/effects/sparks4.ogg',50,1)
del(src)
qdel(src)
/obj/effect/portal/wormhole/jaunt_tunnel
name = "jaunt tunnel"
@@ -346,19 +481,20 @@
if(istype(M, /obj/effect))
return
if(istype(M, /atom/movable))
do_teleport(M, target, 6)
if(isliving(M))
var/mob/living/L = M
L.Weaken(3)
if(ishuman(L))
shake_camera(L, 20, 1)
spawn(20)
L.visible_message("<span class='danger'>[L.name] vomits from travelling through the [src.name]!</span>")
L.nutrition -= 20
L.adjustToxLoss(-3)
var/turf/T = get_turf(L)
T.add_vomit_floor(L)
playsound(L, 'sound/effects/splat.ogg', 50, 1)
if(do_teleport(M, target, 6))
if(isliving(M))
var/mob/living/L = M
L.Weaken(3)
if(ishuman(L))
shake_camera(L, 20, 1)
spawn(20)
if(L)
L.visible_message("<span class='danger'>[L.name] vomits from travelling through the [src.name]!</span>", "<span class='userdanger'>You throw up from travelling through the [src.name]!</span>")
L.nutrition -= 20
L.adjustToxLoss(-3)
var/turf/T = get_turf(L)
T.add_vomit_floor(L)
playsound(L, 'sound/effects/splat.ogg', 50, 1)
/**********************Resonator**********************/
@@ -369,27 +505,35 @@
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
force = 8
throwforce = 10
var/cooldown = 0
var/fieldsactive = 0
var/burst_time = 50
var/fieldlimit = 3
/obj/item/weapon/resonator/proc/CreateResonance(var/target, var/creator)
if(cooldown <= 0)
var/turf/T = get_turf(target)
if(locate(/obj/effect/resonance) in T)
return
if(fieldsactive < fieldlimit)
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
var/obj/effect/resonance/R = new /obj/effect/resonance(get_turf(target))
R.creator = creator
cooldown = 1
spawn(20)
cooldown = 0
new /obj/effect/resonance(T, creator, burst_time)
fieldsactive++
spawn(burst_time)
fieldsactive--
/obj/item/weapon/resonator/attack_self(mob/user as mob)
CreateResonance(src, user)
..()
if(burst_time == 50)
burst_time = 30
user << "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>"
else
burst_time = 50
user << "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>"
/obj/item/weapon/resonator/afterattack(atom/target, mob/user, proximity_flag)
if(target in user.contents)
return
if(proximity_flag)
if(!check_allowed_items(target, 1)) return
CreateResonance(target, user)
/obj/effect/resonance
@@ -400,36 +544,35 @@
layer = 4.1
mouse_opacity = 0
var/resonance_damage = 20
var/creator = null
/obj/effect/resonance/New()
/obj/effect/resonance/New(loc, var/creator = null, var/timetoburst)
var/turf/proj_turf = get_turf(src)
if(!istype(proj_turf))
return
if(istype(proj_turf, /turf/simulated/mineral))
var/turf/simulated/mineral/M = proj_turf
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
M.GetDrilled()
spawn(5)
del(src)
spawn(timetoburst)
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
M.gets_drilled(creator)
qdel(src)
else
var/datum/gas_mixture/environment = proj_turf.return_air()
var/pressure = environment.return_pressure()
if(pressure < 50)
name = "strong resonance field"
resonance_damage = 45
spawn(50)
resonance_damage = 50
spawn(timetoburst)
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
if(creator)
for(var/mob/living/L in src.loc)
add_logs(L, creator, "used a resonator field on", object="resonator")
add_logs(creator, L, "used a resonator field on", object="resonator")
L << "<span class='danger'>The [src.name] ruptured with you in it!</span>"
L.adjustBruteLoss(resonance_damage)
else
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)
qdel(src)
/**********************Facehugger toy**********************/
@@ -438,6 +581,7 @@
throwforce = 0
real = 0
sterile = 1
tint = 3 //Makes it feel more authentic when it latches on
/obj/item/clothing/mask/facehugger/toy/Die()
return
@@ -445,7 +589,7 @@
/**********************Mining drone**********************/
/mob/living/simple_animal/hostile/mining_drone/
/mob/living/simple_animal/hostile/mining_drone
name = "nanotrasen minebot"
desc = "The instructions printed on the side read: This is a small robot used to support miners, can be set to search and collect loose ore, or to help fend off wildlife. A mining scanner can instruct it to drop loose ore. Field repairs can be done with a welder."
icon = 'icons/obj/aibots.dmi'
@@ -482,7 +626,10 @@
ranged_cooldown_cap = 3
projectiletype = /obj/item/projectile/kinetic
projectilesound = 'sound/weapons/Gunshot4.ogg'
wanted_objects = list(/obj/item/weapon/ore)
speak_emote = list("states")
wanted_objects = list(/obj/item/weapon/ore/diamond, /obj/item/weapon/ore/gold, /obj/item/weapon/ore/silver,
/obj/item/weapon/ore/plasma, /obj/item/weapon/ore/uranium, /obj/item/weapon/ore/iron,
/obj/item/weapon/ore/bananium)
/mob/living/simple_animal/hostile/mining_drone/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/weapon/weldingtool))
@@ -503,12 +650,12 @@
return
..()
/mob/living/simple_animal/hostile/mining_drone/Die()
/mob/living/simple_animal/hostile/mining_drone/death()
..()
visible_message("<span class='danger'>[src] is destroyed!</span>")
new /obj/effect/decal/remains/robot(src.loc)
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
DropOre()
del src
qdel(src)
return
/mob/living/simple_animal/hostile/mining_drone/New()
@@ -633,6 +780,7 @@
user << "<span class='info'>The display on [src] seems to be flickering.</span>"
/**********************Mining Scanner**********************/
/obj/item/device/mining_scanner
desc = "A scanner that checks surrounding rock for useful minerals, it can also be used to stop gibtonite detonations. Requires you to wear mesons to work properly."
name = "mining scanner"
@@ -650,23 +798,9 @@
cooldown = 1
spawn(40)
cooldown = 0
var/client/C = user.client
var/list/L = list()
var/turf/simulated/mineral/M
for(M in range(7, user))
if(M.scan_state)
L += M
if(!L.len)
user << "<span class='info'>[src] reports that nothing was detected nearby.</span>"
return
else
for(M in L)
var/turf/T = get_turf(M)
var/image/I = image('icons/turf/walls.dmi', loc = T, icon_state = M.scan_state, layer = 18)
C.images += I
spawn(30)
if(C)
C.images -= I
var/list/mobs = list()
mobs |= user
mineral_scan_pulse(mobs, get_turf(user))
//Debug item to identify all ore spread quickly
@@ -676,7 +810,7 @@
for(var/turf/simulated/mineral/M in world)
if(M.scan_state)
M.icon_state = M.scan_state
del(src)
qdel(src)
/obj/item/device/t_scanner/adv_mining_scanner
desc = "A scanner that automatically checks surrounding rock for useful minerals; it can also be used to stop gibtonite detonations. Requires you to wear mesons to function properly."
@@ -688,31 +822,36 @@
slot_flags = SLOT_BELT
var/cooldown = 0
/obj/item/device/t_scanner/adv_mining_scanner/cyborg
flags = CONDUCT | NODROP
/obj/item/device/t_scanner/adv_mining_scanner/scan()
if(!cooldown)
cooldown = 1
spawn(80)
spawn(35)
cooldown = 0
var/turf/t = get_turf(src)
var/list/mobs = recursive_mob_check(t, 1,0,0)
var/list/mobs = recursive_mob_check(t, client_check = 1, sight_check = 0, include_radio = 0)
if(!mobs.len)
return
var/list/L = list()
var/turf/simulated/mineral/M
for(M in range(7, t))
if(M.scan_state)
L += M
if(L.len)
for(var/mob/user in mobs)
if(user.client)
var/client/C = user.client
for(M in L)
var/turf/T = get_turf(M)
var/image/I = image('icons/turf/walls.dmi', loc = T, icon_state = M.scan_state, layer = 18)
C.images += I
spawn(30)
if(C)
C.images -= I
mineral_scan_pulse(mobs, t)
/proc/mineral_scan_pulse(list/mobs, turf/T, range = world.view)
var/list/minerals = list()
for(var/turf/simulated/mineral/M in range(range, T))
if(M.scan_state)
minerals += M
if(minerals.len)
for(var/mob/user in mobs)
if(user.client)
var/client/C = user.client
for(var/turf/simulated/mineral/M in minerals)
var/turf/F = get_turf(M)
var/image/I = image('icons/turf/mining.dmi', loc = F, icon_state = M.scan_state, layer = 18)
C.images += I
spawn(30)
if(C)
C.images -= I
/**********************Xeno Warning Sign**********************/
/obj/structure/sign/xeno_warning_mining
@@ -1,2 +1,6 @@
/turf/simulated/mineral/random/labormineral
mineralSpawnChanceList = list("Uranium" = 1, "Iron" = 100, "Diamond" = 1, "Gold" = 1, "Silver" = 1, "Plasma" = 1/*, "Adamantine" =5, "Cave" = 1 */) //Don't suffocate the prisoners with caves
mineralSpawnChanceList = list("Uranium" = 1, "Iron" = 100, "Diamond" = 1, "Gold" = 1, "Silver" = 1, "Plasma" = 1)
/turf/simulated/mineral/random/labormineral/New()
icon_state = "rock"
..()
+12 -30
View File
@@ -29,7 +29,7 @@
if(t == src.door_tag)
src.release_door = d
if (machine && (release_door || !use_release_door))
machine.console = src
machine.CONSOLE = src
else
qdel(src)
@@ -65,7 +65,7 @@
if(istype(I, /obj/item/weapon/card/id))
return attack_hand(user)
..()
/obj/machinery/mineral/labor_claim_console/emag_act(user as mob)
emag(user)
@@ -109,9 +109,9 @@
usr << "<span class='notice'>Shuttle received message and will be sent shortly.</span>"
shuttle.launch()
else
usr << "\blue Shuttle is already moving."
usr << "<span class='notice'>Shuttle is already moving.</span>"
else
usr << "\blue Shuttle is already on-station."
usr << "<span class='notice'>Shuttle is already on-station.</span>"
if(href_list["choice"] == "release")
if(alone_in_area(get_area(loc), usr))
@@ -132,7 +132,7 @@
/obj/machinery/mineral/stacking_machine/laborstacker
var/points = 0 //The unclaimed value of ore stacked. Value for each ore loosely relative to its rarity.
var/list/ore_values = list(("glass" = 1), ("metal" = 2), ("iron" = 3), ("solid plasma" = 20), ("plasteel" = 23), ("reinforced glass" = 4), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("diamond" = 25), ("bananium" = 50))
var/list/ore_values = list(("glass" = 1), ("metal" = 2), ("solid plasma" = 20), ("plasteel" = 23), ("reinforced glass" = 4), ("gold" = 20), ("silver" = 20), ("uranium" = 20), ("diamond" = 25), ("bananium" = 50))
/obj/machinery/mineral/stacking_machine/laborstacker/proc/get_ore_values()
var/dat = "<table border='0' width='200'>"
@@ -142,31 +142,13 @@
dat += "</table>"
return dat
/obj/machinery/mineral/stacking_machine/laborstacker/process()
if (src.output && src.input)
var/turf/T = get_turf(input)
for(var/obj/item/O in T.contents)
if(!O) return
if(istype(O,/obj/item/stack))
var/obj/item/stack/S = O
if(S.name in ore_values)
points += ore_values[S.name] * S.amount
S.loc = null
else
S.loc = output.loc
else
O.loc = output.loc
//Output amounts that are past stack_amt.
for(var/sheet in stack_storage)
if(stack_storage[sheet] >= stack_amt)
var/stacktype = stack_paths[sheet]
var/obj/item/stack/sheet/S = new stacktype (get_turf(output))
S.amount = stack_amt
stack_storage[sheet] -= stack_amt
console.updateUsrDialog()
return
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
if(istype(inp))
var/n = inp.name
var/a = inp.amount
if(n in ore_values)
points += ore_values[n] * a
..()
/**********************Point Lookup Console**************************/
@@ -16,4 +16,14 @@
density = 0
anchored = 1.0
New()
icon_state = "blank"
icon_state = "blank"
/obj/machinery/mineral
var/input_dir = NORTH
var/output_dir = SOUTH
/obj/machinery/mineral/proc/unload_mineral(var/atom/movable/S)
S.loc = loc
var/turf/T = get_step(src,output_dir)
if(T)
S.loc = T
+345 -185
View File
@@ -6,92 +6,165 @@
icon_state = "console"
density = 1
anchored = 1
var/obj/machinery/mineral/processing_unit/machine = null
var/machinedir = EAST
var/show_all_ores = 0
/obj/machinery/mineral/processing_unit_console/New()
..()
spawn(7)
src.machine = locate(/obj/machinery/mineral/processing_unit, get_step(src, machinedir))
if (machine)
machine.console = src
machine.CONSOLE = src
else
del(src)
qdel(src)
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/mineral/processing_unit_console/attack_hand(user as mob)
/obj/machinery/mineral/processing_unit_console/interact(mob/user)
if(..())
return
if(!allowed(user))
user << "\red Access denied."
return
user.set_machine(src)
var/dat = "<h1>Ore processor console</h1>"
dat += "<hr><table>"
for(var/ore in machine.ores_processing)
if(!machine.ores_stored[ore] && !show_all_ores) continue
dat += "<tr><td width = 40><b>[capitalize(ore)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
if(machine.ores_processing[ore])
switch(machine.ores_processing[ore])
if(0)
dat += "red'>not processing"
if(1)
dat += "orange'>smelting"
if(2)
dat += "blue'>compressing"
if(3)
dat += "gray'>alloying"
var/dat = "<b>Smelter control console</b><br><br>"
//iron
if(machine.ore_iron || machine.ore_glass || machine.ore_plasma || machine.ore_uranium || machine.ore_gold || machine.ore_silver || machine.ore_diamond || machine.ore_clown || machine.ore_adamantine)
if(machine.ore_iron)
if (machine.selected_iron==1)
dat += text("<A href='?src=\ref[src];sel_iron=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_iron=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Iron: [machine.ore_iron]<br>")
else
dat += "red'>not processing"
dat += "</font>.</td><td width = 30><a href='?src=\ref[src];toggle_smelting=[ore]'>\[change\]</a></td></tr>"
machine.selected_iron = 0
dat += "</table><hr>"
dat += "Currently displaying [show_all_ores ? "all ore types" : "only available ore types"]. <A href='?src=\ref[src];toggle_ores=1'>\[[show_all_ores ? "show less" : "show more"]\]</a></br>"
dat += "The ore processor is currently <A href='?src=\ref[src];toggle_power=1'>[(machine.active ? "<font color='green'>processing</font>" : "<font color='red'>disabled</font>")]</a>."
user << browse(dat, "window=processor_console;size=400x500")
onclose(user, "computer")
return
//sand - glass
if(machine.ore_glass)
if (machine.selected_glass==1)
dat += text("<A href='?src=\ref[src];sel_glass=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_glass=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Sand: [machine.ore_glass]<br>")
else
machine.selected_glass = 0
//plasma
if(machine.ore_plasma)
if (machine.selected_plasma==1)
dat += text("<A href='?src=\ref[src];sel_plasma=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_plasma=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Plasma: [machine.ore_plasma]<br>")
else
machine.selected_plasma = 0
//uranium
if(machine.ore_uranium)
if (machine.selected_uranium==1)
dat += text("<A href='?src=\ref[src];sel_uranium=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_uranium=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Uranium: [machine.ore_uranium]<br>")
else
machine.selected_uranium = 0
//gold
if(machine.ore_gold)
if (machine.selected_gold==1)
dat += text("<A href='?src=\ref[src];sel_gold=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_gold=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Gold: [machine.ore_gold]<br>")
else
machine.selected_gold = 0
//silver
if(machine.ore_silver)
if (machine.selected_silver==1)
dat += text("<A href='?src=\ref[src];sel_silver=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_silver=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Silver: [machine.ore_silver]<br>")
else
machine.selected_silver = 0
//diamond
if(machine.ore_diamond)
if (machine.selected_diamond==1)
dat += text("<A href='?src=\ref[src];sel_diamond=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_diamond=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Diamond: [machine.ore_diamond]<br>")
else
machine.selected_diamond = 0
//bananium
if(machine.ore_clown)
if (machine.selected_clown==1)
dat += text("<A href='?src=\ref[src];sel_clown=no'><font color='green'>Smelting</font></A> ")
else
dat += text("<A href='?src=\ref[src];sel_clown=yes'><font color='red'>Not smelting</font></A> ")
dat += text("Bananium: [machine.ore_clown]<br>")
else
machine.selected_clown = 0
//On or off
dat += text("Machine is currently ")
if (machine.on==1)
dat += text("<A href='?src=\ref[src];set_on=off'>On</A> ")
else
dat += text("<A href='?src=\ref[src];set_on=on'>Off</A> ")
else
dat+="---No Materials Loaded---"
user << browse("[dat]", "window=console_processing_unit")
/obj/machinery/mineral/processing_unit_console/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["toggle_smelting"])
var/choice = input("What setting do you wish to use for processing [href_list["toggle_smelting"]]?") as null|anything in list("Smelting","Compressing","Alloying","Nothing")
if(!choice) return
switch(choice)
if("Nothing") choice = 0
if("Smelting") choice = 1
if("Compressing") choice = 2
if("Alloying") choice = 3
machine.ores_processing[href_list["toggle_smelting"]] = choice
if(href_list["toggle_power"])
machine.active = !machine.active
if(href_list["toggle_ores"])
show_all_ores = !show_all_ores
if(href_list["sel_iron"])
if (href_list["sel_iron"] == "yes")
machine.selected_iron = 1
else
machine.selected_iron = 0
if(href_list["sel_glass"])
if (href_list["sel_glass"] == "yes")
machine.selected_glass = 1
else
machine.selected_glass = 0
if(href_list["sel_plasma"])
if (href_list["sel_plasma"] == "yes")
machine.selected_plasma = 1
else
machine.selected_plasma = 0
if(href_list["sel_uranium"])
if (href_list["sel_uranium"] == "yes")
machine.selected_uranium = 1
else
machine.selected_uranium = 0
if(href_list["sel_gold"])
if (href_list["sel_gold"] == "yes")
machine.selected_gold = 1
else
machine.selected_gold = 0
if(href_list["sel_silver"])
if (href_list["sel_silver"] == "yes")
machine.selected_silver = 1
else
machine.selected_silver = 0
if(href_list["sel_diamond"])
if (href_list["sel_diamond"] == "yes")
machine.selected_diamond = 1
else
machine.selected_diamond = 0
if(href_list["sel_clown"])
if (href_list["sel_clown"] == "yes")
machine.selected_clown = 1
else
machine.selected_clown = 0
if(href_list["set_on"])
if (href_list["set_on"] == "on")
machine.on = 1
else
machine.on = 0
src.updateUsrDialog()
return
@@ -99,136 +172,223 @@
/obj/machinery/mineral/processing_unit
name = "material processor" //This isn't actually a goddamn furnace, we're in space and it's processing platinum and flammable plasma...
name = "furnace"
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "furnace"
density = 1
anchored = 1
light_range = 3
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
var/obj/machinery/mineral/console = null
var/sheets_per_tick = 10
var/list/ores_processing[0]
var/list/ores_stored[0]
var/list/ore_data[0]
var/list/alloy_data[0]
var/active = 0
/obj/machinery/mineral/processing_unit/New()
..()
//TODO: Ore and alloy global storage datum.
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
alloy_data += new alloytype()
for(var/oretype in typesof(/datum/ore)-/datum/ore)
var/datum/ore/OD = new oretype()
ore_data[OD.oretag] = OD
ores_processing[OD.oretag] = 0
ores_stored[OD.oretag] = 0
//Locate our output and input machinery.
spawn(5)
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
return
return
var/obj/machinery/mineral/CONSOLE = null
var/ore_gold = 0;
var/ore_silver = 0;
var/ore_diamond = 0;
var/ore_glass = 0;
var/ore_plasma = 0;
var/ore_uranium = 0;
var/ore_iron = 0;
var/ore_clown = 0;
var/ore_adamantine = 0;
var/selected_gold = 0
var/selected_silver = 0
var/selected_diamond = 0
var/selected_glass = 0
var/selected_plasma = 0
var/selected_uranium = 0
var/selected_iron = 0
var/selected_clown = 0
var/on = 0 //0 = off, 1 =... oh you know!
/obj/machinery/mineral/processing_unit/process()
var/i
for (i = 0; i < 10; i++)
if (on)
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_glass > 0)
ore_glass--;
generate_mineral(/obj/item/stack/sheet/glass)
else
on = 0
continue
if (selected_glass == 1 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (ore_glass > 0 && ore_iron > 0)
ore_glass--;
ore_iron--;
generate_mineral(/obj/item/stack/sheet/rglass)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 1 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_gold > 0)
ore_gold--;
generate_mineral(/obj/item/stack/sheet/mineral/gold)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_silver > 0)
ore_silver--;
generate_mineral(/obj/item/stack/sheet/mineral/silver)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_diamond > 0)
ore_diamond--;
generate_mineral(/obj/item/stack/sheet/mineral/diamond)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_plasma > 0)
ore_plasma--;
generate_mineral(/obj/item/stack/sheet/mineral/plasma)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
if (ore_uranium > 0)
ore_uranium--;
generate_mineral(/obj/item/stack/sheet/mineral/uranium)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (ore_iron > 0)
ore_iron--;
generate_mineral(/obj/item/stack/sheet/metal)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 1 && selected_clown == 0)
if (ore_iron > 0 && ore_plasma > 0)
ore_iron--;
ore_plasma--;
generate_mineral(/obj/item/stack/sheet/plasteel)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 0 && selected_plasma == 0 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 1)
if (ore_clown > 0)
ore_clown--;
generate_mineral(/obj/item/stack/sheet/mineral/bananium)
else
on = 0
continue
//THESE TWO ARE CODED FOR URIST TO USE WHEN HE GETS AROUND TO IT.
//They were coded on 18 Feb 2012. If you're reading this in 2015, then firstly congratulations on the world not ending on 21 Dec 2012 and secondly, Urist is apparently VERY lazy. ~Errorage
/*if (selected_glass == 0 && selected_gold == 0 && selected_silver == 0 && selected_diamond == 1 && selected_plasma == 0 && selected_uranium == 1 && selected_iron == 0 && selected_clown == 0)
if (ore_uranium >= 2 && ore_diamond >= 1)
ore_uranium -= 2
ore_diamond -= 1
generate_mineral(/obj/item/stack/sheet/mineral/adamantine)
else
on = 0
continue
if (selected_glass == 0 && selected_gold == 0 && selected_silver == 1 && selected_diamond == 0 && selected_plasma == 1 && selected_uranium == 0 && selected_iron == 0 && selected_clown == 0)
if (ore_silver >= 1 && ore_plasma >= 3)
ore_silver -= 1
ore_plasma -= 3
generate_mineral(/obj/item/stack/sheet/mineral/mythril)
else
on = 0
continue*/
if (!src.output || !src.input) return
var/list/tick_alloys = list()
//if a non valid combination is selected
//Grab some more ore to process this tick.
for(var/i = 0,i<sheets_per_tick,i++)
var/obj/item/weapon/ore/O = locate() in input.loc
if(!O) break
if(!isnull(ores_stored[O.oretag])) ores_stored[O.oretag]++
O.loc = null
var/b = 1 //this part checks if all required ores are available
if(!active)
return
if (!(selected_gold || selected_silver ||selected_diamond || selected_uranium | selected_plasma || selected_iron || selected_iron))
b = 0
//Process our stored ores and spit out sheets.
var/sheets = 0
for(var/metal in ores_stored)
if (selected_gold == 1)
if (ore_gold <= 0)
b = 0
if (selected_silver == 1)
if (ore_silver <= 0)
b = 0
if (selected_diamond == 1)
if (ore_diamond <= 0)
b = 0
if (selected_uranium == 1)
if (ore_uranium <= 0)
b = 0
if (selected_plasma == 1)
if (ore_plasma <= 0)
b = 0
if (selected_iron == 1)
if (ore_iron <= 0)
b = 0
if (selected_glass == 1)
if (ore_glass <= 0)
b = 0
if (selected_clown == 1)
if (ore_clown <= 0)
b = 0
if(sheets >= sheets_per_tick) break
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
var/datum/ore/O = ore_data[metal]
if(!O) continue
if(ores_processing[metal] == 3 && O.alloy) //Alloying.
for(var/datum/alloy/A in alloy_data)
if(A.metaltag in tick_alloys)
continue
tick_alloys += A.metaltag
var/enough_metal
if(!isnull(A.requires[metal]) && ores_stored[metal] >= A.requires[metal]) //We have enough of our first metal, we're off to a good start.
enough_metal = 1
for(var/needs_metal in A.requires)
//Check if we're alloying the needed metal and have it stored.
if(ores_processing[needs_metal] != 3 || ores_stored[needs_metal] < A.requires[needs_metal])
enough_metal = 0
break
if(!enough_metal)
continue
else
var/total
for(var/needs_metal in A.requires)
ores_stored[needs_metal] -= A.requires[needs_metal]
total += A.requires[needs_metal]
total = max(1,round(total*A.product_mod)) //Always get at least one sheet.
sheets += total-1
for(var/i=0,i<total,i++)
new A.product(output.loc)
else if(ores_processing[metal] == 2 && O.compresses_to) //Compressing.
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
if(can_make%2>0) can_make--
if(!can_make || ores_stored[metal] < 1)
continue
for(var/i=0,i<can_make,i+=2)
ores_stored[metal]-=2
sheets+=2
new O.compresses_to(output.loc)
else if(ores_processing[metal] == 1 && O.smelts_to) //Smelting.
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
if(!can_make || ores_stored[metal] < 1)
continue
for(var/i=0,i<can_make,i++)
ores_stored[metal]--
sheets++
new O.smelts_to(output.loc)
if (b) //if they are, deduct one from each, produce slag and shut the machine off
if (selected_gold == 1)
ore_gold--
if (selected_silver == 1)
ore_silver--
if (selected_diamond == 1)
ore_diamond--
if (selected_uranium == 1)
ore_uranium--
if (selected_plasma == 1)
ore_plasma--
if (selected_iron == 1)
ore_iron--
if (selected_clown == 1)
ore_clown--
generate_mineral(/obj/item/weapon/ore/slag)
on = 0
else
ores_stored[metal]--
sheets++
new /obj/item/weapon/ore/slag(output.loc)
on = 0
break
break
else
continue
break
var/turf/T = get_step(src,input_dir)
if(T)
var/n = 0
for(var/obj/item/O in T)
n++
if(n>10)
break
if (istype(O,/obj/item/weapon/ore/iron))
ore_iron++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/glass))
ore_glass++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/diamond))
ore_diamond++;
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/plasma))
ore_plasma++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/gold))
ore_gold++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/silver))
ore_silver++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/uranium))
ore_uranium++
O.loc = null
continue
if (istype(O,/obj/item/weapon/ore/bananium))
ore_clown++
O.loc = null
continue
unload_mineral(O)
console.updateUsrDialog()
/obj/machinery/mineral/processing_unit/proc/generate_mineral(var/P)
var/O = new P(src)
unload_mineral(O)
+47 -86
View File
@@ -4,62 +4,53 @@
name = "stacking machine console"
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "console"
density = 1
density = 0
anchored = 1
var/obj/machinery/mineral/stacking_machine/machine = null
var/machinedir = SOUTHEAST
/obj/machinery/mineral/stacking_unit_console/New()
..()
spawn(7)
src.machine = locate(/obj/machinery/mineral/stacking_machine, get_step(src, machinedir))
if (machine)
machine.console = src
machine.CONSOLE = src
else
del(src)
qdel(src)
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
add_fingerprint(user)
interact(user)
/obj/machinery/mineral/stacking_unit_console/interact(mob/user)
user.set_machine(src)
/obj/machinery/mineral/stacking_unit_console/attack_hand(user as mob)
var/obj/item/stack/sheet/s
var/dat
dat += text("<h1>Stacking unit console</h1><hr><table>")
dat += text("<b>Stacking unit console</b><br><br>")
for(var/stacktype in machine.stack_storage)
if(machine.stack_storage[stacktype] > 0)
dat += "<tr><td width = 150><b>[capitalize(stacktype)]:</b></td><td width = 30>[machine.stack_storage[stacktype]]</td><td width = 50><A href='?src=\ref[src];release_stack=[stacktype]'>\[release\]</a></td></tr>"
dat += "</table><hr>"
dat += text("<br>Stacking: [machine.stack_amt] <A href='?src=\ref[src];change_stack=1'>\[change\]</a><br><br>")
for(var/O in machine.stack_list)
s = machine.stack_list[O]
if(s.amount > 0)
dat += text("[capitalize(s.name)]: [s.amount] <A href='?src=\ref[src];release=[s.type]'>Release</A><br>")
dat += text("<br>Stacking: [machine.stack_amt]<br><br>")
user << browse("[dat]", "window=console_stacking_machine")
onclose(user, "console_stacking_machine")
return
/obj/machinery/mineral/stacking_unit_console/Topic(href, href_list)
if(..())
return
if(href_list["change_stack"])
var/choice = input("What would you like to set the stack amount to?") as null|anything in list(1,5,10,20,50)
if(!choice) return
machine.stack_amt = choice
if(href_list["release_stack"])
if(machine.stack_storage[href_list["release_stack"]] > 0)
var/stacktype = machine.stack_paths[href_list["release_stack"]]
var/obj/item/stack/sheet/S = new stacktype (get_turf(machine.output))
S.amount = machine.stack_storage[href_list["release_stack"]]
machine.stack_storage[href_list["release_stack"]] = 0
usr.set_machine(src)
src.add_fingerprint(usr)
src.updateUsrDialog()
if(href_list["release"])
if(!(text2path(href_list["release"]) in machine.stack_list)) return //someone tried to spawn materials by spoofing hrefs
var/obj/item/stack/sheet/inp = machine.stack_list[text2path(href_list["release"])]
var/obj/item/stack/sheet/out = new inp.type()
out.amount = inp.amount
inp.amount = 0
machine.unload_mineral(out)
src.updateUsrDialog()
return
/**********************Mineral stacking unit**************************/
@@ -71,61 +62,31 @@
icon_state = "stacker"
density = 1
anchored = 1.0
var/obj/machinery/mineral/stacking_unit_console/console
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
var/list/stack_storage[0]
var/list/stack_paths[0]
var/stack_amt = 50; // Amount to stack before releassing
var/obj/machinery/mineral/stacking_unit_console/CONSOLE
var/stk_types = list()
var/stk_amt = list()
var/stack_list[0] //Key: Type. Value: Instance of type.
var/stack_amt = 50; //ammount to stack before releassing
input_dir = EAST
output_dir = WEST
/obj/machinery/mineral/stacking_machine/New()
..()
for(var/stacktype in typesof(/obj/item/stack/sheet/mineral)-/obj/item/stack/sheet/mineral)
var/obj/item/stack/S = new stacktype(src)
stack_storage[S.name] = 0
stack_paths[S.name] = stacktype
del(S)
stack_storage["glass"] = 0
stack_paths["glass"] = /obj/item/stack/sheet/glass
stack_storage["metal"] = 0
stack_paths["metal"] = /obj/item/stack/sheet/metal
stack_storage["plasteel"] = 0
stack_paths["plasteel"] = /obj/item/stack/sheet/plasteel
spawn( 5 )
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
return
return
/obj/machinery/mineral/stacking_machine/proc/process_sheet(obj/item/stack/sheet/inp)
if(!(inp.type in stack_list)) //It's the first of this sheet added
var/obj/item/stack/sheet/s = new inp.type(src,0)
s.amount = 0
stack_list[inp.type] = s
var/obj/item/stack/sheet/storage = stack_list[inp.type]
storage.amount += inp.amount //Stack the sheets
inp.loc = null //Let the old sheet garbage collect
while(storage.amount > stack_amt) //Get rid of excessive stackage
var/obj/item/stack/sheet/out = new inp.type()
out.amount = stack_amt
unload_mineral(out)
storage.amount -= stack_amt
/obj/machinery/mineral/stacking_machine/process()
if (src.output && src.input)
var/turf/T = get_turf(input)
for(var/obj/item/O in T.contents)
if(!O) return
if(istype(O,/obj/item/stack))
if(!isnull(stack_storage[O.name]))
stack_storage[O.name]++
O.loc = null
else
O.loc = output.loc
else
O.loc = output.loc
//Output amounts that are past stack_amt.
for(var/sheet in stack_storage)
if(stack_storage[sheet] >= stack_amt)
var/stacktype = stack_paths[sheet]
var/obj/item/stack/sheet/S = new stacktype (get_turf(output))
S.amount = stack_amt
stack_storage[sheet] -= stack_amt
console.updateUsrDialog()
return
var/turf/T = get_step(src, input_dir)
if(T)
for(var/obj/item/stack/sheet/S in T)
process_sheet(S)
+16 -34
View File
@@ -7,40 +7,22 @@
icon_state = "unloader"
density = 1
anchored = 1.0
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
/obj/machinery/mineral/unloading_machine/New()
..()
spawn( 5 )
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
return
return
input_dir = WEST
output_dir = EAST
/obj/machinery/mineral/unloading_machine/process()
if (src.output && src.input)
if (locate(/obj/structure/ore_box, input.loc))
var/obj/structure/ore_box/BOX = locate(/obj/structure/ore_box, input.loc)
var/i = 0
for (var/obj/item/weapon/ore/O in BOX.contents)
BOX.contents -= O
O.loc = output.loc
i++
if (i>=10)
var/turf/T = get_step(src,input_dir)
if(T)
var/limit
for(var/obj/structure/ore_box/B in T)
for (var/obj/item/weapon/ore/O in B)
B.contents -= O
unload_mineral(O)
limit++
if (limit>=10)
return
if (locate(/obj/item, input.loc))
var/obj/item/O
var/i
for (i = 0; i<10; i++)
O = locate(/obj/item, input.loc)
if (O)
O.loc = src.output.loc
else
return
return
for(var/obj/item/I in T)
unload_mineral(I)
limit++
if (limit>=10)
return
+14
View File
@@ -6,11 +6,25 @@
/area/mine/explored
name = "Mine"
icon_state = "explored"
music = null
always_unpowered = 1
requires_power = 1
poweralm = 0
power_environ = 0
power_equip = 0
power_light = 0
ambientsounds = list('sound/ambience/ambimine.ogg')
/area/mine/unexplored
name = "Mine"
icon_state = "unexplored"
music = null
always_unpowered = 1
requires_power = 1
poweralm = 0
power_environ = 0
power_equip = 0
power_light = 0
ambientsounds = list('sound/ambience/ambimine.ogg')
/area/mine/lobby
+60 -80
View File
@@ -68,96 +68,76 @@
var/excavation_amount = 100
proc/playDigSound()
/obj/item/weapon/pickaxe/proc/playDigSound()
playsound(src, pick(digsound),20,1)
hammer
name = "sledgehammer"
//icon_state = "sledgehammer" Waiting on sprite
desc = "A mining hammer made of reinforced metal. You feel like smashing your boss in the face with this."
/obj/item/weapon/pickaxe/diamond
name = "diamond-tipped pickaxe"
icon_state = "dpickaxe"
item_state = "dpickaxe"
digspeed = 20 //mines twice as fast as a normal pickaxe, bought from mining vendor
origin_tech = "materials=4;engineering=3"
desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt."
silver
name = "silver pickaxe"
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30
origin_tech = "materials=3"
desc = "This makes no metallurgic sense."
/obj/item/weapon/pickaxe/drill
name = "mining drill"
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 25 //available from roundstart, faster than a pickaxe.
digsound = list('sound/weapons/drill.ogg')
hitsound = 'sound/weapons/drill.ogg'
origin_tech = "materials=2;powerstorage=3;engineering=2"
desc = "An electric mining drill for the especially scrawny."
drill
name = "mining drill" // Can dig sand as well!
icon_state = "handdrill"
item_state = "jackhammer"
digspeed = 30
hitsound = 'sound/weapons/drill.ogg'
digsound = list('sound/weapons/drill.ogg')
origin_tech = "materials=2;powerstorage=3;engineering=2"
desc = "Yours is the drill that will pierce through the rock walls."
/obj/item/weapon/pickaxe/drill/cyborg
name = "cyborg mining drill"
desc = "An integrated electric mining drill."
flags = NODROP
jackhammer
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 15 //faster than drill, but cannot dig
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
digsound = list('sound/weapons/sonic_jackhammer.ogg')
origin_tech = "materials=3;powerstorage=2;engineering=2"
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
/obj/item/weapon/pickaxe/drill/diamonddrill
name = "diamond-tipped mining drill"
icon_state = "diamonddrill"
digspeed = 10
origin_tech = "materials=6;powerstorage=4;engineering=5"
desc = "Yours is the drill that will pierce the heavens!"
gold
name = "golden pickaxe"
icon_state = "gpickaxe"
item_state = "gpickaxe"
digspeed = 20
origin_tech = "materials=4"
desc = "This makes no metallurgic sense."
/obj/item/weapon/pickaxe/diamonddrill/traitor //Pocket-sized traitor diamond drill.
name = "supermatter drill"
icon_state = "smdrill"
origin_tech = "materials=6;powerstorage=4;engineering=5;syndicate=3"
desc = "Microscopic supermatter crystals cover the head of this tiny drill."
w_class = 2.0
plasmacutter
name = "plasma cutter"
icon_state = "plasmacutter"
item_state = "gun"
w_class = 3.0 //it is smaller than the pickaxe
damtype = "fire"
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
hitsound = 'sound/weapons/plasma_cutter.ogg'
digsound = list('sound/weapons/plasma_cutter.ogg')
origin_tech = "materials=4;plasmatech=3;engineering=3"
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
/obj/item/weapon/pickaxe/drill/cyborg/diamond //This is the BORG version!
name = "diamond-tipped cyborg mining drill" //To inherit the NODROP flag, and easier to change borg specific drill mechanics.
icon_state = "diamonddrill"
digspeed = 10
diamond
name = "diamond pickaxe"
icon_state = "dpickaxe"
item_state = "dpickaxe"
digspeed = 10
origin_tech = "materials=6;engineering=4"
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
/obj/item/weapon/pickaxe/drill/jackhammer
name = "sonic jackhammer"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 5 //the epitome of powertools. extremely fast mining, laughs at puny walls
origin_tech = "materials=3;powerstorage=2;engineering=2"
digsound = list('sound/weapons/sonic_jackhammer.ogg')
hitsound = 'sound/weapons/sonic_jackhammer.ogg'
desc = "Cracks rocks with sonic blasts, and doubles as a demolition power tool for smashing walls."
diamonddrill //When people ask about the badass leader of the mining tools, they are talking about ME!
name = "diamond mining drill"
icon_state = "diamonddrill"
item_state = "jackhammer"
digspeed = 5 //Digs through walls, girders, and can dig up sand
origin_tech = "materials=6;powerstorage=4;engineering=5"
hitsound = 'sound/weapons/drill.ogg'
digsound = list('sound/weapons/drill.ogg')
desc = "Yours is the drill that will pierce the heavens!"
traitor //Pocket-sized traitor diamond drill.
name = "supermatter drill"
icon_state = "smdrill"
origin_tech = "materials=6;powerstorage=4;engineering=5;syndicate=3"
desc = "Microscopic supermatter crystals cover the head of this tiny drill."
w_class = 2.0
borgdrill
name = "cyborg mining drill"
icon_state = "jackhammer"
item_state = "jackhammer"
digspeed = 15
hitsound = 'sound/weapons/drill.ogg'
digsound = list('sound/weapons/drill.ogg')
desc = ""
/obj/item/weapon/pickaxe/silver
name = "silver pickaxe"
icon_state = "spickaxe"
item_state = "spickaxe"
digspeed = 30
origin_tech = "materials=3"
desc = "This makes no metallurgic sense."
/obj/item/weapon/pickaxe/gold
name = "golden pickaxe"
icon_state = "gpickaxe"
item_state = "gpickaxe"
digspeed = 20
origin_tech = "materials=4"
desc = "This makes no metallurgic sense."
/*****************************Shovel********************************/
/obj/item/weapon/shovel
File diff suppressed because it is too large Load Diff
+116 -137
View File
@@ -7,8 +7,6 @@
icon_state = "coinpress0"
density = 1
anchored = 1.0
var/obj/machinery/mineral/input = null
var/obj/machinery/mineral/output = null
var/amt_silver = 0 //amount of silver
var/amt_gold = 0 //amount of gold
var/amt_diamond = 0
@@ -16,65 +14,45 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_adamantine = 0
var/amt_mythril = 0
var/newCoins = 0 //how many coins the machine made in it's last load
var/processing = 0
var/chosen = "metal" //which material will be used to make coins
var/coinsToProduce = 10
/obj/machinery/mineral/mint/New()
..()
spawn( 5 )
for (var/dir in cardinal)
src.input = locate(/obj/machinery/mineral/input, get_step(src, dir))
if(src.input) break
for (var/dir in cardinal)
src.output = locate(/obj/machinery/mineral/output, get_step(src, dir))
if(src.output) break
processing_objects.Add(src)
return
return
/obj/machinery/mineral/mint/process()
if ( src.input)
var/obj/item/stack/sheet/O
O = locate(/obj/item/stack/sheet, input.loc)
if(O)
if (istype(O,/obj/item/stack/sheet/mineral/gold))
var/turf/T = get_step(src,input_dir)
if(T)
for(var/obj/item/stack/sheet/O in T)
if (istype(O, /obj/item/stack/sheet/mineral/gold))
amt_gold += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/silver))
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/silver))
amt_silver += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/diamond))
amt_diamond += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/plasma))
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/plasma))
amt_plasma += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/uranium))
amt_uranium += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/metal))
O.loc = null
if (istype(O, /obj/item/stack/sheet/metal))
amt_iron += 100 * O.amount
del(O)
if (istype(O,/obj/item/stack/sheet/mineral/clown))
O.loc = null
if (istype(O, /obj/item/stack/sheet/mineral/bananium))
amt_clown += 100 * O.amount
del(O)
O.loc = null
return
/obj/machinery/mineral/mint/attack_hand(user as mob) //TODO: Adamantine coins! -Durandan
var/dat = "<b>Coin Press</b><br>"
if (!input)
dat += text("input connection status: ")
dat += text("<b><font color='red'>NOT CONNECTED</font></b><br>")
if (!output)
dat += text("<br>output connection status: ")
dat += text("<b><font color='red'>NOT CONNECTED</font></b><br>")
dat += text("<br><font color='#ffcc00'><b>Gold inserted: </b>[amt_gold]</font> ")
if (chosen == "gold")
dat += text("chosen")
@@ -111,6 +89,11 @@
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=clown'>Choose</A>")
dat += text("<br><font color='#888888'><b>Adamantine inserted: </b>[amt_adamantine]</font> ")//I don't even know these color codes, so fuck it.
if (chosen == "adamantine")
dat += text("chosen")
else
dat += text("<A href='?src=\ref[src];choose=adamantine'>Choose</A>")
dat += text("<br><br>Will produce [coinsToProduce] [chosen] coins if enough materials are available.<br>")
//dat += text("The dial which controls the number of conins to produce seems to be stuck. A technician has already been dispatched to fix this.")
@@ -131,105 +114,101 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(processing==1)
usr << "\blue The machine is processing."
usr << "<span class='notice'>The machine is processing.</span>"
return
if(href_list["choose"])
chosen = href_list["choose"]
if(href_list["chooseAmt"])
coinsToProduce = between(0, coinsToProduce + text2num(href_list["chooseAmt"]), 1000)
coinsToProduce = Clamp(coinsToProduce + text2num(href_list["chooseAmt"]), 0, 1000)
if(href_list["makeCoins"])
var/temp_coins = coinsToProduce
if (src.output)
processing = 1;
icon_state = "coinpress1"
var/obj/item/weapon/moneybag/M
switch(chosen)
if("metal")
while(amt_iron > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new/obj/item/weapon/coin/iron(M)
amt_iron -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("gold")
while(amt_gold > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/gold(M)
amt_gold -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("silver")
while(amt_silver > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/silver(M)
amt_silver -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("diamond")
while(amt_diamond > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/diamond(M)
amt_diamond -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("plasma")
while(amt_plasma > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/plasma(M)
amt_plasma -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("uranium")
while(amt_uranium > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/uranium(M)
amt_uranium -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5)
if("clown")
while(amt_clown > 0 && coinsToProduce > 0)
if (locate(/obj/item/weapon/moneybag,output.loc))
M = locate(/obj/item/weapon/moneybag,output.loc)
else
M = new/obj/item/weapon/moneybag(output.loc)
new /obj/item/weapon/coin/clown(M)
amt_clown -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
icon_state = "coinpress0"
processing = 0;
coinsToProduce = temp_coins
processing = 1;
icon_state = "coinpress1"
switch(chosen)
if("metal")
while(amt_iron > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/iron)
amt_iron -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("gold")
while(amt_gold > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/gold)
amt_gold -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("silver")
while(amt_silver > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/silver)
amt_silver -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("diamond")
while(amt_diamond > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/diamond)
amt_diamond -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("plasma")
while(amt_plasma > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/plasma)
amt_plasma -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("uranium")
while(amt_uranium > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/uranium)
amt_uranium -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5)
if("clown")
while(amt_clown > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/clown)
amt_clown -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("adamantine")
while(amt_adamantine > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/adamantine)
amt_adamantine -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
if("mythril")
while(amt_adamantine > 0 && coinsToProduce > 0)
create_coins(/obj/item/weapon/coin/mythril)
amt_mythril -= 20
coinsToProduce--
newCoins++
src.updateUsrDialog()
sleep(5);
icon_state = "coinpress0"
processing = 0;
coinsToProduce = temp_coins
src.updateUsrDialog()
return
return
/obj/machinery/mineral/mint/proc/create_coins(var/P)
var/turf/T = get_step(src,output_dir)
if(T)
var/obj/item/O = new P(src)
var/obj/item/weapon/moneybag/M = locate(/obj/item/weapon/moneybag/, T)
if(!M)
M = new /obj/item/weapon/moneybag(src)
unload_mineral(M)
O.loc = M
+14 -28
View File
@@ -6,7 +6,7 @@
icon_state = "moneybag"
flags = CONDUCT
force = 10.0
throwforce = 2.0
throwforce = 0
w_class = 4.0
/obj/item/weapon/moneybag/attack_hand(user as mob)
@@ -17,6 +17,7 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_adamantine = 0
for (var/obj/item/weapon/coin/C in contents)
if (istype(C,/obj/item/weapon/coin/diamond))
@@ -33,6 +34,8 @@
amt_uranium++;
if (istype(C,/obj/item/weapon/coin/clown))
amt_clown++;
if (istype(C,/obj/item/weapon/coin/adamantine))
amt_adamantine++;
var/dat = text("<b>The contents of the moneybag reveal...</b><br>")
if (amt_gold)
@@ -49,41 +52,23 @@
dat += text("Uranium coins: [amt_uranium] <A href='?src=\ref[src];remove=uranium'>Remove one</A><br>")
if (amt_clown)
dat += text("Bananium coins: [amt_clown] <A href='?src=\ref[src];remove=clown'>Remove one</A><br>")
/*
var/credits=0
var/list/ore=list()
for(var/oredata in typesof(/datum/material) - /datum/material)
var/datum/material/ore_datum = new oredata
ore[ore_datum.id]=ore_datum
for (var/obj/item/weapon/coin/C in contents)
if (istype(C,/obj/item/weapon/coin))
var/datum/material/ore_info=ore[C.material]
ore_info.stored++
ore[C.material]=ore_info
credits += C.credits
var/dat = "<b>The contents of the moneybag reveal...</b><ul>"
for(var/ore_id in ore)
var/datum/material/ore_info=ore[ore_id]
if(ore_info.stored)
dat += "<li>[ore_info.processed_name] coins: [ore_info.stored] <A href='?src=\ref[src];remove=[ore_id]'>Remove one</A></li>"
dat += "</ul><b>Total haul:</b> $[credits]"
*/
if (amt_adamantine)
dat += text("Adamantine coins: [amt_adamantine] <A href='?src=\ref[src];remove=adamantine'>Remove one</A><br>")
user << browse("[dat]", "window=moneybag")
/obj/item/weapon/moneybag/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
user << "\blue You add the [C.name] into the bag."
usr.drop_item()
if(!user.drop_item())
return
user << "<span class='notice'>You add the [C.name] into the bag.</span>"
contents += C
if (istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
for (var/obj/O in C.contents)
contents += O;
user << "\blue You empty the [C.name] into the bag."
user << "<span class='notice'>You empty the [C.name] into the bag.</span>"
return
/obj/item/weapon/moneybag/Topic(href, href_list)
@@ -108,13 +93,13 @@
COIN = locate(/obj/item/weapon/coin/uranium,src.contents)
if("clown")
COIN = locate(/obj/item/weapon/coin/clown,src.contents)
if("adamantine")
COIN = locate(/obj/item/weapon/coin/adamantine,src.contents)
if(!COIN)
return
COIN.loc = src.loc
return
/obj/item/weapon/moneybag/vault
/obj/item/weapon/moneybag/vault/New()
@@ -124,4 +109,5 @@
new /obj/item/weapon/coin/silver(src)
new /obj/item/weapon/coin/silver(src)
new /obj/item/weapon/coin/gold(src)
new /obj/item/weapon/coin/gold(src)
new /obj/item/weapon/coin/gold(src)
new /obj/item/weapon/coin/adamantine(src)
+163 -46
View File
@@ -1,94 +1,211 @@
/obj/item/weapon/ore
name = "rock"
icon = 'icons/obj/mining.dmi'
icon_state = "ore2"
icon_state = "ore"
var/points = 0 //How many points this ore gets you from the ore redemption machine
var/refined_type = null //What this ore defaults to being refined into
var/datum/geosample/geologic_data
var/oretag
/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))
new refined_type(get_turf(src.loc))
qdel(src)
else if(W.isOn())
user << "<span class='info'>Not enough fuel to smelt [src].</span>"
..()
/obj/item/weapon/ore/uranium
name = "pitchblende"
name = "uranium ore"
icon_state = "Uranium ore"
origin_tech = "materials=5"
oretag = "uranium"
points = 18
refined_type = /obj/item/stack/sheet/mineral/uranium
/obj/item/weapon/ore/iron
name = "hematite"
name = "iron ore"
icon_state = "Iron ore"
origin_tech = "materials=1"
oretag = "hematite"
/obj/item/weapon/ore/coal
name = "carbonaceous rock"
icon_state = "Iron ore" //TODO
origin_tech = "materials=1"
oretag = "coal"
points = 1
refined_type = /obj/item/stack/sheet/metal
/obj/item/weapon/ore/glass
name = "impure silicates"
name = "sand pile"
icon_state = "Glass ore"
origin_tech = "materials=1"
oretag = "sand"
points = 1
refined_type = /obj/item/stack/sheet/glass
/obj/item/weapon/ore/glass/attack_self(mob/living/user as mob)
user << "<span class='notice'>You use the sand to make sandstone.</span>"
var/sandAmt = 1
for(var/obj/item/weapon/ore/glass/G in user.loc) // The sand on the floor
sandAmt += 1
qdel(G)
while(sandAmt > 0)
var/obj/item/stack/sheet/mineral/sandstone/SS = new /obj/item/stack/sheet/mineral/sandstone(user.loc)
if(sandAmt >= SS.max_amount)
SS.amount = SS.max_amount
else
SS.amount = sandAmt
for(var/obj/item/stack/sheet/mineral/sandstone/SA in user.loc)
if(SA != SS && SA.amount < SA.max_amount)
SA.attackby(SS, user) //we try to transfer all old unfinished stacks to the new stack we created.
sandAmt -= SS.max_amount
qdel(src)
return
/obj/item/weapon/ore/plasma
name = "plasma crystals"
name = "plasma ore"
icon_state = "Plasma ore"
origin_tech = "materials=2"
oretag = "plasma"
points = 36
refined_type = /obj/item/stack/sheet/mineral/plasma
/obj/item/weapon/ore/plasma/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.welding)
user << "<span class='warning'>You can't hit a high enough temperature to smelt [src] properly!</span>"
else
..()
/obj/item/weapon/ore/silver
name = "native silver ore"
name = "silver ore"
icon_state = "Silver ore"
origin_tech = "materials=3"
oretag = "silver"
points = 18
refined_type = /obj/item/stack/sheet/mineral/silver
/obj/item/weapon/ore/gold
name = "native gold ore"
name = "gold ore"
icon_state = "Gold ore"
origin_tech = "materials=4"
oretag = "gold"
points = 18
refined_type = /obj/item/stack/sheet/mineral/gold
/obj/item/weapon/ore/diamond
name = "diamonds"
name = "diamond ore"
icon_state = "Diamond ore"
origin_tech = "materials=6"
oretag = "diamond"
points = 36
refined_type = /obj/item/stack/sheet/mineral/diamond
/obj/item/weapon/ore/osmium
name = "raw platinum"
icon_state = "slag" //TODO
oretag = "platinum"
/obj/item/weapon/ore/hydrogen
name = "raw hydrogen"
icon_state = "slag" //TODO
oretag = "hydrogen"
/obj/item/weapon/ore/clown
name = "Bananium ore"
/obj/item/weapon/ore/bananium
name = "bananium ore"
icon_state = "Clown ore"
origin_tech = "materials=4"
oretag="clown"
/obj/item/weapon/ore/fabric
name = "fabric"
icon_state = "fabric"
origin_tech = "materials=1"
oretag = "fabric"
points = 27
refined_type = /obj/item/stack/sheet/mineral/bananium
/obj/item/weapon/ore/slag
name = "Slag"
name = "slag"
desc = "Completely useless"
icon_state = "slag"
oretag = "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"
icon_override = 'icons/mob/in-hand/tools.dmi'
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
var/attacher = "UNKNOWN"
var/datum/wires/explosive/gibtonite/wires
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
if(!wires && istype(I, /obj/item/device/assembly/igniter))
user.visible_message("[user] attaches [I] to [src].", "<span class='notice'>You attach [I] to [src].</span>")
wires = new(src)
attacher = key_name(user)
qdel(I)
overlays += "Gibtonite_igniter"
return
if(wires && !primed)
if(istype(I, /obj/item/weapon/wirecutters) || istype(I, /obj/item/device/multitool) || istype(I, /obj/item/device/assembly/signaler))
wires.Interact(user)
return
if(istype(I, /obj/item/weapon/pickaxe) || istype(I, /obj/item/weapon/resonator) || I.force >= 10)
GibtoniteReaction(user)
return
if(primed)
if(istype(I, /obj/item/device/mining_scanner) || istype(I, /obj/item/device/t_scanner/adv_mining_scanner) || istype(I, /obj/item/device/multitool))
primed = 0
user.visible_message("The chain reaction was stopped! ...The ore's quality looks diminished.", "<span class='notice'>You stopped the chain reaction. ...The ore's quality looks diminished.</span>")
icon_state = "Gibtonite ore"
quality = 1
return
..()
/obj/item/weapon/twohanded/required/gibtonite/attack_self(user)
if(wires)
wires.Interact(user)
else
..()
/obj/item/weapon/twohanded/required/gibtonite/bullet_act(var/obj/item/projectile/P)
GibtoniteReaction(P.firer)
..()
/obj/item/weapon/twohanded/required/gibtonite/ex_act()
GibtoniteReaction(null, 1)
/obj/item/weapon/twohanded/required/gibtonite/proc/GibtoniteReaction(mob/user, triggered_by = 0)
if(!primed)
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
primed = 1
icon_state = "Gibtonite active"
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)
if(triggered_by == 1)
message_admins("An explosion 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>.")
else if(triggered_by == 2)
message_admins("A signal 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>. Igniter attacher: [key_name_admin(attacher)]<A HREF='?_src_=holder;adminmoreinfo=\ref[attacher]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[attacher]'>FLW</A>)")
else
message_admins("[key_name_admin(user)]<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A> (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</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>.")
if(triggered_by == 1)
log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
else if(triggered_by == 2)
log_game("A signal has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z]). Igniter attacher: [key_name(attacher)].")
else
user.visible_message("<span class='warning'>[user] strikes \the [src], causing a chain reaction!</span>", "<span class='danger'>You strike \the [src], causing a chain reaction.</span>")
log_game("[key_name(user)] 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)
qdel(src)
/obj/item/weapon/ore/New()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
if(src.z == ZLEVEL_ASTEROID) score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
if(src.z == ZLEVEL_ASTEROID)
score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
/obj/item/weapon/ore/ex_act()
return
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(istype(W,/obj/item/device/core_sampler))
var/obj/item/device/core_sampler/C = W
C.sample_item(src, user)
else
return ..()
return ..()
+71 -108
View File
@@ -4,9 +4,25 @@
/obj/structure/ore_box
icon = 'icons/obj/mining.dmi'
icon_state = "orebox0"
name = "Ore Box"
desc = "A heavy box used for storing ore."
name = "ore box"
desc = "A heavy wooden box, which can be filled with a lot of ores."
density = 1
pressure_resistance = 5*ONE_ATMOSPHERE
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/ore))
if(!user.drop_item())
return
W.loc = src
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
S.hide_from(usr)
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
user << "<span class='notice'>You empty the satchel into the box.</span>"
return
/obj/structure/ore_box/attack_hand(mob/user as mob)
var/amt_gold = 0
var/amt_silver = 0
var/amt_diamond = 0
@@ -15,71 +31,64 @@
var/amt_plasma = 0
var/amt_uranium = 0
var/amt_clown = 0
var/amt_strange = 0
var/last_update = 0
/obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
if (istype(W, /obj/item/weapon/ore))
user.unEquip(W)
src.contents += W
if (istype(W, /obj/item/weapon/storage))
var/obj/item/weapon/storage/S = W
S.hide_from(usr)
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
user << "\blue You empty the satchel into the box."
return
for (var/obj/item/weapon/ore/C in contents)
if (istype(C,/obj/item/weapon/ore/diamond))
amt_diamond++;
if (istype(C,/obj/item/weapon/ore/glass))
amt_glass++;
if (istype(C,/obj/item/weapon/ore/plasma))
amt_plasma++;
if (istype(C,/obj/item/weapon/ore/iron))
amt_iron++;
if (istype(C,/obj/item/weapon/ore/silver))
amt_silver++;
if (istype(C,/obj/item/weapon/ore/gold))
amt_gold++;
if (istype(C,/obj/item/weapon/ore/uranium))
amt_uranium++;
if (istype(C,/obj/item/weapon/ore/bananium))
amt_clown++;
/obj/structure/ore_box/examine()
set name = "Examine"
set category = "IC"
set src in view(usr.client) //If it can be seen, it can be examined.
if (!( usr ))
return
usr << "That's an [src]."
usr << desc
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can check the contents of ore boxes.
return
if(!Adjacent(usr)) //Can only check the contents of ore boxes if you can physically reach them.
return
add_fingerprint(usr)
if(contents.len < 1)
usr << "It is empty."
return
if(world.time > last_update + 10)
update_orecount()
last_update = world.time
var/dat = text("<b>The contents of the ore box reveal...</b>")
if (amt_iron)
dat += text("<br>Metal ore: [amt_iron]")
if (amt_glass)
dat += text("<br>Sand: [amt_glass]")
if (amt_plasma)
dat += text("<br>Plasma ore: [amt_plasma]")
if (amt_uranium)
dat += text("<br>Uranium ore: [amt_uranium]")
if (amt_silver)
dat += text("<br>Silver ore: [amt_silver]")
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
if (amt_gold)
dat += text("<br>Gold ore: [amt_gold]")
dat += text("Gold ore: [amt_gold]<br>")
if (amt_silver)
dat += text("Silver ore: [amt_silver]<br>")
if (amt_iron)
dat += text("Metal ore: [amt_iron]<br>")
if (amt_glass)
dat += text("Sand: [amt_glass]<br>")
if (amt_diamond)
dat += text("<br>Diamond ore: [amt_diamond]")
if (amt_strange)
dat += text("<br>Strange rocks: [amt_strange]")
dat += text("Diamond ore: [amt_diamond]<br>")
if (amt_plasma)
dat += text("Plasma ore: [amt_plasma]<br>")
if (amt_uranium)
dat += text("Uranium ore: [amt_uranium]<br>")
if (amt_clown)
dat += text("<br>Bananium ore: [amt_clown]")
usr << dat
dat += text("Bananium ore: [amt_clown]<br>")
dat += text("<br><br><A href='?src=\ref[src];removeall=1'>Empty box</A>")
user << browse("[dat]", "window=orebox")
return
/obj/structure/ore_box/Topic(href, href_list)
if(..())
return
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["removeall"])
for (var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
usr << "<span class='notice'>You empty the box.</span>"
src.updateUsrDialog()
return
obj/structure/ore_box/ex_act(severity, target)
if(prob(100 / severity) && severity < 3)
qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them
/obj/structure/ore_box/verb/empty_box()
set name = "Empty Ore Box"
@@ -87,7 +96,7 @@
set src in view(1)
if(!istype(usr, /mob/living/carbon/human)) //Only living, intelligent creatures with hands can empty ore boxes.
usr << "\red You are physically incapable of emptying the ore box."
usr << "<span class='warning'>You are physically incapable of emptying the ore box.</span>"
return
if( usr.stat || usr.restrained() )
@@ -100,58 +109,12 @@
add_fingerprint(usr)
if(contents.len < 1)
usr << "\red The ore box is empty"
usr << "<span class='warning'>The ore box is empty.</span>"
return
for (var/obj/item/weapon/ore/O in contents)
contents -= O
O.loc = src.loc
usr << "\blue You empty the ore box"
usr << "<span class='notice'>You empty the ore box.</span>"
return
// Updates ore tally
/obj/structure/ore_box/proc/update_orecount()
amt_iron = 0
amt_glass = 0
amt_plasma = 0
amt_uranium = 0
amt_silver = 0
amt_gold = 0
amt_diamond = 0
amt_strange = 0
amt_clown = 0
for(var/obj/item/weapon/ore/O in contents)
if(!istype(O))
continue
if (istype(O, /obj/item/weapon/ore/iron))
amt_iron++
continue
if (istype(O, /obj/item/weapon/ore/glass))
amt_glass++
continue
if (istype(O, /obj/item/weapon/ore/plasma))
amt_plasma++
continue
if (istype(O, /obj/item/weapon/ore/uranium))
amt_uranium++
continue
if (istype(O, /obj/item/weapon/ore/silver))
amt_silver++
continue
if (istype(O, /obj/item/weapon/ore/gold))
amt_gold++
continue
if (istype(O, /obj/item/weapon/ore/diamond))
amt_diamond++
continue
if (istype(O, /obj/item/weapon/ore/strangerock))
amt_strange++
continue
if (istype(O, /obj/item/weapon/ore/clown))
amt_clown++
continue
return
@@ -864,9 +864,9 @@ var/list/robot_verbs_default = list(
laws.show_laws(src)
src << "\red \b ALERT: [M.real_name] is your new master. Obey your new laws and his commands."
if(src.module && istype(src.module, /obj/item/weapon/robot_module/miner))
for(var/obj/item/weapon/pickaxe/borgdrill/D in src.module.modules)
for(var/obj/item/weapon/pickaxe/drill/cyborg/D in src.module.modules)
qdel(D)
src.module.modules += new /obj/item/weapon/pickaxe/diamonddrill(src.module)
src.module.modules += new /obj/item/weapon/pickaxe/drill/cyborg/diamond(src.module)
src.module.rebuild()
if(src.module && istype(src.module, /obj/item/weapon/robot_module/medical))
for(var/obj/item/weapon/borg_defib/F in src.module.modules)
@@ -314,9 +314,11 @@
src.modules += new /obj/item/borg/sight/meson(src)
src.modules += new /obj/item/weapon/wrench(src)
src.modules += new /obj/item/weapon/screwdriver(src)
src.modules += new /obj/item/weapon/storage/bag/ore(src)
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
src.modules += new /obj/item/device/t_scanner/adv_mining_scanner/cyborg(src)
src.modules += new /obj/item/weapon/storage/bag/ore/cyborg(src)
src.modules += new /obj/item/weapon/pickaxe/drill/cyborg(src)
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
src.emag = new /obj/item/borg/stun(src)
return
@@ -358,7 +360,7 @@
src.modules += new /obj/item/device/flash/cyborg(src)
src.modules += new /obj/item/borg/sight/thermal(src)
src.modules += new /obj/item/weapon/gun/energy/laser/cyborg(src)
src.modules += new /obj/item/weapon/pickaxe/plasmacutter(src)
src.modules += new /obj/item/weapon/gun/energy/plasmacutter(src)
src.modules += new /obj/item/borg/combat/shield(src)
src.modules += new /obj/item/borg/combat/mobility(src)
src.modules += new /obj/item/weapon/wrench(src) //Is a combat android really going to be stopped by a chair?
@@ -413,7 +415,7 @@
src.modules += new /obj/item/weapon/reagent_containers/spray/cleaner/drone(src)
src.modules += new /obj/item/weapon/soap(src)
src.emag = new /obj/item/weapon/pickaxe/plasmacutter(src)
src.emag = new /obj/item/weapon/gun/energy/plasmacutter(src)
src.emag.name = "Plasma Cutter"
for(var/T in stacktypes)
@@ -80,7 +80,6 @@
aggro_vision_range = 9
idle_vision_range = 2
turns_per_move = 5
var/droppeddiamond = 0 // Safety check to prevent diamond duplication bug
/obj/item/projectile/temp/basilisk
name = "freezing blast"
@@ -113,12 +112,11 @@
adjustBruteLoss(110)
/mob/living/simple_animal/hostile/asteroid/basilisk/Die()
if(!droppeddiamond)
if(stat != DEAD)
var/counter
for(counter=0, counter<2, counter++)
var/obj/item/weapon/ore/diamond/D = new /obj/item/weapon/ore/diamond(src.loc)
D.layer = 4.1
droppeddiamond = 1
..()
/mob/living/simple_animal/hostile/asteroid/goldgrub
@@ -354,7 +352,7 @@
speed = 3
maxHealth = 300
health = 300
harm_intent_damage = 0
harm_intent_damage = 1 //Only the manliest of men can kill a Goliath with only their fists.
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "pulverizes"
@@ -382,6 +380,9 @@
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
anchored = 0
if(stat != DEAD)
var/obj/item/asteroid/goliath_hide/G = new /obj/item/asteroid/goliath_hide(src.loc)
G.layer = 4.1
..()
/mob/living/simple_animal/hostile/asteroid/goliath/OpenFire()
@@ -416,7 +417,7 @@
var/turftype = get_turf(src)
if(istype(turftype, /turf/simulated/mineral))
var/turf/simulated/mineral/M = turftype
M.GetDrilled()
M.gets_drilled()
spawn(20)
Trip()
@@ -441,18 +442,14 @@
M.Stun(5)
M.adjustBruteLoss(rand(10,15))
latched = 1
visible_message("<span class='danger'>The [src.name] grabs hold of [M.name]!</span>")
if(src && M)
visible_message("<span class='danger'>The [src.name] grabs hold of [M.name]!</span>")
if(!latched)
qdel(src)
else
spawn(50)
qdel(src)
/mob/living/simple_animal/hostile/asteroid/goliath/Die()
var/obj/item/asteroid/goliath_hide/G = new /obj/item/asteroid/goliath_hide(src.loc)
G.layer = 4.1
..()
/obj/item/asteroid/goliath_hide
name = "goliath hide plates"
desc = "Pieces of a goliath's rocky hide, these might be able to make your suit a bit more durable to attack from the local fauna."
@@ -464,7 +461,7 @@
/obj/item/asteroid/goliath_hide/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining))
if(istype(target, /obj/item/clothing/suit/space/rig/mining) || istype(target, /obj/item/clothing/head/helmet/space/rig/mining) || istype(target, /obj/item/clothing/suit/space/eva/plasmaman/miner) || istype(target, /obj/item/clothing/head/helmet/space/eva/plasmaman/miner))
var/obj/item/clothing/C = target
var/current_armor = C.armor
if(current_armor.["melee"] < 80)
+6 -6
View File
@@ -87,7 +87,7 @@
var/sheet_name = "Plasma Sheets"
var/sheet_path = /obj/item/stack/sheet/mineral/plasma
var/board_path = "/obj/item/weapon/circuitboard/pacman"
var/board_path = /obj/item/weapon/circuitboard/pacman
/*
These values were chosen so that the generator can run safely up to 80 kW
@@ -369,7 +369,7 @@
sheet_path = /obj/item/stack/sheet/mineral/uranium
sheet_name = "Uranium Sheets"
time_per_sheet = 576 //same power output, but a 50 sheet stack will last 2 hours at max safe power
board_path = "/obj/item/weapon/circuitboard/pacman/super"
board_path = /obj/item/weapon/circuitboard/pacman/super
/obj/machinery/power/port_gen/pacman/super/UseFuel()
//produces a tiny amount of radiation when in use
@@ -391,10 +391,10 @@
/obj/machinery/power/port_gen/pacman/mrs
name = "M.R.S.P.A.C.M.A.N.-type Portable Generator"
desc = "An advanced power generator that runs on tritium. Rated for 200 kW maximum safe output!"
desc = "An advanced power generator that runs on diamonds. Rated for 200 kW maximum safe output!"
icon_state = "portgen2"
sheet_path = /obj/item/stack/sheet/mineral/tritium
sheet_name = "Tritium Fuel Sheets"
sheet_path = /obj/item/stack/sheet/mineral/diamond
sheet_name = "Diamond Sheets"
//I don't think tritium has any other use, so we might as well make this rewarding for players
//max safe power output (power level = 8) is 200 kW and lasts for 1 hour - 3 or 4 of these could power the station
@@ -404,7 +404,7 @@
time_per_sheet = 576
max_temperature = 800
temperature_gain = 90
board_path = "/obj/item/weapon/circuitboard/pacman/mrs"
board_path = /obj/item/weapon/circuitboard/pacman/mrs
/obj/machinery/power/port_gen/pacman/mrs/explode()
//no special effects, but the explosion is pretty big (same as a supermatter shard).
+1
View File
@@ -9,6 +9,7 @@
var/cell_type = "/obj/item/weapon/stock_parts/cell"
var/projectile_type = "/obj/item/projectile/beam"
var/modifystate
var/can_charge = 1
emp_act(severity)
power_supply.use(round(power_supply.charge / severity))
@@ -46,6 +46,7 @@
var/lightfail = 0
var/charge_tick = 0
can_flashlight = 0
can_charge = 0
New()
..()
@@ -237,11 +237,15 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
charge_cost = 5000
cell_type = "/obj/item/weapon/stock_parts/cell/emproof"
var/overheat = 0
var/overheat_time = 16
var/recent_reload = 1
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
flags = NODROP
/obj/item/weapon/gun/energy/kinetic_accelerator/Fire()
overheat = 1
spawn(20)
spawn(overheat_time)
overheat = 0
recent_reload = 0
..()
@@ -272,6 +276,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
silenced = 1
projectile_type = "/obj/item/projectile/energy/bolt"
fire_sound = 'sound/weapons/Genhit.ogg'
overheat_time = 20
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
name = "energy crossbow"
@@ -289,6 +294,49 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
origin_tech = null
m_amt = 0
/obj/item/weapon/gun/energy/plasmacutter
name = "plasma cutter"
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
icon_state = "plasmacutter"
item_state = "plasmacutter"
modifystate = "plasmacutter"
origin_tech = "combat=1;materials=3;magnets=2;plasmatech=2;engineering=1"
projectile_type = /obj/item/projectile/plasma
fire_sound = 'sound/weapons/laser.ogg'
flags = CONDUCT | OPENCONTAINER
attack_verb = list("attacked", "slashed", "cut", "sliced")
charge_cost = 250
fire_delay = 10
icon_override = 'icons/mob/in-hand/guns.dmi'
can_charge = 0
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
..()
if(power_supply)
user <<"<span class='notice'>[src] is [round(power_supply.percent())]% charged.</span>"
/obj/item/weapon/gun/energy/plasmacutter/attackby(var/obj/item/A, var/mob/user)
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
var/obj/item/stack/sheet/S = A
S.use(1)
power_supply.give(10000)
user << "<span class='notice'>You insert [A] in [src], recharging it.</span>"
else if(istype(A, /obj/item/weapon/ore/plasma))
qdel(A)
power_supply.give(5000)
user << "<span class='notice'>You insert [A] in [src], recharging it.</span>"
else
..()
/obj/item/weapon/gun/energy/plasmacutter/adv
name = "advanced plasma cutter"
icon_state = "adv_plasmacutter"
modifystate = "adv_plasmacutter"
origin_tech = "combat=3;materials=4;magnets=3;plasmatech=3;engineering=2"
projectile_type = /obj/item/projectile/plasma/adv
fire_delay = 8
charge_cost = 100
/obj/item/weapon/gun/energy/disabler
name = "disabler"
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
@@ -95,7 +95,7 @@
/obj/item/weapon/gun/projectile/shotgun/riot/attackby(var/obj/item/A as obj, mob/user as mob, params)
..()
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
@@ -154,7 +154,7 @@
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/pickaxe/plasmacutter))
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/melee/energy) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user as mob)
@@ -197,7 +197,7 @@
else
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>"
return
// Sawing guns related procs //
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user as mob)
@@ -238,4 +238,3 @@
return
else
sawn_state = SAWN_INTACT
+35 -4
View File
@@ -172,7 +172,7 @@
/obj/item/projectile/kinetic
name = "kinetic force"
icon_state = null
damage = 15
damage = 10
damage_type = BRUTE
flag = "bomb"
range = 3
@@ -185,7 +185,7 @@ obj/item/projectile/kinetic/New()
var/pressure = environment.return_pressure()
if(pressure < 50)
name = "full strength kinetic force"
damage = 30
damage *= 4
..()
/obj/item/projectile/kinetic/Range()
@@ -195,12 +195,12 @@ obj/item/projectile/kinetic/New()
qdel(src)
/obj/item/projectile/kinetic/on_hit(atom/target)
. = ..()
var/turf/target_turf= get_turf(target)
if(istype(target_turf, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target_turf
M.GetDrilled()
M.gets_drilled(firer)
new /obj/item/effect/kinetic_blast(target_turf)
..()
/obj/item/effect/kinetic_blast
name = "kinetic explosion"
@@ -239,3 +239,34 @@ obj/item/projectile/kinetic/New()
else
do_teleport(target, target, 15) //Otherwise it just warps you off somewhere.
/obj/item/projectile/plasma
name = "plasma blast"
icon_state = "plasmacutter"
damage_type = BRUTE
damage = 5
range = 1
/obj/item/projectile/plasma/New()
var/turf/proj_turf = get_turf(src)
if(!istype(proj_turf, /turf))
return
var/datum/gas_mixture/environment = proj_turf.return_air()
var/pressure = environment.return_pressure()
if(pressure < 30)
name = "full strength plasma blast"
damage *= 3
range += 3
..()
/obj/item/projectile/plasma/on_hit(var/atom/target)
if(istype(target, /turf/simulated/mineral))
var/turf/simulated/mineral/M = target
M.gets_drilled(firer)
return ..()
/obj/item/projectile/plasma/adv
range = 2
/obj/item/projectile/plasma/adv/mech
damage = 10
range = 3
+4 -4
View File
@@ -730,13 +730,13 @@
//Sheets
/obj/item/stack/sheet/mineral/plasma = list("plasma" = 20),
/obj/item/stack/sheet/mineral/uranium = list("uranium" = 20),
/obj/item/stack/sheet/mineral/clown = list("banana" = 20),
/obj/item/stack/sheet/mineral/bananium = list("banana" = 20),
/obj/item/stack/sheet/mineral/silver = list("silver" = 20),
/obj/item/stack/sheet/mineral/gold = list("gold" = 20),
/obj/item/weapon/grown/novaflower = list("capsaicin" = 0),
//archaeology!
/obj/item/weapon/rocksliver = list("ground_rock" = 50),
///obj/item/weapon/rocksliver = list("ground_rock" = 50),
//All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.!
@@ -1102,7 +1102,7 @@
remove_object(O)
//xenoarch
for(var/obj/item/weapon/rocksliver/O in holdingitems)
/*for(var/obj/item/weapon/rocksliver/O in holdingitems)
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
var/allowed = get_allowed_by_id(O)
@@ -1113,7 +1113,7 @@
if (beaker.reagents.total_volume >= beaker.reagents.maximum_volume)
break
remove_object(O)
remove_object(O)*/
//Everything else - Transfers reagents from it into beaker
for (var/obj/item/weapon/reagent_containers/O in holdingitems)
@@ -75,11 +75,11 @@
//Safety for dumping stuff into a ninja suit. It handles everything through attackby() and this is unnecessary.
else if(istype(target, /obj/machinery/bunsen_burner))
/*else if(istype(target, /obj/machinery/bunsen_burner))
return
else if(istype(target, /obj/machinery/radiocarbon_spectrometer))
return
return*/
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
@@ -135,11 +135,11 @@
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
user << "\blue You transfer [trans] units of the solution to [target]."
else if(istype(target, /obj/machinery/bunsen_burner))
/*else if(istype(target, /obj/machinery/bunsen_burner))
return
else if(istype(target, /obj/machinery/radiocarbon_spectrometer))
return
return*/
else if(istype(target, /obj/effect/decal/cleanable)) //stops splashing while scooping up fluids
return
@@ -330,4 +330,24 @@
build_type = IMPRINTER
materials = list("$glass" = 2000, "sacid" = 20)
build_path = /obj/item/weapon/circuitboard/pod
category = list("Misc. Machinery")
category = list("Misc. Machinery")
/datum/design/ore_redemption
name = "Machine Design (Ore Redemption Board)"
desc = "The circuit board for an Ore Redemption machine."
id = "ore_redemption"
req_tech = list("programming" = 1, "engineering" = 2)
build_type = IMPRINTER
materials = list("$glass"=1000, "sacid"=20)
build_path = /obj/item/weapon/circuitboard/ore_redemption
category = list ("Misc. Machinery")
/datum/design/mining_equipment_vendor
name = "Machine Design (Mining Rewards Vender Board)"
desc = "The circuit board for a Mining Rewards Vender."
id = "mining_equipment_vendor"
req_tech = list("programming" = 1, "engineering" = 2)
build_type = IMPRINTER
materials = list("$glass"=1000, "sacid"=20)
build_path = /obj/item/weapon/circuitboard/mining_equipment_vendor
category = list ("Misc. Machinery")
@@ -653,6 +653,15 @@
construction_time = 100
category = list("Exosuit Equipment")
/datum/design/mech_mining_scanner
name = "Exosuit Engineering Equipement (Mining Scanner)"
id = "mech_mscanner"
build_type = MECHFAB
build_path = /obj/item/mecha_parts/mecha_equipment/tool/mining_scanner
materials = list("$metal"=5000,"$glass"=2500)
construction_time = 50
category = list("Exosuit Equipment")
/datum/design/mech_generator_nuclear
name = "Exosuit Module (ExoNuclear Reactor)"
desc = "Compact nuclear reactor module."
@@ -852,6 +861,17 @@
construction_time = 100
category = list("Exosuit Equipment")
/datum/design/mech_plasma_cutter
name = "Exosuit Module Design (217-D Heavy Plasma Cutter)"
desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demolishing solid obstacles."
id = "mech_plasma_cutter"
build_type = MECHFAB
req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3, "combat" = 1, "plasma" = 2)
build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma
materials = list("$metal"=1500, "$glass"=500, "$plasma"=200)
construction_time = 100
category = list("Exosuit Equipment")
//Cyborg Upgrade Modules
/datum/design/borg_syndicate_module
name = "Borg Illegal Weapons Upgrade"
@@ -875,7 +895,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_disablercooler
name = "Cyborg Upgrade Module (Rapid Disabler Cooling Module)"
name = "Cyborg Upgrade Module (Rapid Disabler Cooling)"
id = "borg_upgrade_disablercooler"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/disablercooler
@@ -885,7 +905,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_rename
name = "Cyborg Upgrade Module (Rename Module)"
name = "Cyborg Upgrade Module (Rename)"
id = "borg_upgrade_rename"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/rename
@@ -894,7 +914,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_reset
name = "Cyborg Upgrade Module (Reset Module)"
name = "Cyborg Upgrade Module (Reset)"
id = "borg_upgrade_reset"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/reset
@@ -903,7 +923,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_restart
name = "Cyborg Upgrade Module (Restart Module)"
name = "Cyborg Upgrade Module (Restart)"
id = "borg_upgrade_restart"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/restart
@@ -912,7 +932,7 @@
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_vtec
name = "Cyborg Upgrade Module (VTEC Module)"
name = "Cyborg Upgrade Module (VTEC)"
id = "borg_upgrade_vtec"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/vtec
@@ -921,6 +941,26 @@
construction_time = 120
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_diamonddrill
name = "Cyborg Upgrade (Diamond Drill)"
id = "borg_upgrade_diamonddrill"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/ddrill
req_tech = list("engineering" = 5, "materials" = 5)
materials = list("$metal"=10000, "$diamond"=3750)
construction_time = 120
category = list("Cyborg Upgrade Modules")
/datum/design/borg_upgrade_holding
name = "Cyborg Upgrade (Ore Satchel of Holding)"
id = "borg_upgrade_holding"
build_type = MECHFAB
build_path = /obj/item/borg/upgrade/soh
req_tech = list("engineering" = 5, "materials" = 5, "bluespace" = 3)
materials = list("$metal" = 10000, "$gold" = 250, "$uranium" = 500)
construction_time = 120
category = list("Cyborg Upgrade Modules")
//Misc
/datum/design/mecha_tracking
name = "Exosuit Tracking Beacon"
+22 -11
View File
@@ -11,7 +11,7 @@
reliability_base = 79
build_path = /obj/item/weapon/pickaxe/diamonddrill
category = list("Mining")
/datum/design/pick_diamond
name = "Diamond Pickaxe"
desc = "A pickaxe with a diamond pick head, this is just like minecraft."
@@ -30,25 +30,36 @@
build_type = PROTOLATHE
materials = list("$metal" = 6000, "$glass" = 1000)
build_path = /obj/item/weapon/pickaxe/drill
category = list("Mining")
category = list("Mining")
/datum/design/plasmacutter
name = "Plasma Cutter"
desc = "You could use it to cut limbs off of xenos! Or, you know, mine stuff."
id = "plasmacutter"
req_tech = list("materials" = 4, "plasmatech" = 3, "engineering" = 3)
req_tech = list("materials" = 2, "plasmatech" = 2, "engineering" = 2, "combat" = 1, "magnets" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 1500, "$glass" = 500, "$gold" = 500, "$plasma" = 500)
reliability_base = 79
build_path = /obj/item/weapon/pickaxe/plasmacutter
build_path = /obj/item/weapon/gun/energy/plasmacutter
category = list("Mining")
/datum/design/plasmacutter_adv
name = "Advanced Plasma Cutter"
desc = "It's an advanced plasma cutter, oh my god."
id = "plasmacutter_adv"
req_tech = list("materials" = 4, "plasmatech" = 3, "engineering" = 3, "combat" = 3, "magnets" = 3)
build_type = PROTOLATHE
materials = list("$metal" = 3000, "$glass" = 1000, "$plasma" = 2000, "$gold" = 500)
reliability_base = 79
build_path = /obj/item/weapon/gun/energy/plasmacutter/adv
category = list("Mining Designs")
/datum/design/jackhammer
name = "Sonic Jackhammer"
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
desc = "Essentially a handheld planet-cracker. Can drill through walls with ease as well."
id = "jackhammer"
req_tech = list("materials" = 3, "powerstorage" = 2, "engineering" = 2)
req_tech = list("materials" = 6, "powerstorage" = 6, "engineering" = 5, "magnets" = 6)
build_type = PROTOLATHE
materials = list("$metal" = 2000, "$glass" = 500, "$silver" = 500)
build_path = /obj/item/weapon/pickaxe/jackhammer
category = list("Mining")
materials = list("$metal" = 8000, "$glass" = 1500, "$silver" = 2000, "$diamond" = 6000)
build_path = /obj/item/weapon/pickaxe/drill/jackhammer
category = list("Mining Designs")
+2 -2
View File
@@ -136,7 +136,7 @@ Note: Must be placed west/left of and R&D console to function.
var/obj/item/stack/sheet/mineral/diamond/G = new /obj/item/stack/sheet/mineral/diamond(src.loc)
G.amount = round(diamond_amount / G.perunit)
if(clown_amount >= MINERAL_MATERIAL_AMOUNT)
var/obj/item/stack/sheet/mineral/clown/G = new /obj/item/stack/sheet/mineral/clown(src.loc)
var/obj/item/stack/sheet/mineral/bananium/G = new /obj/item/stack/sheet/mineral/bananium(src.loc)
G.amount = round(clown_amount / G.perunit)
default_deconstruction_crowbar(O)
return 1
@@ -192,7 +192,7 @@ Note: Must be placed west/left of and R&D console to function.
uranium_amount += amount * MINERAL_MATERIAL_AMOUNT
else if(istype(stack, /obj/item/stack/sheet/mineral/diamond))
diamond_amount += amount * MINERAL_MATERIAL_AMOUNT
else if(istype(stack, /obj/item/stack/sheet/mineral/clown))
else if(istype(stack, /obj/item/stack/sheet/mineral/bananium))
clown_amount += amount * MINERAL_MATERIAL_AMOUNT
stack.use(amount)
busy = 0
+1 -1
View File
@@ -539,7 +539,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
type = /obj/item/stack/sheet/mineral/diamond
res_amount = "diamond_amount"
if("clown")
type = /obj/item/stack/sheet/mineral/clown
type = /obj/item/stack/sheet/mineral/bananium
res_amount = "clown_amount"
if(ispath(type) && hasvar(linked_lathe, res_amount))
var/obj/item/stack/sheet/sheet = new type(linked_lathe.loc)
@@ -29,7 +29,7 @@
anchored = 1
spawn(drill_time)
if(get_turf(src) == drilling_turf && active)
M.GetDrilled()
M.gets_drilled()
src.loc = M
drilling_turf = null
anchored = 0
@@ -58,8 +58,8 @@
age = rand(1,999)
if(container.mineral)
switch(container.mineral.name)
if(container.mineralName)
switch(container.mineralName)
if("Uranium")
age_million = rand(1, 704)
age_thousand = rand(1,999)
@@ -97,6 +97,12 @@
age_thousand = rand(-1,-999)
find_presence["plasma"] = rand(1,1000) / 100
source_mineral = "plasma"
if("Bluespace crystal")
age_thousand = rand(1,999)
find_presence["plasma"] = rand(1,1000) / 100
if("Gibtonite")
age_thousand = rand(1, 50)
find_presence["plasma"] = rand(1,1000) / 100
if(prob(75))
find_presence["phosphorus"] = rand(1,500) / 100
@@ -34,7 +34,7 @@
D.coords = "[M.x].[rand(0,9)]:[M.y].[rand(0,9)]:[10 * M.z].[rand(0,9)]"
D.time = worldtime2text()
D.record_index = positive_locations.len + 1
D.material = M.mineral ? M.mineral.display_name : "Rock"
D.material = M.mineralName ? M.mineralName : "Rock"
//find the first artifact and store it
if(M.finds.len)
+2 -2
View File
@@ -1,7 +1,7 @@
/obj/machinery/computer/shuttle_control/mining
name = "Mining Shuttle Console"
shuttle_tag = "Mining"
req_access = list(access_mining)
req_access = list()
circuit = /obj/item/weapon/circuitboard/mining_shuttle
/obj/machinery/computer/shuttle_control/engineering
@@ -33,7 +33,7 @@
src.visible_message("\blue Shuttle is already at the outpost.")
return
..()
/obj/machinery/computer/shuttle_control/labor_camp/one_way/force_launch()
var/datum/shuttle/ferry/shuttle = shuttle_controller.shuttles[shuttle_tag]
if (!istype(shuttle))