parent
b4111166a1
commit
c80a417e73
|
@ -1,22 +0,0 @@
|
||||||
# Auto detect text files and perform LF normalization
|
|
||||||
* text=auto
|
|
||||||
|
|
||||||
# Custom for Visual Studio
|
|
||||||
*.cs diff=csharp
|
|
||||||
*.sln merge=union
|
|
||||||
*.csproj merge=union
|
|
||||||
*.vbproj merge=union
|
|
||||||
*.fsproj merge=union
|
|
||||||
*.dbproj merge=union
|
|
||||||
|
|
||||||
# Standard to msysgit
|
|
||||||
*.doc diff=astextplain
|
|
||||||
*.DOC diff=astextplain
|
|
||||||
*.docx diff=astextplain
|
|
||||||
*.DOCX diff=astextplain
|
|
||||||
*.dot diff=astextplain
|
|
||||||
*.DOT diff=astextplain
|
|
||||||
*.pdf diff=astextplain
|
|
||||||
*.PDF diff=astextplain
|
|
||||||
*.rtf diff=astextplain
|
|
||||||
*.RTF diff=astextplain
|
|
|
@ -1,43 +0,0 @@
|
||||||
# Windows image file caches
|
|
||||||
Thumbs.db
|
|
||||||
ehthumbs.db
|
|
||||||
|
|
||||||
# Folder config file
|
|
||||||
Desktop.ini
|
|
||||||
|
|
||||||
# Recycle Bin used on file shares
|
|
||||||
$RECYCLE.BIN/
|
|
||||||
|
|
||||||
# Windows Installer files
|
|
||||||
*.cab
|
|
||||||
*.msi
|
|
||||||
*.msm
|
|
||||||
*.msp
|
|
||||||
|
|
||||||
# =========================
|
|
||||||
# Operating System Files
|
|
||||||
# =========================
|
|
||||||
|
|
||||||
# OSX
|
|
||||||
# =========================
|
|
||||||
|
|
||||||
.DS_Store
|
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
|
||||||
Icon
|
|
||||||
|
|
||||||
# Thumbnails
|
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear on external disk
|
|
||||||
.Spotlight-V100
|
|
||||||
.Trashes
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
default
|
||||||
|
mobs?
|
|
@ -0,0 +1,86 @@
|
||||||
|
-- mobspawn v.0.8 by HeroOfTheWinds
|
||||||
|
-- WTFPL 2.0
|
||||||
|
-- Mod to add mob spawners to Minetest for Simple Mobs and Mobs_Redo (by PilzAdam and TenPlus1 respectively)
|
||||||
|
-- There are plans to add support for more mods...
|
||||||
|
|
||||||
|
local redo = false --Switch to determine if the mobs mod is TenPlus1's mobs_redo... DETERMINED AUTOMATICALLY
|
||||||
|
local SPAWN_INTERVAL = 30 --Rate at which mobs are spawned (in seconds)
|
||||||
|
local CHANCE = 1 --Chance of mob spawning at each interval. 1=always
|
||||||
|
local MAX_MOBS = 7 --Max number of mobs that can be in the vicinity of a spawner for a mob to spawn. If lag is a concern, keep to a low value. (A strong singleplayer PC can handle 10-20 though...)
|
||||||
|
|
||||||
|
--If the mod is "mobs", whose version is it?
|
||||||
|
if (minetest.get_modpath("mobs")) then
|
||||||
|
if mobs.mod == "redo" then
|
||||||
|
redo = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
mobspawn = {} --Container for whatever
|
||||||
|
|
||||||
|
mobspawn.mobs = {} --List to hold all registered mobs that are to be affected by this mod
|
||||||
|
mobspawn.mod = "" --What is the base mod?
|
||||||
|
|
||||||
|
if redo then
|
||||||
|
--List all the hostile mobs in Mobs Redo
|
||||||
|
mobspawn.mod = "mobs"
|
||||||
|
mobspawn.mobs = {
|
||||||
|
"dirt_monster",
|
||||||
|
"sand_monster",
|
||||||
|
"tree_monster",
|
||||||
|
"stone_monster",
|
||||||
|
"oerkki",
|
||||||
|
"dungeon_master",
|
||||||
|
"spider",
|
||||||
|
"lava_flan",
|
||||||
|
"mese_monster",
|
||||||
|
}
|
||||||
|
else
|
||||||
|
--List all the hostile mobs in Simple Mobs
|
||||||
|
mobspawn.mod = "mobs"
|
||||||
|
mobspawn.mobs = {
|
||||||
|
"dirt_monster",
|
||||||
|
"sand_monster",
|
||||||
|
"tree_monster",
|
||||||
|
"stone_monster",
|
||||||
|
"oerkki",
|
||||||
|
"dungeon_master",
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
--Create a spawner for each mob
|
||||||
|
for _,mob in pairs(mobspawn.mobs) do
|
||||||
|
minetest.register_node("mobspawn:"..mob.."_spawner", {
|
||||||
|
description = mob.." Spawner",
|
||||||
|
drawtype = "allfaces",
|
||||||
|
tiles = {"mobspawn_cage_top.png", "mobspawn_cage_bottom.png", "mobspawn_cage_side.png"},
|
||||||
|
is_ground_content = false,
|
||||||
|
groups = {cracky=1},
|
||||||
|
light_source = 3,
|
||||||
|
paramtype = "light",
|
||||||
|
use_texture_alpha = true,
|
||||||
|
sunlight_propagates = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
--The heart of the mod, the spawning function
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"mobspawn:"..mob.."_spawner"},
|
||||||
|
interval = SPAWN_INTERVAL,
|
||||||
|
chance = CHANCE,
|
||||||
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
|
--Randomize spawn location
|
||||||
|
local npos = {x=pos.x + math.random(-3,3), y=pos.y, z=pos.z + math.random(-3,3)}
|
||||||
|
--Make sure it's a sufficiently dark room
|
||||||
|
if (minetest.get_node_light(npos) < 9) then
|
||||||
|
local count = 0
|
||||||
|
--check how many mobs are nearby
|
||||||
|
for _,ent in pairs(minetest.get_objects_inside_radius(pos, 6)) do
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
if count < MAX_MOBS then
|
||||||
|
--Prepare for trouble (sorry, it won't be double... yet)
|
||||||
|
minetest.add_entity(npos, mobspawn.mod..":"..mob)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
|
@ -0,0 +1,19 @@
|
||||||
|
Sourcecode: WTFPL (see below)
|
||||||
|
Graphics: WTFPL (see below)
|
||||||
|
|
||||||
|
See also:
|
||||||
|
http://minetest.net/
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
Binary file not shown.
After Width: | Height: | Size: 301 B |
Binary file not shown.
After Width: | Height: | Size: 233 B |
Binary file not shown.
After Width: | Height: | Size: 251 B |
Loading…
Reference in New Issue