Files
vgstation13/code/game/gamemodes/events/spacevines.dm
D3athrow 01d2471fc9 Merge branch 'color_replace_2_electric_boogaloo' into Bleeding-Edge
Conflicts:
	code/ATMOSPHERICS/pipe/pipe_dispenser.dm
	code/game/machinery/computer/HolodeckControl.dm
	code/game/machinery/embedded_controller/embedded_controller_base.dm
	code/modules/mining/money_bag.dm
	code/modules/mob/living/carbon/carbon.dm
	code/modules/mob/living/silicon/mommi/mommi.dm
	code/modules/mob/living/simple_animal/friendly/farm_animals.dm
	code/modules/research/destructive_analyzer.dm
	code/modules/research/rdconsole.dm
	code/modules/research/xenoarchaeology/machinery/analysis_base.dm
	code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm
	code/modules/research/xenoarchaeology/tools/ano_device_battery.dm
2015-04-12 16:40:59 -05:00

17 lines
702 B
Plaintext

//Carn: Spacevines random event.
/proc/spacevine_infestation()
spawn() //to stop the secrets panel hanging
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
for(var/areapath in typesof(/area/hallway))
var/area/A = locate(areapath)
for(var/area/B in A.related)
for(var/turf/simulated/floor/F in B.contents)
if(!F.contents.len)
turfs += F
if(turfs.len) //Pick a turf to spawn at if we can
var/turf/simulated/floor/T = pick(turfs)
new/obj/effect/plant_controller(T) //spawn a controller at turf
message_admins("<span class='notice'>Event: Spacevines spawned at [T.loc] ([T.x],[T.y],[T.z])</span>")