Differences From
Artifact [913cc0d6da]:
41 41
42 42 {'top', 'sorcery:mill', 'output'};
43 43 {'side', 'sorcery:mill', 'grinder'};
44 44 {'bottom', 'sorcery:mill', 'input'};
45 45
46 46 {'bottom', 'sorcery:harvester', 'charge'};
47 47 -- output handled on our side
48 +
49 + {'bottom', 'sorcery:runeforge', 'amulet'};
50 + -- output handled on our side
48 51 }
49 52 end
53 +
54 +if minetest.get_modpath('mtg_craftguide') and minetest.get_modpath('sfinv') then
55 +-- the craft guide is handy, but not only is it glitched to the point of enabling
56 +-- trivial denial of service attacks against a server, it breaks some of the most
57 +-- basic mechanics of the sorcery mod. we disable it except for players with a
58 +-- specific debugging privilege. i suppose we could also add a 'potion of
59 +-- omniscience' that allows brief access, but i'm disinclined to; it feels gross.
60 + local pg = sfinv.pages['mtg_craftguide:craftguide']
61 + local cb = pg.is_in_nav
62 + -- currently this isn't used by mtgcg, but doing this gives us some future-
63 + -- proofing, and keeps us from fucking up any competing access control that
64 + -- might be in use.
65 + pg.is_in_nav = function(self,player, ...)
66 + -- unfortunately, this is a purely cosmetic "access control" mechanism;
67 + -- sfinv doesn't actually check if a page is available to a player before
68 + -- showing it to them. ironic, given how the author specifically warns
69 + -- people in his modding tutorial that the client can submit any form it
70 + -- wants at any time… 🙄
71 + if not minetest.check_player_privs(player, 'sorcery:omniscience') then
72 + return false
73 + end
74 + if cb
75 + then return cb(self,player,...)
76 + else return true
77 + end
78 + end
79 +end