Module:Activity

--[==[-- -- Lua script to get Character Activities --

Parameters: Numbered Parameters 1 .. n = Character Name + Activity (Format: Character$Activity) Named Parameters Boolean (true if present) collection = Numbered Parameters are Collection names icon = Include Owner-Character Icon notoken = do not include token drops trophy = Include trophy icon for trophy tasks wish = Include Wish icon for wishable tasks Text event = LTE short name type = output type blank = normal output trophy = trophy dropping tasks event = event (EC) tasks (only for 'event' if specified) anim = animated tasks character = Character Page tasks list(s) --]==]

local p = {}

--[=[ For testing remove 1 '-' from start of line local fileData = mw.loadData('Module:Activity/data') --[==[]=] local fileData = { -- could possibly be added to 'Module:ItemCollection/data' -- instead of having a separate file -- Mickey & Friends -- ["Mickey Mouse"]	= "mandf", ["Goofy"]			= "mandf", ["Minnie Mouse"]	= "mandf", } --[===[ structure of data file (data file not to be created yet, till module is almost finished,	because the structure might need to be fine-tuned if it can help	in simplifying/speed-up code) Table Key: activity	(activity name) data: Table with fields as below numbered fields 1	= owner character (short name) 2	= owner level 3	= duration 4	= sidekick character (short name) 5	= sidekick level

keyed fields (only present when needed) alias	= points to activity this is an alias of						Other fields are ignored if 'alias' is present Table of Activity-Name, Character pairs. if Character is nil, simple alias otherwise one entry for each character having same activity. (for multiple characters the Activity-Name should be a combo						of activity+character) tok		= possible token drops (token$token$token) req		= requirements act		= owner activity (if different from activity-key) act2	= sidekick activity (if differnet from activity-key/act) anim	= present if activity is animated text description of activity wish	= present if task fulfils wishes trophy	= present if task currently drops a trophy ver		= table: activity versions with fields (Not finalized yet) 1 = From version (e.g. 4.1.0) 2 = To version  (e.g. 4.2.0) optional fields (override the current values if present) dur = duration act wish trophy event	= table of LTEs where activity produced EC. other changes (if any) during the LTE will be reflected in the ver(sions) above. {"eventid" = 1, ....} --]===]

local actData = { ["mandf"] = { -- Sample content of data file Module:Activity/mandf -- Mickey Mouse ["High Five!"] = {"Mickey Mouse", 2, "2h", "Goofy", 1, tok = "Jessie,3$Daisy Duck,2", anim = "Goofy and Mickey high five"}, ["Search for Friends"]	= {"Mickey Mouse", 1, "60s", tok = "IP-M&F", wish=1, anim = "Mickey Searches around the Kingdom"}, ["Dance with"] = {"Mickey Mouse", 8, "2h", "Minnie Mouse", 8, act = "Dance with Minnie", act2 = "Dance with Mickey", anim = "Mickey and Minnie dance together"}, -- Goofy ["Check the Fun Wheel"] = {"Goofy", 1, "60m", req = "[Mickey's Fun Wheel]", tok = "IP-MI$Mickey Mouse,3$Woody,2"}, ["Run in Panic"] = {"Goofy", 1, "60s", tok = "IP-M&F", anim = "Goofy runs in panic"}, -- end of sample content } } --]==]

local icon = require("Module:CharacterAvatar").getAvatar local token = require("Module:CharacterToken").getToken local task = require("Module:Tasks").getData local util = require("Module:Utility")

function p.main(frame) local tArgs = util.getArgs(frame)

return "Not Finished Yet\nStill finalising data table structure\n" end

return p --