Bunch of changes, adding functionality requested.
- Added bunch of achievements for democracy - Added currency exchanges - Made voting algorithm more efficient - Added standard meeting hall functionality to the datapack
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
execute as @a[scores={mt_vote_trigger=1}] run function tctvote:ayevote
|
||||
execute as @a[scores={mt_vote_trigger=2}] run function tctvote:novote
|
||||
execute as @a[scores={mt_vote_trigger=1..2}] run clear @s written_book{certified:votebook} 1
|
||||
execute as @a[scores={mt_vote_trigger=1..2}] run scoreboard players reset @s mt_vote_trigger
|
||||
execute as @a[scores={mt_vote_trigger=1..}] run clear @s written_book{certified:votebook} 1
|
||||
execute as @a[scores={mt_vote_trigger=1..}] run scoreboard players reset @s mt_vote_trigger
|
||||
@@ -1,3 +1,4 @@
|
||||
scoreboard players remove @e[tag=mt_votestand] mt_countdown 1
|
||||
execute store result bossbar minecraft:votetimer value run scoreboard players get @e[tag=mt_votestand,limit=1] mt_countdown
|
||||
execute at @e[type=minecraft:armor_stand,tag=mt_votestand,limit=1] run playsound minecraft:block.note_block.hat master @a ~ ~ ~ 100 1
|
||||
execute at @e[type=minecraft:armor_stand,tag=mt_votestand,limit=1] run playsound minecraft:block.note_block.hat master @a ~ ~ ~ 100 1
|
||||
schedule function tctvote:tock 10t append
|
||||
2
data/tctvote/functions/interrupt.mcfunction
Normal file
2
data/tctvote/functions/interrupt.mcfunction
Normal file
@@ -0,0 +1,2 @@
|
||||
execute at @p[] run tellraw @a[distance=..30] ["",{"text":"The Council >> ","bold":true,"color":"dark_green"},{"selector":"@p","bold":true,"color":"yellow"},{"text":" requests the floor.","bold":true,"color":"white"}]
|
||||
execute as @p run advancement grant @s[advancements={craftytable:joinmeeting=true}] only craftytable:interrupt
|
||||
0
data/tctvote/functions/ivoted.mcfunction
Normal file
0
data/tctvote/functions/ivoted.mcfunction
Normal file
4
data/tctvote/functions/loudorder.mcfunction
Normal file
4
data/tctvote/functions/loudorder.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
||||
playsound minecraft:block.anvil.land master @a ~ ~ ~ 100 0.5
|
||||
execute as @a run playsound minecraft:entity.wither.spawn master @p ~ ~ ~ 100 0.54
|
||||
tellraw @a ["",{"text":"The Council >> ","bold":true,"color":"dark_green"},{"text":"ORDER IN THE ","bold":true,"color":"yellow"},{"text":"COUNCIL","bold":true,"underlined":true,"color":"dark_red"}]
|
||||
advancement grant @a[advancements={craftytable:joinmeeting=true},distance=..30] only craftytable:order
|
||||
3
data/tctvote/functions/meetingclose.mcfunction
Normal file
3
data/tctvote/functions/meetingclose.mcfunction
Normal file
@@ -0,0 +1,3 @@
|
||||
tellraw @a[] ["",{"text":"The Council >> ","bold":true,"color":"dark_green"},{"text":"Meeting adjourned!","bold":true,"color":"white"}]
|
||||
advancement grant @a[advancements={craftytable:joinmeeting=true},distance=..30] only craftytable:leavemeeting
|
||||
playsound minecraft:block.anvil.land master @a ~ ~ ~ 100 0.5
|
||||
4
data/tctvote/functions/meetingopen.mcfunction
Normal file
4
data/tctvote/functions/meetingopen.mcfunction
Normal file
@@ -0,0 +1,4 @@
|
||||
tellraw @a[] ["",{"text":"The Council >> ","bold":true,"color":"dark_green"},{"text":"Meeting is now in session!","bold":true,"color":"white"}]
|
||||
tellraw @a[distance=..30] ["",{"text":"The Council >> ","bold":true,"color":"dark_green"},{"text":"Present members: ","bold":true,"color":"white"},{"selector":"@a[distance=..30]","italic":true,"color":"yellow"}]
|
||||
advancement grant @a[distance=..30] until craftytable:joinmeeting
|
||||
playsound minecraft:block.anvil.land master @a ~ ~ ~ 100 0.5
|
||||
1
data/tctvote/functions/order.mcfunction
Normal file
1
data/tctvote/functions/order.mcfunction
Normal file
@@ -0,0 +1 @@
|
||||
playsound minecraft:block.anvil.land master @a ~ ~ ~ 100 0.5
|
||||
@@ -21,7 +21,7 @@ summon minecraft:armor_stand ~ ~ ~ {NoGravity:1b,Invulnerable:1b,Small:1b,Marker
|
||||
scoreboard players set @e[tag=mt_votestand] mt_countdown 20
|
||||
|
||||
# Announce the vote
|
||||
tellraw @a ["",{"text":"Vote >>","bold":true,"color":"dark_green"},{"text":" Vote using the voting book now!","bold":true,"color":"white"}]
|
||||
tellraw @a[scores={mt_vote_eligible=1}] ["",{"text":"Vote >>","bold":true,"color":"dark_green"},{"text":" Vote using the voting book now!","bold":true,"color":"white"}]
|
||||
|
||||
# Enable the trigger
|
||||
scoreboard players enable @a[scores={mt_vote_eligible=1}] mt_vote_trigger
|
||||
@@ -38,4 +38,7 @@ schedule function tctvote:notes/up_0 1t
|
||||
function tctvote:countdownstart
|
||||
|
||||
# And start the countdown
|
||||
schedule function tctvote:halt 20s
|
||||
schedule function tctvote:halt 20s
|
||||
|
||||
# Give everyone advancements
|
||||
advancement grant @a[scores={mt_vote_eligible=1},advancements={craftytable:joinmeeting=true}] only craftytable:vote
|
||||
@@ -1 +1 @@
|
||||
execute as @a[scores={mt_vote_trigger=1..2}] run function tctvote:calc
|
||||
execute as @a[scores={mt_vote_trigger=1..}] run function tctvote:calc
|
||||
1
data/tctvote/functions/tock.mcfunction
Normal file
1
data/tctvote/functions/tock.mcfunction
Normal file
@@ -0,0 +1 @@
|
||||
execute at @e[type=minecraft:armor_stand,tag=mt_votestand,limit=1] run playsound minecraft:block.note_block.hat master @a ~ ~ ~ 100 0.8
|
||||
Reference in New Issue
Block a user