mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Major code improvement that has been long overdue. The changes have been thoroughly tested and everything appears to be working fine - Move catwalks from turf/[retarded path]/catwalk to obj/structure/catwalk. A dm file has been added to that effect - Remove iscatwalk() helper check (not needed for an obj/) - Lattice code has been used -to great effect- to recode catwalks. No more hardcored nonsense to "make it like there's a space tile underneath", now there IS space underneath. This should also fix trace gas problems often witnessed during Derelict plasma floods - Use relativewall method. There should have been no functional changes. Catwalks update when new catwalks are added (not when surrounding catwalks are destroyed, but it still seems logical) - Add a in-house ex_act system to boot (to compensate for the fact catwalks no longer use floor's ex_act). The catwalk is either destroyed, replaced with lattice (add lattice at location, delete catwalk) or unscathed - Remove a lot of spaghetti code that has creeped up into ZAS/Atmos systems and even into tile painter code since catwalks no longer run ZAS loops and aren't considered turfs anymore - All maps have been updated to the new catwalk system (otherwise the map doesn't load, duh) - Bit of spaghetti code in cable.dm (both item and structure) since until then cable was NEVER laid on "objects". Works as intended - Space has been changed to intact = 0. There's no reason for space to be "intact" because there is only one version of space tiles, and it fucks with wire placement Confirmed working : - Space automatically appears under the tile, catwalks tiles thus act 100 % like space tiles without hardcoding - Construction and deconstruction works flawlessly. You do need to precisely click the catwalk grating to deconstruct since the obj/ catwalk uses transparency correctly, but lo and behold, it's a feature - Explosions function as intended when targetting catwalks (lots of hole at the center, pepperoni at a distance) - Cable-related stuff working (laying cable on catwalk, having cable on catwalks in general) - Boxstation, Defficiency and Metaclub updated - Include list updated Everything should be functional and was tested, but please outline anything that looks like it'd work badly
52 lines
1.2 KiB
Plaintext
52 lines
1.2 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
|
|
|
|
canSmoothWith = "/obj/structure/lattice=0&/obj/structure/catwalk=0&/turf=0"
|
|
|
|
/obj/structure/lattice/New(loc)
|
|
..(loc)
|
|
|
|
icon = 'icons/obj/smoothlattice.dmi'
|
|
|
|
relativewall()
|
|
|
|
relativewall_neighbours()
|
|
|
|
/obj/structure/lattice/relativewall()
|
|
var/junction = findSmoothingNeighbors()
|
|
icon_state = "lattice[junction]"
|
|
|
|
/obj/structure/lattice/isSmoothableNeighbor(atom/A)
|
|
if (istype(A, /turf/space))
|
|
return 0
|
|
|
|
return ..()
|
|
|
|
/obj/structure/lattice/blob_act()
|
|
qdel(src)
|
|
|
|
/obj/structure/lattice/ex_act(severity)
|
|
switch(severity)
|
|
if(1.0)
|
|
qdel(src)
|
|
if(2.0)
|
|
qdel(src)
|
|
|
|
/obj/structure/lattice/attackby(obj/item/C as obj, mob/user as mob)
|
|
if(iswelder(C))
|
|
var/obj/item/weapon/weldingtool/WeldingTool = C
|
|
if(WeldingTool.remove_fuel(0, user))
|
|
user << "<span class='notice'>Slicing lattice joints...</span>"
|
|
new/obj/item/stack/rods(loc)
|
|
qdel(src)
|
|
else
|
|
var/turf/T = get_turf(src)
|
|
T.attackby(C, user) //Attacking to the lattice will attack to the space turf
|