Super Sexy Properties Panel
Properties panel now allows nested lists with foldouts, item selection and click callbacks Properties Panel UI has a new look Refactored lambdas in control module code into methods for readability
This commit is contained in:
parent
68473a84ab
commit
50a8059ed4
43 changed files with 894 additions and 916 deletions
|
|
@ -85,17 +85,7 @@ public class MiningController : ControllerBase, IBehavior, IPersistentBehavior,
|
|||
else
|
||||
{
|
||||
_entity.SetMessage("Out of cargo space. Returning home to offload cargo.");
|
||||
GoHome(() =>
|
||||
{
|
||||
var homeEntity = _context.Cache.Get<Entity>(HomeEntity);
|
||||
if (!_entity.Cargo.ToArray().All(ii =>
|
||||
_context.MoveCargo(_entity, homeEntity, _context.Cache.Get<ItemInstance>(ii))))
|
||||
{
|
||||
homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task.");
|
||||
FinishTask();
|
||||
_taskStarted = false;
|
||||
}
|
||||
});
|
||||
GoHome(OnArriveHome);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -103,6 +93,17 @@ public class MiningController : ControllerBase, IBehavior, IPersistentBehavior,
|
|||
return base.Update(delta);
|
||||
}
|
||||
|
||||
private void OnArriveHome()
|
||||
{
|
||||
var homeEntity = _context.Cache.Get<Entity>(HomeEntity);
|
||||
if (!_entity.Cargo.ToArray().All(ii => _context.MoveCargo(_entity, homeEntity, _context.Cache.Get<ItemInstance>(ii))))
|
||||
{
|
||||
homeEntity.SetMessage("Colony is out of cargo space. Closing Mining Task.");
|
||||
FinishTask();
|
||||
_taskStarted = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void NextAsteroid()
|
||||
{
|
||||
var miningTask = _context.Cache.Get<Mining>(Task);
|
||||
|
|
|
|||
Loading…
Reference in a new issue