Ports /vg/s Smoothwall code, Angry all caps comments from N3X15 included.

This commit is contained in:
Remie Richards
2015-05-16 21:05:18 +01:00
parent 57b6a236fe
commit cf536a9c16
4 changed files with 96 additions and 132 deletions
+9 -11
View File
@@ -12,9 +12,16 @@
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()
relativewall_neighbours()
..()
relativewall_neighbours()
/obj/structure/falsewall/Destroy()
@@ -35,16 +42,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(mineral == W.mineral)//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(mineral == W.mineral)
junction |= get_dir(src,W)
var/junction = findSmoothingNeighbors()
icon_state = "[walltype][junction]"
return