I suspiciously f****d up last commit so theres second part of the previous one
This commit is contained in:
parent
cbeab46431
commit
1622e5cd6d
1
mods/amogus_blocks/mod.conf
Normal file
1
mods/amogus_blocks/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_blocks
|
1
mods/amogus_craftings/mod.conf
Normal file
1
mods/amogus_craftings/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_craftings
|
@ -92,22 +92,22 @@ local entity = {
|
|||||||
-- play sus sound randomly with different pitch depending on situation
|
-- play sus sound randomly with different pitch depending on situation
|
||||||
|
|
||||||
if self.mode == 0 or self.mode == 1 then -- stand still or walk
|
if self.mode == 0 or self.mode == 1 then -- stand still or walk
|
||||||
sound_pitch = 0.8
|
self.sound_pitch = 0.8
|
||||||
sound_propability = 100
|
self.sound_propability = 100
|
||||||
|
|
||||||
else -- chase (2)
|
else -- chase (2)
|
||||||
sound_pitch = 1.2
|
self.sound_pitch = 1.2
|
||||||
sound_propability = 50
|
self.sound_propability = 50
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if math.random(sound_propability) == 1 then
|
if math.random(self.sound_propability) == 1 then
|
||||||
amogus_general.play_random_sound(
|
amogus_general.play_random_sound(
|
||||||
"sus_sound",
|
"sus_sound",
|
||||||
self.object:get_pos(),
|
self.object:get_pos(),
|
||||||
1.0, -- gain
|
1.0, -- gain
|
||||||
40, -- max_hear_distance
|
40, -- max_hear_distance
|
||||||
sound_pitch -- pitch
|
self.sound_pitch -- pitch
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
1
mods/amogus_entities/mod.conf
Normal file
1
mods/amogus_entities/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_entities
|
1
mods/amogus_general/mod.conf
Normal file
1
mods/amogus_general/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_general
|
@ -2,6 +2,11 @@
|
|||||||
minetest.register_alias("mapgen_stone", "amogus_blocks:stone")
|
minetest.register_alias("mapgen_stone", "amogus_blocks:stone")
|
||||||
minetest.register_alias("mapgen_dirt", "amogus_blocks:dirt")
|
minetest.register_alias("mapgen_dirt", "amogus_blocks:dirt")
|
||||||
minetest.register_alias("mapgen_water_source", "amogus_blocks:water_source")
|
minetest.register_alias("mapgen_water_source", "amogus_blocks:water_source")
|
||||||
|
minetest.register_alias("mapgen_river_water_source", "amogus_blocks:water_source")
|
||||||
|
|
||||||
|
-- I need to register alias of amogus_blocks:water that doesn't even exist in any of the mods to air because Minetest is f****d up and tries to use "water" by default
|
||||||
|
minetest.register_alias("amogus_blocks:water", "air")
|
||||||
|
|
||||||
|
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "amogus_beach",
|
name = "amogus_beach",
|
||||||
@ -11,10 +16,7 @@ minetest.register_biome({
|
|||||||
depth_filler = 3,
|
depth_filler = 3,
|
||||||
node_stone = "amogus_blocks:stone",
|
node_stone = "amogus_blocks:stone",
|
||||||
|
|
||||||
--node_water_top = "amogus_blocks:water",
|
node_water = "amogus_blocks:water_source",
|
||||||
--depth_water_top = 1,
|
|
||||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
|
||||||
--node_river_water = "amogus_blocks:water",
|
|
||||||
|
|
||||||
y_max = 6,
|
y_max = 6,
|
||||||
y_min = -5,
|
y_min = -5,
|
||||||
@ -23,17 +25,13 @@ minetest.register_biome({
|
|||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "amogus_green_biome",
|
name = "amogus_green_biome",
|
||||||
--node_dust = "amogus_blocks:stone",
|
|
||||||
node_top = "amogus_blocks:grass_green",
|
node_top = "amogus_blocks:grass_green",
|
||||||
depth_top = 1,
|
depth_top = 1,
|
||||||
node_filler = "amogus_blocks:dirt",
|
node_filler = "amogus_blocks:dirt",
|
||||||
depth_filler = 1,
|
depth_filler = 1,
|
||||||
node_stone = "amogus_blocks:stone",
|
node_stone = "amogus_blocks:stone",
|
||||||
|
|
||||||
--node_water_top = "amogus_blocks:water",
|
node_water = "amogus_blocks:water_source",
|
||||||
--depth_water_top = 1,
|
|
||||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
|
||||||
--node_river_water = "amogus_blocks:water",
|
|
||||||
|
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
@ -42,17 +40,13 @@ minetest.register_biome({
|
|||||||
})
|
})
|
||||||
minetest.register_biome({
|
minetest.register_biome({
|
||||||
name = "amogus_biome",
|
name = "amogus_biome",
|
||||||
--node_dust = "amogus_blocks:stone",
|
|
||||||
node_top = "amogus_blocks:grass",
|
node_top = "amogus_blocks:grass",
|
||||||
depth_top = 1,
|
depth_top = 1,
|
||||||
node_filler = "amogus_blocks:dirt",
|
node_filler = "amogus_blocks:dirt",
|
||||||
depth_filler = 1,
|
depth_filler = 1,
|
||||||
node_stone = "amogus_blocks:stone",
|
node_stone = "amogus_blocks:stone",
|
||||||
|
|
||||||
--node_water_top = "amogus_blocks:water",
|
node_water = "amogus_blocks:water_source",
|
||||||
--depth_water_top = 1,
|
|
||||||
node_water = "amogus_blocks:amogus_blocks:water_source",
|
|
||||||
--node_river_water = "amogus_blocks:water",
|
|
||||||
|
|
||||||
y_max = 31000,
|
y_max = 31000,
|
||||||
y_min = 1,
|
y_min = 1,
|
||||||
@ -452,39 +446,11 @@ minetest.register_decoration({
|
|||||||
flags = "place_center_x, place_center_z",
|
flags = "place_center_x, place_center_z",
|
||||||
rotation = "random",
|
rotation = "random",
|
||||||
})
|
})
|
||||||
--minetest.register_abm({
|
|
||||||
-- label = "Spawn random entities",
|
|
||||||
-- nodenames = {"group:soil", "group:crumbly", "group:choppy", "group:snappy", "group:cracky"},
|
|
||||||
-- interval = 15,
|
|
||||||
-- chance = 50,
|
|
||||||
-- action = function(pos)
|
|
||||||
-- local r = math.random(1, 500)
|
|
||||||
-- if r <= 50 then
|
|
||||||
-- minetest.add_entity({x = pos.x + math.random(-10, 10),
|
|
||||||
-- y = pos.y + 1,
|
|
||||||
-- z = pos.z + math.random(-10, 10)}, "amogus_entities:amogus")
|
|
||||||
-- minetest.sound_play("amogus_sound", {
|
|
||||||
-- pos = pos,
|
|
||||||
-- gain = 1.0,
|
|
||||||
-- max_hear_distance = 5
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
--})
|
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
--local is_newchunk = true
|
for i = 1, math.random(10, 25) do
|
||||||
--for , pos in ipairs(minetest.find_nodes_in_area(minp, maxp, "mymod:amogus_spawner")) do
|
minetest.add_entity({x = minp.x + math.random(16), y = minp.y + 1, z = minp.z + math.random(16)}, "amogus_entities:amogus")
|
||||||
--is_new_chunk = false
|
end
|
||||||
-- break
|
|
||||||
--end
|
|
||||||
--if is_new_chunk then
|
|
||||||
for i = 1, math.random(10, 25) do
|
|
||||||
minetest.add_entity({x = minp.x + math.random(16), y = minp.y + 1, z = minp.z + math.random(16)}, "amogus_entities:amogus")
|
|
||||||
--minetest.sound_play("amogus_sound", { pos = pos,gain = 1.0,max_hear_distance = 5})
|
|
||||||
end
|
|
||||||
--end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
@ -536,50 +502,40 @@ minetest.register_decoration({
|
|||||||
|
|
||||||
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STATUE_GIANT.mts",
|
schematic = minetest.get_modpath("amogus_generator") .. "/schematics/STATUE_GIANT.mts",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- DEBUG
|
||||||
|
--imposters_spawned = 0
|
||||||
|
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
label = "Spawn Imposter",
|
label = "Spawn Imposter",
|
||||||
nodenames = {"air"},
|
nodenames = {"air"},
|
||||||
neighbors = {"group:stone"},
|
neighbors = {"group:stone"},
|
||||||
interval = 5,
|
interval = 10,
|
||||||
chance = 500,
|
chance = 200,
|
||||||
action = function(pos)
|
action = function(pos)
|
||||||
-- avoid spawning inside liquids
|
-- DEBUG
|
||||||
if minetest.registered_nodes[minetest.get_node(pos).name].liquidtype == "none" then
|
--imposters_spawned = imposters_spawned + 1
|
||||||
|
--minetest.chat_send_all("Imposters spawned: " .. imposters_spawned)
|
||||||
|
|
||||||
local light = minetest.get_node_light(pos)
|
-- only spawn on solid blocks AND in the dark
|
||||||
local time = minetest.get_timeofday()
|
if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name].walkable and minetest.get_node_light(pos) <= 12 then
|
||||||
if light <= 12 and time >= 0.2 and time <= 0.8 then
|
-- do not spawn if there is already an sussy imposter nearby
|
||||||
local entities = minetest.get_objects_inside_radius(pos, 20)
|
local nearby_entities = minetest.get_objects_inside_radius(pos, 10)
|
||||||
local bat_count = 0
|
local imposter_nearby = false
|
||||||
for _, entity in pairs(entities) do
|
|
||||||
-- get name while handling .name indexing error caused by get_luaentity() returning nil
|
|
||||||
-- i cant use get_entity_name() because its deprecated and spams logs
|
|
||||||
local name = entity:get_luaentity() and entity:get_luaentity().name or ""
|
|
||||||
|
|
||||||
if name == "amogus_entities:sussy_imposter" then
|
for _, entity in pairs(nearby_entities) do
|
||||||
bat_count = bat_count + 1
|
if (entity:get_luaentity() and entity:get_luaentity().name or "") == "amogus_entities:sussy_imposter" then
|
||||||
if bat_count >= 3 then
|
imposter_nearby = true
|
||||||
return
|
break
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if not imposter_nearby then
|
||||||
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
minetest.add_entity(pos, "amogus_entities:sussy_imposter")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- wtf is this??
|
|
||||||
--minetest.register_on_generated(function(minp, maxp, seed)
|
|
||||||
-- for x = minp.x, maxp.x do
|
|
||||||
-- for y = minp.y, maxp.y do
|
|
||||||
-- for z = minp.z, maxp.z do
|
|
||||||
-- local p = {x=x, y=y, z=z}
|
|
||||||
-- if minetest.get_node(p).name == "default:water_source" then
|
|
||||||
-- minetest.set_node(p, {name="default:water_source", param2=0})
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end
|
|
||||||
-- end)
|
|
1
mods/amogus_generator/mod.conf
Normal file
1
mods/amogus_generator/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_generator
|
1
mods/amogus_items/mod.conf
Normal file
1
mods/amogus_items/mod.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
name = amogus_items
|
Loading…
x
Reference in New Issue
Block a user