Attention: All existing users will need to reset their password before being able to log in. Click here to reset. For more information on why, click here. (September 26) x


Thread Rating:
  • 6 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature] Update Manufacturer screens to clearly show what they can and can't build
#1
Small update to manufacturer's html screens.
  • Hyperlinks no longer work for manufacturable items that don't have enough materials to build. The text is now red.
  • The required materials section underneath manufacturable items now is a bit more helpful. Materials that the manufacturer doesn't have available, now display in red lettering and materials that are available still use the current black.
Image below really shows it all:


[Image: 2eCVc10.png]

technical notes:

This could definitely be made more efficient, but these screens are never really updated and only one person can really use one at a time. 

It does a check on whether the machine can build each manufacturable item as they are added to the html list, which is not very efficient. For listing each material and whether or not that type exists in the machine (which was a huuuuge pain) it has to loop through all materials the machine has inside of it, then if the current material is found, then it is drawn black, otherwise it's drawn red. This seems more efficient than using the material_check method for activating/deactivating the hyperlink, but that seems to work well enough for what I wanted to do and I assume it works perfectly for what it was meant to do, so I thought trying to go around that tried and true process for efficiency's sake wasn't worth the risk or time.

https://github.com/goonstation/goonstation-2016/pull/82
Reply
#2
Simple. Useful. Easy to use. A quality patch.

+1
Reply
#3
(10-15-2018, 07:11 AM)Firebarrage Wrote: Simple. Useful. Easy to use. A quality patch.

+1
Reply
#4
Thanks for patch that takes away the guessing game of manufacturers.

(10-17-2018, 07:34 AM)MrMagolor Wrote:
(10-15-2018, 07:11 AM)Firebarrage Wrote: Simple. Useful. Easy to use. A quality patch.

+1
Reply
#5
yeet
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)