Prototype/Fish: Difference between revisions
Jump to navigation
Jump to search
LazyFridge (talk | contribs) (Somewhat useless page on the fish prototype. But I saw it missing, so I figured i'd at least let the page exist.) |
(Updated styling of prototype doc migration note) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= | <div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/FishPrototype.html https://lua-api.factorio.com/latest/prototypes/FishPrototype.html] | ||
''' | |||
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div> | |||
{{Prototype parent|Prototype/EntityWithHealth}} | |||
Entity that spawns in water tiles, which can be mined. Moves around unless deactived with entity.active = false. | |||
{{Prototype TOC|fish}} | |||
== Mandatory properties == | |||
{{Prototype property|pictures|[[Types/SpriteVariations|SpriteVariations]]}} | |||
== Example == | == Example == | ||
<syntaxhighlight lang="lua">{ | |||
type = "fish", | type = "fish", | ||
name = "fish", | name = "fish", | ||
icon = "__base__/graphics/icons/fish.png", | icon = "__base__/graphics/icons/fish.png", | ||
icon_size = 32, | |||
flags = {"placeable-neutral", "not-on-map"}, | flags = {"placeable-neutral", "not-on-map"}, | ||
minable = {mining_time = 1, result = "raw-fish", count = 5}, | minable = {mining_time = 1, result = "raw-fish", count = 5}, | ||
Line 22: | Line 25: | ||
subgroup = "creatures", | subgroup = "creatures", | ||
order = "b-a", | order = "b-a", | ||
collision_box = {{-0. | collision_box = {{-0.75, -0.75}, {0.75, 0.75}}, | ||
selection_box = {{-0.5, -0.3}, {0.5, 0.3}}, | selection_box = {{-0.5, -0.3}, {0.5, 0.3}}, | ||
pictures = | pictures = | ||
Line 42: | Line 45: | ||
influence = 0.01 | influence = 0.01 | ||
} | } | ||
}, | },</syntaxhighlight> |
Latest revision as of 10:43, 21 September 2023
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/FishPrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/Fish
Entity that spawns in water tiles, which can be mined. Moves around unless deactived with entity.active = false.
Mandatory properties
pictures
Type: SpriteVariations
Example
{
type = "fish",
name = "fish",
icon = "__base__/graphics/icons/fish.png",
icon_size = 32,
flags = {"placeable-neutral", "not-on-map"},
minable = {mining_time = 1, result = "raw-fish", count = 5},
max_health = 20,
subgroup = "creatures",
order = "b-a",
collision_box = {{-0.75, -0.75}, {0.75, 0.75}},
selection_box = {{-0.5, -0.3}, {0.5, 0.3}},
pictures =
{
{
filename = "__base__/graphics/entity/fish/fish-1.png",
priority = "extra-high",
width = 22,
height = 36
},
{
filename = "__base__/graphics/entity/fish/fish-2.png",
priority = "extra-high",
width = 32,
height = 32
}
},
autoplace = {
influence = 0.01
}
},