mt-mods / technic

Technic mod for Minetest
18 stars 25 forks source link

use voxel manip for lv light illumination #292

Closed BuckarooBanzay closed 2 years ago

BuckarooBanzay commented 2 years ago

As promised in #291

Timings:

Test failures:

Failure → spec/lv_network_spec.lua @ 118
LV machine network charges battery box
spec/lv_network_spec.lua:121: Expected (number) 0 to be more than (number) 1000

Error → spec/lv_network_spec.lua @ 95
LV machine network executes network
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Error → spec/lv_network_spec.lua @ 104
LV machine network kills network when switching station disappear
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Error → spec/lv_network_spec.lua @ 124
LV machine network smelts ores
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Error → spec/lv_network_spec.lua @ 134
LV machine network grinds ores
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Error → spec/lv_network_spec.lua @ 144
LV machine network comperess sand
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Error → spec/lv_network_spec.lua @ 154
LV machine network cuts power when generators disappear
machines/LV/lamp.lua:42: attempt to index global 'VoxelArea' (a nil value)

Should be mostly mineunit related (missing VoxelArea var)

@S-S-X suggestions? i haven't looked into it but how much work would it be to implement the VoxelArea function in mineunit?

S-S-X commented 2 years ago

how much work would it be to implement the VoxelArea function in mineunit?

I think it might already work but only if using actual complete engine core libraries (with mineunit --fetch-core 5.6.1 --engine-version 5.6.1) Never tested but discussed here: https://github.com/S-S-X/mineunit/pull/84 (could also just merge that PR to include VoxelArea in base mineunit without downloading engine libraries). VoxelArea is Lua class, basically just VoxelManip utility wrapper.

Mineunit contains some Minetest engine core libraries but those are 1. incomplete 2. fairly old 3. from random dev commit, not release.

Also haven't tested --engine-version that much and never with 5.6.1, I think latest I've tested was probably 5.4 or at most 5.5

OgelGames commented 2 years ago

FYI, VoxelArea:iterp(minp, maxp) exists: https://github.com/minetest/minetest/blob/587f6656a4b86346e35da1b43b48b832d3f1b32e/doc/lua_api.txt#L4455

github-actions[bot] commented 2 years ago
Mineunit failed regression tests, click for details ### Regression test log for Technic CNC: ``` ``` ### Regression test log for Technic Chests: ``` ``` ### Regression test log for Technic: ``` ●◌◌●●●◌●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●✱✱✱✱✱✱◼●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●◌●●●●●W: Deprecated technic.register_power_tool use. Setting max_charge for oldlegacy:powertool W: Deprecated technic.register_power_tool use. Setting max_charge for oldminimal:powertool W: Deprecated technic.register_power_tool use. Setting max_charge for oldhalfway:powertool W: Deprecated technic.register_power_tool use. Ensuring fields for oldlegacy:powertool W: Using metadata charge values for oldlegacy:powertool W: Updated legacy Technic power tool definition for oldlegacy:powertool W: Deprecated technic.register_power_tool use. Ensuring fields for oldminimal:powertool W: Using metadata charge values for oldminimal:powertool W: Updated legacy Technic power tool definition for oldminimal:powertool W: Deprecated technic.register_power_tool use. Ensuring fields for oldhalfway:powertool W: Mod oldhalfway seems to be aware of technic.plus but oldhalfway:powertool is still using deprecated registration, skipping meta charge compatibility. W: Updated legacy Technic power tool definition for oldhalfway:powertool ●●●●W: Use of deprecated function technic.set_RE_wear with stack: oldlegacy:powertool ●W: Use of deprecated function technic.set_RE_wear with stack: oldlegacy:powertool ●●●●●●●W: Use of deprecated function technic.set_RE_wear with stack: oldminimal:powertool ●W: Use of deprecated function technic.set_RE_wear with stack: oldminimal:powertool ●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●●● 211 successes / 1 failure / 6 errors / 4 pending : 6.833233 seconds Pending → spec/api_spec.lua @ 133 Technic API Machine registration registers my_mod:my_battery spec/api_spec.lua:133: Battery box registration does not include all fields Pending → spec/api_spec.lua @ 190 Technic API Machine registration registers my_mod:machine_base spec/api_spec.lua:190: Base machine registration does not include all fields Pending → spec/api_spec.lua @ 285 Technic API internals technic.cables TBD, misleading name and should be updated spec/api_spec.lua:285: TBD technic.cables naming and need, see technic networks data for possible options Pending → spec/supply_converter_spec.lua @ 78 Supply converter building overloads network spec/supply_converter_spec.lua:78: overload does not work with supply converter Failure → spec/lv_network_spec.lua @ 154 LV machine network cuts power when generators disappear spec/lv_network_spec.lua:159: Expected objects to not be the same. Passed in: (nil) Did not expect: type nil Error → spec/lv_network_spec.lua @ 95 LV machine network executes network machines/LV/lamp.lua:39: attempt to index global 'VoxelArea' (a nil value) Error → spec/lv_network_spec.lua @ 104 LV machine network kills network when switching station disappear machines/LV/lamp.lua:39: attempt to index global 'VoxelArea' (a nil value) Error → spec/lv_network_spec.lua @ 118 LV machine network charges battery box spec/lv_network_spec.lua:121: attempt to index local 'net' (a nil value) Error → spec/lv_network_spec.lua @ 124 LV machine network smelts ores machines/LV/lamp.lua:39: attempt to index global 'VoxelArea' (a nil value) Error → spec/lv_network_spec.lua @ 134 LV machine network grinds ores machines/LV/lamp.lua:39: attempt to index global 'VoxelArea' (a nil value) Error → spec/lv_network_spec.lua @ 144 LV machine network comperess sand machines/LV/lamp.lua:39: attempt to index global 'VoxelArea' (a nil value) ```