Clear up some todo items

This commit is contained in:
Aaron Suen 2022-11-05 11:50:26 -04:00
parent 660a1880c6
commit 83ec874634
2 changed files with 27 additions and 24 deletions

16
TODO
View File

@ -1,24 +1,14 @@
------------------------------------------------------------------------
- szutil_cinecam
- Priv and/or API to hide player from rotation
- Add slight facedir bias (smaller than chase-velocity bias)
- Need ability to control player cycling
- Priv just lets you configure match list
- Match list applies rules for matching players
- * wildcard
- !filter to exclude players matching filter
- admin priv to externally control filters
- optional sprite visual for camera position to show other players?
- use entity attachments instead of relying on fly priv
- clear darken/vignette HUDs if player is removed from cycling
- configurability via settings w/ live updates
- remote control of FOV?
- settingtypes.txt for all mods
- Player cleanup mod
- Remove players after N days absent
- Only if no new privs granted
- Configurable set of ignored privs
- Delayed privileges mod
- Countdown modes:
- Always-running countdown

View File

@ -1,6 +1,6 @@
-- LUALOCALS < ---------------------------------------------------------
local ipairs, math, minetest, pairs, tonumber, type
= ipairs, math, minetest, pairs, tonumber, type
local ipairs, math, minetest, pairs, rawget, rawset, tonumber, type
= ipairs, math, minetest, pairs, rawget, rawset, tonumber, type
local math_atan2, math_ceil, math_cos, math_pi, math_random, math_sin,
math_sqrt
= math.atan2, math.ceil, math.cos, math.pi, math.random, math.sin,
@ -9,6 +9,9 @@ local math_atan2, math_ceil, math_cos, math_pi, math_random, math_sin,
local modname = minetest.get_current_modname()
local api = rawget(_G, modname) or {}
rawset(_G, modname, api)
local defaults = {
cycletime = 20, -- time between cycles
hudtime = 4, -- duration to display HUD
@ -227,6 +230,19 @@ local function camdummy(player, data, dtime)
data.dummycam = config.cycletime
end
function api.get_watchable_player_names()
local names = {}
for _, p in ipairs(minetest.get_connected_players()) do
local n = p:get_player_name()
local props = p:get_properties()
local vs = props and props.visual_size
if vs and vs.x > 0 and vs.y > 0 then
names[n] = true
end
end
return names
end
local function camcheck(player, dtime)
local data = getdata(player)
@ -268,15 +284,12 @@ local function camcheck(player, dtime)
if not (data.queue and #data.queue > 0) then
local q = {}
local pname = player:get_player_name()
for _, p in ipairs(minetest.get_connected_players()) do
local n = p:get_player_name()
if n ~= pname then
local props = p:get_properties()
local vs = props and props.visual_size
if vs and vs.x > 0 and vs.y > 0 then
q[#q + 1] = n
end
end
for n in pairs(api.get_watchable_player_names()) do
if n ~= pname then q[#q + 1] = n end
end
for i = #q, 2, -1 do
local j = math_random(1, i)
q[i], q[j] = q[j], q[i]
end
if #q < 1 then return camdummy(player, data, dtime) end
data.queue = q