mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-13 09:16:15 +00:00
Update Warehouse.lua
This commit is contained in:
@@ -1892,6 +1892,7 @@ function WAREHOUSE:New(warehouse, alias)
|
|||||||
self:AddTransition("*", "NewAsset", "*") -- New asset was added to warehouse stock.
|
self:AddTransition("*", "NewAsset", "*") -- New asset was added to warehouse stock.
|
||||||
self:AddTransition("*", "AddRequest", "*") -- New request from other warehouse.
|
self:AddTransition("*", "AddRequest", "*") -- New request from other warehouse.
|
||||||
self:AddTransition("Running", "Request", "*") -- Process a request. Only in running mode.
|
self:AddTransition("Running", "Request", "*") -- Process a request. Only in running mode.
|
||||||
|
self:AddTransition("Running", "RequestSpawned", "*") -- Assets of request were spawned.
|
||||||
self:AddTransition("Attacked", "Request", "*") -- Process a request. Only in running mode.
|
self:AddTransition("Attacked", "Request", "*") -- Process a request. Only in running mode.
|
||||||
self:AddTransition("*", "Unloaded", "*") -- Cargo has been unloaded from the carrier (unused ==> unnecessary?).
|
self:AddTransition("*", "Unloaded", "*") -- Cargo has been unloaded from the carrier (unused ==> unnecessary?).
|
||||||
self:AddTransition("*", "AssetSpawned", "*") -- Asset has been spawned into the world.
|
self:AddTransition("*", "AssetSpawned", "*") -- Asset has been spawned into the world.
|
||||||
@@ -4966,12 +4967,11 @@ function WAREHOUSE:onafterAssetSpawned(From, Event, To, group, asset, request)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if allspawned then
|
if allspawned then
|
||||||
|
if request.toself then
|
||||||
self:SelfRequest()
|
self:SelfRequest(request.cargogroupset, request)
|
||||||
|
else
|
||||||
-- delete request from self.queue and put it into pending.
|
self:RequestSpawned(request, request.cargogroupset, request.transportgroupset)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user