Coder Social home page Coder Social logo

du-industry-hud's Introduction


Full Stack developer, New technologies enthusiast, Building open source project for gaming and gamers.

du-industry-hud's People

Contributors

jericho1060 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar

du-industry-hud's Issues

Cannot MONIT_Silver Pure

Cannot MONIT_ a container with "Silver Pure" because the hud is looking for Pure Silver. Honestly, I prefer it to display as Silver Pure to make it easier to find alphabetically, but the hud should take "MONIT_Silver Pure" or "MONIT_Pure Silver" because it's called Silver Pure in the game.

Sorting Reciepe's

I thought I would share, I mod'd ur code to sort the recipes, this is the code for it.
`local elementTable = {}

            for i, element in pairs(elements) do
                local elementData = {}
                local statusData = json.decode(core.getElementIndustryStatus(element.id))
                local recipeName = "-"
                if not (element.type:lower() == 'transfer unit') then
                    if loadedRecipes[statusData.schematicId] then
                        recipeName = loadedRecipes[statusData.schematicId]
                    else
                        if has_value(recipeToLoad,statusData.schematicId) == false then
                            table.insert(recipeToLoad, statusData.schematicId)
                        end
                    end
                end
                local remainingTime = 0
                if (statusData) and (statusData.remainingTime) and (statusData.remainingTime <= (3600*24*365)) then
                    remainingTime = statusData.remainingTime
                end
                element.recipeName = recipeName
                element.remainingTime = remainingTime
                element.status = statusData.state
                element.unitsProduced = statusData.unitsProduced
                local mode = ""
                element.maintainProductAmount = statusData.maintainProductAmount
                element.batchesRequested = statusData.batchesRequested
                if statusData.maintainProductAmount > 0 then
                	mode = "Maintain " .. math.floor(statusData.maintainProductAmount)
                elseif statusData.batchesRequested > 0 and statusData.batchesRequested <= 99999999 then
                    mode = "Produce " .. math.floor(statusData.batchesRequested)
                end
                local status = "-"
                if element.status then status = element.status end
                local status_class = ""
                if status:lower():find("running") then status_class = "text-success" end
                if status:lower():find("stopped") then status_class = "text-info" end
                if status:lower():find("jammed") then status_class = "text-danger" end
                if status:lower():find("pending") then status_class = "text-primary" end
                status = status:gsub("JAMMED_", ""):gsub("_", " ")
                hud_machines = hud_machines .. [[<tr]]
                if selected_machine_index == i then
                    hud_machines = hud_machines .. [[ class="selected"]]
                end
                local machine_id = "-"
                if element.id then machine_id = element.id end
                local unitsProduced = 0
                if element.unitsProduced then unitsProduced = element.unitsProduced end



                elementData.Machine_id = machine_id
                elementData.Status_Class = status_class
                elementData.ElementName = element.name
                elementData.recipeName = recipeName
                elementData.unitsProduced = unitsProduced
                elementData.status_class =status_class
                elementData.status=status
                elementData.mode=mode
                elementData.status_class = status_class
                elementData.TimeRemaining = SecondsToClockString(element.remainingTime)
                table.insert(elementTable,0,elementData)
            end


            table.sort(elementTable, function(a,b) return a.recipeName:lower() < b.recipeName:lower() end)
            for i, element in pairs(elements) do
               hud_machines = hud_machines .. [[>
                         <th>]] .. element.Machine_id .. [[</th>
                         <th class="]] .. element.Status_Class .. [[">]] .. element.ElementName .. [[</th>
                         <th>]] ..  element.recipeName  .. [[</th>
                         <td>]] ..  element.unitsProduced .. [[</td>
                         <th class="]] .. element.status_class .. [[">]] .. element.status .. [[</th>
            	 	  <th>]] .. element.mode .. [[</th>
                         <td class="]] .. element.status_class .. [[">]] .. element.TimeRemaining .. [[</td>
                     </tr>
                 ]]
            end`

Feature Request: Client Optimization

Current State: When the HUD is targeting a specific filter/industry type, such as Electronics Industries Elements, it pings every single element all at once. Currently, anecdotally, I have 97 elements on this filter type and every 1s it freezes the game. Even if I were to delay the querying of elements, it freezes every time b/c it's running 97 scripts.

