Line To Circle UI Toggle Button

Discussion in 'Planetary Annihilation General Discussion' started by meir22344, December 24, 2014.

  1. meir22344

    meir22344 Active Member

    Messages:
    258
    Likes Received:
    112
    would it be possible to get a ui button that changes the structure build mode from line to circle please
  2. ace902902

    ace902902 Active Member

    Messages:
    548
    Likes Received:
    212
    why not? i feel like this would take 10 minutes to code, since the calculations and code for area build already exist.
  3. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    I don't believe the engine is able to modify json files dynamically while in-game.
    squishypon3 likes this.
  4. ef32

    ef32 Well-Known Member

    Messages:
    446
    Likes Received:
    454
    But, but... can't you just program: if LineSelected then UseLineFormula, else UseCircleFormula.
    Why modify files on the fly?
  5. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,356
    Circle and line area build are both dictated by a buildings .json file.
  6. ef32

    ef32 Well-Known Member

    Messages:
    446
    Likes Received:
    454
    That's what I mean. You put both code pieces in that file, and depending on user setting, you call either Line or Circle?
    I'm no programmer, but this seems pretty ok to me.
  7. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Unfortunately no, it ain't that simple, json files follows some specific format to store data, they don't contain any type of "real" code (barely some basic logic for specific stuff).
    Uber would require to make some changes in order to make what the OP suggested (I personally think it would be cool to have such toggle in the uber bar, lines of factories are boring)
    squishypon3 likes this.
  8. kaminfreunde

    kaminfreunde Active Member

    Messages:
    120
    Likes Received:
    77
    Would be great to have it!

Share This Page