GithubHelp home page GithubHelp logo

Comments (10)

asamy avatar asamy commented on June 18, 2024

That looks awesome. If you need any help with core functionality, just let me know.

from forgottenmapeditor.

mindrage avatar mindrage commented on June 18, 2024

Well, I did try alot of g_resources functions, but none of them seems to be able to give a list of directories and files so i had to do this iterator instead:

local function directory(path)
  local t = {}
  local i = 0;
  if g_app.getOs() == "linux" then
    for filename in io.popen('ls -a "'..directory..'"'):lines() do
      table.insert(t, filename)
    end
  elseif g_app.getOs() == "windows" then
    for filename in io.popen("dir " .. directory .. " /b /ad]]"):lines() do
      table.insert(t, filename)
    end
  end

  local n = #t
  return function()
      local list = t
      i = i + 1
      if i <= n then 
    return t[i]
      end
  end
end

But as it uses shell commands its really just very inaffective and simply wrong to use.., but i can access outside of the "listed" directories.
Think you could help me solve this somehow?

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

Looks like we have no option but use boost filesystem and this is what im going to do, no worries. You shall have this done by today or tomorrow.

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

OtClient's commit edubart/otclient@6745bff implements this, read the commit message to learn how it works.

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

Please let me know about your recent activities on this, i really need this in very soon and if you need ANY help, do not hesitate to ask me. If you are unable to continue you can pass the code to someone or just post it here and we'll see if someone continues it, maybe i will.

from forgottenmapeditor.

mindrage avatar mindrage commented on June 18, 2024

Oh sorry, Im still working on it. I'll try to finish it tomorrow. took a break due to christmas/exams.

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

Great to hear, thanks!

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

Any progress on this?

If you're having trouble using the new function, here's an explanation:

local files = g_resources.getDirectoryFiles("C:/what");
...
local map = g_map.openMap("what/map.otbm") -- or just pass the full path

from forgottenmapeditor.

mindrage avatar mindrage commented on June 18, 2024

Oh well, I tried a bit, then got tired because i had to look up things into source all the time.
But im setting up an Eclipse IDE with Lua Profiler, Autocomplete and debugger to ease development in both my server projects and perhaps otclient aswell.
V
http://eclipse.org/downloads/download.php?file=/koneki/products/stable/ldt/1.1/org.eclipse.koneki.ldt.product-win32.win32.x86_64.zip&mirror_id=514

the autocomplete part is easy, you just write a file with empty function headers with parameters.

Also trying to integrate an XML template for TFS 1.0

OTUI might be a bit harder to implement, but i assume it can be coded with a Java Plugin. But ill do that later.

I wont be able to finish this in a while, But you can have the modules sofar, Aint that much to be honest other than OTUI and Startup/Shutdown scripts.

http://speedy.sh/PXyBv/mapeditor-modules.zip

I'll try to share the IDE later.

from forgottenmapeditor.

asamy avatar asamy commented on June 18, 2024

Okay, thanks. Will have this finished by the end of jan got no time now.

from forgottenmapeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.