Module:Guidance
From the Audiovisual Identity Database, the motion graphics museum
Documentation for this module may be created at Module:Guidance/doc
local p = {} --p stands for package
rs = {}
rs[1] = "graphic violence or gore";
rs[2] = "[[:wikipedia:photosensitive epilepsy|flashing images]]";
rs[3] = "[[:wikipedia:jump scare|jump scares]]";
rs[4] = "sexual content";
rv = {};
rv[1] = "flashing"
rv[2] = "graphic"
rv[3] = "jumpscare"
rv[4] = "sexual"
function p.reasons(frame)
for i = 4,1,-1
do
if string.find(frame.args[1], rv[i]) then
if ro == nil then
ro = rs[i]
elseif string.find(ro,", and") then
ro = rs[i]..", "..ro
else
ro = rs[i]..", and "..ro
end
end
end
return ro
end
function p.warn1(frame)
if string.find(frame.args[1], rv[1] or rv[3]) then
rw1 = 1
end
return rw1
end
function p.warn2(frame)
if string.find(frame.args[1], rv[2] or rv[4]) then
rw2 = 1
end
return rw2
end
return p