public static RequestConveyorBuildMessage Send(BuildList.Entry entry, BuildingMaterial hasMenu, ConveyorBelt.ConveyorDirection direction) { var entryIndex = hasMenu.BuildList.Entries.ToList().IndexOf(entry); if (entryIndex == -1) { return(null); } var msg = new RequestConveyorBuildMessage { EntryIndex = (byte)entryIndex, Direction = direction }; msg.Send(); return(msg); }
public void TryBuildBelt(int direction) { SoundManager.Play("Click01"); CloseWindow(); RequestConveyorBuildMessage.Send(entry, materials, (ConveyorBelt.ConveyorDirection)direction); }