//figure out if future speed limit is lower than the current speed limit private void considerSpeedLimit() { BlockTracker bs = new BlockTracker(prevToNext, currentBlock.blockNum, lineID); futureSpeedLimit = bs.getSpeedLimit(); futureSpeedLimitms = futureSpeedLimit / 3.6; }
public static void OnAdd(Vector3Int position, ushort type, Players.Player player) { ushort num; if (World.TryGetTypeAt(position.Add(0, -1, 0), out num) && ItemTypes.GetType(num).IsFertile) { BlockTracker.Add(new Herbs(position)); } }
//calculate minumum stopping distance for the authority that the train has left private void considerAuthority() { if (authority <= 3 && authorityChanged) { BlockTracker bs = new BlockTracker(prevToNext, currentBlock.blockNum, lineID); //if (blockTracker.getOnSwtich()) bs.configureDirection(); distanceToAuthority = bs.getDistance(authority); authorityChanged = false; } if (distanceToAuthority > 0) { minStopDistanceAuthority = (currSpeedms * currSpeedms) / (2 * serviceBreak); } }
public static void OnChange(Vector3Int position, ushort typeOld, ushort typeNew, Players.Player player) { Herbs herb = BlockTracker.Get <Herbs>(position); if (herb != null) { if (typeNew == Jobs.HerbalistRegister.HerbStage1.ItemIndex) { herb.type = HerbType.Stage1; } else { herb.type = HerbType.Invalid; } } }
public static void Load(JSONNode array) { if (array == null) { return; } foreach (JSONNode current in array.LoopArray()) { try { BlockTracker.Add(new Herbs((Vector3Int)current["location"], current["growth"].GetAs <float>())); } catch (Exception exc) { Log.WriteException("Exception loading a herb block;", exc); } } }
//sets up the internal track in the block tracker object private void setTrack(string input) { blockTracker = new BlockTracker(input, lineID); currentBlock = blockTracker.getCurrentBlock(); distanceLeft = currentBlock.length; }
private static void Load() { _areaJobTracker = new BlockTracker <HerbalistJob>(JOB_NAME); }
public void Load() { tracker = new BlockTracker <T>(blockName); }
public BlockJobManager(string blockName) { this.blockName = blockName; tracker = new BlockTracker(blockName); }
public static void OnRemove(Vector3Int position, ushort type, Players.Player player) { BlockTracker.Remove(position); }