Bugfixes, removing the remnants of table_parts, changelog.

This commit is contained in:
GinjaNinja32
2015-05-13 20:40:00 +01:00
parent f9f99d61b2
commit 5f65565f45
14 changed files with 68 additions and 72 deletions

View File

@@ -32,13 +32,6 @@
/obj/item/weapon/storage/backpack/cultpack/cultify()
return
/obj/item/weapon/table_parts/cultify()
new /obj/item/weapon/table_parts/wood(loc)
..()
/obj/item/weapon/table_parts/wood/cultify()
return
/obj/machinery/cultify()
// We keep the number of cultified machines down by only converting those that are dense
// The alternative is to keep a separate file of exceptions.

View File

@@ -147,7 +147,6 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
var/global/list/datum/stack_recipe/wood_recipes = list ( \
new/datum/stack_recipe("wooden sandals", /obj/item/clothing/shoes/sandal, 1), \
new/datum/stack_recipe("wood floor tile", /obj/item/stack/tile/wood, 1, 4, 20), \
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts/wood, 2), \
new/datum/stack_recipe("wooden chair", /obj/structure/bed/chair/wood, 3, time = 10, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("wooden barricade", /obj/structure/barricade/wooden, 5, time = 50, one_per_turf = 1, on_floor = 1), \
new/datum/stack_recipe("crossbow frame", /obj/item/weapon/crossbowframe, 5, time = 25, one_per_turf = 0, on_floor = 0), \

View File

@@ -1,6 +1,7 @@
var/list/name_to_material
/proc/populate_material_list()
if(name_to_material) return // Already set up!
name_to_material = list()
for(var/type in typesof(/material) - /material)
var/material/new_mineral = new type
@@ -116,6 +117,7 @@ var/list/name_to_material
stack_type = /obj/item/stack/sheet/glass
icon_colour = "#00E1FF"
opacity = 0.3
integrity = 100
/material/plastic
name = "plastic"

View File

@@ -59,7 +59,6 @@
/obj/item/weapon/light/tube,\
/obj/item/weapon/pickaxe,\
/obj/item/weapon/shovel,\
/obj/item/weapon/table_parts,\
/obj/item/weapon/weldingtool,\
/obj/item/weapon/wirecutters,\
/obj/item/weapon/wrench,\

View File

@@ -1,5 +1,7 @@
/obj/structure/table/proc/straight_table_check(var/direction)
if(health > 100)
return 0
var/obj/structure/table/T
for(var/angle in list(-90,90))
T = locate() in get_step(src.loc,turn(direction,angle))
@@ -8,8 +10,6 @@
T = locate() in get_step(src.loc,direction)
if (!T || T.flipped == 1 || T.material != material)
return 1
if(T.health > 100)
return 0
return T.straight_table_check(direction)
/obj/structure/table/verb/do_flip()
@@ -92,6 +92,7 @@
var/obj/structure/table/T = locate() in get_step(src,D)
if(T && T.flipped == 0 && T.material == material && material)
T.flip(direction)
take_damage(rand(5, 20))
update_connections(1)
update_icon()

View File

@@ -7,6 +7,7 @@ var/global/material/material_holographic_wood = null
icon_state = "plain_preview"
color = "#666666"
New()
if(!name_to_material) populate_material_list()
material = name_to_material[DEFAULT_WALL_MATERIAL]
..()
@@ -14,6 +15,7 @@ var/global/material/material_holographic_wood = null
icon_state = "reinf_preview"
color = "#666666"
New()
if(!name_to_material) populate_material_list()
material = name_to_material[DEFAULT_WALL_MATERIAL]
reinforced = name_to_material[DEFAULT_WALL_MATERIAL]
..()
@@ -22,12 +24,14 @@ var/global/material/material_holographic_wood = null
icon_state = "plain_preview"
color = "#824B28"
New()
if(!name_to_material) populate_material_list()
material = name_to_material["wood"]
..()
gamblingtable
icon_state = "gamble_preview"
New()
if(!name_to_material) populate_material_list()
material = name_to_material["wood"]
carpeted = 1
..()
@@ -37,6 +41,7 @@ var/global/material/material_holographic_wood = null
color = "#00E1FF"
alpha = 77 // 0.3 * 255
New()
if(!name_to_material) populate_material_list()
material = name_to_material["glass"]
..()
@@ -58,53 +63,3 @@ var/global/material/material_holographic_wood = null
material_holographic_wood.stack_type = null // Tables with null-stacktype materials cannot be deconstructed
material = material_holographic_wood
..()
/*
/obj/structure/table/holotable
name = "table"
desc = "A square piece of metal standing on four metal legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon_state = "table"
density = 1
anchored = 1.0
layer = 2.8
throwpass = 1 //You can throw objects over this, despite it's density.
/obj/structure/table/holotable/attack_hand(mob/user as mob)
return // HOLOTABLE DOES NOT GIVE A FUCK
/obj/structure/table/holotable/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
user << "It's a holotable! There are no bolts!"
return
if(isrobot(user))
return
..()
/obj/structure/table/woodentable/holotable
name = "table"
desc = "A square piece of wood standing on four wooden legs. It can not move."
icon = 'icons/obj/structures.dmi'
icon_state = "wood_table"
/obj/structure/table/rack/holorack
name = "rack"
desc = "Different from the Middle Ages version."
icon = 'icons/obj/objects.dmi'
icon_state = "rack"
/obj/structure/table/rack/holorack/attack_hand(mob/user as mob)
return
/obj/structure/table/rack/holorack/attackby(obj/item/weapon/W as obj, mob/user as mob)
if (istype(W, /obj/item/weapon/wrench))
user << "It's a holorack! You can't unwrench it!"
return
*/

View File

@@ -37,6 +37,12 @@
health += maxhealth - old_maxhealth
/obj/structure/table/proc/take_damage(amount)
health -= amount
if(health <= 0)
visible_message("<span class='warning'>\The [src] breaks down!</span>")
break_to_parts()
/obj/structure/table/New()
..()
// One table per turf.
@@ -55,6 +61,7 @@
update_connections(1)
update_icon()
update_desc()
update_material()
/obj/structure/table/Destroy()
material = null
@@ -63,6 +70,17 @@
T.update_icon()
..()
/obj/structure/table/examine(mob/user)
. = ..()
if(health < maxhealth)
switch(health / maxhealth)
if(0.0 to 0.5)
user << "<span class='warning'>It looks severely damaged!</span>"
if(0.25 to 0.5)
user << "<span class='warning'>It looks damaged!</span>"
if(0.5 to 1.0)
user << "<span class='notice'>It has a few scrapes and dents.</span>"
/obj/structure/table/attackby(obj/item/weapon/W, mob/user)
if(reinforced && istype(W, /obj/item/weapon/screwdriver))
@@ -70,6 +88,7 @@
if(!reinforced)
update_desc()
update_icon()
update_material()
return 1
if(!reinforced && material && istype(W, /obj/item/weapon/wrench))
@@ -77,17 +96,34 @@
if(!material)
update_connections(1)
update_icon()
for(var/obj/structure/table/T in oview(src, 1))
T.update_icon()
update_desc()
update_material()
return 1
if(!reinforced && !material && istype(W, /obj/item/weapon/wrench))
dismantle(W, user)
return 1
if(health < maxhealth && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/F = W
if(F.welding)
user << "<span class='notice'>You begin reparing damage to \the [src].</span>"
if(!do_after(user, 20) || !F.remove_fuel(1, user))
return
user.visible_message("<span class='notice'>\The [user] repairs some damage to \the [src].</span>",
"<span class='notice'>You repair some damage to \the [src].</span>")
health = max(health+(maxhealth/5), maxhealth) // 20% repair per application
return 1
if(!material && can_plate && istype(W, /obj/item/stack/sheet))
material = common_material_add(W, user, "plat")
if(material)
update_connections(1)
update_icon()
update_desc()
update_material()
return 1
return ..()
@@ -105,11 +141,17 @@
if(!can_reinforce)
user << "<span class='warning'>\The [src] cannot be reinforced!</span>"
return
if(!material)
user << "<span class='warning'>Plate \the [src] before reinforcing it!</span>"
return
reinforced = common_material_add(S, user, "reinforc")
if(reinforced)
update_desc()
update_icon()
update_material()
/obj/structure/table/proc/update_desc()
if(material)

View File

@@ -0,0 +1,5 @@
author: GinjaNinja32
delete-after: True
changes:
- rscadd: "Rewrote tables. To construct a table, use steel to make a table frame, then plate the frame with a material such as steel, gold, wood, etc. Hold a stack in your hand and drag it to the table to reinforce it. To deconstruct a table, use a screwdriver to remove the reinforcements (if present), then a wrench to remove the plating, and a wrench again to dismantle the frame. Use a welder to repair any damage."

View File

@@ -203,7 +203,7 @@
"dU" = (/obj/structure/sign/atmosplaque{pixel_y = 31},/turf/simulated/floor/airless{icon_state = "damaged2"},/area/awaymission/northblock)
"dV" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = ""},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/awaymission/northblock)
"dW" = (/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"dX" = (/obj/item/weapon/table_parts,/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"dX" = (/obj/structure/table,/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"dY" = (/obj/structure/table/standard,/obj/item/stack/cable_coil{amount = 5},/obj/item/weapon/screwdriver,/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"dZ" = (/obj/structure/computerframe{anchored = 1},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)
"ea" = (/obj/machinery/light,/obj/structure/computerframe{anchored = 1},/turf/simulated/floor{icon_state = "showroomfloor"},/area/awaymission/research)

View File

@@ -63,8 +63,8 @@
"bk" = (/obj/structure/table/standard,/obj/item/stack/cable_coil{pixel_x = -1; pixel_y = 7},/obj/item/weapon/circuitboard/autolathe,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bl" = (/obj/effect/decal/cleanable/blood/tracks,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bm" = (/obj/structure/door_assembly/door_assembly_research,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bn" = (/obj/item/weapon/table_parts,/turf/simulated/floor/plating,/area/awaymission/labs/cave)
"bo" = (/obj/item/weapon/table_parts,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bn" = (/obj/structure/table,/turf/simulated/floor/plating,/area/awaymission/labs/cave)
"bo" = (/obj/structure/table,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bp" = (/obj/structure/girder,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)
"bq" = (/obj/effect/decal/cleanable/blood/tracks,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/awaymission/labs/cave)
"br" = (/obj/effect/decal/cleanable/dirt,/obj/effect/critter/fleshmonster/fleshslime,/turf/simulated/floor{icon_state = "white"},/area/awaymission/labs/cave)

View File

@@ -4252,7 +4252,7 @@
"bDN" = (/obj/item/apc_frame,/obj/effect/decal/cleanable/dirt,/obj/structure/cable/green{d2 = 2; icon_state = "0-2"},/turf/simulated/floor/plating,/area/medical/genetics)
"bDO" = (/obj/structure/disposalpipe/segment,/turf/simulated/floor/plating,/area/medical/genetics)
"bDP" = (/obj/machinery/door/firedoor,/obj/machinery/door/blast/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "acute1"; name = "EMT Storage Privacy Shutters"; opacity = 0},/obj/machinery/light_switch{pixel_x = 22; pixel_y = 0},/turf/simulated/floor{tag = "icon-whitebluefull"; icon_state = "whitebluefull"},/area/medical/sleeper)
"bDQ" = (/obj/item/weapon/table_parts,/turf/simulated/floor/plating,/area/medical/genetics)
"bDQ" = (/obj/structure/table,/turf/simulated/floor/plating,/area/medical/genetics)
"bDR" = (/obj/effect/decal/cleanable/cobweb2,/turf/simulated/floor/plating,/area/medical/genetics)
"bDS" = (/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/obj/machinery/door/blast/shutters{density = 0; dir = 2; icon_state = "shutter0"; id = "cmooffice"; name = "CMO Office Privacy Shutters"; opacity = 0},/turf/simulated/floor/plating,/area/medical/medbay2)
"bDT" = (/obj/structure/extinguisher_cabinet{pixel_x = -25},/turf/simulated/floor{icon_state = "white"},/area/medical/genetics_cloning)
@@ -4490,7 +4490,7 @@
"bIr" = (/obj/structure/closet/wardrobe/black,/obj/machinery/light{dir = 1},/turf/simulated/shuttle/floor,/area/shuttle/arrival/station)
"bIs" = (/obj/effect/decal/cleanable/dirt,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor/plating,/area/medical/genetics)
"bIt" = (/obj/effect/decal/cleanable/dirt,/turf/simulated/floor{icon_state = "floorgrime"},/area/medical/genetics)
"bIu" = (/obj/item/weapon/table_parts,/turf/simulated/floor{icon_state = "floorgrime"},/area/medical/genetics)
"bIu" = (/obj/structure/table,/turf/simulated/floor{icon_state = "floorgrime"},/area/medical/genetics)
"bIv" = (/obj/structure/disposalpipe/segment,/obj/machinery/door/firedoor/border_only{dir = 1; name = "Firelock North"},/obj/machinery/door/airlock/mining{id_tag = "cargodoor"; name = "Mining Dock"; req_access = list(48)},/obj/structure/cable/green{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/hidden/supply,/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,/turf/simulated/floor,/area/quartermaster/miningdock)
"bIw" = (/turf/simulated/wall/r_wall,/area/maintenance/research_port)
"bIx" = (/turf/simulated/wall/r_wall,/area/server)

View File

@@ -71,7 +71,7 @@
"bs" = (/turf/simulated/shuttle/wall{icon_state = "swall_s9"; dir = 2},/area/derelict/ship)
"bt" = (/turf/simulated/shuttle/wall{icon_state = "swall_s5"; dir = 2},/area/derelict/ship)
"bu" = (/turf/simulated/shuttle/floor{icon_state = "floor3"},/turf/simulated/shuttle/wall{icon_state = "swall_f10"; dir = 2},/area/space)
"bv" = (/obj/item/weapon/table_parts,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bv" = (/obj/structure/table,/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/space)
"bw" = (/turf/simulated/shuttle/floor{icon_state = "floor3"},/turf/simulated/shuttle/wall{icon_state = "swall_f6"; dir = 2},/area/space)
"bx" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/shuttle/plating,/area/derelict/ship)
"by" = (/obj/machinery/light_switch{pixel_x = 27},/obj/machinery/light{dir = 4},/turf/simulated/shuttle/floor{icon_state = "floor3"},/area/derelict/ship)
@@ -387,7 +387,7 @@
"hw" = (/obj/item/weapon/cell,/turf/simulated/floor/plating/airless,/area/AIsattele)
"hx" = (/obj/structure/sign/electricshock,/turf/simulated/wall/r_wall,/area/tcommsat/entrance)
"hy" = (/turf/space,/area/AIsattele)
"hz" = (/obj/item/weapon/table_parts,/turf/simulated/floor/plating/airless,/area/AIsattele)
"hz" = (/obj/structure/table,/turf/simulated/floor/plating/airless,/area/AIsattele)
"hA" = (/obj/structure/lattice,/turf/space,/area/AIsattele)
"hB" = (/obj/structure/closet,/turf/simulated/floor/plating/airless,/area/AIsattele)
"hC" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/turf/simulated/floor/plating/airless,/area/AIsattele)

View File

@@ -494,7 +494,7 @@
"jz" = (/obj/machinery/mineral/unloading_machine{icon_state = "unloader-corner"},/turf/simulated/floor{icon_state = "floorgrime"},/area/outpost/mining_north)
"jA" = (/obj/effect/decal/cleanable/dirt,/obj/item/device/radio/intercom{name = "Station Intercom (General)"; pixel_y = -29},/obj/machinery/atmospherics/unary/vent_scrubber/on{dir = 1},/turf/simulated/floor{icon_state = "floorgrime"},/area/outpost/mining_north)
"jB" = (/obj/machinery/light{dir = 1},/obj/machinery/atmospherics/pipe/simple/hidden/supply{dir = 4},/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{dir = 4},/obj/item/device/radio/intercom{broadcasting = 0; listening = 1; name = "Station Intercom (General)"; pixel_y = 20},/obj/machinery/camera/network/research_outpost{c_tag = "Research Outpost Lobby Port"},/turf/simulated/floor{dir = 4; icon_state = "whitegreencorner"},/area/outpost/research/hallway)
"jC" = (/obj/item/weapon/table_parts,/obj/structure/table/rack,/obj/item/stack/sheet/glass/reinforced{amount = 8},/obj/item/stack/rods{amount = 6},/turf/simulated/floor{icon_state = "floorgrime"},/area/outpost/mining_north)
"jC" = (/obj/structure/table,/obj/structure/table/rack,/obj/item/stack/sheet/glass/reinforced{amount = 8},/obj/item/stack/rods{amount = 6},/turf/simulated/floor{icon_state = "floorgrime"},/area/outpost/mining_north)
"jD" = (/obj/machinery/portable_atmospherics/canister/oxygen,/obj/effect/decal/cleanable/dirt,/turf/simulated/floor/plating,/area/outpost/mining_north)
"jE" = (/obj/structure/girder,/turf/simulated/floor/plating,/area/outpost/mining_north)
"jF" = (/turf/simulated/wall,/area/outpost/mining_north)
@@ -555,7 +555,7 @@
"kI" = (/obj/machinery/disposal/deliveryChute{dir = 1},/obj/structure/disposalpipe/trunk,/turf/simulated/floor{icon_state = "floorgrime"},/area/outpost/research/eva)
"kJ" = (/turf/simulated/floor/airless{dir = 5; icon_state = "asteroidfloor"},/area/outpost/abandoned)
"kK" = (/obj/structure/table/rack,/turf/simulated/floor/airless{dir = 5; icon_state = "asteroidfloor"},/area/outpost/abandoned)
"kL" = (/obj/item/weapon/table_parts,/turf/simulated/floor/airless,/area/outpost/abandoned)
"kL" = (/obj/structure/table,/turf/simulated/floor/airless,/area/outpost/abandoned)
"kM" = (/obj/effect/alien/weeds{icon_state = "weeds2"},/turf/simulated/floor/airless{icon_state = "damaged4"},/area/outpost/abandoned)
"kN" = (/obj/effect/alien/weeds{icon_state = "weeds"},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/outpost/abandoned)
"kO" = (/obj/effect/decal/remains/human,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_dead"; stat = 2},/turf/simulated/floor/airless{icon_state = "floorscorched1"},/area/outpost/abandoned)

View File

@@ -119,7 +119,7 @@
"co" = (/obj/machinery/door/airlock/glass{name = "Glass Airlock"; req_access_txt = "0"},/turf/simulated/floor/airless{dir = 5; icon_state = "asteroidfloor"},/area/mine/abandoned)
"cp" = (/obj/structure/grille,/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/mine/abandoned)
"cq" = (/obj/effect/decal/remains/human,/obj/item/clothing/mask/facehugger{icon_state = "facehugger_dead"; stat = 2},/turf/simulated/floor,/area/mine/abandoned)
"cr" = (/obj/item/weapon/table_parts,/turf/simulated/floor,/area/mine/abandoned)
"cr" = (/obj/structure/table,/turf/simulated/floor,/area/mine/abandoned)
"cs" = (/turf/simulated/floor/airless{dir = 5; icon_state = "asteroidfloor"},/area/mine/abandoned)
"ct" = (/obj/structure/rack,/turf/simulated/floor/airless{dir = 5; icon_state = "asteroidfloor"},/area/mine/abandoned)
"cu" = (/turf/simulated/floor/plating/airless/asteroid,/area/mine/unexplored)