RitnProtoFuelCategory¶
Data-stage manipulator for data.raw["fuel-category"][<name>]. Inherits from RitnPrototype. Mostly used to declare a new fuel category.
Warning — Factorio 1.x API: this class hasn't been revised since Factorio 2.0. Usable but not validated for 2.0 — see Factorio 2.0 migration.
| Source | classes/prototypes/FuelCategory.lua |
| Stage | data |
| Access | require(ritnlib.defines.class.prototype.fuelCategory) |
| Inherits from | RitnPrototype |
object_name |
"RitnProtoFuelCategory" |
Constructor¶
RitnProtoFuelCategory(category_name) → RitnProtoFuelCategory¶
Deep-copies data.raw["fuel-category"][category_name] into prototype if it exists.
Parameters
- category_name :: string — category name.
Methods¶
:extend(name, order) → RitnProtoFuelCategory¶
Declares a new fuel-category via data:extend({...}).
Parameters: name :: string · order :: string.
The generic mutators are inherited from
RitnPrototype.
Usage example¶
local RitnProtoFuelCategory = require(ritnlib.defines.class.prototype.fuelCategory)
RitnProtoFuelCategory:extend("ritn-fuel", "a")
See also¶
RitnPrototype(parent) · Class map · 2.0 migration