Skip to content

use voxel manip for lv light illumination#292

Merged
OgelGames merged 3 commits intolamp_node_timersfrom
lv-light-vmanip
Nov 18, 2022
Merged

use voxel manip for lv light illumination#292
OgelGames merged 3 commits intolamp_node_timersfrom
lv-light-vmanip

Conversation

@BuckarooBanzay
Copy link
Member

@BuckarooBanzay BuckarooBanzay commented Nov 17, 2022

As promised in #291

Timings:

  • Old code: 10 to 20 ms
  • New code: 2 to 8 ms

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?

@BuckarooBanzay BuckarooBanzay added Enhancement New feature or request Performance Aims to improve technical performance. labels Nov 17, 2022
@S-S-X
Copy link
Member

S-S-X commented Nov 17, 2022

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: S-S-X/mineunit#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 OgelGames changed the base branch from master to lamp_node_timers November 18, 2022 04:10
@OgelGames
Copy link
Contributor

@github-actions
Copy link

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)

@OgelGames OgelGames merged commit f366b61 into lamp_node_timers Nov 18, 2022
@OgelGames OgelGames deleted the lv-light-vmanip branch November 18, 2022 04:23
@Athozus Athozus added this to the 2.0.0 milestone Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Performance Aims to improve technical performance.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants