Merge branch 'dev' into ofResearchAndPrototypes

Conflicts:
	code/game/objects/items/stacks/sheets/glass.dm
	code/game/objects/items/stacks/sheets/leather.dm
	code/game/objects/items/stacks/sheets/mineral.dm
	code/game/objects/items/stacks/sheets/sheet_types.dm
	code/game/objects/items/weapons/kitchen.dm
	code/modules/hydroponics/trays/tray_tools.dm
	code/modules/research/circuitprinter.dm
	code/modules/research/protolathe.dm
	code/modules/research/rdconsole.dm
This commit is contained in:
Kelenius
2015-05-22 19:26:39 +03:00
237 changed files with 3724 additions and 3275 deletions

View File

@@ -96,7 +96,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
/obj/machinery/r_n_d/circuit_imprinter/dismantle()
for(var/obj/I in component_parts)
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
reagents.trans_to_obj(I, reagents.total_volume)
reagents.trans_to_obj(I, reagents.total_volume)
for(var/f in materials)
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
var/path = getMaterialType(f)
@@ -124,9 +124,9 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
if(!linked_console)
user << "\The [src] must be linked to an R&D console first."
return 1
if(O.is_open_container())
if(O.is_open_container())
return 0
if(!istype(O, /obj/item/stack/sheet/glass) && !istype(O, /obj/item/stack/sheet/mineral/gold) && !istype(O, /obj/item/stack/sheet/mineral/diamond) && !istype(O, /obj/item/stack/sheet/mineral/uranium))
if(!istype(O, /obj/item/stack/material/glass) && !istype(O, /obj/item/stack/material/gold) && !istype(O, /obj/item/stack/material/diamond) && !istype(O, /obj/item/stack/material/uranium))
user << "<span class='notice'>You cannot insert this item into \the [src].</span>"
return 1
if(stat)
@@ -136,7 +136,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/sheet/stack = O
var/obj/item/stack/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)
if(!O)
@@ -153,7 +153,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
var/stacktype = stack.type
var/t = getMaterialName(stacktype)
if(t)
if(do_after(usr, 16))
if(do_after(usr, 16))
if(stack.use(amount))
user << "<span class='notice'>You add [amount] sheets to \the [src].</span>"
materials[t] += amount * SHEET_MATERIAL_AMOUNT
@@ -162,7 +162,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
/obj/machinery/r_n_d/circuit_imprinter/proc/addToQueue(var/datum/design/D)
queue += D
return
return
/obj/machinery/r_n_d/circuit_imprinter/proc/removeFromQueue(var/index)
queue.Cut(index, index + 1)

View File

@@ -83,7 +83,7 @@
var/path = getMaterialType(f)
if(path)
var/obj/item/stack/S = new f(loc)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
..()
/obj/machinery/r_n_d/protolathe/update_icon()
@@ -114,9 +114,9 @@
return 1
if(!linked_console)
user << "<span class='notice'>\The [src] must be linked to an R&D console first!</span>"
return 1
if(!istype(O, /obj/item/stack/sheet))
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
return 1
if(!istype(O, /obj/item/stack/material))
user << "<span class='notice'>You cannot insert this item into \the [src]!</span>"
return 1
if(stat)
return 1
@@ -124,8 +124,8 @@
if(TotalMaterials() + SHEET_MATERIAL_AMOUNT > max_material_storage)
user << "<span class='notice'>\The [src]'s material bin is full. Please remove material before adding more.</span>"
return 1
var/obj/item/stack/sheet/stack = O
var/obj/item/stack/material/stack = O
var/amount = round(input("How many sheets do you want to add?") as num)//No decimals
if(!O)
return

View File

