z_mirror/Krastorio2
git clone https://git.raiguard.me/z_mirror/Krastorio2
deec6061
trunk
1--- @class CompatibilityHandler : event_handler 2local compatibility ={} 3 4function compatibility . aai_industry () 5-- Disable AAI industry crash site 6if script . active_mods [ "aai-industry" ] then 7remote . add_interface ( "kr-to-aai-industry" , { 8allow_aai_crash_sequence =function ( _ ) 9return { allow =false , weight =1 } 10end , 11} ) 12end 13end 14 15function compatibility . disco_science () 16if 17script . active_mods [ "DiscoScience" ] 18and remote . interfaces [ "DiscoScience" ] 19and remote . interfaces [ "DiscoScience" ][ "setIngredientColor" ] 20then 21remote . call ( "DiscoScience" , "setIngredientColor" , "kr-basic-tech-card" , { r =0.823 , g =0.411 , b =0.117 } ) 22end 23end 24 25function compatibility . nuclear_fuel () 26if script . active_mods [ "Nuclear Fuel" ] then 27remote . call ( "kr-radioactivity" , "add_item" , "breeder-fuel-cell" ) 28remote . call ( "kr-radioactivity" , "add_item" , "plutonium" ) 29remote . call ( "kr-radioactivity" , "add_item" , "used-up-breeder-fuel-cell" ) 30end 31end 32 33function compatibility . schall_uranium () 34if script . active_mods [ "SchallUraniumProcessing" ] then 35remote . call ( "kr-radioactivity" , "add_item" , "uranium-concentrate" ) 36remote . call ( "kr-radioactivity" , "add_item" , "uranium-low-enriched" ) 37end 38end 39 40function compatibility . should_build_pump () 41if prototypes . entity [ "kr-electric-offshore-pump" ] then 42return true 43end 44return false 45end 46 47return compatibility