mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Port -tg-'s port of /vg/'s smoothwall.
This commit ports -tg-'s port of the /vg/ smoothwall system. An important thing to note is that we have extra code on top of the -tg- port to make it work at all, and therefore, it may not be as efficent.
This commit is contained in:
@@ -21,8 +21,10 @@
|
||||
density = 1
|
||||
opacity = 1
|
||||
anchored = 1
|
||||
canSmoothWith = list(/obj/structure/alien/resin)
|
||||
var/health = 200
|
||||
var/resintype = null
|
||||
|
||||
/obj/structure/alien/resin/New(location)
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
@@ -46,8 +48,8 @@
|
||||
resintype = "wall"
|
||||
|
||||
/obj/structure/alien/resin/wall/New()
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
relativewall_neighbours()
|
||||
|
||||
/obj/structure/alien/resin/wall/shadowling //For chrysalis
|
||||
name = "chrysalis wall"
|
||||
|
||||
@@ -13,16 +13,19 @@
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
var/mineral = "metal"
|
||||
var/walltype = "metal"
|
||||
var/walltype2 = "rwall" // So it also connects with rwalls, like regular walls do
|
||||
var/opening = 0
|
||||
density = 1
|
||||
opacity = 1
|
||||
|
||||
canSmoothWith = list(
|
||||
/turf/simulated/wall,
|
||||
/obj/structure/falsewall,
|
||||
/obj/structure/falsewall/reinforced // WHY DO WE SMOOTH WITH FALSE R-WALLS WHEN WE DON'T SMOOTH WITH REAL R-WALLS.
|
||||
)
|
||||
|
||||
/obj/structure/falsewall/New()
|
||||
if(!walltype2)
|
||||
walltype2 = walltype
|
||||
relativewall_neighbours()
|
||||
..()
|
||||
relativewall_neighbours()
|
||||
|
||||
/obj/structure/falsewall/Destroy()
|
||||
|
||||
@@ -42,16 +45,7 @@
|
||||
icon_state = "[walltype]fwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(walltype == W.walltype || walltype2 == W.walltype)
|
||||
junction |= get_dir(src,W)
|
||||
var/junction = findSmoothingNeighbors()
|
||||
icon_state = "[walltype][junction]"
|
||||
return
|
||||
|
||||
@@ -155,7 +149,6 @@
|
||||
desc = "A huge chunk of reinforced metal used to seperate rooms."
|
||||
icon_state = "r_wall"
|
||||
walltype = "rwall"
|
||||
walltype2 = "metal"
|
||||
|
||||
/obj/structure/falsewall/reinforced/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -164,38 +157,6 @@
|
||||
qdel(src)
|
||||
return T
|
||||
|
||||
/obj/structure/falsewall/reinforced/do_the_flick()
|
||||
if(density)
|
||||
flick("frwall_opening", src)
|
||||
else
|
||||
flick("frwall_closing", src)
|
||||
|
||||
/obj/structure/falsewall/reinforced/update_icon(relativewall = 1)
|
||||
if(density)
|
||||
icon_state = "rwall0"
|
||||
src.relativewall()
|
||||
else
|
||||
icon_state = "frwall_open"
|
||||
|
||||
/obj/structure/falsewall/reinforced/relativewall()
|
||||
|
||||
if(!density)
|
||||
icon_state = "frwall_open"
|
||||
return
|
||||
|
||||
var/junction = 0 //will be used to determine from which side the wall is connected to other walls
|
||||
|
||||
for(var/turf/simulated/wall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.walltype == W.walltype || walltype2 == W.walltype)//Only 'like' walls connect -Sieve
|
||||
junction |= get_dir(src,W)
|
||||
for(var/obj/structure/falsewall/W in orange(src,1))
|
||||
if(abs(src.x-W.x)-abs(src.y-W.y)) //doesn't count diagonal walls
|
||||
if(src.walltype == W.walltype || src.walltype2 == W.walltype)
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "rwall[junction]"
|
||||
return
|
||||
|
||||
/*
|
||||
* Uranium Falsewalls
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user