@@ -256,9 +256,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
M.death()
if(istype(I,/obj/item/stack/sheet)) //Only deconstructs one sheet at a time instead of the entire stack
var/obj/item/stack/sheet/S = I
M.death()
if(istype(I,/obj/item/stack/material))//Only deconsturcts one sheet at a time instead of the entire stack
var/obj/item/stack/material/S = I
if(S.get_amount() > 1)
S.use(1)
linked_destroy.loaded_item = S
@@ -379,7 +379,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
res_amount = "diamond_amount"
if(ispath(type) && hasvar(linked_lathe, res_amount))
var/obj/item/stack/sheet/sheet = new type(linked_lathe.loc)
var/obj/item/stack/material/sheet = new type(linked_lathe.loc)
var/available_num_sheets = round(linked_lathe.vars[res_amount]/sheet.perunit)
if(available_num_sheets > 0)
sheet.amount = min(available_num_sheets, desired_num_sheets)
@@ -391,19 +391,19 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/res_amount, type
switch(href_list["imprinter_ejectsheet"])
if("glass")
type = /obj/item/stack/sheet/glass
type = /obj/item/stack/material/glass
res_amount = "g_amount"
if("gold")
type = /obj/item/stack/sheet/mineral/gold
type = /obj/item/stack/material/gold
res_amount = "gold_amount"
if("diamond")
type = /obj/item/stack/sheet/mineral/diamond
type = /obj/item/stack/material/diamond
res_amount = "diamond_amount"
if("uranium")
type = /obj/item/stack/sheet/mineral/uranium
type = /obj/item/stack/material/uranium
res_amount = "uranium_amount"
if(ispath(type) && hasvar(linked_imprinter, res_amount))
var/obj/item/stack/sheet/sheet = new type(linked_imprinter.loc)
var/obj/item/stack/material/sheet = new type(linked_imprinter.loc)
var/available_num_sheets = round(linked_imprinter.vars[res_amount]/sheet.perunit)
if(available_num_sheets>0)
sheet.amount = min(available_num_sheets, desired_num_sheets)

View File

@@ -17,34 +17,34 @@
/obj/machinery/r_n_d/proc/getMaterialType(var/name)
switch(name)
if("metal")
return /obj/item/stack/sheet/metal
return /obj/item/stack/material/steel
if("glass")
return /obj/item/stack/sheet/glass
return /obj/item/stack/material/glass
if("gold")
return /obj/item/stack/sheet/mineral/gold
return /obj/item/stack/material/gold
if("silver")
return /obj/item/stack/sheet/mineral/silver
return /obj/item/stack/material/silver
if("phoron")
return /obj/item/stack/sheet/mineral/phoron
return /obj/item/stack/material/phoron
if("uranium")
return /obj/item/stack/sheet/mineral/uranium
return /obj/item/stack/material/uranium
if("diamond")
return /obj/item/stack/sheet/mineral/diamond
return /obj/item/stack/material/diamond
return null
/obj/machinery/r_n_d/proc/getMaterialName(var/type)
switch(type)
if(/obj/item/stack/sheet/metal)
if(/obj/item/stack/material/steel)
return "metal"
if(/obj/item/stack/sheet/glass)
if(/obj/item/stack/material/glass)
return "glass"
if(/obj/item/stack/sheet/mineral/gold)
if(/obj/item/stack/material/gold)
return "gold"
if(/obj/item/stack/sheet/mineral/silver)
if(/obj/item/stack/material/silver)
return "silver"
if(/obj/item/stack/sheet/mineral/phoron)
if(/obj/item/stack/material/phoron)
return "phoron"
if(/obj/item/stack/sheet/mineral/uranium)
if(/obj/item/stack/material/uranium)
return "uranium"
if(/obj/item/stack/sheet/mineral/diamond)
if(/obj/item/stack/material/diamond)
return "diamond"

View File

@@ -20,17 +20,17 @@
/obj/structure/crystal/Destroy()
src.visible_message("\red<b>[src] shatters!</b>")
if(prob(75))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(50))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(25))
new /obj/item/weapon/shard/phoron(src.loc)
new /obj/item/weapon/material/shard/phoron(src.loc)
if(prob(75))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
if(prob(50))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
if(prob(25))
new /obj/item/weapon/shard(src.loc)
new /obj/item/weapon/material/shard(src.loc)
..()
//todo: laser_act

View File

@@ -43,17 +43,17 @@
/obj/item/weapon/autopsy_scanner,\
/obj/item/weapon/bikehorn,\
/obj/item/weapon/bonesetter,\
/obj/item/weapon/butch,\
/obj/item/weapon/material/knife/butch,\
/obj/item/weapon/caution,\
/obj/item/weapon/caution/cone,\
/obj/item/weapon/crowbar,\
/obj/item/weapon/clipboard,\
/obj/item/weapon/cell,\
/obj/item/weapon/circular_saw,\
/obj/item/weapon/hatchet,\
/obj/item/weapon/material/hatchet,\
/obj/item/weapon/handcuffs,\
/obj/item/weapon/hemostat,\
/obj/item/weapon/kitchenknife,\
/obj/item/weapon/material/knife,\
/obj/item/weapon/flame/lighter,\
/obj/item/weapon/light/bulb,\
/obj/item/weapon/light/tube,\

