Commit Graph

3351 Commits

Author SHA1 Message Date
Michael Bayne 2f24fdb449 Truncate the text of the long message. We can figure out what it is from
the first 80 characters if this every actually discovers an anomaly rather
than just dutifully reporting every time someone updates really lengthy
crew news.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3409 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 17:08:55 +00:00
Michael Bayne 0bd239c74c Added a version of getDirection() that works directly with doubles.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3408 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 07:58:28 +00:00
Michael Bayne b58c1a3cf4 Added a version of distance that doesn't do the square root.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3407 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 07:58:06 +00:00
Michael Bayne 2d19a0ba82 Renamed DSet.entries() -> DSet.iterator().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3406 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 02:12:03 +00:00
Ray Greenwell 12b267dbae One day we hope to implement Iterable, let's implement the standard
'iterator()' name and deprecate the old 'entries()' method.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3405 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 01:40:22 +00:00
Michael Bayne e018791a80 No need for these classes to extend DObject, that's weird.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3404 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-15 00:46:01 +00:00
Michael Bayne d62b0dfdbb Missed another serialization spot.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3403 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:58:02 +00:00
Michael Bayne b97d9ac7c3 Not to booch when serialized and then dead-code removed.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3402 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-14 23:53:36 +00:00
Michael Bayne f2a9f7ed0d Further AI handling improvements.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3401 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 10:08:02 +00:00
Michael Bayne 787d4f1fe5 Allow AI configuration to be specified in the GameConfig and automatically
put into place before the game starts.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3400 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:46:34 +00:00
Michael Bayne fb53600e92 Revamped the way AI configuration is specified to be more extensible.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3399 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-12 07:37:34 +00:00
Ray Greenwell b4e595bd3c Prevent infinite loops if there is no qualified player to become the
new turn holder. Log a warning. This is how we do things here.

Additionally, something I didn't change that is redundant is checking
to see if the player name is null, when the default implementation of
the active player check will return false if the name is null. It seems
to me that the movement of the active player business into the base game
package can result in some cleanup that hasn't been done, but I don't
want to look into it any further.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3398 542714f4-19e9-0310-aa3c-eee0fc999fb1
2005-03-11 22:14:23 +00:00
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