[Request] function TurnTimeActive(bool)

7 replies [Last post]
UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Hello!
Is there any function that pauses turn time yet? (And unpause!)
If there's none, may we get one? Thanks ^^

TurnTimeActive allegedly wrote:
function TurnTimeActive(bool) ; --[[chunk]]-- ; end
--[[ Where "bool" is a boolean parameter that pauses the turn time if given true (Do nothing if the turn time is already paused), unpause the turn time if given false or nil (Do nothing if the turn time is already unpaused), switch between on or off if bool is not a boolean and not a nil value --]]

Note: Actually, this isn't so important, but nonetheless it still valuable as a good as a new stuff for the "Optional List" =)

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

Wuzzy
Wuzzy's picture
User offline. Last seen 1 day 11 hours ago. Offline
Joined: 2012-06-20
Posts: 1263

Good suggestion. But there should be a way to un-pause the timer as well. Just saying. Wink Smiley

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

Wuzzy allegedly wrote:

Good suggestion. But there should be a way to un-pause the timer as well. Just saying. Wink Smiley

Welp! You're absolutely right xD
Didn't realize it, lol. Yes please, add them both x)

Anyway, tbh I thought there's already one since it sounds like a very basic feature that Hedgewars should have in the early stage, or up. Hmmm... =/

PS: OP updated...

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

nemo
nemo's picture
User offline. Last seen 2 days 8 hours ago. Offline
Joined: 2009-01-28
Posts: 1839

I'm guessing although the name was not great he really meant. TurnTimeActive(bool)
for true/false

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 1 year 21 weeks ago. Offline
Joined: 2016-06-26
Posts: 381

nemo allegedly wrote:

I'm guessing although the name was not great he really meant. TurnTimeActive(bool)
for true/false


True!
Haven't thought for a good name tho, I just type it in real fast without any brainstorm or anything. And yeah, I guess "TurnTimeActive" is way better than mine hehehe. Let it be that way then! ^^

PS: OP updated, again...

╟───NW──────┼──────N╢

╓──────────────────╖ ╓──────────────────╖
⠀HP: ██████████ 1E9/1E91E9/1E9 ██████████ :MP
╙──────────────────╜ ╙──────────────────╜

KoBeWi
KoBeWi's picture
User offline. Last seen 9 hours 17 min ago. Offline
Joined: 2010-12-25
Posts: 547

More like SetTurnTimeActive.

nemo
nemo's picture
User offline. Last seen 2 days 8 hours ago. Offline
Joined: 2009-01-28
Posts: 1839

Guess it depends on whether one thinks of it as a getter/setter or a verb action. But fine with that too, still describes the boolean.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

Wuzzy
Wuzzy's picture
User offline. Last seen 1 day 11 hours ago. Offline
Joined: 2012-06-20
Posts: 1263

Implemented in -dev as SetTurnTimePaused(isPaused).

http://hg.hedgewars.org/hedgewars/rev/d670e4efe1ed

Hi, I am a Hedgewars developer. Smile I accept personal donations in bitcoin. Heart 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Copyright © 2004-2021 Hedgewars Project. All rights reserved. [ contact ]