Fixes and cleanup.
This commit is contained in:
parent
db9667ef21
commit
a6ff06ac08
|
@ -62,7 +62,7 @@ namespace IngameScript
|
||||||
IMyDoor doorBlock = door.Door;
|
IMyDoor doorBlock = door.Door;
|
||||||
_sealBulkheads.Add(0, new BlockActionDoor(
|
_sealBulkheads.Add(0, new BlockActionDoor(
|
||||||
doorBlock,
|
doorBlock,
|
||||||
BlockActionDoor.DoorAction.Close,
|
DoorAction.Close,
|
||||||
true
|
true
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,10 +44,13 @@ namespace IngameScript
|
||||||
_actionGroup.AddActionBlock("dock", 1, new BlockActionGasTank(gasTank, GasTankAction.Stockpile));
|
_actionGroup.AddActionBlock("dock", 1, new BlockActionGasTank(gasTank, GasTankAction.Stockpile));
|
||||||
_actionGroup.AddActionBlock("undock", 0, new BlockActionGasTank(gasTank, GasTankAction.Dispense));
|
_actionGroup.AddActionBlock("undock", 0, new BlockActionGasTank(gasTank, GasTankAction.Dispense));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Console.UpdateTickCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Main(string argument, UpdateType updateSource)
|
public void Main(string argument, UpdateType updateSource)
|
||||||
{
|
{
|
||||||
|
Console.UpdateTickCount();
|
||||||
if (argument != "")
|
if (argument != "")
|
||||||
{
|
{
|
||||||
if (_job != null)
|
if (_job != null)
|
||||||
|
|
|
@ -7,8 +7,6 @@ namespace IngameScript
|
||||||
{
|
{
|
||||||
public class BlockActionPiston : BlockAction
|
public class BlockActionPiston : BlockAction
|
||||||
{
|
{
|
||||||
public bool Running { get; private set; } = false;
|
|
||||||
|
|
||||||
private IMyPistonBase _piston;
|
private IMyPistonBase _piston;
|
||||||
private float _position;
|
private float _position;
|
||||||
private float _velocity;
|
private float _velocity;
|
||||||
|
@ -24,7 +22,7 @@ namespace IngameScript
|
||||||
_velocity = velocity;
|
_velocity = velocity;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator<bool> Run()
|
protected override IEnumerator<bool> onRun()
|
||||||
{
|
{
|
||||||
_piston.MoveToPosition(_position, _velocity);
|
_piston.MoveToPosition(_position, _velocity);
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,6 @@ namespace IngameScript
|
||||||
{
|
{
|
||||||
public class BlockActionRotor : BlockAction
|
public class BlockActionRotor : BlockAction
|
||||||
{
|
{
|
||||||
public bool Running { get; private set; } = false;
|
|
||||||
|
|
||||||
private IMyMotorStator _rotor;
|
private IMyMotorStator _rotor;
|
||||||
private float _angle;
|
private float _angle;
|
||||||
private float _velocity;
|
private float _velocity;
|
||||||
|
@ -27,7 +25,7 @@ namespace IngameScript
|
||||||
_direction = direction;
|
_direction = direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator<bool> Run()
|
protected override IEnumerator<bool> onRun()
|
||||||
{
|
{
|
||||||
_rotor.RotorLock = false;
|
_rotor.RotorLock = false;
|
||||||
_rotor.RotateToAngle(_direction, _angle, _velocity);
|
_rotor.RotateToAngle(_direction, _angle, _velocity);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user