FILES ----- behaviors\sequences\avianmission\tonauacstart.behavior interface\scripted\bountyboard\bountyboardgui.config interface\scripted\bountyboard\bountyboardgui.lua objects\outpost\bountyboard\bountyboard.lua quests\bounty\kill_bounty_monster.questtemplate scripts\bountygeneration.lua DIFFS ----- behaviors\sequences\avianmission\tonauacstart.behavior 381c381 < "range": {"value": 20} --- > "range": {"value": 30} 809c809 < } --- > } \ No newline at end of file interface\scripted\bountyboard\bountyboardgui.config 254a255,262 > "otherAssignment" : "You are assigned to another Peacekeeper Department.", > "noBoardAssignment" : "This board has no current assignment. Waiting for assigned Peacekeeper...", > "assignmentDifferentRank" : "This board provides cases of rank %s. Your current rank is %s. Please continue to your assigned Peacekeeper Station.", > "finalAssignmentNotReady" : "Restricted assignment. Please return to your assigned peacekeeper station.", > "assignmentCompleted" : "You have already completed this station's assignment. Please continue to your assigned peacekeeper station.", > "otherAssignmentActive" : "You have active cases registered to another department. Please clear your current case load before assigning to a different station.", > "assignmentNotReady" : "You are not yet ready to take cases of this rank. Please continue to your assigned peacekeeper station", > interface\scripted\bountyboard\bountyboardgui.lua 27a28,29 > self.otherAssignmentText = config.getParameter("otherAssignment") > 117a120 > widget.setText("lblOtherAssignment", self.otherAssignmentText) 248,252d250 < lastAssignment = self.assignment.system < self.bountyStation = { < system = newSystem, < worldId = nil < } 257a256,260 > lastAssignment = self.assignment.system > self.bountyStation = { > system = newAssignment.system, > worldId = nil > } 269,276c272,280 < self.lastAssignment = lastAssignment < if lastAssignment then < table.insert(self.assignmentLog, lastAssignment) < end < self.assignment = newAssignment < self.assignment.jumpsToRefuel = jumpsToRefuel < < sb.logInfo("Got new assignment") --- > if newAssignment then > self.lastAssignment = lastAssignment > if lastAssignment then > table.insert(self.assignmentLog, lastAssignment) > end > self.assignment = newAssignment > self.assignment.jumpsToRefuel = jumpsToRefuel > sb.logInfo("Got new assignment") > end 300,322c304,305 < local playerRank = getPlayerRank() < < -- if we're not in our assigned system, but we're in a system of the same rank, grab a new assignment from the board < if self.assignment then < local assignmentType = self.assignment.tutorial and "tutorialAssignment" or "assignment" < local boardAssignment = util.await(world.sendEntityMessage(pane.sourceEntity(), assignmentType)):result() < if boardAssignment and not compare(self.assignment.gang, boardAssignment.gang) then < local sameRank = self.assignment.rank == boardAssignment.rank < local xorFinal = self.assignment.final == boardAssignment.final < local previousAssignment = contains(self.assignmentLog, boardAssignment.system) < if sameRank and xorFinal and not previousAssignment then < self.assignment = boardAssignment < self.posters = {} < < local boardStationUuid = util.await(world.sendEntityMessage(pane.sourceEntity(), "stationUuid")):result() < self.bountyStation = { < system = self.assignment.system, < uuid = boardStationUuid, < worldId = player.worldId() < } < end < end < end --- > -- in some cases we want to immediately switch our assignment to the board we are interacting with > maybeTakeBoardAssignment() 401a385 > local playerRank = getPlayerRank() 442a427,487 > function maybeTakeBoardAssignment() > if self.bountyStation and self.bountyStation.worldId == player.worldId() then > -- this is already the assigned station > return > end > > local playerRank = getPlayerRank() > local assignmentType = self.playerRankPoints == 0 and "tutorialAssignment" or "assignment" > local boardAssignment = util.await(world.sendEntityMessage(pane.sourceEntity(), assignmentType)):result() > if boardAssignment == nil then > self.otherAssignmentText = config.getParameter("noBoardAssignment") > return > end > > if self.assignment then > if contains(self.assignmentLog, boardAssignment.system) then > self.otherAssignmentText = config.getParameter("assignmentCompleted") > return > end > > if self.assignment.rank ~= boardAssignment.rank then > self.otherAssignmentText = string.format(config.getParameter("assignmentDifferentRank"), boardAssignment.rank, self.assignment.rank) > return > end > > if self.assignment.final ~= boardAssignment.final then > if boardAssignment.final then > if not needFinalAssignment(playerRank) then > self.otherAssignmentText = config.getParameter("finalAssignmentNotReady") > return > end > if player.hasCompletedMission("missioncultist1") then > self.otherAssignmentText = config.getParameter("assignmentCompleted") > return > end > end > end > > for _, p in ipairs(self.posters) do > if posterQuestActive(p) then > self.otherAssignmentText = config.getParameter("otherAssignmentActive") > return > end > end > elseif boardAssignment.rank > 1 then > -- if the player has no assignment, this board must be rank 1 > self.otherAssignmentText = config.getParameter("assignmentNotReady") > return > end > > self.assignment = boardAssignment > self.posters = {} > > local boardStationUuid = util.await(world.sendEntityMessage(pane.sourceEntity(), "stationUuid")):result() > self.bountyStation = { > system = self.assignment.system, > uuid = boardStationUuid, > worldId = player.worldId() > } > end > 753d797 < sb.logInfo("Pool id: %s", poolId) objects\outpost\bountyboard\bountyboard.lua 37c37 < storage.posterPools[poolName] = util.filter(pool, function(poster) --- > storage.posterPools[poolName] = filterArray(pool, function(poster) 53a54,56 > if #storage.posterPools[poolId] == 0 then > storage.posterPools[poolId] = jarray() > end 127a131,140 > end > > function filterArray(t, predicate) > local newTable = jarray() > for _,value in ipairs(t) do > if predicate(value) then > newTable[#newTable+1] = value > end > end > return newTable quests\bounty\kill_bounty_monster.questtemplate 63c63 < "You took out ? Excellent work, partner! The universe is just a little bit safer now.\n\nCome by the Peacekeeper office next time you're on the Outpost to collect your rewards!" --- > "You took out ? Excellent work, partner! The universe is just a little bit safer now.\n\nCome by the Peacekeeper station to collect your rewards!" scripts\bountygeneration.lua 411d410 < -- filter edges by allowed step categories 412a412,420 > -- if there's already any "mid" step in the previous step, don't put in any more mid-step edges > -- this is a workaround to fix an issue with vaults breaking if there are two vault edges in a row > -- there's not really any reason that shouldn't work, but is a more differen bug, and we probably don't want > -- two vault steps in a single bounty anyway > local prevMidStep = util.find(previousSteps, function(s) return s.mid ~= nil end) > if prevMidStep ~= nil and o.mid then > return false > end > 501a510 > steps[1].mid = true