Napiophelios wrote:function pyramids.fill_chest is all it really has to change right?
No. Besides pyramids.fill_chest, depends.txt also has to change.
You can view the change I made here:
http://repo.or.cz/w/minetest_pyramids/t ... fd28d21673Napiophelios wrote:Cant you just make a tsm_pyramids init.lua for treasurer without having to duplicate/replace the pyramids mod?
No, certainly not. Treasurer is intended to be a pure API mod to which other mods interface to. Putting tsm_pyramids code directly into Treasurer would immediately undermine this idea.
Also, this would add a hard dependency on default to Treasurer. But Treasurer must stay clean of any mod depencencies, otherwise it would cease to be a pure API mod.
Treasurer is not a trivial mod. To learn more about how Treasurer works, read its thread. If you have more questions about Treasurer or don’t understand it, feel free to ask a question in the Treasurer thread.
Napiophelios wrote:or is it because pyramids mod already populates the chests and treasurer mod cant mess with them without errors?
Ugh, what kind of question is that?
The correct answer is “No”.
The Pyramids mod already populates the chest. But treasurer does not mess with chests at all, it does not know anything about the method by which the treasures are brought into the world. Treasurer only selects the treasures, tsm_pyramids will put them into the world.
Currently, tsm_pyramids works like this:
If the Treasurer mod is present, it will use Treasurer to select some random treasures, returned by Treasurer’s API.
If the Treasurer mod is not present, the mod will fall back to its own simple treasure selection algorithm, which is pretty limited, but it works. This fallback code was inherited from the original mod.
After the treasures have been selected, tsm_pyramids will place them into the chests.
After all, doing all this as a fork is the most sensible solution to me right now. But if BlockMen merges my changes into the original mod, I will abandon this fork, because it won’t be neccessary anymore. Remember, a Git repository is online. :)