Amator Phasma's Library

First of all: this is a resource and code library for my other mods. It self comes with extended functions for inserter: 1) make it possible that a inserter can handle the 'burnt result inventory' on all machines. 2) burner inserters can leech fuel from pickup and drop target. 3) burner inserters are capable to chain fuel through all burner type machines.
13 days ago
0.17
8897
Owner: AmatorPhasma
Source: N/A
Homepage: https://forums.factorio.com/viewtopic...
License: GNU GPLv3
Created: 8 months ago
Latest Version: 0.17.98 (13 days ago)
Factorio version: 0.17
Downloaded: 8897 times

Amator Phasma's Library

Source Code on GitLab

Languages:

English, Deutsch

About this mod:

First of all: this is a resource and code library for my other mods.

It self comes with some functions:

Extended functions for inserter:

  • make it possible that a inserter can handle the 'burnt_result_inventory' on all machines.
  • burner inserter can leech fuel from pickup and drop target.
  • burner inserters are capable to chain fuel through all burner type machines.

The extended functions for inserter are enabled by default when you have installed Amator Phasma's Coal&Steam or Amator Phasma's Nuclear. Otherwise you can control it yourself, whether you need it or not.
As an example: If you have only Amator Phasma's Recycling installed, then this is disabled, because this mod dosen't need this and now there is an option below 'Mod settings' -> 'Map' its called: 'Advanced functions for inserter' to switch it on or off.

Radiation:

  • Items can be declared as radioactive (They slightly damage the player if he has any in the inventory)
    The radiation is enabled by default, you can control it yourself, whether you like it or not: 'Mod settings' -> 'Map' its called: 'Radiation damage'

Storage protection:

  • If a storage container is destroyed, the contents are spewed out to the ground
    The Storage protection is enabled by default, you can control it yourself, whether you like it or not: 'Mod settings' -> 'Map' its called: 'Storage protection'

For Modders:

You can register and unregister items as radioactive with a remote call in the control.lua
radiation.remote.add_item(item_name: string, level: int)
Supported levels:
- 1: low radioactive
- 2: medium radioactive
- 3: high radioactive
Examples:
remote.call('apm_radiation', 'add_item', 'apm_nuclear_yellowcake', 1)
remote.call('apm_radiation', 'remove_item', 'apm_nuclear_yellowcake')

You can also create the item description with the radioactive symbol in any data stage after this library's data stage with:
apm.lib.utils.item.add.radioactive_description(item_name: string, level: int)
Supported levels: (the level argument is optional)
- 1: low radioactive
- 2: medium radioactive
- 3: high radioactive
Examples:
apm.lib.utils.item.add.radioactive_description('apm_nuclear_yellowcake')
apm.lib.utils.item.add.radioactive_description('apm_nuclear_yellowcake', 1)

Future?

  • optimizations, bug hunting, make the code look nice...

Problems?

  • Report them on the forum thread or here on this site under disscussion.

Ideas?

  • Please tell me on the forum thread.

Dependencies:

  • None

My other mods:

Finished:

WIP:

Known incompatibility:

  • None

Tested compatibility:

My thread in the forum.