Добавил: The DSystem
This is a utility library for designing Scripted Entities that Store, Share, Consume and Generate resources. If any plugins require it you will receive a message instructing you to seek out this addon.
It is mainly a tool for developing Scripted Entities which operate on resources. For example, you could create a Bread Machine that consumes Flour, Water, Yeast and Energy to produce units of Bread, which could either be stored in a container or consumed by the player if user-addon provides for it.
An example of what this can do is found in the Life Support Mod, where the 3 main resources of Air, Energy and Coolant are generated, stored, distributed and consumed for the purpose of survival in hostile environments. The best part is that it's extremely easy to use.
Here are the utility function definitions:
RD_AddResource(ent, res, capacity)
--Adds a named resource with the specified storage capacity to the ent
RD_ConsumeResource(ent, res, amount)
--Consumes a named resource from the entity
RD_SupplyResource(ent, res, amount)
--Replenishes a named resource on the entity by a specified amount
--Returns true if device uses named resource
--Returns the amount of a named resource accessable to the entity
--Returns the maximum storage capacity of a specified entity, disregarding the network size(for named resource only)
--Returns the maximum storage capacity of an entire network accessable to the entity(for named resource only)
Using the included Link Tool you can hook devices up and create networks of shared resources. Also included is a retractable Supply Connector for temporary connections such as fueling stations or modular forts.
I have included some test entities in the base pack, the "Bucket o' Crud", the "Tub o' Crud and Junk", and the "Barrel o' Stuff and Junk." These are accessable in the SEnts Spawn Menu, and serve no other purpose than perhaps as templates for you to study.
Please note that Life Support 1.6 will conflict with this mod. Life Support 1.7 was built with Resource Distribution as a foundation, and will thus be compatible.
New to Version 1.8c:
-Added: Air and Coolant compressors now have "Overdrive" mode
-Fixed: Sounds Looping w/ Overdrive
-Fixed: Atmospheric Probe spamming console with "grav"
-Added: full duplicator support
-Added: Resource Cache
-Fixed: Air and Heat Exchangers not consuming resources
-Fixed: More weird behavior...
To activate this mode, either press "Use" again immediately after activation of the compressor, or use the "Overdrive" Wire Input(recommended.) This mode will boost the output and energy consumption, but will slowly wear down the system. Best used only in emergencies.
Adv. Duplicator can now save links, including Wire connections.
Consolidated storage units, Small and Large containers for all 3 resource types(Air, Energy and Coolant.)