Fixed building stuff inside stuff. Such as, say, windows in disposals.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3197 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
uporotiy
2012-02-26 08:06:06 +00:00
parent c801c50cea
commit 7c4e994524
3 changed files with 21 additions and 24 deletions
+3 -9
View File
@@ -6,8 +6,9 @@ SHARDS
*/
/proc/construct_window(mob/user as mob, obj/item/stack/sheet/src as obj)//Why is this a general proc and not on the glass sheet?
/obj/item/stack/sheet/glass/proc/construct_window(mob/user as mob)
if(!user || !src) return 0
if(!istype(user.loc,/turf)) return 0
if(!user.IsAdvancedToolUser())
user << "\red You don't have the dexterity to do this!"
return 0
@@ -69,7 +70,7 @@ SHARDS
// GLASS
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
construct_window(user, src)
construct_window(user)
/obj/item/stack/sheet/glass/attackby(obj/item/W, mob/user)
..()
@@ -105,13 +106,6 @@ SHARDS
// REINFORCED GLASS
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(user, src)
// SHARDS
+12 -9
View File
@@ -33,6 +33,9 @@ FLOOR TILES
/obj/item/stack/rods/attack_self(mob/user as mob)
src.add_fingerprint(user)
if(!istype(user.loc,/turf)) return 0
if (locate(/obj/structure/grille, usr.loc))
for(var/obj/structure/grille/G in usr.loc)
if (G.destroyed)
@@ -62,28 +65,28 @@ FLOOR TILES
// /datum/stack_recipe/New(title, result_type, req_amount, res_amount, max_res_amount, time, one_per_turf, on_floor = 0)
var/global/list/datum/stack_recipe/metal_recipes = list ( \
new/datum/stack_recipe("stool", /obj/structure/stool), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1), \
new/datum/stack_recipe("stool", /obj/structure/stool, on_floor = 1), \
new/datum/stack_recipe("chair", /obj/structure/stool/bed/chair, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("bed", /obj/structure/stool/bed, 2, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
new/datum/stack_recipe("rack parts", /obj/item/weapon/rack_parts), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1), \
new/datum/stack_recipe("closet", /obj/structure/closet, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 2, one_per_turf = 1), \
new/datum/stack_recipe("canister", /obj/machinery/portable_atmospherics/canister, 2, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("floor tile", /obj/item/stack/tile/plasteel, 1, 4, 10), \
new/datum/stack_recipe("metal rod", /obj/item/stack/rods, 1, 2, 60), \
null, \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, one_per_turf = 1), \
new/datum/stack_recipe("computer frame", /obj/structure/computerframe, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wall girders", /obj/structure/girder, 2, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("airlock assembly", /obj/structure/door_assembly, 4, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, one_per_turf = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, one_per_turf = 1), \
new/datum/stack_recipe("machine frame", /obj/machinery/constructable_frame/machine_frame, 5, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("turret frame", /obj/machinery/porta_turret_construct, 5, one_per_turf = 1, on_floor = 1), \
null, \
new/datum/stack_recipe("apc frame", /obj/item/apc_frame, 2), \
new/datum/stack_recipe("grenade casing", /obj/item/weapon/chem_grenade), \
null, \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20), \
new/datum/stack_recipe("iron door", /obj/structure/mineral_door/iron, 20, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/metal
+6 -6
View File
@@ -10,7 +10,7 @@ SILVER
//Sandstone
var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10), \
new/datum/stack_recipe("sandstone door", /obj/structure/mineral_door/sandstone, 10, one_per_turf = 1, on_floor = 1), \
/* new/datum/stack_recipe("sandstone wall", ???), \
new/datum/stack_recipe("sandstone floor", ???),\*/
)
@@ -22,7 +22,7 @@ var/global/list/datum/stack_recipe/sandstone_recipes = list ( \
//Diamond
var/global/list/datum/stack_recipe/diamond_recipes = list ( \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10), \
new/datum/stack_recipe("diamond door", /obj/structure/mineral_door/transparent/diamond, 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/diamond
@@ -32,7 +32,7 @@ var/global/list/datum/stack_recipe/diamond_recipes = list ( \
//Uranium
var/global/list/datum/stack_recipe/uranium_recipes = list ( \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10), \
new/datum/stack_recipe("uranium door", /obj/structure/mineral_door/uranium, 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/uranium
@@ -42,7 +42,7 @@ var/global/list/datum/stack_recipe/uranium_recipes = list ( \
//Plasma
var/global/list/datum/stack_recipe/plasma_recipes = list ( \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10), \
new/datum/stack_recipe("plasma door", /obj/structure/mineral_door/transparent/plasma, 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/plasma
@@ -52,7 +52,7 @@ var/global/list/datum/stack_recipe/plasma_recipes = list ( \
//Gold
var/global/list/datum/stack_recipe/gold_recipes = list ( \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10), \
new/datum/stack_recipe("golden door", /obj/structure/mineral_door/gold, 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/gold
@@ -62,7 +62,7 @@ var/global/list/datum/stack_recipe/gold_recipes = list ( \
//Silver
var/global/list/datum/stack_recipe/silver_recipes = list ( \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10), \
new/datum/stack_recipe("silver door", /obj/structure/mineral_door/silver, 10, one_per_turf = 1, on_floor = 1), \
)
/obj/item/stack/sheet/silver