Group
Extension

Matches 10

Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder.pm ( view source; MetaCPAN )
 with this program.  If not, see <http://www.gnu.org/licenses/>.
#
package Games::Construder;
use JSON;
use common::sense;
use Time::HiRes qw/time/;
use Games::Construder::Logging;

require Exporter;
        # show_region_sectors
         my %sectors;

         my $wg = JSON->new->relaxed->decode (_get_file ("res/world_gen.json"));
         for my $type (keys %{$wg->{sector_types}}) {
            
ion_sector <sector type>
         my ($type) = @arg;
         my $wg = JSON->new->relaxed->decode (_get_file ("res/world_gen.json"));
         my $s = $wg->{sector_types}->{$type};
         my $r = $s
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Server/Objects.pm ( view source; MetaCPAN )
s, $entity, $type, $dt) = @_;

   $entity->{rest_time} -= $dt;
   #d# warn "ENTITIY MAT DONE: " . JSON->new->pretty->encode ($entity) . "\n";

   return unless $entity->{rest_time} <= 0;

   my $handl
pattern (@$POS, 0);
   if ($a) {
      ctr_log (devel => "construction pad pattern at @$POS: %s", JSON->new->encode ($a));

      my $obj = $Games::Construder::Server::RES->get_object_by_pattern ($a);
tity->{fail_chance}) {
            ctr_log (debug => "Jumper (failed) values: %s",
               JSON->new->encode ($entity));
            $pl->msg (1, "Jumper malfunction. Please retry.");
         
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Server.pm ( view source; MetaCPAN )
struder::Server;
use common::sense;
use AnyEvent;
use AnyEvent::Handle;
use AnyEvent::Socket;
use JSON;

use Games::Construder::Protocol;
use Games::Construder::Server::Resources;
use Games::Construde
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Client/Resources.pm ( view source; MetaCPAN )
construder"
            : File::Spec->tmpdir . "/construder";

our $CLCONFIG = "construder_client.json";

sub new {
   my $this  = shift;
   my $class = ref ($this) || $this;
   my $self  = { @_ };
  


sub load_config {
   my ($self) = @_;

   if (-e "$VARDIR/$CLCONFIG") {
      $self->{config} = JSON->new->pretty->utf8->decode (_get_file ("$VARDIR/$CLCONFIG"));

   } else {
      $self->{config} 
        ambient_light => 0.2,
      };
   }
}

sub save_config {
   my ($self) = @_;
   my $cfg = JSON->new->pretty->utf8->encode ($self->{config} ||= {});
   my $file = $VARDIR . "/" . $CLCONFIG;
   
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Protocol.pm ( view source; MetaCPAN )
see <http://www.gnu.org/licenses/>.
#
package Games::Construder::Protocol;
use common::sense;
use JSON;

require Exporter;
use POSIX qw/floor/;
our @ISA = qw/Exporter/;
our @EXPORT = qw/
   packet2dat


Games::Construder::Protocol - Client-Server Protocol Utility Functions

=over 4

=cut

my $JS = JSON->new;

sub packet2data {
   my ($header, $body) = @_;
   my $hdr_data = $JS->encode ($header);
  
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Client/UI.pm ( view source; MetaCPAN )
 common::sense;
use SDL;
use SDL::Surface;
use SDL::Video;
use SDL::TTF;
use OpenGL qw(:all);
use JSON;
use Games::Construder::Vector;
use Games::Construder;
use File::ShareDir::PAR;
use Games::Constr
ntries}    = [];

   if ($gui_desc && $gui_desc->{layout}) {
      $self->{layout} = decode_json (encode_json ($gui_desc->{layout}));
   }

   my $layout = $self->{layout};

   $self->{active_elements
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Server/World.pm ( view source; MetaCPAN )
r;
use Time::HiRes qw/time/;
use Carp qw/confess/;
use Compress::LZF qw/decompress compress/;
use JSON;
use Storable qw/dclone/;
use Games::Construder::Logging;

require Exporter;
our @ISA = qw/Export
n bytes, but only got ".length ($data)."!");
         return -1;
      }

      my $meta = eval { JSON->new->relaxed->utf8->decode ($metadata) };
      if ($@) {
         ctr_log (error => "map sector
->{tmp} = {}; # don't store entity temporary data (might contain objects)
   }
   my $meta_data = JSON->new->utf8->pretty->encode ($meta || {});

   my $data = join "", @chunks;
   my $filedata = comp
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Server/Resources.pm ( view source; MetaCPAN )
/licenses/>.
#
package Games::Construder::Server::Resources;
use common::sense;
use AnyEvent;
use JSON;
use Digest::MD5 qw/md5_base64/;
use Games::Construder::Server::Objects;
use File::ShareDir::PAR;
} =
      JSON->new->relaxed->utf8->decode (my $f = _get_shared_file ("content.json"));

   my $stypes = $self->{content}->{sector_types}
     or die "No sector types defined in content.json!\n";
   f
ry {
   my ($self) = @_;
   my $shpdb = $self->{txt_db}->{ship};
   #d#print "TEXT TREE FROM: " . JSON->new->pretty->encode ($shpdb) . "\n";

   my %nodes;

   for (keys %$shpdb) {
      my $con = del
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Server/Player.pm ( view source; MetaCPAN )
/$self->{name}.json";
   return unless -e "$file";

   if (open my $plf, "<", $file) {
      binmode $plf, ":raw";
      my $cont = do { local $/; <$plf> };
      my $data = eval { JSON->new->relaxed-
elf) = @_;
   my $cont = JSON->new->pretty->utf8->encode ($self->{data});
   my $pld = $Games::Construder::Server::Resources::PLAYERDIR;
   my $file = "$pld/$self->{name}.json";

   if (open my $plf, 
::RES->get_assignment_for_score ($self->{data}->{score});

   #print "ASSIGNMENT BASE VALUES: " . JSON->new->pretty->encode ([
   #   $desc, $size, $material_map, $distance, $time, $score
   #]) . "\n
Games-Construder ( E/EL/ELMEX/Games-Construder-0.95.tar.gz, ELMEX, 2011; MetaCPAN )
Games-Construder/lib/Games/Construder/Client.pm ( view source; MetaCPAN )
ave_config;

   } elsif ($hdr->{cmd} eq 'transfer_end') {
      $self->{front}->msg;
      #print JSON->new->pretty->encode ($self->{front}->{res}->{resource});
      $self->{res}->post_proc;
      ct

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.