mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
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:
@@ -94,7 +94,7 @@
|
||||
if(79 to 80)
|
||||
new/obj/item/weapon/pickaxe/gold(src)
|
||||
if(81 to 82)
|
||||
new/obj/item/weapon/pickaxe/plasmacutter(src)
|
||||
new/obj/item/weapon/gun/energy/plasmacutter(src)
|
||||
if(83 to 84)
|
||||
new/obj/item/toy/katana(src)
|
||||
if(85)
|
||||
@@ -179,8 +179,8 @@
|
||||
var/turf/T = get_turf(src.loc)
|
||||
explosion(T, 0, 0, 1, 2)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (locked)
|
||||
user << "<span class='notice'>The crate unlocks!</span>"
|
||||
locked = 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
/obj/machinery/mining/drill
|
||||
name = "mining drill head"
|
||||
desc = "An enormous drill."
|
||||
desc = "A large industrial drill. Its bore does not penetrate deep enough to access the sublevels."
|
||||
icon_state = "mining_drill"
|
||||
var/braces_needed = 2
|
||||
var/list/supports = list()
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/obj/machinery/mineral/rigpress
|
||||
name = "RIG module press"
|
||||
desc = "This machine converts certain items permanently into RIG modules."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
var/pressing
|
||||
|
||||
/obj/machinery/mineral/rigpress/update_icon()
|
||||
if(pressing)
|
||||
icon_state = "coinpress1"
|
||||
else
|
||||
icon_state = "coinpress0"
|
||||
|
||||
/obj/machinery/mineral/rigpress/attackby(obj/item/W, mob/user)
|
||||
if(!pressing)
|
||||
var/outcome_path
|
||||
var/list/kinetic_mods
|
||||
var/kineticaccelerator
|
||||
if(istype(W, /obj/item/clothing/glasses/material))
|
||||
outcome_path = /obj/item/rig_module/vision/meson
|
||||
|
||||
if(istype(W, /obj/item/weapon/tank/jetpack))
|
||||
outcome_path = /obj/item/rig_module/maneuvering_jets
|
||||
|
||||
if(istype(W, /obj/item/weapon/mining_scanner))
|
||||
outcome_path = /obj/item/rig_module/device/orescanner
|
||||
|
||||
if(istype(W, /obj/item/weapon/pickaxe/drill))
|
||||
outcome_path = /obj/item/rig_module/device/basicdrill
|
||||
|
||||
if(istype(W, /obj/item/weapon/gun/energy/kinetic_accelerator))
|
||||
outcome_path = /obj/item/rig_module/mounted/kinetic_accelerator
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/KA = W
|
||||
kineticaccelerator = 1
|
||||
for(var/obj/item/borg/upgrade/modkit/kmod in KA.modkits)
|
||||
kinetic_mods += kmod
|
||||
|
||||
if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
outcome_path = /obj/item/rig_module/mounted/plasmacutter
|
||||
|
||||
if(istype(W, /obj/item/weapon/pickaxe/diamond))
|
||||
outcome_path = /obj/item/rig_module/device/drill
|
||||
|
||||
if(istype(W, /obj/item/weapon/gun/energy/vaurca/thermaldrill))
|
||||
outcome_path = /obj/item/rig_module/mounted/thermalldrill
|
||||
|
||||
user << "<span class='notice'>You start feeding [W] into \the [src]</span>"
|
||||
if(do_after(user,30))
|
||||
src.visible_message("<span class='notice'>\The [src] begins to print out a modsuit.</span>")
|
||||
pressing = 1
|
||||
update_icon()
|
||||
use_power(500)
|
||||
qdel(W)
|
||||
spawn(300)
|
||||
ping( "\The [src] pings, \"Module successfuly produced!\"" )
|
||||
if(kineticaccelerator)
|
||||
var/obj/item/rig_module/mounted/kinetic_accelerator/KA = new /obj/item/rig_module/mounted/kinetic_accelerator(src.loc)
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/KGUN = KA.gun
|
||||
for(var/obj/item/borg/upgrade/modkit/kmod in kinetic_mods)
|
||||
KGUN.modkits += kmod
|
||||
else
|
||||
new outcome_path(src.loc)
|
||||
use_power(500)
|
||||
pressing = 0
|
||||
update_icon()
|
||||
..()
|
||||
@@ -8,6 +8,9 @@
|
||||
anchored = 1
|
||||
var/obj/machinery/mineral/stacking_machine/machine = null
|
||||
var/machinedir = NORTHEAST
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
|
||||
/obj/machinery/mineral/stacking_unit_console/New()
|
||||
|
||||
@@ -77,6 +80,9 @@
|
||||
var/list/stack_storage[0]
|
||||
var/list/stack_paths[0]
|
||||
var/stack_amt = 50; // Amount to stack before releassing
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
@@ -105,6 +111,7 @@
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/process()
|
||||
..()
|
||||
if(!console)
|
||||
log_debug("Stacking machine tried to process, but no console has linked itself to it.")
|
||||
qdel(src)
|
||||
|
||||
@@ -7,6 +7,9 @@
|
||||
icon_state = "unloader"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
use_power = 1
|
||||
idle_power_usage = 15
|
||||
active_power_usage = 50
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
|
||||
@@ -24,6 +27,7 @@
|
||||
return
|
||||
|
||||
/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)
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
//PROGRESSION SYSTEM: Miners start with a basic ass manual pickaxe. They can shortly buy an autodrill, or save up for a /TG/ Kinetic Accelerator.
|
||||
//HARDSUITS: Miners all start with an *empty* industrial hardsuit. Many of the items they can buy here (auto-drill, kinetic accelerator) can be converted into modules
|
||||
// with a special machine.
|
||||
//VENDOR: Obj/item's are immediately dispensed by the vendor. Machines, structures, vehicles, and etc get spawned on the cargo shuttle.
|
||||
//Think up of lots of items. Not everything needs to be unique or even mining-special, but it should be neat. Convert most of /tg/'s items. 25% of this at least
|
||||
// should be bling. Things that shorten the distance between base and mining. Instant-teleporters should be one use.
|
||||
var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Food Ration", /obj/item/weapon/reagent_containers/food/snacks/liquidfood, 5),
|
||||
new /datum/data/mining_equipment("Poster", /obj/item/weapon/contraband/poster, 20),
|
||||
new /datum/data/mining_equipment("Ore Scanner Pad", /obj/item/weapon/ore_radar, 50),
|
||||
new /datum/data/mining_equipment("5 Red Flags", /obj/item/stack/flag/red, 50),
|
||||
new /datum/data/mining_equipment("5 Green Flags", /obj/item/stack/flag/green, 50),
|
||||
new /datum/data/mining_equipment("5 Yellow Flags", /obj/item/stack/flag/yellow, 50),
|
||||
new /datum/data/mining_equipment("Ore-bag", /obj/item/weapon/storage/bag/ore, 50),
|
||||
new /datum/data/mining_equipment("Meat Pizza", /obj/item/pizzabox/meat, 50),
|
||||
new /datum/data/mining_equipment("Lantern", /obj/item/device/flashlight/lantern, 75),
|
||||
new /datum/data/mining_equipment("Shovel", /obj/item/weapon/shovel, 100),
|
||||
new /datum/data/mining_equipment("Stimpack", /obj/item/weapon/reagent_containers/hypospray/autoinjector/stimpack, 100),
|
||||
new /datum/data/mining_equipment("Pickaxe", /obj/item/weapon/pickaxe, 100),
|
||||
new /datum/data/mining_equipment("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 100),
|
||||
new /datum/data/mining_equipment("Compressed rail cartridge", /obj/item/weapon/rrf_ammo, 100),
|
||||
new /datum/data/mining_equipment("Emergency Floodlight", /obj/item/weapon/floodlight_diy, 150),
|
||||
new /datum/data/mining_equipment("Premium Cigar", /obj/item/clothing/mask/smokable/cigarette/cigar/havana, 150),
|
||||
new /datum/data/mining_equipment("KA Adjustable Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer/adjustable, 150),
|
||||
new /datum/data/mining_equipment("Lottery Chip", /obj/item/weapon/spacecash/ewallet/lotto, 200),
|
||||
new /datum/data/mining_equipment("Ripley Paint Kit", /obj/item/device/kit/paint/ripley/random, 200),
|
||||
new /datum/data/mining_equipment("Material Scanners", /obj/item/clothing/glasses/material, 200),
|
||||
new /datum/data/mining_equipment("Mining Drill", /obj/item/weapon/pickaxe/drill, 200),
|
||||
new /datum/data/mining_equipment("Deep Ore Scanner", /obj/item/weapon/mining_scanner, 250),
|
||||
new /datum/data/mining_equipment("Magboots", /obj/item/clothing/shoes/magboots, 300),
|
||||
new /datum/data/mining_equipment("Stimpack Bundle", /obj/item/weapon/storage/box/stims, 300),
|
||||
new /datum/data/mining_equipment("Autochisel", /obj/item/weapon/autochisel, 400),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack, 400),
|
||||
new /datum/data/mining_equipment("Drone Drill Upgrade", /obj/item/device/mine_bot_ugprade, 400),
|
||||
new /datum/data/mining_equipment("Seismic Charge", /obj/item/weapon/plastique/seismic, 500),
|
||||
new /datum/data/mining_equipment("Industrial Drill Brace", /obj/machinery/mining/brace, 500, 1),
|
||||
new /datum/data/mining_equipment("Point Transfer Card", /obj/item/weapon/card/mining_point_card, 500),
|
||||
new /datum/data/mining_equipment("Explorer's Webbing", /obj/item/weapon/storage/belt/mining, 500),
|
||||
new /datum/data/mining_equipment("Item-Warp Beacon", /obj/item/warp_core, 500),
|
||||
new /datum/data/mining_equipment("Item-Warp Pack", /obj/item/weapon/extraction_pack, 600),
|
||||
new /datum/data/mining_equipment("Drone Health Upgrade", /obj/item/device/mine_bot_ugprade/health, 600),
|
||||
new /datum/data/mining_equipment("Rapid-Railway-Fabricator", /obj/item/weapon/rrf, 600),
|
||||
new /datum/data/mining_equipment("Survival Autoinjector", /obj/item/weapon/reagent_containers/hypospray/autoinjector/survival, 600),
|
||||
new /datum/data/mining_equipment("Brute First-Aid Kit", /obj/item/weapon/storage/firstaid/brute, 600),
|
||||
new /datum/data/mining_equipment("Ore Magnet", /obj/item/weapon/oremagnet, 600),
|
||||
new /datum/data/mining_equipment("Minecart", /obj/vehicle/train/cargo/trolley/mining, 600, 1),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 700),
|
||||
new /datum/data/mining_equipment("Mining RIG", /obj/item/weapon/rig/industrial, 750),
|
||||
new /datum/data/mining_equipment("KA Range Increase", /obj/item/borg/upgrade/modkit/range, 750),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 750),
|
||||
new /datum/data/mining_equipment("1000 credits", /obj/item/weapon/spacecash/c1000, 800),
|
||||
new /datum/data/mining_equipment("Mass Driver", /obj/item/weapon/mass_driver_diy, 800),
|
||||
new /datum/data/mining_equipment("Drone Plasma Cutter Upgrade", /obj/item/device/mine_bot_ugprade/plasma, 800),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/silicon/robot/drone/mining, 800),
|
||||
new /datum/data/mining_equipment("Minecart Engine", /obj/vehicle/train/cargo/engine/mining, 800, 1),
|
||||
new /datum/data/mining_equipment("Ore Summoner", /obj/item/weapon/oreportal, 800),
|
||||
new /datum/data/mining_equipment("Plasma Cutter", /obj/item/weapon/gun/energy/plasmacutter, 900),
|
||||
new /datum/data/mining_equipment("KA Damage Increase", /obj/item/borg/upgrade/modkit/damage, 1000),
|
||||
new /datum/data/mining_equipment("KA Cooldown Decrease", /obj/item/borg/upgrade/modkit/cooldown, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 1000),
|
||||
new /datum/data/mining_equipment("Industrial Drill Head", /obj/machinery/mining/drill, 1000, 1),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 1250),
|
||||
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/turfs, 1500),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 1500),
|
||||
new /datum/data/mining_equipment("Drone Thermal Drill Upgrade", /obj/item/device/mine_bot_ugprade/thermal, 2000),
|
||||
new /datum/data/mining_equipment("Thermal Drill", /obj/item/weapon/gun/energy/vaurca/thermaldrill, 2750)
|
||||
)
|
||||
|
||||
/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'
|
||||
icon_state = "mining"
|
||||
density = 1
|
||||
anchored = 1
|
||||
var/obj/item/weapon/card/id/inserted_id
|
||||
|
||||
/datum/data/mining_equipment
|
||||
var/equipment_name = "generic"
|
||||
var/equipment_path = null
|
||||
var/cost = 0
|
||||
var/shuttle
|
||||
|
||||
/datum/data/mining_equipment/New(name, path, cost, shuttle)
|
||||
src.equipment_name = name
|
||||
src.equipment_path = path
|
||||
src.cost = cost
|
||||
src.shuttle = shuttle
|
||||
|
||||
/obj/item/weapon/circuitboard/machine/mining_equipment_vendor
|
||||
name = "circuit board (Mining Equipment Vendor)"
|
||||
build_path = /obj/machinery/mineral/equipment_vendor
|
||||
origin_tech = list(TECH_DATA = 1, TECH_ENGINEERING = 1)
|
||||
req_components = list(
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/update_icon()
|
||||
if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-off"
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attack_hand(mob/user)
|
||||
if(..())
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/interact(mob/user)
|
||||
var/dat
|
||||
dat +="<div class='statusDisplay'>"
|
||||
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>"
|
||||
else
|
||||
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
|
||||
dat += "</div>"
|
||||
dat += "<br><b>Equipment point cost list:</b><BR><table border='0' width='300'>"
|
||||
for(var/datum/data/mining_equipment/prize in minevendor_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>"
|
||||
|
||||
var/datum/browser/popup = new(user, "miningvendor", "Mining Equipment Vendor", 400, 350)
|
||||
popup.set_content(dat)
|
||||
popup.open()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
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
|
||||
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='danger'>No valid ID.</span>"
|
||||
if(href_list["purchase"])
|
||||
if(istype(inserted_id))
|
||||
var/datum/data/mining_equipment/prize = locate(href_list["purchase"])
|
||||
if (!prize || !(prize in minevendor_list))
|
||||
return
|
||||
if(prize.cost > inserted_id.mining_points)
|
||||
else
|
||||
if(prize.shuttle)
|
||||
var/datum/shuttle/ferry/supply/shuttle = supply_controller.shuttle
|
||||
if(shuttle)
|
||||
var/area/area_shuttle = shuttle.get_location_area()
|
||||
if(!area_shuttle)
|
||||
usr << "<span class='danger'>{ERR Code: NO_SHUTTLE} Order failed! Please try again.</span>"
|
||||
return
|
||||
|
||||
|
||||
var/list/clear_turfs = list()
|
||||
|
||||
for(var/turf/T in area_shuttle)
|
||||
if(T.density) continue
|
||||
var/contcount
|
||||
for(var/atom/A in T.contents)
|
||||
if(!A.simulated)
|
||||
continue
|
||||
contcount++
|
||||
if(contcount)
|
||||
continue
|
||||
clear_turfs += T
|
||||
|
||||
if(!clear_turfs.len)
|
||||
usr << "<span class='danger'>{ERR Code: NO_SHUTTLE_SPACE} Order failed! Please try again.</span>"
|
||||
return
|
||||
|
||||
var/i = rand(1,clear_turfs.len)
|
||||
var/turf/pickedloc = clear_turfs[i]
|
||||
|
||||
if(pickedloc)
|
||||
inserted_id.mining_points -= prize.cost
|
||||
new prize.equipment_path(pickedloc)
|
||||
usr << "<span class='danger'>Order passed. Your order has been placed on the next available supply shuttle.</span>"
|
||||
else
|
||||
usr << "<span class='danger'>{ERR Code: NO_SHUTTLE_SPACE} Order failed! Please try again.</span>"
|
||||
return
|
||||
else
|
||||
usr << "<span class='danger'>{ERR Code: NO_SHUTTLE} Order failed! Please try again.</span>"
|
||||
return
|
||||
else
|
||||
inserted_id.mining_points -= prize.cost
|
||||
new prize.equipment_path(src.loc)
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/mineral/equipment_vendor/attackby(obj/item/I, mob/user, params)
|
||||
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()
|
||||
C.loc = src
|
||||
inserted_id = C
|
||||
interact(user)
|
||||
return
|
||||
if(default_deconstruction_screwdriver(user, "mining-open", "mining", I))
|
||||
updateUsrDialog()
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
+1100
-47
File diff suppressed because it is too large
Load Diff
@@ -25,9 +25,7 @@
|
||||
var/datum/geosample/geologic_data
|
||||
var/excavation_level = 0
|
||||
var/list/finds
|
||||
var/next_rock = 0
|
||||
var/archaeo_overlay = ""
|
||||
var/excav_overlay = ""
|
||||
var/obj/item/weapon/last_find
|
||||
var/datum/artifact_find/artifact_find
|
||||
|
||||
@@ -49,12 +47,36 @@
|
||||
else if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
|
||||
turf_to_check.overlays += image('icons/turf/walls.dmi', "rock_side", dir = turn(step_overlays[direction], 180))
|
||||
|
||||
/turf/simulated/mineral/examine(mob/user)
|
||||
..()
|
||||
if(mineral)
|
||||
switch(mined_ore)
|
||||
if(0)
|
||||
user << "<span class='info'>It is ripe with [mineral.display_name].</span>"
|
||||
if(1)
|
||||
user << "<span class='info'>Its [mineral.display_name] looks a little depleted.</span>"
|
||||
if(2)
|
||||
user << "<span class='warning'>Its [mineral.display_name] looks very depleted!</span>"
|
||||
else
|
||||
user << "<span class='info'>It is devoid of any valuable minerals.</span>"
|
||||
switch(emitter_blasts_taken)
|
||||
if(0)
|
||||
user << "<span class='info'>It is in pristine condition.</span>"
|
||||
if(1)
|
||||
user << "<span class='info'>It appears a little damaged.</span>"
|
||||
if(2)
|
||||
user << "<span class='warning'>It is crumbling!</span>"
|
||||
if(3)
|
||||
user << "<span class='danger'>It looks ready to collapse at any moment!</span>"
|
||||
|
||||
/turf/simulated/mineral/ex_act(severity)
|
||||
switch(severity)
|
||||
if(2.0)
|
||||
if (prob(70))
|
||||
mined_ore = 1 //some of the stuff gets blown up
|
||||
GetDrilled()
|
||||
else
|
||||
emitter_blasts_taken += 2
|
||||
if(1.0)
|
||||
mined_ore = 2 //some of the stuff gets blown up
|
||||
GetDrilled()
|
||||
@@ -65,18 +87,22 @@
|
||||
if(istype(Proj, /obj/item/projectile/beam/emitter))
|
||||
emitter_blasts_taken++
|
||||
|
||||
if(emitter_blasts_taken > 2) // 3 blasts per tile
|
||||
mined_ore = 1
|
||||
GetDrilled()
|
||||
if(emitter_blasts_taken > 2) // 3 blasts per tile
|
||||
GetDrilled()
|
||||
|
||||
/turf/simulated/mineral/Bumped(AM)
|
||||
. = ..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
if((istype(H.l_hand,/obj/item/weapon/pickaxe)) && (!H.hand))
|
||||
attackby(H.l_hand,H)
|
||||
var/obj/item/weapon/pickaxe/P = H.l_hand
|
||||
if(P.autodrill)
|
||||
attackby(H.l_hand,H)
|
||||
|
||||
else if((istype(H.r_hand,/obj/item/weapon/pickaxe)) && H.hand)
|
||||
attackby(H.r_hand,H)
|
||||
var/obj/item/weapon/pickaxe/P = H.r_hand
|
||||
if(P.autodrill)
|
||||
attackby(H.r_hand,H)
|
||||
|
||||
else if(istype(AM,/mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = AM
|
||||
@@ -141,9 +167,14 @@
|
||||
var/obj/item/weapon/pickaxe/P = W
|
||||
if(last_act + P.digspeed > world.time)//prevents message spam
|
||||
return
|
||||
|
||||
if(P.drilling)
|
||||
return
|
||||
|
||||
last_act = world.time
|
||||
|
||||
playsound(user, P.drill_sound, 20, 1)
|
||||
P.drilling = 1
|
||||
|
||||
//handle any archaeological finds we might uncover
|
||||
var/fail_message
|
||||
@@ -153,7 +184,8 @@
|
||||
//Chance to destroy / extract any finds here
|
||||
fail_message = ". <b>[pick("There is a crunching noise","[W] collides with some different rock","Part of the rock face crumbles away","Something breaks under [W]")]</b>"
|
||||
|
||||
user << "\red You start [P.drill_verb][fail_message ? fail_message : ""]."
|
||||
if(fail_message)
|
||||
user << "<span class='warning'>You start [P.drill_verb][fail_message ? fail_message : ""].</span>"
|
||||
|
||||
if(fail_message && prob(90))
|
||||
if(prob(25))
|
||||
@@ -164,7 +196,19 @@
|
||||
artifact_debris()
|
||||
|
||||
if(do_after(user,P.digspeed))
|
||||
user << "\blue You finish [P.drill_verb] the rock."
|
||||
P.drilling = 0
|
||||
|
||||
if(prob(50))
|
||||
var/obj/item/weapon/ore/O
|
||||
if(prob(25) && (mineral) && (P.excavation_amount >= 30))
|
||||
O = new mineral.ore (src)
|
||||
else
|
||||
O = new /obj/item/weapon/ore(src)
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
O.geologic_data = geologic_data
|
||||
spawn(1)
|
||||
O.forceMove(user.loc)
|
||||
|
||||
if(finds && finds.len)
|
||||
var/datum/find/F = finds[1]
|
||||
@@ -210,31 +254,27 @@
|
||||
archaeo_overlay = "overlay_archaeo[rand(1,3)]"
|
||||
overlays += archaeo_overlay
|
||||
|
||||
//there's got to be a better way to do this
|
||||
var/update_excav_overlay = 0
|
||||
if(excavation_level >= 75)
|
||||
if(excavation_level - P.excavation_amount < 75)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 50)
|
||||
if(excavation_level - P.excavation_amount < 50)
|
||||
update_excav_overlay = 1
|
||||
else if(excavation_level >= 25)
|
||||
if(excavation_level - P.excavation_amount < 25)
|
||||
update_excav_overlay = 1
|
||||
else
|
||||
user << "<span class='notice'> You stop [P.drill_verb] the rock.</span>"
|
||||
P.drilling = 0
|
||||
|
||||
//update overlays displaying excavation level
|
||||
if( !(excav_overlay && excavation_level > 0) || update_excav_overlay )
|
||||
var/excav_quadrant = round(excavation_level / 25) + 1
|
||||
excav_overlay = "overlay_excv[excav_quadrant]_[rand(1,3)]"
|
||||
overlays += excav_overlay
|
||||
if (istype(W, /obj/item/weapon/autochisel))
|
||||
|
||||
if(last_act + 80 > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
|
||||
user << "<span class='warning'>You start chiselling [src] into a sculptable block.</span>"
|
||||
|
||||
|
||||
|
||||
if(!do_after(user,80))
|
||||
return
|
||||
|
||||
user << "<span class='notice'>You finish chiselling [src] into a sculptable block.</span>"
|
||||
new /obj/structure/sculpting_block(src)
|
||||
GetDrilled(1)
|
||||
|
||||
//drop some rocks
|
||||
next_rock += P.excavation_amount * 10
|
||||
while(next_rock > 100)
|
||||
next_rock -= 100
|
||||
var/obj/item/weapon/ore/O = new(src)
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
O.geologic_data = geologic_data
|
||||
|
||||
else
|
||||
return attack_hand(user)
|
||||
@@ -296,6 +336,9 @@
|
||||
for(var/next_direction in step_overlays)
|
||||
if(istype(get_step(T, step_overlays[next_direction]),/turf/simulated/mineral))
|
||||
T.overlays += image('icons/turf/walls.dmi', "rock_side", dir = step_overlays[next_direction])
|
||||
var/turf/simulated/open/O = get_step(src, step_overlays[direction])
|
||||
if(istype(O))
|
||||
O.update()
|
||||
|
||||
if(rand(1,500) == 1)
|
||||
visible_message("<span class='notice'>An old dusty crate was buried within!</span>")
|
||||
@@ -375,16 +418,16 @@
|
||||
/turf/simulated/mineral/random
|
||||
name = "Mineral deposit"
|
||||
var/mineralSpawnChanceList = list(
|
||||
ORE_URANIUM = 5,
|
||||
ORE_PLATINUM = 5,
|
||||
ORE_IRON = 35,
|
||||
ORE_COAL = 35,
|
||||
ORE_DIAMOND = 1,
|
||||
ORE_GOLD = 5,
|
||||
ORE_SILVER = 5,
|
||||
ORE_PHORON = 10
|
||||
ORE_URANIUM = 2,
|
||||
ORE_PLATINUM = 2,
|
||||
ORE_IRON = 8,
|
||||
ORE_COAL = 8,
|
||||
ORE_DIAMOND = 1,
|
||||
ORE_GOLD = 2,
|
||||
ORE_SILVER = 2,
|
||||
ORE_PHORON = 5
|
||||
)
|
||||
var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
|
||||
var/mineralChance = 45
|
||||
|
||||
/turf/simulated/mineral/random/New()
|
||||
if (prob(mineralChance) && !mineral)
|
||||
@@ -395,18 +438,46 @@
|
||||
|
||||
. = ..()
|
||||
|
||||
/turf/simulated/mineral/random/high_chance
|
||||
mineralChance = 25
|
||||
/turf/simulated/mineral/random/low_chance
|
||||
name = "Mineral deposit"
|
||||
mineralSpawnChanceList = list(
|
||||
ORE_URANIUM = 10,
|
||||
ORE_PLATINUM = 10,
|
||||
ORE_IRON = 20,
|
||||
ORE_COAL = 20,
|
||||
ORE_DIAMOND = 2,
|
||||
ORE_GOLD = 10,
|
||||
ORE_SILVER = 10,
|
||||
ORE_PHORON = 20
|
||||
ORE_URANIUM = 0,
|
||||
ORE_PLATINUM = 0,
|
||||
ORE_IRON = 2,
|
||||
ORE_COAL = 3,
|
||||
ORE_DIAMOND = 0,
|
||||
ORE_GOLD = 0,
|
||||
ORE_SILVER = 0,
|
||||
ORE_PHORON = 1
|
||||
)
|
||||
mineralChance = 5
|
||||
|
||||
/turf/simulated/mineral/random/high_chance
|
||||
mineralSpawnChanceList = list(
|
||||
ORE_URANIUM = 2,
|
||||
ORE_PLATINUM = 2,
|
||||
ORE_IRON = 2,
|
||||
ORE_COAL = 2,
|
||||
ORE_DIAMOND = 1,
|
||||
ORE_GOLD = 2,
|
||||
ORE_SILVER = 2,
|
||||
ORE_PHORON = 3
|
||||
)
|
||||
mineralChance = 50
|
||||
|
||||
/turf/simulated/mineral/random/higher_chance
|
||||
mineralSpawnChanceList = list(
|
||||
ORE_URANIUM = 3,
|
||||
ORE_PLATINUM = 3,
|
||||
ORE_IRON = 1,
|
||||
ORE_COAL = 1,
|
||||
ORE_DIAMOND = 1,
|
||||
ORE_GOLD = 3,
|
||||
ORE_SILVER = 3,
|
||||
ORE_PHORON = 2
|
||||
)
|
||||
mineralChance = 45
|
||||
|
||||
|
||||
|
||||
/**********************Asteroid**************************/
|
||||
@@ -426,14 +497,13 @@
|
||||
oxygen = 0
|
||||
nitrogen = 0
|
||||
temperature = TCMB
|
||||
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
|
||||
var/dug = 0 //Increments by 1 everytime it's dug. 11 is the last integer that should ever be here.
|
||||
var/overlay_detail
|
||||
var/static/list/overlay_cache
|
||||
has_resources = 1
|
||||
footstep_sound = "gravelstep"
|
||||
|
||||
/turf/simulated/floor/asteroid/New()
|
||||
|
||||
if(prob(20))
|
||||
overlay_detail = rand(0,9)
|
||||
|
||||
@@ -443,9 +513,18 @@
|
||||
return
|
||||
if(2.0)
|
||||
if (prob(70))
|
||||
dug += rand(4,10)
|
||||
gets_dug()
|
||||
else
|
||||
dug += rand(1,3)
|
||||
gets_dug()
|
||||
if(1.0)
|
||||
gets_dug()
|
||||
if(prob(30))
|
||||
dug = 11
|
||||
gets_dug()
|
||||
else
|
||||
dug += rand(4,11)
|
||||
gets_dug()
|
||||
return
|
||||
|
||||
/turf/simulated/floor/asteroid/is_plating()
|
||||
@@ -496,20 +575,58 @@
|
||||
break
|
||||
|
||||
if(valid_tool)
|
||||
if (dug)
|
||||
user << "\red This area has already been dug"
|
||||
return
|
||||
|
||||
var/turf/T = user.loc
|
||||
if (!(istype(T)))
|
||||
return
|
||||
|
||||
user << "\red You start digging."
|
||||
playsound(user.loc, 'sound/effects/rustle1.ogg', 50, 1)
|
||||
if (dug)
|
||||
if(!GetBelow(src))
|
||||
return
|
||||
user << "<span class='warning'> You start digging deeper.</span>"
|
||||
playsound(user.loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(!do_after(user,60))
|
||||
return
|
||||
playsound(user.loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
if(prob(33))
|
||||
switch(dug)
|
||||
if(1)
|
||||
user << "<span class='notice'> You've made a little progress.</span>"
|
||||
if(2)
|
||||
user << "<span class='notice'> You notice the hole is a little deeper.</span>"
|
||||
if(3)
|
||||
user << "<span class='notice'> You think you're about halfway there.</span>"
|
||||
if(4)
|
||||
user << "<span class='notice'> You finish up lifting another pile of dirt.</span>"
|
||||
if(5)
|
||||
user << "<span class='notice'> You dig a bit deeper. You're definitely halfway there now.</span>"
|
||||
if(6)
|
||||
user << "<span class='notice'> You still have a ways to go.</span>"
|
||||
if(7)
|
||||
user << "<span class='notice'> The hole looks pretty deep now.</span>"
|
||||
if(8)
|
||||
user << "<span class='notice'> The ground is starting to feel a lot looser.</span>"
|
||||
if(9)
|
||||
user << "<span class='notice'> You can almost see the other side.</span>"
|
||||
if(10)
|
||||
user << "<span class='notice'> Just a little deeper. . .</span>"
|
||||
else
|
||||
user << "<span class='notice'> You penetrate the virgin earth!</span>"
|
||||
else
|
||||
if(dug <= 10)
|
||||
user << "<span class='notice'> You dig a little deeper.</span>"
|
||||
else
|
||||
user << "<span class='notice'> You dug a big hole.</span>"
|
||||
|
||||
if(!do_after(user,40)) return
|
||||
gets_dug()
|
||||
return
|
||||
|
||||
user << "\blue You dug a hole."
|
||||
user << "<span class='warning'> You start digging.</span>"
|
||||
playsound(user.loc, 'sound/effects/stonedoor_openclose.ogg', 50, 1)
|
||||
|
||||
if(!do_after(user,40))
|
||||
return
|
||||
|
||||
user << "<span class='notice'> You dug a hole.</span>"
|
||||
gets_dug()
|
||||
|
||||
else if(istype(W,/obj/item/weapon/storage/bag/ore))
|
||||
@@ -531,14 +648,34 @@
|
||||
|
||||
/turf/simulated/floor/asteroid/proc/gets_dug()
|
||||
|
||||
if(dug)
|
||||
return
|
||||
|
||||
for(var/i=0;i<(rand(3)+2);i++)
|
||||
new/obj/item/weapon/ore/glass(src)
|
||||
|
||||
dug = 1
|
||||
icon_state = "asteroid_dug"
|
||||
|
||||
new/obj/item/weapon/ore/glass(src)
|
||||
|
||||
if(prob(50))
|
||||
var/list/ore = list(/obj/item/weapon/ore/coal = 8,
|
||||
/obj/item/weapon/ore/iron = 6,
|
||||
/obj/item/weapon/ore/phoron = 3,
|
||||
/obj/item/weapon/ore/silver = 3,
|
||||
/obj/item/weapon/ore/gold = 2,
|
||||
/obj/item/weapon/ore/osmium = 3,
|
||||
/obj/item/weapon/ore/hydrogen = 2,
|
||||
/obj/item/weapon/ore/uranium = 1,
|
||||
/obj/random/junk = 1,
|
||||
/obj/item/weapon/ore/diamond = 0.5,
|
||||
/obj/random/powercell = 0.2,
|
||||
/obj/random/coin = 0.2,
|
||||
/obj/random/loot = 0.1,
|
||||
/obj/random/action_figure = 0.1)
|
||||
var/ore_path = pickweight(ore)
|
||||
if(ore)
|
||||
new ore_path(src)
|
||||
user << "<span class='notice'>You unearth something amidst the sand!</span>"
|
||||
|
||||
if(dug <= 10)
|
||||
dug += 1
|
||||
else
|
||||
ChangeTurf(/turf/space)
|
||||
return
|
||||
|
||||
/turf/simulated/floor/asteroid/proc/updateMineralOverlays(var/update_neighbors)
|
||||
@@ -560,7 +697,7 @@
|
||||
for (var/i = 1; i <= overlay_cache.len; i++)
|
||||
overlay_cache[i] = image('icons/turf/flooring/decals.dmi', "asteroid[i - 1]")
|
||||
|
||||
if(overlay_detail)
|
||||
if(overlay_detail)
|
||||
overlays += overlay_cache[overlay_detail + 1]
|
||||
|
||||
if(update_neighbors)
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
/mob/living/silicon/robot/drone/mining
|
||||
icon_state = "miningdrone"
|
||||
law_type = /datum/ai_laws/mining_drone
|
||||
module_type = /obj/item/weapon/robot_module/mining_drone/basic
|
||||
holder_type = /obj/item/weapon/holder/drone/mining
|
||||
maxHealth = 45
|
||||
health = 45
|
||||
pass_flags = PASSTABLE
|
||||
req_access = list(access_mining, access_robotics)
|
||||
idcard_type = /obj/item/weapon/card/id/synthetic/minedrone
|
||||
speed = -1
|
||||
var/health_upgrade
|
||||
var/ranged_upgrade
|
||||
var/melee_upgrade
|
||||
var/drill_upgrade
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/New()
|
||||
|
||||
..()
|
||||
|
||||
verbs += /mob/living/proc/hide
|
||||
remove_language("Robot Talk")
|
||||
add_language("Drone Talk", 1)
|
||||
|
||||
//They are unable to be upgraded, so let's give them a bit of a better battery.
|
||||
cell.maxcharge = 10000
|
||||
cell.charge = 10000
|
||||
|
||||
// NO BRAIN.
|
||||
mmi = null
|
||||
|
||||
//We need to screw with their HP a bit. They have around one fifth as much HP as a full borg.
|
||||
for(var/V in components) if(V != "power cell")
|
||||
var/datum/robot_component/C = components[V]
|
||||
C.max_damage = 15
|
||||
|
||||
verbs -= /mob/living/silicon/robot/verb/Namepick
|
||||
verbs -= /mob/living/silicon/robot/drone/verb/set_mail_tag
|
||||
updateicon()
|
||||
density = 0
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/updatename()
|
||||
real_name = "NT-I-[rand(100,999)]"
|
||||
name = real_name
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/init()
|
||||
aiCamera = new/obj/item/device/camera/siliconcam/drone_camera(src)
|
||||
additional_law_channels["Drone"] = ":d"
|
||||
if(!laws) laws = new law_type
|
||||
if(!module) module = new module_type(src)
|
||||
|
||||
flavor_text = "It's a tiny little mining drone. The casing is stamped with an corporate logo and the subscript: '[company_name] Automated Pickaxe!'"
|
||||
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/welcome_drone()
|
||||
src << "<b>You are a mining drone, a tiny-brained robotic industrial machine</b>."
|
||||
src << "You have little individual will, some personality, and no drives or urges other than your laws and the art of mining."
|
||||
src << "Remember, <b>you DO NOT take orders from the AI.</b>"
|
||||
src << "Use <b>say ;Hello</b> to talk to other drones and <b>say Hello</b> to speak silently to your nearby fellows."
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/attackby(var/obj/item/weapon/W, var/mob/user)
|
||||
|
||||
if(istype(W, /obj/item/borg/upgrade/))
|
||||
user << "<span class='danger'>\The [src] is not compatible with \the [W].</span>"
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
|
||||
|
||||
if(stat == 2)
|
||||
|
||||
var/choice = input("Look at your icon - is this what you want?") in list("Reboot","Recycle")
|
||||
if(choice=="Reboot")
|
||||
|
||||
if(!config.allow_drone_spawn || emagged || health < -maxHealth) //It's dead, Dave.
|
||||
user << "<span class='danger'>The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one.</span>"
|
||||
return
|
||||
|
||||
if(!allowed(usr))
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] swipes \his ID card through \the [src], attempting to reboot it.</span>", "<span class='danger'>>You swipe your ID card through \the [src], attempting to reboot it.</span>")
|
||||
request_player()
|
||||
return
|
||||
|
||||
else
|
||||
var/obj/item/weapon/card/id/ID = W
|
||||
if(!allowed(usr))
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
return
|
||||
|
||||
user.visible_message("<span class='danger'>\The [user] swipes \his ID card through \the [src], recycling it into points.</span>", "<span class='danger'>>You swipe your ID card through \the [src], recycling it into points.</span>")
|
||||
ID.mining_points += 800
|
||||
if(health_upgrade)
|
||||
ID.mining_points += 600
|
||||
health_upgrade = 0
|
||||
if(ranged_upgrade)
|
||||
ID.mining_points += 600
|
||||
ranged_upgrade = 0
|
||||
if(melee_upgrade)
|
||||
ID.mining_points += 400
|
||||
melee_upgrade = 0
|
||||
if(drill_upgrade)
|
||||
ID.mining_points += 2000
|
||||
drill_upgrade = 0
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
else
|
||||
user.visible_message("<span class='danger'>\The [user] swipes \his ID card through \the [src], attempting to shut it down.</span>", "<span class='danger'>You swipe your ID card through \the [src], attempting to shut it down.</span>")
|
||||
|
||||
if(emagged)
|
||||
return
|
||||
|
||||
if(allowed(usr))
|
||||
shut_down()
|
||||
else
|
||||
user << "<span class='danger'>Access denied.</span>"
|
||||
|
||||
return
|
||||
|
||||
..()
|
||||
|
||||
/mob/living/silicon/robot/drone/mining/verb/print_report()
|
||||
set name = "Print Message"
|
||||
set desc = "Print out a status report of your own choosing."
|
||||
set category = "Robot Commands"
|
||||
|
||||
var/input = sanitize(input(usr, "Please enter a message to print out. NOTE: BBCode does not work.", "Print readout", "") as message|null)
|
||||
if (!input)
|
||||
usr << "<span class='warning'>Cancelled.</span>"
|
||||
return
|
||||
|
||||
var/customname = input(usr, "Pick a title for the report", "Title") as text|null
|
||||
if (!customname)
|
||||
usr << "<span class='warning'>Cancelled.</span>"
|
||||
return
|
||||
|
||||
var/status_report
|
||||
switch(src.health)
|
||||
if((maxHealth - (maxHealth/3)) to maxHealth)
|
||||
status_report = "All systems nominal."
|
||||
if((maxHealth/3) to maxHealth/2)
|
||||
status_report = "Systems compromised."
|
||||
if(0 to (maxHealth/3))
|
||||
status_report = "Systems failing."
|
||||
else
|
||||
status_report = "System status unknown."
|
||||
|
||||
// Create the reply message
|
||||
usr << "<span class='warning'>You begin printing the message.</span>"
|
||||
if(do_after(src,20))
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(src.loc)
|
||||
P.name = "mining report - [customname]"
|
||||
P.info = {"<center><img src = ntlogo.png></center>
|
||||
<center><b><i>NanoTrasen Mining Drone Report</b></i><br>
|
||||
<font size = \"1\">FOR YOUR EYES ONLY</font><hr><br>
|
||||
<font size = \"1\"><font face='Courier New'>[input]</font></font><hr>
|
||||
<font size = \"1\">[status_report]</font><br>
|
||||
<center><img src = barcode[rand(0, 3)].png></center></center>"}
|
||||
P.update_icon()
|
||||
visible_message("\icon[src] <span class = 'notice'>The [usr] pings, \"[P.name] ready for review\", and happily disgorges a small printout.</span>", 2)
|
||||
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
|
||||
|
||||
/**********************Minebot Upgrades**********************/
|
||||
|
||||
/obj/item/device/mine_bot_ugprade
|
||||
name = "minebot drill upgrade"
|
||||
desc = "A minebot upgrade."
|
||||
icon_state = "mainboard"
|
||||
icon = 'icons/obj/module.dmi'
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/afterattack(var/mob/living/silicon/robot/drone/mining/M, mob/user, proximity)
|
||||
if(!istype(M) || !proximity)
|
||||
return
|
||||
upgrade_bot(M, user)
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/proc/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.melee_upgrade)
|
||||
user << "[src] already has a drill upgrade installed!"
|
||||
return
|
||||
M.modtype = initial(M.modtype)
|
||||
M.uneq_all()
|
||||
qdel(M.module)
|
||||
M.module = null
|
||||
if(M.ranged_upgrade)
|
||||
new /obj/item/weapon/robot_module/mining_drone/drillandplasmacutter(M)
|
||||
else
|
||||
new /obj/item/weapon/robot_module/mining_drone/drill(M)
|
||||
M.module.rebuild()
|
||||
M.recalculate_synth_capacities()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health
|
||||
name = "minebot chassis upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/health/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.health_upgrade)
|
||||
user << "[src] already has a reinforced chassis!"
|
||||
return
|
||||
M.maxHealth = 100
|
||||
M.health += 55
|
||||
for(var/V in M.components) if(V != "power cell")
|
||||
var/datum/robot_component/C = M.components[V]
|
||||
C.max_damage = 30
|
||||
M.health_upgrade = 1
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/plasma
|
||||
name = "minebot plasma cutter upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/plasma/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.ranged_upgrade)
|
||||
user << "[src] already has a plasma cutter upgrade installed!"
|
||||
return
|
||||
M.modtype = initial(M.modtype)
|
||||
M.uneq_all()
|
||||
qdel(M.module)
|
||||
M.module = null
|
||||
if(M.melee_upgrade)
|
||||
new /obj/item/weapon/robot_module/mining_drone/drillandplasmacutter(M)
|
||||
else
|
||||
new /obj/item/weapon/robot_module/mining_drone/plasmacutter(M)
|
||||
M.ranged_upgrade = 1
|
||||
M.module.rebuild()
|
||||
M.recalculate_synth_capacities()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/thermal
|
||||
name = "minebot thermal drill upgrade"
|
||||
|
||||
/obj/item/device/mine_bot_ugprade/thermal/upgrade_bot(var/mob/living/silicon/robot/drone/mining/M, mob/user)
|
||||
if(M.drill_upgrade)
|
||||
user << "[src] already has a thermal drill!"
|
||||
return
|
||||
if(M.emagged == 1)
|
||||
return 0
|
||||
|
||||
M.emagged = 1
|
||||
M.fakeemagged = 1
|
||||
M.drill_upgrade = 1
|
||||
qdel(src)
|
||||
+14
-12
@@ -1,7 +1,7 @@
|
||||
/obj/item/weapon/ore
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore2"
|
||||
icon_state = "ore1"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/material
|
||||
@@ -10,25 +10,25 @@
|
||||
name = "pitchblende"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = list(TECH_MATERIAL = 5)
|
||||
material = "uranium"
|
||||
material = ORE_URANIUM
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "hematite"
|
||||
material = ORE_IRON
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
material = ORE_COAL
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "sand"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "sand"
|
||||
material = ORE_SAND
|
||||
slot_flags = SLOT_HOLSTER
|
||||
|
||||
// POCKET SAND!
|
||||
@@ -46,36 +46,36 @@
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
material = "phoron"
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_PHORON = 2)
|
||||
material = ORE_PHORON
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
material = "silver"
|
||||
material = ORE_SILVER
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
material = "gold"
|
||||
material = ORE_GOLD
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = list(TECH_MATERIAL = 6)
|
||||
material = "diamond"
|
||||
material = ORE_DIAMOND
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
name = "raw platinum"
|
||||
icon_state = "ore_platinum"
|
||||
material = "platinum"
|
||||
material = ORE_PLATINUM
|
||||
|
||||
/obj/item/weapon/ore/hydrogen
|
||||
name = "raw hydrogen"
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
material = ORE_HYDROGEN
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
@@ -86,6 +86,8 @@
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
if(icon_state == "ore1")
|
||||
icon_state = "ore[pick(1,2,3)]"
|
||||
|
||||
/obj/item/weapon/ore/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/device/core_sampler))
|
||||
|
||||
@@ -17,6 +17,7 @@ var/global/list/ore_data = list()
|
||||
"million" = 999
|
||||
)
|
||||
var/xarch_source_mineral = "iron"
|
||||
var/worth = 0 // Arbitrary point value for the ore redemption console
|
||||
|
||||
/ore/New()
|
||||
. = ..()
|
||||
@@ -28,7 +29,7 @@ var/global/list/ore_data = list()
|
||||
display_name = "pitchblende"
|
||||
smelts_to = "uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
spread_chance = 15
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
@@ -36,6 +37,7 @@ var/global/list/ore_data = list()
|
||||
"million" = 704
|
||||
)
|
||||
xarch_source_mineral = "potassium"
|
||||
worth = 25
|
||||
|
||||
/ore/hematite
|
||||
name = ORE_IRON
|
||||
@@ -43,9 +45,10 @@ var/global/list/ore_data = list()
|
||||
smelts_to = "iron"
|
||||
alloy = 1
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
spread_chance = 30
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
scan_icon = "mineral_common"
|
||||
worth = 4
|
||||
|
||||
/ore/coal
|
||||
name = ORE_COAL
|
||||
@@ -53,21 +56,22 @@ var/global/list/ore_data = list()
|
||||
smelts_to = "plastic"
|
||||
alloy = 1
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
spread_chance = 35
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
scan_icon = "mineral_common"
|
||||
worth = 2
|
||||
|
||||
/ore/glass
|
||||
name = ORE_SAND
|
||||
display_name = "sand"
|
||||
smelts_to = "glass"
|
||||
compresses_to = "sandstone"
|
||||
worth = 1
|
||||
|
||||
/ore/phoron
|
||||
name = ORE_PHORON
|
||||
display_name = "phoron crystals"
|
||||
compresses_to = "phoron"
|
||||
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
@@ -79,15 +83,17 @@ var/global/list/ore_data = list()
|
||||
"billion_lower" = 10
|
||||
)
|
||||
xarch_source_mineral = "phoron"
|
||||
worth = 8
|
||||
|
||||
/ore/silver
|
||||
name = ORE_SILVER
|
||||
display_name = "native silver"
|
||||
smelts_to = "silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
spread_chance = 15
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
scan_icon = "mineral_uncommon"
|
||||
worth = 20
|
||||
|
||||
/ore/gold
|
||||
smelts_to = ORE_GOLD
|
||||
@@ -103,16 +109,18 @@ var/global/list/ore_data = list()
|
||||
"billion" = 4,
|
||||
"billion_lower" = 3
|
||||
)
|
||||
worth = 30
|
||||
|
||||
/ore/diamond
|
||||
name = ORE_DIAMOND
|
||||
display_name = "diamond"
|
||||
compresses_to = "diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
spread_chance = 5
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_source_mineral = "nitrogen"
|
||||
worth = 50
|
||||
|
||||
/ore/platinum
|
||||
name = ORE_PLATINUM
|
||||
@@ -121,9 +129,10 @@ var/global/list/ore_data = list()
|
||||
compresses_to = "osmium"
|
||||
alloy = 1
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
spread_chance = 15
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
scan_icon = "mineral_rare"
|
||||
worth = 15
|
||||
|
||||
/ore/hydrogen
|
||||
name = ORE_HYDROGEN
|
||||
@@ -131,3 +140,4 @@ var/global/list/ore_data = list()
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
worth = 30
|
||||
|
||||
Reference in New Issue
Block a user