[Request] function TurnTimeActive(bool)

7 replies [Last post]
UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 44 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 25 weeks 22 hours ago. Offline
Joined: 2012-06-20
Posts: 1304

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

UltiMaxKom
UltiMaxKom's picture
User offline. Last seen 4 years 44 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 19 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

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 4 years 44 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 5 days 15 hours ago. Offline
Joined: 2010-12-25
Posts: 565

More like SetTurnTimeActive.

nemo
nemo's picture
User offline. Last seen 19 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

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 25 weeks 22 hours ago. Offline
Joined: 2012-06-20
Posts: 1304

Implemented in -dev as SetTurnTimePaused(isPaused).

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

Hi, I am a Hedgewars developer. Smile

User login

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