Giter Site home page Giter Site logo

ingredient_scrap's Introduction

A small Mod for Factorio built around Scrap.

This Mod is written under Factorio 1.1.33. It inserts its data in the data-updates stage. Affected are only "vanilla-names" (iron, copper, steel). If you want to add scrap for other mods recipes then just edit data-updates.lua where youll find the two array at the top of the file.

example recipes mods recipes

Customize

The _types table holds the patterns and is used to match parts of a recipe name with string.find(). So iron will match iron-plate and hardenend-iron-plate. Even superironbar would be a match. To exclude like copper-plate but still use copper-cables just be more specific. It is also used to contruct the scrap-items like iron-scrap and the recycle recipes like recycle-iron-scrap.

 local _types = {"iron", "copper", "steel"} 

This table holds the result suffix which is then be constructed to _types.."-".._results (eg iron-plate). Like the _types table, this one also goes by priority, so index 1 is taken if possible, if not 2 will be checked etc. When no match is found then the recipe will be ignored and it is also logged. As there will be no recycling of this scrap-item plate is added to the end as some sort of fallback.

 local _results = {"plate"} 

Updates

  • Initial release

Known Issues

  • doesn't work if the item name is in 'reverse' order like plates-osmium instead of osmium-plate
  • a recipe is enabled if no technology which unlocks the result can be found instead of checking the enabled keys
  • scrap colors doesn't fit quite frequently because i didn't implement a tint based icon system, shame on me
  • the scrap icons look awful

Languages

  • english
  • deutsch

ToDo

  • Interface?

How to contribute?

Please use the Issues Tab and share your suggestions and/or code.

ingredient_scrap's People

Contributors

yokmp avatar

Forkers

flagran

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.