Giter VIP home page Giter VIP logo

crafting's Introduction

Hi, I'm rubenwardy ๐Ÿ‘‹

Iโ€™m a graduate from the University of Bristol and a core developer for Minetest, an open source voxel game engine.

I have a diverse range of interests, both technical and non-technical. Examples include full-stack development, game dev, and Android development. I've recently been spending a lot of time learning how to cook new things ๐Ÿ๐Ÿ”ฅ.

Note that I mostly use GitLab these days.

Make sure to take a look at my website, blog, or Mastodon!

crafting's People

Contributors

amaz1 avatar derixithy avatar jeremyshannon avatar lonewolfht avatar panquesito7 avatar rubenwardy avatar savilli avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crafting's Issues

Inventory window optimisation

Actual for version 75c9240
As far as I understand, function crafting.make_result_selector is called on each update of player inventory: on opening, on filtering and on switching pages.
It does a lot of string concatenation, which can be avoided.

I propose to store inventory formspecs in special array in crafting object for each filtering query and for each inventory page.
It will take more server memory at the cost of speed of construction inventory screen window

Crafting skill and quality

Players have a crafting level which effects how fast and how good what they make is.

Maybe not for simple inventory / workbench crafts, but for more skilled tasks such as sword smithing, clothes, furniture, and art.

crafting/util.lua:537: attempt to get length of local 'recipes' (a nil value)

under server 5.2.0
client : unknown
story : not known, there is no clear action could explain who or what

mod : cf1ad1b/09.05.2017

guessing, typical client change IP or just disappeared gamer during mod started ...

2022-02-21 22:16:38: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'crafting' in callback nodemeta_inventory_OnTake(): /home/thomas/.minetest/mods/crafting/util.lua:537: attempt to get length of local 'recipes' (a nil value) 2022-02-21 22:16:38: ERROR[Main]: stack traceback: 2022-02-21 22:16:38: ERROR[Main]: /home/thomas/.minetest/mods/crafting/util.lua:537: in function 'get_crafting_result' 2022-02-21 22:16:38: ERROR[Main]: /home/thomas/.minetest/mods/crafting/table.lua:78: in function 'take_craft' 2022-02-21 22:16:38: ERROR[Main]:

Add support for 0.4.16

2018-04-04 10:29:18: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'sfinv' in callback ScriptApiPlayer::on_joinplayer(): ...\minetest-0.4.16-win32-msvc\bin\..\mods\crafting/api.lua:218: attempt to call field 'sha1' (a nil value)
2018-04-04 10:29:18: ERROR[Main]: stack traceback:
2018-04-04 10:29:18: ERROR[Main]: 	...\minetest-0.4.16-win32-msvc\bin\..\mods\crafting/api.lua:218: in function 'calc_inventory_list_hash'
2018-04-04 10:29:18: ERROR[Main]: 	...test-0.4.16-win32-msvc\bin\..\mods\crafting/stations.lua:27: in function 'get_formspec'
2018-04-04 10:29:18: ERROR[Main]: 	...win32-msvc\bin\..\games\minetest_game\mods\sfinv/api.lua:111: in function 'set_player_inventory_formspec'
2018-04-04 10:29:18: ERROR[Main]: 	...win32-msvc\bin\..\games\minetest_game\mods\sfinv/api.lua:132: in function <...win32-msvc\bin\..\games\minetest_game\mods\sfinv/api.lua:130>
2018-04-04 10:29:18: ERROR[Main]: 	...etest-0.4.16-win32-msvc\bin\..\builtin\game\register.lua:412: in function <...etest-0.4.16-win32-msvc\bin\..\builtin\game\register.lua:392>

Add ability to unlock recipes

Not sure how to do this. Games may want tech trees or just random unlocks, it's better to provide a nice API for this

Output grouping

I'd like to ask for a feature to group output items so that multiple recipes with the same output gets only one entry in the crafts table.

