mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-21 05:09:53 -03:00
Massive update (#6)
* Refactor some of the code, multiple bug fixes * Fix something stupid * More bug fixes * LOTS OF STUFF * Make the sniper alot stronger and other changes * Prevent Players from respawning in the middle of a match * Fix stupid mistake * Small update * More updates * Remove minimap access.. and downgrade the sniper class
This commit is contained in:
parent
6c26978752
commit
17eeae8937
499 changed files with 616 additions and 225 deletions
76
mods/misc/xcompat/src/commands.lua
Normal file
76
mods/misc/xcompat/src/commands.lua
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
local materials_list = minetest.get_dir_list(xcompat.modpath.."/src/materials", false)
|
||||
local materials = {}
|
||||
for _, material in ipairs(materials_list) do
|
||||
local gameid = material:sub(1, -5)
|
||||
materials[gameid] = dofile(xcompat.modpath.."/src/materials/"..material)
|
||||
end
|
||||
|
||||
local textures_list = minetest.get_dir_list(xcompat.modpath.."/src/textures", false)
|
||||
local textures = {}
|
||||
for _, texture in ipairs(textures_list) do
|
||||
local gameid = texture:sub(1, -5)
|
||||
textures[gameid] = dofile(xcompat.modpath.."/src/textures/"..texture)
|
||||
end
|
||||
|
||||
local sounds_list = minetest.get_dir_list(xcompat.modpath.."/src/sounds", false)
|
||||
local sounds = {}
|
||||
for _, sound in ipairs(sounds_list) do
|
||||
local gameid = sound:sub(1, -5)
|
||||
sounds[gameid] = dofile(xcompat.modpath.."/src/sounds/"..sound)
|
||||
end
|
||||
|
||||
minetest.register_chatcommand("xcompat_test_materials", {
|
||||
description = "Test materials",
|
||||
privs = {server=true},
|
||||
func = function(name, _)
|
||||
local reference_materials = materials["minetest"]
|
||||
|
||||
for gameid, game_materials in pairs(materials) do
|
||||
for material, _ in pairs(reference_materials) do
|
||||
if not game_materials[material] then
|
||||
minetest.chat_send_player(name, "Missing material: "..material.." in game: "..gameid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_player(name, "Materials test complete")
|
||||
end
|
||||
})
|
||||
|
||||
--WARNING: only handles top level of table currently
|
||||
--TODO: handle nested tables
|
||||
minetest.register_chatcommand("xcompat_test_textures", {
|
||||
description = "Test textures",
|
||||
privs = {server=true},
|
||||
func = function(name, _)
|
||||
local reference_textures = textures["xcompat_agnostic"]
|
||||
|
||||
for gameid, game_textures in pairs(textures) do
|
||||
for texture, _ in pairs(reference_textures) do
|
||||
if not game_textures[texture] then
|
||||
minetest.chat_send_player(name, "Missing texture: "..texture.." in game: "..gameid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_player(name, "Textures test complete")
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_chatcommand("xcompat_test_sounds", {
|
||||
description = "Test sounds",
|
||||
privs = {server=true},
|
||||
func = function(name, _)
|
||||
local reference_sounds = sounds["xcompat_agnostic"]
|
||||
|
||||
for gameid, game_sounds in pairs(sounds) do
|
||||
for sound, _ in pairs(reference_sounds) do
|
||||
if not game_sounds[sound] then
|
||||
minetest.chat_send_player(name, "Missing sound: "..sound.." in game: "..gameid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.chat_send_player(name, "Sounds test complete")
|
||||
end
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue