Axes prototyping. o7

This commit is contained in:
Kelenius
2015-05-19 21:12:17 +03:00
parent db30c15e4c
commit 35a6ba6b87
5 changed files with 2 additions and 182 deletions

View File

@@ -1437,9 +1437,7 @@
#include "code\modules\recycling\disposal-construction.dm" #include "code\modules\recycling\disposal-construction.dm"
#include "code\modules\recycling\disposal.dm" #include "code\modules\recycling\disposal.dm"
#include "code\modules\recycling\sortingmachinery.dm" #include "code\modules\recycling\sortingmachinery.dm"
#include "code\modules\research\assembly.dm"
#include "code\modules\research\circuitprinter.dm" #include "code\modules\research\circuitprinter.dm"
#include "code\modules\research\designs-chassis.dm"
#include "code\modules\research\designs.dm" #include "code\modules\research\designs.dm"
#include "code\modules\research\destructive_analyzer.dm" #include "code\modules\research\destructive_analyzer.dm"
#include "code\modules\research\message_server.dm" #include "code\modules\research\message_server.dm"

View File

@@ -1,8 +0,0 @@
/obj/machinery/r_n_d/assembly
name = "Assembly"
icon_state = "protolathe"
flags = OPENCONTAINER
use_power = 1
idle_power_usage = 30
active_power_usage = 5000

View File

@@ -1,76 +0,0 @@
/datum/design/chassis
name = "Chassis"
build_type = CHASSIS
build_path = null
var/list/components = null
/datum/design/chassis/proc/suitablePart(var/name, var/datum/design/D)
return 0
/datum/design/chassis/proc/setup(var/obj/item/I, var/obj/item/O, var/partname)
return
/datum/design/chassis/revolver
name = "Energy gun (small)"
id = "chassis_gun_small"
build_path = /obj/item/weapon/gun/energy/custom
req_tech = list(TECH_MATERIAL = 2)
components = list("Power source", "Beam generator")
/datum/design/chassis/revolver/suitablePart(var/name, var/datum/design/D)
switch(name)
if("Power source")
if(ispath(D.build_path, /obj/item/weapon/cell))
return 1
if("Beam generator")
if(ispath(D.build_path, /obj/item/beam_generator))
return 1
return 0
/datum/design/chassis/revolver/setup(var/obj/item/weapon/gun/energy/custom/I, var/obj/item/O, var/partname)
if(!I || !istype(I))
return
switch(partname)
if("Power source")
I.power_supply = O
if("Beam generator")
var/obj/item/beam_generator/B = O
if(!B || !istype(B))
return
I.charge_cost = B.energy_use
I.projectile_type = B.beam_type
I.fire_sound = B.shot_sound
/obj/item/weapon/gun/energy/custom
name = "Prototype gun"
desc = "This is a prototype gun built in R&D."
icon_state = "stunrevolver"
item_state = "stunrevolver"
fire_sound = null
charge_cost = 0
projectile_type = null
cell_type = null
/datum/design/beam_generator
name = "Stun beam"
id = "stun_beam_generator"
req_tech = list(TECH_POWER = 3, TECH_COMBAT = 2)
materials = list("metal" = 700, "glass" = 1000)
build_path = /obj/item/beam_generator
/obj/item/beam_generator
var/shot_sound = 'sound/weapons/Taser.ogg'
var/beam_type = /obj/item/projectile/beam/stun
var/energy_use = 150
/datum/design/beam_generator/laser
name = "Laser beam"
id = "laser_beam_generator"
req_tech = list(TECH_POWER = 3, TECH_COMBAT = 4)
materials = list("metal" = 1000, "glass" = 3000)
build_path = /obj/item/beam_generator/laser
/obj/item/beam_generator/laser
shot_sound = 'sound/weapons/Laser.ogg'
beam_type = /obj/item/projectile/beam
energy_use = 300

View File

