forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Mon Nov 20, 2017 12:10 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Disable variant...
PostPosted: Tue Jan 26, 2010 10:43 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Hi.
Can I disable a variant after I gave her an ID on my system and played a few games...?

Oliver


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Fri Apr 02, 2010 8:58 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
You can, but you'll get an error when someone tries to access one of those games


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Fri Apr 02, 2010 9:49 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Seen that.
Maybe there should be a flag in the variant.php that just disable the creation of new games....

Oliver


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Fri Apr 02, 2010 2:33 pm 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
Not sure what you mean sleepcap, can you still create new games for disabled variants?


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Fri Apr 02, 2010 4:07 pm 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
Sorry.
I'd like to disable a variant, but don't want the users to get errors if they view the older games.
Also if I disable a variant and some people are playing a game they get errors on their home-panel and can't finish the game.
So it would be cool if a disabled variant wouldn't show up on the create-game screen, but the rest would work just fine...

Oliver


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Thu Apr 08, 2010 7:01 am 
Offline

Joined: Fri Mar 26, 2010 10:07 am
Posts: 19
I could be mistaken, but this would seem to be a prime use for the line in config.php
Code:
An array of variants available on the server (for future releases, not yet enabled)
    * @var array
    */
   public static $variants=array(1=>'Classic');//, 2=>'World', 3=>'FleetRome', 4=>'CustomStart', 5=>'BuildAnywhere');


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Thu Apr 08, 2010 9:42 am 
Offline

Joined: Wed Jul 29, 2009 10:22 am
Posts: 841
AShulman wrote:
I could be mistaken, but this would seem to be a prime use for the line in config.php
Code:
An array of variants available on the server (for future releases, not yet enabled)
    * @var array
    */
   public static $variants=array(1=>'Classic');//, 2=>'World', 3=>'FleetRome', 4=>'CustomStart', 5=>'BuildAnywhere');


If you remove the variant here you can't view older games of that variant and you can't complete games still running.

Oliver


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Thu Apr 08, 2010 5:15 pm 
Offline

Joined: Fri Mar 26, 2010 10:07 am
Posts: 19
Oh. Well that's silly. That config line should control what variants are able to be selected for a new game. However, the selection of an old game should not look at the config line, but should instead see if the files themselves for the variant in question are there. If they are, display the game. If they are not, throw an error.


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Fri Apr 09, 2010 3:06 am 
Offline
Site Admin

Joined: Sat Jun 28, 2008 6:24 am
Posts: 892
That config line is used to know where to look, it is what associates the variant ID number with the folder the code should look for

It should fail more gracefully when a game using a disabled variant attempts to load, I'll change this when I get a chance


Top
 Profile  
 
 Post subject: Re: Disable variant...
PostPosted: Sun Apr 11, 2010 12:18 pm 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
I agree you should be able to stop people creating new instances of a variant without having to delete it completely


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group