-
Notifications
You must be signed in to change notification settings - Fork 2
/
portals.lua
109 lines (106 loc) · 2.7 KB
/
portals.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
--portals
data:extend(
{
{
type = "container", --so it cant be rotated
name = "portal", --this is what gets placed by the item
inventory_size = 1,
flags = {"player-creation", "not-deconstructable"},
selectable_in_game = false,
minable = {mining_time = 5, result = nil},
max_health = 1,
picture =
{
filename = "__Portals__/graphics/entity_portal.png",
priority = "high",
width = 76,
height = 128,
scale = 0.5,
},
collision_box = {{0, -0.6}, {0, 0.6}},
collision_mask = { "item-layer", "object-layer", "water-tile"},
selection_box = {{-0.5, -0.9}, {0.5, 0.9}},
tile_width = 1,
tile_height = 2,
},
{
type = "simple-entity-with-owner",
name = "portal-a",
flags = {"player-creation", "not-blueprintable", "not-deconstructable"},
map_color = {r=1, g=0.5, b=0},
placeable_by = {item="portal-gun", count= 1},
minable = {mining_time = 0.7, result = nil},
max_health = 20,
collision_box = {{0, -0.6}, {0, 0.6}},
collision_mask = { "item-layer", "object-layer", "water-tile"},
selection_box = {{-0.5, -0.9}, {0.5, 0.9}},
random_animation_offset = false,
animations =
{
{
filename = "__Portals__/graphics/entity_portal-a.png",
priority = "high",
width = 76,
height = 128,
frame_count = 32,
line_length = 8,
animation_speed = 0.5,
scale = 0.5,
}
},
working_sound =
{
sound = { filename = "__Portals__/sounds/portal_ambient_loop1.ogg" },
volume = 0.1,
audible_distance_modifier = 0.4,
probability = 1
},
render_layer = "floor",
tile_width = 1,
tile_height = 2,
},
{
type = "simple-entity-with-owner",
name = "portal-b",
flags = {"player-creation", "not-blueprintable", "not-deconstructable"},
map_color = {r=0.5, g=0.5, b=1},
placeable_by = {item="portal-gun", count= 1},
minable = {mining_time = 0.7, result = nil},
max_health = 20,
collision_box = {{0, -0.6}, {0, 0.6}},
collision_mask = { "item-layer", "object-layer", "water-tile"},
selection_box = {{-0.5, -0.9}, {0.5, 0.9}},
random_animation_offset = false,
animations =
{
{
filename = "__Portals__/graphics/entity_portal-b.png",
priority = "high",
width = 76,
height = 128,
frame_count = 32,
line_length = 8,
animation_speed = 0.5,
scale = 0.5,
}
},
working_sound =
{
sound = { filename = "__Portals__/sounds/portal_ambient_loop1.ogg" },
volume = 0.1,
audible_distance_modifier = 0.4,
probability = 1
},
render_layer = "floor",
tile_width = 1,
tile_height = 2,
},
--just a renamed flying-text so that when my mod gets removed the text also gets removed
{
type = "flying-text",
name = "portal-label",
flags = {"not-on-map", "placeable-off-grid"},
time_to_live = 4294967295,
speed = 0
}
})