So far i have these problems.
1) Despite adding the harvestStorage tag to my unit (a reclaim only), it simply reclaims the tiberium and returns it right back to the pool of metal.
2) AllowCommand does not prevent non-harvesters from reclaiming tiberium features.
harvesters cant reclaim anything at all, but only with non-recursive commands, recursively it reclaims anything.
Code: Select all
function gadget:AllowCommand (unitID, unit_def, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced)
if cmdID == CMD.RECLAIM and #cmdParams == 1 then
if UnitDefs[unit_def].name == "harvester" then
if cmdParams[1] > Game.maxUnits and FeatureDefs[cmdParams[1] - Game.maxUnits] then
local fid = cmdParams[1] - Game.maxUnits
local fd = FeatureDefs[fid]
--assert (fd)
if fd.name == "tiberium" then
return true
end
end
return false
end
if cmdParams[1] > Game.maxUnits and FeatureDefs[cmdParams[1] - Game.maxUnits].name == "tiberium" then
return false
end
end
return true
end
3) I need a recalim catcher for builders so they can clear area for construction without returning the resources reclaimed to the resource pool.
4) Harvester idle harvesting code causes them to freeze and not accept new orders.
Code: Select all
function gadget:UnitIdle (unit, unitDef, unitTeam)
if UnitDefs[unitDef].name == "harvester" then
if true then -- add button to toggle auto harvesting
local x, y, z = Spring.GetUnitPosition (unit)
GG.Delay.DelayCall (Spring.GiveOrderToUnit, {unit, CMD.PATROL, {x, y, z}, {CMD.OPT_SHIFT}}, 1)
end
end
end
Right now tiberium crystals get spawned on all metal spots and automatically respwaned after 10m.
6) I have no idea how i can effectively make tiberium spread, not to mention having it be done without lagging up the game.
7) Im not sure if i should make tiberium to units and give a weapon to them to mimic infantry damage from tiberium.
Or is there a better way?
I would want refineries and silos to be able to keep track how much resource they contain so if they explode they could give proprtionate tiberium in the area.
Is this possible with using the new harvester tags too? Or must i assign each one an implicit counter?