Electric Vehicles Lib: Reloaded

by OwnlyMe

Library. CONTAINS NO VEHICLES. Can be used as a dependency or included in your mod

Internal
a month ago
2.0
9
Transportation

Changelog

Version: 2.0.2
  By: Ownlyme
	- Fixed a crash when a vehicle gets destroyed while driving
Version: 2.0.1
  By: Ownlyme
	- Updated for 2.0 Space Age
	- The library is now easy to include in your own mod (note: there's no version checking. the first mod registering the interface will handle everything. the mod that handles everything can change, for example when a mod is uninstalled)
	- Uses the new burner effectivity from 2.0
	- Rebalanced regenerative brakes (formula should now return almost the correct amount of energy)
	- Regenerative brakes now get better with higher quality
	- Now ignores vehicles (on build) that don't have entity.prototype.burner_prototype.fuel_categories.electrical
	- "spider-vehicle" is now a valid vehicle type
	- Changed storage.brakes -> storage.ev_brakes and global.vehicles -> storage.e_vehicles to not interfer with the mod this is included in:
	- Rewrote the handling of caches when a different mod gets responsible for the electric vehicles lib
	- Moved local variables to storage table (in fear of desyncs)
	
	- IMPORTANT: events have slightly changed:
		- Now reacts to script_raised_built
		- on_load was removed
		- on_init and on_configuration_changed now call ev_rebuild_caches
		- all functions now have the prefix ev_