1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-06-28 14:16:06 +02:00

Chmod and removal of whitespaces

This commit is contained in:
LeMagnesium
2015-07-27 21:45:41 +02:00
parent 5357fc996b
commit f16915f863
23 changed files with 53 additions and 53 deletions

View File

@ -24,7 +24,7 @@ minetest.register_node("fishing:bobber_box", {
"fishing_bobber.png",
"fishing_bobber.png",
"fishing_bobber.png^[transformFX"
}, --
}, --
groups = {not_in_creative_inventory=1},
})

View File

@ -22,7 +22,7 @@ minetest.register_node("fishing:bobber_shark_box", {
"fishing_bobber_shark.png",
"fishing_bobber_shark.png",
"fishing_bobber_shark.png^[transformFX"
}, --
}, --
groups = {not_in_creative_inventory=1},
})
@ -42,7 +42,7 @@ local FISHING_BOBBER_SHARK_ENTITY={
baitball = 0,
prize = "",
bait = "",
-- DESTROY BOBBER WHEN PUNCHING IT
on_punch = function (self, puncher, time_from_last_punch, tool_capabilities, dir)
if not puncher:is_player() then return end
@ -60,8 +60,8 @@ local FISHING_BOBBER_SHARK_ENTITY={
minetest.sound_play("fishing_bobber1", { pos = self.object:getpos(), gain = 0.5, })
self.object:remove()
end,
-- WHEN RIGHTCLICKING THE BOBBER THE FOLLOWING HAPPENS (CLICK AT THE RIGHT TIME WHILE HOLDING A FISHING POLE)
on_rightclick = function (self, clicker)
local item = clicker:get_wielded_item()
@ -90,7 +90,7 @@ local FISHING_BOBBER_SHARK_ENTITY={
-- weither player has fishing pole or not
minetest.sound_play("fishing_bobber1", { pos = self.object:getpos(), gain = 0.5, })
self.object:remove()
elseif item_name == "fishing:baitball_shark" then
if not fishing_setting.is_creative_mode then
inv:remove_item("main", "fishing:baitball_shark")
@ -108,8 +108,8 @@ local FISHING_BOBBER_SHARK_ENTITY={
minetest.sound_play("fishing_baitball", {pos = self.object:getpos(), gain = 0.2, })
end
end,
-- AS SOON AS THE BOBBER IS PLACED IT WILL ACT LIKE
on_step = function(self, dtime)
local pos = self.object:getpos()
@ -131,12 +131,12 @@ local FISHING_BOBBER_SHARK_ENTITY={
self.object:remove()
return
end
--rotate bobber
if math.random(1, 4) == 1 then
self.object:setyaw(self.object:getyaw()+((math.random(0,360)-180)/2880*math.pi))
end
self.timer = self.timer + 1
if self.timer < self.randomtime then
-- if fish or others items, move bobber to simulate fish on the line
@ -151,9 +151,9 @@ local FISHING_BOBBER_SHARK_ENTITY={
self.old_pos2 = true
end
end
return
return
end
--change item on line
self.timer = 0
self.prize = ""
@ -164,7 +164,7 @@ local FISHING_BOBBER_SHARK_ENTITY={
self.randomtime = math.random(20,60)*10
return
end
self.randomtime = math.random(1,5)*10
local chance = math.random(1, 100)
--if 1 you catch a treasure, maybe ...
@ -182,7 +182,7 @@ local FISHING_BOBBER_SHARK_ENTITY={
self.prize = fishing_setting.prizes["plants"][math.random(1,#fishing_setting.prizes["plants"])]
end
end
if self.prize ~= "" then
pos.y = self.old_pos.y-0.2
self.object:moveto(pos, false)

View File

@ -15,7 +15,7 @@
-- Wood Fishing Pole
minetest.register_craft({
output = "fishing:pole_wood",
recipe = {
recipe = {
{"", "", "group:stick" },
{"", "group:stick", "farming:string" },
{"group:stick", "", "farming:string" },
@ -25,7 +25,7 @@ minetest.register_craft({
if minetest.get_modpath("moreblocks") ~= nil then
minetest.register_craft({
output = "fishing:pole_wood",
recipe = {
recipe = {
{"", "", "group:stick" },
{"", "group:stick", "moreblocks:rope" },
{"group:stick", "", "moreblocks:rope" },
@ -36,7 +36,7 @@ end
if minetest.get_modpath("ropes") ~= nil then
minetest.register_craft({
output = "fishing:pole_wood",
recipe = {
recipe = {
{"", "", "group:stick" },
{"", "group:stick", "ropes:rope" },
{"group:stick", "", "ropes:rope" },
@ -48,7 +48,7 @@ end
if minetest.get_modpath("moreores") ~= nil and minetest.get_modpath("mobs") ~= nil then
minetest.register_craft({
output = "fishing:pole_perfect",
recipe = {
recipe = {
{"", "", "moreores:mithril_ingot" },
{"", "moreores:mithril_ingot", "mobs:spider_cobweb" },
{"moreores:mithril_ingot", "", "mobs:spider_cobweb" },

View File

@ -24,7 +24,7 @@ fishing_setting.file_trophies = minetest.get_worldpath() .. "/fishing_trophies.t
fishing_setting.file_contest = minetest.get_worldpath() .. "/fishing_contest.txt"
fishing_setting.settings = {}
fishing_setting.contest = {}
--for random object
--for random object
random_objects = {}
fishing_setting.baits = {}
fishing_setting.hungry = {}
@ -43,7 +43,7 @@ dofile(path .."functions.lua")
--default_settings
fishing_setting.settings["message"] = MESSAGES
fishing_setting.settings["worm_is_mob"] = WORM_IS_MOB
fishing_setting.settings["worm_is_mob"] = WORM_IS_MOB
fishing_setting.settings["worm_chance"] = WORM_CHANCE
fishing_setting.settings["new_worm_source"] = NEW_WORM_SOURCE
fishing_setting.settings["wear_out"] = WEAR_OUT
@ -81,7 +81,7 @@ fishing_setting.func.load_contest()
minetest.register_globalstep(function(dtime)
if fishing_setting.contest["contest"] ~= nil and fishing_setting.contest["contest"] == true then
fishing_setting.contest["duration"] = fishing_setting.contest["duration"] - dtime
if fishing_setting.contest["duration"] < 30 and fishing_setting.contest["warning_said"] ~= true then
minetest.chat_send_all(fishing_setting.func.S("WARNING, Fishing contest will finish in 30 seconds."))
fishing_setting.contest["warning_said"] = true

View File

@ -12,7 +12,7 @@ minetest.register_node("fishing:material_info", {
is_ground_content = false,
sounds = default.node_sound_wood_defaults(),
on_rightclick = function(pos, _, clicker)
local formspec = "size[6,8]label[1.7,0;Fishing Info Center]"
local y = 1

View File

@ -35,7 +35,7 @@ local bobbermax = pole["bobber_max"]
--if contest then player must have only 2 boober
local bobber_nb = 0
local bobber_max
if fishing_setting.contest["contest"] ~= nil and fishing_setting.contest["contest"] == true then
if fishing_setting.contest["contest"] ~= nil and fishing_setting.contest["contest"] == true then
bobber_max = fishing_setting.contest["bobber_nb"]
else
bobber_max = bobbermax
@ -68,7 +68,7 @@ local bobbermax = pole["bobber_max"]
for _,k in pairs({ 1, 0, -1}) do
for _,l in pairs({ -1, 0, 1}) do
local node_name = minetest.get_node({x=pt.under.x+l, y=pt.under.y, z=pt.under.z+k}).name
if node and string.find(node_name, "water_source") ~= nil
if node and string.find(node_name, "water_source") ~= nil
and minetest.get_node({x=pt.under.x+l, y=pt.under.y+1, z=pt.under.z+k}).name == "air" then
local empty = true
for o, obj in pairs(bobbers) do

View File

@ -32,7 +32,7 @@ local stuff = {
{"shields", "shield_enhanced_cactus", "random", "a very old Shield."},
{"default", "sword_bronze", "random", "a very old Sword."},
{"default", "sword_mese", "random", "a very old Sword."},
{"default", "sword_nyan", "random", "a very old Sword."}
{"default", "sword_nyan", "random", "a very old Sword."}
}
fishing_setting.prizes["stuff"] = fishing_setting.func.ignore_mod(stuff)