From 75f95d2f8aaea6121769102cadab5f4001a70a56 Mon Sep 17 00:00:00 2001 From: Lunovox Date: Mon, 19 Feb 2024 11:22:10 -0300 Subject: [PATCH] --- README.md | 1 + api.lua | 8 +++++++- mod.conf | 2 +- settingtypes.txt | 6 ------ 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8dc6f48..c64c97d 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ Colect opinion of player with electronic urn. * ````/candidateme []```` : Register your campaign to run for server president. * ````/candidates```` : Show the name of all candidates for president. * ````/campaign []```` : Show the Campaign of candidate for president. +* ````/vote []```` : Vote for a specific candidate for president. ## **API:** diff --git a/api.lua b/api.lua index 40487cf..9f1b0df 100644 --- a/api.lua +++ b/api.lua @@ -191,7 +191,7 @@ modEUrn.doCheckPresident = function() PresMaxVoted = iCandPresName end end - if PresMaxVoted~="" then + if maxVotes>=1 and PresMaxVoted~="" then if modEUrn.handler.elected==nil then modEUrn.handler.elected = { } end @@ -200,6 +200,12 @@ modEUrn.doCheckPresident = function() end modEUrn.handler.elected.president.name = PresMaxVoted modEUrn.handler.elected.president.when = os.time() --Agora em milisegundos + + --[[ + Falta: + * enviar email para todos os jogadores anunciando quem ganhou a eleição do mês. + * Faze o som de vitória + --]] end end end diff --git a/mod.conf b/mod.conf index 81f58b0..c828b2e 100644 --- a/mod.conf +++ b/mod.conf @@ -2,7 +2,7 @@ name = eurn description = Colect opinion of player with electronic urn. -release = 0.1.0 +release = 0.2.0 author = Lunovox Heavenfinder title = Electronic Urn depends = diff --git a/settingtypes.txt b/settingtypes.txt index cd67617..c91ea3e 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -15,10 +15,4 @@ eurn.save_compressed (Database Compressed) bool true # Default: 90 | Min: 0 | Max: 8760 eurn.voter.min_played_hours (Minimum Game Hours) int 90 0 8760 -# E-URN: -# Time interval in seconds to check the presidential candidate with the highest number of votes. -# WARNING: Decreasing this value too much can cause server lag. -# Default: 1800 | Min: 300 | Max: 86400 -eurn.president.intervalcheck (Interval Check President) int 1800 300 86400 -