Discussion in 'Script Releases' started by CyberTech, Dec 10, 2009.

  1. CyberTech

    CyberTech Second-in-Command Staff Member

    Messages:
    376
    LSTypeIterator by CyberTech
    Download: https://www.isxgames.com/EVEBot/Trunk/EVEbot/core/Lib/obj_LSTypeIterator.iss

    This object is designed to allow for rapid testing of the members of a datatype, without needing to have advance knowledge or hardcoding of the members and methods of the datatype.

    I wrote this to enable rapid testing of datatype members during extension updates, after patches, etc.

    Amadeus is hoping that someone will use this for ISXVG to create testcases similar to the ones in https://www.isxgames.com/EVEBot/Trunk/EVEbot/Testcases. The example below is actually 'test_Me.iss" from that same directory.

    -- CyberTech, cybertech@gmail.com

    An example (using the EVE datatype "character") is below:

    Example:

    Code (Text):
                function main()
                {
                    variable int StartTime = ${Script.RunningTime}
                    variable int EndTime

                    variable obj_LSTypeIterator ItemTest = "character"

                    ItemTest:ParseMembers
                    ItemTest:IterateMembers["Me"]

                    EndTime:Set[${Script.RunningTime}]
                    echo "Testing of datatype ${ItemTest.TypeName} completed in ${Math.Calc[(${EndTime}-${StartTime}) / 1000]} seconds"
                }

     
    Example output:

    Code (Text):
    ========================================================
                Parsing datatype character members and methods...
                Members of datatype "character", instance "Me"
                  Me.ActiveTarget           == NULL
                  Me.Alliance               == NULL
                  Me.AllianceID             == -1
                  Me.AllianceTicker         == NULL
                  Me.AutoPilotOn            == FALSE
                  Me.Charisma               == 15.200000
                  Me.DroneControlDistance   == 45000.000000
                  Me.Fleet                  == NULL
                  Me.GetActiveDroneIDs      == NULL
                  Me.GetActiveDrones        == NULL
                  Me.GetAssets              == 0
                  Me.GetAttackers           == 0
                  Me.GetCorpHangarItems     == NULL
                  Me.GetHangarItems         == 13
                  Me.GetHangarShips         == 5
                  Me.GetJammers             == NULL
                  Me.GetMyOrders            == NULL
                  Me.GetSkillQueue          == 1
                  Me.GetSkills              == NULL
                  Me.GetStationsWithAssets  == 0
                  Me.GetTargetedBy          == NULL
                  Me.GetTargeting           == NULL
                  Me.GetTargets             == NULL
                  Me.InSpace                == FALSE
                  Me.InStation              == TRUE
                  Me.Intelligence           == 30.300000
                  Me.MaxActiveDrones        == 5.000000
                  Me.MaxJumpClones          == 4.000000
                  Me.MaxLockedTargets       == 6.000000
                  Me.Memory                 == 23.500000
                  Me.MiningDroneAmountBonus == 100.000000
                  Me.Perception             == 22.000000
                  Me.RegionID               == 10000422
                  Me.Skill                  == NULL
                  Me.SkillCurrentlyTraining == NULL
                  Me.SkillPoints            == NULL
                  Me.StandingTo             == NULL
                  Me.Willpower              == 19.900000
                Testing of datatype character completed in 0.156000 seconds
     
  2. Kelly71

    Kelly71 Active Member

    Messages:
    168
    Think you clicked on the wrong forums :)
  3. CyberTech

    CyberTech Second-in-Command Staff Member

    Messages:
    376
    On the contrary, it went exactly where it was supposed to.
  4. mmoaddict

    mmoaddict Original Script Author: VGA

    Messages:
    200
    thanks i will look into it

Share This Page