Commit Graph

3339 Commits

Author SHA1 Message Date
Ray Greenwell 3549b9cdaf Do not require the playerStatus field to be initialized. If someone wants
to write a simple board game for gamegardens, they shouldn't have to
explicitly set up an array indicating that all the players are active
(or worse, waste 45 minutes tracking down why the game is freezing up
suddenly).

If the playerStatus array is null, all players are active.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3397 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:10:27 +00:00
Ray Greenwell fade675350 Allow resource urls that have a blank resource set specified to
load resources to load from the default sets.
(A normal url would be "resource://<set>/<path>", one using the default set
would be "resource:///<path>". Goofy.)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3396 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:08:09 +00:00
Andrzej Kapolka 730234b5a5 Made dispatchMessage public.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3395 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 22:29:05 +00:00
Ray Greenwell 8445f3c7f2 Removed extra comma.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3394 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 02:13:05 +00:00
Andrzej Kapolka ad1edd6e69 Added standalone flag and special standalone logoff method to Client, options to BasicDirector to hold off on initializing directors not needed for standalone mode.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3393 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 02:06:43 +00:00
Ray Greenwell fea80fdb2b Changed the tileset cache to use soft references. We want the cache
because we'd like to use the same TileSet over again when possible, but
we don't want to forevermore hold onto a TileSet if it could be gc'd.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3392 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 01:30:34 +00:00
Ted V 51e8ef3687 Yeah, it does need the !.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3391 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:16:13 +00:00
Ted V 08cc800694 Turn/GameManager now supports interface for checking whether a player
is still actively playing the game.  The delegate now uses this when
incrementing turns to skip over players not a part of the game (rather
than needing this same code in the derived classes).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-10 00:13:25 +00:00
Ray Greenwell bb83bacdab Rather than keep a reference to an instance of a custom anonymous class
for an error icon, just whip one up on the fly when needed (almost never).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3389 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:20:37 +00:00
Ray Greenwell b07d3821fd Use an LRU cache for our config properties files.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3388 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:19:01 +00:00
Ray Greenwell fbbaf7c64a Got rid of the "occupant cache" which was used to provide the previous
value to observers when an OccupantInfo was updated or removed. This
functionality is now built-in to the dobj system, so just use
getOldEntry() on those two events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3387 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 23:15:02 +00:00
Ted V 94bf03ec9d Moved player status tracking and in/out of game status from puzzles to
games.  Updated the PLAYER_KNOCKED_OUT variable name to prevent some
namespace contention issues.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3386 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:52:03 +00:00
Ray Greenwell c36ebdc8d4 A-ha, found the further source of the walk-on-water bug, which is that if
you had logged on to one ocean and then moved to another, the previous
ocean's sceneIds are still in the scene cache.

Fix: Clear the scene cache both when we log off and when the scene repo is set.

