Module:Activity

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

PLEASE DON'T EDIT THIS MODULE. THIS IS AN OUTDATED VERSION. THE MODULE IS BEING DEVELOPED OFF-LINE.

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", -- Bambi -- ["Bambi"] = "bambi", ["Flower"] = "bambi", ["Thumper"] = "bambi", } --[===[ 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 }, --COMPLETE LIST BELOW HERE-- ["bambi"] = { -- Bambi ["A Flower"] = {"Bambi",3,"4h","Flower",4,req="[The Meadow]",anim="Bambi and Flower play in the flowers at The Meadow"}, ["Bird!"] = {"Bambi",1,"60m",tok="IP-Bambi$IP-LATT",anim="Bambi chases after a bird"}, ["Exploring the Meadow"] = {"Bambi",4,"6h","Flower",6,req="[The Meadow]",tok="Tia Dalma,3"}, ["Foraging Together"] = {"Bambi",5,"4h","Thumper",5,req="[The Meadow]",tok="Colette,3"}, ["Going to the Meadow"] = {"Bambi",2,"2h",req="[The Meadow]"}, ["Playing in the Snow"] = {"Bambi",8,"12h","Thumper",9,req="[Forest Ice Rink]"}, ["Prancing"] = {"Bambi",10,"24h",anim="Bambi prances and bounces around the kingdom"}, ["Talk about Hibernation"] = {"Bambi",5,"8h","Flower",5,req="[Forest Ice Rink]"}, ["Talking about Flowers"] = {"Bambi",9,"24h","Flower",10,req="[The Meadow]"}, ["Teaching"] = {"Bambi",9,"24h","Thumper",10,anim="Thumper teaches Bambi and then laughs at him"}, ["Trying to Skate"] = {"Bambi",3,"4h",req="[Forest Ice Rink]",tok="Flower,3$Thumper,2"}, ["Watching Gophers"] = {"Bambi",6,"6h","Thumper",6,req="[The Meadow]",tok="Flower,2$Pocahontas,3"}, -- Flower ["Exploring Fallen Logs"] = {"Flower",8,"4h","Thumper",8,req="[Forest Ice Rink]"}, ["Hibernation Preparation"] = {"Flower",1,"60m",tok="IP-Bambi",anim="Flower crawls a bit, sits up, yawns and stretches"}, ["Looking for Food"] = {"Flower",2,"2h",req="[The Meadow]",tok="Thumper,3$Bambi,3"}, ["Playing in the Meadow"] = {"Flower",3,"2h","Thumper",2,req="[The Meadow]"}, ["Take a Long Nap"] = {"Flower",3,"4h",req="[Forest Ice Rink]"}, -- Thumper ["Instructions on Skating"] = {"Thumper",7,"6h","Bambi",7,req="[Forest Ice Rink]",tok="Linguini,3"}, ["Playing on the Ice"] = {"Thumper",4,"2h",req="[Forest Ice Rink]",tok="Bambi,3"}, ["Snacking on Clovers"] = {"Thumper",3,"4h",req="[The Meadow]",tok="Flower,3$Bambi,2"}, ["Thumpin'"] = {"Thumper",1,"60m",tok="IP-Bambi",anim="Thumper hops around a bit, then thumps his foot"}, } } --]==]

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 --