ReikaKalseki / Reika_FactorioMods_Issues

The issue tracker for all of my Factorio mods - EndgameCombat, NauvisDay, Geothermal, Oreverhaul, and the rest.
5 stars 1 forks source link

[Bioluminescence] 0.17: spawned plants highlight, but can't be removed in any way #172

Closed slippycheeze closed 5 years ago

slippycheeze commented 5 years ago

G'day. Looks like in the current version on 0.17, for me, plants spawn and glow, but can't be removed. Their interaction boxes and names show up fine, but none of these work:

Mod list, though:

aai-signal-transmission_0.1.6.zip
aai-signals_0.4.2.zip
AlertsList_0.1.2.zip
alien-biomes-hr-terrain_0.4.1.zip
alien-biomes_0.4.15.zip
AutoDeconstruct_0.1.12.zip
Automatic_Train_Painter_0.2.9.zip
beltSorter_0.6.0.zip
BigDrills_0.5.4.zip
Bioluminescence_1.17.6.zip
Blue-Ghosts_0.17.1.zip
blueprint_flip_and_turn_1.1.5.zip
Bottleneck_0.10.4.zip
bullet-trails_0.4.1.zip
chunk-sized-roboports_1.4.0.zip
ChunkyChunks_1.0.6.zip
ClosestFirst_0.17.3.zip
crafting_combinator_0.10.16.zip
DeadlockResearchNotifications_1.0.0.zip
Dectorio_0.9.14.zip
deep_blue_seen_0.17.1.zip
DiscoScience_0.1.11.zip
DoRobotsBuildAutomaticTrains_1.0.2.zip
DragonIndustries_1.17.6.zip
FactorIO_1.17.6.zip
factoryplanner_0.17.14.zip
Flare Stack_2.2.3.zip
fws_0.2.2.zip
GDIWHotkey_1.3.0.zip
GDIW_0.17.5.zip
Geothermal_1.17.6.zip
LandmineGridlock_1.0.1.zip
laser_fix_0.17.7.zip
LightedPolesPlus_1.3.5.zip
LogisticRequestHinter_1.1.1.zip
LogisticTrainNetwork_1.10.11.zip
long-reach_0.0.13.zip
LTN_Combinator_0.3.4.zip
LTN_Content_Reader_0.2.6.zip
LTN_Tracker_0.10.9.zip
magic-lamp_0.17.4.zip
miniloader_1.7.12.zip
mod-list.json
mod-settings.dat
nicefill_0.1.14.zip
nixie-tubes_0.17.3.zip
OpteraLib_0.1.7.zip
PickerAtheneum_1.0.5.zip
PickerPipeTools_1.0.1.zip
PipeMeterRedux_0.2.0.zip
power-grid-comb_0.17.3.zip
Power_To_Liquid_updated_0.4.1.zip
production-monitor_0.17.0.zip
QueueToFront_0.17.3.zip
QuickDeconstruct_1.0.0.zip
railloader_0.6.1.zip
RailTools_0.1.2.zip
Realistic_Electric_Trains_0.4.3.zip
reasonable-colours_0.0.1.zip
recursive-blueprints_0.17.6.zip
ReStack_0.5.4.zip
romulinhosresearchqueuealwaystrue_1.1.0.zip
SantasNixieTubeDisplay_0.1.9.zip
SchallTransportGroup_0.17.0.zip
Side Inserters_2.3.5.zip
some-corpsemarker_0.17.2.zip
speaker-signals-expansion_0.17.2.zip
speaker-signals_0.17.0.zip
Squeak Through_1.3.0.zip
StackSizeCombinator_0.1.2.zip
stdlib_1.1.1.zip
there-is-my-ghost_0.17.7.zip
underground-pipe-pack_0.17.1.zip
UnminableLogisticBots_1.0.2.zip
UtilizationMonitor_0.5.0.zip
visual-signals_0.17.0.zip
WagonColors_0.1.1.zip
WireShortcuts_0.2.178.zip
ReikaKalseki commented 5 years ago

This is intentional, aside from trees (which can be mined as normal). They (again excepting trees) have no collision; why do you want to remove them?

slippycheeze commented 5 years ago

They (again excepting trees) have no collision; why do you want to remove them?

Huh. They seem to block building things - rails, walls, buildings, etc - in the square they occupy. So, they are pretty little spots on the map that make it impossible to lay things out if you are unlucky. Jinking a train line around a tiny bush seems ... odd. ;)

If they are supposed to be possible to replace with stuff when building, something in my setup prevents that. If not... I guess that'd be the feature request?

ReikaKalseki commented 5 years ago

Huh. They seem to block building things - rails, walls, buildings, etc - in the square they occupy.

That is not supposed to be the case; they are supposed to be like decoratives (though not removed like them when built over).

doktorstick commented 5 years ago

Can confirm.

image

ReikaKalseki commented 5 years ago

I asked on the discord; this is a result of them colliding with water (so that they cannot exist on water); doing this also makes them collide with whatever collides with water...

slippycheeze commented 5 years ago

Ah! Sounds like I'm not imagining things, and thank you so much for figuring that out. I'll be super-glad to have your shiny trees back soon. :)

ReikaKalseki commented 5 years ago

I currently have no ideas as to a fix.

ReikaKalseki commented 5 years ago

Fixed. https://forums.factorio.com/viewtopic.php?f=25&t=72616&p=439071#p439071

Funketime commented 5 years ago

Sorry to add to a closed bug, but I read that you had not solution days ago and I did some research tonight, so when I came back to report what I found, I see you already have a solution. Anyway, this is what I found.

Line 202 in functions.lua -> collision_mask = {"water-tile"}, can be fixed with Line 202 in functions.lua -> collision_mask = {"colliding-with-tiles-only", "water-tile"}, as you have already learned. The problem could also be fixed by dropping the mask Line 202 in functions.lua -> collision_mask = {}, but this has the undesired effect of rendering the tile on water. However, I found that you already have two ways to combat that.

Line 82 in functions.lua -> if class == "bush" and (not water) then which seems to look for the word water in the name of the tile. This works for the base game and with all of your mods that I have loaded. There are no instances of the bush appearing in water when testing. I can imagine that some mods could creates a water tile and name it without using water in the title so this is a sub-optimal solution.

Line 23 in functions.lua -> if surface.can_place_entity{name = ename, position = {x, y}} and not isWaterEdge(surface, x, y) then uses isWaterEdge from World.lua in your core module. It seems to look at the layer property and prevent placement when an item is within a block of a water tile. I tested this as the only way to prevent water placement and found that it does not work. Partial line 2 in world.lua -> surface.get_tile{x-1, y}.prototype.layer == "water-tile" surface.get_tile{x, y}.prototype.layer returns an unsigned integer, but I seems like you are comparing it to a string. I didn't understand how this would work. More importantly, through testing, it didn't work and would allow water placement even thought every tile around it was a water tile.

I am not a good enough programmer to figure this out, or Factorio may have changed how this works in an update and now has broken one of your core functions, so I wanted to pass this on to you for you to ignore or not. I am not asking for you to do anything, but after all my testing I thought that this is a good a place to save the knowledge as any.

TL:TD Your solution seems to be the best, and the core isWaterEdge function doesn't seem to work as intended.

ReikaKalseki commented 5 years ago

Your solution was my old solution, before I added the collision. It does nothing to address the case of when the water is added later.

thereaverofdarkness commented 4 months ago

I don't know if this is relevant, but I like having glowing plants floating on the water. :)