mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Switches lattices to Initialize (#25396)
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
obj_integrity = 50
|
||||
max_integrity = 50
|
||||
layer = LATTICE_LAYER //under pipes
|
||||
var/obj/item/stack/rods/stored
|
||||
var/number_of_rods = 1
|
||||
canSmoothWith = list(/obj/structure/lattice,
|
||||
/turf/open/floor,
|
||||
/turf/closed/wall,
|
||||
@@ -17,26 +17,20 @@
|
||||
smooth = SMOOTH_MORE
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/New()
|
||||
/obj/structure/lattice/Initialize(mapload)
|
||||
..()
|
||||
for(var/obj/structure/lattice/LAT in src.loc)
|
||||
for(var/obj/structure/lattice/LAT in 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/ratvar_act()
|
||||
if(IsEven(x + y))
|
||||
new/obj/structure/lattice/clockwork(loc)
|
||||
new /obj/structure/lattice/clockwork(loc)
|
||||
else
|
||||
new/obj/structure/lattice/clockwork/large(loc)
|
||||
new /obj/structure/lattice/clockwork/large(loc)
|
||||
|
||||
/obj/structure/lattice/attackby(obj/item/C, mob/user, params)
|
||||
if(istype(C, /obj/item/weapon/wirecutters))
|
||||
@@ -48,8 +42,7 @@
|
||||
|
||||
/obj/structure/lattice/deconstruct(disassembled = TRUE)
|
||||
if(!(flags & NODECONSTRUCT))
|
||||
stored.forceMove(get_turf(src))
|
||||
stored = null
|
||||
new /obj/item/stack/rods(get_turf(src), amount=number_of_rods)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/lattice/singularity_pull(S, current_size)
|
||||
@@ -61,15 +54,15 @@
|
||||
desc = "A lightweight support lattice. These hold the Justicar's station together."
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork.dmi'
|
||||
|
||||
/obj/structure/lattice/clockwork/New()
|
||||
/obj/structure/lattice/clockwork/Initialize(mapload)
|
||||
..()
|
||||
ratvar_act()
|
||||
|
||||
/obj/structure/lattice/clockwork/ratvar_act()
|
||||
if(IsOdd(x+y))
|
||||
new/obj/structure/lattice/clockwork/large(loc)
|
||||
new /obj/structure/lattice/clockwork/large(loc) // deletes old one
|
||||
|
||||
/obj/structure/lattice/clockwork/large/New()
|
||||
/obj/structure/lattice/clockwork/large/Initialize(mapload)
|
||||
..()
|
||||
icon = 'icons/obj/smooth_structures/lattice_clockwork_large.dmi'
|
||||
pixel_x = -9
|
||||
@@ -77,7 +70,7 @@
|
||||
|
||||
/obj/structure/lattice/clockwork/large/ratvar_act()
|
||||
if(IsEven(x + y))
|
||||
new/obj/structure/lattice/clockwork(loc)
|
||||
new /obj/structure/lattice/clockwork(loc)
|
||||
|
||||
/obj/structure/lattice/catwalk
|
||||
name = "catwalk"
|
||||
@@ -87,13 +80,12 @@
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/obj/structure/lattice/catwalk/New()
|
||||
/obj/structure/lattice/catwalk/Initialize(mapload)
|
||||
..()
|
||||
stored.amount++
|
||||
stored.update_icon()
|
||||
number_of_rods++
|
||||
|
||||
/obj/structure/lattice/catwalk/ratvar_act()
|
||||
new/obj/structure/lattice/catwalk/clockwork(loc)
|
||||
new /obj/structure/lattice/catwalk/clockwork(loc)
|
||||
|
||||
/obj/structure/lattice/catwalk/Move()
|
||||
var/turf/T = loc
|
||||
@@ -111,7 +103,7 @@
|
||||
name = "clockwork catwalk"
|
||||
icon = 'icons/obj/smooth_structures/catwalk_clockwork.dmi'
|
||||
|
||||
/obj/structure/lattice/catwalk/clockwork/New()
|
||||
/obj/structure/lattice/catwalk/clockwork/Initialize(mapload)
|
||||
..()
|
||||
new /obj/effect/overlay/temp/ratvar/floor/catwalk(loc)
|
||||
new /obj/effect/overlay/temp/ratvar/beam/catwalk(loc)
|
||||
|
||||
Reference in New Issue
Block a user