Like this, as an example:

group 2

Now, obviously I didnโ€™t manage to combine several identical ingredients into one so with better code the tooltip will of course be much shorter.

crash due to https://github.com/minetest/minetest/commit/0b8d3f99a5424113178329e56c2ebe4b38fd2b46

log:

2020-02-24 08:53:55: ERROR[Main]: ModError: Failed to load and run script from /root/.minetest/games/ctf/mods/other/crafting/init.lua:
2020-02-24 08:53:55: ERROR[Main]: /root/.minetest/games/ctf/mods/other/crafting/stations.lua:55: bad argument #1 to 'pairs' (value expected)
2020-02-24 08:53:55: ERROR[Main]: stack traceback:
2020-02-24 08:53:55: ERROR[Main]: 	[C]: in function 'pairs'
2020-02-24 08:53:55: ERROR[Main]: 	/root/.minetest/games/ctf/mods/other/crafting/stations.lua:55: in function 'check_for_changes'
2020-02-24 08:53:55: ERROR[Main]: 	/root/.minetest/games/ctf/mods/other/crafting/stations.lua:67: in main chunk
2020-02-24 08:53:55: ERROR[Main]: 	[C]: in function 'dofile'
2020-02-24 08:53:55: ERROR[Main]: 	/root/.minetest/games/ctf/mods/other/crafting/init.lua:22: in main chunk

(minetest/minetest#9428)

Recipe unlock issues

When you change the output amount, for example unlocks_crafts = { "crafts:plant_fibre" } to unlocks_crafts = { "crafts:plant_fibre" 3 }, you create a potential domino effect where the next recipe in a chain might not set always_known = true, and instead depend on an award to unlock it.

If the award in question has unlocks_crafts = { "crafts:plant_fibre" } in the trigger, all of a sudden it's broken and needs to be changed to unlocks_crafts = { "crafts:plant_fibre 3" }, due to the change in the crafting registration.

This could easily lead to unintentional breakages when trying to edit recipes for game balance.

A second issue due to this is that if you define two different crafting recipes for an item and making x amount of that item is the unlock for another recipe, you can't make sure the total needed for the unlock increments with each item made.

A better system would be to have crafting recipes unlock based on total made, not based on total uses of a given recipe.

Top player inventory row not visible in crafting bench

Something happened with the top player inventory row in crafting when using the crafting bench and similar stations. It's still visible in the sfinv tab but not in stations. Take a look at this clip (sfinv tab first, station second)

What could be causing this?

I've tried it both in 0.4.17.1 and in 0.5.0-dev with the same results.

Context menus for alternatives

It's silly to have a button for each type of tool. Making it so you can click a generic icon then see options would be better - like in terraria

Reduce mouse clicking for bulk crafting

It's currently only possible to complete a recipe once per click, which can quickly get less than user friendly.

Can we please add alternatives for bulk crafting? For example, either hold down to complete multiple times or have right/left/middle click trigger the recipe different numbers of times.

Add furnace

Should support multiple inputs for alloying, and a fuel slot, and have multiple outputs
One of the only machines you can leave running

Crafting with full inventory

It has happend to me twice. I had full inventory with 4 mese or more. Then I dug something and forgot that I have full inventory and I pressed "craft mese sword" button. And yay mese sword disappeared unknown where, so I didn't get it.
I think this is a bug because sword should be dropped and not wasted when you have full inventory.

Add craft station levels

For example, furnaces could have the levels:

  1. basic station - level 1 recipes only
  2. station - level 2 recipes plus the recipes of the above level 1 station
  3. alien station - level 3 recipes plus the recipes of the above level 2 station

or whatever.

Recipes would then be defined like:

crafting.register_craft({
    type = "furnace",
    level = 2,   -- can be made on Level 2 or 3 furnaces
    output = "default:iron_ingot",
    items = { "default:iron_ore" }
})

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.