Update upstream source from tag 'upstream/0.4.11'
Update to upstream version '0.4.11'
with Debian dir 0842f9dc36d0f555de549a62ad471984dc518edc
Julien Puydt
6 years ago
66 | 66 | |
67 | 67 | -- Enable punch damage effects. |
68 | 68 | armor_punch_damage = true |
69 | ||
70 | -- Enable migration of old armor inventories | |
71 | armor_migrate_old_inventory = true | |
69 | 72 | |
70 | 73 | API |
71 | 74 | --- |
71 | 71 | on_damage = {}, |
72 | 72 | on_destroy = {}, |
73 | 73 | }, |
74 | version = "0.4.10", | |
74 | migrate_old_inventory = true, | |
75 | version = "0.4.11", | |
75 | 76 | } |
76 | 77 | |
77 | 78 | armor.config = { |
173 | 174 | end |
174 | 175 | |
175 | 176 | armor.set_player_armor = function(self, player) |
176 | local name, player_inv = self:get_valid_player(player, "[set_player_armor]") | |
177 | local name, armor_inv = self:get_valid_player(player, "[set_player_armor]") | |
177 | 178 | if not name then |
178 | 179 | return |
179 | 180 | end |
198 | 199 | change[group] = 1 |
199 | 200 | levels[group] = 0 |
200 | 201 | end |
201 | local list = player_inv:get_list("armor") | |
202 | local list = armor_inv:get_list("armor") | |
202 | 203 | if type(list) ~= "table" then |
203 | 204 | return |
204 | 205 | end |
217 | 218 | local level = def.groups["armor_"..element] |
218 | 219 | levels["fleshy"] = levels["fleshy"] + level |
219 | 220 | end |
221 | break | |
220 | 222 | end |
221 | 223 | -- DEPRECATED, use armor_groups instead |
222 | 224 | if def.groups["armor_radiation"] and levels["radiation"] then |
295 | 297 | end |
296 | 298 | |
297 | 299 | armor.punch = function(self, player, hitter, time_from_last_punch, tool_capabilities) |
298 | local name, player_inv = self:get_valid_player(player, "[punch]") | |
300 | local name, armor_inv = self:get_valid_player(player, "[punch]") | |
299 | 301 | if not name then |
300 | 302 | return |
301 | 303 | end |
303 | 305 | local count = 0 |
304 | 306 | local recip = true |
305 | 307 | local default_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1} |
306 | local list = player_inv:get_list("armor") | |
308 | local list = armor_inv:get_list("armor") | |
307 | 309 | for i, stack in pairs(list) do |
308 | 310 | if stack:get_count() == 1 then |
309 | 311 | local name = stack:get_name() |
418 | 420 | for _, attr in pairs(self.attributes) do |
419 | 421 | formspec = formspec:gsub("armor_attr_"..attr, armor.def[name][attr]) |
420 | 422 | end |
421 | for _, group in pairs(self.attributes) do | |
422 | formspec = formspec:gsub("armor_group_"..group, armor.def[name][group]) | |
423 | for group, _ in pairs(self.registered_groups) do | |
424 | formspec = formspec:gsub("armor_group_"..group, | |
425 | armor.def[name].groups[group]) | |
423 | 426 | end |
424 | 427 | return formspec |
428 | end | |
429 | ||
430 | armor.serialize_inventory_list = function(self, list) | |
431 | local list_table = {} | |
432 | for _, stack in ipairs(list) do | |
433 | table.insert(list_table, stack:to_string()) | |
434 | end | |
435 | return minetest.serialize(list_table) | |
436 | end | |
437 | ||
438 | armor.deserialize_inventory_list = function(self, list_string) | |
439 | local list_table = minetest.deserialize(list_string) | |
440 | local list = {} | |
441 | for _, stack in ipairs(list_table or {}) do | |
442 | table.insert(list, ItemStack(stack)) | |
443 | end | |
444 | return list | |
445 | end | |
446 | ||
447 | armor.load_armor_inventory = function(self, player) | |
448 | local msg = "[load_armor_inventory]" | |
449 | local name = player:get_player_name() | |
450 | if not name then | |
451 | minetest.log("warning", S("3d_armor: Player name is nil @1", msg)) | |
452 | return | |
453 | end | |
454 | local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"}) | |
455 | if not armor_inv then | |
456 | minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg)) | |
457 | return | |
458 | end | |
459 | local armor_list_string = player:get_attribute("3d_armor_inventory") | |
460 | if armor_list_string then | |
461 | armor_inv:set_list("armor", self:deserialize_inventory_list(armor_list_string)) | |
462 | return true | |
463 | end | |
464 | end | |
465 | ||
466 | armor.save_armor_inventory = function(self, player) | |
467 | local msg = "[save_armor_inventory]" | |
468 | local name = player:get_player_name() | |
469 | if not name then | |
470 | minetest.log("warning", S("3d_armor: Player name is nil @1", msg)) | |
471 | return | |
472 | end | |
473 | local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"}) | |
474 | if not armor_inv then | |
475 | minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg)) | |
476 | return | |
477 | end | |
478 | player:set_attribute("3d_armor_inventory", self:serialize_inventory_list(armor_inv:get_list("armor"))) | |
425 | 479 | end |
426 | 480 | |
427 | 481 | armor.update_inventory = function(self, player) |
435 | 489 | minetest.log("warning", S("3d_armor: Player name is nil @1", msg)) |
436 | 490 | return |
437 | 491 | end |
438 | local player_inv = player:get_inventory() | |
439 | 492 | local armor_inv = minetest.get_inventory({type="detached", name=name.."_armor"}) |
440 | if not player_inv then | |
441 | minetest.log("warning", S("3d_armor: Player inventory is nil @1", msg)) | |
442 | return | |
443 | elseif not armor_inv then | |
493 | if not armor_inv then | |
444 | 494 | minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg)) |
445 | 495 | return |
446 | 496 | end |
447 | player_inv:set_stack("armor", i, stack) | |
448 | 497 | armor_inv:set_stack("armor", i, stack) |
498 | self:save_armor_inventory(player) | |
449 | 499 | end |
450 | 500 | |
451 | 501 | armor.get_valid_player = function(self, player, msg) |
459 | 509 | minetest.log("warning", S("3d_armor: Player name is nil @1", msg)) |
460 | 510 | return |
461 | 511 | end |
462 | local inv = player:get_inventory() | |
512 | local inv = minetest.get_inventory({type="detached", name=name.."_armor"}) | |
463 | 513 | if not inv then |
464 | minetest.log("warning", S("3d_armor: Player inventory is nil @1", msg)) | |
514 | minetest.log("warning", S("3d_armor: Detached armor inventory is nil @1", msg)) | |
465 | 515 | return |
466 | 516 | end |
467 | 517 | return name, inv |
110 | 110 | |
111 | 111 | local function init_player_armor(player) |
112 | 112 | local name = player:get_player_name() |
113 | local player_inv = player:get_inventory() | |
114 | 113 | local pos = player:getpos() |
115 | if not name or not player_inv or not pos then | |
114 | if not name or not pos then | |
116 | 115 | return false |
117 | 116 | end |
118 | 117 | local armor_inv = minetest.create_detached_inventory(name.."_armor", { |
119 | 118 | on_put = function(inv, listname, index, stack, player) |
120 | player:get_inventory():set_stack(listname, index, stack) | |
119 | armor:save_armor_inventory(player) | |
121 | 120 | armor:run_callbacks("on_equip", player, index, stack) |
122 | 121 | armor:set_player_armor(player) |
123 | 122 | end, |
124 | 123 | on_take = function(inv, listname, index, stack, player) |
125 | player:get_inventory():set_stack(listname, index, nil) | |
124 | armor:save_armor_inventory(player) | |
126 | 125 | armor:run_callbacks("on_unequip", player, index, stack) |
127 | 126 | armor:set_player_armor(player) |
128 | 127 | end, |
129 | 128 | on_move = function(inv, from_list, from_index, to_list, to_index, count, player) |
130 | local plaver_inv = player:get_inventory() | |
131 | local stack = inv:get_stack(to_list, to_index) | |
132 | player_inv:set_stack(to_list, to_index, stack) | |
133 | player_inv:set_stack(from_list, from_index, nil) | |
129 | armor:save_armor_inventory(player) | |
134 | 130 | armor:set_player_armor(player) |
135 | 131 | end, |
136 | 132 | allow_put = function(inv, listname, index, stack, player) |
157 | 153 | end, |
158 | 154 | }, name) |
159 | 155 | armor_inv:set_size("armor", 6) |
160 | player_inv:set_size("armor", 6) | |
156 | if not armor:load_armor_inventory(player) and armor.migrate_old_inventory then | |
157 | local player_inv = player:get_inventory() | |
158 | player_inv:set_size("armor", 6) | |
159 | for i=1, 6 do | |
160 | local stack = player_inv:get_stack("armor", i) | |
161 | armor_inv:set_stack("armor", i, stack) | |
162 | end | |
163 | armor:save_armor_inventory(player) | |
164 | player_inv:set_size("armor", 0) | |
165 | end | |
161 | 166 | for i=1, 6 do |
162 | local stack = player_inv:get_stack("armor", i) | |
163 | armor_inv:set_stack("armor", i, stack) | |
167 | local stack = armor_inv:get_stack("armor", i) | |
164 | 168 | armor:run_callbacks("on_equip", player, i, stack) |
165 | 169 | end |
166 | 170 | armor.def[name] = { |
255 | 259 | |
256 | 260 | if armor.config.drop == true or armor.config.destroy == true then |
257 | 261 | minetest.register_on_dieplayer(function(player) |
258 | local name, player_inv = armor:get_valid_player(player, "[on_dieplayer]") | |
262 | local name, armor_inv = armor:get_valid_player(player, "[on_dieplayer]") | |
259 | 263 | if not name then |
260 | 264 | return |
261 | 265 | end |
262 | 266 | local drop = {} |
263 | for i=1, player_inv:get_size("armor") do | |
264 | local stack = player_inv:get_stack("armor", i) | |
267 | for i=1, armor_inv:get_size("armor") do | |
268 | local stack = armor_inv:get_stack("armor", i) | |
265 | 269 | if stack:get_count() > 0 then |
266 | 270 | table.insert(drop, stack) |
267 | 271 | armor:set_inventory_stack(player, i, nil) |
0 | # SOME DESCRIPTIVE TITLE. | |
1 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
2 | # This file is distributed under the same license as the PACKAGE package. | |
3 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
4 | # | |
5 | msgid "" | |
6 | msgstr "" | |
7 | "Project-Id-Version: \n" | |
8 | "Report-Msgid-Bugs-To: \n" | |
9 | "POT-Creation-Date: 2017-08-06 18:20+0200\n" | |
10 | "PO-Revision-Date: 2018-02-07 13:25+0800\n" | |
11 | "Language-Team: \n" | |
12 | "MIME-Version: 1.0\n" | |
13 | "Content-Type: text/plain; charset=UTF-8\n" | |
14 | "Content-Transfer-Encoding: 8bit\n" | |
15 | "X-Generator: Poedit 2.0.6\n" | |
16 | "Last-Translator: MuhdNurHidayat (MNH48) <mnh48mail@gmail.com>\n" | |
17 | "Plural-Forms: nplurals=1; plural=0;\n" | |
18 | "Language: ms\n" | |
19 | ||
20 | #: ../3d_armor/api.lua | |
21 | msgid "3d_armor: Player name is nil @1" | |
22 | msgstr "3d_armor: Nama pemain tiada nilai @1" | |
23 | ||
24 | #: ../3d_armor/api.lua | |
25 | msgid "3d_armor: Player inventory is nil @1" | |
26 | msgstr "3d_armor: Inventori pemain tiada nilai @1" | |
27 | ||
28 | #: ../3d_armor/api.lua | |
29 | msgid "3d_armor: Detached armor inventory is nil @1" | |
30 | msgstr "3d_armor: Inventori perisai terpisah tiada nilai @1" | |
31 | ||
32 | #: ../3d_armor/api.lua | |
33 | msgid "3d_armor: Player reference is nil @1" | |
34 | msgstr "3d_armor: Rujukan pemain tiada nilai @1" | |
35 | ||
36 | #: ../3d_armor/armor.lua | |
37 | msgid "Admin Helmet" | |
38 | msgstr "Helmet Pentadbir" | |
39 | ||
40 | #: ../3d_armor/armor.lua | |
41 | msgid "Admin Chestplate" | |
42 | msgstr "Perisai Dada Pentadbir" | |
43 | ||
44 | #: ../3d_armor/armor.lua | |
45 | msgid "Admin Leggings" | |
46 | msgstr "Perisai Kaki Pentadbir" | |
47 | ||
48 | #: ../3d_armor/armor.lua | |
49 | msgid "Admin Boots" | |
50 | msgstr "But Pentadbir" | |
51 | ||
52 | #: ../3d_armor/armor.lua | |
53 | msgid "Wood Helmet" | |
54 | msgstr "Helmet Kayu" | |
55 | ||
56 | #: ../3d_armor/armor.lua | |
57 | msgid "Wood Chestplate" | |
58 | msgstr "Perisai Dada Kayu" | |
59 | ||
60 | #: ../3d_armor/armor.lua | |
61 | msgid "Wood Leggings" | |
62 | msgstr "Perisai Kaki Kayu" | |
63 | ||
64 | #: ../3d_armor/armor.lua | |
65 | msgid "Wood Boots" | |
66 | msgstr "But Kayu" | |
67 | ||
68 | #: ../3d_armor/armor.lua | |
69 | msgid "Cactus Helmet" | |
70 | msgstr "Helmet Kaktus" | |
71 | ||
72 | #: ../3d_armor/armor.lua | |
73 | msgid "Cactus Chestplate" | |
74 | msgstr "Perisai Dada Kaktus" | |
75 | ||
76 | #: ../3d_armor/armor.lua | |
77 | msgid "Cactus Leggings" | |
78 | msgstr "Perisai Kaki Kaktus" | |
79 | ||
80 | #: ../3d_armor/armor.lua | |
81 | msgid "Cactus Boots" | |
82 | msgstr "But Kaktus" | |
83 | ||
84 | #: ../3d_armor/armor.lua | |
85 | msgid "Steel Helmet" | |
86 | msgstr "Helmet Keluli" | |
87 | ||
88 | #: ../3d_armor/armor.lua | |
89 | msgid "Steel Chestplate" | |
90 | msgstr "Perisai Dada Keluli" | |
91 | ||
92 | #: ../3d_armor/armor.lua | |
93 | msgid "Steel Leggings" | |
94 | msgstr "Perisai Kaki Keluli" | |
95 | ||
96 | #: ../3d_armor/armor.lua | |
97 | msgid "Steel Boots" | |
98 | msgstr "But Keluli" | |
99 | ||
100 | #: ../3d_armor/armor.lua | |
101 | msgid "Bronze Helmet" | |
102 | msgstr "Helmet Gangsa" | |
103 | ||
104 | #: ../3d_armor/armor.lua | |
105 | msgid "Bronze Chestplate" | |
106 | msgstr "Perisai Dada Gangsa" | |
107 | ||
108 | #: ../3d_armor/armor.lua | |
109 | msgid "Bronze Leggings" | |
110 | msgstr "Perisai Kaki Gangsa" | |
111 | ||
112 | #: ../3d_armor/armor.lua | |
113 | msgid "Bronze Boots" | |
114 | msgstr "But Gangsa" | |
115 | ||
116 | # 'Diamond' should be translated as 'intan' because the more common word 'berlian' is only specifically used for the gemstone diamond. | |
117 | #: ../3d_armor/armor.lua | |
118 | msgid "Diamond Helmet" | |
119 | msgstr "Helmet Intan" | |
120 | ||
121 | #: ../3d_armor/armor.lua | |
122 | msgid "Diamond Chestplate" | |
123 | msgstr "Perisai Dada Intan" | |
124 | ||
125 | #: ../3d_armor/armor.lua | |
126 | msgid "Diamond Leggings" | |
127 | msgstr "Perisai Kaki Intan" | |
128 | ||
129 | #: ../3d_armor/armor.lua | |
130 | msgid "Diamond Boots" | |
131 | msgstr "But Intan" | |
132 | ||
133 | #: ../3d_armor/armor.lua | |
134 | msgid "Gold Helmet" | |
135 | msgstr "Helmet Emas" | |
136 | ||
137 | #: ../3d_armor/armor.lua | |
138 | msgid "Gold Chestplate" | |
139 | msgstr "Perisai Dada Emas" | |
140 | ||
141 | #: ../3d_armor/armor.lua | |
142 | msgid "Gold Leggings" | |
143 | msgstr "Perisai Kaki Emas" | |
144 | ||
145 | #: ../3d_armor/armor.lua | |
146 | msgid "Gold Boots" | |
147 | msgstr "But Emas" | |
148 | ||
149 | #: ../3d_armor/armor.lua | |
150 | msgid "Mithril Helmet" | |
151 | msgstr "Helmet Mithril" | |
152 | ||
153 | #: ../3d_armor/armor.lua | |
154 | msgid "Mithril Chestplate" | |
155 | msgstr "Perisai Dada Mithril" | |
156 | ||
157 | #: ../3d_armor/armor.lua | |
158 | msgid "Mithril Leggings" | |
159 | msgstr "Perisai Kaki Mithril" | |
160 | ||
161 | #: ../3d_armor/armor.lua | |
162 | msgid "Mithril Boots" | |
163 | msgstr "But Mithril" | |
164 | ||
165 | #: ../3d_armor/armor.lua | |
166 | msgid "Crystal Helmet" | |
167 | msgstr "Helmet Kristal" | |
168 | ||
169 | #: ../3d_armor/armor.lua | |
170 | msgid "Crystal Chestplate" | |
171 | msgstr "Perisai Dada Kristal" | |
172 | ||
173 | #: ../3d_armor/armor.lua | |
174 | msgid "Crystal Leggings" | |
175 | msgstr "Perisai Kaki Kristal" | |
176 | ||
177 | #: ../3d_armor/armor.lua | |
178 | msgid "Crystal Boots" | |
179 | msgstr "But Kristal" | |
180 | ||
181 | #: ../3d_armor/init.lua ../3d_armor_ui/init.lua | |
182 | msgid "Radiation" | |
183 | msgstr "Radiasi" | |
184 | ||
185 | #: ../3d_armor/init.lua ../3d_armor_ui/init.lua | |
186 | msgid "Level" | |
187 | msgstr "Tahap" | |
188 | ||
189 | #: ../3d_armor/init.lua ../3d_armor_ui/init.lua | |
190 | msgid "Heal" | |
191 | msgstr "Pulih" | |
192 | ||
193 | #: ../3d_armor/init.lua ../3d_armor_ui/init.lua | |
194 | msgid "Fire" | |
195 | msgstr "Api" | |
196 | ||
197 | #: ../3d_armor/init.lua | |
198 | msgid "Your @1 got destroyed!" | |
199 | msgstr "@1 anda telah musnah!" | |
200 | ||
201 | #: ../3d_armor/init.lua | |
202 | msgid "3d_armor: Failed to initialize player" | |
203 | msgstr "3d_armor: Gagal mengasalkan pemain" | |
204 | ||
205 | #: ../3d_armor/init.lua | |
206 | msgid "[3d_armor] Fire Nodes disabled" | |
207 | msgstr "[3d_armor] Nod-nod Api dilumpuhkan" | |
208 | ||
209 | #: ../3d_armor_ip/init.lua | |
210 | msgid "3d_armor_ip: Mod loaded but unused." | |
211 | msgstr "3d_armor_ip: Mods dimuatkan tetapi tidak digunakan." | |
212 | ||
213 | #: ../3d_armor_ip/init.lua | |
214 | msgid "Back" | |
215 | msgstr "Kembali" | |
216 | ||
217 | #: ../3d_armor_ip/init.lua ../3d_armor_sfinv/init.lua ../3d_armor_ui/init.lua | |
218 | msgid "Armor" | |
219 | msgstr "Perisai" | |
220 | ||
221 | #: ../3d_armor_sfinv/init.lua | |
222 | msgid "3d_armor_sfinv: Mod loaded but unused." | |
223 | msgstr "3d_armor_sfinv: Mods dimuatkan tetapi tidak digunakan." | |
224 | ||
225 | #: ../3d_armor_stand/init.lua | |
226 | msgid "Armor stand top" | |
227 | msgstr "Bhg atas dirian perisai" | |
228 | ||
229 | #: ../3d_armor_stand/init.lua | |
230 | msgid "Armor stand" | |
231 | msgstr "Dirian perisai" | |
232 | ||
233 | #: ../3d_armor_stand/init.lua | |
234 | msgid "Armor Stand" | |
235 | msgstr "Dirian Perisai" | |
236 | ||
237 | #: ../3d_armor_stand/init.lua | |
238 | msgid "Locked Armor stand" | |
239 | msgstr "Dirian perisai Berkunci" | |
240 | ||
241 | #: ../3d_armor_stand/init.lua | |
242 | msgid "Armor Stand (owned by @1)" | |
243 | msgstr "Dirian Perisai (milik @1)" | |
244 | ||
245 | #: ../3d_armor_ui/init.lua | |
246 | msgid "3d_armor_ui: Mod loaded but unused." | |
247 | msgstr "3d_armor_ui: Mods dimuatkan tetapi tidak digunakan." | |
248 | ||
249 | #: ../3d_armor_ui/init.lua | |
250 | msgid "3d Armor" | |
251 | msgstr "Perisai 3d" | |
252 | ||
253 | #: ../3d_armor_ui/init.lua | |
254 | msgid "Armor not initialized!" | |
255 | msgstr "Perisai tidak diasalkan!" | |
256 | ||
257 | #: ../hazmat_suit/init.lua | |
258 | msgid "hazmat_suit: Mod loaded but unused." | |
259 | msgstr "hazmat_suit: Mods dimuatkan tetapi tidak digunakan." | |
260 | ||
261 | #: ../hazmat_suit/init.lua | |
262 | msgid "Hazmat Helmet" | |
263 | msgstr "Helmet Keselamatan" | |
264 | ||
265 | #: ../hazmat_suit/init.lua | |
266 | msgid "Hazmat Chestplate" | |
267 | msgstr "Perisai Dada Keselamatan" | |
268 | ||
269 | #: ../hazmat_suit/init.lua | |
270 | msgid "Hazmat Sleeve" | |
271 | msgstr "Perisai Tangan Keselamatan" | |
272 | ||
273 | #: ../hazmat_suit/init.lua | |
274 | msgid "Hazmat Leggins" | |
275 | msgstr "Perisai Kaki Keselamatan" | |
276 | ||
277 | #: ../hazmat_suit/init.lua | |
278 | msgid "Hazmat Boots" | |
279 | msgstr "But Keselamatan" | |
280 | ||
281 | #: ../hazmat_suit/init.lua | |
282 | msgid "Hazmat Suit" | |
283 | msgstr "Pakaian Keselamatan" | |
284 | ||
285 | #: ../shields/init.lua | |
286 | msgid "Admin Shield" | |
287 | msgstr "Perisai Pegang Pentadbir" | |
288 | ||
289 | #: ../shields/init.lua | |
290 | msgid "Wooden Shield" | |
291 | msgstr "Perisai Pegang Kayu" | |
292 | ||
293 | #: ../shields/init.lua | |
294 | msgid "Enhanced Wood Shield" | |
295 | msgstr "Perisai Pegang Kayu Kukuh" | |
296 | ||
297 | #: ../shields/init.lua | |
298 | msgid "Cactus Shield" | |
299 | msgstr "Perisai Pegang Kaktus" | |
300 | ||
301 | #: ../shields/init.lua | |
302 | msgid "Enhanced Cactus Shield" | |
303 | msgstr "Perisai Pegang Kaktus Kukuh" | |
304 | ||
305 | #: ../shields/init.lua | |
306 | msgid "Steel Shield" | |
307 | msgstr "Perisai Pegang Keluli" | |
308 | ||
309 | #: ../shields/init.lua | |
310 | msgid "Bronze Shield" | |
311 | msgstr "Perisai Pegang Gangsa" | |
312 | ||
313 | #: ../shields/init.lua | |
314 | msgid "Diamond Shield" | |
315 | msgstr "Perisai Pegang Intan" | |
316 | ||
317 | #: ../shields/init.lua | |
318 | msgid "Gold Shield" | |
319 | msgstr "Perisai Pegang Emas" | |
320 | ||
321 | #: ../shields/init.lua | |
322 | msgid "Mithril Shield" | |
323 | msgstr "Perisai Pegang Mithril" | |
324 | ||
325 | #: ../shields/init.lua | |
326 | msgid "Crystal Shield" | |
327 | msgstr "Perisai Pegang Kristal" | |
328 | ||
329 | #: ../technic_armor/init.lua | |
330 | msgid "technic_armor: Mod loaded but unused." | |
331 | msgstr "technic_armor: Mods dimuatkan tetapi tidak digunakan." | |
332 | ||
333 | # 'Lead' here is the chemical compound so the translation is 'plumbum', not 'pimpin' (act of leading). | |
334 | #: ../technic_armor/init.lua | |
335 | msgid "Lead" | |
336 | msgstr "Plumbum" | |
337 | ||
338 | #: ../technic_armor/init.lua | |
339 | msgid "Brass" | |
340 | msgstr "Loyang" | |
341 | ||
342 | #: ../technic_armor/init.lua | |
343 | msgid "Cast Iron" | |
344 | msgstr "Besi Tuang" | |
345 | ||
346 | #: ../technic_armor/init.lua | |
347 | msgid "Carbon Steel" | |
348 | msgstr "Keluli Karbon" | |
349 | ||
350 | #: ../technic_armor/init.lua | |
351 | msgid "Stainless Steel" | |
352 | msgstr "Keluli Tahan Karat" | |
353 | ||
354 | #: ../technic_armor/init.lua | |
355 | msgid "Tin" | |
356 | msgstr "Timah" | |
357 | ||
358 | #: ../technic_armor/init.lua | |
359 | msgid "Silver" | |
360 | msgstr "Perak" | |
361 | ||
362 | #: ../technic_armor/init.lua | |
363 | msgid "Helmet" | |
364 | msgstr "Helmet" | |
365 | ||
366 | #: ../technic_armor/init.lua | |
367 | msgid "Chestplate" | |
368 | msgstr "Perisai Dada" | |
369 | ||
370 | #: ../technic_armor/init.lua | |
371 | msgid "Leggings" | |
372 | msgstr "Perisai Kaki" | |
373 | ||
374 | #: ../technic_armor/init.lua | |
375 | msgid "Boots" | |
376 | msgstr "But" | |
377 | ||
378 | #: ../technic_armor/init.lua | |
379 | msgid "Shield" | |
380 | msgstr "Perisai Pegang" | |
381 | ||
382 | #. Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string) | |
383 | #: ../technic_armor/init.lua | |
384 | msgid "@1 @2" | |
385 | msgstr "@2 @1" |
0 | 0 | [mod] 3d Armor integration to inventory plus [3d_armor_ip] |
1 | 1 | ========================================================== |
2 | 2 | |
3 | License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 |
0 | 0 | [mod] 3d Armor sfinv integration [3d_armor_sfinv] |
1 | 1 | ================================================= |
2 | 2 | |
3 | License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 |
0 | 0 | [mod] 3d Armor Stand [3d_armor_stand] |
1 | 1 | ===================================== |
2 | 2 | |
3 | License Source Code: (C) 2016-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: (C) 2016-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 | |
5 | Lecense Models: (C) 2016-2017 Stuart Jones - CC BY-SA 3.0 | |
5 | Lecense Models: (C) 2016-2018 Stuart Jones - CC BY-SA 3.0 | |
6 | 6 | |
7 | 7 | UV model mapping by tobyplowy(aka toby109tt) |
8 | 8 |
320 | 320 | end, |
321 | 321 | }) |
322 | 322 | |
323 | minetest.register_abm({ | |
324 | nodenames = {"3d_armor_stand:locked_armor_stand", "3d_armor_stand:armor_stand"}, | |
325 | interval = 15, | |
326 | chance = 1, | |
327 | action = function(pos, node, active_object_count, active_object_count_wider) | |
328 | local num | |
329 | num = #minetest.get_objects_inside_radius(pos, 0.5) | |
330 | if num > 0 then return end | |
331 | update_entity(pos) | |
332 | end | |
333 | }) | |
334 | ||
323 | 335 | minetest.register_craft({ |
324 | 336 | output = "3d_armor_stand:armor_stand", |
325 | 337 | recipe = { |
326 | {"", "default:fence_wood", ""}, | |
327 | {"", "default:fence_wood", ""}, | |
338 | {"", "group:fence", ""}, | |
339 | {"", "group:fence", ""}, | |
328 | 340 | {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"}, |
329 | 341 | } |
330 | 342 | }) |
0 | 0 | [mod] 3d Armor integration to unified inventory [3d_armor_ui] |
1 | 1 | ============================================================= |
2 | 2 | |
3 | License Source Code: (C) 2012-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: (C) 2012-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 |
0 | 0 | 3D Armor - Visible Player Armor |
1 | 1 | =============================== |
2 | 2 | |
3 | License Source Code: Copyright (C) 2013-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 | |
5 | Armor Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0 | |
5 | Armor Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 | |
6 | 6 | |
7 | 7 | Special credit to Jordach and MirceaKitsune for providing the default 3d character model. |
8 | 8 |
0 | Modpack - 3d Armor [0.4.10] | |
1 | ========================== | |
0 | Modpack - 3d Armor [0.4.11] | |
1 | =========================== | |
2 | 2 | |
3 | 3 | ### Table of Contents |
4 | 4 | <!-- START doctoc generated TOC please keep comment here to allow auto update --> |
8 | 8 | - [[mod] Visible Player Armor [3d_armor]](#mod-visible-player-armor-3d_armor) |
9 | 9 | - [[mod] Visible Wielded Items [wieldview]](#mod-visible-wielded-items-wieldview) |
10 | 10 | - [[mod] Shields [shields]](#mod-shields-shields) |
11 | - [[mod] Technic Armor [technic_armor]](#mod-technic-armor-technic_armor) | |
12 | - [[mod] Hazmat Suit [hazmat_suit]](#mod-hazmat-suit-hazmat_suit) | |
13 | 11 | - [[mod] 3d Armor Stand [3d_armor_stand]](#mod-3d-armor-stand-3d_armor_stand) |
14 | 12 | |
15 | 13 | <!-- END doctoc generated TOC please keep comment here to allow auto update --> |
18 | 16 | [mod] Visible Player Armor [3d_armor] |
19 | 17 | ------------------------------------- |
20 | 18 | |
21 | Minetest Version: 0.4.15 | |
19 | Minetest Version: 0.4.16 | |
22 | 20 | |
23 | 21 | Game: minetest_game and many derivatives |
24 | 22 | |
62 | 60 | Originally a part of 3d_armor, shields have been re-included as an optional extra. |
63 | 61 | If you do not want shields then simply remove the shields folder from the modpack. |
64 | 62 | |
65 | [mod] Technic Armor [technic_armor] | |
66 | ----------------------------------- | |
67 | ||
68 | Depends: 3d_armor, technic_worldgen | |
69 | ||
70 | Adds tin, silver and technic materials to 3d_armor. | |
71 | Requires technic (technic_worldgen at least) mod. | |
72 | ||
73 | [mod] Hazmat Suit [hazmat_suit] | |
74 | ------------------------------- | |
75 | ||
76 | Depends: 3d_armor, technic | |
77 | ||
78 | Adds hazmat suit to 3d_armor. It protects rather well from fire (if enabled in configuration) and radiation*, and it has built-in oxygen supply. | |
79 | ||
80 | Requires technic mod. | |
81 | ||
82 | 63 | [mod] 3d Armor Stand [3d_armor_stand] |
83 | 64 | ------------------------------------- |
84 | 65 |
0 | [mod] Hazmat Suit [hazmat_suit] | |
1 | =============================== | |
2 | ||
3 | License Source Code: Copyright (C) 2015-2017 Stuart Jones - LGPL v2.1 | |
4 | ||
5 | License Textures: HybridDog and numberZero - 2015-2017 WTFPL | |
6 |
0 | [mod] Hazmat Suit [hazmat_suit] | |
1 | =============================== | |
2 | ||
3 | Adds hazmat suit to 3d_armor. It protects rather well from fire (if enabled in configuration) and radiation*, and it has built-in oxygen supply. | |
4 | ||
5 | Requires technic mod. | |
6 | ||
7 | *Requires patched version of technic mod - https://github.com/minetest-technic/technic/pull/275 | |
8 | ||
9 | Depends: 3d_armor, technic | |
10 | ||
11 | Textures by HybridDog and numberZero |
0 | Adds hazmat suit (protects from water, fire and radiation) to 3d_armor. |
0 | -- support for i18n | |
1 | local S = armor_i18n.gettext | |
2 | ||
3 | if not minetest.get_modpath("technic") then | |
4 | minetest.log("warning", S("hazmat_suit: Mod loaded but unused.")) | |
5 | return | |
6 | end | |
7 | ||
8 | minetest.register_craftitem("hazmat_suit:helmet_hazmat", { | |
9 | description = S("Hazmat Helmet"), | |
10 | inventory_image = "hazmat_suit_inv_helmet_hazmat.png", | |
11 | stack_max = 1, | |
12 | }) | |
13 | ||
14 | minetest.register_craftitem("hazmat_suit:chestplate_hazmat", { | |
15 | description = S("Hazmat Chestplate"), | |
16 | inventory_image = "hazmat_suit_inv_chestplate_hazmat.png", | |
17 | stack_max = 1, | |
18 | }) | |
19 | ||
20 | minetest.register_craftitem("hazmat_suit:sleeve_hazmat", { | |
21 | description = S("Hazmat Sleeve"), | |
22 | inventory_image = "hazmat_suit_inv_sleeve_hazmat.png", | |
23 | stack_max = 1, | |
24 | }) | |
25 | ||
26 | minetest.register_craftitem("hazmat_suit:leggings_hazmat", { | |
27 | description = S("Hazmat Leggins"), | |
28 | inventory_image = "hazmat_suit_inv_leggings_hazmat.png", | |
29 | stack_max = 1, | |
30 | }) | |
31 | ||
32 | minetest.register_craftitem("hazmat_suit:boots_hazmat", { | |
33 | description = S("Hazmat Boots"), | |
34 | inventory_image = "hazmat_suit_inv_boots_hazmat.png", | |
35 | stack_max = 1, | |
36 | }) | |
37 | ||
38 | armor:register_armor("hazmat_suit:suit_hazmat", { | |
39 | description = S("Hazmat Suit"), | |
40 | inventory_image = "hazmat_suit_inv_suit_hazmat.png", | |
41 | groups = {armor_head=1, armor_torso=1, armor_legs=1, armor_feet=1, | |
42 | armor_heal=20, armor_fire=4, armor_water=1, armor_use=1000, | |
43 | physics_jump=-0.1, physics_speed=-0.2, physics_gravity=0.1}, | |
44 | armor_groups = {fleshy=35, radiation=50}, | |
45 | damage_groups = {cracky=3, snappy=3, choppy=2, crumbly=2, level=1}, | |
46 | }) | |
47 | ||
48 | minetest.register_craft({ | |
49 | output = "hazmat_suit:helmet_hazmat", | |
50 | recipe = { | |
51 | {"", "technic:stainless_steel_ingot", ""}, | |
52 | {"technic:stainless_steel_ingot", "default:glass", "technic:stainless_steel_ingot"}, | |
53 | {"technic:rubber", "technic:rubber", "technic:rubber"}, | |
54 | }, | |
55 | }) | |
56 | ||
57 | minetest.register_craft({ | |
58 | output = "hazmat_suit:chestplate_hazmat", | |
59 | recipe = { | |
60 | {"technic:lead_ingot", "dye:yellow", "technic:lead_ingot"}, | |
61 | {"technic:stainless_steel_ingot", "technic:lead_ingot", "technic:stainless_steel_ingot"}, | |
62 | {"technic:lead_ingot", "technic:stainless_steel_ingot", "technic:lead_ingot"}, | |
63 | }, | |
64 | }) | |
65 | ||
66 | minetest.register_craft({ | |
67 | output = "hazmat_suit:sleeve_hazmat", | |
68 | recipe = { | |
69 | {"technic:rubber", "dye:yellow"}, | |
70 | {"", "technic:stainless_steel_ingot"}, | |
71 | {"", "technic:rubber"}, | |
72 | }, | |
73 | }) | |
74 | ||
75 | minetest.register_craft({ | |
76 | output = "hazmat_suit:leggings_hazmat", | |
77 | recipe = { | |
78 | {"technic:rubber", "technic:lead_ingot", "technic:rubber"}, | |
79 | {"technic:stainless_steel_ingot", "technic:rubber", "technic:stainless_steel_ingot"}, | |
80 | {"technic:lead_ingot", "", "technic:lead_ingot"}, | |
81 | }, | |
82 | }) | |
83 | ||
84 | minetest.register_craft({ | |
85 | output = "hazmat_suit:boots_hazmat", | |
86 | recipe = { | |
87 | {"", "", ""}, | |
88 | {"technic:rubber", "", "technic:rubber"}, | |
89 | {"technic:stainless_steel_ingot", "", "technic:stainless_steel_ingot"}, | |
90 | }, | |
91 | }) | |
92 | ||
93 | minetest.register_craft({ | |
94 | output = "hazmat_suit:suit_hazmat", | |
95 | type = "shapeless", | |
96 | recipe = { | |
97 | "hazmat_suit:helmet_hazmat", | |
98 | "hazmat_suit:chestplate_hazmat", | |
99 | "hazmat_suit:leggings_hazmat", | |
100 | "hazmat_suit:boots_hazmat", | |
101 | "hazmat_suit:sleeve_hazmat", | |
102 | "hazmat_suit:sleeve_hazmat", | |
103 | }, | |
104 | }) |
0 | hazmat_suit/textures/hazmat_suit_suit_hazmat.png:all |
0 | 0 | [mod] Shields [shields] |
1 | 1 | ======================= |
2 | 2 | |
3 | License Source Code: Copyright (C) 2013-2017 Stuart Jones - LGPL v2.1 | |
3 | License Source Code: Copyright (C) 2013-2018 Stuart Jones - LGPL v2.1 | |
4 | 4 | |
5 | License Textures: Copyright (C) 2017 davidthecreator - CC-BY-SA 3.0 | |
5 | License Textures: Copyright (C) 2017-2018 davidthecreator - CC-BY-SA 3.0 | |
6 | 6 | |
7 | 7 | https://github.com/daviddoesminetest/3d-armors-new-textures |
0 | [mod] Technic Armor [technic_armor] | |
1 | =================================== | |
2 | ||
3 | License Source Code: Copyright (C) 2013-2017 Stuart Jones - LGPL v2.1 | |
4 | ||
5 | License Textures: poet.nohit and numberZero - 2015-2017 WTFPL | |
6 |
0 | [mod] Technic Armor [technic_armor] | |
1 | =================================== | |
2 | ||
3 | Adds tin, silver and technic materials to 3d_armor. | |
4 | Requires technic (technic_worldgen at least) mod. | |
5 | ||
6 | Depends: 3d_armor, technic_worldgen | |
7 | ||
8 | Textures by poet.nohit and numberZero |
0 | -- support for i18n | |
1 | local S = armor_i18n.gettext | |
2 | local F = armor_i18n.fgettext | |
3 | ||
4 | if not minetest.get_modpath("technic_worldgen") then | |
5 | minetest.log("warning", S("technic_armor: Mod loaded but unused.")) | |
6 | return | |
7 | end | |
8 | ||
9 | local stats = { | |
10 | lead = { name=S("Lead"), material="technic:lead_ingot", armor=1.6, heal=0, use=500, radiation=80*1.1 }, | |
11 | brass = { name=S("Brass"), material="technic:brass_ingot", armor=1.8, heal=0, use=650, radiation=43 }, | |
12 | cast = { name=S("Cast Iron"), material="technic:cast_iron_ingot", armor=2.5, heal=8, use=200, radiation=40 }, | |
13 | carbon = { name=S("Carbon Steel"), material="technic:carbon_steel_ingot", armor=2.7, heal=10, use=100, radiation=40 }, | |
14 | stainless = { name=S("Stainless Steel"), material="technic:stainless_steel_ingot", armor=2.7, heal=10, use=75, radiation=40 }, | |
15 | } | |
16 | if minetest.get_modpath("moreores") then | |
17 | stats.tin = { name=S("Tin"), material="moreores:tin_ingot", armor=1.6, heal=0, use=750, radiation=37 } | |
18 | stats.silver = { name=S("Silver"), material="moreores:silver_ingot", armor=1.8, heal=6, use=650, radiation=53 } | |
19 | end | |
20 | ||
21 | local parts = { | |
22 | helmet = { place="head", name=S("Helmet"), level=5, radlevel = 0.10, craft={{1,1,1},{1,0,1}} }, | |
23 | chestplate = { place="torso", name=S("Chestplate"), level=8, radlevel = 0.35, craft={{1,0,1},{1,1,1},{1,1,1}} }, | |
24 | leggings = { place="legs", name=S("Leggings"), level=7, radlevel = 0.15, craft={{1,1,1},{1,0,1},{1,0,1}} }, | |
25 | boots = { place="feet", name=S("Boots"), level=4, radlevel = 0.10, craft={{1,0,1},{1,0,1}} }, | |
26 | } | |
27 | if minetest.get_modpath("shields") then | |
28 | parts.shield = { place="shield", name=S("Shield"), level=5, radlevel=0.00, craft={{1,1,1},{1,1,1},{0,1,0}} } | |
29 | end | |
30 | ||
31 | -- Makes a craft recipe based on a template | |
32 | -- template is a recipe-like table but indices are used instead of actual item names: | |
33 | -- 0 means nothing, everything else is treated as an index in the materials table | |
34 | local function make_recipe(template, materials) | |
35 | local recipe = {} | |
36 | for j, trow in ipairs(template) do | |
37 | local rrow = {} | |
38 | for i, tcell in ipairs(trow) do | |
39 | if tcell == 0 then | |
40 | rrow[i] = "" | |
41 | else | |
42 | rrow[i] = materials[tcell] | |
43 | end | |
44 | end | |
45 | recipe[j] = rrow | |
46 | end | |
47 | return recipe | |
48 | end | |
49 | ||
50 | for key, armor in pairs(stats) do | |
51 | for partkey, part in pairs(parts) do | |
52 | local partname = "technic_armor:"..partkey.."_"..key | |
53 | minetest.register_tool(partname, { | |
54 | -- Translators: @1 stands for material and @2 for part of the armor, so that you could use a conjunction if in your language part name comes first then material (e.g. in french 'Silver Boots' is translated in 'Bottes en argent' by using '@2 en @1' as translated string) | |
55 | description = S("@1 @2", armor.name, part.name), | |
56 | inventory_image = "technic_armor_inv_"..partkey.."_"..key..".png", | |
57 | groups = {["armor_"..part.place]=math.floor(part.level*armor.armor), armor_heal=armor.heal, armor_use=armor.use, armor_radiation=math.floor(part.radlevel*armor.radiation)}, | |
58 | wear = 0, | |
59 | }) | |
60 | minetest.register_craft({ | |
61 | output = partname, | |
62 | recipe = make_recipe(part.craft, {armor.material}), | |
63 | }) | |
64 | end | |
65 | end |
0 | technic_armor/textures/technic_armor_helmet_brass.png:head | |
1 | technic_armor/textures/technic_armor_chestplate_brass.png:torso | |
2 | technic_armor/textures/technic_armor_leggings_brass.png:legs | |
3 | technic_armor/textures/technic_armor_boots_brass.png:feet | |
4 | technic_armor/textures/technic_armor_shield_brass.png:shield | |
5 | ||
6 | technic_armor/textures/technic_armor_helmet_cast.png:head | |
7 | technic_armor/textures/technic_armor_chestplate_cast.png:torso | |
8 | technic_armor/textures/technic_armor_leggings_cast.png:legs | |
9 | technic_armor/textures/technic_armor_boots_cast.png:feet | |
10 | technic_armor/textures/technic_armor_shield_cast.png:shield | |
11 | ||
12 | technic_armor/textures/technic_armor_helmet_stainless.png:head | |
13 | technic_armor/textures/technic_armor_chestplate_stainless.png:torso | |
14 | technic_armor/textures/technic_armor_leggings_stainless.png:legs | |
15 | technic_armor/textures/technic_armor_boots_stainless.png:feet | |
16 | technic_armor/textures/technic_armor_shield_stainless.png:shield | |
17 | ||
18 | technic_armor/textures/technic_armor_helmet_tin.png:head | |
19 | technic_armor/textures/technic_armor_chestplate_tin.png:torso | |
20 | technic_armor/textures/technic_armor_leggings_tin.png:legs | |
21 | technic_armor/textures/technic_armor_boots_tin.png:feet | |
22 | technic_armor/textures/technic_armor_shield_tin.png:shield | |
23 | ||
24 | technic_armor/textures/technic_armor_helmet_lead.png:head | |
25 | technic_armor/textures/technic_armor_chestplate_lead.png:torso | |
26 | technic_armor/textures/technic_armor_leggings_lead.png:legs | |
27 | technic_armor/textures/technic_armor_boots_lead.png:feet | |
28 | technic_armor/textures/technic_armor_shield_lead.png:shield | |
29 | ||
30 | technic_armor/textures/technic_armor_helmet_carbon.png:head | |
31 | technic_armor/textures/technic_armor_chestplate_carbon.png:torso | |
32 | technic_armor/textures/technic_armor_leggings_carbon.png:legs | |
33 | technic_armor/textures/technic_armor_boots_carbon.png:feet | |
34 | technic_armor/textures/technic_armor_shield_carbon.png:shield | |
35 | ||
36 | technic_armor/textures/technic_armor_helmet_silver.png:head | |
37 | technic_armor/textures/technic_armor_chestplate_silver.png:torso | |
38 | technic_armor/textures/technic_armor_leggings_silver.png:legs | |
39 | technic_armor/textures/technic_armor_boots_silver.png:feet | |
40 | technic_armor/textures/technic_armor_shield_silver.png:shield |
Binary diff not shown