Giter Site home page Giter Site logo

rostcs / du-fuelscreen Goto Github PK

View Code? Open in Web Editor NEW
18.0 9.0 19.0 142 KB

[OUT OF DATE] Dual Universe Fuel Screen script designed to automatically detect and adapt to a given tank configuration

License: GNU General Public License v3.0

Lua 100.00%
dual dualuniverse dual-universe dual-universe-lua

du-fuelscreen's Introduction

This script is no longer being updated, and may not work as intended. Use at your own risk

display of multiple fuel tank configurations

Features

Supports any configuration of atmospheric, rocket, and space tanks up to 9 total tanks

Automatic detection, simply connect any amount of screens, and the tanks, and it will automatically adjust to the configuration

Easy configuration of all colors and text

Installation

Installation Tutorial / Feature Showcase

Click on FuelManagement1.5 above, on the top right click the Raw Button, and copy all text(Ctrl+C)

Right click on a programming board, Advanced, Paste Lua Configuration from clipboard

From there use the link tool(build mode tool 6 by default), to connect a minimum of one screen and one tank, before activating the programming board.

It is highly recommended to use a detection zone with this script. Simply create a link from the detection zone, to the programming board(blue link). This will allow the script to turn back on whenever a player walks within range. If you are not using a detection zone, enable playerToggle in the configuration

Planned Features

  • Support for any combination of 8 tanks, for non-hybrid ships | Added in 1.3
  • Rocket Tank Support | Added in 1.4
  • Support to display the percentage filled as a text value on top of the bar | Added in 1.5

More features will come eventually, however finding time to play dual and work on this script has become much more scarce. For feature requests please make an issue, and add the enhancement label. Whenever I get around to finding time to code, I'll go with the most popular request, or just come up with something if there is no requests at a given time.

Customization

The script can be customized within the Advanced -> Edit Lua Paramaters menu, though due to the length of the strings, this can both look and feel clunky. | Temporarily disabled

For an easier to read configuration, Go to Advanced -> Edit Lua Script, click unit under slots, and start() under filters. This will display a section of the code where the variables can more easily be read.

To adjust the order of the tanks within their groups, you will need to rename the tanks. The tanks are sorted in alphabeticical order. To rename the tanks, use build mode, and right click -> rename element on the tank.

Troubleshooting

  • Restart your game
  • Verify that the names of the tanks does not contain symbols, as this can conflict with the lua code
  • Verify that you are not attempting to link more than 9 tanks to the programming board

Support

Any issues or suggestions? You can contact me at either of these locations:

  • Discord: Rost#6764
  • Ingame: RostNerd

Changelog

v1.6 - 2/3/2021

  • Features: Changed tank naming by element name. Right-click the tank while in build mode, click "Rename Element" and name your tank. It will appear on the screen properly.
  • Cleanup: Made the code much smaller and cleaner.

v1.5 - 10/3/2020

  • Features: Added the ability to show the percentage of fuel remaining on the bar.(Enabled by default, disable in the config)
  • Features: Added Support for 9 tanks of the same type(was 8)
  • Bugfix: Fixed an issue where the colored bar was rendering on top of the border
  • Configuration: Added showPercents to toggle on and off the display of percentages
  • Configuration: Added text showing the default value of all numerical configuration settings
  • Backend: Adjusted the order that the progress bars are rendered
  • Backend: Localized all internal functions and arrays in the update tick

v1.4.5 - 9/30/2020

  • Features: Added the ability to adjust the order of the types of tanks through a configuration setting
  • Features: Added Single and Multiuser Mode
  • Features: Added the ability to disable the programming board widget(disabled by default)
  • Backend: Reworked the array the graphics SVG is generated

v1.4 - 9/28/2020

  • Features: Added Support for Rocket Tanks
  • Features: Temporarily removed support for configuration via lua paramaters
  • Backend: Added new arrays containing the list of rocketTanks and rocketTankNames
  • Readme: Updated Gif to show rocket tank support

v1.3 - 9/25/2020

  • Features: Added Support for any configuration of 8 tanks, rather than a limit of 4 atmospheric, and 4 space tanks
  • Backend: Reworked the way the tankName Array's are generated
  • Backend: Added comments to some portions of the code

v1.2 - 9/22/2020

  • Initial Public Release
  • Added autoconfiguration based on the class of the link, rather than requiring the connected slot to be named

v1.1 - 9/20/2020

Credits

Thanks to the great folks in the #lua-scripting channel in the Dual Universe discord, for assisting me in figuring out the more difficult sections of this script. Notably: Lithum3, D.Mentia, and NoPantsMcDance

du-fuelscreen's People

Contributors

jdelgado-dtlabs avatar rostcs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

du-fuelscreen's Issues

[Feature Request]

I don't know if it is possible but are you able to pull the amount of Warp Cells you have in the container connected to warp drive? I know the widget gets that number somehow, would be cool to have that on the screen as well.

Move the order of the Tanks

I was trying to change the order of the tanks on the screen because they don't match the order in my ship. Is there a way or a trick to do it? I already tried to connect them in a different order.

Use Fuel Tank Name

Would it be possible to have the script read the name of the fuel tank? I have renamed mine, for easier identification and it would be awesome to see that on the screen. Excellent work by the way, really nice!

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.