summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-31 23:09:25 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-31 23:09:25 -0300
commitbb646d0be8ac08ef41fe431572c4e9db1a461dcc (patch)
tree41ef56d461926bdc1ea3914a4c7f678ac894eb25 /npc
parent168f3c23b76805232650a0e0c1181ad23f7c0099 (diff)
downloadserverdata-bb646d0be8ac08ef41fe431572c4e9db1a461dcc.tar.gz
serverdata-bb646d0be8ac08ef41fe431572c4e9db1a461dcc.tar.bz2
serverdata-bb646d0be8ac08ef41fe431572c4e9db1a461dcc.tar.xz
serverdata-bb646d0be8ac08ef41fe431572c4e9db1a461dcc.zip
Playtest political system. Elections de-facto tests still TBD
Diffstat (limited to 'npc')
-rw-r--r--npc/012-7/politics.txt1
-rw-r--r--npc/functions/politics.txt9
2 files changed, 6 insertions, 4 deletions
diff --git a/npc/012-7/politics.txt b/npc/012-7/politics.txt
index 2cbdf9844..c33b29050 100644
--- a/npc/012-7/politics.txt
+++ b/npc/012-7/politics.txt
@@ -34,6 +34,7 @@ do
array_push($HURNS_CANDIDATE$, strcharinfo(0));
array_push($HURNS_VOTES, 0);
mesc l("Application successful!"), 3;
+ next;
break;
case 3:
POL_Candidate("HURNS");
diff --git a/npc/functions/politics.txt b/npc/functions/politics.txt
index 64884ca46..322cdb654 100644
--- a/npc/functions/politics.txt
+++ b/npc/functions/politics.txt
@@ -165,18 +165,18 @@ function script POL_Candidate {
copyarray( .@cd$, getd("$"+getarg(0)+"_CANDIDATE$"), getarraysize(getd("$"+getarg(0)+"_CANDIDATE$")) );
copyarray( .@vt, getd("$"+getarg(0)+"_VOTES"), getarraysize(getd("$"+getarg(0)+"_VOTES")) );
- .@list="Don't vote";
+ .@list$="Don't vote";
for (.@i=0;.@i<getarraysize(.@cd$);.@i++) {
mesc .@cd$[.@i] + " - "+.@vt[.@i] + " " + l("votes");
- .@list+=":"+.@cd$[.@i];
+ .@list$+=":"+.@cd$[.@i];
}
next;
if (#POL_VOTEDAY == gettimeparam(GETTIME_DAYOFMONTH))
return;
mesc l("In whom to vote?");
- select .@list;
- .@vote=@menu-1;
+ select .@list$;
+ .@vote=@menu-2;
// Didn't vote
if (.@vote < 0)
@@ -189,6 +189,7 @@ function script POL_Candidate {
setd(.@str$, .@vt+1);
mesc l("The vote was cast."), 3;
+ mesc l("You supported: ")+getd("$"+getarg(0)+"_CANDIDATE$"+"["+.@vote+"]"), 3;
next;
return true;
}