turf
proc
spawn_flowers()
if(prob(15))
var/num = rand(1,3)
var/path = text2path("/obj/Buildable/Misc/Plants/Flower[num]")
new path(loc)
Grass
Grass1
icon = 'BrightGrass.dmi'
icon_state = "Grass1"
GrassNew
icon = 'MediumGrass.dmi'
icon_state = "base1"
New()
. = ..()
icon_state = "base[rand(1,3)]"
spawn_flowers()
Problem description:
Here's a little snippet from a bit of code I'm using to create flowers on the map. Previously I got it to work by simply adding the flowers on as overlays, but for a few reasons I've changed my mind about it.
It doesn't create them at all, even with some fiddling around. Flower1/2/3 all exist and are defined, and when creating them as overlays it works perfectly. Why are these paths not being used to create the flowers, though?
If you want to check this, go to the bottom-left of your map and you'll probably find a lot of flowers there.