Files
Bubberstation/code/game/objects/structures/lattice.dm
deathride58 cdf36c2c6f adds ambient occlusion as a client preference (#37406)
ambient occlusion is a shading technique that simulates how light behaves in the real world, where areas that aren't directly exposed to light tend to receive less lighting. In 3d rendered scenes with ambient occlusion present, this can easily be seen in corners and other crevices in geometry, and can also be visible when two objects are close to one another.

cl deathride58
add: Added ambient occlusion. You can toggle this on or off in the game preferences menu.
/cl
2018-05-08 10:06:44 +12:00

137 lines
4.0 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)
to_chat(user, "<span class='notice'>The rods look like they could be <b>cut</b>. There's space for more <i>rods</i> or a <i>tile</i>.</span>")
/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(istype(C, /obj/item/wirecutters))
to_chat(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(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
new /obj/item/stack/rods(get_turf(src), number_of_rods)
qdel(src)
/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
/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"
number_of_rods = 2
smooth = SMOOTH_TRUE
canSmoothWith = null
/obj/structure/lattice/catwalk/deconstruction_hints(mob/user)
to_chat(user, "<span class='notice'>The supporting rods look like they could be <b>cut</b>.</span>")
/obj/structure/lattice/catwalk/ratvar_act()
new /obj/structure/lattice/catwalk/clockwork(loc)
/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()
..()
/obj/structure/lattice/catwalk/clockwork
name = "clockwork catwalk"
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
canSmoothWith = list(/obj/structure/lattice,
/turf/open/floor,
/turf/open/indestructible/clock_spawn_room,
/turf/closed/wall,
/obj/structure/falsewall)
smooth = SMOOTH_MORE
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
. = ..()
ratvar_act()
if(!mapload)
new /obj/effect/temp_visual/ratvar/floor/catwalk(loc)
new /obj/effect/temp_visual/ratvar/beam/catwalk(loc)
if(is_reebe(z))
resistance_flags |= INDESTRUCTIBLE
/obj/structure/lattice/catwalk/clockwork/ratvar_act()
if(ISODD(x+y))
icon = 'icons/obj/smooth_structures/catwalk_clockwork_large.dmi'
pixel_x = -9
pixel_y = -9
else
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
pixel_x = 0
pixel_y = 0
return TRUE