[12.9] Tiles don't fire on_built_entity

This subforum contains all the issues which we already resolved.
Post Reply
vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

[12.9] Tiles don't fire on_built_entity

Post by vzybilly »

Tile Ghosts fire the event but not the tile itself. did not test bots.

To see if ANY event fires from the Tiles, I hooked up a watcher for all non-tick events.
This is the event log for placing and mining.

Code: Select all

Event: on_player_mined_item @ 218913
  item_stack[table]
    name[string]=stone-brick
    count[number]=1
  player_index[number]=1
This is the event log for placing and mining a Ghost by hand.

Code: Select all

Event: on_built_entity @ 218790
  created_entity[table]
    __self[userdata]
  player_index[number]=1
Event: on_preplayer_mined_item @ 219100
  entity[table]
    __self[userdata]
  player_index[number]=1
watcher code snippet
watcher code full


In comparison, this is the event log for a small electric pole.

Code: Select all

Event: on_put_item @ 218932
  position[table]
    y[number]=3.22265625
    x[number]=-14.8359375
  player_index[number]=1
Event: on_built_entity @ 218932
  created_entity[table]
    __self[userdata]
  player_index[number]=1
Event: on_preplayer_mined_item @ 219162
  entity[table]
    __self[userdata]
  player_index[number]=1
Event: on_player_mined_item @ 219162
  item_stack[table]
    name[string]=small-electric-pole
    count[number]=1
  player_index[number]=1


a Tile should atleast fire "on_put_item", it should also fire either "on_built_entity" or "on_built_tile"
Will code for Food. I also have 11+ mods!

slpwnd
Factorio Staff
Factorio Staff
Posts: 1835
Joined: Sun Feb 03, 2013 2:51 pm
Contact:

Re: [12.9] Tiles don't fire on_built_entity

Post by slpwnd »

Well this is more of a feature request than a bug report. Tiles don't fire on_built_entity precisely because they are tiles not entities. You are right that there should be an on_built_tile method. And yes, it is confusing when tile ghost fire the event but the tile itself not. Technically speaking it is correct since ghost is an entity not a tile, but that is probably too technical.

I am putting this to minor issues. However I have made a ticket for this in our internal TODO.

vzybilly
Fast Inserter
Fast Inserter
Posts: 143
Joined: Thu May 14, 2015 6:10 pm
Contact:

Re: [12.9] Tiles don't fire on_built_entity

Post by vzybilly »

slpwnd wrote:Well this is more of a feature request than a bug report. Tiles don't fire on_built_entity precisely because they are tiles not entities. You are right that there should be an on_built_tile method. And yes, it is confusing when tile ghost fire the event but the tile itself not. Technically speaking it is correct since ghost is an entity not a tile, but that is probably too technical.

I am putting this to minor issues. However I have made a ticket for this in our internal TODO.
how come it fires the mined item event? it doesn't fire any other event but that. the placing would be the put item event, this would all be workable if it was like that...

to me, the fact it only fires the mined event shows that the others were either forgotten or bugged...

sorry if this post is abit jumbled, I'm on my phone on vacation...
Will code for Food. I also have 11+ mods!

Post Reply

Return to “Resolved Problems and Bugs”