Optimization Request: When you are on Page 1 or Page 2 of a filter type, have the query system only ping those systems listed to reduce the client load. Example: Electronics Industries are filtered and the client is viewing page 1 with 20 elements in the list. The query will only ping those 20 elements in the list thus limiting the game clients' resource requests and optimizing performance.

Data collector lua simply stops on line 33 (MyJson.parse) without error message

Did exactly what was written in the installation instruction, but encountered a weird problem:

In unit.start() of the collector, lines 30+ the MyJson.parse command seems to stop the script without throwing an error. I verified by adding system.prints. The second one never gets displayed. Therefore, the collector doesn't save any data to the databank, so the master displays the devices (but of course the master thinks they are not connected).

[Lines 30+ ...]

if databank ~= nil then
local refresh_id_list = {}
system.print("DISPLAYED")
if databank.hasKey("refresh_id_list") then
refresh_id_list = MyJson.parse(databank.getStringValue("refresh_id_list"))
end
system.print("NEVER DISPLAYED")
for i = 1, #industries, 1 do

[...]

Any ideas?

CPU Overloads... possibly more of a question

Obviously running a significant factory and getting a CPU overload. I've turned both _elements by frame _ and refreshed by frame down to 10. It crashes seconds after the final refresh that stabilizes the element counts pictured here
image

I can turn it down more and get the same result, just more delayed. The question is.... if we go to a "Machine Control System", will it lighten the overhead? Or will it potentially make it worse?

Hud not work

Hi I don't know if it's because of a new upgrade or I'm doing something wrong, but although the monitoring itself works, I can't control the machines in any way. I have tried many combinations. It does not work. you can check it ?

Feature Request: Toggle to Stop Updating

Current state: in always updates whatever section/page you're on.

Feature request: Have the ability to toggle the updating of boards on/off.

Reason: When I'm floating around the factory working on a machine that I highlighted, the stutters from the updates make it hard to do my work.

Add containers to hud

Hi,
I really like your HUD. But i would like to have one more info. Containers info on HUD. The idea is to put item type and unit mass in container name. Then using core you can get container name by id then from name extract item type and unit mass to calculate container fill ratio. Than add those data to hud (item type, mass, container fill level, liters).

Can't get it to work right

I've been trying to set this up for a while. I set up the first remote control board for chemical, and it was able to turn stuff on and off.
I then set up the next one w/ a new programming for refining and added a new reciever, set the channel,added a databank, connected it to the main board and this board and tried to toggle the industry and nothing happened.

What did I do wrong?

Metal Work Remote control doesn't seem to be working

I've configured the Glass Factories, Recyclers, and chemical factories no problem but no matter what I do for metal work it doesn't seem to work.

I place a programming board
I paste the script to the board
I place a databank
I connect the programming board to the databank
I connect the main board to the databank
I place a receiver, set it to 'receiver_metalworks'
I place a Relay,
Connect Receiver to relay, relay to programming board
I connect a metal work to the programming board
Restart the main board
I find the metal work factory and press ALT+1 to stop it.
The relay blinks
nothing happens.

What did I do wrong?

Outdated

Time Remaining not working
Softstop not Working
Cycles from Start not working

Industry table view not sorting by recipe as it used to

In an earlier version, the table view of the industry list used to be sorted by machine name. If there was no assigned name, then the type of machine was the default name. This made finding a specific machine very easy. It made for determining if a given element/product/whatever was being made. And now that storage is being listed, it too would make it far easier to find a specific container. Unfortunately, at some point, that default action has vanished. Was this intentional? Or an oversight?

Feature Request: Keep Maintain Amount On Restart

Current behavior: You hit ALT+1 to stop the target machine. You then hit ALT+1 to start the target machine. The script doesn't allow you to keep the current maintain rate and will start the machine with only the infinite craft option.

Request: Allow an option that just restarts the machine vs erasing maintain/make numbers. The same behavior as if you were to open the element manually and click "stop" and then "start"

CPU overload on unit Programming Board [4046]

CPU overload on unit Programming Board [4046]
Session stopped: 285921192 / Programming board [4046]

Dismantled each piece step by step until I isolated that the error occurred under every condition until the Master Programming board was disconnected from the Large Core. No errors in the board were provided.

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.