Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MetaDataRef not fully functional #2

Open
S-S-X opened this issue Nov 21, 2020 · 5 comments
Open

MetaDataRef not fully functional #2

S-S-X opened this issue Nov 21, 2020 · 5 comments
Labels
enhancement New feature or request WIP Work in progress

Comments

@S-S-X
Copy link
Owner

S-S-X commented Nov 21, 2020

Implement rest of MetaDataRef:
https://github.com/mt-mods/mineunit/blob/master/metadata.lua

Basically simply just replace error("NOT IMPLEMENTED") with correctly arranged stream of bytes that will make it do something similar what comments above function signature says.

edit. well no comments at all in that file... sorry about that but here's what should fix it: https://minetest.gitlab.io/minetest/class-reference/#metadataref

@S-S-X S-S-X added the enhancement New feature or request label Nov 21, 2020
@S-S-X
Copy link
Owner Author

S-S-X commented Nov 24, 2020

NodeMetaRef and InvRef added, also few more methods implemented.

@S-S-X
Copy link
Owner Author

S-S-X commented Mar 10, 2021

PR #14 implements many missing features but still not complete.

@S-S-X S-S-X added the good first issue Good for newcomers label Sep 17, 2021
@S-S-X S-S-X mentioned this issue Oct 22, 2021
@S-S-X
Copy link
Owner Author

S-S-X commented Oct 22, 2021

to_table for MetaDataRef was completely wrong, looked at engine code and hopefully fixed now ^

@S-S-X
Copy link
Owner Author

S-S-X commented Nov 19, 2021

To verify NodeMetaRef:to_table() compatibility here's simple dump for that done with engine:

{
	fields = {
		tube_time = "0",
		formspec = "size[8,9;]list[context;src;3,1;1,1;]label[0,0;MV Tool Workshop]list[context;upgrade1;1,3;1,1;]list[context;upgrade2;2,3;1,1;]label[1,4;Upgrade Slots]list[current_player;main;0,5;8,4;]listring[current_player;main]listring[context;src]listring[current_player;main]listring[context;upgrade1]listring[current_player;main]listring[context;upgrade2]listring[current_player;main]",
		infotext = "MV Tool Workshop Idle",
		MV_EU_demand = "0",
		MV_EU_input = "0"
	},
	inventory = {
		upgrade2 = {
			ItemStack("")
		},
		upgrade1 = {
			ItemStack("")
		},
		src = {
			ItemStack("technic:lava_can")
		}
	}
}

I think it is correct already but there might still be -- TODO: comment about verifying it.

@S-S-X S-S-X added WIP Work in progress and removed good first issue Good for newcomers labels Nov 23, 2021
@S-S-X
Copy link
Owner Author

S-S-X commented Nov 23, 2021

Removing InvList type completely, even for internal use.
InvRef will take over and handles all inventory list operation directly.

Some tests should be also added for verified correct behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request WIP Work in progress
Projects
Status: Ready
Development

No branches or pull requests

1 participant