diff --git a/baystation12.dme b/baystation12.dme
index a00b0a2cd3..930145b01d 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -1502,6 +1502,7 @@
#include "code\modules\random_map\random_map_verbs.dm"
#include "code\modules\random_map\automata\automata.dm"
#include "code\modules\random_map\automata\caves.dm"
+#include "code\modules\random_map\automata\diona.dm"
#include "code\modules\random_map\building\building.dm"
#include "code\modules\random_map\drop\droppod.dm"
#include "code\modules\random_map\drop\droppod_doors.dm"
diff --git a/code/game/machinery/supplybeacon.dm b/code/game/machinery/supplybeacon.dm
index cfc8d75d82..8d7483e20c 100644
--- a/code/game/machinery/supplybeacon.dm
+++ b/code/game/machinery/supplybeacon.dm
@@ -50,7 +50,7 @@
user << "This device must be placed over an exposed cable."
return
anchored = !anchored
- user.visible_message("\The [user] [anchored ? "secures" : "unsecures"] \the [src].")
+ user.visible_message("\The [user] [anchored ? "secures" : "unsecures"] \the [src].")
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
return
return ..()
diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm
index 29f07579c9..8c75488b22 100644
--- a/code/game/turfs/simulated/floor_types.dm
+++ b/code/game/turfs/simulated/floor_types.dm
@@ -1,3 +1,10 @@
+/turf/simulated/floor/diona
+ name = "biomass flooring"
+ icon_state = "diona"
+
+/turf/simulated/floor/diona/attackby()
+ return
+
/turf/simulated/floor/airless
icon_state = "floor"
name = "airless floor"
diff --git a/code/modules/materials/materials.dm b/code/modules/materials/materials.dm
index 4e14143fa2..383f10f0ea 100644
--- a/code/modules/materials/materials.dm
+++ b/code/modules/materials/materials.dm
@@ -326,6 +326,20 @@ var/list/name_to_material
icon_reinf = "reinf_over"
icon_colour = "#666666"
+/material/diona
+ name = "biomass"
+ icon_colour = null
+ stack_type = null
+ integrity = 600
+ icon_base = "diona"
+ icon_reinf = "noreinf"
+
+/material/diona/place_dismantled_product()
+ return
+
+/material/diona/place_dismantled_girder(var/turf/target)
+ spawn_diona_nymph(target)
+
/material/steel/holographic
name = "holo" + DEFAULT_WALL_MATERIAL
display_name = DEFAULT_WALL_MATERIAL
diff --git a/code/modules/organs/subtypes/diona.dm b/code/modules/organs/subtypes/diona.dm
index 6f19c7eee8..edef9801c5 100644
--- a/code/modules/organs/subtypes/diona.dm
+++ b/code/modules/organs/subtypes/diona.dm
@@ -1,5 +1,5 @@
-/proc/spawn_diona_nymph_from_organ(var/obj/item/organ/organ)
- if(!istype(organ))
+/proc/spawn_diona_nymph(var/turf/target)
+ if(!istype(target))
return 0
//This is a terrible hack and I should be ashamed.
@@ -8,7 +8,7 @@
return 0
spawn(1) // So it has time to be thrown about by the gib() proc.
- var/mob/living/carbon/alien/diona/D = new(get_turf(organ))
+ var/mob/living/carbon/alien/diona/D = new(target)
var/datum/ghosttrap/plant/P = get_ghost_trap("living plant")
P.request_player(D, "A diona nymph has split off from its gestalt. ")
spawn(60)
@@ -144,7 +144,7 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
- if(prob(50) && spawn_diona_nymph_from_organ(src))
+ if(prob(50) && spawn_diona_nymph(get_turf(src)))
qdel(src)
/obj/item/organ/diona/process()
@@ -185,7 +185,7 @@
..()
if(!istype(H) || !H.organs || !H.organs.len)
H.death()
- if(prob(50) && spawn_diona_nymph_from_organ(src))
+ if(prob(50) && spawn_diona_nymph(get_turf(src)))
qdel(src)
// These are different to the standard diona organs as they have a purpose in other
diff --git a/code/modules/random_map/automata/diona.dm b/code/modules/random_map/automata/diona.dm
new file mode 100644
index 0000000000..523f688038
--- /dev/null
+++ b/code/modules/random_map/automata/diona.dm
@@ -0,0 +1,172 @@
+/turf/simulated/wall/diona/New(var/newloc)
+ ..(newloc,"biomass")
+
+/turf/simulated/wall/diona/attack_generic(var/mob/user, var/damage, var/attack_message)
+ if(istype(user, /mob/living/carbon/alien/diona))
+ if(can_open == WALL_OPENING)
+ return
+ can_open = WALL_CAN_OPEN
+ user.visible_message("\The [user] strokes its feelers against \the [src] and the biomass [density ? "moves aside" : "closes up"].")
+ toggle_open(user)
+ sleep(15)
+ if(can_open == WALL_CAN_OPEN) can_open = 0
+ else
+ return ..(user, damage, attack_message)
+
+/obj/structure/diona
+ icon = 'icons/obj/diona.dmi'
+ anchored = 1
+ density = 1
+ opacity = 0
+ layer = TURF_LAYER + 0.01
+
+/obj/structure/diona/vines
+ name = "alien vines"
+ desc = "Thick, heavy vines of some sort."
+ icon_state = "vines3"
+ var/growth = 0
+
+/obj/structure/diona/vines/proc/spread()
+ var/turf/origin = get_turf(src)
+ for(var/turf/T in range(src,2))
+ if(T.density || T == origin || istype(T, /turf/space))
+ continue
+ var/new_growth = 1
+ switch(get_dist(origin,T))
+ if(0)
+ new_growth = 3
+ if(1)
+ new_growth = 2
+ var/obj/structure/diona/vines/existing = locate() in T
+ if(!istype(existing)) existing = PoolOrNew(/obj/structure/diona/vines, T)
+ if(existing.growth < new_growth)
+ existing.growth = new_growth
+ existing.update_icon()
+
+/obj/structure/diona/vines/update_icon()
+ icon_state = "vines[growth]"
+
+/obj/structure/diona/bulb
+ name = "glow bulb"
+ desc = "A glowing bulb of some sort."
+ icon_state = "glowbulb"
+
+/obj/structure/diona/bulb/New(var/newloc)
+ ..()
+ set_light(3,3,"#557733")
+
+/datum/random_map/automata/diona
+ iterations = 3
+ descriptor = "diona gestalt"
+ limit_x = 32
+ limit_y = 32
+
+ wall_type = /turf/simulated/wall/diona
+ floor_type = /turf/simulated/floor/diona
+
+// This is disgusting.
+/datum/random_map/automata/diona/proc/search_neighbors_for(var/search_val, var/x, var/y)
+ var/current_cell = get_map_cell(x-1,y-1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x-1,y)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x-1,y+1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x,y-1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x,y+1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x+1,y-1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x+1,y)
+ if(current_cell && map[current_cell] == search_val) return 1
+ current_cell = get_map_cell(x+1,y+1)
+ if(current_cell && map[current_cell] == search_val) return 1
+ return 0
+
+/datum/random_map/automata/diona/cleanup()
+
+ // Hollow out the interior spaces.
+ for(var/x = 1, x <= limit_x, x++)
+ for(var/y = 1, y <= limit_y, y++)
+ var/current_cell = get_map_cell(x,y)
+ if(!current_cell) continue
+ if(map[current_cell] == WALL_CHAR)
+ if(!search_neighbors_for(FLOOR_CHAR,x,y) && !search_neighbors_for(DOOR_CHAR,x,y) && !(x == 1 || y == 1 || x == limit_x || y == limit_y))
+ map[current_cell] = EMPTY_CHAR
+
+ // Prune exposed floor turfs away from the edges.
+ var/changed = 1
+ while(changed)
+ for(var/x = 1, x <= limit_x, x++)
+ for(var/y = 1, y <= limit_y, y++)
+ changed = 0
+ var/current_cell = get_map_cell(x,y)
+ if(!current_cell) continue
+ if(map[current_cell] == EMPTY_CHAR)
+ if((search_neighbors_for(FLOOR_CHAR,x,y)) || (x == 1 || y == 1 || x == limit_x || y == limit_y))
+ map[current_cell] = FLOOR_CHAR
+ changed = 1
+
+ // Count and track the floors.
+ var/list/floor_turfs = list()
+ for(var/x = 1, x <= limit_x, x++)
+ for(var/y = 1, y <= limit_y, y++)
+ var/current_cell = get_map_cell(x,y)
+ if(!current_cell) continue
+ if(map[current_cell] == EMPTY_CHAR)
+ floor_turfs |= current_cell
+
+ // Add vine decals.
+ for(var/x = 1, x <= limit_x, x++)
+ for(var/y = 1, y <= limit_y, y++)
+ var/current_cell = get_map_cell(x,y)
+ if(!current_cell || map[current_cell] != EMPTY_CHAR) continue
+ if(search_neighbors_for(WALL_CHAR,x,y))
+ map[current_cell] = DOOR_CHAR
+
+ // Add bulbs and doona nymphs.
+ if(floor_turfs.len)
+ var/bulb_count = rand(round(floor_turfs.len/10),round(floor_turfs.len/8))
+ while(floor_turfs.len && bulb_count)
+ var/cell = pick(floor_turfs)
+ floor_turfs -= cell
+ map[cell] = ARTIFACT_CHAR
+ bulb_count--
+ if(floor_turfs.len)
+ var/nymph_count = rand(round(floor_turfs.len/10),round(floor_turfs.len/8))
+ while(floor_turfs.len && nymph_count)
+ var/cell = pick(floor_turfs)
+ floor_turfs -= cell
+ map[cell] = MONSTER_CHAR
+ nymph_count--
+ return
+
+/datum/random_map/automata/diona/get_appropriate_path(var/value)
+ switch(value)
+ if(EMPTY_CHAR, DOOR_CHAR, MONSTER_CHAR, ARTIFACT_CHAR)
+ return floor_type
+ if(WALL_CHAR)
+ return wall_type
+
+/datum/random_map/automata/diona/get_additional_spawns(var/value, var/turf/T)
+
+ if(value != FLOOR_CHAR)
+ for(var/thing in T)
+ if(istype(thing, /atom))
+ var/atom/A = thing
+ if(A.simulated)
+ continue
+ qdel(thing)
+
+ switch(value)
+ if(ARTIFACT_CHAR)
+ PoolOrNew(/obj/structure/diona/bulb,T)
+ if(MONSTER_CHAR)
+ spawn_diona_nymph(T)
+ if(DOOR_CHAR)
+ var/obj/structure/diona/vines/V = PoolOrNew(/obj/structure/diona/vines,T)
+ V.growth = 3
+ V.update_icon()
+ spawn(1)
+ V.spread()
\ No newline at end of file
diff --git a/code/modules/tables/tables.dm b/code/modules/tables/tables.dm
index 7ff4f8fe20..111fe42ff9 100644
--- a/code/modules/tables/tables.dm
+++ b/code/modules/tables/tables.dm
@@ -307,7 +307,7 @@
if(material)
for(var/i = 1 to 4)
I = image(icon, "[material.icon_base]_[connections[i]]", dir = 1<<(i-1))
- I.color = material.icon_colour
+ if(material.icon_colour) I.color = material.icon_colour
I.alpha = 255 * material.opacity
overlays += I
diff --git a/html/changelogs/zuhayr-pods.yml b/html/changelogs/zuhayr-pods.yml
index ba902e751b..64661a09e3 100644
--- a/html/changelogs/zuhayr-pods.yml
+++ b/html/changelogs/zuhayr-pods.yml
@@ -2,4 +2,5 @@ author: Zuhayr
delete-after: True
changes:
- rscadd: "Added ballistic supply drop pods."
+ - rscadd: "Added diona gestalt random map template."
- tweak: "Swapped the singularity beacon out for a hacked supply beacon."
diff --git a/icons/obj/diona.dmi b/icons/obj/diona.dmi
new file mode 100644
index 0000000000..a1a96b5b38
Binary files /dev/null and b/icons/obj/diona.dmi differ
diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi
index ecc8646cd8..f6b830a8e1 100644
Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ
diff --git a/icons/turf/wall_masks.dmi b/icons/turf/wall_masks.dmi
index c371d11b32..43923162ee 100644
Binary files a/icons/turf/wall_masks.dmi and b/icons/turf/wall_masks.dmi differ