New Map Mining (#1935)

* Alpha Commit

* Alpha Commit

* Seconds

* Some Commit

* Final Commit

* Fixing minedrone synth ID

* Dance Fever

* Fixing Travis part 1

* Satisfying the demands

* Stuff

* Sub-final commit

* Sculpting update

* more sculpting. pr is 99% sculpting, in fact

* kkk

* brightness_off

* swjaugyuwvhuw
This commit is contained in:
LordFowl
2017-03-22 18:14:37 -04:00
committed by GitHub
parent a2fbcaa18b
commit 3c64b62c27
128 changed files with 3734 additions and 1079 deletions
+66 -4
View File
@@ -1,15 +1,20 @@
/**********************Mineral processing unit console**************************/
/obj/machinery/mineral/processing_unit_console
name = "production machine console"
name = "ore redemption console"
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "console"
density = 1
anchored = 1
use_power = 1
idle_power_usage = 15
active_power_usage = 50
var/obj/machinery/mineral/processing_unit/machine = null
var/machinedir = NORTHEAST
var/show_all_ores = 0
var/points = 0
var/obj/item/weapon/card/id/inserted_id
/obj/machinery/mineral/processing_unit_console/New()
..()
@@ -37,6 +42,14 @@
var/dat = "<h1>Ore processor console</h1>"
dat += "Current unclaimed points: [points]<br>"
if(istype(inserted_id))
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>"
dat += "<A href='?src=\ref[src];choice=claim'>Claim points.</A><br>"
else
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
dat += "<hr><table>"
for(var/ore in machine.ores_processing)
@@ -72,6 +85,32 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
inserted_id.loc = loc
if(!usr.get_active_hand())
usr.put_in_hands(inserted_id)
inserted_id = null
if(href_list["choice"] == "claim")
if(access_mining_station in inserted_id.access)
if(points >= 0)
inserted_id.mining_points += points
if(points != 0)
ping( "\The [src] pings, \"Point transfer complete! Transaction total: [points] points!\"" )
points = 0
else
usr << "<span class='warning'>[station_name()]'s mining division is currently indebted to NanoTrasen. Transaction incomplete until debt is cleared.</span>"
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()
I.loc = src
inserted_id = I
else usr << "<span class='warning'>No valid ID.</span>"
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")
@@ -88,6 +127,10 @@
if(href_list["toggle_power"])
machine.active = !machine.active
if(machine.active)
machine.icon_state = "furnace"
else
machine.icon_state = "furnace-off"
if(href_list["toggle_ores"])
@@ -100,20 +143,23 @@
/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 phoron...
name = "industrial smelter" //This isn't actually a goddamn furnace, we're in space and it's processing platinum and flammable phoron... //lol fuk u bay it is
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "furnace"
icon_state = "furnace-off"
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/obj/machinery/mineral/processing_unit_console/console = null
var/sheets_per_tick = 10
var/list/ores_processing[0]
var/list/ores_stored[0]
var/static/list/alloy_data
var/active = 0
use_power = 1
idle_power_usage = 15
active_power_usage = 50
/obj/machinery/mineral/processing_unit/New()
..()
@@ -143,6 +189,7 @@
return
/obj/machinery/mineral/processing_unit/process()
..()
if (!src.output || !src.input) return
@@ -158,6 +205,8 @@
qdel(O)
if(!active)
if(icon_state != "furnace-off")
icon_state = "furnace-off"
return
//Process our stored ores and spit out sheets.
@@ -197,6 +246,10 @@
else
var/total
for(var/needs_metal in A.requires)
if(console)
var/ore/Ore = ore_data[needs_metal]
console.points += Ore.worth
use_power(100)
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.
@@ -216,6 +269,9 @@
continue
for(var/i=0,i<can_make,i+=2)
if(console)
console.points += O.worth*2
use_power(100)
ores_stored[metal]-=2
sheets+=2
new M.stack_type(output.loc)
@@ -229,10 +285,16 @@
continue
for(var/i=0,i<can_make,i++)
if(console)
console.points += O.worth
use_power(100)
ores_stored[metal]--
sheets++
new M.stack_type(output.loc)
else
if(console)
console.points -= O.worth*10 //reee wasting our materials!
use_power(500)
ores_stored[metal]--
sheets++
new /obj/item/weapon/ore/slag(output.loc)