Files
CHOMPStation2/code/game/objects/structures/lattice.dm
johnsonmt88@gmail.com 867b21c7ce File restructuring!
This brings down a bunch of defines from /code/defines/obj.dm unto their appropriate files.

I've moved morgue.dm from game/machinery into game/objects/structures since that file contains no machines.

I've reorganized the objects/items/stacks folder and made a 'sheets' and 'tiles' folder to keep things separate

I've separated stool_chair_bed.dm into its own folder which now contains the files: stools.dm, chairs.dm, bed.dm and alien_nests.dm to make it a little easier to go through.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4582 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-29 18:00:30 +00:00

83 lines
2.0 KiB
Plaintext

/obj/structure/lattice
desc = "A lightweight support lattice."
name = "lattice"
icon = 'icons/obj/structures.dmi'
icon_state = "latticefull"
density = 0
anchored = 1.0
layer = 2.3 //under pipes
// flags = CONDUCT
/obj/structure/lattice/New()
..()
if(!(istype(src.loc, /turf/space)))
del(src)
for(var/obj/structure/lattice/LAT in src.loc)
if(LAT != src)
del(LAT)
icon = 'icons/obj/smoothlattice.dmi'
icon_state = "latticeblank"
updateOverlays()
for (var/dir in cardinal)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
L.updateOverlays()
/obj/structure/lattice/Del()
for (var/dir in cardinal)
var/obj/structure/lattice/L
if(locate(/obj/structure/lattice, get_step(src, dir)))
L = locate(/obj/structure/lattice, get_step(src, dir))
L.updateOverlays(src.loc)
..()
/obj/structure/lattice/blob_act()
del(src)
return
/obj/structure/lattice/ex_act(severity)
switch(severity)
if(1.0)
del(src)
return
if(2.0)
del(src)
return
if(3.0)
return
else
return
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
if (istype(C, /obj/item/stack/tile/plasteel))
var/turf/T = get_turf(src)
T.attackby(C, user) //BubbleWrap - hand this off to the underlying turf instead
return
if (istype(C, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = C
if(WT.remove_fuel(0, user))
user << "\blue Slicing lattice joints ..."
new /obj/item/stack/rods(src.loc)
del(src)
return
/obj/structure/lattice/proc/updateOverlays()
//if(!(istype(src.loc, /turf/space)))
// del(src)
spawn(1)
overlays = list()
var/dir_sum = 0
for (var/direction in cardinal)
if(locate(/obj/structure/lattice, get_step(src, direction)))
dir_sum += direction
else
if(!(istype(get_step(src, direction), /turf/space)))
dir_sum += direction
icon_state = "lattice[dir_sum]"
return