@@ -7,17 +7,15 @@
idle_power_usage = 30 idle_power_usage = 30
active_power_usage = 5000 active_power_usage = 5000
var/max_material_storage = 100000
var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0) var/list/materials = list("metal" = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
var/list/datum/design/queue = list() var/list/datum/design/queue = list()
var/progress = 0 var/progress = 0
var/max_material_storage = 100000 // All this could probably be done better with a list but meh.
var/mat_efficiency = 1 var/mat_efficiency = 1
var/speed = 1 var/speed = 1
var/datum/design/chassis/current_chassis = null
var/list/datum/design/current_components = list()
/obj/machinery/r_n_d/protolathe/New() /obj/machinery/r_n_d/protolathe/New()
..() ..()
component_parts = list() component_parts = list()
@@ -239,17 +237,3 @@
if(new_item.matter && new_item.matter.len > 0) if(new_item.matter && new_item.matter.len > 0)
for(var/i in new_item.matter) for(var/i in new_item.matter)
new_item.matter[i] = new_item.matter[i] * mat_efficiency new_item.matter[i] = new_item.matter[i] * mat_efficiency
/obj/machinery/r_n_d/protolathe/proc/choosePart(var/name, var/datum/design/D)
current_components[name] = D
/obj/machinery/r_n_d/protolathe/proc/buildChassis()
var/obj/item/I = new current_chassis.build_path(loc)
for(var/t in current_components)
var/datum/design/D = current_components[t]
var/obj/item/O = new D.build_path(I)
world << I
world << I.type
current_chassis.setup(I, O, t)
current_components.Cut()
current_chassis = null

View File

@@ -42,7 +42,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/screen = 1.0 //Which screen is currently showing. var/screen = 1.0 //Which screen is currently showing.
var/id = 0 //ID of the computer (for server restrictions). var/id = 0 //ID of the computer (for server restrictions).
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
var/picking_part = null
req_access = list(access_research) //Data and setting manipulation requires scientist access. req_access = list(access_research) //Data and setting manipulation requires scientist access.
@@ -412,33 +411,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else else
del sheet del sheet
else if(href_list["plan"])
if(linked_lathe)
for(var/datum/design/D in files.known_designs)
if(D.id == href_list["plan"])
linked_lathe.current_chassis = D
break
screen = 3.6
updateUsrDialog()
else if(href_list["pickpart"])
picking_part = href_list["pickpart"]
screen = 3.7
updateUsrDialog()
else if(href_list["choosepart"])
for(var/datum/design/D in files.known_designs)
if(D.id == href_list["choosepart"])
linked_lathe.choosePart(picking_part, D)
break
screen = 3.6
updateUsrDialog()
else if(href_list["buildchassis"])
linked_lathe.buildChassis()
screen = 3.1
updateUsrDialog()
else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with. else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with.
screen = 0.0 screen = 0.0
spawn(10) spawn(10)
@@ -713,7 +685,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(3.1) if(3.1)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || " dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.4'>View Queue</A> || " dat += "<A href='?src=\ref[src];menu=3.4'>View Queue</A> || "
dat += "<A href='?src=\ref[src];menu=3.5'>Assembly</A> || "
dat += "<A href='?src=\ref[src];menu=3.2'>Material Storage</A> || " dat += "<A href='?src=\ref[src];menu=3.2'>Material Storage</A> || "
dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><HR>" dat += "<A href='?src=\ref[src];menu=3.3'>Chemical Storage</A><HR>"
dat += "Protolathe Menu:<BR><BR>" dat += "Protolathe Menu:<BR><BR>"
@@ -780,55 +751,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>" dat += "[tmp]: [D.name] <A href='?src=\ref[src];removeP=[tmp]'>(Remove)</A><BR>"
++tmp ++tmp
if(3.5) // Protolathe assembly
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Chassis list<BR><HR>"
if(linked_lathe.queue.len)
dat += "Protolathe is in use"
else
dat += "<UL>"
for(var/datum/design/D in files.known_designs)
if(!D.build_path || !(D.build_type & CHASSIS))
continue
var/datum/design/chassis/C = D
if(!C || !istype(C))
continue
dat += "<LI><A href='?src=\ref[src];plan=[C.id]'>[C.name]</A>"
dat += "</UL>"
if(3.6)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.5'>Back to list</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "Assembly<BR><HR>"
if(linked_lathe && linked_lathe.current_chassis)
dat += "<B>[linked_lathe.current_chassis.name]</B><BR>"
dat += "<UL>"
var/can_build = 1
for(var/T in linked_lathe.current_chassis.components)
var/datum/design/D = linked_lathe.current_components[T]
if(!D)
dat += "<LI>[T]: <A href='?src=\ref[src];pickpart=[T]'>Nothing</A>"
can_build = 0
else
dat += "<LI>[T]: <A href='?src=\ref[src];pickpart=[T]'>[D.name]</A>"
dat += "</UL>"
if(can_build)
dat += "<A href='?src=\ref[src];buildchassis=1'>BUILD</A>"
else
dat += "NO PROTOLATHE LINKED OR NO DESIGN LOADED"
if(3.7)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
dat += "<A href='?src=\ref[src];menu=3.6'>Back to list</A> || "
dat += "<A href='?src=\ref[src];menu=3.1'>Protolathe Menu</A><HR>"
dat += "<B>[picking_part]</B><BR><UL>"
for(var/datum/design/D in files.known_designs)
if(linked_lathe.current_chassis.suitablePart(picking_part, D))
dat += "<LI><A href='?src=\ref[src];choosepart=[D.id]'>[D.name]</A>"
dat += "</UL>"
///////////////////CIRCUIT IMPRINTER SCREENS//////////////////// ///////////////////CIRCUIT IMPRINTER SCREENS////////////////////
if(4.0) if(4.0)
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>" dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"