Command line suggestion

  • Fusionftw
    26th Mar 2019 Member 0 Permalink

    We should be able to enact more than one command at a time if possible. It would still be backwards compatible.

     

    For example, the new way would add commas between each command and value(s):

     

    Original:

    !set type stne brck

    !set type watr dstw

    !set type ttan gold

    New:

    !set type stne, watr, ttan brck,watr,gold

     

    The order of the values must be in the order you want them, otherwise you will get the wrong results for each command(s). 

     

    For example:

     

    Original Commands:

    !set type goo spng

    !set type cray dray

    These commands change "goo" to "spng", and "cray" to "dray".

    Incorrect command:

    !set type cray, goo spng, dray

    This command would instead change "goo" to "dray", and "cray" to "spng", unlike what we wanted. The order is important.

     

    New command structure:

    !set [command] [val1], [val2] [otherval1, the matching value for the first], [otherval2, the matching value for the second]

    _______________________________________________________

    It could even execute multiple instructions, too!

     

    For example:

    !set type, tmp, life glas, filt, bray iron, 3, 49

     

    This command would change "glas" to "iron", set the tmp of "filt" to 3, and it would also set the life of "spng" to 49.

     

                                 

    Edited 3 times by Fusionftw. Last: 27th Mar 2019
  • Rashoneh
    26th Mar 2019 Member 0 Permalink
    This post has been removed by jacob1: nonsensical post. Using proper English is a requirement for posting on the forums
  • 6nop6nop
    11th Apr 2019 Member 0 Permalink

    it would also be useful to do things like:

    !set type [not dmnd] watr

    !set type [temp > 400 && tmp ==1] bray

    !set type wood [plnt if y > 200 else coal]

  • LBPHacker
    11th Apr 2019 Developer 0 Permalink

    @6nop6nop (View Post)

     

    Those are easy to do with the En-masse manipulator script available in the script manager. These commands are equivalent to your examples:

    tpt.all():neq("type", "dmnd"):set("type", "watr")
    tpt.all():gt("temp", 400):eq("tmp", 1):set("type", "bray")
    tpt.all():eq("type", "wood"):set("type", function(p) return p.y > 200 and "plnt" or "coal" end)

  • 6nop6nop
    4th May 2019 Member 0 Permalink