Jump to content
Sign in to follow this  

Force plan on preplanning (Host)

Recommended Posts


PrePlanningManager.__update_majority_votes = PrePlanningManager.__update_majority_votes or PrePlanningManager._update_majority_votes

function PrePlanningManager:_update_majority_votes(...)

  if Network:is_client() then

    return self:__update_majority_votes(...)


  local local_peer_id = managers.network:session():local_peer():id()

  local vote_council = self:get_vote_council()

  local winners = {}

  local plan_data = vote_council[local_peer_id]

  for plan,data in pairs( plan_data ) do

    winners[plan] = { data[1], data[2] }


  self._saved_majority_votes = winners

  return self._saved_majority_votes


Ignore votes from other players, plan you've voted on will be always executed. Enjoy :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Stop being a peeping tom and join the community.... we got cookies

Join the crew now

Sign in

Already part of the crew? Board right here

Sign In Now
Sign in to follow this