mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Adds a large ash and large molten item decal (for future use) simplifies decal/cleanable/replace_decal() code a bit. Changes construction() proc to on_construction() for consistency, same for deconstruction(). Made a deconstruct() proc for machinery and computer (also for future use).
84 lines
1.9 KiB
Plaintext
84 lines
1.9 KiB
Plaintext
/obj/structure/lattice
|
|
name = "lattice"
|
|
desc = "A lightweight support lattice. These hold our station together."
|
|
icon = 'icons/obj/smooth_structures/lattice.dmi'
|
|
icon_state = "lattice"
|
|
density = 0
|
|
anchored = 1
|
|
layer = LATTICE_LAYER //under pipes
|
|
var/obj/item/stack/rods/stored
|
|
canSmoothWith = list(/obj/structure/lattice,
|
|
/turf/open/floor,
|
|
/turf/closed/wall,
|
|
/obj/structure/falsewall)
|
|
smooth = SMOOTH_MORE
|
|
// flags = CONDUCT
|
|
|
|
/obj/structure/lattice/New()
|
|
..()
|
|
for(var/obj/structure/lattice/LAT in src.loc)
|
|
if(LAT != src)
|
|
qdel(LAT)
|
|
stored = new/obj/item/stack/rods(src)
|
|
|
|
/obj/structure/lattice/Destroy()
|
|
qdel(stored)
|
|
stored = null
|
|
return ..()
|
|
|
|
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
|
return
|
|
|
|
/obj/structure/lattice/ex_act(severity, target)
|
|
switch(severity)
|
|
if(1)
|
|
qdel(src)
|
|
return
|
|
if(2)
|
|
qdel(src)
|
|
return
|
|
if(3)
|
|
return
|
|
else
|
|
return
|
|
|
|
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
|
if(istype(C, /obj/item/weapon/weldingtool))
|
|
var/obj/item/weapon/weldingtool/WT = C
|
|
if(WT.remove_fuel(0, user))
|
|
user << "<span class='notice'>Slicing [name] joints ...</span>"
|
|
Deconstruct()
|
|
else
|
|
var/turf/T = get_turf(src)
|
|
return T.attackby(C, user) //hand this off to the turf instead (for building plating, catwalks, etc)
|
|
|
|
/obj/structure/lattice/Deconstruct()
|
|
stored.loc = get_turf(src)
|
|
stored = null
|
|
..()
|
|
|
|
/obj/structure/lattice/singularity_pull(S, current_size)
|
|
if(current_size >= STAGE_FOUR)
|
|
Deconstruct()
|
|
|
|
/obj/structure/lattice/catwalk
|
|
name = "catwalk"
|
|
desc = "A catwalk for easier EVA maneuvering and cable placement."
|
|
icon = 'icons/obj/smooth_structures/catwalk.dmi'
|
|
icon_state = "catwalk"
|
|
smooth = SMOOTH_TRUE
|
|
canSmoothWith = null
|
|
|
|
/obj/structure/lattice/catwalk/Move()
|
|
var/turf/T = loc
|
|
for(var/obj/structure/cable/C in T)
|
|
C.Deconstruct()
|
|
..()
|
|
|
|
/obj/structure/lattice/catwalk/Deconstruct()
|
|
var/turf/T = loc
|
|
for(var/obj/structure/cable/C in T)
|
|
C.Deconstruct()
|
|
..()
|
|
|