public unsafe static void AddElementConsumer(int gameCell, ElementConsumer.Configuration configuration, SimHashes element, byte radius, int cb_handle) { Debug.Assert(Grid.IsValidCell(gameCell)); if (Grid.IsValidCell(gameCell)) { int elementIndex = ElementLoader.GetElementIndex(element); AddElementConsumerMessage *ptr = stackalloc AddElementConsumerMessage[1]; ptr->cellIdx = gameCell; ptr->configuration = (byte)configuration; ptr->elementIdx = (byte)elementIndex; ptr->radius = radius; ptr->callbackIdx = cb_handle; Sim.SIM_HandleMessage(2024405073, sizeof(AddElementConsumerMessage), (byte *)ptr); } }
private static bool Prefix(int gameCell, ElementConsumer.Configuration configuration, SimHashes element, byte radius, int cb_handle) { SimMessages_Utils.Log(MethodBase.GetCurrentMethod(), gameCell, configuration, element, radius, cb_handle); return(true); }