Also, I made the cache be a LRUHashMap holding a measly 5 scenes.
Why are we filling up memory on the client with scenes that may or may not
ever be revisited?


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3385 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-09 22:06:38 +00:00
Michael Bayne 44502d01e8 We need to do the property file inheritance processing when loading the
sounds.properties lest we lose the needed info specified in the parent
properties files.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3384 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-07 20:06:55 +00:00
Andrzej Kapolka e75e1918b1 Disarm buttons on mouse-release to avoid sticky buttons in spades.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3383 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-04 22:25:27 +00:00
Michael Bayne 924363a8a6 Further refactoring into client, data and server.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3382 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 19:55:35 +00:00
Michael Bayne dbbd8e955f Decided to take the pain and refactor the parlor.game and parlor.turn
packages properly into client, data and server subpackages. This
eliminates a bunch of hackery I had to do to properly handle dead code
removal when building the Game Gardens client and games and it simplifies
things and sets a good example to follow the standard procedure as much as
possible.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3381 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 19:36:34 +00:00
Michael Bayne c2e2661e66 Further refinement of the permissions system. Eliminated the
CommunicationAuthorizer and rolled that into the BodyObject-based
permissions system. A victory for consolidation and elegance.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3380 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-03 04:47:57 +00:00
Michael Bayne bc837ca289 The plot thickens. The resource manager prepends "rsrc/" to anything it
loads, but the sound manager wants to load things directly from the
classpath, so we need to allow it to use the classpath that the resource
manager was configured with to ensure that it did the right thing.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3379 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:35:43 +00:00
Michael Bayne 91f936d147 Need to tack the .properties on by hand when we're loading in this manner.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3378 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:28:41 +00:00
Michael Bayne f4343be20d Load the sound properties via the ResourceManager which will do the right
classpath magic to work with Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3377 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:11:51 +00:00
Ray Greenwell ce0db63b27 Added a constructor to not specify a default sound.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3376 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 04:10:01 +00:00
Michael Bayne 01592d2593 Reorganized basic permissions handling to be more cleanly extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3375 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:22:27 +00:00
Michael Bayne 713e76373b Allow the authenticator to slip some authentication data down the line to
the PresentsClient which can then use it to fill in things like access
control information for the user. We could use this to replace the
UserStash mechanism we use on Yohoho, but that works so I doubt I'll do
that. However, this is needed to do things the more elegant way on future
projects, like Game Gardens.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3374 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 03:08:23 +00:00
Ray Greenwell 40eb978a96 Added a simple turn display widget (for game gardens).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-02 02:33:46 +00:00
Ray Greenwell a9df96d6dd Fixed a bug with days not having a defined next-highest unit, which caused
day values to incorrectly always display as 0. I'm surprised nobody
else noticed this, it's right there on the blockade panel.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3372 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-01 01:16:01 +00:00
Ray Greenwell 9733fc2303 Added support for looping sounds.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3371 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-28 19:29:44 +00:00
Ray Greenwell a784ce8a79 Comment change so that I can check it in with the right umask.. grr.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3370 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:30:52 +00:00
Ray Greenwell 008b9ad896 When a new default access controller is set, switch any objects
that were using the old default (usually null) to use the new default.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3369 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-26 14:04:25 +00:00
Ray Greenwell 708431bf86 Allow the SceneFactory to be set after construction.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3368 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-25 00:59:35 +00:00
Ray Greenwell 8491496226 Actually, it was stupid of me to handle a non-RandomAccess list differently,
as they still implement get() and however they do that internally
is bound to be more efficient than doing the same thing through an
Iterator.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3367 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:52:09 +00:00
Ray Greenwell a107aef489 Added a form of pickRandom that takes a List argument.
I just can't bear to see a useless object created (an Iterator) and
potentially a great many objects iterated past in order to find the
chosen random object when the original List is usually RandomAccess.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3366 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-24 06:45:25 +00:00
Michael Bayne 44f2a29f4f Regenerated with updated copyright information.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3365 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:56:52 +00:00
Michael Bayne eac29cb3b9 Small documentation addition.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3364 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:55:09 +00:00
Michael Bayne 53be9a74ca Added more sanity checking to portal traversal to avoid spurious error
messages if repeat requests come in or for some reason the client and
server ever differ in opinion as to which scene the player is in.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3363 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 18:54:48 +00:00
Ray Greenwell 7ec0eeca56 Added a bevy of interfaces that Sprites can implement to be recognized
by the MediaPanel as sprites that interact in some standard way with the
mouse.
Modified existing ButtonSprite to work this new way, and it now implements
CommandSprite, ArmingSprite, and DisableableSprite. One method name changed.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3362 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-22 04:14:44 +00:00
Michael Bayne 097730e84d Update for 2005.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3361 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:52 +00:00
Michael Bayne 121f6d7e53 Did the refactoring necessary to get the client and server to live happily
together in one JVM and both interoperate with the AWT thread in a manner
so harmonious as to bring a tear to the eye. This was surprisingly much
easier that I expected, thanks to my eminently sensible initial design,
I'm sure. ;)


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3360 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-20 00:37:34 +00:00
Michael Bayne 41fb0b1b80 The PuzzleService was superfluous. The ParlorService can handle starting
single player games and indeed should because it's useful outside the
context of puzzles and their ilk.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3359 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-19 22:38:06 +00:00
Michael Bayne 4036d12121 Further test fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3358 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:14:44 +00:00
Michael Bayne e8705b6137 We need more libraries.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3357 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:07:10 +00:00
Michael Bayne c0cd2cd3ca Further repairs to the build configuration.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3356 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 02:05:35 +00:00
Michael Bayne 2198748dcb Brought the tests back into the land of compilability.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3355 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-17 01:54:54 +00:00
Ted V ebf4d7cfa2 Now throws the proper type of exception when a color name lookup fails.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3354 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-16 22:21:01 +00:00
Ted V 785259a4a8 Quite obviously the parsing should check for integers, not bytes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3353 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 21:44:35 +00:00
Ted V d618c12c93 Added accessor function that handles color name -> id lookups.
Could be made faster with some sort of reverse string lookup table,
but it doesn't seem worth the overhead right now.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3352 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 20:53:49 +00:00
Michael Bayne 93794d5a77 Fixed some comment grammar.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3351 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 01:02:17 +00:00
Michael Bayne 877892b4c8 Allow the ZoneManager to veto a body's departure from the zone.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3350 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-15 00:58:16 +00:00
Michael Bayne 7cf98ba971 Automatically lay out our label if it has not already been.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:28 +00:00
Michael Bayne 99d382fdbf Updated the constructor.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3348 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-02-14 03:01:14 +00:00