-
November 28th, 2014, 01:32 #1
- Join Date
- Sep 2014
- Location
- Michigan
- Posts
- 65
The best way to hide a calender month
Hello everybody,
I have been tinkering around with implementing some custom functionality for my ruleset that relates to the calendar, and I am looking for some advice on the best way to handle the situation I currently find myself in. Within my ruleset, I have added the following line of code to my ruleset's initialization:
Code:CalendarManager.registerMonthVarHandler("theon",calcTheonMonthVar);
Code:function calcTheonMonthVar(nYear, nMonth) if nMonth == 13 then nYear = DB.getValue("calendar.current.year", 0); if (nYear % yearsInAnAge) == yearsInAnAge - 1 then return 0; else return -1; end end return 0; end
Code:<period13> <days type="number">1</days> <holidays> <holiday1> <duration type="number">1</duration> <name type="string">Aeon Day</name> <startday type="number">1</startday> </holiday1> </holidays> <name type="string">Aeon Day</name> </period13>
Attachment 8138
And now to my question... Without having to override all the calendar base functionality and windows, how would I go about hiding the empty month from the calendar display altogether? I did some experimenting and got it to work, but I wound up having to overwrite several XML and Lua files from the CoreRPG ruleset, and I would like to avoid doing this if possible. As always, any help or advice is appreciated.
-
November 28th, 2014, 01:55 #2
you copy those files that you overwrote into your extension, include them in the base.xml
you can probably include only your changed code in these files.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks