GE Lua Documentation

Press F to search!

onBoundaryViolation

Definition


-- @/lua/ge/extensions/gameplay/crawl/utils.lua:1109

local function onBoundaryViolation(crawlerId)
  local state = crawlStates[crawlerId]
  if not state or not state.crawlerData then
    return
  end

  local infractionData = state.crawlerData.infractionData
  if infractionData.boundaryViolationCooldown > 0 then
    return
  end

  applyPenalty(crawlerId, 'boundaryViolation')
  infractionData.boundaryViolationCooldown = infractionCooldowns.boundaryViolation
  gameplay_crawl_display.showBoundaryViolationMessage()
end

Callers

@/lua/ge/extensions/gameplay/crawl/boundary.lua
      if gameplay_crawl_utils.onBoundaryViolation then
        gameplay_crawl_utils.onBoundaryViolation(crawler.id)
      end
    if gameplay_crawl_utils.onBoundaryViolation then
      gameplay_crawl_utils.onBoundaryViolation(crawler.id)
      log('D', logTag, string.format('Boundary violation penalty for crawler %s - %d/%d corners outside', crawler.id, outsideCorners, totalCorners))