Git Product home page Git Product logo

flint's People

Contributors

biqqles avatar san-e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

thestarport san-e

flint's Issues

Flint doesn't get commodity price info from installed plugins.

I'm using Discovery 4.91.0 and I noticed that Flint isn't aware of configurations set in installed plugins. For example, inspecting the base entity for LI09_08_base, it says the buy price of commodity_outcast is 10000. However, there is a server side plugin with a config file at EXE\flhook_plugins\prices.cfg that overrides that buy price for that station to 45000.

This can be easily reproduced with a local server running this version and checking in game that the station buys this commodity for the price in the prices.cfg file and not what Flint reports.

There's a lot of different files in the flhooks_plugins folder that I'm sure affect the game state that is likely not being picked up by Flint.

Some System(Entity) objects don't return all of the bases with the bases method

Using a fresh copy of Discovery 4.91.0, there are several bases that do not show up in the EntitySet when calling the bases method of their respective system. Each missing base is present in the appropriate system ini file and each base object retrieved by flint has the correct system identified by its system string attribute.

Here is the list of missing bases I've found:

  1. Liverpool Border Station (br02_04_base) in system br02
  2. Battleship Rocroi (ga02_12_base) in system br05
  3. Battlecruiser Blackrock (br04_03_base) in system br05
  4. Fort Albi (br08_05_base) in system br08
  5. Planet New London, Landing Site (ga01_02_base) in system br10
  6. Unknown Object (br14_01_base) in system br13
  7. Omega-48 Gate Construction Site (ga05_03_base) in system br16
  8. Object Unknown (bw01_01_base) in system bw01
  9. Planet Kurile, Samura Platform (bw06_01_base) in system bw06
  10. Solarius Station (bw08_02_base) in system bw08
  11. Carrier Helios (ga06_03_base) in system bw09
  12. Rodez Outpost (ew15_09_base) in system bw15
  13. Pentecost Outpost (ew18_01_base) in system ew02
  14. Primus Outpost (ew06_04_base) in system ew07
  15. Viernheim Base (ew07_03_base) in system ew07
  16. Planet Gran Canaria (ew19_03_base) in system ew07
  17. Rippon Tor Blacksite (br10_01_base) in system ew07
  18. Gap Station (ew14_04_base) in system ew13
  19. Fourchambault Shipyard (ga06_08_base) in system ew13
  20. Secundus Outpost (ga05_04_base) in system fp7_system
  21. Scarred Battleship (li14_02_base) in system hi10
  22. Battleship Betheny (br10_02_base) in system iw04
  23. Battleship Yukon (li02_03_base) in system iw04
  24. Battleship Delaware (li09_03_base) in system iw08
  25. Police Prison Station (iw09_01_base) in system iw09
  26. Navy Prison Station (iw09_02_base) in system iw09
  27. Guard Station (iw09_03_base) in system iw09
  28. Unknown Station (iw09_04_base) in system iw09
  29. Planet Tomioka, Blood Dragon Outpost (bw14_02_base) in system ku09
  30. Planet Pittsburgh, Xeno Hideout (ga06_05_base) in system li01
  31. Planet Manhattan, Landing Site (ew16_01_base) in system li01
  32. New Haven Station (li06_05_base) in system li06
  33. Toronto Station (li12_01_base) in system li12
  34. Fort McMurray (li08_01_base) in system li12
  35. Mulvane Outpost (iw08_01_base) in system li17
  36. Arecibo Complex (li16_02_base) in system li18
  37. The Shrine (no01_01_base) in system no01
  38. Planet New Berlin (rh01_01_base) in system rh01
  39. Wedel Mining Facility (rh02_08_base) in system rh02
  40. Planet Nuremberg (rh06_05_base) in system rh06
  41. Planet Nuremberg, Bundschuh Supplies Warehouse (ga06_06_base) in system rh06
  42. Heldrungen Military Prison (rh12_01_base) in system rh08
  43. The Ravine (st06_01_base) in system st06
  44. Nomad Lair (ga10_01_base) in system st07
  45. Nomad Lair (st39_03_base) in system st39

Latest Discovery update breaks parsing of shipclass.dll

  File "d:\repos\discoWikiGen\.venv\Lib\site-packages\flint\entities\ship.py", line 83, in type
    return self._ship_classes()[self.ship_class]
           ^^^^^^^^^^^^^^^^^^^^
  File "d:\repos\discoWikiGen\.venv\Lib\site-packages\flint\entities\ship.py", line 179, in _ship_classes
    result.extend(dll.parse(ship_class, 0).values())
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\repos\discoWikiGen\.venv\Lib\site-packages\flint\formats\dll.py", line 163, in parse
    resources.update(read_string_table())
                     ^^^^^^^^^^^^^^^^^^^
  File "d:\repos\discoWikiGen\.venv\Lib\site-packages\flint\formats\dll.py", line 101, in read_string_table
    resource_string = ResourceDirectoryString(f.read(2))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\repos\discoWikiGen\.venv\Lib\site-packages\deconstruct\struct.py", line 41, in __init__
    unpacked = iter(struct.unpack(self.format_string, buffer))

something changed in shipclass.dll to break the dll parser. it's the only file this happens with

Init: paths

when you try init flint in your own program

import flint as fl
fl.set_install_path(YourPath) is not working due to some namespace error apparently
but fl.paths.set_install_path(YourPath) works fine.
P.S. Shell launches fine without the bug.

Detailed tracelog:

(venv) C:\Users\User\source\repos\FLDarknet\FLDarknet>python
Python 3.7.8 (tags/v3.7.8:4b47a5b6ba, Jun 28 2020, 08:53:46) [MSC v.1916 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import flint as fl
>>> fl.set_install_path(r"C:\Freelancer")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\User\source\repos\FLDarknet\FLDarknet\venv\lib\site-packages\fl
int\__init__.py", line 46, in __getattr__
    if not paths.install:
AttributeError: module 'flint.paths' has no attribute 'install'

Tests/CI

We really should add some form of testing to check that all functions and methods work on vanilla and Discovery data as there are a lot of NoneType errors lurking. This could be as simple as iterating through every routine and Entity generated and trying to call everything they expose. I have a basic script that does this but it needs finishing. Might have to do some more conventional unit testing for functions that take arguments, though.

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.