[REQUEST] Select all maps button

Started by Kit Fisto, February 10, 2014, 01:08:15 PM

Previous topic - Next topic
Here's actually what I did to it (see in action in Mando Wars Beta here

Section of code...
Code (lua) Select

----Hack by Phantom.  Forces new era to call on a universal lua file that is flexible enough to read different levels.
----Works by taking stock letters and puts them down as normal. All others call on Mandalorian level.
----For extra era to work, set the "this.CurButton" value and set your era in it.  Mandalorian Wars
----is set up this way due to it being a three era mod, not any more (for now).  Just figured this way was much
----simpler for just 1 extra era.
----9/5/13 ----Changed to accommodate new buttons later.

    if ((this.CurButton == "a") or (this.CurButton == "c") or (this.CurButton == "i") or (this.CurButton == "r")) then
        ---- SelectedMap = Selection.mapluafile .. this.CurButton ----this.AttackerChar, fix because the game wasn't registering Clone Wars
        SelectedMap = Selection.mapluafile .. this.CurButton
    elseif (this.CurButton == "mando") then
        SelectedMap = "UNIVmando"
    else
        SelectedMap = "Debug" ---- need this to see if Mando Wars works without falling back on "mando"
    end
   
----This next part defines selection as "q", making it easier to declare and then put in the text file.
----The mapluafile is pulled from the past command, and the way I set it up kept the Selection.mapluafile
----intact, while making it LOOK like it isn't used anymore.  Tricked ya, didn't I?

local q = Selection.mapluafile

----MOVED TO A BETTER LOCATION ---- 7/6/2013 ifs_main
----writeto("Data\\_LVL_PC\\UNIV\\values.txt")

if(SelectedMap == "UNIVmando") then
appendto("Data\\_LVL_PC\\UNIV\\values.txt")   
write(q)
write("\n")
end


I'm in the process of making this more efficient (at some point), but this is what my amateur programming mind could do.  If you want to see the rest of it sometime, just ask.
The BOBclan:  A Rich History


Quote from: Unit 33 on November 29, 2014, 03:44:44 AM
'Please, tell me more about the logistics of the design of laser swords being wielded by space wizards' - Some guy on the internet.