mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* Ports catwalks on plates Looks cool I guess * Ports a fix too This may be helpful * damn yarn reverts the dependency changes
94 lines
2.9 KiB
Plaintext
94 lines
2.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 = FALSE
|
|
anchored = TRUE
|
|
armor = list("melee" = 50, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 50)
|
|
max_integrity = 50
|
|
layer = LATTICE_LAYER //under pipes
|
|
plane = FLOOR_PLANE
|
|
var/number_of_rods = 1
|
|
canSmoothWith = list(/obj/structure/lattice,
|
|
/turf/open/floor,
|
|
/turf/closed/wall,
|
|
/obj/structure/falsewall)
|
|
smooth = SMOOTH_MORE
|
|
// flags = CONDUCT_1
|
|
|
|
/obj/structure/lattice/examine(mob/user)
|
|
. = ..()
|
|
. += deconstruction_hints(user)
|
|
|
|
/obj/structure/lattice/proc/deconstruction_hints(mob/user)
|
|
return span_notice("The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.")
|
|
|
|
/obj/structure/lattice/Initialize(mapload)
|
|
. = ..()
|
|
for(var/obj/structure/lattice/LAT in loc)
|
|
if(LAT != src)
|
|
QDEL_IN(LAT, 0)
|
|
|
|
/obj/structure/lattice/blob_act(obj/structure/blob/B)
|
|
return
|
|
|
|
/obj/structure/lattice/ratvar_act()
|
|
new /obj/structure/lattice/clockwork(loc)
|
|
|
|
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
|
if(resistance_flags & INDESTRUCTIBLE)
|
|
return
|
|
if(C.tool_behaviour == TOOL_WIRECUTTER)
|
|
to_chat(user, span_notice("Slicing [name] joints ..."))
|
|
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(disassembled = TRUE)
|
|
if(!(flags_1 & NODECONSTRUCT_1))
|
|
new /obj/item/stack/rods(get_turf(src), number_of_rods)
|
|
qdel(src)
|
|
|
|
/obj/structure/lattice/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
|
if(the_rcd.mode == RCD_FLOORWALL)
|
|
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 2)
|
|
|
|
/obj/structure/lattice/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
|
if(passed_mode == RCD_FLOORWALL)
|
|
to_chat(user, span_notice("You build a floor."))
|
|
var/turf/T = src.loc
|
|
if(isspaceturf(T))
|
|
T.PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
|
qdel(src)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/obj/structure/lattice/singularity_pull(S, current_size)
|
|
if(current_size >= STAGE_FOUR)
|
|
deconstruct()
|
|
|
|
/obj/structure/lattice/clockwork
|
|
name = "cog lattice"
|
|
desc = "A lightweight support lattice. These hold the Justicar's station together."
|
|
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
|
|
|
/obj/structure/lattice/clockwork/Initialize(mapload)
|
|
canSmoothWith += /turf/open/indestructible/clock_spawn_room //list overrides are a terrible thing
|
|
. = ..()
|
|
ratvar_act()
|
|
if(is_reebe(z))
|
|
resistance_flags |= INDESTRUCTIBLE
|
|
|
|
/obj/structure/lattice/clockwork/ratvar_act()
|
|
if(ISODD(x+y))
|
|
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
|
|
pixel_x = -9
|
|
pixel_y = -9
|
|
else
|
|
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
|
pixel_x = 0
|
|
pixel_y = 0
|
|
return TRUE
|