Skip to content

Commit

Permalink
Wallstreet: fixed next client timer
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Oct 30, 2023
1 parent 8653dd3 commit 621a876
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion minigames/data/wallstreet/functions/config.mcfunction
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

scoreboard players set #wallstreet.game_time data 7200
scoreboard players set #wallstreet.villager.lock_time data 600
scoreboard players set #wallstreet.villager.interaction_time data 400
scoreboard players set #wallstreet.villager.interaction_time data 440

scoreboard players set #wallstreet.model.starting_money data 5000
scoreboard players set #wallstreet.model.buy_power data 500
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ scoreboard players operation #seconds ctx = @e[tag=wallstreet.sit,limit=1,sort=n
scoreboard players operation #seconds ctx -= #wallstreet.villager.interaction_time data
scoreboard players operation #seconds ctx *= -1 const
scoreboard players operation #seconds ctx /= 20 const
scoreboard players operation #seconds ctx += 1 const
scoreboard players operation #seconds ctx -= 1 const

scoreboard players operation #modulo ctx = @e[tag=wallstreet.sit,limit=1,sort=nearest] living_time
scoreboard players operation #modulo ctx %= 20 const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tag @e[tag=wallstreet.sit] add walstreet.sit.to_remove
execute as @e[tag=wallstreet.sit] on passengers on vehicle run tag @s remove walstreet.sit.to_remove
execute at @e[tag=walstreet.sit.to_remove] as @e[tag=wallstreet.villager_marker,limit=1,sort=nearest] at @s run function wallstreet:villager/talk/stop
# Exit GUI if he run out of time
execute as @e[tag=wallstreet.sit,scores={living_time=320..}] \
execute as @e[tag=wallstreet.sit] \
at @s \
if score @s living_time > #wallstreet.villager.interaction_time data \
as @e[tag=wallstreet.villager_marker,limit=1,sort=nearest] \
Expand Down

0 comments on commit 621a876

Please sign in to comment.