Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@cheapie
Copy link
Contributor

@cheapie cheapie commented Jul 12, 2025

This is an alternate to #80 (see discussion there) and fixes #63.

This modifies the conduction rules when the camera outputs a signal slightly. The existing rules are kept (no offset is introduced like in #80) but an extra rule is added that conducts straight downwards.

This allows the original intended use of the cameras (vehicle detection for traffic signals) to work again:
screenshot_20250711_221233

@OgelGames
Copy link
Contributor

camera.lua:1: attempt to index field 'rules' (a nil value)

@S-S-X is something wrong with mineunit? This error shouldn't be possible.

@S-S-X
Copy link
Member

S-S-X commented Jul 12, 2025

camera.lua:1: attempt to index field 'rules' (a nil value)

@S-S-X is something wrong with mineunit? This error shouldn't be possible.

Yes it is issue with mineunit, digiline rules were never before used with simple mod load test and digiline fixture was just empty table:

Technic for example uses digiline fixture that has actual default rules and everything else is function: https://github.com/mt-mods/technic/blob/master/technic/spec/fixtures/digilines.lua

Probably best to just add default rules to spec/fixtures/digilines.lua and just in case also modpath for digilines:

mineunit:set_modpath("digilines", "spec/fixtures")
digilines = {
	rules = {
		default = {
			{x=0,  y=0,  z=-1},
			{x=1,  y=0,  z=0},
			{x=-1, y=0,  z=0},
			{x=0,  y=0,  z=1},
			{x=1,  y=1,  z=0},
			{x=1,  y=-1, z=0},
			{x=-1, y=1,  z=0},
			{x=-1, y=-1, z=0},
			{x=0,  y=1,  z=1},
			{x=0,  y=-1, z=1},
			{x=0,  y=1,  z=-1},
			{x=0,  y=-1, z=-1}
		}
	}
}

@OgelGames
Copy link
Contributor

Ah, so it's fake digilines, not the actual mod being loaded.

@2424barrier
Copy link

Yeah, this is actually a really good solution! That way minimal builds are affected by the change.

@cheapie
Copy link
Contributor Author

cheapie commented Jul 15, 2025

@S-S-X Do you think you or someone could perhaps take a look at this now that OgelGames fixed the test, and see if it's ready to merge? I have a player or two nagging me about this PR and would like to know if everything's good now or if any adjustments are still needed.

@OgelGames OgelGames merged commit aae4a12 into mt-mods:master Jul 15, 2025
2 checks passed
@OgelGames
Copy link
Contributor

Sorry I meant to merge this sooner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect camera digilines signal position

4 participants