Feature request: Easy way to merge two forge dictionaries

The place to request or discuss MineTweaker features.

Feature request: Easy way to merge two forge dictionaries

Postby AlCapella » Sat Jul 19, 2014 9:38 am

Due to typos, or due to cross-mod lack of communication, sometimes we have multiple ore dictionaries! E.g.: foodSalt, then dustSalt! Really?

It would be convenient to have within minetweaker, ways to merge, scrub, combine and/or delete oredictionaries to maintain single dictionaries.

If this is too ambitious, first let us begin with combining two oreDict lists, and create one new list?

: [Select all] [/] [] ()
oreDict.foodSodium.combine(oreDict.foodSalt,oreDict.dustSalt); #foodSodium for recipes needing salt. You want fries with that?
GeSHi © Codebox Plus

An even cleaner way would be to merge into an existing one, if possible:
: [Select all] [/] [] ()
oreDict.foodSalt.merge(oreDict.dustSalt); # merge all items in dustSalt into foodSalt also
GeSHi © Codebox Plus


Perhaps we can leave deletion of an ore dictionary list for another day's brainstorming. Because, we need to verify, just in case, if a mod has some vestigial use for that particular oreDict entry?
Why do mods appeal to me? Each day, you can say: today is a wonderful day for chef/engineer/sorcerer/swashbuckler/beach bum!/ad infinitum :)
User avatar
AlCapella
 
Posts: 14
Joined: Sat Jul 12, 2014 4:13 pm

Re: Feature request: Easy way to merge two forge dictionarie

Postby Stan » Sun Jul 20, 2014 7:17 am

You should be able to use addAll and mirror to do this:

: [Select all] [/] [] ()
  1. <ore:dustSalt>.addAll(<ore:foodSalt>);
  2. <ore:foodSalt>.mirror(<ore:dustSalt>);
  3.  
GeSHi © Codebox Plus


Checking the wiki, I notice that addAll hasn't been documented yet. But your suggestion makes sense and I can make a merge function to do the same in a single instruction.
User avatar
Stan
Site Admin
 
Posts: 258
Joined: Fri Jul 11, 2014 9:04 pm

Re: Feature request: Easy way to merge two forge dictionarie

Postby AlCapella » Sun Jul 20, 2014 8:19 am

Stan wrote:You should be able to use addAll and mirror to do this:

: [Select all] [/] [] ()
  1. <ore:dustSalt>.addAll(<ore:foodSalt>);
  2. <ore:foodSalt>.mirror(<ore:dustSalt>);
  3.  
GeSHi © Codebox Plus


Checking the wiki, I notice that addAll hasn't been documented yet. But your suggestion makes sense and I can make a merge function to do the same in a single instruction.


This is good to know, and I like how MT3 is shaping. We can live with these two for now. Additionally you could have the function automatically eliminate duplicates.


I edited the wiki and documented these commands now.
Why do mods appeal to me? Each day, you can say: today is a wonderful day for chef/engineer/sorcerer/swashbuckler/beach bum!/ad infinitum :)
User avatar
AlCapella
 
Posts: 14
Joined: Sat Jul 12, 2014 4:13 pm


Return to Feature Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron