winnie/init.lua

75 lines
1.7 KiB
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

winnie_sounds = {
"da_pi_bi_sai",
"man_lian_shi_fen",
"na_mian_bao_wei_gou",
"po_lan_zhuang_kuo",
"qian_mie_zhan",
"sa_hu_jiao_mian",
"ti_ba",
"xi_shen_zhi_di",
"jian_de_wo_man_lian_pen_fen_na_man_lian_shi_fen",
"bie_kan_ni_jin_tian_nao_de_huan_xiao_xin_a_jin_hou_la_qing_dan",
"po_ji",
"cong_lin_fa_ze",
"qing_guan_yi_dao_tong_shang_kuan_yi",
}
winnie_words = {
"大庇闭塞sai",
"满脸是粪",
"拿面包喂狗",
"波(泼)澜壮阔",
"歼(千)灭战",
"撒胡椒面",
"堤(提)坝",
"栖(西)身之地",
"溅得我满脸喷粪呐,满脸是粪",
"别看你今天闹得欢,小心啊,今后拉清单!",
"波(泼)及(鸡)",
"丛(葱)林法则",
"轻关易道,通商宽农(衣)"
}
minetest.register_node("winnie:winnie_block",{
description = "Winnie Block",
tiles = {"wn.png"},
groups = {snappy=0,choppy=0,oddly_breakable_by_hand=2},
})
minetest.register_craft({
output = 'winnie:winnie_block',
recipe = {
{'dye:yellow','dye:yellow','dye:yellow'},
{'dye:red','default:wood','dye:red'},
{'dye:yellow','dye:yellow','dye:yellow'},
}
})
minetest.register_on_punchnode(function(pos,node,puncher,pointed_thing)
if node.name == "winnie:winnie_block" then
local n = puncher:get_player_name()
--[[
for x,y in pairs(pos) do
minetest.log(x .. "=" .. y)
end
--]]
local p = pos
num = math.random(1,tonumber(table.getn(winnie_sounds)))
minetest.sound_play(winnie_sounds[num],{
pos = p,
max_hear_distance = 50,
gain = 2,
})
minetest.chat_send_player(n,winnie_words[num])
end
end)