forked from yarrrthegame/publicconfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.lua
91 lines (79 loc) · 3.84 KB
/
config.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
local yarrrconfig = require( "yarrrconfig" )
function create_duck( duck )
yarrrconfig.create_ship(
duck,
{
Tile.new( TileCoordinate.new( -2, 1 ), TileCoordinate.new( 1, -2 ) ),
Tile.new( TileCoordinate.new( 2, 0 ), TileCoordinate.new( 3, 0 ) ),
Tile.new( TileCoordinate.new( 0, -3 ), TileCoordinate.new( 0, -3 ) ),
Tile.new( TileCoordinate.new( 0, -4 ), TileCoordinate.new( 1, -4 ) ),
},
{
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 2, 0 ), degrees( 90 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 2, 0 ), degrees( 270 ) ),
Canon.new( TileCoordinate.new( 2, 1 ), degrees( 0 ) ),
Canon.new( TileCoordinate.new( 2, -1 ), degrees( 0 ) ),
})
end
register_object_factory( "duck", create_duck )
function create_basic_ship( ship )
yarrrconfig.create_ship(
ship,
{
Tile.new( TileCoordinate.new( -1, 0 ), TileCoordinate.new( 2, 0 ) ),
Tile.new( TileCoordinate.new( 0, 1 ), TileCoordinate.new( 0, 1 ) ),
Tile.new( TileCoordinate.new( 0, -1 ), TileCoordinate.new( 0, -1 ) )
},
{
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 2, 0 ), degrees( 90 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 2, 0 ), degrees( 270 ) ),
Canon.new( TileCoordinate.new( 2, 0 ), degrees( 0 ) ),
})
end
register_object_factory( "ship", create_basic_ship )
function create_interceptor( interceptor )
yarrrconfig.create_ship(
interceptor,
{
Tile.new( TileCoordinate.new( -1, 0 ), TileCoordinate.new( 4, 0 ) ),
Tile.new( TileCoordinate.new( 0, 2 ), TileCoordinate.new( 0, 1 ) ),
Tile.new( TileCoordinate.new( 1, 1 ), TileCoordinate.new( 1, 1 ) ),
Tile.new( TileCoordinate.new( 0, -1 ), TileCoordinate.new( 0, -2 ) ),
Tile.new( TileCoordinate.new( 1, -1 ), TileCoordinate.new( 1, -1 ) ),
},
{
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( main_thruster, TileCoordinate.new( 0, 1 ), degrees( 180 ) ),
Thruster.new( main_thruster, TileCoordinate.new( 0, -1 ), degrees( 180 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 4, 0 ), degrees( 90 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 4, 0 ), degrees( 90 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 3, 0 ), degrees( 90 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 4, 0 ), degrees( 270 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 4, 0 ), degrees( 270 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 3, 0 ), degrees( 270 ) ),
Canon.new( TileCoordinate.new( 1, -1 ), degrees( 0 ) ),
Canon.new( TileCoordinate.new( 2, 0 ), degrees( 0 ) ),
Canon.new( TileCoordinate.new( 1, 1 ), degrees( 0 ) ),
})
end
register_object_factory( "interceptor", create_interceptor )
function create_tremulous_ship( tremulous_ship )
yarrrconfig.create_ship(
tremulous_ship,
{
Tile.new( TileCoordinate.new( -1, 0 ), TileCoordinate.new( 2, 0 ) ),
Tile.new( TileCoordinate.new( 0, 1 ), TileCoordinate.new( 0, 1 ) ),
Tile.new( TileCoordinate.new( 0, -1 ), TileCoordinate.new( 0, -1 ) )
},
{
Thruster.new( main_thruster, TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
Thruster.new( port_thruster, TileCoordinate.new( 2, 0 ), degrees( 90 ) ),
Thruster.new( starboard_thruster, TileCoordinate.new( 2, 0 ), degrees( 270 ) ),
Canon.new( TileCoordinate.new( -1, 0 ), degrees( 180 ) ),
})
end
register_object_factory( "tremulous", create_tremulous_ship )