Caught by another in-game crash: "Entity is not resource." when
reading entity.amount. The previous fix (collision_mask: "resource")
was still wrong - collision layers and entity type are decoupled in
Factorio 2.0, so find_entities_filtered({collision_mask: "resource"})
can return non-resource entities that merely opted into the same
collision layer (likely something from Space Exploration or
Krastorio 2). entity.amount/initial_amount only exist on entities
whose prototype type is actually "resource".
Filtering by type: "resource" directly targets the right entities
and is simpler than inferring it via collision mask in the first
place.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| events-library | ||
| events-mod | ||
| events-processor-core | ||
| events-processors | ||
| events-server | ||
| events-server-syslog | ||
| events-server-web | ||
| infra-factorio-client | ||
| infra-factorio-server | ||
| infra-kafka-cluster | ||
| infra-kafka-pipe | ||
| kt-rcon | ||
| versions-platform | ||
| web-map | ||
| modules.md | ||