Home Showcase
Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!

Core proper load chip

KatelynKatelyn Registered, Administrator Posts: 171
edited March 2011 in Showcase #1
This chip you paste on your ship, and that is it. The next time you paste your ship, it will automatically reset your core mods so that energy upgrades will be pasted first. This fixes your ship core when you require a CPU or power grid enhancement!
@name Core load
@persist I Rate
@persist [A, Other, High]:array
@persist [Core]:entity
#By Katelyn

if (dupefinished())
{
    Rate = 25
    A = entity():getConstraints()
    timer("a", Rate)
    I = 1
}
if (clk("a"))
{
    if (A[I, entity]:type() != "sc_energy_upgrade")
    {
        if (A[I, entity]:type():sub(1, 3) == "sc_")
        {
            Other:pushEntity(A[I, entity])
            A[I, entity]:propFreeze(1)
            A[I, entity]:unConstrain()
        }
    }
    else
    {
        High:pushEntity(A[I, entity])
        A[I, entity]:propFreeze(1)
        A[I, entity]:unConstrain()
    }
    if (A[I, entity]:type():sub(1, 9) == "ship_core")
    {
        Core = A[I, entity]
    }
    
    if (I != A:count())
    {
        timer("a", Rate)
        I++
    }
    else
    {
        timer("b", Rate)
        I = 1
    }
}
if (clk("b"))
{
    High[I, entity]:weld(Core)
    High[I, entity]:propFreeze(0)
    
    if (I != High:count())
    {
        timer("b", Rate)
        I++
    }
    else
    {
        timer("c", Rate * 10)
        I = 1
    }
}
if (clk("c"))
{
    Other[I, entity]:weld(Core)
    Other[I, entity]:propFreeze(0)
    
    if (I != Other:count())
    {
        timer("c", Rate)
        I++
    }
    else
    {
        print("Complete")
        exit()
    }
}

Comments

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file