Files
OpenRA/mods/d2k/maps/shellmap/shellmap.lua
Paul Chote b670673f9f Reorganize D2K actor rules.
This removes the redundancy between faction variants and adjusts the layout
to be more consistent with the other mods.
2015-03-03 18:45:45 +00:00

21 lines
612 B
Lua

InitializeHarvester = function(harvester)
harvester.FindResources()
Trigger.OnRemovedFromWorld(harvester, InsertHarvester)
end
InsertHarvester = function()
local harvesters = Reinforcements.ReinforceWithTransport(atreides, "carryall.scripted", { "harvester" },
{ Entry.Location, AtreidesSpiceRefinery.Location + CVec.New(2, 3) }, { Entry.Location })[2]
Utils.Do(harvesters, function(harvester)
Trigger.OnAddedToWorld(harvester, function() InitializeHarvester(harvester) end)
end)
end
WorldLoaded = function()
atreides = Player.GetPlayer("Atreides")
InsertHarvester()
Media.PlayMusic("score")
end