ok this is going to be a pain in the ass ain't it (#2458)
lets hope nothing blows up this time (Flags PR but it works!)
This commit is contained in:
@@ -17,15 +17,15 @@
|
||||
desc = "A square piece of metal standing on four metal legs. It can not move."
|
||||
icon = 'icons/obj/smooth_structures/table.dmi'
|
||||
icon_state = "table"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
layer = TABLE_LAYER
|
||||
climbable = TRUE
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.")
|
||||
var/frame = /obj/structure/table_frame
|
||||
var/framestack = /obj/item/stack/rods
|
||||
var/buildstack = /obj/item/stack/sheet/metal
|
||||
var/busy = FALSE
|
||||
var/busy = FALSE
|
||||
var/buildstackamount = 1
|
||||
var/framestackamount = 2
|
||||
var/deconstruction_ready = 1
|
||||
@@ -69,7 +69,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
/obj/structure/table/CanPass(atom/movable/mover, turf/target)
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return 1
|
||||
if(mover.throwing)
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
/obj/structure/table/attackby(obj/item/I, mob/user, params)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(istype(I, /obj/item/weapon/screwdriver) && deconstruction_ready)
|
||||
to_chat(user, "<span class='notice'>You start disassembling [src]...</span>")
|
||||
playsound(src.loc, I.usesound, 50, 1)
|
||||
@@ -123,7 +123,7 @@
|
||||
return
|
||||
// If the tray IS empty, continue on (tray will be placed on the table like other items)
|
||||
|
||||
if(user.a_intent != INTENT_HARM && !(I.flags & ABSTRACT))
|
||||
if(user.a_intent != INTENT_HARM && !(I.flags_1 & ABSTRACT_1))
|
||||
if(user.drop_item())
|
||||
I.Move(loc)
|
||||
var/list/click_params = params2list(params)
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
|
||||
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
var/turf/T = get_turf(src)
|
||||
new buildstack(T, buildstackamount)
|
||||
if(!wrench_disassembly)
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
/obj/structure/table/glass/Crossed(atom/movable/AM)
|
||||
. = ..()
|
||||
if(flags & NODECONSTRUCT)
|
||||
if(flags_1 & NODECONSTRUCT_1)
|
||||
return
|
||||
if(!isliving(AM))
|
||||
return
|
||||
@@ -209,7 +209,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/table/glass/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
if(!(flags_1 & NODECONSTRUCT_1))
|
||||
if(disassembled)
|
||||
..()
|
||||
return
|
||||
@@ -266,7 +266,7 @@
|
||||
frame = /obj/structure/table_frame
|
||||
framestack = /obj/item/stack/rods
|
||||
buildstack = /obj/item/stack/tile/carpet
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black)
|
||||
canSmoothWith = list(/obj/structure/table/wood/fancy, /obj/structure/table/wood/fancy/black)
|
||||
|
||||
/obj/structure/table/wood/fancy/New()
|
||||
icon = 'icons/obj/smooth_structures/fancy_table.dmi' //so that the tables place correctly in the map editor
|
||||
@@ -367,7 +367,7 @@
|
||||
|
||||
/obj/structure/table/optable/New()
|
||||
..()
|
||||
for(var/dir in GLOB.cardinals)
|
||||
for(var/dir in GLOB.cardinals)
|
||||
computer = locate(/obj/machinery/computer/operating, get_step(src, dir))
|
||||
if(computer)
|
||||
computer.table = src
|
||||
@@ -400,12 +400,12 @@
|
||||
desc = "Different from the Middle Ages version."
|
||||
icon = 'icons/obj/objects.dmi'
|
||||
icon_state = "rack"
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
anchored = TRUE
|
||||
pass_flags = LETPASSTHROW //You can throw objects over this, despite it's density.
|
||||
max_integrity = 20
|
||||
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
|
||||
/obj/structure/rack/CanPass(atom/movable/mover, turf/target)
|
||||
if(src.density == 0) //Because broken racks -Agouri |TODO: SPRITE!|
|
||||
return 1
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
@@ -429,7 +429,7 @@
|
||||
|
||||
|
||||
/obj/structure/rack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
if (istype(W, /obj/item/weapon/wrench) && !(flags&NODECONSTRUCT))
|
||||
if (istype(W, /obj/item/weapon/wrench) && !(flags_1&NODECONSTRUCT_1))
|
||||
playsound(src.loc, W.usesound, 50, 1)
|
||||
deconstruct(TRUE)
|
||||
return
|
||||
@@ -466,8 +466,8 @@
|
||||
*/
|
||||
|
||||
/obj/structure/rack/deconstruct(disassembled = TRUE)
|
||||
if(!(flags&NODECONSTRUCT))
|
||||
density = FALSE
|
||||
if(!(flags_1&NODECONSTRUCT_1))
|
||||
density = FALSE
|
||||
var/obj/item/weapon/rack_parts/newparts = new(loc)
|
||||
transfer_fingerprints_to(newparts)
|
||||
qdel(src)
|
||||
@@ -482,7 +482,7 @@
|
||||
desc = "Parts of a rack."
|
||||
icon = 'icons/obj/items.dmi'
|
||||
icon_state = "rack_parts"
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
materials = list(MAT_METAL=2000)
|
||||
var/building = FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user