1
0
Fork 0

Fix indentation

This commit is contained in:
cora 2022-10-09 18:01:30 +02:00 committed by Gitea
parent af8b1baba5
commit ddd39b553d
1 changed files with 209 additions and 209 deletions

View File

@ -30,64 +30,64 @@ for i=1,4 do
end end
mcl_mobs:register_mob("mobs_mc:glow_squid", { mcl_mobs:register_mob("mobs_mc:glow_squid", {
type = "animal", type = "animal",
spawn_class = "water", spawn_class = "water",
can_despawn = true, can_despawn = true,
passive = true, passive = true,
hp_min = 10, hp_min = 10,
hp_max = 10, hp_max = 10,
xp_min = 1, xp_min = 1,
xp_max = 3, xp_max = 3,
armor = 100, armor = 100,
rotate = 0, rotate = 0,
-- tilt_swim breaks the animations. -- tilt_swim breaks the animations.
--tilt_swim = true, --tilt_swim = true,
-- FIXME: If the qlow squid is near the floor, it turns black -- FIXME: If the qlow squid is near the floor, it turns black
collisionbox = { -0.4, 0.0, -0.4, 0.4, 0.9, 0.4 }, collisionbox = { -0.4, 0.0, -0.4, 0.4, 0.9, 0.4 },
visual = "mesh", visual = "mesh",
mesh = "extra_mobs_glow_squid.b3d", mesh = "extra_mobs_glow_squid.b3d",
textures = { textures = {
{ "extra_mobs_glow_squid.png" } { "extra_mobs_glow_squid.png" }
}, },
sounds = { sounds = {
damage = { name = "mobs_mc_squid_hurt", gain = 0.3 }, damage = { name = "mobs_mc_squid_hurt", gain = 0.3 },
death = { name = "mobs_mc_squid_death", gain = 0.4 }, death = { name = "mobs_mc_squid_death", gain = 0.4 },
flop = "mobs_mc_squid_flop", flop = "mobs_mc_squid_flop",
distance = 16, distance = 16,
}, },
animation = { animation = {
stand_start = 1, stand_start = 1,
stand_end = 60, stand_end = 60,
walk_start = 1, walk_start = 1,
walk_end = 60, walk_end = 60,
run_start = 1, run_start = 1,
run_end = 60, run_end = 60,
}, },
drops = { drops = {
{ name = "mobs_mc:glow_ink_sac", { name = "mobs_mc:glow_ink_sac",
chance = 1, chance = 1,
min = 1, min = 1,
max = 3, max = 3,
looting = "common", }, looting = "common", },
}, },
visual_size = { x = 3, y = 3 }, visual_size = { x = 3, y = 3 },
makes_footstep_sound = false, makes_footstep_sound = false,
swim = true, swim = true,
breathes_in_water = true, breathes_in_water = true,
jump = false, jump = false,
view_range = 16, view_range = 16,
runaway = true, runaway = true,
fear_height = 4, fear_height = 4,
fly = true, fly = true,
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" }, fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
-- don't add "mcl_core:water_flowing", or it won't move vertically. -- don't add "mcl_core:water_flowing", or it won't move vertically.
glow = minetest.LIGHT_MAX, glow = minetest.LIGHT_MAX,
do_custom = function(self, dtime) do_custom = function(self, dtime)
if not self.particlespawners then self.particlespawners = {} end if not self.particlespawners then self.particlespawners = {} end
local pos = self.object:get_pos() local pos = self.object:get_pos()
for _,p in pairs(minetest.get_connected_players()) do for _,p in pairs(minetest.get_connected_players()) do
if vector.distance(pos,p:get_pos()) < 150 and not self.particlespawners[p] then if vector.distance(pos,p:get_pos()) < 150 and not self.particlespawners[p] then
self.particlespawners[p] = {} self.particlespawners[p] = {}
for _,psdef in pairs(psdefs) do for _,psdef in pairs(psdefs) do
@ -101,165 +101,165 @@ mcl_mobs:register_mob("mobs_mc:glow_squid", {
end end
self.particlespawners[p] = nil self.particlespawners[p] = nil
end end
end end
end end
}) })
-- spawning -- spawning
local water = mobs_mc.water_level - 1 local water = mobs_mc.water_level - 1
-- local water = mobs_mc.spawn_height.water + 1 -- local water = mobs_mc.spawn_height.water + 1
mcl_mobs:spawn_specific( mcl_mobs:spawn_specific(
"mobs_mc:glow_squid", "mobs_mc:glow_squid",
"overworld", "overworld",
"water", "water",
{ {
"Mesa", "Mesa",
"FlowerForest", "FlowerForest",
"Swampland", "Swampland",
"Taiga", "Taiga",
"ExtremeHills", "ExtremeHills",
"Jungle", "Jungle",
"Savanna", "Savanna",
"BirchForest", "BirchForest",
"MegaSpruceTaiga", "MegaSpruceTaiga",
"MegaTaiga", "MegaTaiga",
"ExtremeHills+", "ExtremeHills+",
"Forest", "Forest",
"Plains", "Plains",
"Desert", "Desert",
"ColdTaiga", "ColdTaiga",
"MushroomIsland", "MushroomIsland",
"IcePlainsSpikes", "IcePlainsSpikes",
"SunflowerPlains", "SunflowerPlains",
"IcePlains", "IcePlains",
"RoofedForest", "RoofedForest",
"ExtremeHills+_snowtop", "ExtremeHills+_snowtop",
"MesaPlateauFM_grasstop", "MesaPlateauFM_grasstop",
"JungleEdgeM", "JungleEdgeM",
"ExtremeHillsM", "ExtremeHillsM",
"JungleM", "JungleM",
"BirchForestM", "BirchForestM",
"MesaPlateauF", "MesaPlateauF",
"MesaPlateauFM", "MesaPlateauFM",
"MesaPlateauF_grasstop", "MesaPlateauF_grasstop",
"MesaBryce", "MesaBryce",
"JungleEdge", "JungleEdge",
"SavannaM", "SavannaM",
"FlowerForest_beach", "FlowerForest_beach",
"Forest_beach", "Forest_beach",
"StoneBeach", "StoneBeach",
"ColdTaiga_beach_water", "ColdTaiga_beach_water",
"Taiga_beach", "Taiga_beach",
"Savanna_beach", "Savanna_beach",
"Plains_beach", "Plains_beach",
"ExtremeHills_beach", "ExtremeHills_beach",
"ColdTaiga_beach", "ColdTaiga_beach",
"Swampland_shore", "Swampland_shore",
"MushroomIslandShore", "MushroomIslandShore",
"JungleM_shore", "JungleM_shore",
"Jungle_shore", "Jungle_shore",
"MesaPlateauFM_sandlevel", "MesaPlateauFM_sandlevel",
"MesaPlateauF_sandlevel", "MesaPlateauF_sandlevel",
"MesaBryce_sandlevel", "MesaBryce_sandlevel",
"Mesa_sandlevel", "Mesa_sandlevel",
"RoofedForest_ocean", "RoofedForest_ocean",
"JungleEdgeM_ocean", "JungleEdgeM_ocean",
"BirchForestM_ocean", "BirchForestM_ocean",
"BirchForest_ocean", "BirchForest_ocean",
"IcePlains_deep_ocean", "IcePlains_deep_ocean",
"Jungle_deep_ocean", "Jungle_deep_ocean",
"Savanna_ocean", "Savanna_ocean",
"MesaPlateauF_ocean", "MesaPlateauF_ocean",
"ExtremeHillsM_deep_ocean", "ExtremeHillsM_deep_ocean",
"Savanna_deep_ocean", "Savanna_deep_ocean",
"SunflowerPlains_ocean", "SunflowerPlains_ocean",
"Swampland_deep_ocean", "Swampland_deep_ocean",
"Swampland_ocean", "Swampland_ocean",
"MegaSpruceTaiga_deep_ocean", "MegaSpruceTaiga_deep_ocean",
"ExtremeHillsM_ocean", "ExtremeHillsM_ocean",
"JungleEdgeM_deep_ocean", "JungleEdgeM_deep_ocean",
"SunflowerPlains_deep_ocean", "SunflowerPlains_deep_ocean",
"BirchForest_deep_ocean", "BirchForest_deep_ocean",
"IcePlainsSpikes_ocean", "IcePlainsSpikes_ocean",
"Mesa_ocean", "Mesa_ocean",
"StoneBeach_ocean", "StoneBeach_ocean",
"Plains_deep_ocean", "Plains_deep_ocean",
"JungleEdge_deep_ocean", "JungleEdge_deep_ocean",
"SavannaM_deep_ocean", "SavannaM_deep_ocean",
"Desert_deep_ocean", "Desert_deep_ocean",
"Mesa_deep_ocean", "Mesa_deep_ocean",
"ColdTaiga_deep_ocean", "ColdTaiga_deep_ocean",
"Plains_ocean", "Plains_ocean",
"MesaPlateauFM_ocean", "MesaPlateauFM_ocean",
"Forest_deep_ocean", "Forest_deep_ocean",
"JungleM_deep_ocean", "JungleM_deep_ocean",
"FlowerForest_deep_ocean", "FlowerForest_deep_ocean",
"MushroomIsland_ocean", "MushroomIsland_ocean",
"MegaTaiga_ocean", "MegaTaiga_ocean",
"StoneBeach_deep_ocean", "StoneBeach_deep_ocean",
"IcePlainsSpikes_deep_ocean", "IcePlainsSpikes_deep_ocean",
"ColdTaiga_ocean", "ColdTaiga_ocean",
"SavannaM_ocean", "SavannaM_ocean",
"MesaPlateauF_deep_ocean", "MesaPlateauF_deep_ocean",
"MesaBryce_deep_ocean", "MesaBryce_deep_ocean",
"ExtremeHills+_deep_ocean", "ExtremeHills+_deep_ocean",
"ExtremeHills_ocean", "ExtremeHills_ocean",
"MushroomIsland_deep_ocean", "MushroomIsland_deep_ocean",
"Forest_ocean", "Forest_ocean",
"MegaTaiga_deep_ocean", "MegaTaiga_deep_ocean",
"JungleEdge_ocean", "JungleEdge_ocean",
"MesaBryce_ocean", "MesaBryce_ocean",
"MegaSpruceTaiga_ocean", "MegaSpruceTaiga_ocean",
"ExtremeHills+_ocean", "ExtremeHills+_ocean",
"Jungle_ocean", "Jungle_ocean",
"RoofedForest_deep_ocean", "RoofedForest_deep_ocean",
"IcePlains_ocean", "IcePlains_ocean",
"FlowerForest_ocean", "FlowerForest_ocean",
"ExtremeHills_deep_ocean", "ExtremeHills_deep_ocean",
"MesaPlateauFM_deep_ocean", "MesaPlateauFM_deep_ocean",
"Desert_ocean", "Desert_ocean",
"Taiga_ocean", "Taiga_ocean",
"BirchForestM_deep_ocean", "BirchForestM_deep_ocean",
"Taiga_deep_ocean", "Taiga_deep_ocean",
"JungleM_ocean", "JungleM_ocean",
"FlowerForest_underground", "FlowerForest_underground",
"JungleEdge_underground", "JungleEdge_underground",
"StoneBeach_underground", "StoneBeach_underground",
"MesaBryce_underground", "MesaBryce_underground",
"Mesa_underground", "Mesa_underground",
"RoofedForest_underground", "RoofedForest_underground",
"Jungle_underground", "Jungle_underground",
"Swampland_underground", "Swampland_underground",
"MushroomIsland_underground", "MushroomIsland_underground",
"BirchForest_underground", "BirchForest_underground",
"Plains_underground", "Plains_underground",
"MesaPlateauF_underground", "MesaPlateauF_underground",
"ExtremeHills_underground", "ExtremeHills_underground",
"MegaSpruceTaiga_underground", "MegaSpruceTaiga_underground",
"BirchForestM_underground", "BirchForestM_underground",
"SavannaM_underground", "SavannaM_underground",
"MesaPlateauFM_underground", "MesaPlateauFM_underground",
"Desert_underground", "Desert_underground",
"Savanna_underground", "Savanna_underground",
"Forest_underground", "Forest_underground",
"SunflowerPlains_underground", "SunflowerPlains_underground",
"ColdTaiga_underground", "ColdTaiga_underground",
"IcePlains_underground", "IcePlains_underground",
"IcePlainsSpikes_underground", "IcePlainsSpikes_underground",
"MegaTaiga_underground", "MegaTaiga_underground",
"Taiga_underground", "Taiga_underground",
"ExtremeHills+_underground", "ExtremeHills+_underground",
"JungleM_underground", "JungleM_underground",
"ExtremeHillsM_underground", "ExtremeHillsM_underground",
"JungleEdgeM_underground", "JungleEdgeM_underground",
}, },
0, 0,
minetest.LIGHT_MAX + 1, minetest.LIGHT_MAX + 1,
30, 30,
10000, 10000,
3, 3,
water - 16, water - 16,
water) water)
-- spawn egg -- spawn egg
mcl_mobs:register_egg("mobs_mc:glow_squid", S("Glow Squid"), "#0000FF", "#ffffff", 0) mcl_mobs:register_egg("mobs_mc:glow_squid", S("Glow Squid"), "#0000FF", "#ffffff", 0)