sorcery  Diff

Differences From Artifact [913cc0d6da]:

To Artifact [66e6db7c2d]:


41
42
43
44
45
46
47
48



49




























		{'top',    'sorcery:mill', 'output'};
		{'side',   'sorcery:mill', 'grinder'};
		{'bottom', 'sorcery:mill', 'input'};

		{'bottom', 'sorcery:harvester', 'charge'};
		-- output handled on our side
	}



end


































|
>
>
>

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

		{'top',    'sorcery:mill', 'output'};
		{'side',   'sorcery:mill', 'grinder'};
		{'bottom', 'sorcery:mill', 'input'};

		{'bottom', 'sorcery:harvester', 'charge'};
		-- output handled on our side

		{'bottom', 'sorcery:runeforge', 'amulet'};
		-- output handled on our side
	}
end

if minetest.get_modpath('mtg_craftguide') and minetest.get_modpath('sfinv') then
-- the craft guide is handy, but not only is it glitched to the point of enabling
-- trivial denial of service attacks against a server, it breaks some of the most
-- basic mechanics of the sorcery mod. we disable it except for players with a
-- specific debugging privilege. i suppose we could also add a 'potion of
-- omniscience' that allows brief access, but i'm disinclined to; it feels gross.
	local pg = sfinv.pages['mtg_craftguide:craftguide']
	local cb = pg.is_in_nav
	-- currently this isn't used by mtgcg, but doing this gives us some future-
	-- proofing, and keeps us from fucking up any competing access control that
	-- might be in use.
	pg.is_in_nav = function(self,player, ...)
		-- unfortunately, this is a purely cosmetic "access control" mechanism;
		-- sfinv doesn't actually check if a page is available to a player before
		-- showing it to them. ironic, given how the author specifically warns
		-- people in his modding tutorial that the client can submit any form it
		-- wants at any time… 🙄
		if not minetest.check_player_privs(player, 'sorcery:omniscience') then
			return false
		end
		if cb
			then return cb(self,player,...)
			else return true
		end
	end
end