File size: 1,235 Bytes
b6a38d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- ========== GENERATED BY ExtrasGen Editor (Ctrl-Alt-G) DO NOT EDIT MANUALLY! ==========

rawset(_G, 'ExtrasGenPrgs', rawget(_G, 'ExtrasGenPrgs') or {})
ExtrasGenPrgs.DirtOnFloor = function(seed, initial_selection)
	local li = { id = "DirtOnFloor" }
	initial_selection = initial_selection or editor.GetSel()
	local rand = BraidRandomCreate(seed or AsyncRand())
	local __sel = initial_selection
	initial_selection = {}
	for _, obj in ipairs(__sel) do
		if IsKindOf(obj, "Room") then
			PrgSelectRoomComponents.Add(obj, "Floors", 1, 10, initial_selection, true, true, true, true)
		end
	end

	local _
	prgdbg(li, 1, 2) _, initial_selection = sprocall(ReduceSpaceOut.Exec, ReduceSpaceOut, rand, initial_selection, 4000)
	prgdbg(li, 1, 3) local selection = nil
	prgdbg(li, 1, 4) for i, value in ipairs(initial_selection) do
		local _
		prgdbg(li, 2, 1) _, selection = sprocall(PrgPlaceObject.Exec, PrgPlaceObject, rand, {PlaceObj('PlaceObjectData', {EditorClass = "DecBunkerFloor_02",}),}, value, "Add to", selection) li[2] = nil
	end
	prgdbg(li, 1, 5) sprocall(PrgRotate.Exec, PrgRotate, rand, selection, false, true, point(0, 0, 4096), 0, 10800)
	prgdbg(li, 1, 6) sprocall(SelectInEditor.Exec, SelectInEditor, selection, true, true)
end