Skip to content

Provide numeric biome IDs #91

@Montandalar

Description

@Montandalar

This is the terminal output when I add the demo test specs to aussieforks/australia

.minetest/mods/australia$ mineunit
I:	Mineunit configuration loaded from	spec/mineunit.conf
I:	Mod configuration loaded from	mod.conf
I:	Setting modpath	australia	.
I:	Mineunit initialized, current modname is	australia
I:	File not found:	spec/fixtures/fonts
I:	File not found:	spec/fixtures/fonts
I:	Settings object created from:	spec/fixtures/minetest.conf
I:	Running custom core.get_us_time with step increment: 100
I:	Loading fixture	spec/fixtures/default.lua
I:	Loading fixture	spec/fixtures/mesecons.lua
I:	Setting modpath	mesecons	spec/fixtures
I:	Setting modpath	mesecons_mvps	spec/fixtures
I:	Loading fixture	spec/fixtures/digilines.lua
I:	Setting modpath	digilines	spec/fixtures
I:	Loading fixture	spec/fixtures/pipeworks.lua
I:	Setting modpath	pipeworks	spec/fixtures
I:	Loading source	init.lua
E:	* Not loading MOD: Australia *
E:	MOD: Australia requires mod functions which are
E:	 not exposed by your Minetest build.
I:	Executing register_on_mods_loaded functions
I:	Sam places node default:sand at (0,1,0)
●I:	node under is buildable to
I:	Sam places node default:sandstone at (2,1,0)
●I:	node under is buildable to
I:	Sam places node default:sandstonebrick at (3,1,0)
●I:	node under is buildable to
I:	Sam places node default:stonebrick at (4,1,0)
●I:	node under is buildable to
I:	Sam places node default:furnace at (5,1,0)
●I:	node under is buildable to
I:	Sam places node default:stone at (6,1,0)
●I:	node under is buildable to
I:	Sam places node default:steelblock at (7,1,0)
●◌●
8 successes / 0 failures / 0 errors / 1 pending : 0.024418 seconds

Pending → spec/init_spec.lua @ 61
Demo tests placed all nodes
spec/init_spec.lua:61: This test might be too simple for potentially complex operation and fails if node is changed

The mod code doesn't load due to a missing C++ API function (l_get_biome_id)

The builtin Lua code does not manage these numeric IDs, rather they have a C++ getter available as minetest.get_biome_id. How should these IDs be provided, some kind of fork to the builtin code to record biome IDs inside Lua so they can be provided later? I'm just not sure where the code would go or I'd bring a PR. I do think it belongs inside mineunit instead of a test fixture.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions