Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ffe2102207 | |||
| 86aa1cef69 | |||
| d4a1665550 | |||
| 4b3598093c | |||
| b23d91cfd4 | |||
| 279206ce88 | |||
| 1f49dd6c40 | |||
| 44928f4084 | |||
| 865c06d916 | |||
| f6fd0d2cb5 | |||
| 702c2d697f | |||
| 8bbdabe5d6 | |||
| 074ef440b8 | |||
| 486d4c80b1 | |||
| 5a6a960cd9 | |||
| fe05edab42 | |||
| a0e8a23b9d | |||
| 968fb80a7b | |||
| 84b4ef98b4 | |||
| cbaaa514e1 | |||
| 6a65aa773e | |||
| aca72a52f5 | |||
| 380e78dd98 | |||
| 94c9852b2a | |||
| 3934c99b38 | |||
| 2199bfd21a | |||
| 95294dd6fe | |||
| 2c26d6405a | |||
| f9b696b994 | |||
| dc16869d5c | |||
| bb09b0d4a0 | |||
| 549afd19e3 | |||
| 7b0c77bf5d | |||
| a8ff54915a | |||
| abb3a1a523 | |||
| b670c92eba | |||
| a21991c7e9 |
@@ -0,0 +1 @@
|
||||
*/target/
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
sudo: false
|
||||
|
||||
language: java
|
||||
|
||||
jdk:
|
||||
- openjdk7
|
||||
- oraclejdk8
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- '$HOME/.m2/repository'
|
||||
|
||||
script:
|
||||
- mvn -B test
|
||||
- rm -rf $HOME/.m2/repository/com/threerings/vilya*
|
||||
@@ -40,17 +40,11 @@ A Maven repository containing released versions of the Vilya Java and
|
||||
ActionScript artifacts are maintained here. To add a Vilya dependency to a
|
||||
Maven project, add the following to your `pom.xml`:
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>ooo-repo</id>
|
||||
<url>http://threerings.github.com/maven-repo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>vilya</artifactId>
|
||||
<version>1.3</version>
|
||||
<version>1.6</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -59,8 +53,8 @@ remove the vast majority of the boilerplate above.
|
||||
|
||||
If you prefer to download pre-built binaries, those can be had here:
|
||||
|
||||
* [vilya-1.3.jar](http://threerings.github.com/maven-repo/com/threerings/vilya/1.3/vilya-1.3.jar)
|
||||
* [vilyalib-1.3.swc](http://threerings.github.com/maven-repo/com/threerings/vilyalib/1.3/vilyalib-1.3.swc)
|
||||
* [vilya-1.6.jar](http://threerings.github.com/maven-repo/com/threerings/vilya/1.6/vilya-1.6.jar)
|
||||
* [vilyalib-1.6.swc](http://threerings.github.com/maven-repo/com/threerings/vilyalib/1.6/vilyalib-a1.6.swc)
|
||||
|
||||
Distribution
|
||||
------------
|
||||
|
||||
+3
-29
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>vilya-parent</artifactId>
|
||||
<version>1.5.1</version>
|
||||
<version>1.7-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>vilyalib</artifactId>
|
||||
@@ -13,16 +13,8 @@
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>flexlib-repo</id>
|
||||
<url>http://maven.ow2.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ooo-ext-maven-repo</id>
|
||||
<url>http://ooo-maven.googlecode.com/hg/repository</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ooo-maven-repo</id>
|
||||
<url>http://threerings.github.com/maven-repo</url>
|
||||
<id>flex-mojos-repository</id>
|
||||
<url>http://repository.sonatype.org/content/groups/flexgroup</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
@@ -31,24 +23,6 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>aspirin</artifactId>
|
||||
<version>1.9</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>flexlib</groupId>
|
||||
<artifactId>flexlib-bin</artifactId>
|
||||
<version>2.4</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>as3isolib</groupId>
|
||||
<artifactId>as3isolib-fp9</artifactId>
|
||||
<version>r298</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>nenyalib</artifactId>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" standalone="yes"?>
|
||||
<project name="vilya" default="compile" basedir="." xmlns:artifact="urn:maven-artifact-ant">
|
||||
<property name="deploy.dir" location="dist"/>
|
||||
<property name="src.dir" location="src/main/java"/>
|
||||
<property name="asrc.dir" location="src/main/as"/>
|
||||
<property name="tsrc.dir" location="src/test/java"/>
|
||||
<property name="src.dir" location="core/src/main/java"/>
|
||||
<property name="asrc.dir" location="aslib/src/main/as"/>
|
||||
<property name="tsrc.dir" location="core/src/test/java"/>
|
||||
<property name="classes.dir" location="${deploy.dir}/classes"/>
|
||||
<property name="tclasses.dir" location="${deploy.dir}/test-classes"/>
|
||||
|
||||
@@ -12,9 +12,14 @@
|
||||
<import file="${user.home}/.m2/ooo-build/${ooo-build.vers}/ooo-build.xml"/>
|
||||
|
||||
<target name="-prepare" depends="-init-ooo">
|
||||
<mavendep pom="pom.xml" id="compile"/>
|
||||
<mavendep pom="etc/as-pom.xml" pathProp="aslib.path"/>
|
||||
<mavendep pom="pom.xml" id="test" scope="test"/>
|
||||
<mavendep pom="core/pom.xml" id="compile"/>
|
||||
<!-- we can't use <mavendep> here because we need to exclude our pom depends -->
|
||||
<artifact:dependencies filesetId="aslib.fileset" cacheDependencyRefs="true" type="swc"
|
||||
dependencyRefsBuildFile="${deploy.dir}/aslib-pom.dependencies">
|
||||
<pom file="aslib/pom.xml"/>
|
||||
</artifact:dependencies>
|
||||
<pathconvert pathsep="," property="aslib.path" refid="aslib.fileset"/>
|
||||
<mavendep pom="core/pom.xml" id="test" scope="test"/>
|
||||
<mkdir dir="${deploy.dir}"/>
|
||||
<path id="built.classpath">
|
||||
<path refid="compile.path"/>
|
||||
@@ -50,8 +55,8 @@
|
||||
<delete dir="${deploy.dir}/docs"/>
|
||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.jar"/></delete>
|
||||
<delete failonerror="false"><fileset dir="${deploy.dir}" includes="*.swc"/></delete>
|
||||
<cleanmavendepcache pom="pom.xml"/>
|
||||
<cleanmavendepcache pom="etc/as-pom.xml"/>
|
||||
<cleanmavendepcache pom="core/pom.xml"/>
|
||||
<cleanmavendepcache pom="aslib/pom.xml"/>
|
||||
<cleanmavendepcache id="test"/>
|
||||
</target>
|
||||
|
||||
@@ -61,12 +66,12 @@
|
||||
|
||||
<target name="compile" depends="-prepare" description="Builds the Java code.">
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<copy todir="${classes.dir}"><fileset dir="src/main/resources" includes="**"/></copy>
|
||||
<copy todir="${classes.dir}"><fileset dir="core/src/main/resources" includes="**"/></copy>
|
||||
<ooojavac version="1.5" srcdir="${src.dir}" destdir="${classes.dir}"
|
||||
classpathref="compile.path"/>
|
||||
|
||||
<mkdir dir="${tclasses.dir}"/>
|
||||
<copy todir="${tclasses.dir}"><fileset dir="src/test/resources" includes="**"/></copy>
|
||||
<copy todir="${tclasses.dir}"><fileset dir="core/src/test/resources" includes="**"/></copy>
|
||||
<ooojavac srcdir="${tsrc.dir}" destdir="${tclasses.dir}" version="1.5"
|
||||
classpathref="test.classpath"/>
|
||||
</target>
|
||||
@@ -247,19 +252,21 @@
|
||||
</target>
|
||||
|
||||
<target name="-as-install" depends="aslib" if="flexsdk.dir">
|
||||
<maveninstall file="${deploy.dir}/${ant.project.name}lib.swc" pom="etc/as-pom.xml"/>
|
||||
<maveninstall file="${deploy.dir}/${ant.project.name}lib.swc" pom="aslib/pom.xml"/>
|
||||
</target>
|
||||
<target name="install" depends="dist,-as-install"
|
||||
description="Installs artifacts to local Maven repository.">
|
||||
<maveninstall file="${deploy.dir}/${ant.project.name}.jar" pom="pom.xml"/>
|
||||
<maveninstall file="pom.xml" pom="pom.xml"/>
|
||||
<maveninstall file="${deploy.dir}/${ant.project.name}.jar" pom="core/pom.xml"/>
|
||||
</target>
|
||||
|
||||
<target name="-as-deploy" depends="aslib" if="flexsdk.dir">
|
||||
<mavendeploy file="${deploy.dir}/${ant.project.name}lib.swc" pom="etc/as-pom.xml"/>
|
||||
<mavendeploy file="${deploy.dir}/${ant.project.name}lib.swc" pom="aslib/pom.xml"/>
|
||||
</target>
|
||||
<target name="deploy" depends="dist,-as-deploy,tests,javadoc"
|
||||
description="Deploys our build artifacts to a Maven repository.">
|
||||
<mavendeploy file="${deploy.dir}/${ant.project.name}.jar" pom="pom.xml"
|
||||
<mavendeploy file="pom.xml" pom="pom.xml"/>
|
||||
<mavendeploy file="${deploy.dir}/${ant.project.name}.jar" pom="core/pom.xml"
|
||||
srcdir="${src.dir}" docdir="${deploy.dir}/docs"/>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
+18
-26
@@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>vilya-parent</artifactId>
|
||||
<version>1.5.1</version>
|
||||
<version>1.7.2-android1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>vilya</artifactId>
|
||||
@@ -16,24 +16,34 @@
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>ooo-util</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<version>1.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>narya</artifactId>
|
||||
<version>1.14</version>
|
||||
<!-- 1.22: the Epic A1 Phase 5 generated streamers reference
|
||||
com.threerings.io.GenStreamUtil (added in narya 1.21) -->
|
||||
<version>1.22</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<!-- javax.annotation.Generated on the genservice-generated sources (SOURCE retention, so
|
||||
compile-only); narya 1.17 supplied it transitively, 1.22 no longer does -->
|
||||
<groupId>javax.annotation</groupId>
|
||||
<artifactId>jsr250-api</artifactId>
|
||||
<version>1.0</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>nenya</artifactId>
|
||||
<version>1.5</version>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- optional dependencies -->
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>nenya-tools</artifactId>
|
||||
<version>1.5</version>
|
||||
<version>1.7</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -45,13 +55,13 @@
|
||||
<dependency>
|
||||
<groupId>com.samskivert</groupId>
|
||||
<artifactId>depot</artifactId>
|
||||
<version>1.6.1</version>
|
||||
<version>1.8</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javassist</groupId>
|
||||
<groupId>org.javassist</groupId>
|
||||
<artifactId>javassist</artifactId>
|
||||
<version>3.8.0.GA</version>
|
||||
<version>3.18.2-GA</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@@ -72,21 +82,6 @@
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<quiet>true</quiet>
|
||||
<show>public</show>
|
||||
<links>
|
||||
<link>http://samskivert.github.com/samskivert/apidocs/</link>
|
||||
<link>http://depot.googlecode.com/svn/apidocs/</link>
|
||||
<link>http://docs.guava-libraries.googlecode.com/git/javadoc/</link>
|
||||
<link>http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
@@ -95,9 +90,6 @@
|
||||
<includes>
|
||||
<include>com/threerings/**/*Test.java</include>
|
||||
</includes>
|
||||
<systemPropertyVariables>
|
||||
<test_dir>target/test-classes</test_dir>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
@@ -57,7 +57,7 @@ import static com.threerings.micasa.Log.log;
|
||||
* <p> Presently, the lobby registry is configured with lobbies via the server configuration. An
|
||||
* example configuration follows:
|
||||
*
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* lobby_ids = foolobby, barlobby, bazlobby
|
||||
*
|
||||
* foolobby.mgrclass = com.threerings.micasa.lobby.LobbyManager
|
||||
@@ -70,7 +70,7 @@ import static com.threerings.micasa.Log.log;
|
||||
* barlobby.ugi = <universal game identifier>
|
||||
* barlobby.name = <human readable lobby name>
|
||||
* ...
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* This information will be loaded from the MiCasa server configuration which means that it should
|
||||
* live in <code>rsrc/config/micasa/server.properties</code> somwhere in the classpath where it
|
||||
@@ -80,11 +80,11 @@ import static com.threerings.micasa.Log.log;
|
||||
* identify every type of game and also to classify it according to meaningful keywords. It is best
|
||||
* described with a few examples:
|
||||
*
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* backgammon,board,strategy
|
||||
* spades,card,partner
|
||||
* yahtzee,dice
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* As you can see, a UGI should start with an identifier uniquely identifying the type of game and
|
||||
* can be followed by a list of keywords that classify it as a member of a particular category of
|
||||
|
||||
@@ -54,4 +54,26 @@ public class ChoiceParameter extends Parameter
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "ident", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "name", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "tip", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.ChoiceParameter.class, "choices", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.ChoiceParameter.class, "start", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "ident", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "name", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "tip", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.ChoiceParameter.class, "choices", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.ChoiceParameter.class, "start", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,4 +48,28 @@ public class RangeParameter extends Parameter
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "ident", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "name", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "tip", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.RangeParameter.class, "minimum", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.RangeParameter.class, "maximum", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.RangeParameter.class, "start", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "ident", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "name", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "tip", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.RangeParameter.class, "minimum", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.RangeParameter.class, "maximum", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.RangeParameter.class, "start", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,4 +467,30 @@ public class Table
|
||||
|
||||
/** On the server, the usernames that have been banned from this table. */
|
||||
protected transient HashSet<Name> _bannedUsers;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "tableId", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "lobbyOid", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "gameOid", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "players", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "watchers", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "config", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Table.class, "tconfig", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "tableId", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "lobbyOid", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "gameOid", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "players", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "watchers", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "config", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Table.class, "tconfig", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,4 +43,24 @@ public class TableConfig extends SimpleStreamableObject
|
||||
|
||||
/** Whether the table is "private". */
|
||||
public boolean privateTable;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.TableConfig.class, "desiredPlayerCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.TableConfig.class, "minimumPlayerCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.TableConfig.class, "teamMemberIndices", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.TableConfig.class, "privateTable", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.TableConfig.class, "desiredPlayerCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.TableConfig.class, "minimumPlayerCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.TableConfig.class, "teamMemberIndices", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.TableConfig.class, "privateTable", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,4 +42,24 @@ public class ToggleParameter extends Parameter
|
||||
{
|
||||
return start;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "ident", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "name", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.Parameter.class, "tip", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.data.ToggleParameter.class, "start", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "ident", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "name", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.Parameter.class, "tip", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.data.ToggleParameter.class, "start", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +47,20 @@ public class GameAI extends SimpleStreamableObject
|
||||
this.personality = personality;
|
||||
this.skill = skill;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameAI.class, "personality", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameAI.class, "skill", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameAI.class, "personality", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameAI.class, "skill", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -238,6 +238,11 @@ public class GameObject extends PlaceObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public void sendPlayerReady () {
|
||||
manager.invoke("playerReady");
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by {@link #isActivePlayer} to determine if the supplied status is associated with an
|
||||
* active player (one that has not resigned from the game and/or left the game room).
|
||||
@@ -429,4 +434,32 @@ public class GameObject extends PlaceObject
|
||||
this.playerStatus[index] = value;
|
||||
}
|
||||
// AUTO-GENERATED: METHODS END
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "state", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "isRated", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "isPrivate", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "players", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "winners", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "sessionId", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.parlor.game.data.GameObject.class, "playerStatus", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "state", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "isRated", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "isPrivate", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "players", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "winners", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "sessionId", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.parlor.game.data.GameObject.class, "playerStatus", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ public class Rating
|
||||
* Computes a ratings adjustment for the given player, using a modified
|
||||
* version of the FIDE Chess rating system as:
|
||||
*
|
||||
* <pre>
|
||||
* <pre>{@code
|
||||
* adjustment = K(W - We)
|
||||
*
|
||||
* where:
|
||||
@@ -112,7 +112,7 @@ public class Rating
|
||||
* We = expected score (win expectancy) as determined by:
|
||||
*
|
||||
* We = 1 / (10^(dR/400) + 1)
|
||||
* </pre>
|
||||
* }</pre>
|
||||
*
|
||||
* @param W the win value the game in question (1.0 means the player won,
|
||||
* 0.5 means they drew, 0 means they lost).
|
||||
@@ -144,8 +144,8 @@ public class Rating
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if this rating is provisional (experience < 20).
|
||||
*/
|
||||
* Returns true if this rating is provisional ({@code experience < 20}).
|
||||
*/
|
||||
public boolean isProvisional ()
|
||||
{
|
||||
return (experience < 20);
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TestTileLoader implements TileSetIDBroker
|
||||
* will be used to create tilesets for all the .png files in the same
|
||||
* directory.
|
||||
*
|
||||
* @return a HashIntMap containing a TileSetId -> TileSet mapping for
|
||||
* @return a HashIntMap containing a {@code TileSetId -> TileSet} mapping for
|
||||
* all the tilesets we create.
|
||||
*/
|
||||
public HashIntMap<TileSet> loadTestTiles ()
|
||||
|
||||
@@ -59,4 +59,26 @@ public class ByteByteStringMapStat extends StringMapStat
|
||||
{
|
||||
return Byte.MAX_VALUE;
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.StringMapStat.class, "_keys", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.StringMapStat.class, "_values", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.StringMapStat.class, "_keys", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.StringMapStat.class, "_values", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,24 @@ public class ByteStringSetStat extends StringSetStat
|
||||
_values[ii] = aux.getCodeString(_type, in.readByte());
|
||||
}
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.StringSetStat.class, "_values", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.StringSetStat.class, "_values", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,4 +90,24 @@ public class IntArrayStat extends Stat
|
||||
|
||||
/** Contains the integer list value of this statistic. */
|
||||
protected int[] _value = new int[0];
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntArrayStat.class, "_value", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntArrayStat.class, "_value", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class IntSetStat extends SetStat<Integer>
|
||||
/**
|
||||
* Constructs a new IntSetStat that will store up to maxSize ints.
|
||||
*
|
||||
* @param maxSize the maximum number of ints to store in the IntSetStat. Must be <= 255.
|
||||
* @param maxSize the maximum number of ints to store in the IntSetStat. Must be {@code <= 255}.
|
||||
*/
|
||||
public IntSetStat (int maxSize)
|
||||
{
|
||||
@@ -118,4 +118,26 @@ public class IntSetStat extends SetStat<Integer>
|
||||
protected StreamableArrayIntSet _intSet = new StreamableArrayIntSet();
|
||||
|
||||
protected static final int MAX_MAX_SIZE = 255;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntSetStat.class, "_maxSize", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntSetStat.class, "_intSet", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntSetStat.class, "_maxSize", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntSetStat.class, "_intSet", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,20 @@ public class IntSetStatAdder extends StatModifier<IntSetStat>
|
||||
}
|
||||
|
||||
protected int _value;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntSetStatAdder.class, "_value", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntSetStatAdder.class, "_value", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,4 +86,24 @@ public class IntStat extends Stat
|
||||
|
||||
/** Contains the integer value of this statistic. */
|
||||
protected int _value;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntStat.class, "_value", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntStat.class, "_value", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,4 +44,20 @@ public class IntStatIncrementer extends StatModifier<IntStat>
|
||||
}
|
||||
|
||||
protected int _delta;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntStatIncrementer.class, "_delta", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntStatIncrementer.class, "_delta", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,4 +47,20 @@ public class IntStatMinimumer extends StatModifier<IntStat>
|
||||
}
|
||||
|
||||
protected int _minimum;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.IntStatMinimumer.class, "_minimum", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.IntStatMinimumer.class, "_minimum", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,24 @@ public class IntStringSetStat extends StringSetStat
|
||||
_values[ii] = aux.getCodeString(_type, in.readInt());
|
||||
}
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.StringSetStat.class, "_values", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.StringSetStat.class, "_values", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,4 +80,20 @@ public class MaxIntStat extends IntStat
|
||||
|
||||
/** The largest value ever accumulated to this stat. */
|
||||
protected int _maxValue;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.MaxIntStat.class, "_maxValue", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.MaxIntStat.class, "_maxValue", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,4 +72,20 @@ public class MaxValueIntStat extends IntStat
|
||||
|
||||
/** The largest value that this stat has been assigned. */
|
||||
protected int _maxValue;
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
super.readObject(ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.MaxValueIntStat.class, "_maxValue", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
super.writeObject(out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.MaxValueIntStat.class, "_maxValue", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,4 +50,24 @@ public class ShortStringSetStat extends StringSetStat
|
||||
_values[ii] = aux.getCodeString(_type, in.readShort());
|
||||
}
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void readObject (com.threerings.io.ObjectInputStream ins)
|
||||
throws java.io.IOException, java.lang.ClassNotFoundException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_type", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modified", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.Stat.class, "_modCount", this, ins);
|
||||
com.threerings.io.GenStreamUtil.readField(com.threerings.stats.data.StringSetStat.class, "_values", this, ins);
|
||||
}
|
||||
|
||||
// from interface Streamable
|
||||
public void writeObject (com.threerings.io.ObjectOutputStream out)
|
||||
throws java.io.IOException
|
||||
{
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_type", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modified", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.Stat.class, "_modCount", this, out);
|
||||
com.threerings.io.GenStreamUtil.writeField(com.threerings.stats.data.StringSetStat.class, "_values", this, out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public abstract class StatModifier<T extends Stat>
|
||||
throws IOException
|
||||
{
|
||||
out.writeInt(_type.code());
|
||||
out.defaultWriteObject();
|
||||
|
||||
}
|
||||
|
||||
/** Reads our custom streamable fields. */
|
||||
@@ -69,7 +69,7 @@ public abstract class StatModifier<T extends Stat>
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
_type = Stat.getType(in.readInt());
|
||||
in.defaultReadObject();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -22,9 +22,12 @@
|
||||
package com.threerings.whirled.spot.data;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.samskivert.util.StringUtil;
|
||||
|
||||
import com.threerings.io.ObjectInputStream;
|
||||
import com.threerings.io.ObjectOutputStream;
|
||||
import com.threerings.util.ActionScript;
|
||||
|
||||
import com.threerings.presents.dobj.DSet;
|
||||
@@ -48,6 +51,31 @@ public class Cluster extends Rectangle
|
||||
return _key;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes our streamable fields. This is needed because we can no longer reflectively access the
|
||||
* internals of java.awt.Rectangle.
|
||||
*/
|
||||
public void writeObject (ObjectOutputStream out)
|
||||
throws IOException
|
||||
{
|
||||
out.writeInt(this.x);
|
||||
out.writeInt(this.y);
|
||||
out.writeInt(this.width);
|
||||
out.writeInt(this.height);
|
||||
out.writeInt(this.clusterOid);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads our streamable fields. This is needed because we can no longer reflectively access the
|
||||
* internals of java.awt.Rectangle.
|
||||
*/
|
||||
public void readObject (ObjectInputStream in)
|
||||
throws IOException, ClassNotFoundException
|
||||
{
|
||||
this.setBounds(in.readInt(), in.readInt(), in.readInt(), in.readInt());
|
||||
this.clusterOid = in.readInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ActionScript(omit=true)
|
||||
public boolean equals (Object other)
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.threerings.presents.dobj.DObject;
|
||||
import com.threerings.presents.dobj.OidList;
|
||||
|
||||
import com.threerings.crowd.chat.data.SpeakObject;
|
||||
import com.threerings.crowd.chat.data.UserMessage;
|
||||
|
||||
/**
|
||||
* Used to dispatch chat in clusters.
|
||||
@@ -48,10 +49,16 @@ public class ClusterObject extends DObject
|
||||
public void applyToListeners (ListenerOp op)
|
||||
{
|
||||
for (int ii = 0, ll = occupants.size(); ii < ll; ii++) {
|
||||
op.apply(occupants.get(ii));
|
||||
op.apply(this, occupants.get(ii));
|
||||
}
|
||||
}
|
||||
|
||||
// from SpeakObject
|
||||
public String getChatIdentifier (UserMessage msg)
|
||||
{
|
||||
return SpeakObject.DEFAULT_IDENTIFIER;
|
||||
}
|
||||
|
||||
// AUTO-GENERATED: METHODS START
|
||||
/**
|
||||
* Requests that <code>oid</code> be added to the <code>occupants</code>
|
||||
|
||||
@@ -95,9 +95,9 @@
|
||||
providing top-down 2D display of its scenes. <br>
|
||||
</p>
|
||||
|
||||
<center>
|
||||
<img align="center" src="images/scene.png" alt="Example scene image">
|
||||
</center>
|
||||
<p>
|
||||
<img src="images/scene.png" alt="Example scene image">
|
||||
</p>
|
||||
|
||||
<p> The arrows would, of course, not be rendered but are shown to
|
||||
indicate the presence of locations (and portals) and their
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.threerings.whirled.tools.xml;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
@@ -90,15 +91,23 @@ public class SceneParser
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the XML file at the specified path into a scene model
|
||||
* instance.
|
||||
* Parses the XML file at the specified path into a scene model instance.
|
||||
*/
|
||||
public SceneModel parseScene (String path)
|
||||
throws IOException, SAXException
|
||||
{
|
||||
return parseScene(new FileInputStream(path));
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the XML file provided by {@code scene} into a scene model instance.
|
||||
*/
|
||||
public SceneModel parseScene (InputStream scene)
|
||||
throws IOException, SAXException
|
||||
{
|
||||
_model = null;
|
||||
_digester.push(this);
|
||||
_digester.parse(new FileInputStream(path));
|
||||
_digester.parse(scene);
|
||||
return _model;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@ package com.threerings.whirled.spot.tools.xml;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.samskivert.test.TestUtil;
|
||||
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
import com.threerings.whirled.spot.data.Location;
|
||||
import com.threerings.whirled.tools.xml.SceneParser;
|
||||
@@ -50,8 +48,8 @@ public class SpotSceneParserTest extends TestCase
|
||||
return new StageLocation(); // breaks package, but ok
|
||||
}
|
||||
});
|
||||
String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
|
||||
SceneModel scene = parser.parseScene(tspath);
|
||||
SceneModel scene = parser.parseScene(
|
||||
getClass().getClassLoader().getResourceAsStream(TEST_SCENE_PATH));
|
||||
System.out.println("Parsed " + scene + ".");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -24,8 +24,6 @@ package com.threerings.whirled.tools.xml;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import com.samskivert.test.TestUtil;
|
||||
|
||||
import com.threerings.whirled.data.SceneModel;
|
||||
|
||||
public class SceneParserTest extends TestCase
|
||||
@@ -40,8 +38,8 @@ public class SceneParserTest extends TestCase
|
||||
{
|
||||
try {
|
||||
SceneParser parser = new SceneParser("scene");
|
||||
String tspath = TestUtil.getResourcePath(TEST_SCENE_PATH);
|
||||
SceneModel scene = parser.parseScene(tspath);
|
||||
SceneModel scene = parser.parseScene(
|
||||
getClass().getClassLoader().getResourceAsStream(TEST_SCENE_PATH));
|
||||
System.out.println("Parsed " + scene + ".");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>vilyalib</artifactId>
|
||||
<packaging>swc</packaging>
|
||||
<version>1.5-SNAPSHOT</version>
|
||||
|
||||
<name>Vilya for ActionScript</name>
|
||||
<description>Facilities for making networked multiplayer games.</description>
|
||||
<url>http://code.google.com/p/vilya/</url>
|
||||
<issueManagement>
|
||||
<url>http://code.google.com/p/vilya/issues/list</url>
|
||||
</issueManagement>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>flexlib-repo</id>
|
||||
<url>http://maven.ow2.org/maven2</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>ooo-maven-repo</id>
|
||||
<url>http://ooo-maven.googlecode.com/hg/repository</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>naryalib</artifactId>
|
||||
<version>1.12.7</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>nenyalib</artifactId>
|
||||
<version>1.4.2</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>as3isolib</groupId>
|
||||
<artifactId>as3isolib-fp9</artifactId>
|
||||
<version>r298</version>
|
||||
<type>swc</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,28 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>7</version>
|
||||
</parent>
|
||||
|
||||
<groupId>com.threerings</groupId>
|
||||
<artifactId>vilya-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.5.1</version>
|
||||
<version>1.7.2-android1</version>
|
||||
|
||||
<name>Vilya</name>
|
||||
<description>Facilities for making networked multiplayer games.</description>
|
||||
<url>http://github.com/threerings/vilya/</url>
|
||||
<url>https://github.com/threerings/vilya/</url>
|
||||
<issueManagement>
|
||||
<url>http://github.com/threerings/vilya/issues</url>
|
||||
<url>https://github.com/threerings/vilya/issues</url>
|
||||
</issueManagement>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU Lesser General Public License (LGPL), Version 2.1</name>
|
||||
<url>http://www.fsf.org/licensing/licenses/lgpl.txt</url>
|
||||
<url>https://www.fsf.org/licensing/licenses/lgpl.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
@@ -38,20 +33,15 @@
|
||||
<scm>
|
||||
<connection>scm:git:git://github.com/threerings/vilya.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:threerings/vilya.git</developerConnection>
|
||||
<url>http://github.com/threerings/vilya/</url>
|
||||
<url>https://github.com/threerings/vilya/</url>
|
||||
<!-- fork release: built from claridtimo/vilya branch epicA1-streamers (regenerated
|
||||
flatten streamers + narya 1.22). New coordinates per the 2026-07-06 incident rule:
|
||||
never republish a fork lib under an existing version. -->
|
||||
<tag>vilya-1.7.2-android1</tag>
|
||||
</scm>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>ooo-repo</id>
|
||||
<url>http://threerings.github.com/maven-repo</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<modules>
|
||||
<module>core</module>
|
||||
<!--<module>tools</module>-->
|
||||
<module>aslib</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
@@ -59,15 +49,17 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<version>3.13.0</version>
|
||||
<configuration>
|
||||
<source>1.5</source>
|
||||
<target>1.5</target>
|
||||
<release>10</release>
|
||||
<fork>true</fork>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<!-- yes, those quoted spaces are a workaround sanctioned by the Maven idiocracy -->
|
||||
<compilerArgument>-Xlint" "-Xlint:-serial" "-Xlint:-path</compilerArgument>
|
||||
<compilerArgs>
|
||||
<arg>-Xlint</arg>
|
||||
<arg>-Xlint:-serial</arg>
|
||||
<arg>-Xlint:-path</arg>
|
||||
</compilerArgs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
@@ -83,6 +75,16 @@
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<configuration>
|
||||
<quiet>true</quiet>
|
||||
<show>public</show>
|
||||
<additionalparam>-Xdoclint:all -Xdoclint:-missing</additionalparam>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
@@ -93,52 +95,105 @@
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.5</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.sonatype.central</groupId>
|
||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||
<version>0.8.0</version>
|
||||
<extensions>true</extensions>
|
||||
<configuration>
|
||||
<publishingServerId>central</publishingServerId>
|
||||
<autoPublish>true</autoPublish>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- Tell m2eclipse to ignore the enforcer plugin from our parent. Otherwise it warns
|
||||
about not being able to run it. -->
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<versionRange>[1.0,)</versionRange>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<profiles>
|
||||
<!-- build with mvn -Paslib to build the ActionScript code; the Maven ActionScript plugins
|
||||
are old and broken, so I've disabled this by default -->
|
||||
<profile>
|
||||
<id>release-sign-artifacts</id>
|
||||
<id>aslib</id>
|
||||
<modules><module>aslib</module></modules>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>eclipse</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>m2e.version</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!-- Tell m2eclipse to ignore the enforcer plugin from our parent. Otherwise it warns
|
||||
about not being able to run it. -->
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<versionRange>[1.0,)</versionRange>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>release-extras</id>
|
||||
<activation>
|
||||
<property><name>performRelease</name><value>true</value></property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar-no-fork</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-javadocs</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.5</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
@@ -155,5 +210,23 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<!-- For deploying to a local place -->
|
||||
<profile>
|
||||
<id>deploy-local</id>
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>deploy-local-dir</id>
|
||||
<name>Local Maven repository</name>
|
||||
<url>file://${deploy.local.dir}</url>
|
||||
</repository>
|
||||
<snapshotRepository>
|
||||
<id>deploy-local-dir</id>
|
||||
<name>Local Maven repository</name>
|
||||
<url>file://${deploy.local.dir}</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user