diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm
index 3a12acdd6ca..f248e92e0d2 100644
--- a/code/game/objects/effects/aliens.dm
+++ b/code/game/objects/effects/aliens.dm
@@ -47,6 +47,152 @@
desc = "Purple slime solidified into a wall."
icon_state = "resinwall" //same as resin, but consistency ho!
+
+/obj/structure/alien/resin/wall/New()
+ ..()
+ update_icon()
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ if(locate(/obj/structure/alien/resin,get_step(src,direction)))
+ var/obj/structure/alien/resin/T = locate(/obj/structure/alien/resin,get_step(src,direction))
+ T.update_icon()
+
+/obj/structure/alien/resin/update_icon()
+ spawn(2) //So it properly updates when deleting
+ var/dir_sum = 0
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ var/skip_sum = 0
+ for(var/obj/structure/window/W in src.loc)
+ if(W.dir == direction) //So smooth tables don't go smooth through windows
+ skip_sum = 1
+ continue
+ var/inv_direction //inverse direction
+ switch(direction)
+ if(1)
+ inv_direction = 2
+ if(2)
+ inv_direction = 1
+ if(4)
+ inv_direction = 8
+ if(8)
+ inv_direction = 4
+ if(5)
+ inv_direction = 10
+ if(6)
+ inv_direction = 9
+ if(9)
+ inv_direction = 6
+ if(10)
+ inv_direction = 5
+ for(var/obj/structure/window/W in get_step(src,direction))
+ if(W.dir == inv_direction) //So smooth tables don't go smooth through windows when the window is on the other table's tile
+ skip_sum = 1
+ continue
+ if(!skip_sum) //means there is a window between the two tiles in this direction
+ if(locate(/obj/structure/alien/resin,get_step(src,direction)))
+ if(direction <5)
+ dir_sum += direction
+ else
+ if(direction == 5) //This permits the use of all table directions. (Set up so clockwise around the central table is a higher value, from north)
+ dir_sum += 16
+ if(direction == 6)
+ dir_sum += 32
+ if(direction == 8) //Aherp and Aderp. Jezes I am stupid. -- SkyMarshal
+ dir_sum += 8
+ if(direction == 10)
+ dir_sum += 64
+ if(direction == 9)
+ dir_sum += 128
+
+ var/resin_type = 0 //stand_alone table
+ if(dir_sum%16 in cardinal)
+ resin_type = 1 //endtable
+ dir_sum %= 16
+ if(dir_sum%16 in list(3,12))
+ resin_type = 2 //1 tile thick, streight table
+ if(dir_sum%16 == 3) //3 doesn't exist as a dir
+ dir_sum = 2
+ if(dir_sum%16 == 12) //12 doesn't exist as a dir.
+ dir_sum = 4
+ if(dir_sum%16 in list(5,6,9,10))
+ if(locate(/obj/structure/alien/resin,get_step(src.loc,dir_sum%16)))
+ resin_type = 3 //full table (not the 1 tile thick one, but one of the 'tabledir' tables)
+ else
+ resin_type = 2 //1 tile thick, corner table (treated the same as streight tables in code later on)
+ dir_sum %= 16
+ if(dir_sum%16 in list(13,14,7,11)) //Three-way intersection
+ resin_type = 5 //full table as three-way intersections are not sprited, would require 64 sprites to handle all combinations. TOO BAD -- SkyMarshal
+ switch(dir_sum%16) //Begin computation of the special type tables. --SkyMarshal
+ if(7)
+ if(dir_sum == 23)
+ resin_type = 6
+ dir_sum = 8
+ else if(dir_sum == 39)
+ dir_sum = 4
+ resin_type = 6
+ else if(dir_sum == 55 || dir_sum == 119 || dir_sum == 247 || dir_sum == 183)
+ dir_sum = 4
+ resin_type = 3
+ else
+ dir_sum = 4
+ if(11)
+ if(dir_sum == 75)
+ dir_sum = 5
+ resin_type = 6
+ else if(dir_sum == 139)
+ dir_sum = 9
+ resin_type = 6
+ else if(dir_sum == 203 || dir_sum == 219 || dir_sum == 251 || dir_sum == 235)
+ dir_sum = 8
+ resin_type = 3
+ else
+ dir_sum = 8
+ if(13)
+ if(dir_sum == 29)
+ dir_sum = 10
+ resin_type = 6
+ else if(dir_sum == 141)
+ dir_sum = 6
+ resin_type = 6
+ else if(dir_sum == 189 || dir_sum == 221 || dir_sum == 253 || dir_sum == 157)
+ dir_sum = 1
+ resin_type = 3
+ else
+ dir_sum = 1
+ if(14)
+ if(dir_sum == 46)
+ dir_sum = 1
+ resin_type = 6
+ else if(dir_sum == 78)
+ dir_sum = 2
+ resin_type = 6
+ else if(dir_sum == 110 || dir_sum == 254 || dir_sum == 238 || dir_sum == 126)
+ dir_sum = 2
+ resin_type = 3
+ else
+ dir_sum = 2 //These translate the dir_sum to the correct dirs from the 'tabledir' icon_state.
+ if(dir_sum%16 == 15)
+ resin_type = 4 //4-way intersection, the 'middle' table sprites will be used.
+ switch(resin_type)
+ if(0)
+ icon_state = "[initial(icon_state)]"
+ if(1)
+ icon_state = "[initial(icon_state)]_1tileendresin"
+ if(2)
+ icon_state = "[initial(icon_state)]_1tilethick"
+ if(3)
+ icon_state = "[initial(icon_state)]_dir"
+ if(4)
+ icon_state = "[initial(icon_state)]_middle"
+ if(5)
+ icon_state = "[initial(icon_state)]_dir2"
+ if(6)
+ icon_state = "[initial(icon_state)]_dir3"
+ if (dir_sum in list(1,2,4,8,5,6,9,10))
+ dir = dir_sum
+ else
+ dir = 2
+
+
/obj/structure/alien/resin/wall/BlockSuperconductivity()
return 1
@@ -57,6 +203,13 @@
opacity = 0
health = 120
+/obj/structure/alien/resin/membrane/New()
+ ..()
+ update_icon()
+ for(var/direction in list(1,2,4,8,5,6,9,10))
+ if(locate(/obj/structure/alien/resin,get_step(src,direction)))
+ var/obj/structure/alien/resin/T = locate(/obj/structure/alien/resin,get_step(src,direction))
+ T.update_icon()
/obj/structure/alien/resin/proc/healthcheck()
if(health <=0)
@@ -145,11 +298,12 @@
/obj/structure/alien/weeds
gender = PLURAL
- name = "weeds"
- desc = "Weird purple weeds."
+ name = "resin floor"
+ desc = "A thick resin surface covers the floor."
icon_state = "weeds"
anchored = 1
density = 0
+ layer = 2.6
var/health = 15
var/obj/structure/alien/weeds/node/linked_node = null
@@ -162,7 +316,7 @@
return
if(icon_state == "weeds")
icon_state = pick("weeds", "weeds1", "weeds2")
-
+ fullUpdateWeedOverlays()
spawn(rand(150, 200))
if(src)
Life()
@@ -226,10 +380,35 @@
healthcheck()
+/obj/structure/alien/weeds/proc/updateWeedOverlays()
+
+ overlays.Cut()
+ var/turf/N = get_step(src, NORTH)
+ var/turf/S = get_step(src, SOUTH)
+ var/turf/E = get_step(src, EAST)
+ var/turf/W = get_step(src, WEST)
+ if(!locate(/obj/structure/alien) in N.contents)
+ if(istype(N, /turf/simulated/floor))
+ src.overlays += image('icons/mob/alien.dmi', "weeds_side_s", layer=2.6, pixel_y = 32)
+ if(!locate(/obj/structure/alien) in S.contents)
+ if(istype(S, /turf/simulated/floor))
+ src.overlays += image('icons/mob/alien.dmi', "weeds_side_n", layer=2.6, pixel_y = -32)
+ if(!locate(/obj/structure/alien) in E.contents)
+ if(istype(E, /turf/simulated/floor))
+ src.overlays += image('icons/mob/alien.dmi', "weeds_side_w", layer=2.6, pixel_x = 32)
+ if(!locate(/obj/structure/alien) in W.contents)
+ if(istype(W, /turf/simulated/floor))
+ src.overlays += image('icons/mob/alien.dmi', "weeds_side_e", layer=2.6, pixel_x = -32)
+
+
+/obj/structure/alien/weeds/proc/fullUpdateWeedOverlays()
+ for (var/obj/structure/alien/weeds/W in range(1,src))
+ W.updateWeedOverlays()
+
//Weed nodes
/obj/structure/alien/weeds/node
- name = "purple sac"
- desc = "Weird purple octopus-like thing."
+ name = "glowing resin"
+ desc = "Blue bioluminescence shines from beneath the surface."
icon_state = "weednode"
luminosity = NODERANGE
var/node_range = NODERANGE
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index 80cb1fdc642..2df6900028d 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -143,15 +143,13 @@ Doesn't work on other aliens/AI.*/
set category = "Alien"
if(powerc(75))
- var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin door","resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
+ var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
if(!choice || !powerc(75)) return
adjustToxLoss(-75)
src << "You shape a [choice]."
for(var/mob/O in viewers(src, null))
O.show_message(text("[src] vomits up a thick purple substance and begins to shape it!"), 1)
switch(choice)
- if("resin door")
- new /obj/structure/mineral_door/resin(loc)
if("resin wall")
new /obj/structure/alien/resin/wall(loc)
if("resin membrane")
diff --git a/icons/mob/alien.dmi b/icons/mob/alien.dmi
index f679da87931..a8466bfeb98 100644
Binary files a/icons/mob/alien.dmi and b/icons/mob/alien.dmi differ