Example #1
0
  public Base(Session s) throws Exception {
    s.cacheInstance(this);
    this.world = s.world();
    commerce.loadState(s);
    credits = s.loadFloat();

    ruler = (Actor) s.loadObject();
    s.loadObjects(missions);

    communitySpirit = s.loadFloat();
    alertLevel = s.loadFloat();
    crimeLevel = s.loadFloat();
    averageMood = s.loadFloat();
    for (int n = s.loadInt(); n-- > 0; ) {
      final Relation r = Relation.loadFrom(s);
      baseRelations.put(r.subject, r);
    }

    paving = new Paving(world);
    paving.loadState(s);

    dangerMap = new DangerMap(world, this);
    dangerMap.loadState(s);
    intelMap.loadState(s);
  }
Example #2
0
 /** Dealing with admin functions- */
 public void setRelation(Base base, float attitude) {
   baseRelations.put(base, new Relation(this, base, attitude, -1));
 }