Files
Aurora.3/code/game/objects/structures/lattice.dm
T
KanoandGitHub 22e1d93b39 Adds a new Odyssey map: Decrepit Shipyard (#21500)
## About PR

Adds an industrial themed away site for Odyssey scenarios. The map
starts with a shuttle, broken by a randomized destruction feature.
Actors or the crew may choose to repair it to make it fly once more

### Detailed Changelog
<details><summary>Details</summary>
<p>

- Added a new map_effect, randomized destruction. It comes with two
varieties and different impact ranges. The way it work is the effect
chooses a random amount of turfs in the area it's placed on, and calls
`ex_act` on applicable contents in the turf.
- Added unused sprites for low railing and documented relevant functions
in the existing code.
- Made it so when a railing has an open end that doesn't connect to
anywhere, it'll apply an end cap, making it look more smooth.
- Added ceiling lattices.
- Adjusted unit tests to avoid conflicts that may occur with ceiling
lattices.
- Fixed a bug where the Odyssey subsystem repeatedly added lastly loaded
z-level to the scenario z-levels, instead of all relevant levels to the
site. This was causing issues in Odyssey maps with shuttles.
- Fixed hydrogen tank not using its sprite. Also recoloured the tank to
match modern hydrogen canister colour.
- Fixed `/obj/machinery/door/airlock/maintenance` not using its intended
appearance.

</p>
</details> 

## Images

<img width="4128" height="2528" alt="StrongDMM-2025-11-10 21 33 47"
src="https://github.com/user-attachments/assets/09d8b671-457c-4ec5-88ac-e503641a0531"
/>
<img width="3424" height="2016" alt="StrongDMM-2025-11-10 21 34 27"
src="https://github.com/user-attachments/assets/943b8529-7f2a-41db-a7be-e57d5d30ead7"
/>
<img width="1312" height="800" alt="StrongDMM-2025-11-10 21 34 52"
src="https://github.com/user-attachments/assets/f665800a-367b-466e-a16e-a6f0b122e3bd"
/>
<img width="997" height="999" alt="Screenshot_54"
src="https://github.com/user-attachments/assets/c06667c6-0dfc-4dc4-af67-821f36ad2933"
/>
<img width="997" height="1001" alt="Screenshot_55"
src="https://github.com/user-attachments/assets/848a2847-9eb0-450a-87e9-08c371aaf78a"
/>
<img width="998" height="992" alt="Screenshot_61"
src="https://github.com/user-attachments/assets/e6174cb5-d4d6-4afc-82ab-bbf412eda607"
/>
<img width="998" height="990" alt="Screenshot_63"
src="https://github.com/user-attachments/assets/cc838bdc-9e22-4aed-ad16-0f8722442b8a"
/>
2025-12-24 13:17:24 +00:00

272 lines
7.8 KiB
Plaintext

/obj/structure/lattice
name = "lattice"
desc = "A lightweight support lattice."
icon = 'icons/obj/smooth/lattice.dmi'
icon_state = "lattice"
density = FALSE
anchored = TRUE
opacity = FALSE
w_class = WEIGHT_CLASS_NORMAL
layer = ABOVE_TILE_LAYER
obj_flags = OBJ_FLAG_MOVES_UNSUPPORTED
smoothing_flags = SMOOTH_MORE
canSmoothWith = list(
/obj/structure/lattice,
/turf/simulated/wall,
/turf/simulated/floor,
/turf/simulated/mineral,
/turf/unsimulated/wall,
/turf/unsimulated/floor,
/obj/structure/grille,
/turf/unsimulated/mineral/asteroid
)
footstep_sound = /singleton/sound_category/catwalk_footstep
/obj/structure/lattice/assembly_hints(mob/user, distance, is_adjacent)
. += ..()
if(name == "lattice")
. += "Add a <b>metal floor tile</b> to build a floor on top of the lattice."
. += "Lattices can be made by applying <b>metal rods</b> to a space tile."
/obj/structure/lattice/disassembly_hints(mob/user, distance, is_adjacent)
. += ..()
if(name == "lattice")
. += "Lattices can be broken back down into metal rods with a <b>welder</b>."
/obj/structure/lattice/Initialize()
. = ..()
if(check_for_duplicates())
stack_trace("multiple lattices found in ([loc.x], [loc.y], [loc.z])")
return INITIALIZE_HINT_QDEL
if(isturf(loc))
var/turf/turf = loc
turf.is_hole = FALSE
/obj/structure/lattice/Destroy()
if(isturf(loc))
var/turf/turf = loc
turf.is_hole = initial(turf.is_hole)
return ..()
/obj/structure/lattice/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
if(2.0)
qdel(src)
return
/obj/structure/lattice/proc/check_for_duplicates()
for(var/obj/structure/lattice/found_lattice in get_turf(src))
if(found_lattice == src || istype(found_lattice, /obj/structure/lattice/ceiling))
continue
return TRUE
return FALSE
/obj/structure/lattice/attackby(obj/item/attacking_item, mob/user)
if (istype(attacking_item, /obj/item/stack/tile/floor))
var/turf/T = get_turf(src)
T.attackby(attacking_item, user) //BubbleWrap - hand this off to the underlying turf instead
return
if (attacking_item.iswelder())
var/obj/item/weldingtool/WT = attacking_item
if(WT.use(1, user))
to_chat(user, SPAN_NOTICE("Slicing lattice joints ..."))
new /obj/item/stack/rods(src.loc)
qdel(src)
if (istype(attacking_item, /obj/item/stack/rods))
var/obj/item/stack/rods/R = attacking_item
if (R.use(2))
to_chat(user, SPAN_NOTICE("Constructing catwalk ..."))
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
new /obj/structure/lattice/catwalk(src.loc)
qdel(src)
return
/obj/structure/lattice/ceiling
layer = ABOVE_ABOVE_HUMAN_LAYER
canSmoothWith = list(
/obj/structure/lattice/ceiling,
/turf/simulated/wall,
/turf/simulated/mineral,
/turf/unsimulated/wall,
/obj/structure/grille,
/turf/unsimulated/mineral/asteroid
)
/obj/structure/lattice/ceiling/Initialize()
. = ..()
AddComponent(/datum/component/large_transparency, 0, 0, 0, 0)
/obj/structure/lattice/ceiling/check_for_duplicates()
for(var/obj/structure/lattice/ceiling/found_lattice in get_turf(src))
if(found_lattice == src)
continue
return TRUE
return FALSE
/obj/structure/lattice/catwalk
name = "catwalk"
desc = "A catwalk for easier EVA maneuvering."
icon = 'icons/obj/smooth/catwalk.dmi'
icon_state = "catwalk"
smoothing_flags = SMOOTH_TRUE
canSmoothWith = list(
/obj/structure/lattice/catwalk,
/obj/structure/lattice/catwalk/indoor
)
var/return_amount = 3
// Special catwalk that can be placed on regular flooring.
/obj/structure/lattice/catwalk/indoor
desc = "A floor-mounted catwalk designed to protect pipes & station wiring from passing feet."
can_be_unanchored = TRUE
layer = CATWALK_LAYER
/obj/structure/lattice/catwalk/attackby(obj/item/attacking_item, mob/user)
if(attacking_item.iswelder())
var/obj/item/weldingtool/WT = attacking_item
if(!WT.use(1, user))
to_chat(user, SPAN_WARNING("You need more welding fuel to complete this task."))
return
if(attacking_item.use_tool(src, user, 5, volume = 50))
to_chat(user, SPAN_NOTICE("You slice apart [src]."))
var/obj/item/stack/rods/R = new /obj/item/stack/rods(get_turf(src))
R.amount = return_amount
R.update_icon()
qdel(src)
/obj/structure/lattice/catwalk/indoor/attackby(obj/item/attacking_item, mob/user)
if(attacking_item.isscrewdriver())
if(attacking_item.use_tool(src, user, 5, volume = 50))
anchored = !anchored
to_chat(user, SPAN_NOTICE("You [anchored ? "" : "un"]anchor [src]."))
QUEUE_SMOOTH(src)
QUEUE_SMOOTH_NEIGHBORS(src)
else
..()
/obj/structure/lattice/catwalk/hoist_act(turf/dest)
for (var/A in loc)
var/atom/movable/AM = A
AM.forceMove(dest)
..()
/obj/structure/lattice/catwalk/indoor/grate
name = "grate"
desc = "A metal grate."
icon = 'icons/obj/grate.dmi'
icon_state = "grate"
return_amount = 1
smoothing_flags = null
color = COLOR_TILED
var/base_icon_state = "grate"
var/damaged = FALSE
/obj/structure/lattice/catwalk/indoor/grate/attackby(obj/item/attacking_item, mob/user)
if(attacking_item.iswelder() && damaged)
var/obj/item/weldingtool/WT = attacking_item
if(attacking_item.use_tool(src, user, 5, volume = 50) && WT.use(1, user))
user.visible_message(
SPAN_NOTICE("\The [user] slices apart \the [src], leaving nothing useful behind."),
SPAN_NOTICE("You slice apart \the [src], leaving nothing useful behind."),
SPAN_NOTICE("You hear the sound of a welder, slicing apart metal.")
)
playsound(src, 'sound/items/welder.ogg', 50, 1)
qdel(src)
else
..()
/obj/structure/lattice/catwalk/indoor/grate/ex_act(severity)
switch(severity)
if(1.0)
qdel(src)
if(2.0)
if(!damaged)
icon_state = "[base_icon_state]_dam[rand(0,3)]"
damaged = TRUE
else
qdel(src)
return
/obj/structure/lattice/catwalk/indoor/grate/old/Initialize()
. = ..()
AddOverlays("rust")
/obj/structure/lattice/catwalk/indoor/grate/damaged
icon_state = "grate_dark_dam0"
damaged = TRUE
/obj/structure/lattice/catwalk/indoor/grate/damaged/Initialize()
. = ..()
icon_state = "[base_icon_state]_dam[rand(0,3)]"
/obj/structure/lattice/catwalk/indoor/grate/light
icon_state = "grate_light"
base_icon_state = "grate_light"
return_amount = 1
color = COLOR_GRAY50
/obj/structure/lattice/catwalk/indoor/grate/light/old/Initialize()
. = ..()
AddOverlays("rust")
/obj/structure/lattice/catwalk/indoor/grate/light/damaged
icon_state = "grate_light_dam0"
damaged = TRUE
/obj/structure/lattice/catwalk/indoor/grate/light/damaged/Initialize()
. = ..()
icon_state = "[base_icon_state]_dam[rand(0,3)]"
/obj/structure/lattice/catwalk/indoor/grate/dark
color = COLOR_DARK_GUNMETAL
/obj/structure/lattice/catwalk/indoor/grate/gridded
color = COLOR_GRAY40
/obj/structure/lattice/catwalk/indoor/grate/gunmetal
color = COLOR_DARK_GUNMETAL
/obj/structure/lattice/catwalk/indoor/grate/slate
color = COLOR_SLATE
/obj/structure/lattice/catwalk/indoor/grate/white
color = COLOR_WHITE
/obj/structure/lattice/catwalk/indoor/urban
name = "grate"
desc = "A metal grate."
icon = 'icons/obj/structure/over_turf.dmi'
icon_state = "city_grate"
return_amount = 1
smoothing_flags = null
/obj/structure/lattice/catwalk/indoor/tatami
name = "tatami spread"
desc = "A straw mat rug of some sort, frequently referred to as a tatami."
icon = 'icons/obj/structure/over_turf.dmi'
icon_state = "tatami"
return_amount = null
smoothing_flags = null
footstep_sound = /singleton/sound_category/carpet_footstep
/obj/structure/lattice/catwalk/indoor/planks
name = "flooring plank"
desc = "A ricket assortment of planks meant to be stood upon."
icon = 'icons/obj/structure/urban/wood.dmi'
icon_state = "plank"
return_amount = null
smoothing_flags = null
footstep_sound = /singleton/sound_category/wood_footstep
/obj/structure/lattice/catwalk/indoor/planks/opaque
icon_state = "plank_dark"
/obj/structure/lattice/catwalk/indoor/planks/stairs
icon_state = "plank_stairs"
/obj/structure/lattice/catwalk/indoor/planks/deep
icon_state = "plank_deep"