From 969bd674c968c10adca66a0a7625e7568dd1ca64 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Fri, 21 Sep 2018 21:19:48 +0200 Subject: Reverting submodule change until zip file does not include submodule --- .gitignore | 3 - .gitmodules | 3 - API.md | 94 ++++ LICENSE.txt | 1 + README.md | 100 +--- _config.yml | 1 - boards/LICENSE.txt | 166 ------- boards/LICENSE_FONT.txt | 4 - boards/copyright.txt | 2 - boards/depends.txt | 2 - boards/font_tinycurs.lua | 27 - boards/init.lua | 139 ------ boards/intllib.lua | 45 -- boards/locale/fr.po | 40 -- boards/locale/template.pot | 34 -- boards/textures/board_black_front.png | Bin 563 -> 0 bytes boards/textures/board_green_front.png | Bin 485 -> 0 bytes boards/textures/font_tinycurs_0000.png | Bin 248 -> 0 bytes boards/textures/font_tinycurs_0020.png | Bin 230 -> 0 bytes boards/textures/font_tinycurs_0021.png | Bin 305 -> 0 bytes boards/textures/font_tinycurs_0022.png | Bin 289 -> 0 bytes boards/textures/font_tinycurs_0023.png | Bin 304 -> 0 bytes boards/textures/font_tinycurs_0024.png | Bin 338 -> 0 bytes boards/textures/font_tinycurs_0025.png | Bin 303 -> 0 bytes boards/textures/font_tinycurs_0026.png | Bin 325 -> 0 bytes boards/textures/font_tinycurs_0027.png | Bin 291 -> 0 bytes boards/textures/font_tinycurs_0028.png | Bin 299 -> 0 bytes boards/textures/font_tinycurs_0029.png | Bin 298 -> 0 bytes boards/textures/font_tinycurs_002a.png | Bin 292 -> 0 bytes boards/textures/font_tinycurs_002b.png | Bin 298 -> 0 bytes boards/textures/font_tinycurs_002c.png | Bin 287 -> 0 bytes boards/textures/font_tinycurs_002d.png | Bin 286 -> 0 bytes boards/textures/font_tinycurs_002e.png | Bin 282 -> 0 bytes boards/textures/font_tinycurs_002f.png | Bin 305 -> 0 bytes boards/textures/font_tinycurs_0030.png | Bin 311 -> 0 bytes boards/textures/font_tinycurs_0031.png | Bin 309 -> 0 bytes boards/textures/font_tinycurs_0032.png | Bin 320 -> 0 bytes boards/textures/font_tinycurs_0033.png | Bin 314 -> 0 bytes boards/textures/font_tinycurs_0034.png | Bin 315 -> 0 bytes boards/textures/font_tinycurs_0035.png | Bin 322 -> 0 bytes boards/textures/font_tinycurs_0036.png | Bin 315 -> 0 bytes boards/textures/font_tinycurs_0037.png | Bin 311 -> 0 bytes boards/textures/font_tinycurs_0038.png | Bin 316 -> 0 bytes boards/textures/font_tinycurs_0039.png | Bin 320 -> 0 bytes boards/textures/font_tinycurs_003a.png | Bin 294 -> 0 bytes boards/textures/font_tinycurs_003b.png | Bin 296 -> 0 bytes boards/textures/font_tinycurs_003c.png | Bin 286 -> 0 bytes boards/textures/font_tinycurs_003d.png | Bin 292 -> 0 bytes boards/textures/font_tinycurs_003e.png | Bin 287 -> 0 bytes boards/textures/font_tinycurs_003f.png | Bin 309 -> 0 bytes boards/textures/font_tinycurs_0040.png | Bin 335 -> 0 bytes boards/textures/font_tinycurs_0041.png | Bin 314 -> 0 bytes boards/textures/font_tinycurs_0042.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_0043.png | Bin 312 -> 0 bytes boards/textures/font_tinycurs_0044.png | Bin 313 -> 0 bytes boards/textures/font_tinycurs_0045.png | Bin 303 -> 0 bytes boards/textures/font_tinycurs_0046.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_0047.png | Bin 168 -> 0 bytes boards/textures/font_tinycurs_0048.png | Bin 324 -> 0 bytes boards/textures/font_tinycurs_0049.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_004a.png | Bin 182 -> 0 bytes boards/textures/font_tinycurs_004b.png | Bin 305 -> 0 bytes boards/textures/font_tinycurs_004c.png | Bin 306 -> 0 bytes boards/textures/font_tinycurs_004d.png | Bin 318 -> 0 bytes boards/textures/font_tinycurs_004e.png | Bin 314 -> 0 bytes boards/textures/font_tinycurs_004f.png | Bin 311 -> 0 bytes boards/textures/font_tinycurs_0050.png | Bin 311 -> 0 bytes boards/textures/font_tinycurs_0051.png | Bin 313 -> 0 bytes boards/textures/font_tinycurs_0052.png | Bin 318 -> 0 bytes boards/textures/font_tinycurs_0053.png | Bin 315 -> 0 bytes boards/textures/font_tinycurs_0054.png | Bin 307 -> 0 bytes boards/textures/font_tinycurs_0055.png | Bin 311 -> 0 bytes boards/textures/font_tinycurs_0056.png | Bin 309 -> 0 bytes boards/textures/font_tinycurs_0057.png | Bin 315 -> 0 bytes boards/textures/font_tinycurs_0058.png | Bin 310 -> 0 bytes boards/textures/font_tinycurs_0059.png | Bin 329 -> 0 bytes boards/textures/font_tinycurs_005a.png | Bin 327 -> 0 bytes boards/textures/font_tinycurs_005b.png | Bin 315 -> 0 bytes boards/textures/font_tinycurs_005c.png | Bin 297 -> 0 bytes boards/textures/font_tinycurs_005d.png | Bin 316 -> 0 bytes boards/textures/font_tinycurs_005e.png | Bin 296 -> 0 bytes boards/textures/font_tinycurs_005f.png | Bin 286 -> 0 bytes boards/textures/font_tinycurs_0060.png | Bin 298 -> 0 bytes boards/textures/font_tinycurs_0061.png | Bin 296 -> 0 bytes boards/textures/font_tinycurs_0062.png | Bin 304 -> 0 bytes boards/textures/font_tinycurs_0063.png | Bin 299 -> 0 bytes boards/textures/font_tinycurs_0064.png | Bin 306 -> 0 bytes boards/textures/font_tinycurs_0065.png | Bin 301 -> 0 bytes boards/textures/font_tinycurs_0066.png | Bin 307 -> 0 bytes boards/textures/font_tinycurs_0067.png | Bin 304 -> 0 bytes boards/textures/font_tinycurs_0068.png | Bin 300 -> 0 bytes boards/textures/font_tinycurs_0069.png | Bin 290 -> 0 bytes boards/textures/font_tinycurs_006a.png | Bin 300 -> 0 bytes boards/textures/font_tinycurs_006b.png | Bin 305 -> 0 bytes boards/textures/font_tinycurs_006c.png | Bin 299 -> 0 bytes boards/textures/font_tinycurs_006d.png | Bin 305 -> 0 bytes boards/textures/font_tinycurs_006e.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_006f.png | Bin 295 -> 0 bytes boards/textures/font_tinycurs_0070.png | Bin 313 -> 0 bytes boards/textures/font_tinycurs_0071.png | Bin 307 -> 0 bytes boards/textures/font_tinycurs_0072.png | Bin 306 -> 0 bytes boards/textures/font_tinycurs_0073.png | Bin 302 -> 0 bytes boards/textures/font_tinycurs_0074.png | Bin 299 -> 0 bytes boards/textures/font_tinycurs_0075.png | Bin 296 -> 0 bytes boards/textures/font_tinycurs_0076.png | Bin 296 -> 0 bytes boards/textures/font_tinycurs_0077.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_0078.png | Bin 300 -> 0 bytes boards/textures/font_tinycurs_0079.png | Bin 308 -> 0 bytes boards/textures/font_tinycurs_007a.png | Bin 304 -> 0 bytes boards/textures/font_tinycurs_007b.png | Bin 312 -> 0 bytes boards/textures/font_tinycurs_007c.png | Bin 304 -> 0 bytes boards/textures/font_tinycurs_007d.png | Bin 314 -> 0 bytes boards/textures/font_tinycurs_007e.png | Bin 291 -> 0 bytes boards/textures/font_tinycurs_2018.png | Bin 288 -> 0 bytes boards/textures/font_tinycurs_2019.png | Bin 288 -> 0 bytes boards/textures/font_tinycurs_201c.png | Bin 294 -> 0 bytes boards/textures/font_tinycurs_201d.png | Bin 295 -> 0 bytes boards/tools/updatepo.sh | 25 - copyright.txt | 6 + depends.txt | 0 display_api | 1 - font_api/API.md | 145 ------ font_api/LICENSE.txt | 166 ------- font_api/README.md | 14 - font_api/copyright.txt | 3 - font_api/depends.txt | 0 font_api/doc/font.svg | 463 ------------------ font_api/doc/lines.svg | 544 --------------------- font_api/font.lua | 266 ---------- font_api/init.lua | 65 --- font_api/registry.lua | 162 ------ font_api/settingtypes.txt | 1 - font_api/tools/make_font_lua.sh | 71 --- font_api/tools/make_font_textures.sh | 111 ----- font_metro/LICENSE.txt | 3 - font_metro/copyright.txt | 3 - font_metro/depends.txt | 1 - font_metro/init.lua | 24 - font_metro/textures/font_metro_0000.png | Bin 248 -> 0 bytes font_metro/textures/font_metro_0020.png | Bin 230 -> 0 bytes font_metro/textures/font_metro_0021.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_0022.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_0023.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_0024.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0025.png | Bin 346 -> 0 bytes font_metro/textures/font_metro_0026.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_0027.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_0028.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0029.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_002a.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_002b.png | Bin 300 -> 0 bytes font_metro/textures/font_metro_002c.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_002d.png | Bin 290 -> 0 bytes font_metro/textures/font_metro_002e.png | Bin 289 -> 0 bytes font_metro/textures/font_metro_002f.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_0030.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0031.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0032.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0033.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_0034.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0035.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0036.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_0037.png | Bin 308 -> 0 bytes font_metro/textures/font_metro_0038.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0039.png | Bin 337 -> 0 bytes font_metro/textures/font_metro_003a.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_003b.png | Bin 296 -> 0 bytes font_metro/textures/font_metro_003c.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_003d.png | Bin 290 -> 0 bytes font_metro/textures/font_metro_003e.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_003f.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0040.png | Bin 353 -> 0 bytes font_metro/textures/font_metro_0041.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0042.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0043.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_0044.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0045.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0046.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0047.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_0048.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_0049.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_004a.png | Bin 310 -> 0 bytes font_metro/textures/font_metro_004b.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_004c.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_004d.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_004e.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_004f.png | Bin 339 -> 0 bytes font_metro/textures/font_metro_0050.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0051.png | Bin 343 -> 0 bytes font_metro/textures/font_metro_0052.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0053.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0054.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_0055.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0056.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_0057.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0058.png | Bin 340 -> 0 bytes font_metro/textures/font_metro_0059.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_005a.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_005b.png | Bin 301 -> 0 bytes font_metro/textures/font_metro_005c.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_005d.png | Bin 302 -> 0 bytes font_metro/textures/font_metro_005e.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_005f.png | Bin 288 -> 0 bytes font_metro/textures/font_metro_0060.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_0061.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0062.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0063.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_0064.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0065.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0066.png | Bin 312 -> 0 bytes font_metro/textures/font_metro_0067.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0068.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0069.png | Bin 293 -> 0 bytes font_metro/textures/font_metro_006a.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_006b.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_006c.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_006d.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_006e.png | Bin 312 -> 0 bytes font_metro/textures/font_metro_006f.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_0070.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0071.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0072.png | Bin 308 -> 0 bytes font_metro/textures/font_metro_0073.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0074.png | Bin 308 -> 0 bytes font_metro/textures/font_metro_0075.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0076.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_0077.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_0078.png | Bin 310 -> 0 bytes font_metro/textures/font_metro_0079.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_007a.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_007b.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_007c.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_007d.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_007e.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_00a0.png | Bin 284 -> 0 bytes font_metro/textures/font_metro_00a1.png | Bin 294 -> 0 bytes font_metro/textures/font_metro_00a2.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_00a3.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_00a4.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_00a5.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_00a6.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_00a7.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_00a8.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_00a9.png | Bin 355 -> 0 bytes font_metro/textures/font_metro_00aa.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_00ab.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_00ac.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_00ad.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_00ae.png | Bin 352 -> 0 bytes font_metro/textures/font_metro_00af.png | Bin 289 -> 0 bytes font_metro/textures/font_metro_00b0.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_00b1.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_00b2.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_00b3.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_00b4.png | Bin 298 -> 0 bytes font_metro/textures/font_metro_00b5.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_00b6.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_00b7.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_00b8.png | Bin 303 -> 0 bytes font_metro/textures/font_metro_00b9.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_00ba.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_00bb.png | Bin 291 -> 0 bytes font_metro/textures/font_metro_00bc.png | Bin 345 -> 0 bytes font_metro/textures/font_metro_00bd.png | Bin 342 -> 0 bytes font_metro/textures/font_metro_00be.png | Bin 350 -> 0 bytes font_metro/textures/font_metro_00bf.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_00c0.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_00c1.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_00c2.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_00c3.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_00c4.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_00c5.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_00c6.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_00c7.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_00c8.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_00c9.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_00ca.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_00cb.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_00cc.png | Bin 294 -> 0 bytes font_metro/textures/font_metro_00cd.png | Bin 298 -> 0 bytes font_metro/textures/font_metro_00ce.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_00cf.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_00d0.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_00d1.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_00d2.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_00d3.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_00d4.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_00d5.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_00d6.png | Bin 342 -> 0 bytes font_metro/textures/font_metro_00d7.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_00d8.png | Bin 346 -> 0 bytes font_metro/textures/font_metro_00d9.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_00da.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_00db.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_00dc.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_00dd.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_00de.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_00df.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_00e0.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_00e1.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_00e2.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_00e3.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_00e4.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_00e5.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_00e6.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_00e7.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_00e8.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_00e9.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_00ea.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_00eb.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_00ec.png | Bin 294 -> 0 bytes font_metro/textures/font_metro_00ed.png | Bin 296 -> 0 bytes font_metro/textures/font_metro_00ee.png | Bin 302 -> 0 bytes font_metro/textures/font_metro_00ef.png | Bin 300 -> 0 bytes font_metro/textures/font_metro_00f0.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_00f1.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_00f2.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_00f3.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_00f4.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_00f5.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_00f6.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_00f7.png | Bin 300 -> 0 bytes font_metro/textures/font_metro_00f8.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_00f9.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_00fa.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_00fb.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_00fc.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_00fd.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_00fe.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_00ff.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0100.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0101.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0102.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_0103.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0104.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_0105.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_0106.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_0107.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0108.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_0109.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_010a.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_010b.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_010c.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_010d.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_010e.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_010f.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_0110.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0111.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0112.png | Bin 312 -> 0 bytes font_metro/textures/font_metro_0113.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0114.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_0115.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0116.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_0117.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0118.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0119.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_011a.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_011b.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_011c.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_011d.png | Bin 338 -> 0 bytes font_metro/textures/font_metro_011e.png | Bin 336 -> 0 bytes font_metro/textures/font_metro_011f.png | Bin 336 -> 0 bytes font_metro/textures/font_metro_0120.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_0121.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_0122.png | Bin 342 -> 0 bytes font_metro/textures/font_metro_0123.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_0124.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0125.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0126.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0127.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0128.png | Bin 301 -> 0 bytes font_metro/textures/font_metro_0129.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_012a.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_012b.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_012c.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_012d.png | Bin 305 -> 0 bytes font_metro/textures/font_metro_012e.png | Bin 301 -> 0 bytes font_metro/textures/font_metro_012f.png | Bin 303 -> 0 bytes font_metro/textures/font_metro_0130.png | Bin 294 -> 0 bytes font_metro/textures/font_metro_0131.png | Bin 293 -> 0 bytes font_metro/textures/font_metro_0132.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0133.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_0134.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0135.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_0136.png | Bin 337 -> 0 bytes font_metro/textures/font_metro_0137.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0138.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0139.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_013a.png | Bin 310 -> 0 bytes font_metro/textures/font_metro_013b.png | Bin 305 -> 0 bytes font_metro/textures/font_metro_013c.png | Bin 302 -> 0 bytes font_metro/textures/font_metro_013d.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_013e.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_013f.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0140.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0141.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0142.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0143.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0144.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_0145.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0146.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0147.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0148.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0149.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_014a.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_014b.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_014c.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_014d.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_014e.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_014f.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0150.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0151.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_0152.png | Bin 349 -> 0 bytes font_metro/textures/font_metro_0153.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_0154.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0155.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0156.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0157.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_0158.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0159.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_015a.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_015b.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_015c.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_015d.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_015e.png | Bin 339 -> 0 bytes font_metro/textures/font_metro_015f.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0160.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0161.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_0162.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0163.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0164.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_0165.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0166.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_0167.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0168.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_0169.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_016a.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_016b.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_016c.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_016d.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_016e.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_016f.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_0170.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0171.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0172.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_0173.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_0174.png | Bin 339 -> 0 bytes font_metro/textures/font_metro_0175.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_0176.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0177.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_0178.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0179.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_017a.png | Bin 314 -> 0 bytes font_metro/textures/font_metro_017b.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_017c.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_017d.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_017e.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_017f.png | Bin 302 -> 0 bytes font_metro/textures/font_metro_037e.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_0391.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0392.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0393.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_0394.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0395.png | Bin 310 -> 0 bytes font_metro/textures/font_metro_0396.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_0397.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0398.png | Bin 343 -> 0 bytes font_metro/textures/font_metro_0399.png | Bin 292 -> 0 bytes font_metro/textures/font_metro_039a.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_039b.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_039c.png | Bin 336 -> 0 bytes font_metro/textures/font_metro_039d.png | Bin 322 -> 0 bytes font_metro/textures/font_metro_039e.png | Bin 302 -> 0 bytes font_metro/textures/font_metro_039f.png | Bin 340 -> 0 bytes font_metro/textures/font_metro_03a0.png | Bin 301 -> 0 bytes font_metro/textures/font_metro_03a1.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_03a3.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_03a4.png | Bin 298 -> 0 bytes font_metro/textures/font_metro_03a5.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_03a6.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_03a7.png | Bin 341 -> 0 bytes font_metro/textures/font_metro_03a8.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_03a9.png | Bin 342 -> 0 bytes font_metro/textures/font_metro_03b1.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_03b2.png | Bin 340 -> 0 bytes font_metro/textures/font_metro_03b3.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_03b4.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_03b5.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_03b6.png | Bin 327 -> 0 bytes font_metro/textures/font_metro_03b7.png | Bin 318 -> 0 bytes font_metro/textures/font_metro_03b8.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_03b9.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_03ba.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_03bb.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_03bc.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_03bd.png | Bin 305 -> 0 bytes font_metro/textures/font_metro_03be.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_03bf.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_03c0.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_03c1.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_03c2.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_03c3.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_03c4.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_03c5.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_03c6.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_03c7.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_03c8.png | Bin 312 -> 0 bytes font_metro/textures/font_metro_03c9.png | Bin 315 -> 0 bytes font_metro/textures/font_metro_0402.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0404.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0409.png | Bin 342 -> 0 bytes font_metro/textures/font_metro_040a.png | Bin 339 -> 0 bytes font_metro/textures/font_metro_040b.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_040d.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_040f.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_0410.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0411.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0412.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_0413.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_0414.png | Bin 330 -> 0 bytes font_metro/textures/font_metro_0415.png | Bin 310 -> 0 bytes font_metro/textures/font_metro_0416.png | Bin 349 -> 0 bytes font_metro/textures/font_metro_0417.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0418.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0419.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_041a.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_041b.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_041c.png | Bin 336 -> 0 bytes font_metro/textures/font_metro_041d.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_041e.png | Bin 340 -> 0 bytes font_metro/textures/font_metro_041f.png | Bin 301 -> 0 bytes font_metro/textures/font_metro_0420.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0421.png | Bin 333 -> 0 bytes font_metro/textures/font_metro_0422.png | Bin 298 -> 0 bytes font_metro/textures/font_metro_0423.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_0424.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_0425.png | Bin 341 -> 0 bytes font_metro/textures/font_metro_0426.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0427.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_0428.png | Bin 303 -> 0 bytes font_metro/textures/font_metro_0429.png | Bin 309 -> 0 bytes font_metro/textures/font_metro_042a.png | Bin 329 -> 0 bytes font_metro/textures/font_metro_042b.png | Bin 328 -> 0 bytes font_metro/textures/font_metro_042c.png | Bin 321 -> 0 bytes font_metro/textures/font_metro_042d.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_042e.png | Bin 356 -> 0 bytes font_metro/textures/font_metro_042f.png | Bin 331 -> 0 bytes font_metro/textures/font_metro_0430.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0431.png | Bin 334 -> 0 bytes font_metro/textures/font_metro_0432.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0433.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_0434.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0435.png | Bin 324 -> 0 bytes font_metro/textures/font_metro_0436.png | Bin 335 -> 0 bytes font_metro/textures/font_metro_0437.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_0438.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_0439.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_043a.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_043b.png | Bin 316 -> 0 bytes font_metro/textures/font_metro_043c.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_043d.png | Bin 305 -> 0 bytes font_metro/textures/font_metro_043e.png | Bin 323 -> 0 bytes font_metro/textures/font_metro_043f.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_0440.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_0441.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_0442.png | Bin 299 -> 0 bytes font_metro/textures/font_metro_0443.png | Bin 317 -> 0 bytes font_metro/textures/font_metro_0444.png | Bin 345 -> 0 bytes font_metro/textures/font_metro_0445.png | Bin 311 -> 0 bytes font_metro/textures/font_metro_0446.png | Bin 304 -> 0 bytes font_metro/textures/font_metro_0447.png | Bin 307 -> 0 bytes font_metro/textures/font_metro_0448.png | Bin 300 -> 0 bytes font_metro/textures/font_metro_0449.png | Bin 306 -> 0 bytes font_metro/textures/font_metro_044a.png | Bin 319 -> 0 bytes font_metro/textures/font_metro_044b.png | Bin 313 -> 0 bytes font_metro/textures/font_metro_044c.png | Bin 320 -> 0 bytes font_metro/textures/font_metro_044d.png | Bin 325 -> 0 bytes font_metro/textures/font_metro_044e.png | Bin 332 -> 0 bytes font_metro/textures/font_metro_044f.png | Bin 326 -> 0 bytes font_metro/textures/font_metro_2018.png | Bin 293 -> 0 bytes font_metro/textures/font_metro_2019.png | Bin 294 -> 0 bytes font_metro/textures/font_metro_201c.png | Bin 295 -> 0 bytes font_metro/textures/font_metro_201d.png | Bin 297 -> 0 bytes font_metro/textures/font_metro_20ac.png | Bin 336 -> 0 bytes init.lua | 269 ++++++++++ modpack.txt | 0 ontime_clocks/LICENSE.txt | 166 ------- ontime_clocks/README.md | 49 -- ontime_clocks/common.lua | 61 --- ontime_clocks/copyright.txt | 8 - ontime_clocks/crafts.lua | 75 --- ontime_clocks/depends.txt | 5 - ontime_clocks/init.lua | 31 -- ontime_clocks/intllib.lua | 45 -- ontime_clocks/locale/fr.po | 43 -- ontime_clocks/locale/ms.po | 42 -- ontime_clocks/locale/template.pot | 42 -- ontime_clocks/nodes.lua | 246 ---------- ontime_clocks/textures/ontime_clocks_digital.png | Bin 208 -> 0 bytes .../textures/ontime_clocks_digital_background.png | Bin 197 -> 0 bytes .../textures/ontime_clocks_digital_digit.png | Bin 223 -> 0 bytes ontime_clocks/textures/ontime_clocks_frameless.png | Bin 241 -> 0 bytes .../textures/ontime_clocks_frameless_inventory.png | Bin 426 -> 0 bytes .../ontime_clocks_green_digital_inventory.png | Bin 300 -> 0 bytes .../textures/ontime_clocks_needle_h36.png | Bin 1533 -> 0 bytes .../textures/ontime_clocks_needle_h48.png | Bin 2517 -> 0 bytes .../textures/ontime_clocks_needle_m36.png | Bin 1902 -> 0 bytes .../textures/ontime_clocks_needle_m48.png | Bin 2772 -> 0 bytes .../ontime_clocks_red_digital_inventory.png | Bin 315 -> 0 bytes ontime_clocks/textures/ontime_clocks_white.png | Bin 285 -> 0 bytes .../textures/ontime_clocks_white_inventory.png | Bin 534 -> 0 bytes ontime_clocks/tools/updatepo.sh | 25 - screenshot.png | Bin 444718 -> 0 bytes signs/LICENSE.txt | 166 ------- signs/README.md | 30 -- signs/common.lua | 71 --- signs/compatibility.lua | 90 ---- signs/copyright.txt | 10 - signs/crafts.lua | 18 - signs/depends.txt | 5 - signs/init.lua | 36 -- signs/intllib.lua | 45 -- signs/locale/fr.po | 54 -- signs/locale/ms.po | 51 -- signs/locale/template.pot | 51 -- signs/models/signs_dir_left.obj | 51 -- signs/models/signs_dir_right.obj | 51 -- signs/nodes.lua | 188 ------- signs/svg/black_direction.svg | 128 ----- signs/svg/blue_street.svg | 139 ------ signs/svg/green_street.svg | 104 ---- signs/svg/poster-formspec.svg | 88 ---- signs/svg/poster.svg | 435 ---------------- signs/textures/signs_poster.png | Bin 1600 -> 0 bytes signs/textures/signs_poster_formspec.png | Bin 220402 -> 0 bytes signs/textures/signs_poster_inventory.png | Bin 1582 -> 0 bytes signs/textures/signs_poster_sides.png | Bin 1106 -> 0 bytes signs/textures/signs_wooden.png | Bin 574 -> 0 bytes signs/textures/signs_wooden_direction.png | Bin 816 -> 0 bytes .../textures/signs_wooden_direction_inventory.png | Bin 546 -> 0 bytes signs/textures/signs_wooden_inventory.png | Bin 581 -> 0 bytes signs/tools/updatepo.sh | 25 - signs_api/LICENSE.txt | 166 ------- signs_api/README.md | 29 -- signs_api/copyright.txt | 10 - signs_api/depends.txt | 4 - signs_api/init.lua | 216 -------- signs_api/intllib.lua | 45 -- signs_api/locale/fr.po | 49 -- signs_api/locale/ms.po | 46 -- signs_api/locale/template.pot | 31 -- signs_api/tools/updatepo.sh | 25 - signs_road/LICENSE.txt | 166 ------- signs_road/README.md | 76 --- signs_road/compatibility.lua | 85 ---- signs_road/copyright.txt | 9 - signs_road/crafts.lua | 109 ----- signs_road/depends.txt | 6 - signs_road/init.lua | 37 -- signs_road/intllib.lua | 45 -- signs_road/locale/fr.po | 56 --- signs_road/locale/ms.po | 54 -- signs_road/locale/template.pot | 54 -- signs_road/nodes.lua | 324 ------------ signs_road/svg/green_street.svg | 108 ---- signs_road/svg/signs_blue_street.svg | 139 ------ signs_road/svg/signs_green_direction.svg | 168 ------- signs_road/svg/signs_road_black.svg | 128 ----- signs_road/svg/signs_road_black_direction.svg | 172 ------- signs_road/svg/signs_road_red.svg | 123 ----- signs_road/svg/signs_yellow_direction.svg | 168 ------- signs_road/svg/white_street.svg | 110 ----- signs_road/svg/yellow_street.svg | 108 ---- .../textures/signs_road_black_dir_inventory.png | Bin 265 -> 0 bytes signs_road/textures/signs_road_black_dir_left.png | Bin 263 -> 0 bytes signs_road/textures/signs_road_black_dir_right.png | Bin 258 -> 0 bytes signs_road/textures/signs_road_blue.png | Bin 436 -> 0 bytes signs_road/textures/signs_road_green.png | Bin 305 -> 0 bytes .../textures/signs_road_green_dir_inventory.png | Bin 379 -> 0 bytes signs_road/textures/signs_road_green_direction.png | Bin 1083 -> 0 bytes signs_road/textures/signs_road_large_white.png | Bin 168 -> 0 bytes signs_road/textures/signs_road_red_white.png | Bin 302 -> 0 bytes signs_road/textures/signs_road_sides.png | Bin 374 -> 0 bytes signs_road/textures/signs_road_white.png | Bin 267 -> 0 bytes .../textures/signs_road_white_dir_inventory.png | Bin 289 -> 0 bytes signs_road/textures/signs_road_white_direction.png | Bin 1096 -> 0 bytes signs_road/textures/signs_road_yellow.png | Bin 287 -> 0 bytes .../textures/signs_road_yellow_dir_inventory.png | Bin 342 -> 0 bytes .../textures/signs_road_yellow_direction.png | Bin 1095 -> 0 bytes signs_road/tools/updatepo.sh | 25 - steles/LICENSE.txt | 166 ------- steles/README.md | 25 - steles/config.lua | 37 -- steles/copyright.txt | 9 - steles/crafts.lua | 33 -- steles/depends.txt | 5 - steles/init.lua | 31 -- steles/intllib.lua | 45 -- steles/locale/fr.po | 47 -- steles/locale/ms.po | 46 -- steles/locale/template.pot | 46 -- steles/nodes.lua | 90 ---- steles/tools/updatepo.sh | 25 - 703 files changed, 377 insertions(+), 8797 deletions(-) delete mode 100644 .gitignore delete mode 100644 .gitmodules create mode 100644 API.md delete mode 100644 _config.yml delete mode 100644 boards/LICENSE.txt delete mode 100644 boards/LICENSE_FONT.txt delete mode 100644 boards/copyright.txt delete mode 100644 boards/depends.txt delete mode 100644 boards/font_tinycurs.lua delete mode 100644 boards/init.lua delete mode 100644 boards/intllib.lua delete mode 100644 boards/locale/fr.po delete mode 100644 boards/locale/template.pot delete mode 100644 boards/textures/board_black_front.png delete mode 100644 boards/textures/board_green_front.png delete mode 100644 boards/textures/font_tinycurs_0000.png delete mode 100644 boards/textures/font_tinycurs_0020.png delete mode 100644 boards/textures/font_tinycurs_0021.png delete mode 100644 boards/textures/font_tinycurs_0022.png delete mode 100644 boards/textures/font_tinycurs_0023.png delete mode 100644 boards/textures/font_tinycurs_0024.png delete mode 100644 boards/textures/font_tinycurs_0025.png delete mode 100644 boards/textures/font_tinycurs_0026.png delete mode 100644 boards/textures/font_tinycurs_0027.png delete mode 100644 boards/textures/font_tinycurs_0028.png delete mode 100644 boards/textures/font_tinycurs_0029.png delete mode 100644 boards/textures/font_tinycurs_002a.png delete mode 100644 boards/textures/font_tinycurs_002b.png delete mode 100644 boards/textures/font_tinycurs_002c.png delete mode 100644 boards/textures/font_tinycurs_002d.png delete mode 100644 boards/textures/font_tinycurs_002e.png delete mode 100644 boards/textures/font_tinycurs_002f.png delete mode 100644 boards/textures/font_tinycurs_0030.png delete mode 100644 boards/textures/font_tinycurs_0031.png delete mode 100644 boards/textures/font_tinycurs_0032.png delete mode 100644 boards/textures/font_tinycurs_0033.png delete mode 100644 boards/textures/font_tinycurs_0034.png delete mode 100644 boards/textures/font_tinycurs_0035.png delete mode 100644 boards/textures/font_tinycurs_0036.png delete mode 100644 boards/textures/font_tinycurs_0037.png delete mode 100644 boards/textures/font_tinycurs_0038.png delete mode 100644 boards/textures/font_tinycurs_0039.png delete mode 100644 boards/textures/font_tinycurs_003a.png delete mode 100644 boards/textures/font_tinycurs_003b.png delete mode 100644 boards/textures/font_tinycurs_003c.png delete mode 100644 boards/textures/font_tinycurs_003d.png delete mode 100644 boards/textures/font_tinycurs_003e.png delete mode 100644 boards/textures/font_tinycurs_003f.png delete mode 100644 boards/textures/font_tinycurs_0040.png delete mode 100644 boards/textures/font_tinycurs_0041.png delete mode 100644 boards/textures/font_tinycurs_0042.png delete mode 100644 boards/textures/font_tinycurs_0043.png delete mode 100644 boards/textures/font_tinycurs_0044.png delete mode 100644 boards/textures/font_tinycurs_0045.png delete mode 100644 boards/textures/font_tinycurs_0046.png delete mode 100644 boards/textures/font_tinycurs_0047.png delete mode 100644 boards/textures/font_tinycurs_0048.png delete mode 100644 boards/textures/font_tinycurs_0049.png delete mode 100644 boards/textures/font_tinycurs_004a.png delete mode 100644 boards/textures/font_tinycurs_004b.png delete mode 100644 boards/textures/font_tinycurs_004c.png delete mode 100644 boards/textures/font_tinycurs_004d.png delete mode 100644 boards/textures/font_tinycurs_004e.png delete mode 100644 boards/textures/font_tinycurs_004f.png delete mode 100644 boards/textures/font_tinycurs_0050.png delete mode 100644 boards/textures/font_tinycurs_0051.png delete mode 100644 boards/textures/font_tinycurs_0052.png delete mode 100644 boards/textures/font_tinycurs_0053.png delete mode 100644 boards/textures/font_tinycurs_0054.png delete mode 100644 boards/textures/font_tinycurs_0055.png delete mode 100644 boards/textures/font_tinycurs_0056.png delete mode 100644 boards/textures/font_tinycurs_0057.png delete mode 100644 boards/textures/font_tinycurs_0058.png delete mode 100644 boards/textures/font_tinycurs_0059.png delete mode 100644 boards/textures/font_tinycurs_005a.png delete mode 100644 boards/textures/font_tinycurs_005b.png delete mode 100644 boards/textures/font_tinycurs_005c.png delete mode 100644 boards/textures/font_tinycurs_005d.png delete mode 100644 boards/textures/font_tinycurs_005e.png delete mode 100644 boards/textures/font_tinycurs_005f.png delete mode 100644 boards/textures/font_tinycurs_0060.png delete mode 100644 boards/textures/font_tinycurs_0061.png delete mode 100644 boards/textures/font_tinycurs_0062.png delete mode 100644 boards/textures/font_tinycurs_0063.png delete mode 100644 boards/textures/font_tinycurs_0064.png delete mode 100644 boards/textures/font_tinycurs_0065.png delete mode 100644 boards/textures/font_tinycurs_0066.png delete mode 100644 boards/textures/font_tinycurs_0067.png delete mode 100644 boards/textures/font_tinycurs_0068.png delete mode 100644 boards/textures/font_tinycurs_0069.png delete mode 100644 boards/textures/font_tinycurs_006a.png delete mode 100644 boards/textures/font_tinycurs_006b.png delete mode 100644 boards/textures/font_tinycurs_006c.png delete mode 100644 boards/textures/font_tinycurs_006d.png delete mode 100644 boards/textures/font_tinycurs_006e.png delete mode 100644 boards/textures/font_tinycurs_006f.png delete mode 100644 boards/textures/font_tinycurs_0070.png delete mode 100644 boards/textures/font_tinycurs_0071.png delete mode 100644 boards/textures/font_tinycurs_0072.png delete mode 100644 boards/textures/font_tinycurs_0073.png delete mode 100644 boards/textures/font_tinycurs_0074.png delete mode 100644 boards/textures/font_tinycurs_0075.png delete mode 100644 boards/textures/font_tinycurs_0076.png delete mode 100644 boards/textures/font_tinycurs_0077.png delete mode 100644 boards/textures/font_tinycurs_0078.png delete mode 100644 boards/textures/font_tinycurs_0079.png delete mode 100644 boards/textures/font_tinycurs_007a.png delete mode 100644 boards/textures/font_tinycurs_007b.png delete mode 100644 boards/textures/font_tinycurs_007c.png delete mode 100644 boards/textures/font_tinycurs_007d.png delete mode 100644 boards/textures/font_tinycurs_007e.png delete mode 100644 boards/textures/font_tinycurs_2018.png delete mode 100644 boards/textures/font_tinycurs_2019.png delete mode 100644 boards/textures/font_tinycurs_201c.png delete mode 100644 boards/textures/font_tinycurs_201d.png delete mode 100755 boards/tools/updatepo.sh create mode 100644 copyright.txt create mode 100644 depends.txt delete mode 160000 display_api delete mode 100644 font_api/API.md delete mode 100644 font_api/LICENSE.txt delete mode 100644 font_api/README.md delete mode 100644 font_api/copyright.txt delete mode 100644 font_api/depends.txt delete mode 100644 font_api/doc/font.svg delete mode 100644 font_api/doc/lines.svg delete mode 100644 font_api/font.lua delete mode 100644 font_api/init.lua delete mode 100644 font_api/registry.lua delete mode 100644 font_api/settingtypes.txt delete mode 100755 font_api/tools/make_font_lua.sh delete mode 100755 font_api/tools/make_font_textures.sh delete mode 100644 font_metro/LICENSE.txt delete mode 100644 font_metro/copyright.txt delete mode 100644 font_metro/depends.txt delete mode 100644 font_metro/init.lua delete mode 100644 font_metro/textures/font_metro_0000.png delete mode 100644 font_metro/textures/font_metro_0020.png delete mode 100644 font_metro/textures/font_metro_0021.png delete mode 100644 font_metro/textures/font_metro_0022.png delete mode 100644 font_metro/textures/font_metro_0023.png delete mode 100644 font_metro/textures/font_metro_0024.png delete mode 100644 font_metro/textures/font_metro_0025.png delete mode 100644 font_metro/textures/font_metro_0026.png delete mode 100644 font_metro/textures/font_metro_0027.png delete mode 100644 font_metro/textures/font_metro_0028.png delete mode 100644 font_metro/textures/font_metro_0029.png delete mode 100644 font_metro/textures/font_metro_002a.png delete mode 100644 font_metro/textures/font_metro_002b.png delete mode 100644 font_metro/textures/font_metro_002c.png delete mode 100644 font_metro/textures/font_metro_002d.png delete mode 100644 font_metro/textures/font_metro_002e.png delete mode 100644 font_metro/textures/font_metro_002f.png delete mode 100644 font_metro/textures/font_metro_0030.png delete mode 100644 font_metro/textures/font_metro_0031.png delete mode 100644 font_metro/textures/font_metro_0032.png delete mode 100644 font_metro/textures/font_metro_0033.png delete mode 100644 font_metro/textures/font_metro_0034.png delete mode 100644 font_metro/textures/font_metro_0035.png delete mode 100644 font_metro/textures/font_metro_0036.png delete mode 100644 font_metro/textures/font_metro_0037.png delete mode 100644 font_metro/textures/font_metro_0038.png delete mode 100644 font_metro/textures/font_metro_0039.png delete mode 100644 font_metro/textures/font_metro_003a.png delete mode 100644 font_metro/textures/font_metro_003b.png delete mode 100644 font_metro/textures/font_metro_003c.png delete mode 100644 font_metro/textures/font_metro_003d.png delete mode 100644 font_metro/textures/font_metro_003e.png delete mode 100644 font_metro/textures/font_metro_003f.png delete mode 100644 font_metro/textures/font_metro_0040.png delete mode 100644 font_metro/textures/font_metro_0041.png delete mode 100644 font_metro/textures/font_metro_0042.png delete mode 100644 font_metro/textures/font_metro_0043.png delete mode 100644 font_metro/textures/font_metro_0044.png delete mode 100644 font_metro/textures/font_metro_0045.png delete mode 100644 font_metro/textures/font_metro_0046.png delete mode 100644 font_metro/textures/font_metro_0047.png delete mode 100644 font_metro/textures/font_metro_0048.png delete mode 100644 font_metro/textures/font_metro_0049.png delete mode 100644 font_metro/textures/font_metro_004a.png delete mode 100644 font_metro/textures/font_metro_004b.png delete mode 100644 font_metro/textures/font_metro_004c.png delete mode 100644 font_metro/textures/font_metro_004d.png delete mode 100644 font_metro/textures/font_metro_004e.png delete mode 100644 font_metro/textures/font_metro_004f.png delete mode 100644 font_metro/textures/font_metro_0050.png delete mode 100644 font_metro/textures/font_metro_0051.png delete mode 100644 font_metro/textures/font_metro_0052.png delete mode 100644 font_metro/textures/font_metro_0053.png delete mode 100644 font_metro/textures/font_metro_0054.png delete mode 100644 font_metro/textures/font_metro_0055.png delete mode 100644 font_metro/textures/font_metro_0056.png delete mode 100644 font_metro/textures/font_metro_0057.png delete mode 100644 font_metro/textures/font_metro_0058.png delete mode 100644 font_metro/textures/font_metro_0059.png delete mode 100644 font_metro/textures/font_metro_005a.png delete mode 100644 font_metro/textures/font_metro_005b.png delete mode 100644 font_metro/textures/font_metro_005c.png delete mode 100644 font_metro/textures/font_metro_005d.png delete mode 100644 font_metro/textures/font_metro_005e.png delete mode 100644 font_metro/textures/font_metro_005f.png delete mode 100644 font_metro/textures/font_metro_0060.png delete mode 100644 font_metro/textures/font_metro_0061.png delete mode 100644 font_metro/textures/font_metro_0062.png delete mode 100644 font_metro/textures/font_metro_0063.png delete mode 100644 font_metro/textures/font_metro_0064.png delete mode 100644 font_metro/textures/font_metro_0065.png delete mode 100644 font_metro/textures/font_metro_0066.png delete mode 100644 font_metro/textures/font_metro_0067.png delete mode 100644 font_metro/textures/font_metro_0068.png delete mode 100644 font_metro/textures/font_metro_0069.png delete mode 100644 font_metro/textures/font_metro_006a.png delete mode 100644 font_metro/textures/font_metro_006b.png delete mode 100644 font_metro/textures/font_metro_006c.png delete mode 100644 font_metro/textures/font_metro_006d.png delete mode 100644 font_metro/textures/font_metro_006e.png delete mode 100644 font_metro/textures/font_metro_006f.png delete mode 100644 font_metro/textures/font_metro_0070.png delete mode 100644 font_metro/textures/font_metro_0071.png delete mode 100644 font_metro/textures/font_metro_0072.png delete mode 100644 font_metro/textures/font_metro_0073.png delete mode 100644 font_metro/textures/font_metro_0074.png delete mode 100644 font_metro/textures/font_metro_0075.png delete mode 100644 font_metro/textures/font_metro_0076.png delete mode 100644 font_metro/textures/font_metro_0077.png delete mode 100644 font_metro/textures/font_metro_0078.png delete mode 100644 font_metro/textures/font_metro_0079.png delete mode 100644 font_metro/textures/font_metro_007a.png delete mode 100644 font_metro/textures/font_metro_007b.png delete mode 100644 font_metro/textures/font_metro_007c.png delete mode 100644 font_metro/textures/font_metro_007d.png delete mode 100644 font_metro/textures/font_metro_007e.png delete mode 100644 font_metro/textures/font_metro_00a0.png delete mode 100644 font_metro/textures/font_metro_00a1.png delete mode 100644 font_metro/textures/font_metro_00a2.png delete mode 100644 font_metro/textures/font_metro_00a3.png delete mode 100644 font_metro/textures/font_metro_00a4.png delete mode 100644 font_metro/textures/font_metro_00a5.png delete mode 100644 font_metro/textures/font_metro_00a6.png delete mode 100644 font_metro/textures/font_metro_00a7.png delete mode 100644 font_metro/textures/font_metro_00a8.png delete mode 100644 font_metro/textures/font_metro_00a9.png delete mode 100644 font_metro/textures/font_metro_00aa.png delete mode 100644 font_metro/textures/font_metro_00ab.png delete mode 100644 font_metro/textures/font_metro_00ac.png delete mode 100644 font_metro/textures/font_metro_00ad.png delete mode 100644 font_metro/textures/font_metro_00ae.png delete mode 100644 font_metro/textures/font_metro_00af.png delete mode 100644 font_metro/textures/font_metro_00b0.png delete mode 100644 font_metro/textures/font_metro_00b1.png delete mode 100644 font_metro/textures/font_metro_00b2.png delete mode 100644 font_metro/textures/font_metro_00b3.png delete mode 100644 font_metro/textures/font_metro_00b4.png delete mode 100644 font_metro/textures/font_metro_00b5.png delete mode 100644 font_metro/textures/font_metro_00b6.png delete mode 100644 font_metro/textures/font_metro_00b7.png delete mode 100644 font_metro/textures/font_metro_00b8.png delete mode 100644 font_metro/textures/font_metro_00b9.png delete mode 100644 font_metro/textures/font_metro_00ba.png delete mode 100644 font_metro/textures/font_metro_00bb.png delete mode 100644 font_metro/textures/font_metro_00bc.png delete mode 100644 font_metro/textures/font_metro_00bd.png delete mode 100644 font_metro/textures/font_metro_00be.png delete mode 100644 font_metro/textures/font_metro_00bf.png delete mode 100644 font_metro/textures/font_metro_00c0.png delete mode 100644 font_metro/textures/font_metro_00c1.png delete mode 100644 font_metro/textures/font_metro_00c2.png delete mode 100644 font_metro/textures/font_metro_00c3.png delete mode 100644 font_metro/textures/font_metro_00c4.png delete mode 100644 font_metro/textures/font_metro_00c5.png delete mode 100644 font_metro/textures/font_metro_00c6.png delete mode 100644 font_metro/textures/font_metro_00c7.png delete mode 100644 font_metro/textures/font_metro_00c8.png delete mode 100644 font_metro/textures/font_metro_00c9.png delete mode 100644 font_metro/textures/font_metro_00ca.png delete mode 100644 font_metro/textures/font_metro_00cb.png delete mode 100644 font_metro/textures/font_metro_00cc.png delete mode 100644 font_metro/textures/font_metro_00cd.png delete mode 100644 font_metro/textures/font_metro_00ce.png delete mode 100644 font_metro/textures/font_metro_00cf.png delete mode 100644 font_metro/textures/font_metro_00d0.png delete mode 100644 font_metro/textures/font_metro_00d1.png delete mode 100644 font_metro/textures/font_metro_00d2.png delete mode 100644 font_metro/textures/font_metro_00d3.png delete mode 100644 font_metro/textures/font_metro_00d4.png delete mode 100644 font_metro/textures/font_metro_00d5.png delete mode 100644 font_metro/textures/font_metro_00d6.png delete mode 100644 font_metro/textures/font_metro_00d7.png delete mode 100644 font_metro/textures/font_metro_00d8.png delete mode 100644 font_metro/textures/font_metro_00d9.png delete mode 100644 font_metro/textures/font_metro_00da.png delete mode 100644 font_metro/textures/font_metro_00db.png delete mode 100644 font_metro/textures/font_metro_00dc.png delete mode 100644 font_metro/textures/font_metro_00dd.png delete mode 100644 font_metro/textures/font_metro_00de.png delete mode 100644 font_metro/textures/font_metro_00df.png delete mode 100644 font_metro/textures/font_metro_00e0.png delete mode 100644 font_metro/textures/font_metro_00e1.png delete mode 100644 font_metro/textures/font_metro_00e2.png delete mode 100644 font_metro/textures/font_metro_00e3.png delete mode 100644 font_metro/textures/font_metro_00e4.png delete mode 100644 font_metro/textures/font_metro_00e5.png delete mode 100644 font_metro/textures/font_metro_00e6.png delete mode 100644 font_metro/textures/font_metro_00e7.png delete mode 100644 font_metro/textures/font_metro_00e8.png delete mode 100644 font_metro/textures/font_metro_00e9.png delete mode 100644 font_metro/textures/font_metro_00ea.png delete mode 100644 font_metro/textures/font_metro_00eb.png delete mode 100644 font_metro/textures/font_metro_00ec.png delete mode 100644 font_metro/textures/font_metro_00ed.png delete mode 100644 font_metro/textures/font_metro_00ee.png delete mode 100644 font_metro/textures/font_metro_00ef.png delete mode 100644 font_metro/textures/font_metro_00f0.png delete mode 100644 font_metro/textures/font_metro_00f1.png delete mode 100644 font_metro/textures/font_metro_00f2.png delete mode 100644 font_metro/textures/font_metro_00f3.png delete mode 100644 font_metro/textures/font_metro_00f4.png delete mode 100644 font_metro/textures/font_metro_00f5.png delete mode 100644 font_metro/textures/font_metro_00f6.png delete mode 100644 font_metro/textures/font_metro_00f7.png delete mode 100644 font_metro/textures/font_metro_00f8.png delete mode 100644 font_metro/textures/font_metro_00f9.png delete mode 100644 font_metro/textures/font_metro_00fa.png delete mode 100644 font_metro/textures/font_metro_00fb.png delete mode 100644 font_metro/textures/font_metro_00fc.png delete mode 100644 font_metro/textures/font_metro_00fd.png delete mode 100644 font_metro/textures/font_metro_00fe.png delete mode 100644 font_metro/textures/font_metro_00ff.png delete mode 100644 font_metro/textures/font_metro_0100.png delete mode 100644 font_metro/textures/font_metro_0101.png delete mode 100644 font_metro/textures/font_metro_0102.png delete mode 100644 font_metro/textures/font_metro_0103.png delete mode 100644 font_metro/textures/font_metro_0104.png delete mode 100644 font_metro/textures/font_metro_0105.png delete mode 100644 font_metro/textures/font_metro_0106.png delete mode 100644 font_metro/textures/font_metro_0107.png delete mode 100644 font_metro/textures/font_metro_0108.png delete mode 100644 font_metro/textures/font_metro_0109.png delete mode 100644 font_metro/textures/font_metro_010a.png delete mode 100644 font_metro/textures/font_metro_010b.png delete mode 100644 font_metro/textures/font_metro_010c.png delete mode 100644 font_metro/textures/font_metro_010d.png delete mode 100644 font_metro/textures/font_metro_010e.png delete mode 100644 font_metro/textures/font_metro_010f.png delete mode 100644 font_metro/textures/font_metro_0110.png delete mode 100644 font_metro/textures/font_metro_0111.png delete mode 100644 font_metro/textures/font_metro_0112.png delete mode 100644 font_metro/textures/font_metro_0113.png delete mode 100644 font_metro/textures/font_metro_0114.png delete mode 100644 font_metro/textures/font_metro_0115.png delete mode 100644 font_metro/textures/font_metro_0116.png delete mode 100644 font_metro/textures/font_metro_0117.png delete mode 100644 font_metro/textures/font_metro_0118.png delete mode 100644 font_metro/textures/font_metro_0119.png delete mode 100644 font_metro/textures/font_metro_011a.png delete mode 100644 font_metro/textures/font_metro_011b.png delete mode 100644 font_metro/textures/font_metro_011c.png delete mode 100644 font_metro/textures/font_metro_011d.png delete mode 100644 font_metro/textures/font_metro_011e.png delete mode 100644 font_metro/textures/font_metro_011f.png delete mode 100644 font_metro/textures/font_metro_0120.png delete mode 100644 font_metro/textures/font_metro_0121.png delete mode 100644 font_metro/textures/font_metro_0122.png delete mode 100644 font_metro/textures/font_metro_0123.png delete mode 100644 font_metro/textures/font_metro_0124.png delete mode 100644 font_metro/textures/font_metro_0125.png delete mode 100644 font_metro/textures/font_metro_0126.png delete mode 100644 font_metro/textures/font_metro_0127.png delete mode 100644 font_metro/textures/font_metro_0128.png delete mode 100644 font_metro/textures/font_metro_0129.png delete mode 100644 font_metro/textures/font_metro_012a.png delete mode 100644 font_metro/textures/font_metro_012b.png delete mode 100644 font_metro/textures/font_metro_012c.png delete mode 100644 font_metro/textures/font_metro_012d.png delete mode 100644 font_metro/textures/font_metro_012e.png delete mode 100644 font_metro/textures/font_metro_012f.png delete mode 100644 font_metro/textures/font_metro_0130.png delete mode 100644 font_metro/textures/font_metro_0131.png delete mode 100644 font_metro/textures/font_metro_0132.png delete mode 100644 font_metro/textures/font_metro_0133.png delete mode 100644 font_metro/textures/font_metro_0134.png delete mode 100644 font_metro/textures/font_metro_0135.png delete mode 100644 font_metro/textures/font_metro_0136.png delete mode 100644 font_metro/textures/font_metro_0137.png delete mode 100644 font_metro/textures/font_metro_0138.png delete mode 100644 font_metro/textures/font_metro_0139.png delete mode 100644 font_metro/textures/font_metro_013a.png delete mode 100644 font_metro/textures/font_metro_013b.png delete mode 100644 font_metro/textures/font_metro_013c.png delete mode 100644 font_metro/textures/font_metro_013d.png delete mode 100644 font_metro/textures/font_metro_013e.png delete mode 100644 font_metro/textures/font_metro_013f.png delete mode 100644 font_metro/textures/font_metro_0140.png delete mode 100644 font_metro/textures/font_metro_0141.png delete mode 100644 font_metro/textures/font_metro_0142.png delete mode 100644 font_metro/textures/font_metro_0143.png delete mode 100644 font_metro/textures/font_metro_0144.png delete mode 100644 font_metro/textures/font_metro_0145.png delete mode 100644 font_metro/textures/font_metro_0146.png delete mode 100644 font_metro/textures/font_metro_0147.png delete mode 100644 font_metro/textures/font_metro_0148.png delete mode 100644 font_metro/textures/font_metro_0149.png delete mode 100644 font_metro/textures/font_metro_014a.png delete mode 100644 font_metro/textures/font_metro_014b.png delete mode 100644 font_metro/textures/font_metro_014c.png delete mode 100644 font_metro/textures/font_metro_014d.png delete mode 100644 font_metro/textures/font_metro_014e.png delete mode 100644 font_metro/textures/font_metro_014f.png delete mode 100644 font_metro/textures/font_metro_0150.png delete mode 100644 font_metro/textures/font_metro_0151.png delete mode 100644 font_metro/textures/font_metro_0152.png delete mode 100644 font_metro/textures/font_metro_0153.png delete mode 100644 font_metro/textures/font_metro_0154.png delete mode 100644 font_metro/textures/font_metro_0155.png delete mode 100644 font_metro/textures/font_metro_0156.png delete mode 100644 font_metro/textures/font_metro_0157.png delete mode 100644 font_metro/textures/font_metro_0158.png delete mode 100644 font_metro/textures/font_metro_0159.png delete mode 100644 font_metro/textures/font_metro_015a.png delete mode 100644 font_metro/textures/font_metro_015b.png delete mode 100644 font_metro/textures/font_metro_015c.png delete mode 100644 font_metro/textures/font_metro_015d.png delete mode 100644 font_metro/textures/font_metro_015e.png delete mode 100644 font_metro/textures/font_metro_015f.png delete mode 100644 font_metro/textures/font_metro_0160.png delete mode 100644 font_metro/textures/font_metro_0161.png delete mode 100644 font_metro/textures/font_metro_0162.png delete mode 100644 font_metro/textures/font_metro_0163.png delete mode 100644 font_metro/textures/font_metro_0164.png delete mode 100644 font_metro/textures/font_metro_0165.png delete mode 100644 font_metro/textures/font_metro_0166.png delete mode 100644 font_metro/textures/font_metro_0167.png delete mode 100644 font_metro/textures/font_metro_0168.png delete mode 100644 font_metro/textures/font_metro_0169.png delete mode 100644 font_metro/textures/font_metro_016a.png delete mode 100644 font_metro/textures/font_metro_016b.png delete mode 100644 font_metro/textures/font_metro_016c.png delete mode 100644 font_metro/textures/font_metro_016d.png delete mode 100644 font_metro/textures/font_metro_016e.png delete mode 100644 font_metro/textures/font_metro_016f.png delete mode 100644 font_metro/textures/font_metro_0170.png delete mode 100644 font_metro/textures/font_metro_0171.png delete mode 100644 font_metro/textures/font_metro_0172.png delete mode 100644 font_metro/textures/font_metro_0173.png delete mode 100644 font_metro/textures/font_metro_0174.png delete mode 100644 font_metro/textures/font_metro_0175.png delete mode 100644 font_metro/textures/font_metro_0176.png delete mode 100644 font_metro/textures/font_metro_0177.png delete mode 100644 font_metro/textures/font_metro_0178.png delete mode 100644 font_metro/textures/font_metro_0179.png delete mode 100644 font_metro/textures/font_metro_017a.png delete mode 100644 font_metro/textures/font_metro_017b.png delete mode 100644 font_metro/textures/font_metro_017c.png delete mode 100644 font_metro/textures/font_metro_017d.png delete mode 100644 font_metro/textures/font_metro_017e.png delete mode 100644 font_metro/textures/font_metro_017f.png delete mode 100644 font_metro/textures/font_metro_037e.png delete mode 100644 font_metro/textures/font_metro_0391.png delete mode 100644 font_metro/textures/font_metro_0392.png delete mode 100644 font_metro/textures/font_metro_0393.png delete mode 100644 font_metro/textures/font_metro_0394.png delete mode 100644 font_metro/textures/font_metro_0395.png delete mode 100644 font_metro/textures/font_metro_0396.png delete mode 100644 font_metro/textures/font_metro_0397.png delete mode 100644 font_metro/textures/font_metro_0398.png delete mode 100644 font_metro/textures/font_metro_0399.png delete mode 100644 font_metro/textures/font_metro_039a.png delete mode 100644 font_metro/textures/font_metro_039b.png delete mode 100644 font_metro/textures/font_metro_039c.png delete mode 100644 font_metro/textures/font_metro_039d.png delete mode 100644 font_metro/textures/font_metro_039e.png delete mode 100644 font_metro/textures/font_metro_039f.png delete mode 100644 font_metro/textures/font_metro_03a0.png delete mode 100644 font_metro/textures/font_metro_03a1.png delete mode 100644 font_metro/textures/font_metro_03a3.png delete mode 100644 font_metro/textures/font_metro_03a4.png delete mode 100644 font_metro/textures/font_metro_03a5.png delete mode 100644 font_metro/textures/font_metro_03a6.png delete mode 100644 font_metro/textures/font_metro_03a7.png delete mode 100644 font_metro/textures/font_metro_03a8.png delete mode 100644 font_metro/textures/font_metro_03a9.png delete mode 100644 font_metro/textures/font_metro_03b1.png delete mode 100644 font_metro/textures/font_metro_03b2.png delete mode 100644 font_metro/textures/font_metro_03b3.png delete mode 100644 font_metro/textures/font_metro_03b4.png delete mode 100644 font_metro/textures/font_metro_03b5.png delete mode 100644 font_metro/textures/font_metro_03b6.png delete mode 100644 font_metro/textures/font_metro_03b7.png delete mode 100644 font_metro/textures/font_metro_03b8.png delete mode 100644 font_metro/textures/font_metro_03b9.png delete mode 100644 font_metro/textures/font_metro_03ba.png delete mode 100644 font_metro/textures/font_metro_03bb.png delete mode 100644 font_metro/textures/font_metro_03bc.png delete mode 100644 font_metro/textures/font_metro_03bd.png delete mode 100644 font_metro/textures/font_metro_03be.png delete mode 100644 font_metro/textures/font_metro_03bf.png delete mode 100644 font_metro/textures/font_metro_03c0.png delete mode 100644 font_metro/textures/font_metro_03c1.png delete mode 100644 font_metro/textures/font_metro_03c2.png delete mode 100644 font_metro/textures/font_metro_03c3.png delete mode 100644 font_metro/textures/font_metro_03c4.png delete mode 100644 font_metro/textures/font_metro_03c5.png delete mode 100644 font_metro/textures/font_metro_03c6.png delete mode 100644 font_metro/textures/font_metro_03c7.png delete mode 100644 font_metro/textures/font_metro_03c8.png delete mode 100644 font_metro/textures/font_metro_03c9.png delete mode 100644 font_metro/textures/font_metro_0402.png delete mode 100644 font_metro/textures/font_metro_0404.png delete mode 100644 font_metro/textures/font_metro_0409.png delete mode 100644 font_metro/textures/font_metro_040a.png delete mode 100644 font_metro/textures/font_metro_040b.png delete mode 100644 font_metro/textures/font_metro_040d.png delete mode 100644 font_metro/textures/font_metro_040f.png delete mode 100644 font_metro/textures/font_metro_0410.png delete mode 100644 font_metro/textures/font_metro_0411.png delete mode 100644 font_metro/textures/font_metro_0412.png delete mode 100644 font_metro/textures/font_metro_0413.png delete mode 100644 font_metro/textures/font_metro_0414.png delete mode 100644 font_metro/textures/font_metro_0415.png delete mode 100644 font_metro/textures/font_metro_0416.png delete mode 100644 font_metro/textures/font_metro_0417.png delete mode 100644 font_metro/textures/font_metro_0418.png delete mode 100644 font_metro/textures/font_metro_0419.png delete mode 100644 font_metro/textures/font_metro_041a.png delete mode 100644 font_metro/textures/font_metro_041b.png delete mode 100644 font_metro/textures/font_metro_041c.png delete mode 100644 font_metro/textures/font_metro_041d.png delete mode 100644 font_metro/textures/font_metro_041e.png delete mode 100644 font_metro/textures/font_metro_041f.png delete mode 100644 font_metro/textures/font_metro_0420.png delete mode 100644 font_metro/textures/font_metro_0421.png delete mode 100644 font_metro/textures/font_metro_0422.png delete mode 100644 font_metro/textures/font_metro_0423.png delete mode 100644 font_metro/textures/font_metro_0424.png delete mode 100644 font_metro/textures/font_metro_0425.png delete mode 100644 font_metro/textures/font_metro_0426.png delete mode 100644 font_metro/textures/font_metro_0427.png delete mode 100644 font_metro/textures/font_metro_0428.png delete mode 100644 font_metro/textures/font_metro_0429.png delete mode 100644 font_metro/textures/font_metro_042a.png delete mode 100644 font_metro/textures/font_metro_042b.png delete mode 100644 font_metro/textures/font_metro_042c.png delete mode 100644 font_metro/textures/font_metro_042d.png delete mode 100644 font_metro/textures/font_metro_042e.png delete mode 100644 font_metro/textures/font_metro_042f.png delete mode 100644 font_metro/textures/font_metro_0430.png delete mode 100644 font_metro/textures/font_metro_0431.png delete mode 100644 font_metro/textures/font_metro_0432.png delete mode 100644 font_metro/textures/font_metro_0433.png delete mode 100644 font_metro/textures/font_metro_0434.png delete mode 100644 font_metro/textures/font_metro_0435.png delete mode 100644 font_metro/textures/font_metro_0436.png delete mode 100644 font_metro/textures/font_metro_0437.png delete mode 100644 font_metro/textures/font_metro_0438.png delete mode 100644 font_metro/textures/font_metro_0439.png delete mode 100644 font_metro/textures/font_metro_043a.png delete mode 100644 font_metro/textures/font_metro_043b.png delete mode 100644 font_metro/textures/font_metro_043c.png delete mode 100644 font_metro/textures/font_metro_043d.png delete mode 100644 font_metro/textures/font_metro_043e.png delete mode 100644 font_metro/textures/font_metro_043f.png delete mode 100644 font_metro/textures/font_metro_0440.png delete mode 100644 font_metro/textures/font_metro_0441.png delete mode 100644 font_metro/textures/font_metro_0442.png delete mode 100644 font_metro/textures/font_metro_0443.png delete mode 100644 font_metro/textures/font_metro_0444.png delete mode 100644 font_metro/textures/font_metro_0445.png delete mode 100644 font_metro/textures/font_metro_0446.png delete mode 100644 font_metro/textures/font_metro_0447.png delete mode 100644 font_metro/textures/font_metro_0448.png delete mode 100644 font_metro/textures/font_metro_0449.png delete mode 100644 font_metro/textures/font_metro_044a.png delete mode 100644 font_metro/textures/font_metro_044b.png delete mode 100644 font_metro/textures/font_metro_044c.png delete mode 100644 font_metro/textures/font_metro_044d.png delete mode 100644 font_metro/textures/font_metro_044e.png delete mode 100644 font_metro/textures/font_metro_044f.png delete mode 100644 font_metro/textures/font_metro_2018.png delete mode 100644 font_metro/textures/font_metro_2019.png delete mode 100644 font_metro/textures/font_metro_201c.png delete mode 100644 font_metro/textures/font_metro_201d.png delete mode 100644 font_metro/textures/font_metro_20ac.png create mode 100644 init.lua delete mode 100644 modpack.txt delete mode 100644 ontime_clocks/LICENSE.txt delete mode 100644 ontime_clocks/README.md delete mode 100644 ontime_clocks/common.lua delete mode 100644 ontime_clocks/copyright.txt delete mode 100644 ontime_clocks/crafts.lua delete mode 100644 ontime_clocks/depends.txt delete mode 100644 ontime_clocks/init.lua delete mode 100644 ontime_clocks/intllib.lua delete mode 100644 ontime_clocks/locale/fr.po delete mode 100644 ontime_clocks/locale/ms.po delete mode 100644 ontime_clocks/locale/template.pot delete mode 100644 ontime_clocks/nodes.lua delete mode 100644 ontime_clocks/textures/ontime_clocks_digital.png delete mode 100644 ontime_clocks/textures/ontime_clocks_digital_background.png delete mode 100644 ontime_clocks/textures/ontime_clocks_digital_digit.png delete mode 100644 ontime_clocks/textures/ontime_clocks_frameless.png delete mode 100644 ontime_clocks/textures/ontime_clocks_frameless_inventory.png delete mode 100644 ontime_clocks/textures/ontime_clocks_green_digital_inventory.png delete mode 100644 ontime_clocks/textures/ontime_clocks_needle_h36.png delete mode 100644 ontime_clocks/textures/ontime_clocks_needle_h48.png delete mode 100644 ontime_clocks/textures/ontime_clocks_needle_m36.png delete mode 100644 ontime_clocks/textures/ontime_clocks_needle_m48.png delete mode 100644 ontime_clocks/textures/ontime_clocks_red_digital_inventory.png delete mode 100644 ontime_clocks/textures/ontime_clocks_white.png delete mode 100644 ontime_clocks/textures/ontime_clocks_white_inventory.png delete mode 100755 ontime_clocks/tools/updatepo.sh delete mode 100644 screenshot.png delete mode 100644 signs/LICENSE.txt delete mode 100644 signs/README.md delete mode 100644 signs/common.lua delete mode 100644 signs/compatibility.lua delete mode 100644 signs/copyright.txt delete mode 100644 signs/crafts.lua delete mode 100644 signs/depends.txt delete mode 100644 signs/init.lua delete mode 100644 signs/intllib.lua delete mode 100644 signs/locale/fr.po delete mode 100644 signs/locale/ms.po delete mode 100644 signs/locale/template.pot delete mode 100644 signs/models/signs_dir_left.obj delete mode 100644 signs/models/signs_dir_right.obj delete mode 100644 signs/nodes.lua delete mode 100644 signs/svg/black_direction.svg delete mode 100644 signs/svg/blue_street.svg delete mode 100644 signs/svg/green_street.svg delete mode 100644 signs/svg/poster-formspec.svg delete mode 100644 signs/svg/poster.svg delete mode 100644 signs/textures/signs_poster.png delete mode 100644 signs/textures/signs_poster_formspec.png delete mode 100644 signs/textures/signs_poster_inventory.png delete mode 100644 signs/textures/signs_poster_sides.png delete mode 100644 signs/textures/signs_wooden.png delete mode 100644 signs/textures/signs_wooden_direction.png delete mode 100644 signs/textures/signs_wooden_direction_inventory.png delete mode 100644 signs/textures/signs_wooden_inventory.png delete mode 100755 signs/tools/updatepo.sh delete mode 100644 signs_api/LICENSE.txt delete mode 100644 signs_api/README.md delete mode 100644 signs_api/copyright.txt delete mode 100644 signs_api/depends.txt delete mode 100644 signs_api/init.lua delete mode 100644 signs_api/intllib.lua delete mode 100644 signs_api/locale/fr.po delete mode 100644 signs_api/locale/ms.po delete mode 100644 signs_api/locale/template.pot delete mode 100755 signs_api/tools/updatepo.sh delete mode 100644 signs_road/LICENSE.txt delete mode 100644 signs_road/README.md delete mode 100644 signs_road/compatibility.lua delete mode 100644 signs_road/copyright.txt delete mode 100644 signs_road/crafts.lua delete mode 100644 signs_road/depends.txt delete mode 100644 signs_road/init.lua delete mode 100644 signs_road/intllib.lua delete mode 100644 signs_road/locale/fr.po delete mode 100644 signs_road/locale/ms.po delete mode 100644 signs_road/locale/template.pot delete mode 100644 signs_road/nodes.lua delete mode 100644 signs_road/svg/green_street.svg delete mode 100644 signs_road/svg/signs_blue_street.svg delete mode 100644 signs_road/svg/signs_green_direction.svg delete mode 100644 signs_road/svg/signs_road_black.svg delete mode 100644 signs_road/svg/signs_road_black_direction.svg delete mode 100644 signs_road/svg/signs_road_red.svg delete mode 100644 signs_road/svg/signs_yellow_direction.svg delete mode 100644 signs_road/svg/white_street.svg delete mode 100644 signs_road/svg/yellow_street.svg delete mode 100644 signs_road/textures/signs_road_black_dir_inventory.png delete mode 100644 signs_road/textures/signs_road_black_dir_left.png delete mode 100644 signs_road/textures/signs_road_black_dir_right.png delete mode 100644 signs_road/textures/signs_road_blue.png delete mode 100644 signs_road/textures/signs_road_green.png delete mode 100644 signs_road/textures/signs_road_green_dir_inventory.png delete mode 100644 signs_road/textures/signs_road_green_direction.png delete mode 100644 signs_road/textures/signs_road_large_white.png delete mode 100644 signs_road/textures/signs_road_red_white.png delete mode 100644 signs_road/textures/signs_road_sides.png delete mode 100644 signs_road/textures/signs_road_white.png delete mode 100644 signs_road/textures/signs_road_white_dir_inventory.png delete mode 100644 signs_road/textures/signs_road_white_direction.png delete mode 100644 signs_road/textures/signs_road_yellow.png delete mode 100644 signs_road/textures/signs_road_yellow_dir_inventory.png delete mode 100644 signs_road/textures/signs_road_yellow_direction.png delete mode 100755 signs_road/tools/updatepo.sh delete mode 100644 steles/LICENSE.txt delete mode 100644 steles/README.md delete mode 100644 steles/config.lua delete mode 100644 steles/copyright.txt delete mode 100644 steles/crafts.lua delete mode 100644 steles/depends.txt delete mode 100644 steles/init.lua delete mode 100644 steles/intllib.lua delete mode 100644 steles/locale/fr.po delete mode 100644 steles/locale/ms.po delete mode 100644 steles/locale/template.pot delete mode 100644 steles/nodes.lua delete mode 100755 steles/tools/updatepo.sh diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c6f5712..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -_* - diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index a28a34b..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "display_api"] - path = display_api - url = https://github.com/pyrollo/display_api.git diff --git a/API.md b/API.md new file mode 100644 index 0000000..0d52e29 --- /dev/null +++ b/API.md @@ -0,0 +1,94 @@ +# Display Lib API +This document describes Display Lib API. Display Lib allows to add a dynamic display on a node. Display Lib limits node rotations. For wallmounted, only vertical positionning is available, and for facedir, only first four position are availabel (those with default axis). + +## Provided methods +### update\_entities +**display\_lib.update\_entities(pos)** + +This method triggers entities update for the display node at pos. Actual entity update is made by `on_display_update` callback associated to the entity. + +`pos`: Position of the node +### register\_display\_entity +**display\_lib.register\_display\_entity(entity_name)** + +This is a helper to register entities used for display. + +`entity_name`: Name of the entity to register. +## Provided callback implementations +### on_place +**display\_lib.on\_place(itemstack, placer, pointed\_thing)** + +`on_place` node callback implementation. Display nodes should have this callback (avoid placement of horizontal display node). +### on_construct +**display\_lib.on\_construct(pos)** + +`on_construct` node callback implementation. Display nodes should have this callback (creates, places and updates display entities on node construction). +### on_destruct +**display\_lib.on_destruct(pos)** + +`on_destruct` node callback implementation. Display nodes should have this callback (removes display entities on node destruction). +### on_rotate +**display\_lib.on\_rotate(pos, node, user, mode, new_param2)** + +`on_rotate` node callback implementation. Display nodes should have this callback (restricts rotations and rotates display entities associated with node). +### on_activate +**display\_lib.on_activate(entity, staticdata)** + +`On_activate` entity callback implementation for display entities. No need of this method if display entities have been registered using `register_display_entity` (callback is already set). + +## Howto register a display node +* Register display entities with `register_display_entity` + +* Register node with : + - `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks. +  + - `display_modpack_node` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects). +  + - a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields. + +### Display_entities fields +`on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item. + +`depth`, `right` and `height` : Entity position regarding to node facedir/wallmounted main axis. +Values for these fields can be any number between -1.5 and 1.5 (default value is 0). +Position 0,0,0 is the center of the node. +`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5). + +In order to avoid flickering text, it's better to have text a little behind node surface. A good spacing value is given by `display_api.entity_spacing` variable. + +### Example + + display_api.register_display_entity("mymod:entity1") + display_api.register_display_entity("mymod:entity2") + + function my_display_update1(pos, objref) + objref:set_properties({ textures= {"mytexture1.png"}, + visual_size = {x=1, y=1} }) + end + + function my_display_update2(pos, objref) + objref:set_properties({ textures= {"mytexture2.png"}, +                         visual_size = {x=1, y=1} }) + end + + minetest.register_node("mymod:test_display_node", { + ... + paramtype2 = "facedir", + ... + groups = { display_modpack_node = 1, ... }, + ... + display_entities = { + ["mymod:entity1"] = { + depth = 0.3, + on_display_update = my_display_update1 }, + ["mymod:entity1"] = { + depth = 0.2, height = 0.1, + on_display_update = my_display_update2 }, + }, + ... + on_place = display_api.on_place, + on_construct = display_api.on_construct, + on_destruct = display_api.on_destruct, + on_rotate = display_api.on_rotate, + ... + }) diff --git a/LICENSE.txt b/LICENSE.txt index 65c5ca8..341c30b 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -163,3 +163,4 @@ whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. + diff --git a/README.md b/README.md index 13abfca..f51996d 100644 --- a/README.md +++ b/README.md @@ -1,100 +1,14 @@ -# Display Modpack -Version 1.1.1 +# Display Lib -This modpack provides mods with dynamic display. Mods are : +This library's purpose is to ease creation of nodes with one or more displays on sides. For example, signs and clocks. Display can be dynamic and/or different for each node instance. -- **display_api**: A library for adding display entities to nodes; -- **font_api**: A library for displaying fonts on entities; -- **signs_api**: A library for the easy creation of signs; +**Limitations**: This lib uses entities to draw display. This means display has to be vertical. So display nodes rotation are limitated to "upside up" positions. -- **boards**: A mod providing school boards; -- **ontime_clocks**: A mod providing clocks which display the ingame time; -- **signs**: A mod providing signs and direction signs displaying text; -- **signs_road**: A mod providing road signs displaying text; -- **steles**: A mod providing stone steles with text; +**Dependancies**:default -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -![Presentation image of Display_Modpack](screenshot.png) - -## Changelog - -### 2018-07-16 (Version 1.1.1) - -- Boards mod added. - -- Bug fix in default font chosing when multiple font registered. - -### 2018-07-13 (Version 1.1.0) - -- Font API rework introducing Font class. - -- Replaced default Epilepsy Font by Metro Font for licensing purposes, - -- Rework of all nodes displaying text accordingly to the Font API rework. - -As font_epilepsy mod has been replaced by font_metro mod, **don't forget to activate font_metro mod after updating** or you won't have any text displayed. - -### 2018-05-30 (Version 1.0.1) - -Mostly bug fixes : - -- Fix steles orientation when placing - -- Update entity on mapblock load - -- Use default formspec style - -- Fix ndef nill value in steles mod when technics not installed - -- Seperate signs API from signs définitions - -- Allow a greater offset between display and block - -### 2018-01-13 (Version 1.0) - -- Switch to Epilepsy font by KREATIVE SOFTWARE - -- Add settings "default_font" - -- Add horizontal alignment - -- Add tool for creating font textures from .ttf font files - -- Fix UTF 8 to Unicode decoding - -- Updated forum thread link in README.md - -### 2017-12-19 - -This change is a preparation to merge Andrzej Pieńkowski fork (apienk) : new font and support of UTF chars. - -- Font\_lib support for multiple fonts (nothing yet visible in mods) ; - -- Font\_lib support for Unicode characters (limited to Unicode Plane 0: 0000-FFFF, see [Wikipedia](https://en.wikipedia.org/wiki/Unicode)) ; - -- New "default" font with original textures from Vanessa Ezekowitz (VanessaE) ; - -### 2017-12-10 - -- Compatibility of signs mod with signs_lib (thanks to gpcf) ; - -- Added large banner in road signs (thanks to gpcf) ; - -### 2017-08-26 - -- Changed signs from wallmounted to facedir to improve textures and make it possible to use screwdriver. -**IMPORTANT** : Map will be updated to change to new nodes but inventory items will turn into "Unknown items" and have to be re-crafted. - -- Intllib support added with french translation (whole modpack, thanks to fat115) ; - -- Punch on nodes to update entity (signs, signs_road and steles). Usefull in case of /clearobjects ; - -- Changed wooden direction sign textures (signs) ; - -- Added back and side textures to all signs (road_signs) ; - -- Added more sign types : White/yellow/green signs and direction signs (signs_road) ; +**License**: LPGL +**API**: See [API.md](https://github.com/pyrollo/display_modpack/blob/master/display_api/API.md) document please. +For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 2f7efbe..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-minimal \ No newline at end of file diff --git a/boards/LICENSE.txt b/boards/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/boards/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/boards/LICENSE_FONT.txt b/boards/LICENSE_FONT.txt deleted file mode 100644 index 29d0f9b..0000000 --- a/boards/LICENSE_FONT.txt +++ /dev/null @@ -1,4 +0,0 @@ -The FontStruction “Tiny Cursive” -(https://fontstruct.com/fontstructions/show/63155) by “cyfry77” is licensed -under a Creative Commons Attribution Share Alike license -(http://creativecommons.org/licenses/by-sa/3.0/). diff --git a/boards/copyright.txt b/boards/copyright.txt deleted file mode 100644 index ad83a10..0000000 --- a/boards/copyright.txt +++ /dev/null @@ -1,2 +0,0 @@ -Code by Pierre-Yves Rollo (pyrollo) -Font by (cyfry77) diff --git a/boards/depends.txt b/boards/depends.txt deleted file mode 100644 index 8c807e3..0000000 --- a/boards/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -signs_api diff --git a/boards/font_tinycurs.lua b/boards/font_tinycurs.lua deleted file mode 100644 index a9a323a..0000000 --- a/boards/font_tinycurs.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ - Tinycurs font for Font API - - Original font Tiny Cursive - by cyfry77 - G and J textures by Pierre-Yves Rollo (pyrollo) - released under CC-BY-SA license - - https://fontstruct.com/fontstructions/show/63155/tiny_cursive - - Derivative texture are under CC-BY-SA license - Code is under LGPL v3 license ---]] - -font_api.register_font('tinycurs', - { - default = false, -- Don't register this font as a possible default font - margintop = -2, - marginbottom = -2, - linespacing = -4, - height = 19, - widths = { - [0]=9, [32]=9, [33]=6, [34]=7, [35]=10, [36]=14, [37]=14, [38]=12, [39]=3, [40]=6, [41]=6, [42]=9, [43]=8, [44]=3, [45]=7, [46]=3, [47]=9, [48]=9, [49]=7, [50]=10, [51]=9, [52]=9, [53]=10, [54]=10, [55]=9, [56]=10, [57]=8, [58]=5, [59]=5, [60]=8, [61]=8, [62]=8, [63]=8, [64]=12, [65]=9, [66]=7, [67]=9, [68]=10, [69]=8, [70]=8, [71]=8, [72]=10, [73]=7, [74]=8, [75]=9, [76]=9, [77]=12, [78]=10, [79]=9, [80]=9, [81]=9, [82]=11, [83]=11, [84]=8, [85]=11, [86]=11, [87]=12, [88]=12, [89]=11, [90]=11, [91]=8, [92]=5, [93]=8, [94]=8, [95]=8, [96]=5, [97]=6, [98]=6, [99]=6, [100]=7, [101]=6, [102]=5, [103]=6, [104]=6, [105]=4, [106]=5, [107]=7, [108]=5, [109]=9, [110]=8, [111]=6, [112]=9, [113]=8, [114]=7, [115]=7, [116]=6, [117]=8, [118]=8, [119]=11, [120]=10, [121]=8, [122]=8, [123]=8, [124]=6, [125]=9, [126]=10, [8216]=4, [8217]=4, [8220]=6, [8221]=6 - }, - } -); - diff --git a/boards/init.lua b/boards/init.lua deleted file mode 100644 index 4126a6c..0000000 --- a/boards/init.lua +++ /dev/null @@ -1,139 +0,0 @@ ---[[ - boards mod for Minetest. Black boards with text on it. - (c) Pierre-Yves Rollo - - This file is part of boards. - - boards is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - boards 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with boards. If not, see . ---]] - -boards = {} -boards.name = minetest.get_current_modname() -boards.path = minetest.get_modpath(boards.name) - --- Load support for intllib. -local S, NS = dofile(boards.path.."/intllib.lua") -boards.intllib = S -local F = function(...) return minetest.formspec_escape(S(...)) end - --- Load font -dofile(boards.path.."/font_tinycurs.lua") - -local function set_formspec(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", - "size[6,4]"..default.gui_bg..default.gui_bg_img..default.gui_slots.. - "textarea[0.5,0.7;5.5,3;display_text;"..F("Text")..";${display_text}]".. - "button_exit[3,3.5;2,1;ok;"..F("Write").."]".. - "button_exit[1,3.5;2,1;wipe;"..F("Wipe").."]") -end - --- On boards, everyone is allowed to write and wipe -local function on_receive_fields(pos, formname, fields, player) - if fields then - if fields.ok or fields.key_enter then - signs_api.set_display_text(pos, fields.display_text, fields.font) - end - if fields.wipe then - signs_api.set_display_text(pos, "", fields.font) - end - end -end - -models = { - black_board = { - depth = 1/16, width = 1, height = 1, - entity_fields = { - top = -1/32, - size = { x = 1, y = 15/16 }, - maxlines = 5, - color = "#fff", - font_name = "tinycurs", - valign = "top", - }, - node_fields = { - description = S("Black board"), - tiles = { "default_wood.png", "default_wood.png", - "default_wood.png", "default_wood.png", - "default_wood.png", "board_black_front.png" }, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5}, - {-0.5, -7/16, 6/16, 0.5, -0.5, 7/16} - }, - }, - on_construct = function(pos) - set_formspec(pos) - display_api.on_construct(pos) - end, - on_receive_fields = on_receive_fields, - }, - }, - green_board = { - depth = 1/16, width = 1, height = 1, - entity_fields = { - top = -1/32, - size = { x = 1, y = 15/16 }, - maxlines = 5, - color = "#fff", - font_name = "tinycurs", - valign = "top", - }, - node_fields = { - description = S("Green board"), - tiles = { "default_wood.png", "default_wood.png", - "default_wood.png", "default_wood.png", - "default_wood.png", "board_green_front.png" }, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5}, - {-0.5, -7/16, 6/16, 0.5, -0.5, 7/16} - }, - }, - on_construct = function(pos) - set_formspec(pos) - display_api.on_construct(pos) - end, - on_receive_fields = on_receive_fields, - }, - }, -} - --- Node registration -for name, model in pairs(models) -do - signs_api.register_sign("boards", name, model) -end - --- Recipes -minetest.register_craft( - { - output = "boards:black_board", - recipe = { - {"group:wood", "group:stone", "dye:black"}, - } - }) - -minetest.register_craft( - { - output = "boards:green_board", - recipe = { - {"group:wood", "group:stone", "dye:dark_green"}, - } - }) - diff --git a/boards/intllib.lua b/boards/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/boards/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/boards/locale/fr.po b/boards/locale/fr.po deleted file mode 100644 index 1b081be..0000000 --- a/boards/locale/fr.po +++ /dev/null @@ -1,40 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-16 10:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua -msgid "Text" -msgstr "Texte" - -#: init.lua -msgid "Write" -msgstr "Ecrire" - -#: init.lua -msgid "Wipe" -msgstr "Effacer" - -#: init.lua -msgid "Black board" -msgstr "Tableau noir" - -#: init.lua -msgid "Green board" -msgstr "Tableau vert" - - diff --git a/boards/locale/template.pot b/boards/locale/template.pot deleted file mode 100644 index 8db98b8..0000000 --- a/boards/locale/template.pot +++ /dev/null @@ -1,34 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-07-16 10:00+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: init.lua -msgid "Text" -msgstr "" - -#: init.lua -msgid "Write" -msgstr "" - -#: init.lua -msgid "Wipe" -msgstr "" - -#: init.lua -msgid "Black board" -msgstr "" diff --git a/boards/textures/board_black_front.png b/boards/textures/board_black_front.png deleted file mode 100644 index bddf4b6..0000000 Binary files a/boards/textures/board_black_front.png and /dev/null differ diff --git a/boards/textures/board_green_front.png b/boards/textures/board_green_front.png deleted file mode 100644 index 57e613f..0000000 Binary files a/boards/textures/board_green_front.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0000.png b/boards/textures/font_tinycurs_0000.png deleted file mode 100644 index 5e32523..0000000 Binary files a/boards/textures/font_tinycurs_0000.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0020.png b/boards/textures/font_tinycurs_0020.png deleted file mode 100644 index 4d55fc2..0000000 Binary files a/boards/textures/font_tinycurs_0020.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0021.png b/boards/textures/font_tinycurs_0021.png deleted file mode 100644 index 2341270..0000000 Binary files a/boards/textures/font_tinycurs_0021.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0022.png b/boards/textures/font_tinycurs_0022.png deleted file mode 100644 index 711fc0a..0000000 Binary files a/boards/textures/font_tinycurs_0022.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0023.png b/boards/textures/font_tinycurs_0023.png deleted file mode 100644 index eb7fe6d..0000000 Binary files a/boards/textures/font_tinycurs_0023.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0024.png b/boards/textures/font_tinycurs_0024.png deleted file mode 100644 index 21faedc..0000000 Binary files a/boards/textures/font_tinycurs_0024.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0025.png b/boards/textures/font_tinycurs_0025.png deleted file mode 100644 index d13b136..0000000 Binary files a/boards/textures/font_tinycurs_0025.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0026.png b/boards/textures/font_tinycurs_0026.png deleted file mode 100644 index 0217d08..0000000 Binary files a/boards/textures/font_tinycurs_0026.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0027.png b/boards/textures/font_tinycurs_0027.png deleted file mode 100644 index 3358a85..0000000 Binary files a/boards/textures/font_tinycurs_0027.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0028.png b/boards/textures/font_tinycurs_0028.png deleted file mode 100644 index 4867aca..0000000 Binary files a/boards/textures/font_tinycurs_0028.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0029.png b/boards/textures/font_tinycurs_0029.png deleted file mode 100644 index 6233ad6..0000000 Binary files a/boards/textures/font_tinycurs_0029.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002a.png b/boards/textures/font_tinycurs_002a.png deleted file mode 100644 index 95ecb14..0000000 Binary files a/boards/textures/font_tinycurs_002a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002b.png b/boards/textures/font_tinycurs_002b.png deleted file mode 100644 index 8c92a50..0000000 Binary files a/boards/textures/font_tinycurs_002b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002c.png b/boards/textures/font_tinycurs_002c.png deleted file mode 100644 index 7457341..0000000 Binary files a/boards/textures/font_tinycurs_002c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002d.png b/boards/textures/font_tinycurs_002d.png deleted file mode 100644 index f0edd03..0000000 Binary files a/boards/textures/font_tinycurs_002d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002e.png b/boards/textures/font_tinycurs_002e.png deleted file mode 100644 index 6425d1f..0000000 Binary files a/boards/textures/font_tinycurs_002e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_002f.png b/boards/textures/font_tinycurs_002f.png deleted file mode 100644 index 2cf9cfb..0000000 Binary files a/boards/textures/font_tinycurs_002f.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0030.png b/boards/textures/font_tinycurs_0030.png deleted file mode 100644 index 0c52286..0000000 Binary files a/boards/textures/font_tinycurs_0030.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0031.png b/boards/textures/font_tinycurs_0031.png deleted file mode 100644 index 3da16d1..0000000 Binary files a/boards/textures/font_tinycurs_0031.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0032.png b/boards/textures/font_tinycurs_0032.png deleted file mode 100644 index 6e647a5..0000000 Binary files a/boards/textures/font_tinycurs_0032.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0033.png b/boards/textures/font_tinycurs_0033.png deleted file mode 100644 index 9322594..0000000 Binary files a/boards/textures/font_tinycurs_0033.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0034.png b/boards/textures/font_tinycurs_0034.png deleted file mode 100644 index 15f4462..0000000 Binary files a/boards/textures/font_tinycurs_0034.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0035.png b/boards/textures/font_tinycurs_0035.png deleted file mode 100644 index b37d085..0000000 Binary files a/boards/textures/font_tinycurs_0035.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0036.png b/boards/textures/font_tinycurs_0036.png deleted file mode 100644 index 51d11a2..0000000 Binary files a/boards/textures/font_tinycurs_0036.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0037.png b/boards/textures/font_tinycurs_0037.png deleted file mode 100644 index d46de6c..0000000 Binary files a/boards/textures/font_tinycurs_0037.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0038.png b/boards/textures/font_tinycurs_0038.png deleted file mode 100644 index 43126d1..0000000 Binary files a/boards/textures/font_tinycurs_0038.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0039.png b/boards/textures/font_tinycurs_0039.png deleted file mode 100644 index a5ad51e..0000000 Binary files a/boards/textures/font_tinycurs_0039.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003a.png b/boards/textures/font_tinycurs_003a.png deleted file mode 100644 index f0ae56f..0000000 Binary files a/boards/textures/font_tinycurs_003a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003b.png b/boards/textures/font_tinycurs_003b.png deleted file mode 100644 index 08c8b44..0000000 Binary files a/boards/textures/font_tinycurs_003b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003c.png b/boards/textures/font_tinycurs_003c.png deleted file mode 100644 index 2c5ddc9..0000000 Binary files a/boards/textures/font_tinycurs_003c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003d.png b/boards/textures/font_tinycurs_003d.png deleted file mode 100644 index a80eeee..0000000 Binary files a/boards/textures/font_tinycurs_003d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003e.png b/boards/textures/font_tinycurs_003e.png deleted file mode 100644 index 0cee6d5..0000000 Binary files a/boards/textures/font_tinycurs_003e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_003f.png b/boards/textures/font_tinycurs_003f.png deleted file mode 100644 index 928a174..0000000 Binary files a/boards/textures/font_tinycurs_003f.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0040.png b/boards/textures/font_tinycurs_0040.png deleted file mode 100644 index e19e0cd..0000000 Binary files a/boards/textures/font_tinycurs_0040.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0041.png b/boards/textures/font_tinycurs_0041.png deleted file mode 100644 index d6505e1..0000000 Binary files a/boards/textures/font_tinycurs_0041.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0042.png b/boards/textures/font_tinycurs_0042.png deleted file mode 100644 index af72583..0000000 Binary files a/boards/textures/font_tinycurs_0042.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0043.png b/boards/textures/font_tinycurs_0043.png deleted file mode 100644 index ac8bfce..0000000 Binary files a/boards/textures/font_tinycurs_0043.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0044.png b/boards/textures/font_tinycurs_0044.png deleted file mode 100644 index 25ead38..0000000 Binary files a/boards/textures/font_tinycurs_0044.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0045.png b/boards/textures/font_tinycurs_0045.png deleted file mode 100644 index 7ed7872..0000000 Binary files a/boards/textures/font_tinycurs_0045.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0046.png b/boards/textures/font_tinycurs_0046.png deleted file mode 100644 index a48a33e..0000000 Binary files a/boards/textures/font_tinycurs_0046.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0047.png b/boards/textures/font_tinycurs_0047.png deleted file mode 100644 index 17fe5aa..0000000 Binary files a/boards/textures/font_tinycurs_0047.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0048.png b/boards/textures/font_tinycurs_0048.png deleted file mode 100644 index 7466bb7..0000000 Binary files a/boards/textures/font_tinycurs_0048.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0049.png b/boards/textures/font_tinycurs_0049.png deleted file mode 100644 index 660d34e..0000000 Binary files a/boards/textures/font_tinycurs_0049.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004a.png b/boards/textures/font_tinycurs_004a.png deleted file mode 100644 index 9c4eb48..0000000 Binary files a/boards/textures/font_tinycurs_004a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004b.png b/boards/textures/font_tinycurs_004b.png deleted file mode 100644 index 5554ef9..0000000 Binary files a/boards/textures/font_tinycurs_004b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004c.png b/boards/textures/font_tinycurs_004c.png deleted file mode 100644 index aaa7563..0000000 Binary files a/boards/textures/font_tinycurs_004c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004d.png b/boards/textures/font_tinycurs_004d.png deleted file mode 100644 index 72cd174..0000000 Binary files a/boards/textures/font_tinycurs_004d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004e.png b/boards/textures/font_tinycurs_004e.png deleted file mode 100644 index 177fdf3..0000000 Binary files a/boards/textures/font_tinycurs_004e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_004f.png b/boards/textures/font_tinycurs_004f.png deleted file mode 100644 index 2b76002..0000000 Binary files a/boards/textures/font_tinycurs_004f.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0050.png b/boards/textures/font_tinycurs_0050.png deleted file mode 100644 index 4ac9be8..0000000 Binary files a/boards/textures/font_tinycurs_0050.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0051.png b/boards/textures/font_tinycurs_0051.png deleted file mode 100644 index c900456..0000000 Binary files a/boards/textures/font_tinycurs_0051.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0052.png b/boards/textures/font_tinycurs_0052.png deleted file mode 100644 index ab5c241..0000000 Binary files a/boards/textures/font_tinycurs_0052.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0053.png b/boards/textures/font_tinycurs_0053.png deleted file mode 100644 index c627af9..0000000 Binary files a/boards/textures/font_tinycurs_0053.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0054.png b/boards/textures/font_tinycurs_0054.png deleted file mode 100644 index e9a155d..0000000 Binary files a/boards/textures/font_tinycurs_0054.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0055.png b/boards/textures/font_tinycurs_0055.png deleted file mode 100644 index bd74959..0000000 Binary files a/boards/textures/font_tinycurs_0055.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0056.png b/boards/textures/font_tinycurs_0056.png deleted file mode 100644 index 4446da3..0000000 Binary files a/boards/textures/font_tinycurs_0056.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0057.png b/boards/textures/font_tinycurs_0057.png deleted file mode 100644 index d0fee31..0000000 Binary files a/boards/textures/font_tinycurs_0057.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0058.png b/boards/textures/font_tinycurs_0058.png deleted file mode 100644 index 84640b9..0000000 Binary files a/boards/textures/font_tinycurs_0058.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0059.png b/boards/textures/font_tinycurs_0059.png deleted file mode 100644 index 9053dd9..0000000 Binary files a/boards/textures/font_tinycurs_0059.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005a.png b/boards/textures/font_tinycurs_005a.png deleted file mode 100644 index a69dde0..0000000 Binary files a/boards/textures/font_tinycurs_005a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005b.png b/boards/textures/font_tinycurs_005b.png deleted file mode 100644 index 7e6a3f2..0000000 Binary files a/boards/textures/font_tinycurs_005b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005c.png b/boards/textures/font_tinycurs_005c.png deleted file mode 100644 index fd2df37..0000000 Binary files a/boards/textures/font_tinycurs_005c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005d.png b/boards/textures/font_tinycurs_005d.png deleted file mode 100644 index e3064d9..0000000 Binary files a/boards/textures/font_tinycurs_005d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005e.png b/boards/textures/font_tinycurs_005e.png deleted file mode 100644 index 55055f9..0000000 Binary files a/boards/textures/font_tinycurs_005e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_005f.png b/boards/textures/font_tinycurs_005f.png deleted file mode 100644 index 367468a..0000000 Binary files a/boards/textures/font_tinycurs_005f.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0060.png b/boards/textures/font_tinycurs_0060.png deleted file mode 100644 index 4170f49..0000000 Binary files a/boards/textures/font_tinycurs_0060.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0061.png b/boards/textures/font_tinycurs_0061.png deleted file mode 100644 index b545504..0000000 Binary files a/boards/textures/font_tinycurs_0061.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0062.png b/boards/textures/font_tinycurs_0062.png deleted file mode 100644 index daf3e81..0000000 Binary files a/boards/textures/font_tinycurs_0062.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0063.png b/boards/textures/font_tinycurs_0063.png deleted file mode 100644 index dee911e..0000000 Binary files a/boards/textures/font_tinycurs_0063.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0064.png b/boards/textures/font_tinycurs_0064.png deleted file mode 100644 index 1f4a51e..0000000 Binary files a/boards/textures/font_tinycurs_0064.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0065.png b/boards/textures/font_tinycurs_0065.png deleted file mode 100644 index 002357f..0000000 Binary files a/boards/textures/font_tinycurs_0065.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0066.png b/boards/textures/font_tinycurs_0066.png deleted file mode 100644 index 23eeae9..0000000 Binary files a/boards/textures/font_tinycurs_0066.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0067.png b/boards/textures/font_tinycurs_0067.png deleted file mode 100644 index c557d04..0000000 Binary files a/boards/textures/font_tinycurs_0067.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0068.png b/boards/textures/font_tinycurs_0068.png deleted file mode 100644 index 5175ead..0000000 Binary files a/boards/textures/font_tinycurs_0068.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0069.png b/boards/textures/font_tinycurs_0069.png deleted file mode 100644 index db6433d..0000000 Binary files a/boards/textures/font_tinycurs_0069.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006a.png b/boards/textures/font_tinycurs_006a.png deleted file mode 100644 index 96da601..0000000 Binary files a/boards/textures/font_tinycurs_006a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006b.png b/boards/textures/font_tinycurs_006b.png deleted file mode 100644 index f1e2be7..0000000 Binary files a/boards/textures/font_tinycurs_006b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006c.png b/boards/textures/font_tinycurs_006c.png deleted file mode 100644 index 8cfd016..0000000 Binary files a/boards/textures/font_tinycurs_006c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006d.png b/boards/textures/font_tinycurs_006d.png deleted file mode 100644 index 95ead88..0000000 Binary files a/boards/textures/font_tinycurs_006d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006e.png b/boards/textures/font_tinycurs_006e.png deleted file mode 100644 index 22d177a..0000000 Binary files a/boards/textures/font_tinycurs_006e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_006f.png b/boards/textures/font_tinycurs_006f.png deleted file mode 100644 index 52b2e64..0000000 Binary files a/boards/textures/font_tinycurs_006f.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0070.png b/boards/textures/font_tinycurs_0070.png deleted file mode 100644 index 05b3e5b..0000000 Binary files a/boards/textures/font_tinycurs_0070.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0071.png b/boards/textures/font_tinycurs_0071.png deleted file mode 100644 index 05d4010..0000000 Binary files a/boards/textures/font_tinycurs_0071.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0072.png b/boards/textures/font_tinycurs_0072.png deleted file mode 100644 index b36ac4d..0000000 Binary files a/boards/textures/font_tinycurs_0072.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0073.png b/boards/textures/font_tinycurs_0073.png deleted file mode 100644 index 6e247b4..0000000 Binary files a/boards/textures/font_tinycurs_0073.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0074.png b/boards/textures/font_tinycurs_0074.png deleted file mode 100644 index 20224c9..0000000 Binary files a/boards/textures/font_tinycurs_0074.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0075.png b/boards/textures/font_tinycurs_0075.png deleted file mode 100644 index 8e1c3e2..0000000 Binary files a/boards/textures/font_tinycurs_0075.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0076.png b/boards/textures/font_tinycurs_0076.png deleted file mode 100644 index 84465fb..0000000 Binary files a/boards/textures/font_tinycurs_0076.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0077.png b/boards/textures/font_tinycurs_0077.png deleted file mode 100644 index 0428693..0000000 Binary files a/boards/textures/font_tinycurs_0077.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0078.png b/boards/textures/font_tinycurs_0078.png deleted file mode 100644 index aa640e9..0000000 Binary files a/boards/textures/font_tinycurs_0078.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_0079.png b/boards/textures/font_tinycurs_0079.png deleted file mode 100644 index 6b1da68..0000000 Binary files a/boards/textures/font_tinycurs_0079.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_007a.png b/boards/textures/font_tinycurs_007a.png deleted file mode 100644 index db7af09..0000000 Binary files a/boards/textures/font_tinycurs_007a.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_007b.png b/boards/textures/font_tinycurs_007b.png deleted file mode 100644 index 8c3c1b6..0000000 Binary files a/boards/textures/font_tinycurs_007b.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_007c.png b/boards/textures/font_tinycurs_007c.png deleted file mode 100644 index 37aa7bb..0000000 Binary files a/boards/textures/font_tinycurs_007c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_007d.png b/boards/textures/font_tinycurs_007d.png deleted file mode 100644 index b0e4b74..0000000 Binary files a/boards/textures/font_tinycurs_007d.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_007e.png b/boards/textures/font_tinycurs_007e.png deleted file mode 100644 index 86b6112..0000000 Binary files a/boards/textures/font_tinycurs_007e.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_2018.png b/boards/textures/font_tinycurs_2018.png deleted file mode 100644 index d7535fd..0000000 Binary files a/boards/textures/font_tinycurs_2018.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_2019.png b/boards/textures/font_tinycurs_2019.png deleted file mode 100644 index 0cdf90d..0000000 Binary files a/boards/textures/font_tinycurs_2019.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_201c.png b/boards/textures/font_tinycurs_201c.png deleted file mode 100644 index 71d3a16..0000000 Binary files a/boards/textures/font_tinycurs_201c.png and /dev/null differ diff --git a/boards/textures/font_tinycurs_201d.png b/boards/textures/font_tinycurs_201d.png deleted file mode 100644 index f239395..0000000 Binary files a/boards/textures/font_tinycurs_201d.png and /dev/null differ diff --git a/boards/tools/updatepo.sh b/boards/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/boards/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done diff --git a/copyright.txt b/copyright.txt new file mode 100644 index 0000000..02b8467 --- /dev/null +++ b/copyright.txt @@ -0,0 +1,6 @@ +Code by Pierre-Yves Rollo (pyrollo) +Contributors: +(gpcf): Compatibility with signs lib +(Thomas--S): Fix /clearobjects bug +(12Me21): on_place improvement and code style fixing + diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..e69de29 diff --git a/display_api b/display_api deleted file mode 160000 index 246b7f9..0000000 --- a/display_api +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 246b7f958863e7f6b7f604b09361696226928a7b diff --git a/font_api/API.md b/font_api/API.md deleted file mode 100644 index 9900a80..0000000 --- a/font_api/API.md +++ /dev/null @@ -1,145 +0,0 @@ -# Font Lib API -This document describes Font Lib API. Font Lib creates textures for font display on entities. - -## Settings -### default_font -Name of the font to be used when no font is given. The font should be registered. - -If no default\_font given or if default\_font given but not registered, the first registered font will be used as default. - -## Provided methods - -### font_api.get_default_font_name() -Returns de default font name. - -### font_api.register_font(font_name, font_def) -Register a new font. -**font_name**: Name of the font to register. If registering different sizes of the same font, add size in the font name (e.g. times_10, times_12...). -**font_def**: Font definition table (see **Font definition table** below). - -### font_api.on_display_update(pos, objref) -Standard on_display_update entity callback. - -**pos**: Node position - -**objref**: Object reference of entity - -Node should have a corresponding display_entity with size, resolution and maxlines fields and optionally halign, valign and color fields. - -### Font definition table -Font definition table used by **font_api.register_font** and **font\_api.Font:new** may/can contain following elements: - -* **height** (required): Font height in pixels (all font textures should have the same height) . -* **widths** (required): Array of character widths in pixels, indexed by UTF codepoints. -* **margintop** (optional): Margin (in texture pixels) added on top of each char texture. -* **marginbottom** (optional): Margin (in texture pixels) added at bottom of each char texture. -* **linespacing** (optional): Spacing (in texture pixels) between each lines. - -**margintop**, **marginbottom** and **linespacing** can be negative numbers (default 0) and are to be used to adjust various font styles to each other. - -Font must have a char 0 which will be used to display any unknown char. - -All textures corresponding to the indexes in widths array should be present in textures directory with a name matching the pattern : - -> font\_**{font_name}**_**{utf_code}**.png - -**{font\_name}**: Name of the font as given in the first argument - -**{utf\_code}**: UTF code of the char in 4 hexadecimal digits - -Example : font_courrier_0041.png is for the "A" char in the "courrier" font. - -To ease that declaration (specially to build the **widths** array), a shell is provided to build a {font\_name}.lua file from the texture files (see provided tools). - -## Provided tools - -Still in early stage of development, these tools are helpers to create font mods. - -### make_font_texture.sh - -This scripts takes a .ttf file as input and create one .png file per char, that can be used as font texture. Launch it from your future font mod directory. - -__Advice__ - -This script works much better with pixels font, providing the correct height. There is no antialiasing at all, vector fonts and bad heights gives very ugly results. - -__Syntax__ - -**make\_font\_texture.sh {fontfile} {fontname} {fontsize}** - -**{fontfile}**: A TTF font file to use to create textures. -**{fontname}**: The font name to be used in font_api (should be simple, with no spaces). -**{fontsize}**: Font height to be rendered. - -### make_font_lua.sh - -This script analyses textures in textures directory and creates a font\_{font\_name}.lua files with a call to register_font with images information. Launch it from your future font mod directory. - -Once the font\_{font\_name}.lua created, it can be included by a init.lua file or directly renamed to init.lua if you are creating a simple font mod. - -__Syntax__ - -**make\_font_lua.sh {fontname}** - -**{fontname}**: The font name to be used in font_api (same as given to make\_font\_texture.sh) - -### An exemple generating a font mod - - mkdir font_myfont - cd font_myfont - //tools/make_font_texture.sh myfont.ttf myfont 12 - //tools/make_font_lua.sh myfont - mv font_myfont.lua init.lua - -## Font class -A font usable with font API. This class is supposed to be for internal use but who knows. - -### font\_api.Font:new(def) -Create a new font object. - -**def** is a table containing font definition. See **Font definition table** above. - -### font:get_char_width(char) -Returns the width of char **char** in texture pixels. - -**char**: Unicode codepoint of char. - -### font:get_height(nb_of_lines) -Returns line(s) height. Takes care of top and bottom margins and line spacing. - -**nb_of_lines**: Number of lines in the text. - -### font:get_width(line) - -Returns the width of a text line. Beware, if line contains any new line char, they are ignored. - -**line**: Line of text which the width will be computed. - -### font:make_line_texture(line, texturew, x, y) -Create a texture for a text line. - -**line**: Line of text to be rendered in texture. - -**texturew**: Width of the texture (extra text is not rendered). - -**x**: Starting x position in texture. - -**y**: Vertical position of the line in texture. - -### font:make_text_texture(text, texturew, textureh, maxlines, halign, valign, color) -Builds texture for a multiline colored text. - -**text**: Text to be rendered. - -**texturew**: Width of the texture (extra text will be truncated). - -**textureh**: Height of the texture. - -**maxlines**: Maximum number of lines. - -**halign**: Horizontal text align ("left"/"center"/"right") (optional). - -**valign**: Vertical text align ("top"/"center"/"bottom") (optional). - -**color**: Color of the text (optional). - diff --git a/font_api/LICENSE.txt b/font_api/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/font_api/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/font_api/README.md b/font_api/README.md deleted file mode 100644 index c7ae64b..0000000 --- a/font_api/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Font Lib - -This library for font display on entities (to be used with display_api for sign creation). - -**Dependancies**: default - -**License**: LGPL - -(Default font taken from VanessaE's homedecor/signs_lib, originally under WTFPL) - -**API**: See [API.md](https://github.com/pyrollo/display_modpack/blob/master/font_api/API.md) document please. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=13563) at the Minetest forums. - diff --git a/font_api/copyright.txt b/font_api/copyright.txt deleted file mode 100644 index ceb5446..0000000 --- a/font_api/copyright.txt +++ /dev/null @@ -1,3 +0,0 @@ -Code by Pierre-Yves Rollo (pyrollo) -Contributors: -Andrzej Pieńkowski (apienk): Unicode support and tool for creating texturess diff --git a/font_api/depends.txt b/font_api/depends.txt deleted file mode 100644 index e69de29..0000000 diff --git a/font_api/doc/font.svg b/font_api/doc/font.svg deleted file mode 100644 index e4e8757..0000000 --- a/font_api/doc/font.svg +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - Texture Height - - Texture Width - - - - MarginTop - Margin Bottom - - Line Height - - - diff --git a/font_api/doc/lines.svg b/font_api/doc/lines.svg deleted file mode 100644 index f75880f..0000000 --- a/font_api/doc/lines.svg +++ /dev/null @@ -1,544 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - Line Height - - - Text Height - Line Spacing - - - - - - - - - diff --git a/font_api/font.lua b/font_api/font.lua deleted file mode 100644 index 580744d..0000000 --- a/font_api/font.lua +++ /dev/null @@ -1,266 +0,0 @@ ---[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . ---]] - --- Local functions ------------------- - --- Table deep copy - -local function deep_copy(input) - local output = {} - local key, value - for key, value in pairs(input) do - if type(value) == 'table' then - output[key] = deep_copy(value) - else - output[key] = value - end - end - return output -end - --- Returns next char, managing ascii and unicode plane 0 (0000-FFFF). - -local function get_next_char(text, pos) - - local msb = text:byte(pos) - -- 1 byte char, ascii equivalent codepoints - if msb < 0x80 then - return msb, pos + 1 - end - - -- 4 bytes char not managed (Only 16 bits codepoints are managed) - if msb >= 0xF0 then - return 0, pos + 4 - end - - -- 3 bytes char - if msb >= 0xE0 then - return (msb - 0xE0) * 0x1000 - + text:byte(pos + 1) % 0x40 * 0x40 - + text:byte(pos + 2) % 0x40, - pos + 3 - end - - -- 2 bytes char (little endian) - if msb >= 0xC2 then - return (msb - 0xC2) * 0x40 + text:byte(pos + 1), - pos + 2 - end - - -- Not an UTF char - return 0, pos + 1 -end - --- Split multiline text into array of lines, with maximum lines. - -local function split_lines(text, maxlines) - local splits = text:split("\n") - if maxlines then - local lines = {} - for num = 1,maxlines do - lines[num] = splits[num] - end - return lines - else - return splits - end -end - --------------------------------------------------------------------------------- ---- Font class - -font_api.Font = {} - -function font_api.Font:new(def) - - if type(def) ~= "table" then - minetest.log("error", "Font definition must be a table.") - return nil - end - - if def.height == nil or def.height <= 0 then - minetest.log("error", "Font definition must have a positive height.") - return nil - end - - if type(def.widths) ~= "table" then - minetest.log("error", "Font definition must have a widths array.") - return nil - end - - if def.widths[0] == nil then - minetest.log("error", - "Font must have a char with codepoint 0 (=unknown char).") - return nil - end - - local font = deep_copy(def) - setmetatable(font, self) - self.__index = self - return font -end - ---- Returns the width of a given char --- @param char : codepoint of the char --- @return Char width - -function font_api.Font:get_char_width(char) - -- Replace chars with no texture by the NULL(0) char - if self.widths[char] ~= nil then - return self.widths[char] - else - return self.widths[0] - end -end - ---- Text height for multiline text including margins and line spacing --- @param nb_of_lines : number of text lines (default 1) --- @return Text height - -function font_api.Font:get_height(nb_of_lines) - if nb_of_lines == nil then nb_of_lines = 1 end - - if nb_of_lines > 0 then - return - ( - (self.height or 0) + - (self.margintop or 0) + - (self.marginbottom or 0) - ) * nb_of_lines + - (self.linespacing or 0) * (nb_of_lines -1) - else - return nb_of_lines == 0 and 0 or nil - end -end - ---- Computes text width for a given text (ignores new lines) --- @param line Line of text which the width will be computed. --- @return Text width - -function font_api.Font:get_width(line) - - local char - local width = 0 - local pos = 1 - - -- TODO: Use iterator - while pos <= #line do - char, pos = get_next_char(line, pos) - width = width + self:get_char_width(char) - end - - return width -end - ---- Builds texture part for a text line --- @param line Text line to be rendered --- @param texturew Width of the texture (extra text is not rendered) --- @param x Starting x position in texture --- @param y Vertical position of the line in texture --- @return Texture string - -function font_api.Font:make_line_texture(line, texturew, x, y) - local texture = "" - local char - local pos = 1 - - -- TODO: Use iterator - while pos <= #line do - char, pos = get_next_char(line, pos) - - -- Replace chars with no texture by the NULL(0) char - if self.widths[char] == nil - then - print(string.format("["..font_api.name - .."] Missing char %d (%04x)",char,char)) - char = 0 - end - - -- Add image only if it is visible (at least partly) - if x + self.widths[char] >= 0 and x <= texturew then - texture = texture.. - string.format(":%d,%d=font_%s_%04x.png", - x, y, self.name, char) - end - x = x + self.widths[char] - end - - return texture -end - ---- Builds texture for a multiline colored text --- @param text Text to be rendered --- @param texturew Width of the texture (extra text will be truncated) --- @param textureh Height of the texture --- @param maxlines Maximum number of lines --- @param halign Horizontal text align ("left"/"center"/"right") (optional) --- @param valign Vertical text align ("top"/"center"/"bottom") (optional) --- @param color Color of the text (optional) --- @return Texture string - -function font_api.Font:make_text_texture(text, texturew, textureh, maxlines, - halign, valign, color) - local texture = "" - local lines = {} - local textheight = 0 - local y - - -- Split text into lines (limited to maxlines fist lines) - for num, line in pairs(split_lines(text, maxlines)) do - lines[num] = { text = line, width = self:get_width(line) } - end - - textheight = self:get_height(#lines) - - if #lines then - if valign == "top" then - y = 0 - elseif valign == "bottom" then - y = textureh - textheight - else - y = (textureh - textheight) / 2 - end - end - - y = y + (self.margintop or 0) - - for _, line in pairs(lines) do - if halign == "left" then - texture = texture.. - self:make_line_texture(line.text, texturew, - 0, y) - elseif halign == "right" then - texture = texture.. - self:make_line_texture(line.text, texturew, - texturew - line.width, y) - else - texture = texture.. - self:make_line_texture(line.text, texturew, - (texturew - line.width) / 2, y) - end - - y = y + self:get_height() + (self.linespacing or 0) - end - - texture = string.format("[combine:%dx%d", texturew, textureh)..texture - if color then texture = texture.."^[colorize:"..color end - return texture -end - diff --git a/font_api/init.lua b/font_api/init.lua deleted file mode 100644 index dc3a3e0..0000000 --- a/font_api/init.lua +++ /dev/null @@ -1,65 +0,0 @@ ---[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . ---]] - --- Global variables -------------------- - -font_api = {} -font_api.name = minetest.get_current_modname() -font_api.path = minetest.get_modpath(font_api.name) - --- Inclusions -------------- - -dofile(font_api.path.."/font.lua") -dofile(font_api.path.."/registry.lua") - ---- Standard on_display_update entity callback. --- Node should have a corresponding display_entity with size, resolution and --- maxlines fields and optionally halign, valign and color fields --- @param pos Node position --- @param objref Object reference of entity - -function font_api.on_display_update(pos, objref) - local meta = minetest.get_meta(pos) - local text = meta:get_string("display_text") - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - local entity = objref:get_luaentity() - - if entity and ndef.display_entities[entity.name] then - local def = ndef.display_entities[entity.name] - local font = font_api.get_font(meta:get_string("font") ~= "" - and meta:get_string("font") or def.font_name) - - local maxlines = def.maxlines or 1 -- TODO:How to do w/o maxlines ? - - objref:set_properties({ - textures={font:make_text_texture(text, - font:get_height(maxlines) * def.size.x / def.size.y - / (def.aspect_ratio or 1), - font:get_height(maxlines), - def.maxlines, def.halign, def.valign, def.color)}, - visual_size = def.size - }) - end -end - --- Compatibility -font_lib = font_api - diff --git a/font_api/registry.lua b/font_api/registry.lua deleted file mode 100644 index 4b49b1e..0000000 --- a/font_api/registry.lua +++ /dev/null @@ -1,162 +0,0 @@ ---[[ - font_api mod for Minetest - Library to add font display capability - to display_api mod. - (c) Pierre-Yves Rollo - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . ---]] - --- Global variables -------------------- - -font_api.registered_fonts = {} -font_api.registered_fonts_number = 0 - --- Local variables ------------------- - -local default_font = false - --- Local functions ------------------- - --- Gets a default (settings or fist font) -local function get_default_font() - -- First call - if default_font == false then - default_font = nil - - -- First, try with settings - local settings_font = minetest.settings:get("default_font") - - if settings_font ~= nil and settings_font ~= "" then - default_font = font_api.registered_fonts[settings_font] - - if default_font == nil then - minetest.log("warning", "Default font in settings (\"".. - settings_font.."\") is not registered.") - end - end - - -- If failed, choose first font without default = false - if default_font == nil then - for _, font in pairs(font_api.registered_fonts) do - if font.default then - default_font = font - break - end - end - end - - -- If failed, chose first font - if default_font == nil then - for _, font in pairs(font_api.registered_fonts) do - default_font = font - break - end - end - - -- Error, no font registered - if default_font == nil then - minetest.log("error", - "No font registred, unable to choose a default font.") - end - end - - return default_font -end - ---- Returns font object to be used according to font_name --- @param font_name: Name of the font --- @return Font object if font found (or default font) - -function font_api.get_font(font_name) - local font = font_api.registered_fonts[font_name] - - if font == nil then - local message - - if font_name == nil then - message = "No font given" - else - message = "Font \""..font_name.."\" unregistered" - end - - font = get_default_font() - - if font ~= nil then - minetest.log("info", message..", using font \""..font.name.."\".") - end - end - - return font -end - --- API functions ----------------- - ---- Returns de default font name --- @return Default font name - -function font_api.get_default_font_name() - return get_default_font().name -end - ---- Register a new font --- Textures corresponding to the font should be named after following patern : --- font__.png --- : name of the font --- : 4 digit hexadecimal unicode of the char --- @param font_name Name of the font to register --- If registering different sizes of the same font, add size in the font name --- (e.g. times_10, times_12...). --- @param def font definition. A associative array with following keys : --- @key default True (by default) if this font may be used as default font --- @key height (mandatory) Height in pixels of all font textures --- @key widths (mandatory) Array of character widths in pixels, indexed by --- UTF codepoints --- @key margintop (optional) Margin (in texture pixels) added on top of each --- char texture. --- @key marginbottom (optional) dded at bottom of each char texture. --- @key linespacing (optional) Spacing (in texture pixels) between each lines. --- margintop, marginbottom and linespacing can be negative numbers (default 0) --- and are to be used to adjust various font styles to each other. - --- TODO: Add something to remove common accent if not defined in font - -function font_api.register_font(font_name, font_def) - - if font_api.registered_fonts[font_name] ~= nil then - minetest.log("error", "Font \""..font_name.."\" already registered.") - return - end - - local font = font_api.Font:new(font_def) - - if font == nil then - minetest.log("error", "Unable to register font \""..font_name.."\".") - return - end - - font.name = font_name - font_api.registered_fonts[font_name] = font - font_api.registered_fonts_number = font_api.registered_fonts_number + 1 - - -- Force to choose again default font - -- (allows use of fonts registered after start) - default_font = false - - minetest.log("action", "New font registered in font_api: "..font_name..".") -end - diff --git a/font_api/settingtypes.txt b/font_api/settingtypes.txt deleted file mode 100644 index d111159..0000000 --- a/font_api/settingtypes.txt +++ /dev/null @@ -1 +0,0 @@ -default_font(Default font) string diff --git a/font_api/tools/make_font_lua.sh b/font_api/tools/make_font_lua.sh deleted file mode 100755 index e858360..0000000 --- a/font_api/tools/make_font_lua.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash - -scriptname=$(basename $0) -identify="identify" - -usage() { - echo "Usage: $0 fontname" - echo "fontname: The name of the font. Must correspond to existing texture/font__????.png files" -} - -if [ $# -ne 1 ] -then - usage - exit 1 -fi - -font_name=$1 - -for f in textures/font_${font_name}_????.png -do - if [[ $f =~ textures/font_${font_name}_([0-9a-fA-F]{4}).png ]] - then - code=$((16#${BASH_REMATCH[1]})) - size=$(identify $f | cut -d " " -f 3) - w=$(echo $size | cut -d "x" -f 1) - h=$(echo $size | cut -d "x" -f 2) - - if [ -z "$font_height" ] - then - font_height=$h - else - if [ $font_height -ne $h ] - then - echo "Error : $f as height of $h pixels, previous textures have a height of $font_height pixels. All textures should have the same height." - fi - fi - - if [ -z "$font_widths" ] - then - font_widths="[$code]=$w" - else - font_widths="$font_widths, [$code]=$w" - fi - fi -done - -echo "--[[ - -$luafile generated by $scriptname $(LANG=en_US date) - ---]] - -font_api.register_font( - '$font_name', - { - height = $font_height, - widths = { - $font_widths - }, - } -); -" > font_$font_name.lua - -if grep -q font_api depends.txt &>/dev/null -then - echo "font_api already in depends.txt." -else - echo "adding font_api to depends.txt." - echo "font_api" >> depends.txt -fi - diff --git a/font_api/tools/make_font_textures.sh b/font_api/tools/make_font_textures.sh deleted file mode 100755 index 4a3191c..0000000 --- a/font_api/tools/make_font_textures.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -# This program generates a bitmap font for font_api mod for Minetest game. -# (c) Andrzej Pieńkowski -# (c) Pierre-Yves Rollo -# License: GPL - -usage() { - echo "Usage: $0 fontfile fontname fontsize" - echo "fontfile: A TTF font file to use to create textures." - echo "fontname: The font name to be used in font_api (should be simple, with no spaces)." - echo "fontsize: Font height to be rendered." -} - -if [ $# -ne 3 ] -then - usage - exit 1 -fi - -fontfile=$1 -fontname=$2 -fontsize=$3 - -if [ ! -r "$fontfile" ] -then - echo "$fontfile not readable." - exit 1 -fi - -# check imagemagick -hash convert &>/dev/null -if [ $? -eq 1 ]; then - echo -e "Error: This program requires convert from ImageMagick! Please install it by typing 'sudo apt-get install imagemagick' in terminal." - abort=1 -fi - -# check ttx -hash ttx &>/dev/null -if [ $? -eq 1 ]; then - echo -e "Error: This program requires ttx from FontTools! Please install it by typing 'sudo apt-get install fonttools' in terminal." - abort=1 -fi - -if [ $abort ] -then - exit 1 -fi - -generate() { - for i in $(seq $((0x$1)) $((0x$2))) - do - if echo "$codepoints" | grep -qi $(printf "0x%x" $i) - then - hex=$(printf "%04x" $i) - echo -e "Generating textures/font_${fontname}_$hex.png file for \"\\U$hex\" char." - if [[ "$hex" == "005c" ]] # Backslash char - then - convert -background none -fill black -font "$fontfile" -pointsize $fontsize label:"\\\\" -colorspace gray -channel alpha -threshold 50% textures/font_${fontname}_$hex.png - else - convert -background none -fill black -font "$fontfile" -pointsize $fontsize label:"$(echo -en "\\U$hex")" -colorspace gray -channel alpha -threshold 50% textures/font_${fontname}_$hex.png - fi - fi - done -} - -mkdir textures - -# Reads all available code points in the font. -codepoints=$(ttx -o - "$fontfile" | grep ". +--]] + +display_api = {} + +-- Prefered gap between node and entity +-- Entity positionment is up to mods but it is a good practice to use this +-- variable as spacing between entity and node +display_api.entity_spacing = 0.002 + +-- Miscelaneous values depending on wallmounted param2 +local wallmounted_values = { + [0]={dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, -- Should never be used + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=1}, -- Should never be used + {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=5}, + {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=4}, + {dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=2}, + {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3} +} + +-- Miscelaneous values depending on facedir param2 +local facedir_values = { + [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=1}, + {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=2}, + {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3}, + {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=0}, + -- Forbiden values : + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, + } + +-- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, +-- rotate = next facedir/wallmount on rotate + +local function get_values(node) + local ndef = minetest.registered_nodes[node.name] + + if ndef then + if ndef.paramtype2 == "wallmounted" then + return wallmounted_values[node.param2] + end + if ndef.paramtype2 == "facedir" then + return facedir_values[node.param2] + end + end +end + +--- Checks if the object is related to the given position +local function check_entity_pos(pos, objref) + local real_pos = vector.round(objref:get_pos()) + local pos_hash = objref:get_luaentity().pos + if pos_hash == nil then + return vector.equals(real_pos, vector.round(pos)) + else + return vector.equals(minetest.get_position_from_hash(pos_hash), pos) + end +end + +--- Gets the display entities attached with a node. Removes extra ones +local function get_entities(pos) + local objrefs = {} + local ndef = minetest.registered_nodes[minetest.get_node(pos).name] + if ndef and ndef.display_entities then + for _, objref in ipairs(minetest.get_objects_inside_radius(pos, 1.5)) do + local entity = objref:get_luaentity() + if entity and ndef.display_entities[entity.name] and check_entity_pos(pos, objref) then + if objrefs[entity.name] then + objref:remove() + else + objrefs[entity.name] = objref + end + end + end + end + return objrefs +end + +local function clip_pos_prop(posprop) + if posprop then + return math.max(-1.5, math.min(1.5, posprop)) + else + return 0 + end +end + +--- (Create and) place display entities according to the node orientation +local function place_entities(pos) + local node = minetest.get_node(pos) + local ndef = minetest.registered_nodes[node.name] + local values = get_values(node) + local objrefs = get_entities(pos) + + if values and ndef and ndef.display_entities then + + for entity_name, props in pairs(ndef.display_entities) do + local depth = clip_pos_prop(props.depth) + local right = clip_pos_prop(props.right) + local top = clip_pos_prop(props.top) + if not objrefs[entity_name] then + objrefs[entity_name] = minetest.add_entity(pos, entity_name) + end + + objrefs[entity_name]:setpos({ + x = pos.x - values.dx * depth + values.rx * right, + y = pos.y - top, + z = pos.z - values.dz * depth + values.rz * right}) + + objrefs[entity_name]:setyaw(values.yaw) + end + end + return objrefs +end + +--- Call on_display_update callback of a node for one of its display entities +local function call_node_on_display_update(pos, objref) + local ndef = minetest.registered_nodes[minetest.get_node(pos).name] + local entity = objref:get_luaentity() + if ndef and ndef.display_entities and entity and ndef.display_entities[entity.name] then + ndef.display_entities[entity.name].on_display_update(pos, objref) + end +end + +--- Force entity update +function display_api.update_entities(pos) + local objrefs = place_entities(pos) + for _, objref in pairs(objrefs) do + objref:get_luaentity().pos = minetest.hash_node_position(pos) + call_node_on_display_update(pos, objref) + end +end + +--- On_activate callback for display_api entities. Calls on_display_update callbacks +--- of corresponding node for each entity. +function display_api.on_activate(entity, staticdata) + if entity then + if string.sub(staticdata, 1, string.len("return")) == "return" then + local data = core.deserialize(staticdata) + if data and type(data) == "table" then + entity.pos = data.pos + end + end + entity.object:set_armor_groups({immortal=1}) + local pos + if entity.pos then + pos = minetest.get_position_from_hash(entity.pos) + else + pos = entity.object:getpos() + end + display_api.update_entities(pos) + end +end + +--- On_place callback for display_api items. Does nothing more than preventing item +--- from being placed on ceiling or ground +function display_api.on_place(itemstack, placer, pointed_thing) + local ndef = itemstack:get_definition() + local above = pointed_thing.above + local under = pointed_thing.under + local dir = {x = under.x - above.x, + y = 0, + z = under.z - above.z} + + -- If item is not placed on a wall, use the player's view direction instead + if dir.x == 0 and dir.z == 0 then + dir = placer:get_look_dir() + dir.y = 0 + end + + local param2 + if ndef then + if ndef.paramtype2 == "wallmounted" then + param2 = minetest.dir_to_wallmounted(dir) + elseif ndef.paramtype2 == "facedir" then + param2 = minetest.dir_to_facedir(dir) + end + end + return minetest.item_place(itemstack, placer, pointed_thing, param2) +end + +--- On_construct callback for display_api items. Creates entities and update them. +function display_api.on_construct(pos) + display_api.update_entities(pos) +end + +--- On_destruct callback for display_api items. Removes entities. +function display_api.on_destruct(pos) + local objrefs = get_entities(pos) + + for _, objref in pairs(objrefs) do + objref:remove() + end +end + +-- On_rotate (screwdriver) callback for display_api items. Prevents axis rotation and reorients entities. +function display_api.on_rotate(pos, node, user, mode, new_param2) + if mode ~= 1 then return false end + + local values = get_values(node) + + if values then + minetest.swap_node(pos, {name = node.name, param1 = node.param1, param2 = values.rotate}) + place_entities(pos) + return true + else + return false + end +end + +--- Creates display entity with some fields and the on_activate callback +function display_api.register_display_entity(entity_name) + if not minetest.registered_entity then + minetest.register_entity(':'..entity_name, { + collisionbox = { 0, 0, 0, 0, 0, 0 }, + visual = "upright_sprite", + textures = {}, + on_activate = display_api.on_activate, + get_staticdata = function(self) + return minetest.serialize({ + pos = self.pos, + }) + end, + }) + end +end + +minetest.register_lbm({ + label = "Update display_api entities", + name = "display_api:update_entities", + run_at_every_load = true, + nodenames = {"group:display_modpack_node", "group:display_lib_node"}, + action = function(pos, node) display_api.update_entities(pos) end, +}) + +-- Compatibility +display_lib = display_api diff --git a/modpack.txt b/modpack.txt deleted file mode 100644 index e69de29..0000000 diff --git a/ontime_clocks/LICENSE.txt b/ontime_clocks/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/ontime_clocks/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/ontime_clocks/README.md b/ontime_clocks/README.md deleted file mode 100644 index d9db998..0000000 --- a/ontime_clocks/README.md +++ /dev/null @@ -1,49 +0,0 @@ -# Ontime Clocks - -This mod provides clocks that display real ingame time. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -**Dependancies**: display_api, default - -**License**: Code under LGPL, textures under CC-BY-SA - -## Recipes - -**Green and red digital clocks** - - - D - - G M G - - - - - -G = Glass, D = Dye, M = Mese Crystal, - = Empty - -Green dye for green clock, red dye for red clock - -**White clock** - - S P S - - M - - - - - - -P = Paper, S = Steel Ingot, M = Mese Crystal, - = Empty - - -**Frameless clock** - - S D S - - M - - - - - - -D = Dye, S = Steel Ingot, M = Mese Crystal, - = Empty - -Black dye for black clock, White dye for white clock - -**Gold frameless clock** - - G - G - - M - - - - - - -G = Gold Ingot, M = Mese Crystal, - = Empty - diff --git a/ontime_clocks/common.lua b/ontime_clocks/common.lua deleted file mode 100644 index cced299..0000000 --- a/ontime_clocks/common.lua +++ /dev/null @@ -1,61 +0,0 @@ ---[[ - ontime_clocks mod for Minetest - Clock nodes displaying ingame time - (c) Pierre-Yves Rollo - - This file is part of ontime_clocks. - - ontime_clocks is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ontime_clocks 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with ontime_clocks. If not, see . ---]] - --- Entity for time display -display_api.register_display_entity("ontime_clocks:display") - -function ontime_clocks.get_h24() - return math.floor(minetest.get_timeofday()*24)%24 -end - -function ontime_clocks.get_h12() - return math.floor(minetest.get_timeofday()*24)%12 -end - -function ontime_clocks.get_m12() - return math.floor(minetest.get_timeofday()*288)%12 -end - -function ontime_clocks.get_digital_properties(color_off, color_on, hour, minute) - return - { - textures={"ontime_clocks_digital_background.png^[colorize:"..color_off - .."^([combine:21x7" - ..":0,"..(-7*(math.floor(hour/10))).."=ontime_clocks_digital_digit.png" - ..":5,"..(-7*(hour%10)).."=ontime_clocks_digital_digit.png" - ..":9,-70=ontime_clocks_digital_digit.png" - ..":12,"..(-7*(math.floor(minute/2))).."=ontime_clocks_digital_digit.png" - ..":17,"..(-35*(minute%2)).."=ontime_clocks_digital_digit.png" - .."^[colorize:"..color_on..")"}, - visual_size = {x=21/32, y=7/32} - } -end - -function ontime_clocks.get_needles_properties(color, size, hour, minute) - return - { - textures={"[combine:"..size.."x"..size - ..":0,"..(-size*hour).."=ontime_clocks_needle_h"..size..".png" - ..":0,"..(-size*minute).."=ontime_clocks_needle_m"..size..".png" - .."^[colorize:"..color}, - visual_size = {x=size/64, y=size/64} - } -end - diff --git a/ontime_clocks/copyright.txt b/ontime_clocks/copyright.txt deleted file mode 100644 index a2afd94..0000000 --- a/ontime_clocks/copyright.txt +++ /dev/null @@ -1,8 +0,0 @@ -Code, Textures and Models by Pierre-Yves Rollo (pyrollo) -intllib support (i18n) by (fat115) -intllib fallback code and tools by Diego Martínez (kaeza) -Extra contibutors: -(Thomas--S) -Translations: -Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat) -(fat115) diff --git a/ontime_clocks/crafts.lua b/ontime_clocks/crafts.lua deleted file mode 100644 index c94352a..0000000 --- a/ontime_clocks/crafts.lua +++ /dev/null @@ -1,75 +0,0 @@ ---[[ - ontime_clocks mod for Minetest - Clock nodes displaying ingame time - (c) Pierre-Yves Rollo - - This file is part of ontime_clocks. - - ontime_clocks is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ontime_clocks 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with ontime_clocks. If not, see . ---]] - -minetest.register_craft({ - output = 'ontime_clocks:green_digital', - recipe = { - {'', 'dye:green', ''}, - {'default:glass', 'default:mese_crystal', 'default:glass'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'ontime_clocks:red_digital', - recipe = { - {'', 'dye:red', ''}, - {'default:glass', 'default:mese_crystal', 'default:glass'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'ontime_clocks:white', - recipe = { - {'default:steel_ingot', 'default:paper', 'default:steel_ingot'}, - {'', 'default:mese_crystal', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'ontime_clocks:frameless_black', - recipe = { - {'default:steel_ingot', 'dye:black', 'default:steel_ingot'}, - {'', 'default:mese_crystal', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'ontime_clocks:frameless_gold', - recipe = { - {'default:gold_ingot', '', 'default:gold_ingot'}, - {'', 'default:mese_crystal', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'ontime_clocks:frameless_white', - recipe = { - {'default:steel_ingot', 'dye:white', 'default:steel_ingot'}, - {'', 'default:mese_crystal', ''}, - {'', '', ''}, - } -}) - - diff --git a/ontime_clocks/depends.txt b/ontime_clocks/depends.txt deleted file mode 100644 index 07a2ec1..0000000 --- a/ontime_clocks/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -default -dye -display_api - -intllib? diff --git a/ontime_clocks/init.lua b/ontime_clocks/init.lua deleted file mode 100644 index d0ac334..0000000 --- a/ontime_clocks/init.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ - ontime_clocks mod for Minetest - Clock nodes displaying ingame time - (c) Pierre-Yves Rollo - - This file is part of ontime_clocks. - - ontime_clocks is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ontime_clocks 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with ontime_clocks. If not, see . ---]] - -ontime_clocks = {} -ontime_clocks.name = minetest.get_current_modname() -ontime_clocks.path = minetest.get_modpath(ontime_clocks.name) - --- Load support for intllib. -local S, NS = dofile(ontime_clocks.path.."/intllib.lua") -ontime_clocks.intllib = S - -dofile(ontime_clocks.path.."/common.lua") -dofile(ontime_clocks.path.."/nodes.lua") -dofile(ontime_clocks.path.."/crafts.lua") diff --git a/ontime_clocks/intllib.lua b/ontime_clocks/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/ontime_clocks/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/ontime_clocks/locale/fr.po b/ontime_clocks/locale/fr.po deleted file mode 100644 index ed5d2b4..0000000 --- a/ontime_clocks/locale/fr.po +++ /dev/null @@ -1,43 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 09:50+0200\n" -"PO-Revision-Date: 2017-05-08 06:20+0200\n" -"Last-Translator: Peppy \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: nodes.lua -msgid "Green digital clock" -msgstr "Horloge numérique verte" - -#: nodes.lua -msgid "Red digital clock" -msgstr "Horloge numérique rouge" - -#: nodes.lua -msgid "White clock" -msgstr "Horloge blanche" - -#: nodes.lua -msgid "Frameless clock" -msgstr "Horloge sans cadre" - -#: nodes.lua -msgid "Frameless gold clock" -msgstr "Horloge dorée sans cadre" - -#: nodes.lua -msgid "Frameless white clock" -msgstr "Horloge blanche sans cadre" diff --git a/ontime_clocks/locale/ms.po b/ontime_clocks/locale/ms.po deleted file mode 100644 index 76f06a3..0000000 --- a/ontime_clocks/locale/ms.po +++ /dev/null @@ -1,42 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Muhammad Nur Hidayat , 2017. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:21+0200\n" -"PO-Revision-Date: 2017-08-27 09:41+0800\n" -"Last-Translator: Muhammad Nur Hidayat \n" -"Language-Team: Malay \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Vé 0.1.4\n" - -#: nodes.lua -msgid "Green digital clock" -msgstr "Jam digital hijau" - -#: nodes.lua -msgid "Red digital clock" -msgstr "Jam digital merah" - -#: nodes.lua -msgid "White clock" -msgstr "Jam putih" - -#: nodes.lua -msgid "Frameless clock" -msgstr "Jam tanpa bingkai" - -#: nodes.lua -msgid "Frameless gold clock" -msgstr "Jam emas tanpa bingkai" - -#: nodes.lua -msgid "Frameless white clock" -msgstr "Jam putih tanpa bingkai" diff --git a/ontime_clocks/locale/template.pot b/ontime_clocks/locale/template.pot deleted file mode 100644 index dca736f..0000000 --- a/ontime_clocks/locale/template.pot +++ /dev/null @@ -1,42 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:21+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: nodes.lua -msgid "Green digital clock" -msgstr "" - -#: nodes.lua -msgid "Red digital clock" -msgstr "" - -#: nodes.lua -msgid "White clock" -msgstr "" - -#: nodes.lua -msgid "Frameless clock" -msgstr "" - -#: nodes.lua -msgid "Frameless gold clock" -msgstr "" - -#: nodes.lua -msgid "Frameless white clock" -msgstr "" diff --git a/ontime_clocks/nodes.lua b/ontime_clocks/nodes.lua deleted file mode 100644 index aa3583d..0000000 --- a/ontime_clocks/nodes.lua +++ /dev/null @@ -1,246 +0,0 @@ ---[[ - ontime_clocks mod for Minetest - Clock nodes displaying ingame time - (c) Pierre-Yves Rollo - - This file is part of ontime_clocks. - - ontime_clocks is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - ontime_clocks 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with ontime_clocks. If not, see . ---]] - -local S = ontime_clocks.intllib - --- Green digital clock -minetest.register_node("ontime_clocks:green_digital", { - description = S("Green digital clock"), - inventory_image = "ontime_clocks_green_digital_inventory.png", - wield_image = "ontime_clocks_green_digital_inventory.png", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -3/16, -7/16, -13/32, 7/32, 7/16 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, - wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } - }, - tiles = {"ontime_clocks_digital.png"}, - groups = {oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 13/32 - 0.01, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_digital_properties( - "#040", "#0F0", ontime_clocks.get_h24(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:green_digital"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) - --- Red digital clock -minetest.register_node("ontime_clocks:red_digital", { - description = S("Red digital clock"), - inventory_image = "ontime_clocks_red_digital_inventory.png", - wield_image = "ontime_clocks_red_digital_inventory.png", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -3/16, -7/16, -13/32, 7/32, 7/16 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, - wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } - }, - tiles = {"ontime_clocks_digital.png"}, - groups = {oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 13/32 - 0.01, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_digital_properties( - "#400", "#F00", ontime_clocks.get_h24(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:red_digital"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) - - -minetest.register_node("ontime_clocks:white", { - description = S("White clock"), - inventory_image = "ontime_clocks_white_inventory.png", - wield_image = "ontime_clocks_white_inventory.png", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -7/16, -7/16, -6/16, 7/16, 7/16}, - wall_bottom = { -7/16, -0.5, -7/16, 7/16, -7/16, 7/16}, - wall_top = { -7/16, 0.5, -7/16, 7/16, 7/16, 7/16}, - }, - tiles = {"ontime_clocks_white.png"}, - groups = {choppy = 1, oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 6/16 - 0.01, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_needles_properties( - "#000", 36, ontime_clocks.get_h12(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:white"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) - -minetest.register_node("ontime_clocks:frameless_black", { - description = S("Frameless clock"), - inventory_image = "ontime_clocks_frameless_inventory.png", - wield_image = "ontime_clocks_frameless_inventory.png", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, - wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } - }, - tiles = {"ontime_clocks_frameless.png"}, - groups = {choppy = 1, oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 7/16, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_needles_properties( - "#000", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:frameless_black"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) - -minetest.register_node("ontime_clocks:frameless_gold", { - description = S("Frameless gold clock"), - inventory_image = "ontime_clocks_frameless_inventory.png^[colorize:#FF0", - wield_image = "ontime_clocks_frameless_inventory.png^[colorize:#FF0", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, - wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } - }, - tiles = {"ontime_clocks_frameless.png^[colorize:#FF0"}, - groups = {choppy = 1, oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 7/16, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_needles_properties( - "#FF0", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:frameless_gold"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) - -minetest.register_node("ontime_clocks:frameless_white", { - description = S("Frameless white clock"), - inventory_image = "ontime_clocks_frameless_inventory.png^[colorize:#FFF", - wield_image = "ontime_clocks_frameless_inventory.png^[colorize:#FFF", - paramtype = "light", - paramtype2 = "wallmounted", - drawtype = "nodebox", - node_box = { - type = "wallmounted", - wall_side = { -0.5, -7/16, -7/16, -0.45, 7/16, 7/16 }, - wall_bottom = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, - wall_top = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 } - }, - tiles = {"ontime_clocks_frameless.png^[colorize:#FFF"}, - groups = {choppy = 1, oddly_breakable_by_hand = 1, not_blocking_trains = 1, display_modpack_node = 1}, - display_entities = { - ["ontime_clocks:display"] = { - depth = 7/16, - on_display_update = function(pos, objref) - objref:set_properties( - ontime_clocks.get_needles_properties( - "#FFF", 48, ontime_clocks.get_h12(), ontime_clocks.get_m12())) - end }, - }, - on_place = display_api.on_place, - on_construct = display_api.on_construct, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, -}) - -minetest.register_abm({ - nodenames = {"ontime_clocks:frameless_white"}, - interval = 5, - chance = 1, - action = display_api.update_entities, -}) diff --git a/ontime_clocks/textures/ontime_clocks_digital.png b/ontime_clocks/textures/ontime_clocks_digital.png deleted file mode 100644 index 4b79679..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_digital.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_digital_background.png b/ontime_clocks/textures/ontime_clocks_digital_background.png deleted file mode 100644 index 6731145..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_digital_background.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_digital_digit.png b/ontime_clocks/textures/ontime_clocks_digital_digit.png deleted file mode 100644 index 7bbc4a9..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_digital_digit.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_frameless.png b/ontime_clocks/textures/ontime_clocks_frameless.png deleted file mode 100644 index 07c0001..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_frameless.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_frameless_inventory.png b/ontime_clocks/textures/ontime_clocks_frameless_inventory.png deleted file mode 100644 index b91c93c..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_frameless_inventory.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_green_digital_inventory.png b/ontime_clocks/textures/ontime_clocks_green_digital_inventory.png deleted file mode 100644 index 3318f10..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_green_digital_inventory.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_needle_h36.png b/ontime_clocks/textures/ontime_clocks_needle_h36.png deleted file mode 100644 index bc1845d..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_needle_h36.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_needle_h48.png b/ontime_clocks/textures/ontime_clocks_needle_h48.png deleted file mode 100644 index c894ac5..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_needle_h48.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_needle_m36.png b/ontime_clocks/textures/ontime_clocks_needle_m36.png deleted file mode 100644 index 90bd878..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_needle_m36.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_needle_m48.png b/ontime_clocks/textures/ontime_clocks_needle_m48.png deleted file mode 100644 index 4c4a13c..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_needle_m48.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_red_digital_inventory.png b/ontime_clocks/textures/ontime_clocks_red_digital_inventory.png deleted file mode 100644 index cfe4fe0..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_red_digital_inventory.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_white.png b/ontime_clocks/textures/ontime_clocks_white.png deleted file mode 100644 index 577f2d1..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_white.png and /dev/null differ diff --git a/ontime_clocks/textures/ontime_clocks_white_inventory.png b/ontime_clocks/textures/ontime_clocks_white_inventory.png deleted file mode 100644 index 03f7b58..0000000 Binary files a/ontime_clocks/textures/ontime_clocks_white_inventory.png and /dev/null differ diff --git a/ontime_clocks/tools/updatepo.sh b/ontime_clocks/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/ontime_clocks/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done diff --git a/screenshot.png b/screenshot.png deleted file mode 100644 index bbce3ec..0000000 Binary files a/screenshot.png and /dev/null differ diff --git a/signs/LICENSE.txt b/signs/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/signs/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/signs/README.md b/signs/README.md deleted file mode 100644 index 0282d2e..0000000 --- a/signs/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# Signs - -This mod provides various signs with text display. Text is locked if area is protected. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -**Dependancies**: default, display\_lib, font\_lib - -**License**: Code under LGPL, Textures and models under CC-BY-SA - -## Recipes - -**Poster** - - P P - - P P - - P P - - -P = Paper - -Poster displays only title, much more text can be read by right-clicking on it. - -**Wooden direction sign** - - W W W - W W - - - - - - -W = Wooden Plank (group) - diff --git a/signs/common.lua b/signs/common.lua deleted file mode 100644 index 2b40db2..0000000 --- a/signs/common.lua +++ /dev/null @@ -1,71 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - -local S = signs.intllib -local F = function(...) return minetest.formspec_escape(S(...)) end - - ---Backwards compatibility functions - -signs.set_display_text = function(...) - minetest.log("warning", "signs.set_display_text() is deprecated, please use signs_api.set_display_text() instead.") - return signs_api.set_display_text(...) -end - -signs.set_formspec = function(...) - minetest.log("warning", "signs.set_formspec() is deprecated, please use signs_api.set_formspec() instead.") - return signs_api.set_formspec(...) -end - -signs.on_receive_fields = function(...) - minetest.log("warning", "signs.on_receive_fields() is deprecated, please use signs_api.on_receive_fields() instead.") - return signs_api.on_receive_fields(...) -end - -signs.on_place_direction = function(...) - minetest.log("warning", "signs.on_place_direction() is deprecated, please use signs_api.on_place_direction() instead.") - return signs_api.on_place_direction(...) -end - -signs.on_rotate = function(...) - minetest.log("warning", "signs.on_rotate() is deprecated, please use signs_api.on_rotate() instead.") - return signs_api.on_rotate(...) -end - -signs.register_sign = function(...) - minetest.log("warning", "signs.register_sign() is deprecated, please use signs_api.register_sign() instead.") - return signs_api.register_sign(...) -end - - --- Generic callback for show_formspec displayed formspecs of "sign" mod - -minetest.register_on_player_receive_fields(function(player, formname, fields) - local found, _, mod, node_name, pos = formname:find("^([%w_]+):([%w_]+)@([^:]+)") - if found then - if mod ~= 'signs' then return end - - local ndef = minetest.registered_nodes[mod..":"..node_name] - - if ndef and ndef.on_receive_fields then - ndef.on_receive_fields(minetest.string_to_pos(pos), formname, fields, player) - end - end -end) diff --git a/signs/compatibility.lua b/signs/compatibility.lua deleted file mode 100644 index e798a67..0000000 --- a/signs/compatibility.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - - --- Wallmounted to facedir conversion ------------------------------------- - -local wallmounted_to_facedir = { - [0]=1, -- Should not happend with signs - [1]=1, -- Should not happend with signs - [2]=1, - [3]=3, - [4]=0, - [5]=2 -} - --- Nodes conversions -local convert_nodes = { - ['signs:wooden_right'] = 'signs:wooden_right_sign', - ['signs:wooden_left'] = 'signs:wooden_left_sign', - ['signs:poster'] = 'signs:paper_poster' -} - -local function compatibility_check_1(pos, node) - -- Old wallmounted modes to new facedir nodes conversion - node.name = convert_nodes[node.name] - if node.name then - node.param2 = wallmounted_to_facedir[node.param2] - display_api.on_destruct(pos) - minetest.swap_node(pos, node) - display_api.on_construct(pos) - end -end - -minetest.register_lbm({ name = "signs:conpatibility_1", - nodenames = {"signs:wooden_right", "signs:wooden_left", "signs:poster"}, - action = compatibility_check_1, -}) - --- Text entity name change because of signs_lib using signs prefix ------------------------------------------------------------------- - --- If no other mod registered signs:text, register it. --- We need to have this entity registered to be able to remove it. -if minetest.registered_entities["signs:text"] == nil then - minetest.register_entity("signs:text", { - collisionbox = { 0, 0, 0, 0, 0, 0 }, - visual = "upright_sprite", - textures = {}, - }) -end - -local function compatibility_check_2(pos, node) - -- Remove old entity - for _, objref in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do - local entity = objref:get_luaentity() - if entity and entity.name == "signs:text" then - objref:remove() - end - end - -- Create new entity - display_api.update_entities(pos) -end - -minetest.register_lbm({ name = "signs:conpatibility_2", - nodenames = {"signs:wooden_right_sign", "signs:wooden_left_sign", "signs:paper_poster"}, - action = compatibility_check_2, -}) - - - - - diff --git a/signs/copyright.txt b/signs/copyright.txt deleted file mode 100644 index 9e3b294..0000000 --- a/signs/copyright.txt +++ /dev/null @@ -1,10 +0,0 @@ -Code, Textures and Models by Pierre-Yves Rollo (pyrollo) -intllib support (i18n) by (fat115) -intllib fallback code and tools by Diego Martínez (kaeza) -Extra contributors: -(gpcf) -(Thomas--S) -Translations: -Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat) -(fat115) - diff --git a/signs/crafts.lua b/signs/crafts.lua deleted file mode 100644 index b4e0206..0000000 --- a/signs/crafts.lua +++ /dev/null @@ -1,18 +0,0 @@ -minetest.register_craft({ - output = 'signs:wooden_right_sign', - recipe = { - {'group:wood', 'group:wood', 'group:wood'}, - {'group:wood', 'group:wood', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs:paper_poster', - recipe = { - {'default:paper', 'default:paper', ''}, - {'default:paper', 'default:paper', ''}, - {'default:paper', 'default:paper', ''}, - } -}) - diff --git a/signs/depends.txt b/signs/depends.txt deleted file mode 100644 index ad3bb8f..0000000 --- a/signs/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -default -intllib? -display_api -font_api -signs_api diff --git a/signs/init.lua b/signs/init.lua deleted file mode 100644 index 4f9239f..0000000 --- a/signs/init.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - -signs = {} -signs.name = minetest.get_current_modname() -signs.path = minetest.get_modpath(signs.name) - --- Load support for intllib. -local S, NS = dofile(signs.path.."/intllib.lua") -signs.intllib = S - -dofile(signs.path.."/common.lua") -dofile(signs.path.."/nodes.lua") -dofile(signs.path.."/crafts.lua") -dofile(signs.path.."/compatibility.lua") - - - - diff --git a/signs/intllib.lua b/signs/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/signs/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/signs/locale/fr.po b/signs/locale/fr.po deleted file mode 100644 index 7a00544..0000000 --- a/signs/locale/fr.po +++ /dev/null @@ -1,54 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 13:20+0200\n" -"PO-Revision-Date: 2017-05-08 07:08+0200\n" -"Last-Translator: Peppy \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" - -#: common.lua nodes.lua -msgid "Text" -msgstr "Texte" - -#: common.lua nodes.lua -msgid "Write" -msgstr "Écrire" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr " (uniquement les %s premières lignes)" - -#: nodes.lua -msgid "Title" -msgstr "Titre" - -#: nodes.lua -msgid "Close" -msgstr "Fermer" - -#: nodes.lua -msgid "(right-click to read more text)" -msgstr "(Clic-droit pour afficher le texte entier)" - -#: nodes.lua -msgid "Wooden direction sign" -msgstr "Panneau de direction en bois" - -#: nodes.lua -msgid "Poster" -msgstr "Affiche" - -#~ msgid "Textd" -#~ msgstr "Texte" diff --git a/signs/locale/ms.po b/signs/locale/ms.po deleted file mode 100644 index 6cbd147..0000000 --- a/signs/locale/ms.po +++ /dev/null @@ -1,51 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Muhammad Nur Hidayat , 2017. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 13:20+0200\n" -"PO-Revision-Date: 2017-08-27 15:50+0800\n" -"Last-Translator: Muhammad Nur Hidayat \n" -"Language-Team: Malay \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Vé 0.1.4\n" - -#: common.lua nodes.lua -msgid "Text" -msgstr "Teks" - -#: common.lua nodes.lua -msgid "Write" -msgstr "Tulis" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr "( %s baris pertama sahaja )" - -#: nodes.lua -msgid "Title" -msgstr "Tajuk" - -#: nodes.lua -msgid "Close" -msgstr "Tutup" - -#: nodes.lua -msgid "(right-click to read more text)" -msgstr "(klik-kanan untuk baca teks penuh)" - -#: nodes.lua -msgid "Wooden direction sign" -msgstr "Papan tanda arah kayu" - -#: nodes.lua -msgid "Poster" -msgstr "Poster" diff --git a/signs/locale/template.pot b/signs/locale/template.pot deleted file mode 100644 index a1fc065..0000000 --- a/signs/locale/template.pot +++ /dev/null @@ -1,51 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 13:20+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: common.lua nodes.lua -msgid "Text" -msgstr "" - -#: common.lua nodes.lua -msgid "Write" -msgstr "" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr "" - -#: nodes.lua -msgid "Title" -msgstr "" - -#: nodes.lua -msgid "Close" -msgstr "" - -#: nodes.lua -msgid "(right-click to read more text)" -msgstr "" - -#: nodes.lua -msgid "Wooden direction sign" -msgstr "" - -#: nodes.lua -msgid "Poster" -msgstr "" diff --git a/signs/models/signs_dir_left.obj b/signs/models/signs_dir_left.obj deleted file mode 100644 index 91ead2d..0000000 --- a/signs/models/signs_dir_left.obj +++ /dev/null @@ -1,51 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: 'signs_dir_right.blend' -# www.blender.org -mtllib signs_dir_right.mtl -o Plane -v -0.500000 0.218750 0.437500 -v -0.500000 -0.218750 0.437500 -v 0.250000 0.218750 0.437500 -v 0.250000 -0.218750 0.437500 -v 0.437500 -0.000000 0.437500 -v -0.500000 0.218750 0.500000 -v -0.500000 -0.218750 0.500000 -v 0.250000 0.218750 0.500000 -v 0.250000 -0.218750 0.500000 -v 0.437500 -0.000000 0.500000 -vt 0.062500 0.500000 -vt 0.062500 0.937500 -vt 0.812500 0.937500 -vt 1.000000 0.718750 -vt 0.812500 0.500000 -vt 0.062500 0.437500 -vt 0.812500 0.437500 -vt 1.000000 0.218750 -vt 0.812500 0.000000 -vt 0.062500 0.000000 -vt 1.000000 0.312500 -vt 0.937500 0.312500 -vt 0.937500 0.625000 -vt 1.000000 0.625000 -vt 0.062500 1.000000 -vt 0.812500 1.000000 -vt 0.000000 0.312500 -vt 0.062500 0.312500 -vt 0.000000 0.000000 -vt 0.000000 0.500000 -vt 0.000000 0.937500 -vn 0.000000 0.000000 -1.000000 -vn 0.000000 0.000000 1.000000 -vn 0.759300 0.650800 0.000000 -vn 0.000000 1.000000 0.000000 -vn -0.000000 -1.000000 0.000000 -vn 0.759300 -0.650800 -0.000000 -vn -1.000000 0.000000 0.000000 -usemtl None -s off -f 2/1/1 1/2/1 3/3/1 5/4/1 4/5/1 -f 7/6/2 9/7/2 10/8/2 8/9/2 6/10/2 -f 3/11/3 8/12/3 10/13/3 5/14/3 -f 1/2/4 6/15/4 8/16/4 3/3/4 -f 4/5/5 9/7/5 7/6/5 2/1/5 -f 5/17/6 10/18/6 9/10/6 4/19/6 -f 2/1/7 7/20/7 6/21/7 1/2/7 diff --git a/signs/models/signs_dir_right.obj b/signs/models/signs_dir_right.obj deleted file mode 100644 index 6597bfd..0000000 --- a/signs/models/signs_dir_right.obj +++ /dev/null @@ -1,51 +0,0 @@ -# Blender v2.76 (sub 0) OBJ File: 'signs_dir_left.blend' -# www.blender.org -mtllib signs_dir_left.mtl -o Plane -v 0.500000 -0.218750 0.437500 -v 0.500000 0.218750 0.437500 -v -0.250000 -0.218750 0.437500 -v -0.250000 0.218750 0.437500 -v -0.437500 -0.000000 0.437500 -v 0.500000 -0.218750 0.500000 -v 0.500000 0.218750 0.500000 -v -0.250000 -0.218750 0.500000 -v -0.250000 0.218750 0.500000 -v -0.437500 -0.000000 0.500000 -vt 0.062500 0.500000 -vt 0.062500 0.937500 -vt 0.812500 0.937500 -vt 1.000000 0.718750 -vt 0.812500 0.500000 -vt 0.062500 0.437500 -vt 0.812500 0.437500 -vt 1.000000 0.218750 -vt 0.812500 0.000000 -vt 0.062500 0.000000 -vt 1.000000 0.312500 -vt 0.937500 0.312500 -vt 0.937500 0.625000 -vt 1.000000 0.625000 -vt 0.062500 1.000000 -vt 0.812500 1.000000 -vt 0.000000 0.312500 -vt 0.062500 0.312500 -vt 0.000000 0.000000 -vt 0.000000 0.500000 -vt 0.000000 0.937500 -vn -0.000000 0.000000 -1.000000 -vn 0.000000 -0.000000 1.000000 -vn -0.759300 -0.650800 -0.000000 -vn 0.000000 -1.000000 -0.000000 -vn -0.000000 1.000000 0.000000 -vn -0.759300 0.650800 0.000000 -vn 1.000000 0.000000 0.000000 -usemtl None -s off -f 2/1/1 1/2/1 3/3/1 5/4/1 4/5/1 -f 7/6/2 9/7/2 10/8/2 8/9/2 6/10/2 -f 3/11/3 8/12/3 10/13/3 5/14/3 -f 1/2/4 6/15/4 8/16/4 3/3/4 -f 4/5/5 9/7/5 7/6/5 2/1/5 -f 5/17/6 10/18/6 9/10/6 4/19/6 -f 2/1/7 7/20/7 6/21/7 1/2/7 diff --git a/signs/nodes.lua b/signs/nodes.lua deleted file mode 100644 index 7500297..0000000 --- a/signs/nodes.lua +++ /dev/null @@ -1,188 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - -local S = signs.intllib -local F = function(...) return minetest.formspec_escape(S(...)) end - --- Poster specific formspec -local function display_poster(pos, node, player) - local formspec - local meta = minetest.get_meta(pos) - local def = minetest.registered_nodes[node.name].display_entities["signs:display_text"] - local font = font_api.get_font(meta:get_string("font") or def.font_name) - - -- Title texture - local titletexture = font:make_text_texture( - meta:get_string("display_text"), font:get_height()*8.4, font:get_height(), 1, "center") - - formspec = - "size[7,9]".. - "background[0,0;7,9;signs_poster_formspec.png]".. - "image[0,-0.2;8.4,2;"..titletexture.."]".. - "textarea[0.3,1.5;7,8;;"..minetest.colorize("#111", minetest.formspec_escape(meta:get_string("text")))..";]".. - "bgcolor[#0000]" - - if minetest.is_protected(pos, player:get_player_name()) then - formspec = formspec.. - "button_exit[2.5,8;2,1;ok;"..F("Close").."]" - else - formspec = formspec.. - "button[1,8;2,1;edit;"..F("Edit").."]".. - "button_exit[4,8;2,1;ok;"..F("Close").."]" - end - minetest.show_formspec(player:get_player_name(), - node.name.."@"..minetest.pos_to_string(pos)..":display", - formspec) -end - -local function edit_poster(pos, node, player) - local formspec - local meta = minetest.get_meta(pos) - - if not minetest.is_protected(pos, player:get_player_name()) then - formspec = - "size[6.5,7.5]".. - default.gui_bg .. default.gui_bg_img .. default.gui_slots .. - "field[0.5,0.7;6,1;display_text;"..F("Title")..";".. - minetest.formspec_escape(meta:get_string("display_text")).."]".. - "textarea[0.5,1.7;6,6;text;"..F("Text")..";".. - minetest.formspec_escape(meta:get_string("text")).."]".. - "button_exit[2.25,7;2,1;write;"..F("Write").."]" - minetest.show_formspec(player:get_player_name(), - node.name.."@"..minetest.pos_to_string(pos)..":edit", - formspec) - end -end - --- Poster specific on_receive_fields callback -local function on_receive_fields_poster(pos, formname, fields, player) - local meta = minetest.get_meta(pos) - local node = minetest.get_node(pos) - - if not minetest.is_protected(pos, player:get_player_name()) and fields then - if formname == node.name.."@"..minetest.pos_to_string(pos)..":display" and - fields.edit then - edit_poster(pos, node, player) - end - if formname == node.name.."@"..minetest.pos_to_string(pos)..":edit" and - (fields.write or fields.key_enter) then - meta:set_string("display_text", fields.display_text) - meta:set_string("text", fields.text) - meta:set_string("infotext", "\""..fields.display_text - .."\"\n"..S("(right-click to read more text)")) - display_api.update_entities(pos) - display_poster(pos, node, player) - end - end -end - --- Text entity for all signs -display_api.register_display_entity("signs:display_text") - --- Sign models and registration -local models = { - wooden_sign = { - depth = 1/16, - width = 14/16, - height = 12/16, - entity_fields = { - size = { x = 12/16, y = 10/16 }, - maxlines = 3, - color = "#000", - }, - node_fields = { - description = S("Wooden sign"), - tiles = { "signs_wooden.png" }, - inventory_image = "signs_wooden_inventory.png", - }, - }, - wooden_right_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = -3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color="#000", - }, - node_fields = { - description = S("Wooden direction sign"), - tiles = { "signs_wooden_direction.png" }, - inventory_image = "signs_wooden_direction_inventory.png", - signs_other_dir = 'signs:wooden_left_sign', - on_place = signs_api.on_place_direction, - drawtype = "mesh", - mesh = "signs_dir_right.obj", - selection_box = { type="fixed", fixed = {-0.5, -7/32, 0.5, 7/16, 7/32, 7/16}}, - collision_box = { type="fixed", fixed = {-0,5, -7/32, 0.5, 7/16, 7/32, 7/16}}, - }, - }, - wooden_left_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = 3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("Wooden direction sign"), - tiles = { "signs_wooden_direction.png" }, - inventory_image = "signs_wooden_direction_inventory.png", - signs_other_dir = 'signs:wooden_right_sign', - drawtype = "mesh", - mesh = "signs_dir_left.obj", - selection_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}}, - collision_box = { type="fixed", fixed = {-7/16, -7/32, 0.5, 0.5, 7/32, 7/16}}, - groups = { not_in_creative_inventory = 1 }, - drop = "signs:wooden_right_sign", - }, - }, - paper_poster = { - depth = 1/32, - width = 26/32, - height = 30/32, - entity_fields = { - top = -11/32, - size = { x = 26/32, y = 6/32 }, - maxlines = 1, - color = "#000", - }, - node_fields = { - description = S("Poster"), - tiles = { "signs_poster_sides.png", "signs_poster_sides.png", - "signs_poster_sides.png", "signs_poster_sides.png", - "signs_poster_sides.png", "signs_poster.png" }, - inventory_image = "signs_poster_inventory.png", - on_construct = display_api.on_construct, - on_rightclick = display_poster, - on_receive_fields = on_receive_fields_poster, - }, - }, -} - --- Node registration -for name, model in pairs(models) -do - signs_api.register_sign("signs", name, model) -end diff --git a/signs/svg/black_direction.svg b/signs/svg/black_direction.svg deleted file mode 100644 index 8e9b8a9..0000000 --- a/signs/svg/black_direction.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/signs/svg/blue_street.svg b/signs/svg/blue_street.svg deleted file mode 100644 index 0aa87ff..0000000 --- a/signs/svg/blue_street.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/signs/svg/green_street.svg b/signs/svg/green_street.svg deleted file mode 100644 index 5d87509..0000000 --- a/signs/svg/green_street.svg +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - diff --git a/signs/svg/poster-formspec.svg b/signs/svg/poster-formspec.svg deleted file mode 100644 index 1aa8fa2..0000000 --- a/signs/svg/poster-formspec.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/signs/svg/poster.svg b/signs/svg/poster.svg deleted file mode 100644 index 4f6f774..0000000 --- a/signs/svg/poster.svg +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/signs/textures/signs_poster.png b/signs/textures/signs_poster.png deleted file mode 100644 index 92a3144..0000000 Binary files a/signs/textures/signs_poster.png and /dev/null differ diff --git a/signs/textures/signs_poster_formspec.png b/signs/textures/signs_poster_formspec.png deleted file mode 100644 index c790a0c..0000000 Binary files a/signs/textures/signs_poster_formspec.png and /dev/null differ diff --git a/signs/textures/signs_poster_inventory.png b/signs/textures/signs_poster_inventory.png deleted file mode 100644 index e73a85b..0000000 Binary files a/signs/textures/signs_poster_inventory.png and /dev/null differ diff --git a/signs/textures/signs_poster_sides.png b/signs/textures/signs_poster_sides.png deleted file mode 100644 index ebb26de..0000000 Binary files a/signs/textures/signs_poster_sides.png and /dev/null differ diff --git a/signs/textures/signs_wooden.png b/signs/textures/signs_wooden.png deleted file mode 100644 index 164948a..0000000 Binary files a/signs/textures/signs_wooden.png and /dev/null differ diff --git a/signs/textures/signs_wooden_direction.png b/signs/textures/signs_wooden_direction.png deleted file mode 100644 index 3e18765..0000000 Binary files a/signs/textures/signs_wooden_direction.png and /dev/null differ diff --git a/signs/textures/signs_wooden_direction_inventory.png b/signs/textures/signs_wooden_direction_inventory.png deleted file mode 100644 index 1b8e3d4..0000000 Binary files a/signs/textures/signs_wooden_direction_inventory.png and /dev/null differ diff --git a/signs/textures/signs_wooden_inventory.png b/signs/textures/signs_wooden_inventory.png deleted file mode 100644 index bb7e949..0000000 Binary files a/signs/textures/signs_wooden_inventory.png and /dev/null differ diff --git a/signs/tools/updatepo.sh b/signs/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/signs/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done diff --git a/signs_api/LICENSE.txt b/signs_api/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/signs_api/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/signs_api/README.md b/signs_api/README.md deleted file mode 100644 index 99ff20a..0000000 --- a/signs_api/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Signs API - -This mod provides various helper functions for registereing signs with text display. Text is locked if area is protected. -No actual signs get registered by this mod, the signs are defined in the sign submod. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -**Dependancies**: default, display\_lib, font\_lib - -**License**: Code under LGPL, Textures and models under CC-BY-SA - -## API Functions -### `signs_api.set_display_text(pos, text)` -Sets the text of a sign. Usually called in `on_receive_fields`. - -### `signs_api.set_formspec(pos)` -Usually called in `on_construct` to set the formspec. - -### `signs_api.on_receive_fields(pos, formname, fields, player)` -Helper function for `on_receive_fields`. Sets the display text and checks for protection. - -### `signs_api.on_place_direction(itemstack, placer, pointed_thing)` -On place callback for direction signs (chooses which sign according to look direction). - -### `signs_api.on_rotate(pos, node, player, mode, new_param2)` -Handles screwdriver rotation. Direction is affected for direction signs. - -### `signs_api.register_sign(mod, name, model)` -A method to quickly register signs. diff --git a/signs_api/copyright.txt b/signs_api/copyright.txt deleted file mode 100644 index b70e051..0000000 --- a/signs_api/copyright.txt +++ /dev/null @@ -1,10 +0,0 @@ -Code by Pierre-Yves Rollo (pyrollo) -intllib support (i18n) by (fat115) -intllib fallback code and tools by Diego Martínez (kaeza) -Extra contributors: -(gpcf) -(Thomas--S) -Translations: -Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat) -(fat115) - diff --git a/signs_api/depends.txt b/signs_api/depends.txt deleted file mode 100644 index f75ffcc..0000000 --- a/signs_api/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -intllib? -display_api -font_api diff --git a/signs_api/init.lua b/signs_api/init.lua deleted file mode 100644 index 1a4357e..0000000 --- a/signs_api/init.lua +++ /dev/null @@ -1,216 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - -signs_api = {} -signs_api.name = minetest.get_current_modname() -signs_api.path = minetest.get_modpath(signs_api.name) - --- Load support for intllib. -local S, NS = dofile(signs_api.path.."/intllib.lua") -signs_api.intllib = S -local F = function(...) return minetest.formspec_escape(S(...)) end - -function signs_api.set_display_text(pos, text, font) - local meta = minetest.get_meta(pos) - meta:set_string("display_text", text) - if text and text ~= "" then - meta:set_string("infotext", "\""..text.."\"") - else - meta:set_string("infotext", "") - end - meta:set_string("font", font) - display_api.update_entities(pos) -end - -function signs_api.set_formspec(pos) - local meta = minetest.get_meta(pos) - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - if ndef and ndef.display_entities - and ndef.display_entities["signs:display_text"] then - local maxlines = ndef.display_entities["signs:display_text"].maxlines - local formspec, formheight - - if maxlines == 1 then - formspec = - "field[0.5,0.7;5.5,1;display_text;"..F("Text").. - ";${display_text}]" - formheight = 2 - else - local extralabel = "" - if maxlines then - extralabel = F(" (first %s lines only)"):format(maxlines) - end - - formspec = - "textarea[0.5,0.7;5.5,2;display_text;"..F("Text").."".. - extralabel..";${display_text}]" - formheight = 3 - end - - formspec = formspec.."button_exit[2,"..formheight..";2,1;ok;".. - F("Write").."]" - formheight = formheight + 1 - formspec = "size[6,"..formheight.."]"..default.gui_bg.. - default.gui_bg_img..default.gui_slots..formspec - - meta:set_string("formspec", formspec) - end -end - -function signs_api.on_receive_fields(pos, formname, fields, player) - if not minetest.is_protected(pos, player:get_player_name()) then - if fields and (fields.ok or fields.key_enter) then - signs_api.set_display_text(pos, fields.display_text, fields.font) - end - end -end - --- On place callback for direction signs --- (chooses which sign according to look direction) -function signs_api.on_place_direction(itemstack, placer, pointed_thing) - local name = itemstack:get_name() - local ndef = minetest.registered_nodes[name] - - local bdir = {x = pointed_thing.under.x - pointed_thing.above.x, - y = pointed_thing.under.y - pointed_thing.above.y, - z = pointed_thing.under.z - pointed_thing.above.z} - local pdir = placer:get_look_dir() - - local ndir, test - - if ndef.paramtype2 == "facedir" then - if bdir.x == 0 and bdir.z == 0 then - -- Ceiling or floor pointed (facedir chosen from player dir) - ndir = minetest.dir_to_facedir({x=pdir.x, y=0, z=pdir.z}) - else - -- Wall pointed - ndir = minetest.dir_to_facedir(bdir) - end - - test = {[0]=-pdir.x, pdir.z, pdir.x, -pdir.z} - end - - if ndef.paramtype2 == "wallmounted" then - ndir = minetest.dir_to_wallmounted(bdir) - if ndir == 0 or ndir == 1 then - -- Ceiling or floor - ndir = minetest.dir_to_wallmounted({x=pdir.x, y=0, z=pdir.z}) - end - - test = {0, pdir.z, -pdir.z, -pdir.x, pdir.x} - end - - -- Only for direction signs - if ndef.signs_other_dir then - if test[ndir] > 0 then - itemstack:set_name(ndef.signs_other_dir) - end - itemstack = minetest.item_place(itemstack, placer, pointed_thing, ndir) - itemstack:set_name(name) - - return itemstack - else - return minetest.item_place(itemstack, placer, pointed_thing, ndir) - end -end - --- Handles screwdriver rotation. Direction is affected for direction signs -function signs_api.on_rotate(pos, node, player, mode, new_param2) - if mode == 2 then - local ndef = minetest.registered_nodes[node.name] - if ndef.signs_other_dir then - minetest.swap_node(pos, {name = ndef.signs_other_dir, - param1 = node.param1, param2 = node.param2}) - display_api.update_entities(pos) - end - else - display_api.on_rotate(pos, node, user, mode, new_param2) - end - return false; -end - -function signs_api.register_sign(mod, name, model) - -- Default fields - local fields = { - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = {-model.width/2, -model.height/2, 0.5, - model.width/2, model.height/2, 0.5 - model.depth}, - }, - groups = {choppy=2, dig_immediate=2, not_blocking_trains = 1, display_modpack_node = 1}, - sounds = default.node_sound_defaults(), - display_entities = { - ["signs:display_text"] = { - on_display_update = font_api.on_display_update, - depth = 0.5 - display_api.entity_spacing - model.depth, - size = { x = model.width, y = model.height }, - aspect_ratio = 1/2, - maxlines = 1, - }, - - }, - on_place = display_api.on_place, - on_construct = function(pos) - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - local meta = minetest.get_meta(pos) - meta:set_string("font", ndef.display_entities.font_name or - font_api.get_default_font_name()) - signs_api.set_formspec(pos) - display_api.on_construct(pos) - end, - on_destruct = display_api.on_destruct, - on_rotate = signs_api.on_rotate, - on_receive_fields = signs_api.on_receive_fields, - on_punch = function(pos, node, player, pointed_thing) - display_api.update_entities(pos) - end, - } - - -- Node fields override - for key, value in pairs(model.node_fields) do - if key == "groups" then - for key2, value2 in pairs(value) do - fields[key][key2] = value2 - end - else - fields[key] = value - end - end - - if not fields.wield_image then fields.wield_image = fields.inventory_image end - - -- Entity fields override - for key, value in pairs(model.entity_fields) do - fields.display_entities["signs:display_text"][key] = value - end - - minetest.register_node(mod..":"..name, fields) -end - --- Text entity for all signs -display_api.register_display_entity("signs:display_text") - - - - diff --git a/signs_api/intllib.lua b/signs_api/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/signs_api/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/signs_api/locale/fr.po b/signs_api/locale/fr.po deleted file mode 100644 index e490d1b..0000000 --- a/signs_api/locale/fr.po +++ /dev/null @@ -1,49 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-01 05:56+0100\n" -"PO-Revision-Date: 2017-05-08 07:08+0200\n" -"Last-Translator: Peppy \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" - -#: common.lua -msgid "Text" -msgstr "Texte" - -#: common.lua -msgid "Write" -msgstr "Écrire" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr " (uniquement les %s premières lignes)" - -#~ msgid "Title" -#~ msgstr "Titre" - -#~ msgid "Close" -#~ msgstr "Fermer" - -#~ msgid "(right-click to read more text)" -#~ msgstr "(Clic-droit pour afficher le texte entier)" - -#~ msgid "Wooden direction sign" -#~ msgstr "Panneau de direction en bois" - -#~ msgid "Poster" -#~ msgstr "Affiche" - -#~ msgid "Textd" -#~ msgstr "Texte" diff --git a/signs_api/locale/ms.po b/signs_api/locale/ms.po deleted file mode 100644 index 9c8aab8..0000000 --- a/signs_api/locale/ms.po +++ /dev/null @@ -1,46 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Muhammad Nur Hidayat , 2017. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-01 05:56+0100\n" -"PO-Revision-Date: 2017-08-27 15:50+0800\n" -"Last-Translator: Muhammad Nur Hidayat \n" -"Language-Team: Malay \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Vé 0.1.4\n" - -#: common.lua -msgid "Text" -msgstr "Teks" - -#: common.lua -msgid "Write" -msgstr "Tulis" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr "( %s baris pertama sahaja )" - -#~ msgid "Title" -#~ msgstr "Tajuk" - -#~ msgid "Close" -#~ msgstr "Tutup" - -#~ msgid "(right-click to read more text)" -#~ msgstr "(klik-kanan untuk baca teks penuh)" - -#~ msgid "Wooden direction sign" -#~ msgstr "Papan tanda arah kayu" - -#~ msgid "Poster" -#~ msgstr "Poster" diff --git a/signs_api/locale/template.pot b/signs_api/locale/template.pot deleted file mode 100644 index 6004024..0000000 --- a/signs_api/locale/template.pot +++ /dev/null @@ -1,31 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-02-01 05:56+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: common.lua -msgid "Text" -msgstr "" - -#: common.lua -msgid "Write" -msgstr "" - -#: common.lua -#, lua-format -msgid " (first %s lines only)" -msgstr "" diff --git a/signs_api/tools/updatepo.sh b/signs_api/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/signs_api/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done diff --git a/signs_road/LICENSE.txt b/signs_road/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/signs_road/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/signs_road/README.md b/signs_road/README.md deleted file mode 100644 index 0a2f685..0000000 --- a/signs_road/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Signs Road - -This mod provides road signs with text display. Text is locked if area is protected. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -**Dependancies**: default, display\_lib, font\_lib, signs - -**License**: Code under LGPL, texture under CC-BY-SA - -## Recipes - -**Blue Street Sign** - - B W - - S S S - - - - - -B = Blue Dye, W = White Dye, S = Steel Ingot - -**Large Banner** - -Shapeless recipe : four white street signs. - - S S S - S - - - - - - - -S = White street sign - -**Red and White Street Sign** - - W R - - S S S - - - - - -W = White Dye, R = Red Dye, S = Steel Ingot - -**Black direction sign** - - B W S - S S - - - - - - -B = Black Dye, W = White Dye, S = Steel Ingot - -**White Signs** - -Two kinds of signs, normal and direction signs : - - W B - W B S - S S S S S - - - - - - - - - -W = White Dye, B = Black Dye, S = Steel Ingot - -**Green Signs** - -Two kinds of signs, normal and direction signs : - - G W - G W S - S S S S S - - - - - - - - - -G = Green Dye, W = White Dye, S = Steel Ingot - -**Yellow Signs** - -Two kinds of signs, normal and direction signs : - - Y B - Y B S - S S S S S - - - - - - - - - -Y = Yellow Dye, B = Black Dye, S = Steel Ingot - diff --git a/signs_road/compatibility.lua b/signs_road/compatibility.lua deleted file mode 100644 index 9e6b29b..0000000 --- a/signs_road/compatibility.lua +++ /dev/null @@ -1,85 +0,0 @@ ---[[ - signs mod for Minetest - Various signs with text displayed on - (c) Pierre-Yves Rollo - - This file is part of signs. - - signs is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs. If not, see . ---]] - --- Wallmounted to facedir conversion ------------------------------------- - -local wallmounted_to_facedir = { - [0]=1, -- Should not happend with signs - [1]=1, -- Should not happend with signs - [2]=1, - [3]=3, - [4]=0, - [5]=2 -} - --- Nodes conversions -local convert_nodes = { - ['signs_road:blue_street'] = 'signs_road:blue_street_sign', - ['signs_road:green_street'] = 'signs_road:green_street_sign', - ['signs_road:black_right'] = 'signs_road:black_right_sign', - ['signs_road:black_left'] = 'signs_road:black_left_sign', - ['signs_road:green_right'] = 'signs_road:green_right_sign', - ['signs_road:green_left'] = 'signs_road:green_left_sign' -} - -local function compatibility_check(pos, node) - -- Old wallmounted modes to new facedir nodes conversion - node.name = convert_nodes[node.name] - if node.name then - node.param2 = wallmounted_to_facedir[node.param2] - display_api.on_destruct(pos) - minetest.swap_node(pos, node) - display_api.on_construct(pos) - end -end - -minetest.register_lbm({ name = "signs_road:conpatibility_1", - nodenames = {'signs_road:blue_street', 'signs_road:green_street', 'signs_road:black_right', - 'signs_road:black_left', 'signs_road:green_right', 'signs_road:green_left'}, - action = compatibility_check, -}) - --- Text entity name change because of signs_lib using signs prefix ------------------------------------------------------------------- - -local function compatibility_check_2(pos, node) - -- Remove old entity - for _, objref in ipairs(minetest.get_objects_inside_radius(pos, 0.5)) do - local entity = objref:get_luaentity() - if entity and entity.name == "signs:text" then - objref:remove() - end - end - -- Create new entity - display_api.update_entities(pos) -end - -minetest.register_lbm({ name = "signs_road:conpatibility_2", - nodenames = { - "signs_road:blue_street_sign", "signs_road:red_street_sign", "signs_road:white_street_sign", - "signs_road:green_street_sign", "signs_road:yellow_street_sign", "signs_road:black_right_sign", - "signs_road:black_left_sign", "signs_road:green_right_sign", "signs_road:green_left_sign", - "signs_road:yellow_right_sign", "signs_road:yellow_left_sign", "signs_road:white_right_sign", - "signs_road:white_left_sign"}, - action = compatibility_check_2, -}) - - diff --git a/signs_road/copyright.txt b/signs_road/copyright.txt deleted file mode 100644 index bb7adc8..0000000 --- a/signs_road/copyright.txt +++ /dev/null @@ -1,9 +0,0 @@ -Code, Textures and Models by Pierre-Yves Rollo (pyrollo) -intllib support (i18n) by (fat115) -intllib fallback code and tools by Diego Martínez (kaeza) -Extra contributors: -(gpcf) -(Thomas--S) -Translations: -Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat) -(fat115) diff --git a/signs_road/crafts.lua b/signs_road/crafts.lua deleted file mode 100644 index 3c15437..0000000 --- a/signs_road/crafts.lua +++ /dev/null @@ -1,109 +0,0 @@ ---[[ - signs_road mod for Minetest - Various road signs with text displayed - on. - (c) Pierre-Yves Rollo - - This file is part of signs_road. - - signs_road is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs_road 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs_road. If not, see . ---]] - -minetest.register_craft({ - output = 'signs_road:blue_street_sign 2', - recipe = { - {'dye:blue', 'dye:white', ''}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:red_street_sign 2', - recipe = { - {'dye:white', 'dye:red', ''}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:white_street_sign 2', - recipe = { - {'dye:white', 'dye:black', ''}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - type = "shapeless", - output = 'signs_road:large_street_sign', - recipe = {'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign', 'signs_road:white_street_sign'}, -}) - -minetest.register_craft({ - output = 'signs_road:green_street_sign 2', - recipe = { - {'dye:green', 'dye:white', ''}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:yellow_street_sign 2', - recipe = { - {'dye:yellow', 'dye:black', ''}, - {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, - {'', '', ''}, - } -}) - - -minetest.register_craft({ - output = 'signs_road:black_right_sign 2', - recipe = { - {'dye:black', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:green_right_sign 2', - recipe = { - {'dye:green', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:yellow_right_sign 2', - recipe = { - {'dye:yellow', 'dye:white', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', ''}, - {'', '', ''}, - } -}) - -minetest.register_craft({ - output = 'signs_road:white_right_sign 2', - recipe = { - {'dye:white', 'dye:black', 'default:steel_ingot'}, - {'default:steel_ingot', 'default:steel_ingot', ''}, - {'', '', ''}, - } -}) - diff --git a/signs_road/depends.txt b/signs_road/depends.txt deleted file mode 100644 index eeb3b01..0000000 --- a/signs_road/depends.txt +++ /dev/null @@ -1,6 +0,0 @@ -default -intllib? -dye -display_api -font_api -signs_api diff --git a/signs_road/init.lua b/signs_road/init.lua deleted file mode 100644 index cd95c6c..0000000 --- a/signs_road/init.lua +++ /dev/null @@ -1,37 +0,0 @@ ---[[ - signs_road mod for Minetest - Various road signs with text displayed - on. - (c) Pierre-Yves Rollo - - This file is part of signs_road. - - signs_road is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs_road 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs_road. If not, see . ---]] - -signs_road = {} -signs_road.name = minetest.get_current_modname() -signs_road.path = minetest.get_modpath(signs_road.name) - --- Load support for intllib. -local S, NS = dofile(signs_road.path.."/intllib.lua") -signs_road.intllib = S - -dofile(signs_road.path.."/nodes.lua") -dofile(signs_road.path.."/crafts.lua") -dofile(signs_road.path.."/compatibility.lua") - - - - - diff --git a/signs_road/intllib.lua b/signs_road/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/signs_road/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/signs_road/locale/fr.po b/signs_road/locale/fr.po deleted file mode 100644 index 833f115..0000000 --- a/signs_road/locale/fr.po +++ /dev/null @@ -1,56 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:26+0200\n" -"PO-Revision-Date: 2017-05-08 06:40+0200\n" -"Last-Translator: Peppy \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: nodes.lua -msgid "Blue street sign" -msgstr "Plaque de rue bleue" - -#: nodes.lua -msgid "Red and white town sign" -msgstr "Panneau de ville rouge et blanc" - -#: nodes.lua -msgid "White street sign" -msgstr "Panneau blanc" - -#: nodes.lua -msgid "Green street sign" -msgstr "Panneau vert" - -#: nodes.lua -msgid "Yellow street sign" -msgstr "Panneau jaune" - -#: nodes.lua -msgid "Black direction sign" -msgstr "Panneau de direction noir" - -#: nodes.lua -msgid "Green direction sign" -msgstr "Panneau de direction vert" - -#: nodes.lua -msgid "Yellow direction sign" -msgstr "Panneau de direction jaune" - -#: nodes.lua -msgid "White direction sign" -msgstr "Panneau de direction blanc" - diff --git a/signs_road/locale/ms.po b/signs_road/locale/ms.po deleted file mode 100644 index f866162..0000000 --- a/signs_road/locale/ms.po +++ /dev/null @@ -1,54 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Muhammad Nur Hidayat , 2017. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:28+0200\n" -"PO-Revision-Date: 2017-08-27 15:55+0800\n" -"Last-Translator: Muhammad Nur Hidayat \n" -"Language-Team: Malay \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Vé 0.1.4\n" - -#: nodes.lua -msgid "Blue street sign" -msgstr "Papan tanda arah biru" - -#: nodes.lua -msgid "Red and white town sign" -msgstr "Papan tanda bandar merah dan putih" - -#: nodes.lua -msgid "White street sign" -msgstr "Papan tanda jalan putih" - -#: nodes.lua -msgid "Green street sign" -msgstr "Papan tanda jalan hijau" - -#: nodes.lua -msgid "Yellow street sign" -msgstr "Papan tanda jalan kuning" - -#: nodes.lua -msgid "Black direction sign" -msgstr "Papan tanda arah hitam" - -#: nodes.lua -msgid "Green direction sign" -msgstr "Papan tanda arah hijau" - -#: nodes.lua -msgid "Yellow direction sign" -msgstr "Papan tanda arah kuning" - -#: nodes.lua -msgid "White direction sign" -msgstr "Papan tanda arah putih" diff --git a/signs_road/locale/template.pot b/signs_road/locale/template.pot deleted file mode 100644 index b15ce94..0000000 --- a/signs_road/locale/template.pot +++ /dev/null @@ -1,54 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:28+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: nodes.lua -msgid "Blue street sign" -msgstr "" - -#: nodes.lua -msgid "Red and white town sign" -msgstr "" - -#: nodes.lua -msgid "White street sign" -msgstr "" - -#: nodes.lua -msgid "Green street sign" -msgstr "" - -#: nodes.lua -msgid "Yellow street sign" -msgstr "" - -#: nodes.lua -msgid "Black direction sign" -msgstr "" - -#: nodes.lua -msgid "Green direction sign" -msgstr "" - -#: nodes.lua -msgid "Yellow direction sign" -msgstr "" - -#: nodes.lua -msgid "White direction sign" -msgstr "" diff --git a/signs_road/nodes.lua b/signs_road/nodes.lua deleted file mode 100644 index ab95b2b..0000000 --- a/signs_road/nodes.lua +++ /dev/null @@ -1,324 +0,0 @@ ---[[ - signs_road mod for Minetest - Various road signs with text displayed - on. - (c) Pierre-Yves Rollo - - This file is part of signs_road. - - signs_road is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - signs_road 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with signs_road. If not, see . ---]] - -local S = signs_road.intllib - -local models = { - blue_street_sign = { - depth = 1/16, - width = 14/16, - height = 12/16, - entity_fields = { - size = { x = 14/16, y = 10/16 }, - maxlines = 3, - color = "#fff", - }, - node_fields = { - description = S("Blue street sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_blue.png" }, - inventory_image = "signs_road_blue.png", - }, - }, - large_street_sign = { - depth = 1/16, - width = 64/16, - height = 12/16, - entity_fields = { - maxlines = 1, - color = "#000", - }, - node_fields = { - visual_scale = 1, - description = S("Large banner"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_large_white.png" }, - inventory_image = "signs_road_white.png", - }, - }, - red_street_sign = { - depth = 1/16, - width = 1, - height = 7/16, - entity_fields = { - size = { x = 1, y = 4/16 }, - maxlines = 1, - color = "#000", - }, - node_fields = { - description = S("Red and white town sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_red_white.png" }, - inventory_image="signs_road_red_white.png", - }, - }, - white_street_sign = { - depth = 1/16, - width = 1, - height = 7/16, - entity_fields = { - size = { x = 1, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("White street sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_white.png" }, - inventory_image = "signs_road_white.png", - }, - }, - green_street_sign = { - depth = 1/16, - width = 1, - height = 7/16, - entity_fields = { - size = { x = 1, y = 6/16 }, - maxlines = 2, - color = "#fff", - }, - node_fields = { - description = S("Green street sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_green.png" }, - inventory_image = "signs_road_green.png", - }, - }, - yellow_street_sign = { - depth = 1/16, - width = 1, - height = 7/16, - entity_fields = { - size = { x = 1, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("Yellow street sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_yellow.png" }, - inventory_image="signs_road_yellow.png", - }, - }, - black_right_sign = { - depth = 1/32, - width = 1, - height = 0.5, - entity_fields = { - aspect_ratio = 3/4, - size = { x = 1, y = 3/16 }, - maxlines = 1, - color = "#000", - }, - node_fields = { - description = S("Black direction sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_black_dir_right.png" }, - inventory_image = "signs_road_black_dir_inventory.png", - signs_other_dir = "signs_road:black_left_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - }, - }, - black_left_sign = { - depth = 1/32, - width = 1, - height = 0.5, - entity_fields = { - aspect_ratio = 3/4, - size = { x = 1, y = 3/16 }, - maxlines = 1, - color = "#000", - }, - node_fields = { - description = S("Black direction sign"), - tiles = { "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_sides.png", - "signs_road_sides.png", "signs_road_black_dir_left.png" }, - inventory_image = "signs_road_black_dir_inventory.png", - signs_other_dir = "signs_road:black_right_sign", - groups = { not_in_creative_inventory = 1 }, - drop = "signs_road:black_right_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - }, - }, - - green_right_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = -3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#fff", - }, - node_fields = { - description = S("Green direction sign"), - tiles = { "signs_road_green_direction.png" }, - inventory_image = "signs_road_green_dir_inventory.png", - signs_other_dir = "signs_road:green_left_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_right.obj", - selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - }, - }, - green_left_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = 3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color="#fff", - }, - node_fields = { - description = S("Green direction sign"), - tiles = { "signs_road_green_direction.png" }, - inventory_image = "signs_road_green_dir_inventory.png", - signs_other_dir = "signs_road:green_right_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_left.obj", - selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - groups = { not_in_creative_inventory = 1 }, - drop = "signs_road:green_right_sign", - }, - }, - yellow_right_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = -3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("Yellow direction sign"), - tiles = { "signs_road_yellow_direction.png" }, - inventory_image = "signs_road_yellow_dir_inventory.png", - signs_other_dir = "signs_road:yellow_left_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_right.obj", - selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - }, - }, - yellow_left_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = 3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("Yellow direction sign"), - tiles = { "signs_road_yellow_direction.png" }, - inventory_image = "signs_road_yellow_dir_inventory.png", - signs_other_dir = "signs_road:yellow_right_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_left.obj", - selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - groups = { not_in_creative_inventory = 1 }, - drop = "signs_road:yellow_right_sign", - }, - }, - white_right_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = -3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("White direction sign"), - tiles = { "signs_road_white_direction.png" }, - inventory_image = "signs_road_white_dir_inventory.png", - signs_other_dir = "signs_road:white_left_sign", - on_place = signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_right.obj", - selection_box = { type = "fixed", fixed = { -0.5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -0,5, -7/32, 0.5, 7/16, 7/32, 7/16 } }, - }, - }, - white_left_sign = { - depth = 1/16, - width = 14/16, - height = 7/16, - entity_fields = { - right = 3/32, - size = { x = 12/16, y = 6/16 }, - maxlines = 2, - color = "#000", - }, - node_fields = { - description = S("White direction sign"), - tiles = { "signs_road_white_direction.png" }, - inventory_image = "signs_road_white_dir_inventory.png", - signs_other_dir = "signs_road:white_right_sign", - on_place=signs_api.on_place_direction, - on_rightclick = signs_api.on_right_click_direction, - drawtype = "mesh", - mesh = "signs_dir_left.obj", - selection_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - collision_box = { type = "fixed", fixed = { -7/16, -7/32, 0.5, 0.5, 7/32, 7/16 } }, - groups = { not_in_creative_inventory = 1 }, - drop = "signs_road:white_right_sign", - }, - }, -} - --- Node registration -for name, model in pairs(models) -do - signs_api.register_sign("signs_road", name, model) -end - - diff --git a/signs_road/svg/green_street.svg b/signs_road/svg/green_street.svg deleted file mode 100644 index 89d8474..0000000 --- a/signs_road/svg/green_street.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/signs_road/svg/signs_blue_street.svg b/signs_road/svg/signs_blue_street.svg deleted file mode 100644 index 0aa87ff..0000000 --- a/signs_road/svg/signs_blue_street.svg +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/signs_road/svg/signs_green_direction.svg b/signs_road/svg/signs_green_direction.svg deleted file mode 100644 index 3cdbc77..0000000 --- a/signs_road/svg/signs_green_direction.svg +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/signs_road/svg/signs_road_black.svg b/signs_road/svg/signs_road_black.svg deleted file mode 100644 index 8e9b8a9..0000000 --- a/signs_road/svg/signs_road_black.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/signs_road/svg/signs_road_black_direction.svg b/signs_road/svg/signs_road_black_direction.svg deleted file mode 100644 index f513524..0000000 --- a/signs_road/svg/signs_road_black_direction.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/signs_road/svg/signs_road_red.svg b/signs_road/svg/signs_road_red.svg deleted file mode 100644 index 513b970..0000000 --- a/signs_road/svg/signs_road_red.svg +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/signs_road/svg/signs_yellow_direction.svg b/signs_road/svg/signs_yellow_direction.svg deleted file mode 100644 index 1414a5c..0000000 --- a/signs_road/svg/signs_yellow_direction.svg +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/signs_road/svg/white_street.svg b/signs_road/svg/white_street.svg deleted file mode 100644 index f33bc02..0000000 --- a/signs_road/svg/white_street.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/signs_road/svg/yellow_street.svg b/signs_road/svg/yellow_street.svg deleted file mode 100644 index ea26f30..0000000 --- a/signs_road/svg/yellow_street.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - diff --git a/signs_road/textures/signs_road_black_dir_inventory.png b/signs_road/textures/signs_road_black_dir_inventory.png deleted file mode 100644 index 4b10ee3..0000000 Binary files a/signs_road/textures/signs_road_black_dir_inventory.png and /dev/null differ diff --git a/signs_road/textures/signs_road_black_dir_left.png b/signs_road/textures/signs_road_black_dir_left.png deleted file mode 100644 index 8837dcb..0000000 Binary files a/signs_road/textures/signs_road_black_dir_left.png and /dev/null differ diff --git a/signs_road/textures/signs_road_black_dir_right.png b/signs_road/textures/signs_road_black_dir_right.png deleted file mode 100644 index 0951da0..0000000 Binary files a/signs_road/textures/signs_road_black_dir_right.png and /dev/null differ diff --git a/signs_road/textures/signs_road_blue.png b/signs_road/textures/signs_road_blue.png deleted file mode 100644 index 540a390..0000000 Binary files a/signs_road/textures/signs_road_blue.png and /dev/null differ diff --git a/signs_road/textures/signs_road_green.png b/signs_road/textures/signs_road_green.png deleted file mode 100644 index 8512fb1..0000000 Binary files a/signs_road/textures/signs_road_green.png and /dev/null differ diff --git a/signs_road/textures/signs_road_green_dir_inventory.png b/signs_road/textures/signs_road_green_dir_inventory.png deleted file mode 100644 index 3b7f031..0000000 Binary files a/signs_road/textures/signs_road_green_dir_inventory.png and /dev/null differ diff --git a/signs_road/textures/signs_road_green_direction.png b/signs_road/textures/signs_road_green_direction.png deleted file mode 100644 index c4c8d10..0000000 Binary files a/signs_road/textures/signs_road_green_direction.png and /dev/null differ diff --git a/signs_road/textures/signs_road_large_white.png b/signs_road/textures/signs_road_large_white.png deleted file mode 100644 index c2a7872..0000000 Binary files a/signs_road/textures/signs_road_large_white.png and /dev/null differ diff --git a/signs_road/textures/signs_road_red_white.png b/signs_road/textures/signs_road_red_white.png deleted file mode 100644 index 7afc658..0000000 Binary files a/signs_road/textures/signs_road_red_white.png and /dev/null differ diff --git a/signs_road/textures/signs_road_sides.png b/signs_road/textures/signs_road_sides.png deleted file mode 100644 index 7afd08e..0000000 Binary files a/signs_road/textures/signs_road_sides.png and /dev/null differ diff --git a/signs_road/textures/signs_road_white.png b/signs_road/textures/signs_road_white.png deleted file mode 100644 index 3fd45fb..0000000 Binary files a/signs_road/textures/signs_road_white.png and /dev/null differ diff --git a/signs_road/textures/signs_road_white_dir_inventory.png b/signs_road/textures/signs_road_white_dir_inventory.png deleted file mode 100644 index 5cc6dc4..0000000 Binary files a/signs_road/textures/signs_road_white_dir_inventory.png and /dev/null differ diff --git a/signs_road/textures/signs_road_white_direction.png b/signs_road/textures/signs_road_white_direction.png deleted file mode 100644 index e6ae658..0000000 Binary files a/signs_road/textures/signs_road_white_direction.png and /dev/null differ diff --git a/signs_road/textures/signs_road_yellow.png b/signs_road/textures/signs_road_yellow.png deleted file mode 100644 index 1c546fd..0000000 Binary files a/signs_road/textures/signs_road_yellow.png and /dev/null differ diff --git a/signs_road/textures/signs_road_yellow_dir_inventory.png b/signs_road/textures/signs_road_yellow_dir_inventory.png deleted file mode 100644 index 8b56025..0000000 Binary files a/signs_road/textures/signs_road_yellow_dir_inventory.png and /dev/null differ diff --git a/signs_road/textures/signs_road_yellow_direction.png b/signs_road/textures/signs_road_yellow_direction.png deleted file mode 100644 index f5b1b18..0000000 Binary files a/signs_road/textures/signs_road_yellow_direction.png and /dev/null differ diff --git a/signs_road/tools/updatepo.sh b/signs_road/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/signs_road/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done diff --git a/steles/LICENSE.txt b/steles/LICENSE.txt deleted file mode 100644 index 341c30b..0000000 --- a/steles/LICENSE.txt +++ /dev/null @@ -1,166 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. - diff --git a/steles/README.md b/steles/README.md deleted file mode 100644 index bc14b53..0000000 --- a/steles/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Steles - -This mod provides stone steles with text display. Text is locked if area is protected. - -For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. - -**Dependancies**: default, display\_lib, font\_lib, technic? - -(Technic adds marble and granite steles) - -**License**: LGPL - -## Recipes - - - M - - - B - - M M M - -B = Black Dye, M = Material - -Material (must be all the same) can be : Stone, Desert Stone, Sandstone, Granite or Marble - -Gives 4 steles of corresponding material. Right click on stele to update text. - -(Extra materials can be added in config.lua file) diff --git a/steles/config.lua b/steles/config.lua deleted file mode 100644 index 551429d..0000000 --- a/steles/config.lua +++ /dev/null @@ -1,37 +0,0 @@ ---[[ - steles mod for Minetest. Steles / graves with text on it. - (c) Pierre-Yves Rollo - - This file is part of steles. - - steles is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - steles 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with steles. If not, see . ---]] - -local S = steles.intllib - -steles.materials = { - 'default:stone', - 'default:sandstone', - 'default:desert_stone', - 'technic:marble', - 'technic:granite', -} - -steles.materials_desc = { - S("Stone Stele"), - S("Sandstone Stele"), - S("Desert Stone Stele"), - S("Marble Stele"), - S("Granite Stele"), -} diff --git a/steles/copyright.txt b/steles/copyright.txt deleted file mode 100644 index 1a4e167..0000000 --- a/steles/copyright.txt +++ /dev/null @@ -1,9 +0,0 @@ -Code by Pierre-Yves Rollo -intllib support (i18n) by (fat115) -intllib fallback code and tools by Diego Martínez (kaeza) -Extra contibutors: -(Thomas--S) -Translations: -Muhammad Nur Hidayat Yasuyoshi (MuhdNurHidayat) -(fat115) - diff --git a/steles/crafts.lua b/steles/crafts.lua deleted file mode 100644 index 9973aac..0000000 --- a/steles/crafts.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ - steles mod for Minetest. Steles / graves with text on it. - (c) Pierre-Yves Rollo - - This file is part of steles. - - steles is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - steles 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with steles. If not, see . ---]] - -for _, material in ipairs(steles.materials) do - local parts = material:split(":") - - minetest.register_craft({ - output = 'steles:'..parts[2]..'_stele 4', - recipe = { - {'', material, ''}, - {'', 'dye:black', ''}, - {material, material, material}, - } - }) - -end diff --git a/steles/depends.txt b/steles/depends.txt deleted file mode 100644 index ba43223..0000000 --- a/steles/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -default -intllib? -display_api -font_api -technic? diff --git a/steles/init.lua b/steles/init.lua deleted file mode 100644 index e5d2430..0000000 --- a/steles/init.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ - steles mod for Minetest. Steles / graves with text on it. - (c) Pierre-Yves Rollo - - This file is part of steles. - - steles is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - steles 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with steles. If not, see . ---]] - -steles = {} -steles.name = minetest.get_current_modname() -steles.path = minetest.get_modpath(steles.name) - --- Load support for intllib. -local S, NS = dofile(steles.path.."/intllib.lua") -steles.intllib = S - -dofile(steles.path.."/config.lua") -dofile(steles.path.."/nodes.lua") -dofile(steles.path.."/crafts.lua") diff --git a/steles/intllib.lua b/steles/intllib.lua deleted file mode 100644 index 6669d72..0000000 --- a/steles/intllib.lua +++ /dev/null @@ -1,45 +0,0 @@ - --- Fallback functions for when `intllib` is not installed. --- Code released under Unlicense . - --- Get the latest version of this file at: --- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua - -local function format(str, ...) - local args = { ... } - local function repl(escape, open, num, close) - if escape == "" then - local replacement = tostring(args[tonumber(num)]) - if open == "" then - replacement = replacement..close - end - return replacement - else - return "@"..open..num..close - end - end - return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) -end - -local gettext, ngettext -if minetest.get_modpath("intllib") then - if intllib.make_gettext_pair then - -- New method using gettext. - gettext, ngettext = intllib.make_gettext_pair() - else - -- Old method using text files. - gettext = intllib.Getter() - end -end - --- Fill in missing functions. - -gettext = gettext or function(msgid, ...) - return format(msgid, ...) -end - -ngettext = ngettext or function(msgid, msgid_plural, n, ...) - return format(n==1 and msgid or msgid_plural, ...) -end - -return gettext, ngettext diff --git a/steles/locale/fr.po b/steles/locale/fr.po deleted file mode 100644 index 1785d8a..0000000 --- a/steles/locale/fr.po +++ /dev/null @@ -1,47 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-05 10:06+0200\n" -"PO-Revision-Date: 2017-08-05 09:03+0200\n" -"Last-Translator: fat115 \n" -"Language-Team: \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 1.8.12\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" - -#: config.lua -msgid "Stone Stele" -msgstr "Stèle en pierre" - -#: config.lua -msgid "Sandstone Stele" -msgstr "Stèle en grès" - -#: config.lua -msgid "Desert Stone Stele" -msgstr "Stèle en pierre du désert" - -#: config.lua -msgid "Marble Stele" -msgstr "Stèle en marbre" - -#: config.lua -msgid "Granite Stele" -msgstr "Stèle en granit" - -#: nodes.lua -msgid "Displayed text (3 lines max)" -msgstr "Texte à afficher (3 lignes maxi.)" - -#: nodes.lua -msgid "Write" -msgstr "Écrire" diff --git a/steles/locale/ms.po b/steles/locale/ms.po deleted file mode 100644 index 8de818f..0000000 --- a/steles/locale/ms.po +++ /dev/null @@ -1,46 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# Muhammad Nur Hidayat , 2017. -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:29+0200\n" -"PO-Revision-Date: 2017-08-27 16:13+0800\n" -"Last-Translator: Muhammad Nur Hidayat \n" -"Language-Team: Malay \n" -"Language: ms\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Vé 0.1.4\n" - -#: config.lua -msgid "Stone Stele" -msgstr "Tulisan Batu" - -#: config.lua -msgid "Sandstone Stele" -msgstr "Tulisan Batu Pasir" - -#: config.lua -msgid "Desert Stone Stele" -msgstr "Tulisan Batu Gurun" - -#: config.lua -msgid "Marble Stele" -msgstr "Tulisan Marmar" - -#: config.lua -msgid "Granite Stele" -msgstr "Tulisan Granit" - -#: nodes.lua -msgid "Displayed text (3 lines max)" -msgstr "Teks untuk dipaparkan (maksimum 3 baris)" - -#: nodes.lua -msgid "Write" -msgstr "Tulis" diff --git a/steles/locale/template.pot b/steles/locale/template.pot deleted file mode 100644 index 0144ace..0000000 --- a/steles/locale/template.pot +++ /dev/null @@ -1,46 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-26 11:29+0200\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: config.lua -msgid "Stone Stele" -msgstr "" - -#: config.lua -msgid "Sandstone Stele" -msgstr "" - -#: config.lua -msgid "Desert Stone Stele" -msgstr "" - -#: config.lua -msgid "Marble Stele" -msgstr "" - -#: config.lua -msgid "Granite Stele" -msgstr "" - -#: nodes.lua -msgid "Displayed text (3 lines max)" -msgstr "" - -#: nodes.lua -msgid "Write" -msgstr "" diff --git a/steles/nodes.lua b/steles/nodes.lua deleted file mode 100644 index 9fb65dd..0000000 --- a/steles/nodes.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ - steles mod for Minetest. Steles / graves with text on it. - (c) Pierre-Yves Rollo - - This file is part of steles. - - steles is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - steles 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with steles. If not, see . ---]] - -local S = steles.intllib -local F = function(...) return minetest.formspec_escape(S(...)) end - -display_api.register_display_entity("steles:text") - -for i, material in ipairs(steles.materials) do - - local ndef = minetest.registered_nodes[material] - - if ndef then - local groups = table.copy(ndef.groups) - local parts = material:split(":") - groups.display_modpack_node = 1 - - minetest.register_node("steles:"..parts[2].."_stele", { - description = steles.materials_desc[i], - sunlight_propagates = true, - paramtype = "light", - paramtype2 = "facedir", - tiles = ndef.tiles, - drawtype = "nodebox", - node_box = { - type = "fixed", - fixed = { - {-5/16, -5/16, -2/16, 5/16, 0.5, 2/16}, - {-7/16, -0.5, -4/16, 7/16, -5/16, 4/16} - }, - }, - groups = groups, - display_entities = { - ["steles:text"] = { - on_display_update = font_api.on_display_update, - depth = -2/16 - display_api.entity_spacing, - top = -2/16, - aspect_ratio = 0.4, - size = { x = 10/16, y = 12/16 }, - maxlines = 3, - }, - }, - on_place = function(itemstack, placer, pointed_thing) - minetest.rotate_node(itemstack, placer, pointed_thing) - display_api.on_place(itemstack, placer, pointed_thing) - end, - on_construct = function(pos) - local meta = minetest.get_meta(pos) - meta:set_string("formspec", "size[6,4]" - ..default.gui_bg .. default.gui_bg_img .. default.gui_slots - .."textarea[0.5,0.7;5.5,2;display_text;" - ..F("Displayed text (3 lines max)") - ..";${display_text}]" - .."button_exit[2,3;2,1;ok;"..F("Write").."]") - display_api.on_construct(pos) - end, - on_destruct = display_api.on_destruct, - on_rotate = display_api.on_rotate, - on_receive_fields = function(pos, formname, fields, player) - if not minetest.is_protected(pos, player:get_player_name()) then - local meta = minetest.get_meta(pos) - if fields and fields.ok then - meta:set_string("display_text", fields.display_text) - meta:set_string("infotext", "\""..fields.display_text.."\"") - display_api.update_entities(pos) - end - end - end, - on_punch = display_api.update_entities, - }) - end -end - diff --git a/steles/tools/updatepo.sh b/steles/tools/updatepo.sh deleted file mode 100755 index feb2504..0000000 --- a/steles/tools/updatepo.sh +++ /dev/null @@ -1,25 +0,0 @@ -#! /bin/bash - -# To create a new translation: -# msginit --locale=ll_CC -o locale/ll_CC.po -i locale/template.pot - -cd "$(dirname "${BASH_SOURCE[0]}")/.."; - -# Extract translatable strings. -xgettext --from-code=UTF-8 \ - --language=Lua \ - --sort-by-file \ - --keyword=S \ - --keyword=NS:1,2 \ - --keyword=N_ \ - --keyword=F \ - --add-comments='Translators:' \ - --add-location=file \ - -o locale/template.pot \ - $(find . -name '*.lua') - -# Update translations. -find locale -name '*.po' | while read -r file; do - echo $file - msgmerge --update $file locale/template.pot; -done -- cgit v1.2.3 From a9c7e2235fd3711247ebc95b99ccb0e0cb05b279 Mon Sep 17 00:00:00 2001 From: 12Me21 <12Me21.MC@gmail.com> Date: Wed, 26 Sep 2018 13:41:30 -0400 Subject: Improve on_rotate functions (#21) Fixed bugs and improve on_rotate and support color- paramtype2s --- init.lua | 93 +++++++++++++++++++++++----------------------------------------- 1 file changed, 33 insertions(+), 60 deletions(-) diff --git a/init.lua b/init.lua index ca7b779..b65eb89 100644 --- a/init.lua +++ b/init.lua @@ -26,55 +26,30 @@ display_api.entity_spacing = 0.002 -- Miscelaneous values depending on wallmounted param2 local wallmounted_values = { - [0]={dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, -- Should never be used - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=1}, -- Should never be used - {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=5}, - {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=4}, - {dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=2}, - {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3} + [2]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, + [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 }, + [4]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, + [5]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi } } -- Miscelaneous values depending on facedir param2 local facedir_values = { - [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0, rotate=1}, - {dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2, rotate=2}, - {dx=0, dz=1, rx=-1, rz=0, yaw=math.pi, rotate=3}, - {dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2, rotate=0}, - -- Forbiden values : - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - {dx=0, dz=0, rx=0, rz=0, yaw=0, rotate=0}, - } + [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, + [1]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, + [2]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi }, + [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 } +} -- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, --- rotate = next facedir/wallmount on rotate - local function get_values(node) local ndef = minetest.registered_nodes[node.name] - + if ndef then - if ndef.paramtype2 == "wallmounted" then - return wallmounted_values[node.param2] - end - if ndef.paramtype2 == "facedir" then - return facedir_values[node.param2] + local paramtype2 = ndef.paramtype2 + if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then + return wallmounted_values[node.param2 % 8] + elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then + return facedir_values[node.param2 % 32] end end end @@ -97,9 +72,9 @@ local function get_entities(pos) if ndef and ndef.display_entities then for _, objref in ipairs(minetest.get_objects_inside_radius(pos, 1.5)) do local entity = objref:get_luaentity() - if entity and ndef.display_entities[entity.name] and check_entity_pos(pos, objref) then + if entity and ndef.display_entities[entity.name] and check_entity_pos(pos, objref) then if objrefs[entity.name] then - objref:remove() + objref:remove() else objrefs[entity.name] = objref end @@ -123,9 +98,9 @@ local function place_entities(pos) local ndef = minetest.registered_nodes[node.name] local values = get_values(node) local objrefs = get_entities(pos) - + if values and ndef and ndef.display_entities then - + for entity_name, props in pairs(ndef.display_entities) do local depth = clip_pos_prop(props.depth) local right = clip_pos_prop(props.right) @@ -133,12 +108,12 @@ local function place_entities(pos) if not objrefs[entity_name] then objrefs[entity_name] = minetest.add_entity(pos, entity_name) end - + objrefs[entity_name]:setpos({ x = pos.x - values.dx * depth + values.rx * right, y = pos.y - top, z = pos.z - values.dz * depth + values.rz * right}) - + objrefs[entity_name]:setyaw(values.yaw) end end @@ -151,7 +126,7 @@ local function call_node_on_display_update(pos, objref) local entity = objref:get_luaentity() if ndef and ndef.display_entities and entity and ndef.display_entities[entity.name] then ndef.display_entities[entity.name].on_display_update(pos, objref) - end + end end --- Force entity update @@ -186,7 +161,7 @@ end --- On_place callback for display_api items. Does nothing more than preventing item --- from being placed on ceiling or ground -function display_api.on_place(itemstack, placer, pointed_thing) +function display_api.on_place(itemstack, placer, pointed_thing, override_param2) local ndef = itemstack:get_definition() local above = pointed_thing.above local under = pointed_thing.under @@ -200,15 +175,16 @@ function display_api.on_place(itemstack, placer, pointed_thing) dir.y = 0 end - local param2 + local param2 = 0 if ndef then - if ndef.paramtype2 == "wallmounted" then + local paramtype2 = ndef.paramtype2 + if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then param2 = minetest.dir_to_wallmounted(dir) - elseif ndef.paramtype2 == "facedir" then + elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then param2 = minetest.dir_to_facedir(dir) end end - return minetest.item_place(itemstack, placer, pointed_thing, param2) + return minetest.item_place(itemstack, placer, pointed_thing, param2 + (override_param2 or 0)) end --- On_construct callback for display_api items. Creates entities and update them. @@ -225,14 +201,11 @@ function display_api.on_destruct(pos) end end --- On_rotate (screwdriver) callback for display_api items. Prevents axis rotation and reorients entities. -function display_api.on_rotate(pos, node, user, mode, new_param2) - if mode ~= 1 then return false end - - local values = get_values(node) - - if values then - minetest.swap_node(pos, {name = node.name, param1 = node.param1, param2 = values.rotate}) +-- On_rotate (screwdriver) callback for display_api items. Prevents invalid rotations and reorients entities. +function display_api.on_rotate(pos, node, user, _, new_param2) + node.param2 = new_param2 + if get_values(node) then + minetest.swap_node(pos, node) place_entities(pos) return true else -- cgit v1.2.3 From f6b11d6cc69ae6f9a8680b302dcdc4cba6d95e33 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Wed, 26 Sep 2018 19:43:33 +0200 Subject: Update copyright.txt --- copyright.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/copyright.txt b/copyright.txt index 02b8467..e242c7c 100644 --- a/copyright.txt +++ b/copyright.txt @@ -2,5 +2,4 @@ Code by Pierre-Yves Rollo (pyrollo) Contributors: (gpcf): Compatibility with signs lib (Thomas--S): Fix /clearobjects bug -(12Me21): on_place improvement and code style fixing - +(12Me21): on_place and on_rotate improvements -- cgit v1.2.3 From 06e97a1631f037adba7a70e5dd7b223f846cf30c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Fri, 9 Nov 2018 15:28:28 +0100 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f51996d..af8f358 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Display Lib +# Display API This library's purpose is to ease creation of nodes with one or more displays on sides. For example, signs and clocks. Display can be dynamic and/or different for each node instance. -- cgit v1.2.3 From e7856f70a776be8cf8c25beb0f2539dece4a0a34 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Fri, 9 Nov 2018 15:28:54 +0100 Subject: Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index af8f358..26b26f0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This library's purpose is to ease creation of nodes with one or more displays on **Dependancies**:default -**License**: LPGL +**License**: LGPLv2 **API**: See [API.md](https://github.com/pyrollo/display_modpack/blob/master/display_api/API.md) document please. -- cgit v1.2.3 From 9ca3474360aaa9caf9de72ef116618704bcaae61 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Thu, 29 Nov 2018 14:27:36 +0100 Subject: Atempt to fix "unknown object" issue + code rework --- init.lua | 106 ++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 50 insertions(+), 56 deletions(-) diff --git a/init.lua b/init.lua index b65eb89..c9d8c19 100644 --- a/init.lua +++ b/init.lua @@ -24,6 +24,9 @@ display_api = {} -- variable as spacing between entity and node display_api.entity_spacing = 0.002 +-- Maximum entity position relative to the node pos +local max_entity_pos = 1.5 + -- Miscelaneous values depending on wallmounted param2 local wallmounted_values = { [2]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, @@ -43,7 +46,7 @@ local facedir_values = { -- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, local function get_values(node) local ndef = minetest.registered_nodes[node.name] - + if ndef then local paramtype2 = ndef.paramtype2 if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then @@ -54,27 +57,18 @@ local function get_values(node) end end ---- Checks if the object is related to the given position -local function check_entity_pos(pos, objref) - local real_pos = vector.round(objref:get_pos()) - local pos_hash = objref:get_luaentity().pos - if pos_hash == nil then - return vector.equals(real_pos, vector.round(pos)) - else - return vector.equals(minetest.get_position_from_hash(pos_hash), pos) - end -end - --- Gets the display entities attached with a node. Removes extra ones local function get_entities(pos) local objrefs = {} local ndef = minetest.registered_nodes[minetest.get_node(pos).name] if ndef and ndef.display_entities then - for _, objref in ipairs(minetest.get_objects_inside_radius(pos, 1.5)) do + for _, objref in + ipairs(minetest.get_objects_inside_radius(pos, max_entity_pos)) do local entity = objref:get_luaentity() - if entity and ndef.display_entities[entity.name] and check_entity_pos(pos, objref) then + if entity and ndef.display_entities[entity.name] and + entity.nodepos and vector.equals(pos, entity.nodepos) then if objrefs[entity.name] then - objref:remove() + objref:remove() -- Remove duplicates else objrefs[entity.name] = objref end @@ -86,7 +80,7 @@ end local function clip_pos_prop(posprop) if posprop then - return math.max(-1.5, math.min(1.5, posprop)) + return math.max(-max_entity_pos, math.min(max_entity_pos, posprop)) else return 0 end @@ -98,43 +92,52 @@ local function place_entities(pos) local ndef = minetest.registered_nodes[node.name] local values = get_values(node) local objrefs = get_entities(pos) - + if values and ndef and ndef.display_entities then - for entity_name, props in pairs(ndef.display_entities) do local depth = clip_pos_prop(props.depth) local right = clip_pos_prop(props.right) local top = clip_pos_prop(props.top) if not objrefs[entity_name] then - objrefs[entity_name] = minetest.add_entity(pos, entity_name) + objrefs[entity_name] = minetest.add_entity(pos, entity_name, + minetest.serialize({ nodepos = pos })) end - + objrefs[entity_name]:setpos({ x = pos.x - values.dx * depth + values.rx * right, y = pos.y - top, z = pos.z - values.dz * depth + values.rz * right}) - + objrefs[entity_name]:setyaw(values.yaw) end end return objrefs end ---- Call on_display_update callback of a node for one of its display entities -local function call_node_on_display_update(pos, objref) - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - local entity = objref:get_luaentity() - if ndef and ndef.display_entities and entity and ndef.display_entities[entity.name] then - ndef.display_entities[entity.name].on_display_update(pos, objref) + +--- Entity update +function update_entity(entity) + if not entity.nodepos then + entity.object:remove() -- Remove old/buggy entity + return + end + + local node = minetest.get_node(entity.nodepos) + local ndef = minetest.registered_nodes[node.name] + if ndef and ndef.display_entities and + ndef.display_entities[entity.name] and + ndef.display_entities[entity.name].on_display_update + then + -- Call on_display_update callback of a node for one of its display entities + ndef.display_entities[entity.name].on_display_update(entity.nodepos, + entity.object) end end --- Force entity update function display_api.update_entities(pos) - local objrefs = place_entities(pos) - for _, objref in pairs(objrefs) do - objref:get_luaentity().pos = minetest.hash_node_position(pos) - call_node_on_display_update(pos, objref) + for _, objref in pairs(place_entities(pos)) do + update_entity(objref:get_luaentity()) end end @@ -145,36 +148,28 @@ function display_api.on_activate(entity, staticdata) if string.sub(staticdata, 1, string.len("return")) == "return" then local data = core.deserialize(staticdata) if data and type(data) == "table" then - entity.pos = data.pos + entity.nodepos = data.nodepos end + entity.object:set_armor_groups({immortal=1}) end - entity.object:set_armor_groups({immortal=1}) - local pos - if entity.pos then - pos = minetest.get_position_from_hash(entity.pos) - else - pos = entity.object:getpos() - end - display_api.update_entities(pos) + update_entity(entity) end end ---- On_place callback for display_api items. Does nothing more than preventing item ---- from being placed on ceiling or ground +--- On_place callback for display_api items. +-- Does nothing more than preventing node from being placed on ceiling or ground function display_api.on_place(itemstack, placer, pointed_thing, override_param2) local ndef = itemstack:get_definition() local above = pointed_thing.above local under = pointed_thing.under - local dir = {x = under.x - above.x, - y = 0, - z = under.z - above.z} - + local dir = {x = under.x - above.x, y = 0, z = under.z - above.z} + -- If item is not placed on a wall, use the player's view direction instead if dir.x == 0 and dir.z == 0 then dir = placer:get_look_dir() dir.y = 0 end - + local param2 = 0 if ndef then local paramtype2 = ndef.paramtype2 @@ -184,19 +179,20 @@ function display_api.on_place(itemstack, placer, pointed_thing, override_param2) param2 = minetest.dir_to_facedir(dir) end end - return minetest.item_place(itemstack, placer, pointed_thing, param2 + (override_param2 or 0)) + return minetest.item_place(itemstack, placer, pointed_thing, + param2 + (override_param2 or 0)) end ---- On_construct callback for display_api items. Creates entities and update them. +--- On_construct callback for display_api items. +-- Creates entities and update them. function display_api.on_construct(pos) display_api.update_entities(pos) end ---- On_destruct callback for display_api items. Removes entities. +--- On_destruct callback for display_api items. +-- Removes entities. function display_api.on_destruct(pos) - local objrefs = get_entities(pos) - - for _, objref in pairs(objrefs) do + for _, objref in pairs(get_entities(pos)) do objref:remove() end end @@ -222,9 +218,7 @@ function display_api.register_display_entity(entity_name) textures = {}, on_activate = display_api.on_activate, get_staticdata = function(self) - return minetest.serialize({ - pos = self.pos, - }) + return minetest.serialize({ nodepos = self.nodepos }) end, }) end -- cgit v1.2.3 From 6c92826e3ccb2bb8850b5dfb587c2108ea50b75b Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 1 Dec 2018 20:44:10 +0100 Subject: Replaced core reference by usual minetest reference --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c9d8c19..4c0be22 100644 --- a/init.lua +++ b/init.lua @@ -146,7 +146,7 @@ end function display_api.on_activate(entity, staticdata) if entity then if string.sub(staticdata, 1, string.len("return")) == "return" then - local data = core.deserialize(staticdata) + local data = minetest.deserialize(staticdata) if data and type(data) == "table" then entity.nodepos = data.nodepos end -- cgit v1.2.3 From ab5a5107756a9d97efcfe41d3460a7bea18299aa Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sun, 2 Dec 2018 15:22:37 +0100 Subject: Avoid crash if entity not defined. --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 4c0be22..bf95ded 100644 --- a/init.lua +++ b/init.lua @@ -117,6 +117,10 @@ end --- Entity update function update_entity(entity) + if not entity then + return + end + if not entity.nodepos then entity.object:remove() -- Remove old/buggy entity return -- cgit v1.2.3 From 9ce075d30bebe91f8d8f93af72031b7f073dce80 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Mon, 3 Dec 2018 16:27:08 +0100 Subject: Depreciation of old display groups and display_lib global + warnings --- deprecation.lua | 72 ++++++++++++++++ display.lua | 236 +++++++++++++++++++++++++++++++++++++++++++++++++++ init.lua | 259 ++++++-------------------------------------------------- 3 files changed, 333 insertions(+), 234 deletions(-) create mode 100644 deprecation.lua create mode 100644 display.lua diff --git a/deprecation.lua b/deprecation.lua new file mode 100644 index 0000000..29bbd50 --- /dev/null +++ b/deprecation.lua @@ -0,0 +1,72 @@ +--[[ + display_api mod for Minetest - Library to add dynamic display + capabilities to nodes + (c) Pierre-Yves Rollo + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +--]] + +-- Deprecation + +function deprecated_group(deprecated_group, replacement_group) + for name, ndef in pairs(minetest.registered_nodes) do + if ndef.groups and ndef.groups[deprecated_group] then + minetest.log("warning", string.format('Node %s belongs to deprecated "%s" group which should be replaced with new "%s" group.', + name, deprecated_group, replacement_group)) + end + end +end + +function deprecated_global_table(deprecated_global_name, replacement_global_name) + assert(type(deprecated_global_name) == 'string', "deprecated_global_name should be a string.") + assert(type(replacement_global_name) == 'string', "replacement_global_name should be a string.") + assert(deprecated_global_name ~= '', "deprecated_global_name should not be empty.") + assert(replacement_global_name ~= '', "replacement_global_name should not be empty.") + assert(rawget(_G, deprecated_global_name) == nil, "replacement global already exists.") + if _G[replacement_global_name] == nil then + print('warn_deprecated_functions: Warning, replacement global "'..replacement_global_name..'" does not exists.') + return + end + local meta = { + deprecated = deprecated_global_name, + replacement = replacement_global_name, + __index = function(table, key) + local meta = getmetatable(table) + local dbg = debug.getinfo(2, "lS") + minetest.log("warning", string.format('Warning: Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', + meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), (dbg.currentline or 0))) + return _G[meta.replacement][key] + end, + __newindex = function(table, key, value) + local meta = getmetatable(table) + local dbg = debug.getinfo(2, "lS") + minetest.log("warning", string.format('Warning: Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', + meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), (dbg.currentline or 0))) + _G[meta.replacement][key]=value + end, + } + rawset(_G, deprecated_global_name, {}) + setmetatable(_G[deprecated_global_name], meta) +end + + +-- deprecated(1) -- December 2018 - Deprecation of groups display_modpack_node and display_lib_node +-- Group to be removed from display API register_lbm +minetest.after(0, function() + deprecated_group("display_modpack_node", "display_api") + deprecated_group("display_lib_node", "display_api") +end) + +-- deprecated(2) -- December 2018 - Deprecation of display_lib +deprecated_global_table('display_lib', 'display_api') diff --git a/display.lua b/display.lua new file mode 100644 index 0000000..53fd749 --- /dev/null +++ b/display.lua @@ -0,0 +1,236 @@ +--[[ + display_api mod for Minetest - Library to add dynamic display + capabilities to nodes + (c) Pierre-Yves Rollo + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +--]] + +-- Prefered gap between node and entity +-- Entity positionment is up to mods but it is a good practice to use this +-- variable as spacing between entity and node +display_api.entity_spacing = 0.002 + +-- Maximum entity position relative to the node pos +local max_entity_pos = 1.5 + +-- Miscelaneous values depending on wallmounted param2 +local wallmounted_values = { + [2]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, + [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 }, + [4]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, + [5]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi } +} + +-- Miscelaneous values depending on facedir param2 +local facedir_values = { + [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, + [1]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, + [2]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi }, + [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 } +} + +-- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, +local function get_values(node) + local ndef = minetest.registered_nodes[node.name] + + if ndef then + local paramtype2 = ndef.paramtype2 + if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then + return wallmounted_values[node.param2 % 8] + elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then + return facedir_values[node.param2 % 32] + end + end +end + +--- Gets the display entities attached with a node. Removes extra ones +local function get_entities(pos) + local objrefs = {} + local ndef = minetest.registered_nodes[minetest.get_node(pos).name] + if ndef and ndef.display_entities then + for _, objref in + ipairs(minetest.get_objects_inside_radius(pos, max_entity_pos)) do + local entity = objref:get_luaentity() + if entity and ndef.display_entities[entity.name] and + entity.nodepos and vector.equals(pos, entity.nodepos) then + if objrefs[entity.name] then + objref:remove() -- Remove duplicates + else + objrefs[entity.name] = objref + end + end + end + end + return objrefs +end + +local function clip_pos_prop(posprop) + if posprop then + return math.max(-max_entity_pos, math.min(max_entity_pos, posprop)) + else + return 0 + end +end + +--- (Create and) place display entities according to the node orientation +local function place_entities(pos) + local node = minetest.get_node(pos) + local ndef = minetest.registered_nodes[node.name] + local values = get_values(node) + local objrefs = get_entities(pos) + + if values and ndef and ndef.display_entities then + for entity_name, props in pairs(ndef.display_entities) do + local depth = clip_pos_prop(props.depth) + local right = clip_pos_prop(props.right) + local top = clip_pos_prop(props.top) + if not objrefs[entity_name] then + objrefs[entity_name] = minetest.add_entity(pos, entity_name, + minetest.serialize({ nodepos = pos })) + end + + objrefs[entity_name]:setpos({ + x = pos.x - values.dx * depth + values.rx * right, + y = pos.y - top, + z = pos.z - values.dz * depth + values.rz * right}) + + objrefs[entity_name]:setyaw(values.yaw) + end + end + return objrefs +end + + +--- Entity update +function update_entity(entity) + if not entity then + return + end + + if not entity.nodepos then + entity.object:remove() -- Remove old/buggy entity + return + end + + local node = minetest.get_node(entity.nodepos) + local ndef = minetest.registered_nodes[node.name] + if ndef and ndef.display_entities and + ndef.display_entities[entity.name] and + ndef.display_entities[entity.name].on_display_update + then + -- Call on_display_update callback of a node for one of its display entities + ndef.display_entities[entity.name].on_display_update(entity.nodepos, + entity.object) + end +end + +--- Force entity update +function display_api.update_entities(pos) + for _, objref in pairs(place_entities(pos)) do + update_entity(objref:get_luaentity()) + end +end + +--- On_activate callback for display_api entities. Calls on_display_update callbacks +--- of corresponding node for each entity. +function display_api.on_activate(entity, staticdata) + if entity then + if string.sub(staticdata, 1, string.len("return")) == "return" then + local data = minetest.deserialize(staticdata) + if data and type(data) == "table" then + entity.nodepos = data.nodepos + end + entity.object:set_armor_groups({immortal=1}) + end + update_entity(entity) + end +end + +--- On_place callback for display_api items. +-- Does nothing more than preventing node from being placed on ceiling or ground +function display_api.on_place(itemstack, placer, pointed_thing, override_param2) + local ndef = itemstack:get_definition() + local above = pointed_thing.above + local under = pointed_thing.under + local dir = {x = under.x - above.x, y = 0, z = under.z - above.z} + + -- If item is not placed on a wall, use the player's view direction instead + if dir.x == 0 and dir.z == 0 then + dir = placer:get_look_dir() + dir.y = 0 + end + + local param2 = 0 + if ndef then + local paramtype2 = ndef.paramtype2 + if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then + param2 = minetest.dir_to_wallmounted(dir) + elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then + param2 = minetest.dir_to_facedir(dir) + end + end + return minetest.item_place(itemstack, placer, pointed_thing, + param2 + (override_param2 or 0)) +end + +--- On_construct callback for display_api items. +-- Creates entities and update them. +function display_api.on_construct(pos) + display_api.update_entities(pos) +end + +--- On_destruct callback for display_api items. +-- Removes entities. +function display_api.on_destruct(pos) + for _, objref in pairs(get_entities(pos)) do + objref:remove() + end +end + +-- On_rotate (screwdriver) callback for display_api items. Prevents invalid rotations and reorients entities. +function display_api.on_rotate(pos, node, user, _, new_param2) + node.param2 = new_param2 + if get_values(node) then + minetest.swap_node(pos, node) + place_entities(pos) + return true + else + return false + end +end + +--- Creates display entity with some fields and the on_activate callback +function display_api.register_display_entity(entity_name) + if not minetest.registered_entity then + minetest.register_entity(':'..entity_name, { + collisionbox = { 0, 0, 0, 0, 0, 0 }, + visual = "upright_sprite", + textures = {}, + on_activate = display_api.on_activate, + get_staticdata = function(self) + return minetest.serialize({ nodepos = self.nodepos }) + end, + }) + end +end + +minetest.register_lbm({ + label = "Update display_api entities", + name = "display_api:update_entities", + run_at_every_load = true, + nodenames = {"group:display_api", + "group:display_modpack_node", "group:display_lib_node"}, -- See deprecated(1) + action = function(pos, node) display_api.update_entities(pos) end, +}) diff --git a/init.lua b/init.lua index bf95ded..f1e54e8 100644 --- a/init.lua +++ b/init.lua @@ -1,240 +1,31 @@ --[[ - display_api mod for Minetest - Library to add dynamic display - capabilities to nodes - (c) Pierre-Yves Rollo - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . + display_api mod for Minetest - Library to add dynamic display + capabilities to nodes + (c) Pierre-Yves Rollo + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU 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 General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . --]] -display_api = {} - --- Prefered gap between node and entity --- Entity positionment is up to mods but it is a good practice to use this --- variable as spacing between entity and node -display_api.entity_spacing = 0.002 - --- Maximum entity position relative to the node pos -local max_entity_pos = 1.5 - --- Miscelaneous values depending on wallmounted param2 -local wallmounted_values = { - [2]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, - [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 }, - [4]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, - [5]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi } -} - --- Miscelaneous values depending on facedir param2 -local facedir_values = { - [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, - [1]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, - [2]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi }, - [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 } -} - --- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, -local function get_values(node) - local ndef = minetest.registered_nodes[node.name] - - if ndef then - local paramtype2 = ndef.paramtype2 - if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then - return wallmounted_values[node.param2 % 8] - elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then - return facedir_values[node.param2 % 32] - end - end -end - ---- Gets the display entities attached with a node. Removes extra ones -local function get_entities(pos) - local objrefs = {} - local ndef = minetest.registered_nodes[minetest.get_node(pos).name] - if ndef and ndef.display_entities then - for _, objref in - ipairs(minetest.get_objects_inside_radius(pos, max_entity_pos)) do - local entity = objref:get_luaentity() - if entity and ndef.display_entities[entity.name] and - entity.nodepos and vector.equals(pos, entity.nodepos) then - if objrefs[entity.name] then - objref:remove() -- Remove duplicates - else - objrefs[entity.name] = objref - end - end - end - end - return objrefs -end - -local function clip_pos_prop(posprop) - if posprop then - return math.max(-max_entity_pos, math.min(max_entity_pos, posprop)) - else - return 0 - end -end - ---- (Create and) place display entities according to the node orientation -local function place_entities(pos) - local node = minetest.get_node(pos) - local ndef = minetest.registered_nodes[node.name] - local values = get_values(node) - local objrefs = get_entities(pos) - - if values and ndef and ndef.display_entities then - for entity_name, props in pairs(ndef.display_entities) do - local depth = clip_pos_prop(props.depth) - local right = clip_pos_prop(props.right) - local top = clip_pos_prop(props.top) - if not objrefs[entity_name] then - objrefs[entity_name] = minetest.add_entity(pos, entity_name, - minetest.serialize({ nodepos = pos })) - end +-- Global variables +------------------- - objrefs[entity_name]:setpos({ - x = pos.x - values.dx * depth + values.rx * right, - y = pos.y - top, - z = pos.z - values.dz * depth + values.rz * right}) - - objrefs[entity_name]:setyaw(values.yaw) - end - end - return objrefs -end - - ---- Entity update -function update_entity(entity) - if not entity then - return - end - - if not entity.nodepos then - entity.object:remove() -- Remove old/buggy entity - return - end - - local node = minetest.get_node(entity.nodepos) - local ndef = minetest.registered_nodes[node.name] - if ndef and ndef.display_entities and - ndef.display_entities[entity.name] and - ndef.display_entities[entity.name].on_display_update - then - -- Call on_display_update callback of a node for one of its display entities - ndef.display_entities[entity.name].on_display_update(entity.nodepos, - entity.object) - end -end - ---- Force entity update -function display_api.update_entities(pos) - for _, objref in pairs(place_entities(pos)) do - update_entity(objref:get_luaentity()) - end -end - ---- On_activate callback for display_api entities. Calls on_display_update callbacks ---- of corresponding node for each entity. -function display_api.on_activate(entity, staticdata) - if entity then - if string.sub(staticdata, 1, string.len("return")) == "return" then - local data = minetest.deserialize(staticdata) - if data and type(data) == "table" then - entity.nodepos = data.nodepos - end - entity.object:set_armor_groups({immortal=1}) - end - update_entity(entity) - end -end - ---- On_place callback for display_api items. --- Does nothing more than preventing node from being placed on ceiling or ground -function display_api.on_place(itemstack, placer, pointed_thing, override_param2) - local ndef = itemstack:get_definition() - local above = pointed_thing.above - local under = pointed_thing.under - local dir = {x = under.x - above.x, y = 0, z = under.z - above.z} - - -- If item is not placed on a wall, use the player's view direction instead - if dir.x == 0 and dir.z == 0 then - dir = placer:get_look_dir() - dir.y = 0 - end - - local param2 = 0 - if ndef then - local paramtype2 = ndef.paramtype2 - if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then - param2 = minetest.dir_to_wallmounted(dir) - elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then - param2 = minetest.dir_to_facedir(dir) - end - end - return minetest.item_place(itemstack, placer, pointed_thing, - param2 + (override_param2 or 0)) -end - ---- On_construct callback for display_api items. --- Creates entities and update them. -function display_api.on_construct(pos) - display_api.update_entities(pos) -end - ---- On_destruct callback for display_api items. --- Removes entities. -function display_api.on_destruct(pos) - for _, objref in pairs(get_entities(pos)) do - objref:remove() - end -end - --- On_rotate (screwdriver) callback for display_api items. Prevents invalid rotations and reorients entities. -function display_api.on_rotate(pos, node, user, _, new_param2) - node.param2 = new_param2 - if get_values(node) then - minetest.swap_node(pos, node) - place_entities(pos) - return true - else - return false - end -end - ---- Creates display entity with some fields and the on_activate callback -function display_api.register_display_entity(entity_name) - if not minetest.registered_entity then - minetest.register_entity(':'..entity_name, { - collisionbox = { 0, 0, 0, 0, 0, 0 }, - visual = "upright_sprite", - textures = {}, - on_activate = display_api.on_activate, - get_staticdata = function(self) - return minetest.serialize({ nodepos = self.nodepos }) - end, - }) - end -end +display_api = {} +display_api.name = minetest.get_current_modname() +display_api.path = minetest.get_modpath(display_api.name) -minetest.register_lbm({ - label = "Update display_api entities", - name = "display_api:update_entities", - run_at_every_load = true, - nodenames = {"group:display_modpack_node", "group:display_lib_node"}, - action = function(pos, node) display_api.update_entities(pos) end, -}) +-- Inclusions +------------- --- Compatibility -display_lib = display_api +dofile(display_api.path.."/display.lua") +dofile(display_api.path.."/deprecation.lua") -- cgit v1.2.3 From b16f9fc23bbbe6f11e687245da4988d38d022f56 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 4 Dec 2018 17:59:52 +0100 Subject: Updated API with new group --- API.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/API.md b/API.md index 0d52e29..b214585 100644 --- a/API.md +++ b/API.md @@ -11,7 +11,7 @@ This method triggers entities update for the display node at pos. Actual entity ### register\_display\_entity **display\_lib.register\_display\_entity(entity_name)** -This is a helper to register entities used for display. +This is a helper to register entities used for display. `entity_name`: Name of the entity to register. ## Provided callback implementations @@ -26,7 +26,7 @@ This is a helper to register entities used for display. ### on_destruct **display\_lib.on_destruct(pos)** -`on_destruct` node callback implementation. Display nodes should have this callback (removes display entities on node destruction). +`on_destruct` node callback implementation. Display nodes should have this callback (removes display entities on node destruction). ### on_rotate **display\_lib.on\_rotate(pos, node, user, mode, new_param2)** @@ -34,22 +34,20 @@ This is a helper to register entities used for display. ### on_activate **display\_lib.on_activate(entity, staticdata)** -`On_activate` entity callback implementation for display entities. No need of this method if display entities have been registered using `register_display_entity` (callback is already set). +`On_activate` entity callback implementation for display entities. No need of this method if display entities have been registered using `register_display_entity` (callback is already set). ## Howto register a display node * Register display entities with `register_display_entity` * Register node with : - `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks. -  - - `display_modpack_node` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects). -  + - `display_api` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects). - a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields. ### Display_entities fields `on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item. -`depth`, `right` and `height` : Entity position regarding to node facedir/wallmounted main axis. +`depth`, `right` and `height`: Entity position regarding to node facedir/wallmounted main axis. Values for these fields can be any number between -1.5 and 1.5 (default value is 0). Position 0,0,0 is the center of the node. `depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5). @@ -61,12 +59,12 @@ In order to avoid flickering text, it's better to have text a little behind node display_api.register_display_entity("mymod:entity1") display_api.register_display_entity("mymod:entity2") - function my_display_update1(pos, objref) + function my_display_update1(pos, objref) objref:set_properties({ textures= {"mytexture1.png"}, visual_size = {x=1, y=1} }) end - function my_display_update2(pos, objref) + function my_display_update2(pos, objref) objref:set_properties({ textures= {"mytexture2.png"},                         visual_size = {x=1, y=1} }) end @@ -75,13 +73,13 @@ In order to avoid flickering text, it's better to have text a little behind node ... paramtype2 = "facedir", ... - groups = { display_modpack_node = 1, ... }, + groups = { display_api = 1, ... }, ... display_entities = { - ["mymod:entity1"] = { + ["mymod:entity1"] = { depth = 0.3, on_display_update = my_display_update1 }, - ["mymod:entity1"] = { + ["mymod:entity1"] = { depth = 0.2, height = 0.1, on_display_update = my_display_update2 }, }, -- cgit v1.2.3 From 86db2d2c72ec91a3e18775079049ed3c1ceb599a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 4 Dec 2018 18:01:36 +0100 Subject: Fixed entity existence verification --- display.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/display.lua b/display.lua index 53fd749..eefeac0 100644 --- a/display.lua +++ b/display.lua @@ -213,7 +213,7 @@ end --- Creates display entity with some fields and the on_activate callback function display_api.register_display_entity(entity_name) - if not minetest.registered_entity then + if not minetest.registered_entities[entity_name] then minetest.register_entity(':'..entity_name, { collisionbox = { 0, 0, 0, 0, 0, 0 }, visual = "upright_sprite", -- cgit v1.2.3 From 18561210988276fc16aed7fd77ed4be41b1f7e6a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Wed, 5 Dec 2018 15:41:56 +0100 Subject: New Font:render method --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index bf95ded..d4f7dcd 100644 --- a/init.lua +++ b/init.lua @@ -120,7 +120,7 @@ function update_entity(entity) if not entity then return end - + if not entity.nodepos then entity.object:remove() -- Remove old/buggy entity return -- cgit v1.2.3 From ca28c5e8353613aeb97ab8831026c618a0cddabc Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 8 Dec 2018 19:27:08 +0100 Subject: Remove entity where display node not found --- display.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/display.lua b/display.lua index eefeac0..a8cee66 100644 --- a/display.lua +++ b/display.lua @@ -133,6 +133,9 @@ function update_entity(entity) -- Call on_display_update callback of a node for one of its display entities ndef.display_entities[entity.name].on_display_update(entity.nodepos, entity.object) + else + -- Display node has been removed, remove entity also + entity.object:remove() end end -- cgit v1.2.3 From ea583b525032a8e0fca8a4766a89cd8bdced606a Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 11 Dec 2018 11:52:55 +0100 Subject: Added font_lib deprecation and corresponding notices in READMEs --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 26b26f0..079ce6d 100644 --- a/README.md +++ b/README.md @@ -12,3 +12,12 @@ This library's purpose is to ease creation of nodes with one or more displays on For more information, see the [forum topic](https://forum.minetest.net/viewtopic.php?t=19365) at the Minetest forums. +## Deprecation notice (for modders) + +### December 2018 +Following objects are deprecated, shows a warning in log when used: +* `display_modpack_node` group (use `display_api` group instead); +* `display_lib_node` group (use `display_api` group instead); +* `display_lib` global table (use `display_api` global table instead); + +These objects will be removed in the future. -- cgit v1.2.3 From d073c9edb853ed81049cd392f9573d0d124376e6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 11 Dec 2018 14:57:42 +0100 Subject: Added display entity yaw attribute --- display.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/display.lua b/display.lua index a8cee66..3cc52b7 100644 --- a/display.lua +++ b/display.lua @@ -106,13 +106,12 @@ local function place_entities(pos) y = pos.y - top, z = pos.z - values.dz * depth + values.rz * right}) - objrefs[entity_name]:setyaw(values.yaw) + objrefs[entity_name]:setyaw(values.yaw + (props.yaw or 0)) end end return objrefs end - --- Entity update function update_entity(entity) if not entity then -- cgit v1.2.3 From b98e97157cc60f7a5da728a7fab81ca11577ef00 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 11 Dec 2018 14:58:11 +0100 Subject: Update API documentation --- API.md | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/API.md b/API.md index b214585..e69ae60 100644 --- a/API.md +++ b/API.md @@ -1,38 +1,38 @@ -# Display Lib API -This document describes Display Lib API. Display Lib allows to add a dynamic display on a node. Display Lib limits node rotations. For wallmounted, only vertical positionning is available, and for facedir, only first four position are availabel (those with default axis). +# Display API +This document describes Display API. Display API allows to add a dynamic display on a node. Display API limits node rotations. For wallmounted, only vertical positionning is available. For facedir, only first four position are availabel (those with default axis). ## Provided methods ### update\_entities -**display\_lib.update\_entities(pos)** +**display\_api.update\_entities(pos)** This method triggers entities update for the display node at pos. Actual entity update is made by `on_display_update` callback associated to the entity. `pos`: Position of the node ### register\_display\_entity -**display\_lib.register\_display\_entity(entity_name)** +**display\_api.register\_display\_entity(entity_name)** This is a helper to register entities used for display. `entity_name`: Name of the entity to register. ## Provided callback implementations ### on_place -**display\_lib.on\_place(itemstack, placer, pointed\_thing)** +**display\_api.on\_place(itemstack, placer, pointed\_thing)** `on_place` node callback implementation. Display nodes should have this callback (avoid placement of horizontal display node). ### on_construct -**display\_lib.on\_construct(pos)** +**display\_api.on\_construct(pos)** `on_construct` node callback implementation. Display nodes should have this callback (creates, places and updates display entities on node construction). ### on_destruct -**display\_lib.on_destruct(pos)** +**display\_api.on_destruct(pos)** `on_destruct` node callback implementation. Display nodes should have this callback (removes display entities on node destruction). ### on_rotate -**display\_lib.on\_rotate(pos, node, user, mode, new_param2)** +**display\_api.on\_rotate(pos, node, user, mode, new_param2)** `on_rotate` node callback implementation. Display nodes should have this callback (restricts rotations and rotates display entities associated with node). ### on_activate -**display\_lib.on_activate(entity, staticdata)** +**display\_api.on_activate(entity, staticdata)** `On_activate` entity callback implementation for display entities. No need of this method if display entities have been registered using `register_display_entity` (callback is already set). @@ -40,17 +40,16 @@ This is a helper to register entities used for display. * Register display entities with `register_display_entity` * Register node with : - - `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks. - - `display_api` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects). - - a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields. + - `on_place`, `on_construct`, `on_destruct` and `on_rotate` callbacks using display_api callbacks.\ + - `display_api` group. This will make this node have their entities updated as soon as the mapblock is loaded (Useful after /clearobjects).\ + - a `display_entities` field in node definition containing a entity name indexed table. See below for description of each display_entities fields.\ ### Display_entities fields -`on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item. - -`depth`, `right` and `height`: Entity position regarding to node facedir/wallmounted main axis. -Values for these fields can be any number between -1.5 and 1.5 (default value is 0). -Position 0,0,0 is the center of the node. -`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5). +`on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item.\ +`depth`, `right` and `height`: Entity position regarding to node facedir/wallmounted main axis.\ +Values for these fields can be any number between -1.5 and 1.5 (default value is 0). Position 0,0,0 is the center of the node.\ +`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5).\ +`yaw`: Entity yaw in radians, regarding to main axis. Default is 0, aligned to node face. In order to avoid flickering text, it's better to have text a little behind node surface. A good spacing value is given by `display_api.entity_spacing` variable. -- cgit v1.2.3 From d7de025623bf540fc5c04eb3a2bba176cc251270 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Tue, 5 Mar 2019 20:59:42 +0100 Subject: Switched from deprecated functions setyaw and setpos to set_yaw and set_pos --- display.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/display.lua b/display.lua index 3cc52b7..0aefa82 100644 --- a/display.lua +++ b/display.lua @@ -101,12 +101,12 @@ local function place_entities(pos) minetest.serialize({ nodepos = pos })) end - objrefs[entity_name]:setpos({ + objrefs[entity_name]:set_pos({ x = pos.x - values.dx * depth + values.rx * right, y = pos.y - top, z = pos.z - values.dz * depth + values.rz * right}) - objrefs[entity_name]:setyaw(values.yaw + (props.yaw or 0)) + objrefs[entity_name]:set_yaw(values.yaw + (props.yaw or 0)) end end return objrefs -- cgit v1.2.3 From 7221f59a9d2460c9678c42880c176f7aa68d49f5 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 9 Mar 2019 19:08:46 +0100 Subject: Added mod.conf --- mod.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mod.conf diff --git a/mod.conf b/mod.conf new file mode 100644 index 0000000..d0b1da7 --- /dev/null +++ b/mod.conf @@ -0,0 +1,2 @@ +name=display_api +description=A library for adding dynamic textures on nodes -- cgit v1.2.3 From 15ed431b3a888cc9e4bfdad5026d014bff6c736e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 9 Mar 2019 20:24:53 +0100 Subject: Use MT5 set_rotation to allow all rotations of nodes --- display.lua | 115 ++++++++++++++++++++++++++++++++++++++++++++----------- settingtypes.txt | 1 + 2 files changed, 93 insertions(+), 23 deletions(-) create mode 100644 settingtypes.txt diff --git a/display.lua b/display.lua index 0aefa82..3fed20a 100644 --- a/display.lua +++ b/display.lua @@ -22,26 +22,81 @@ -- variable as spacing between entity and node display_api.entity_spacing = 0.002 +-- Settings +display_api.rotation_restriction = + minetest.settings:get_bool("display_rotation_restriction", true) + +if display_api.rotation_restriction then + minetest.log("action", "[display_api] Legacy rotation restriction in effect") +end + -- Maximum entity position relative to the node pos local max_entity_pos = 1.5 --- Miscelaneous values depending on wallmounted param2 -local wallmounted_values = { - [2]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, - [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 }, - [4]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, - [5]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi } -} - --- Miscelaneous values depending on facedir param2 -local facedir_values = { - [0]={dx=0, dz=-1, rx=1, rz=0, yaw=0 }, - [1]={dx=-1, dz=0, rx=0, rz=-1, yaw=-math.pi/2}, - [2]={dx=0, dz=1, rx=-1, rz=0, yaw=math.pi }, - [3]={dx=1, dz=0, rx=0, rz=1, yaw=math.pi/2 } -} - --- dx/dy = depth vector, rx/ly = right vector, yaw = yaw of entity, +local wallmounted_rotations, facedir_rotations + +if display_api.rotation_restriction then + -- Legacy rotations (MT<5.0) + wallmounted_rotations = { + [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, + [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, + } + facedir_rotations = { + [0]={x=0, y=0, z=0}, [1]={x=0, y=3, z=0}, + [2]={x=0, y=2, z=0}, [3]={x=0, y=1, z=0}, + } +else + -- Full rotations (MT>=5.0) + wallmounted_rotations = { + [0]={x=1, y=0, z=0}, [1]={x=3, y=0, z=0}, + [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, + [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, + } + facedir_rotations = { + [ 0]={x=0, y=0, z=0}, [ 1]={x=0, y=3, z=0}, + [ 2]={x=0, y=2, z=0}, [ 3]={x=0, y=1, z=0}, + [ 4]={x=3, y=0, z=0}, [ 5]={x=0, y=3, z=3}, + [ 6]={x=1, y=0, z=2}, [ 7]={x=0, y=1, z=1}, + [ 8]={x=1, y=0, z=0}, [ 9]={x=0, y=3, z=1}, + [10]={x=3, y=0, z=2}, [11]={x=0, y=1, z=3}, + [12]={x=0, y=0, z=1}, [13]={x=3, y=0, z=1}, + [14]={x=2, y=0, z=1}, [15]={x=1, y=0, z=1}, + [16]={x=0, y=0, z=3}, [17]={x=1, y=0, z=3}, + [18]={x=2, y=0, z=3}, [19]={x=3, y=0, z=3}, + [20]={x=0, y=0, z=2}, [21]={x=0, y=1, z=2}, + [22]={x=0, y=2, z=2}, [23]={x=0, y=3, z=2}, + } +end + +-- Compute other useful values depending on wallmounted and facedir param +local wallmounted_values = {} +local facedir_values = {} + +local function compute_values(r) + local function rx(v) return { x=v.x, y=v.z, z=-v.y} end + local function ry(v) return { x=-v.z, y=v.y, z=v.x} end + local function rz(v) return { x=v.y, y=-v.x, z=v.z} end + + local d = { x = 0, y = 0, z = 1 } + local w = { x = 1, y = 0, z = 0 } + local h = { x = 0, y = 1, z = 0 } + + -- Important to keep z rotation first (not same results) + for _ = 1, r.z do d, w, h = rz(d), rz(w), rz(h) end + for _ = 1, r.x do d, w, h = rx(d), rx(w), rx(h) end + for _ = 1, r.y do d, w, h = ry(d), ry(w), ry(h) end + + return {rotation=r, depth=d, width=w, height=h} +end + +for i, r in pairs(facedir_rotations) do + facedir_values[i] = compute_values(r) +end + +for i, r in pairs(wallmounted_rotations) do + wallmounted_values[i] = compute_values(r) +end + local function get_values(node) local ndef = minetest.registered_nodes[node.name] @@ -88,10 +143,10 @@ end local function place_entities(pos) local node = minetest.get_node(pos) local ndef = minetest.registered_nodes[node.name] - local values = get_values(node) + local v = get_values(node) local objrefs = get_entities(pos) - if values and ndef and ndef.display_entities then + if v and ndef and ndef.display_entities then for entity_name, props in pairs(ndef.display_entities) do local depth = clip_pos_prop(props.depth) local right = clip_pos_prop(props.right) @@ -102,11 +157,20 @@ local function place_entities(pos) end objrefs[entity_name]:set_pos({ - x = pos.x - values.dx * depth + values.rx * right, - y = pos.y - top, - z = pos.z - values.dz * depth + values.rz * right}) + x = pos.x + v.depth.x*depth + v.width.x*right - v.height.x*top, + y = pos.y + v.depth.y*depth + v.width.y*right - v.height.y*top, + z = pos.z + v.depth.z*depth + v.width.z*right - v.height.z*top, + }) - objrefs[entity_name]:set_yaw(values.yaw + (props.yaw or 0)) + if objrefs[entity_name].set_rotation then + objrefs[entity_name]:set_rotation({ + x = v.rotation.x*math.pi/2, + y = v.rotation.y*math.pi/2 + (props.yaw or 0), + z = v.rotation.z*math.pi/2, + }) + else -- For minetest < 5.0 -- TODO: To be removed in the future + objrefs[entity_name]:set_yaw(values.rotation.y + (props.yaw or 0)) + end end end return objrefs @@ -162,7 +226,12 @@ end --- On_place callback for display_api items. -- Does nothing more than preventing node from being placed on ceiling or ground +-- TODO:When MT<5 is not in use anymore, this should be deprecated function display_api.on_place(itemstack, placer, pointed_thing, override_param2) + if not display_api.rotation_restriction then + return minetest.item_place(itemstack, placer, pointed_thing, override_param2) + end + local ndef = itemstack:get_definition() local above = pointed_thing.above local under = pointed_thing.under diff --git a/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..58a0108 --- /dev/null +++ b/settingtypes.txt @@ -0,0 +1 @@ +display_rotation_restriction(Legacy nodes rotation restriction MT<5.0) bool true -- cgit v1.2.3 From da1af1fdebf8c3611672f5414822bf5141f8a13c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 9 Mar 2019 20:47:33 +0100 Subject: Update README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 079ce6d..a0f0f6e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ This library's purpose is to ease creation of nodes with one or more displays on sides. For example, signs and clocks. Display can be dynamic and/or different for each node instance. -**Limitations**: This lib uses entities to draw display. This means display has to be vertical. So display nodes rotation are limitated to "upside up" positions. +**Limitations**: This lib uses entities to draw display. This means display has to be vertical (and "upside up") on Minetest before version 5.0. This restriction can be set in settings. + +**Settings**: `display_rotation_restriction` should be set to false if using Minetest 5.0 and above, true otherwise. **Dependancies**:default @@ -21,3 +23,12 @@ Following objects are deprecated, shows a warning in log when used: * `display_lib` global table (use `display_api` global table instead); These objects will be removed in the future. + +## Change log + +### 2019-03-09 +- __display_api__: Display nodes can be rotated in every directions (if running Minetest 5 or above). +- __display_api__: New setting to restrict rotations to Minetest 0.4 abilities (**restriction enabled by default**). + +### 2018-12-14 +- __display_api__: New `yaw` attributes, entities can now have different angles with node. -- cgit v1.2.3 From 010b7cc89f4157cdff36cda23a5daf55de2bf920 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Sat, 9 Mar 2019 21:18:43 +0100 Subject: Fixed a remaining bug in node placement --- display.lua | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/display.lua b/display.lua index 3fed20a..d241fb3 100644 --- a/display.lua +++ b/display.lua @@ -226,30 +226,32 @@ end --- On_place callback for display_api items. -- Does nothing more than preventing node from being placed on ceiling or ground --- TODO:When MT<5 is not in use anymore, this should be deprecated +-- TODO:When MT<5 is not in use anymore, simplify this function display_api.on_place(itemstack, placer, pointed_thing, override_param2) - if not display_api.rotation_restriction then - return minetest.item_place(itemstack, placer, pointed_thing, override_param2) - end - local ndef = itemstack:get_definition() - local above = pointed_thing.above - local under = pointed_thing.under - local dir = {x = under.x - above.x, y = 0, z = under.z - above.z} + local dir = { + x = pointed_thing.under.x - pointed_thing.above.x, + y = pointed_thing.under.y - pointed_thing.above.y, + z = pointed_thing.under.z - pointed_thing.above.z, + } - -- If item is not placed on a wall, use the player's view direction instead - if dir.x == 0 and dir.z == 0 then - dir = placer:get_look_dir() + if display_api.rotation_restriction then + -- If item is not placed on a wall, use the player's view direction instead + if dir.x == 0 and dir.z == 0 then + dir = placer:get_look_dir() + end dir.y = 0 end local param2 = 0 if ndef then - local paramtype2 = ndef.paramtype2 - if paramtype2 == "wallmounted" or paramtype2 == "colorwallmounted" then + if ndef.paramtype2 == "wallmounted" or + ndef.paramtype2 == "colorwallmounted" then param2 = minetest.dir_to_wallmounted(dir) - elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then - param2 = minetest.dir_to_facedir(dir) + + elseif ndef.paramtype2 == "facedir" or + ndef.paramtype2 == "colorfacedir" then + param2 = minetest.dir_to_facedir(dir, not display_api.rotation_restriction) end end return minetest.item_place(itemstack, placer, pointed_thing, -- cgit v1.2.3 From 767c2653c29990a85dfdfa80afed42e81c9582ea Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Mon, 11 Mar 2019 10:16:18 +0100 Subject: Fixed crash on MT0.4 --- display.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/display.lua b/display.lua index d241fb3..3ed1f02 100644 --- a/display.lua +++ b/display.lua @@ -169,7 +169,7 @@ local function place_entities(pos) z = v.rotation.z*math.pi/2, }) else -- For minetest < 5.0 -- TODO: To be removed in the future - objrefs[entity_name]:set_yaw(values.rotation.y + (props.yaw or 0)) + objrefs[entity_name]:set_yaw(v.rotation.y*math.pi/2 + (props.yaw or 0)) end end end -- cgit v1.2.3 From fd4c8e6c68d0706e8a38626dbec7bc945eb0a5bb Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Thu, 14 Mar 2019 09:36:41 +0100 Subject: Detect rotation restriction (#29) Autodetect rotation restrictions if on MT<5.0 --- API.md | 1 + README.md | 8 +- display.lua | 247 ++++++++++++++++++++++++++++--------------------------- settingtypes.txt | 1 - 4 files changed, 133 insertions(+), 124 deletions(-) delete mode 100644 settingtypes.txt diff --git a/API.md b/API.md index e69ae60..acfd867 100644 --- a/API.md +++ b/API.md @@ -14,6 +14,7 @@ This method triggers entities update for the display node at pos. Actual entity This is a helper to register entities used for display. `entity_name`: Name of the entity to register. + ## Provided callback implementations ### on_place **display\_api.on\_place(itemstack, placer, pointed\_thing)** diff --git a/README.md b/README.md index a0f0f6e..73acdf9 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ This library's purpose is to ease creation of nodes with one or more displays on sides. For example, signs and clocks. Display can be dynamic and/or different for each node instance. -**Limitations**: This lib uses entities to draw display. This means display has to be vertical (and "upside up") on Minetest before version 5.0. This restriction can be set in settings. - -**Settings**: `display_rotation_restriction` should be set to false if using Minetest 5.0 and above, true otherwise. +**Limitations**: This lib uses entities to draw display. This means display has to be vertical (and "upside up") on Minetest before version 5.0. **Dependancies**:default @@ -25,10 +23,12 @@ Following objects are deprecated, shows a warning in log when used: These objects will be removed in the future. ## Change log +### 2019-03-14 +- __dispay_api__: Display API now detects automatically whenr rotation restrictions have to be applied. ### 2019-03-09 - __display_api__: Display nodes can be rotated in every directions (if running Minetest 5 or above). -- __display_api__: New setting to restrict rotations to Minetest 0.4 abilities (**restriction enabled by default**). +- __display_api__: New setting to restrict rotations to Minetest 0.4 abilities (restriction enabled by default). ### 2018-12-14 - __display_api__: New `yaw` attributes, entities can now have different angles with node. diff --git a/display.lua b/display.lua index 3ed1f02..2fed40f 100644 --- a/display.lua +++ b/display.lua @@ -22,51 +22,29 @@ -- variable as spacing between entity and node display_api.entity_spacing = 0.002 --- Settings -display_api.rotation_restriction = - minetest.settings:get_bool("display_rotation_restriction", true) - -if display_api.rotation_restriction then - minetest.log("action", "[display_api] Legacy rotation restriction in effect") -end - -- Maximum entity position relative to the node pos local max_entity_pos = 1.5 -local wallmounted_rotations, facedir_rotations - -if display_api.rotation_restriction then - -- Legacy rotations (MT<5.0) - wallmounted_rotations = { - [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, - [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, - } - facedir_rotations = { - [0]={x=0, y=0, z=0}, [1]={x=0, y=3, z=0}, - [2]={x=0, y=2, z=0}, [3]={x=0, y=1, z=0}, - } -else - -- Full rotations (MT>=5.0) - wallmounted_rotations = { - [0]={x=1, y=0, z=0}, [1]={x=3, y=0, z=0}, - [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, - [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, - } - facedir_rotations = { - [ 0]={x=0, y=0, z=0}, [ 1]={x=0, y=3, z=0}, - [ 2]={x=0, y=2, z=0}, [ 3]={x=0, y=1, z=0}, - [ 4]={x=3, y=0, z=0}, [ 5]={x=0, y=3, z=3}, - [ 6]={x=1, y=0, z=2}, [ 7]={x=0, y=1, z=1}, - [ 8]={x=1, y=0, z=0}, [ 9]={x=0, y=3, z=1}, - [10]={x=3, y=0, z=2}, [11]={x=0, y=1, z=3}, - [12]={x=0, y=0, z=1}, [13]={x=3, y=0, z=1}, - [14]={x=2, y=0, z=1}, [15]={x=1, y=0, z=1}, - [16]={x=0, y=0, z=3}, [17]={x=1, y=0, z=3}, - [18]={x=2, y=0, z=3}, [19]={x=3, y=0, z=3}, - [20]={x=0, y=0, z=2}, [21]={x=0, y=1, z=2}, - [22]={x=0, y=2, z=2}, [23]={x=0, y=3, z=2}, - } -end +local wallmounted_rotations = { + [0]={x=1, y=0, z=0}, [1]={x=3, y=0, z=0}, + [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, + [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, +} + +local facedir_rotations = { + [ 0]={x=0, y=0, z=0}, [ 1]={x=0, y=3, z=0}, + [ 2]={x=0, y=2, z=0}, [ 3]={x=0, y=1, z=0}, + [ 4]={x=3, y=0, z=0}, [ 5]={x=0, y=3, z=3}, + [ 6]={x=1, y=0, z=2}, [ 7]={x=0, y=1, z=1}, + [ 8]={x=1, y=0, z=0}, [ 9]={x=0, y=3, z=1}, + [10]={x=3, y=0, z=2}, [11]={x=0, y=1, z=3}, + [12]={x=0, y=0, z=1}, [13]={x=3, y=0, z=1}, + [14]={x=2, y=0, z=1}, [15]={x=1, y=0, z=1}, + [16]={x=0, y=0, z=3}, [17]={x=1, y=0, z=3}, + [18]={x=2, y=0, z=3}, [19]={x=3, y=0, z=3}, + [20]={x=0, y=0, z=2}, [21]={x=0, y=1, z=2}, + [22]={x=0, y=2, z=2}, [23]={x=0, y=3, z=2}, +} -- Compute other useful values depending on wallmounted and facedir param local wallmounted_values = {} @@ -86,7 +64,9 @@ local function compute_values(r) for _ = 1, r.x do d, w, h = rx(d), rx(w), rx(h) end for _ = 1, r.y do d, w, h = ry(d), ry(w), ry(h) end - return {rotation=r, depth=d, width=w, height=h} + return { + rotation=r, depth=d, width=w, height=h, + restricted=(r.x==0 and r.z==0) } end for i, r in pairs(facedir_rotations) do @@ -97,7 +77,38 @@ for i, r in pairs(wallmounted_rotations) do wallmounted_values[i] = compute_values(r) end -local function get_values(node) +-- Detect rotation restriction +local rotation_restricted = nil +minetest.register_entity('display_api:dummy_entity', { + collisionbox = { 0, 0, 0, 0, 0, 0 }, + visual = "upright_sprite", + textures = {} }) + +function display_api.is_rotation_restricted() + if rotation_restricted == nil then + local objref = minetest.add_entity( + {x=0, y=0, z=0}, 'display_api:dummy_entity') + if objref then + rotation_restricted = objref.set_rotation == nil + objref:remove() + end + end + return rotation_restricted +end + +-- Clip position property to maximum entity position + +local function clip_pos_prop(posprop) + if posprop then + return math.max(-max_entity_pos, math.min(max_entity_pos, posprop)) + else + return 0 + end +end + +-- Get values needed for orientation computation of node + +local function get_orientation_values(node) local ndef = minetest.registered_nodes[node.name] if ndef then @@ -106,12 +117,17 @@ local function get_values(node) return wallmounted_values[node.param2 % 8] elseif paramtype2 == "facedir" or paramtype2 == "colorfacedir" then return facedir_values[node.param2 % 32] + else + -- No orientation or unknown orientation type + return facedir_values[0] end end end ---- Gets the display entities attached with a node. Removes extra ones -local function get_entities(pos) +-- Gets the display entities attached with a node. +-- Add missing and remove duplicates + +local function get_display_objrefs(pos, create) local objrefs = {} local ndef = minetest.registered_nodes[minetest.get_node(pos).name] if ndef and ndef.display_entities then @@ -127,85 +143,57 @@ local function get_entities(pos) end end end + if create then + -- Add missing + for name, _ in pairs(ndef.display_entities) do + if not objrefs[name] then + objrefs[name] = minetest.add_entity(pos, name, + minetest.serialize({ nodepos = pos })) + end + end + end end return objrefs end -local function clip_pos_prop(posprop) - if posprop then - return math.max(-max_entity_pos, math.min(max_entity_pos, posprop)) - else - return 0 - end -end +--- Force entity update : position and texture +function display_api.update_entities(pos) ---- (Create and) place display entities according to the node orientation -local function place_entities(pos) local node = minetest.get_node(pos) local ndef = minetest.registered_nodes[node.name] - local v = get_values(node) - local objrefs = get_entities(pos) - - if v and ndef and ndef.display_entities then - for entity_name, props in pairs(ndef.display_entities) do - local depth = clip_pos_prop(props.depth) - local right = clip_pos_prop(props.right) - local top = clip_pos_prop(props.top) - if not objrefs[entity_name] then - objrefs[entity_name] = minetest.add_entity(pos, entity_name, - minetest.serialize({ nodepos = pos })) - end + local ov = get_orientation_values(node) + + for _, objref in pairs(get_display_objrefs(pos, true)) do + local edef = ndef.display_entities[objref:get_luaentity().name] + local depth = clip_pos_prop(edef.depth) + local right = clip_pos_prop(edef.right) + local top = clip_pos_prop(edef.top) + + objref:set_pos({ + x = pos.x + ov.depth.x*depth + ov.width.x*right - ov.height.x*top, + y = pos.y + ov.depth.y*depth + ov.width.y*right - ov.height.y*top, + z = pos.z + ov.depth.z*depth + ov.width.z*right - ov.height.z*top, + }) - objrefs[entity_name]:set_pos({ - x = pos.x + v.depth.x*depth + v.width.x*right - v.height.x*top, - y = pos.y + v.depth.y*depth + v.width.y*right - v.height.y*top, - z = pos.z + v.depth.z*depth + v.width.z*right - v.height.z*top, + if objref.set_rotation then + objref:set_rotation({ + x = ov.rotation.x*math.pi/2, + y = ov.rotation.y*math.pi/2 + (edef.yaw or 0), + z = ov.rotation.z*math.pi/2, }) - - if objrefs[entity_name].set_rotation then - objrefs[entity_name]:set_rotation({ - x = v.rotation.x*math.pi/2, - y = v.rotation.y*math.pi/2 + (props.yaw or 0), - z = v.rotation.z*math.pi/2, - }) - else -- For minetest < 5.0 -- TODO: To be removed in the future - objrefs[entity_name]:set_yaw(v.rotation.y*math.pi/2 + (props.yaw or 0)) + else + if ov.rotation.x ~=0 or ov.rotation.y ~= 0 then + minetest.log("warning", string.format( + "[display_api] unable to rotate correctly entity for node at %s without set_rotation method.", + minetest.pos_to_string(pos))) end + objref:set_yaw(ov.rotation.y*math.pi/2 + (edef.yaw or 0)) end - end - return objrefs -end - ---- Entity update -function update_entity(entity) - if not entity then - return - end - - if not entity.nodepos then - entity.object:remove() -- Remove old/buggy entity - return - end - local node = minetest.get_node(entity.nodepos) - local ndef = minetest.registered_nodes[node.name] - if ndef and ndef.display_entities and - ndef.display_entities[entity.name] and - ndef.display_entities[entity.name].on_display_update - then -- Call on_display_update callback of a node for one of its display entities - ndef.display_entities[entity.name].on_display_update(entity.nodepos, - entity.object) - else - -- Display node has been removed, remove entity also - entity.object:remove() - end -end - ---- Force entity update -function display_api.update_entities(pos) - for _, objref in pairs(place_entities(pos)) do - update_entity(objref:get_luaentity()) + if edef.on_display_update then + edef.on_display_update(pos, objref) + end end end @@ -220,7 +208,23 @@ function display_api.on_activate(entity, staticdata) end entity.object:set_armor_groups({immortal=1}) end - update_entity(entity) + + if entity.nodepos then + local node = minetest.get_node(entity.nodepos) + local ndef = minetest.registered_nodes[node.name] + if ndef and ndef.display_entities then + local edef = ndef.display_entities[entity.name] + if edef then + -- Call on_display_update callback of the entity to build texture + if edef.on_display_update then + edef.on_display_update(entity.nodepos, entity.object) + end + return + end + end + end + -- If we got here, this display entity is buggy and should be removed + entity.object:remove() end end @@ -235,7 +239,9 @@ function display_api.on_place(itemstack, placer, pointed_thing, override_param2) z = pointed_thing.under.z - pointed_thing.above.z, } - if display_api.rotation_restriction then + local rotation_restriction = display_api.is_rotation_restricted() + + if rotation_restriction then -- If item is not placed on a wall, use the player's view direction instead if dir.x == 0 and dir.z == 0 then dir = placer:get_look_dir() @@ -251,7 +257,7 @@ function display_api.on_place(itemstack, placer, pointed_thing, override_param2) elseif ndef.paramtype2 == "facedir" or ndef.paramtype2 == "colorfacedir" then - param2 = minetest.dir_to_facedir(dir, not display_api.rotation_restriction) + param2 = minetest.dir_to_facedir(dir, not rotation_restriction) end end return minetest.item_place(itemstack, placer, pointed_thing, @@ -267,17 +273,20 @@ end --- On_destruct callback for display_api items. -- Removes entities. function display_api.on_destruct(pos) - for _, objref in pairs(get_entities(pos)) do + for _, objref in pairs(get_display_objrefs(pos)) do objref:remove() end end --- On_rotate (screwdriver) callback for display_api items. Prevents invalid rotations and reorients entities. +-- On_rotate (screwdriver) callback for display_api items. Prevents invalid +-- rotations and reorients entities. function display_api.on_rotate(pos, node, user, _, new_param2) node.param2 = new_param2 - if get_values(node) then + local ov = get_orientation_values(node) + + if ov.restricted or not display_api.is_rotation_restricted() then minetest.swap_node(pos, node) - place_entities(pos) + display_api.update_entities(pos) return true else return false diff --git a/settingtypes.txt b/settingtypes.txt deleted file mode 100644 index 58a0108..0000000 --- a/settingtypes.txt +++ /dev/null @@ -1 +0,0 @@ -display_rotation_restriction(Legacy nodes rotation restriction MT<5.0) bool true -- cgit v1.2.3 From 2b142e9dfee511803e2847565a6f4d6c128c6062 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Thu, 14 Mar 2019 09:46:04 +0100 Subject: Replaced prints by minetest.log and code styling --- deprecation.lua | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/deprecation.lua b/deprecation.lua index 29bbd50..b041f6f 100644 --- a/deprecation.lua +++ b/deprecation.lua @@ -22,7 +22,8 @@ function deprecated_group(deprecated_group, replacement_group) for name, ndef in pairs(minetest.registered_nodes) do if ndef.groups and ndef.groups[deprecated_group] then - minetest.log("warning", string.format('Node %s belongs to deprecated "%s" group which should be replaced with new "%s" group.', + minetest.log("warning", string.format( + 'Node %s belongs to deprecated "%s" group which should be replaced with new "%s" group.', name, deprecated_group, replacement_group)) end end @@ -33,9 +34,10 @@ function deprecated_global_table(deprecated_global_name, replacement_global_name assert(type(replacement_global_name) == 'string', "replacement_global_name should be a string.") assert(deprecated_global_name ~= '', "deprecated_global_name should not be empty.") assert(replacement_global_name ~= '', "replacement_global_name should not be empty.") - assert(rawget(_G, deprecated_global_name) == nil, "replacement global already exists.") + assert(rawget(_G, deprecated_global_name) == nil, "deprecated global does not exist.") if _G[replacement_global_name] == nil then - print('warn_deprecated_functions: Warning, replacement global "'..replacement_global_name..'" does not exists.') + minetest.log('warning', string.format( + 'Replacement global "%s" does not exists.', replacement_global_name)) return end local meta = { @@ -44,15 +46,19 @@ function deprecated_global_table(deprecated_global_name, replacement_global_name __index = function(table, key) local meta = getmetatable(table) local dbg = debug.getinfo(2, "lS") - minetest.log("warning", string.format('Warning: Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', - meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), (dbg.currentline or 0))) + minetest.log("warning", string.format( + 'Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', + meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), + (dbg.currentline or 0))) return _G[meta.replacement][key] end, __newindex = function(table, key, value) local meta = getmetatable(table) local dbg = debug.getinfo(2, "lS") - minetest.log("warning", string.format('Warning: Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', - meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), (dbg.currentline or 0))) + minetest.log("warning", string.format( + 'Accessing deprecated "%s" table, "%s" should be used instead (%s:%d).', + meta.deprecated, meta.replacement, (dbg.short_src or 'unknown'), + (dbg.currentline or 0))) _G[meta.replacement][key]=value end, } -- cgit v1.2.3 From 4e9af449ffb6f8205461c8da12cc8cff91a9748d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Rollo Date: Thu, 14 Mar 2019 09:48:27 +0100 Subject: Fixed API documentation (height replaced by top) --- API.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/API.md b/API.md index acfd867..2dfff21 100644 --- a/API.md +++ b/API.md @@ -47,9 +47,9 @@ This is a helper to register entities used for display. ### Display_entities fields `on_display_update` is a callback in charge of setting up entity texture. If not set, entity will have no texture and will be displayed as unknown item.\ -`depth`, `right` and `height`: Entity position regarding to node facedir/wallmounted main axis.\ +`depth`, `right` and `top`: Entity position regarding to node facedir/wallmounted main axis.\ Values for these fields can be any number between -1.5 and 1.5 (default value is 0). Position 0,0,0 is the center of the node.\ -`depth` goes from front (-0.5) to rear (0.5), `height` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5).\ +`depth` goes from front (-0.5) to rear (0.5), `top` goes from bottom (-0.5) to top (0.5) and `right` goes from left (-0.5) to right (0.5).\ `yaw`: Entity yaw in radians, regarding to main axis. Default is 0, aligned to node face. In order to avoid flickering text, it's better to have text a little behind node surface. A good spacing value is given by `display_api.entity_spacing` variable. @@ -80,7 +80,7 @@ In order to avoid flickering text, it's better to have text a little behind node depth = 0.3, on_display_update = my_display_update1 }, ["mymod:entity1"] = { - depth = 0.2, height = 0.1, + depth = 0.2, top = 0.1, on_display_update = my_display_update2 }, }, ... -- cgit v1.2.3 From 09974f0c9070b6bbe474cb22444368d7d1d453fb Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Mon, 23 Dec 2019 22:04:02 -0500 Subject: Add nil check for node def --- display.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/display.lua b/display.lua index 2fed40f..6994e4e 100644 --- a/display.lua +++ b/display.lua @@ -162,6 +162,9 @@ function display_api.update_entities(pos) local node = minetest.get_node(pos) local ndef = minetest.registered_nodes[node.name] local ov = get_orientation_values(node) + if not ndef or not ov then + return + end for _, objref in pairs(get_display_objrefs(pos, true)) do local edef = ndef.display_entities[objref:get_luaentity().name] @@ -283,6 +286,9 @@ end function display_api.on_rotate(pos, node, user, _, new_param2) node.param2 = new_param2 local ov = get_orientation_values(node) + if not ov then + return + end if ov.restricted or not display_api.is_rotation_restricted() then minetest.swap_node(pos, node) -- cgit v1.2.3 From 3a43e4ad81dc6595fabfa22c88e229c393f93529 Mon Sep 17 00:00:00 2001 From: coil <51716565+coil0@users.noreply.github.com> Date: Mon, 23 Dec 2019 23:55:25 -0500 Subject: Add missing entries to wallmounted_rotations --- display.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/display.lua b/display.lua index 6994e4e..fa7c854 100644 --- a/display.lua +++ b/display.lua @@ -29,6 +29,7 @@ local wallmounted_rotations = { [0]={x=1, y=0, z=0}, [1]={x=3, y=0, z=0}, [2]={x=0, y=3, z=0}, [3]={x=0, y=1, z=0}, [4]={x=0, y=0, z=0}, [5]={x=0, y=2, z=0}, + [6]={x=1, y=0, z=0}, [7]={x=1, y=1, z=1}, } local facedir_rotations = { -- cgit v1.2.3