View File

@@ -136,11 +136,11 @@
if(3)
item_type = "[pick("fork","spoon","knife")]"
if(prob(25))
new_item = new /obj/item/weapon/kitchen/utensil/fork(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/fork(src.loc)
else if(prob(50))
new_item = new /obj/item/weapon/kitchen/utensil/knife(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/knife(src.loc)
else
new_item = new /obj/item/weapon/kitchen/utensil/spoon(src.loc)
new_item = new /obj/item/weapon/material/kitchen/utensil/spoon(src.loc)
additional_desc = "[pick("It's like no [item_type] you've ever seen before",\
"It's a mystery how anyone is supposed to eat with this",\
"You wonder what the creator's mouth was shaped like")]."
@@ -167,7 +167,7 @@
"You wonder what kind of music was made with it")]."
if(6)
item_type = "[pick("bladed knife","serrated blade","sharp cutting implement")]"
new_item = new /obj/item/weapon/kitchenknife(src.loc)
new_item = new /obj/item/weapon/material/knife(src.loc)
additional_desc = "[pick("It doesn't look safe.",\
"It looks wickedly jagged",\
"There appear to be [pick("dark red","dark purple","dark green","dark blue")] stains along the edges")]."
@@ -236,16 +236,16 @@
if(14)
apply_material_decorations = 0
var/list/possible_spawns = list()
possible_spawns += /obj/item/stack/sheet/metal
possible_spawns += /obj/item/stack/sheet/plasteel
possible_spawns += /obj/item/stack/sheet/glass
possible_spawns += /obj/item/stack/sheet/glass/reinforced
possible_spawns += /obj/item/stack/sheet/mineral/phoron
possible_spawns += /obj/item/stack/sheet/mineral/gold
possible_spawns += /obj/item/stack/sheet/mineral/silver
possible_spawns += /obj/item/stack/sheet/mineral/enruranium
possible_spawns += /obj/item/stack/sheet/mineral/sandstone
possible_spawns += /obj/item/stack/sheet/mineral/silver
possible_spawns += /obj/item/stack/material/steel
possible_spawns += /obj/item/stack/material/plasteel
possible_spawns += /obj/item/stack/material/glass
possible_spawns += /obj/item/stack/material/glass/reinforced
possible_spawns += /obj/item/stack/material/phoron
possible_spawns += /obj/item/stack/material/gold
possible_spawns += /obj/item/stack/material/silver
possible_spawns += /obj/item/stack/material/uranium
possible_spawns += /obj/item/stack/material/sandstone
possible_spawns += /obj/item/stack/material/silver
var/new_type = pick(possible_spawns)
new_item = new new_type(src.loc)
@@ -294,7 +294,7 @@
new_item.desc = ""
if(19)
apply_prefix = 0
new_item = new /obj/item/weapon/claymore(src.loc)
new_item = new /obj/item/weapon/material/sword(src.loc)
new_item.force = 10
item_type = new_item.name
if(20)
@@ -315,9 +315,9 @@
apply_material_decorations = 0
if(22)
if(prob(50))
new_item = new /obj/item/weapon/shard(src.loc)
new_item = new /obj/item/weapon/material/shard(src.loc)
else
new_item = new /obj/item/weapon/shard/phoron(src.loc)
new_item = new /obj/item/weapon/material/shard/phoron(src.loc)
apply_prefix = 0
apply_image_decorations = 0
apply_material_decorations = 0
@@ -337,7 +337,7 @@
apply_material_decorations = 0
if(25)
apply_prefix = 0
new_item = new /obj/item/weapon/katana(src.loc)
new_item = new /obj/item/weapon/material/sword/katana(src.loc)
new_item.force = 10
item_type = new_item.name
if(26)

View File

@@ -107,7 +107,7 @@
icon_state = "excavation"
desc = "A set of picks for excavation."
item_state = "syringe_kit"
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
foldable = /obj/item/stack/material/cardboard //BubbleWrap
storage_slots = 7
w_class = 2
can_hold = list(/obj/item/weapon/pickaxe/brush,\