[MOD 1.1] Inventory Sensor

Topics and discussion about specific mods
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.3

Post by Optera »

Last chance: :D
Image
Looks more like infinite loop than crafting progress to me. The progress bar is instantly recognizable, though my graphic skills made it look terrible.
Btw you can go further and improve it by adding check for "entity.get_output_inventory().is_empty()" like in Bottleneck to maintain sending 100% signal.
Also can be added signal for bonus progress "entity.bonus_progress".
A clogged output is a different state from 100% progress. Unless your goal is to clog the output :P
I don't see how bonus progress could be made into something useful for the circuit network.
User avatar
ZlovreD
Fast Inserter
Fast Inserter
Posts: 129
Joined: Thu Apr 06, 2017 1:07 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.3

Post by ZlovreD »

Optera wrote:A clogged output is a different state from 100% progress. Unless your goal is to clog the output :P
I don't see how bonus progress could be made into something useful for the circuit network.
As an extra cup holder in the trunk, but some auto manufacturers did it and add it as extra option. :lol:
GenBOOM
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue May 16, 2017 11:39 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.4

Post by GenBOOM »

loading error due to sprite being 32x32 instead of expected 64z64 for Inventory Sensor_1.4.4\graphics\icons\inventory-sensor.png
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.4

Post by Optera »

GenBOOM wrote:loading error due to sprite being 32x32 instead of expected 64z64 for Inventory Sensor_1.4.4\graphics\icons\inventory-sensor.png
Odd I never noticed this. Fixed in next release
afwilson
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Jun 02, 2016 8:57 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.5

Post by afwilson »

First and foremost, thank you for authoring this mod. I quite enjoy it.

I've got a very small bug to report. After going from 15.11 to 15.15, when loading a save-game I'm getting a dialog box with the error message below. This doesn't happen on every save. It seems to be a conflict with the "Combinator Graph Generator" mod as turning either mod off allows a normal load. Will post to the other mod author too.

So a very small bug with a very easy work-around.

Code: Select all

Notice

Error while running event inventory
Sensor::on_tick(ID 0)
LauInventory API call when LuaInventory was invalid
stack traceback:
__inventorySensor__/control.lua:266:in function 'updateSensor'
__inventorySensor__/control/lua:100:in function<__inventorySensor__/control.lua:91
(OK)
GATOCHOCOLATE
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Mar 28, 2017 3:35 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.6

Post by GATOCHOCOLATE »

Hi. Can someone explains me that questions?

red: Why the output of the inventoy sensor are one solids wagon when he is reading a fluids wagon?

green: why the content of the fluid wagon is water ant the inventory sensor dont out put it?

Thanks.
Attachments
inventory sensor.png
inventory sensor.png (1.48 MiB) Viewed 7414 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.6

Post by Optera »

afwilson wrote:First and foremost, thank you for authoring this mod. I quite enjoy it.

I've got a very small bug to report. After going from 15.11 to 15.15, when loading a save-game I'm getting a dialog box with the error message below. This doesn't happen on every save. It seems to be a conflict with the "Combinator Graph Generator" mod as turning either mod off allows a normal load. Will post to the other mod author too.

So a very small bug with a very easy work-around.

Code: Select all

Notice

Error while running event inventory
Sensor::on_tick(ID 0)
LauInventory API call when LuaInventory was invalid
stack traceback:
__inventorySensor__/control.lua:266:in function 'updateSensor'
__inventorySensor__/control/lua:100:in function<__inventorySensor__/control.lua:91
(OK)
Why would an inventory become invalid but not the entity?
GATOCHOCOLATE wrote:Hi. Can someone explains me that questions?

red: Why the output of the inventoy sensor are one solids wagon when he is reading a fluids wagon?

green: why the content of the fluid wagon is water ant the inventory sensor dont out put it?

Thanks.
It doesn't discern between cargo wagon and fluid wagon.

I currently round fluids mathematically correct. 0.4 is rounded down above 0.5 it's rounded up.
For unloading fluid wagons it would probably be better to always round up. I'll change that in the next release.
deeje
Burner Inserter
Burner Inserter
Posts: 7
Joined: Mon May 01, 2017 11:26 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.6

Post by deeje »

Optera wrote: It doesn't discern between cargo wagon and fluid wagon.

I currently round fluids mathematically correct. 0.4 is rounded down above 0.5 it's rounded up.
For unloading fluid wagons it would probably be better to always round up. I'll change that in the next release.
Thanks for this tip. After modifying control.lua, my fluid wagon unloading is working great again!
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Optera »

