Games-Construder
view release on metacpan or search on metacpan
lib/Games/Construder/Server/Objects.pm view on Meta::CPAN
# Games::Construder - A 3D Game written in Perl with an infinite and modifiable world.
# Copyright (C) 2011 Robin Redeker
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
package Games::Construder::Server::Objects;
use common::sense;
use Games::Construder::Server::PCB;
use Games::Construder::Server::World;
use Games::Construder::Vector;
use Games::Construder::Logging;
use Games::Construder;
use Scalar::Util qw/weaken/;
=head1 NAME
Games::Construder::Server::Objects - Implementation of Object Type specific behaviour
=over 4
=cut
our %TYPES = (
31 => \&ia_pattern_storage,
34 => \&ia_message_beacon,
36 => \&ia_construction_pad,
45 => \&ia_vaporizer,
46 => \&ia_vaporizer,
47 => \&ia_vaporizer,
48 => \&ia_vaporizer,
62 => \&ia_teleporter,
51 => \&ia_auto,
71 => \&ia_jumper,
72 => \&ia_jumper,
73 => \&ia_jumper,
74 => \&ia_jumper,
);
our %TYPES_INSTANCIATE = (
1 => \&in_materialization,
31 => \&in_pattern_storage,
34 => \&in_message_beacon,
45 => \&in_vaporizer,
46 => \&in_vaporizer,
47 => \&in_vaporizer,
48 => \&in_vaporizer,
50 => \&in_drone,
51 => \&in_auto,
62 => \&in_teleporter,
70 => \&in_mat_upgrade,
71 => \&in_jumper,
72 => \&in_jumper,
73 => \&in_jumper,
74 => \&in_jumper,
500 => \&in_trophy,
501 => \&in_trophy,
502 => \&in_trophy,
503 => \&in_trophy,
504 => \&in_trophy,
505 => \&in_trophy,
);
our %TYPES_TIMESENSITIVE = (
1 => \&tmr_materialization,
31 => \&tmr_pattern_storage,
45 => \&tmr_vaporizer,
46 => \&tmr_vaporizer,
47 => \&tmr_vaporizer,
48 => \&tmr_vaporizer,
50 => \&tmr_drone,
51 => \&tmr_auto,
71 => \&tmr_jumper,
72 => \&tmr_jumper,
( run in 1.157 second using v1.01-cache-2.11-cpan-39bf76dae61 )