Skip to content

Commit

Permalink
passive solar panel (CleverRaven#60445)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmuolio committed Aug 27, 2022
1 parent 90bb8ed commit 745b097
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/bionics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,9 @@ void Character::passive_power_gen( const bionic &bio )
}

if( fuel == fuel_type_sun_light ) {
const double modifier = g->natural_light_level( pos().z ) / default_daylight_level();
mod_power_level( units::from_kilojoule( fuel_energy ) * modifier * effective_passive_efficiency );
const float intensity = incident_sun_irradiance( current_weather( pos() ),
calendar::turn ) / max_sun_irradiance();
mod_power_level( units::from_kilojoule( fuel_energy ) * intensity * effective_passive_efficiency );
} else if( fuel == fuel_type_wind ) {
int vehwindspeed = 0;
const optional_vpart_position vp = here.veh_at( pos() );
Expand Down

0 comments on commit 745b097

Please sign in to comment.