deeje wrote: Thanks for this tip. After modifying control.lua, my fluid wagon unloading is working great again!
Sorry, I totally forgot to release the changed version.
Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Zarnoo »

I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Optera »

Zarnoo wrote:I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
Vertical works just fine for me.
Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Zarnoo »

Optera wrote:
Zarnoo wrote:I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
Vertical works just fine for me.
I stripped it back to 100% vanilla, plus just this mod, and as you can see from the same train, it works horizontally, but not vertically.. for some reason
vertical.jpg
vertical.jpg (118.56 KiB) Viewed 7330 times
horizontal.jpg
horizontal.jpg (106.88 KiB) Viewed 7330 times
Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Zarnoo »

Zarnoo wrote:
Optera wrote:
Zarnoo wrote:I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
Vertical works just fine for me.
I stripped it back to 100% vanilla, plus just this mod, and as you can see from the same train, it works horizontally, but not vertically.. for some reason
vertical.jpg
horizontal.jpg
Did a little debugging. If I change the BBox_offset = 1.5, then it works, but not in the bottom-most corner of the train carriage (so if I put the sensor 1 block up, or near the middle of the carriage). I think it's got something to do with the fact that tracks occupy more than 1 square, but not 100% sure and looking at your math for calculating the scan area, that all looks right. So.. it's weird.
Z
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Optera »

Zarnoo wrote:
Optera wrote:
Zarnoo wrote:I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
Vertical works just fine for me.
I stripped it back to 100% vanilla, plus just this mod, and as you can see from the same train, it works horizontally, but not vertically.. for some reason
vertical.jpg
horizontal.jpg
Rotate the sensor to face the entity. In your vertical screenshot they are facing south.

PS: Scan area is determined during sensor creation and stored internally for the lifetime of a sensor. Changing rotation of sensors either through script or mods like Nexela's Picker Extended will not update the scan area.
Zarnoo
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Thu Mar 31, 2016 6:01 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.7

Post by Zarnoo »

Optera wrote:
Zarnoo wrote:
Optera wrote:
Zarnoo wrote:I have a weird issue, where if I have a horizontal train track, then it works fine, but if the track does vertically (North-South), and it doesn't read the train. I could provide screenshots, but not sure it would show anything other than I've said.
Z
Vertical works just fine for me.
I stripped it back to 100% vanilla, plus just this mod, and as you can see from the same train, it works horizontally, but not vertically.. for some reason
vertical.jpg
horizontal.jpg
Rotate the sensor to face the entity. In your vertical screenshot they are facing south.

PS: Scan area is determined during sensor creation and stored internally for the lifetime of a sensor. Changing rotation of sensors either through script or mods like Nexela's Picker Extended will not update the scan area.
Aha... there you go.. didn't realise it needed rotating
abordoli
Fast Inserter
Fast Inserter
Posts: 131
Joined: Thu May 25, 2017 1:19 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.11

Post by abordoli »

Does it (or could it) sense the amount of fuel in a vehicle?
Regards,
~B
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.11

Post by Optera »

abordoli wrote:Does it (or could it) sense the amount of fuel in a vehicle?
Regards,
~B
All inventories including fuel input and burned result (spend fuel cells at reactors) are scanned.
It does not generate a fuel value in MJ like Smarter Trains.
abordoli
Fast Inserter
Fast Inserter
Posts: 131
Joined: Thu May 25, 2017 1:19 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.11

Post by abordoli »

Optera wrote:
abordoli wrote:Does it (or could it) sense the amount of fuel in a vehicle?
Regards,
~B
All inventories including fuel input and burned result (spend fuel cells at reactors) are scanned.
It does not generate a fuel value in MJ like Smarter Trains.
Nice. I'll use it then to solve a problem I'm having.
~B
Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 299
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.11

Post by Jürgen Erhard »

Whee! Could you add reading the vehicle grid? I just found out I'm also using your vehicle grid mod, so that could be possible? Please?

OTOH, I don't even know if you can use inserters to equip locomotives... if that's not possible (and I suspect it isn't), then of course this wish is moot.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.14/0.15] Inventory Sensor 1.4.11

Post by Optera »

Jürgen Erhard wrote:Whee! Could you add reading the vehicle grid? I just found out I'm also using your vehicle grid mod, so that could be possible? Please?

OTOH, I don't even know if you can use inserters to equip locomotives... if that's not possible (and I suspect it isn't), then of course this wish is moot.
I thought about that before.
Sadly grids can only be accessed manually or through script. It's very annoying writing an script to play grid tetris to properly utilize the whole space.
Maybe Train Constructor could add that as feature as it's using another train as blueprint.
Post Reply

Return to “Mods”