Baron Library

by wasmoo

Base library for Baron mods.

Internal
11 months ago
0.18 - 1.1
2.56K
Owner:
wasmoo
Source:
N/A
Homepage:
N/A
License:
MIT
Created:
4 years ago
Latest Version:
1.1.26 (11 months ago)
Factorio version:
0.18 - 1.1
Downloaded by:
2.56K users

Baron library includes helper functions for creating additional mods for the Baron Factions mod.

Baron Flags

The most forward feature is the special flags, accessible by the global variable baronConstants.flags. These flags can be added harmlessly to any prototype under the key "baron-flags":

  {
    type = "item",
    name = "dirty-fuel",
    [baronConstants.flags.key] = {baronConstants.flags.no_clean_fuel},
    ...
  }

Or using the baronEntity method:

  baronEntity.setBaronFlag(dirty_fuel_item, baronConstants.flags.no_clean_fuel)
Flag Effect
baronConstants.flags.no_clean_fuel Disables Burner faction processing for this fuel item
baronConstants.flags.no_split Prevents recipe from being duplicated among factions (though crafting will still be limited by factions.) This flag is automatically and appropriately added when using baronEntity.removeFaction().
baronConstants.flags.keep_subgroup Prevents recipe or item from gaining a unique subgroup for its faction. This keeps the recipes for each faction in a single row, rather than one faction per row.