-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore building cars for bounding box calculation #22
Comments
Thanks you for your thorough report. I think you could be on the right track. 'Recalculate base size' should solve this (if the car is 'inside' the base area) as it checks all entities again in order determine the total base size. For a permanent solution, it seems to make sense if we could indeed check what type of entity got build and if it should count as part of the base. So ignoring vehicles seems nice, but I also wonder if combat robotic influence this... (and maybe other entities as well??) |
This patch uses LuaPlayerBuiltEntityEventFilters to make sure that the `TLBE.Main.entity_built ()` callback is not called for vehicles. Fixes veger#22
This patch uses LuaPlayerBuiltEntityEventFilters to make sure that the `TLBE.Main.entity_built ()` callback is not called for vehicles. Additionaly during base size recalculation we skip entities of type `car` (currently cars and tanks). Fixes veger#22
See #23 :) Haven't tested it yet though! |
I'll run a few quick tests soon 😉 |
I wanted to test drive this as well, but haven't yet found time to start up Factorio. Also please note, that this is the first time I ever wrote Lua (pretty nice that Factorio ships the docs in And what is up with 1-base arrays in Lua? :D |
So it appears to be working, but please run some tests of your own ;) |
Thank you for your tests and screenshots! TBH I would expect the first 2 screenshots zoomed in a little more, as the South and West seem empty the zoom level could be higher... 🤔 I'll try and test this weekend when I have some time. |
I had a session today and it seems good enough (even if it the screenshots are not ideal yet). In case you're interested you may have a look at https://fortysixandtwo.eu/upload/basecam.mp4 (might not work in browser, but rightclick -> save and then playing with vlc do the trick - at least that's what my windows using friends had to do). |
When looking at the movie it looks like the height fits (almost? hard to see since it looks like you adjusted/recalculated the area?) perfectly, so I am pretty sure it is the 16:9 aspect ratio indeed. |
Fixed in v1.4.1 |
Hey,
first of all thanks for your mod. It looks really nice and I'm amazed by the possibilities (different kinds of trackers for the camera).
The problem I encountered is that the "viewport" of the camera shows a lot of non base stuff as can be seen
After looking through the code and talking with one of the players I believe the issue is due to the player building/placing his/her car far from the base while on an exploration run.
If I understand the code correctly (I don't know Lua at all) the bounding box for the
base is recalculated in https://github.com/veger/TLBE/blob/master/scripts/main.lua#L77 with the updating
done in https://github.com/veger/TLBE/blob/master/scripts/main.lua#L99
The function
Main.entity_built
is a callback function registered in https://github.com/veger/TLBE/blob/master/control.lua#L58I suggest (I can probably come up with a Pull Request) to ignore any kind of player drivable vehicle in this callback.
Do you think it would be enough to "fix" the base size if I destroyed the cars/drove them closer to base and hit "recalculate base size"?
Or would I need to use the area tracker for my camera?
Thanks in advance!
The text was updated successfully, but these errors were encountered: