init.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. winnie_sounds = {
  2. "da_pi_bi_sai",
  3. "man_lian_shi_fen",
  4. "na_mian_bao_wei_gou",
  5. "po_lan_zhuang_kuo",
  6. "qian_mie_zhan",
  7. "sa_hu_jiao_mian",
  8. "ti_ba",
  9. "xi_shen_zhi_di",
  10. "jian_de_wo_man_lian_pen_fen_na_man_lian_shi_fen",
  11. "bie_kan_ni_jin_tian_nao_de_huan_xiao_xin_a_jin_hou_la_qing_dan",
  12. "po_ji",
  13. "cong_lin_fa_ze",
  14. "qing_guan_yi_dao_tong_shang_kuan_yi",
  15. }
  16. winnie_words = {
  17. "大庇(屁)闭塞(sai)",
  18. "满脸是粪",
  19. "拿面包喂狗",
  20. "波(泼)澜壮阔",
  21. "歼(千)灭战",
  22. "撒胡椒面",
  23. "堤(提)坝",
  24. "栖(西)身之地",
  25. "溅得我满脸喷粪呐,满脸是粪",
  26. "别看你今天闹得欢,小心啊,今后拉清单!",
  27. "波(泼)及(鸡)",
  28. "丛(葱)林法则",
  29. "轻关易道,通商宽农(衣)"
  30. }
  31. minetest.register_node("winnie:winnie_block",{
  32. description = "Winnie Block",
  33. tiles = {"wn.png"},
  34. groups = {snappy=0,choppy=0,oddly_breakable_by_hand=2},
  35. })
  36. minetest.register_craft({
  37. output = 'winnie:winnie_block',
  38. recipe = {
  39. {'dye:yellow','dye:yellow','dye:yellow'},
  40. {'dye:red','default:wood','dye:red'},
  41. {'dye:yellow','dye:yellow','dye:yellow'},
  42. }
  43. })
  44. minetest.register_on_punchnode(function(pos,node,puncher,pointed_thing)
  45. if node.name == "winnie:winnie_block" then
  46. local n = puncher:get_player_name()
  47. --[[
  48. for x,y in pairs(pos) do
  49. minetest.log(x .. "=" .. y)
  50. end
  51. --]]
  52. local p = pos
  53. num = math.random(1,tonumber(table.getn(winnie_sounds)))
  54. minetest.sound_play(winnie_sounds[num],{
  55. pos = p,
  56. max_hear_distance = 50,
  57. gain = 2,
  58. })
  59. minetest.chat_send_player(n,winnie_words[num])
  60. end
  61. end)