| local ui = Engine.ui | |
| local CheatList = ui:VBox() | |
| local cheatMission = function (loaded) | |
| local cheats = { | |
| {'Add cash', function () Game.player:AddMoney(100000) end}, | |
| {'Refuel (prop tank)', function () Game.player:SetFuelPercent() end}, |
| set fp [open "data/systems/02_local_stars.lua" r] | |
| #set fp [open "data/systems/03_bright_stars.lua" r] | |
| set file_data [read $fp] | |
| close $fp | |
| set localsystems [split $file_data "\n"] | |
| foreach systemdef $localsystems { | |
| if {[lindex [split $systemdef ":"] 0] == "CustomSystem"} { | |
| set parts_1 [split $systemdef ":"] | |
| set parts_2 [split [lindex $parts_1 2] "("] |
Sent: Monday, 05 March, 2012 at 9:45 pm by Brianetta
Benamucki wrote:Hi Brian,
by adding a "break" in those loops you no longer get the minimum and therefore fair price, the calculation of "due" is also broken. These features were actually the intention of the script.
| local onShipFuelChanged = function (ship, state) | |
| if ship:IsPlayer() then | |
| Game.player:SetFuelPercent() | |
| else | |
| if state == "EMPTY" then | |
| print(('{label} ({type}) out of fuel'):interp({label=ship.label,type=ship.shipType})) | |
| end | |
| end | |
| end |
| -- Get the translator function | |
| local t = Translate:GetTranslator() | |
| -- don't produce missions for further than this many light years away | |
| local max_delivery_dist = 20 | |
| local hourly_rate = 2000 / (24 * 30) | |
| local AU = 149598000000.0 -- Game uses this approximation | |
| local ads = {} | |
| local missions = {} |
| target = function (label) | |
| if not label then return end | |
| local target = (Space.GetBodies(function (body) return body.label == label end))[1] | |
| if not target then return end | |
| if target:isa('Ship') then | |
| if not target:IsPlayer() then | |
| Game.player:SetCombatTarget(target) | |
| end | |
| else | |
| Game.player:SetNavTarget(target) |
@Luomu wrote:
This could be fixed by giving the sun a halo that stops getting smaller after certain distance. Or just fading the star out, right now the brightness of the star pixels stays the same at all distances.
I don't really have a good grasp of this: What should the sun look like from 8 AU away? Is it appropriate to decrease the brightness at all? @Brianetta would you perhaps know :)
Radiation, including sunlight, obeys the inverse square law. The amount of radiation falling on a surface from a point light source is inversely proportional to the square of the distance. If you have two otherwise identical cameras, and one is twice as far away, it will get a quarter of the light entering its aperture. Three times as far means a ninth of the light.
Note that while this diminishes very rapidly when close to the light source, it approaches an asymptote with distance, which is why you'll never travel so far from a star that you can't see it any more.
| local dest | |
| local episode | |
| local current_episode | |
| local range = 3 -- sectors, not light years | |
| local EpisodeName = function (episodeKey) | |
| return ('Episode {number}: {systemName}'):interp({ | |
| number=episode[episodeKey].Episode, | |
| systemName=episode[episodeKey].Path:GetStarSystem().name, | |
| }) |
| local dest | |
| local coordinate_choice | |
| local choices | |
| local brianetta = Character.New({ | |
| name = "Brian Ronald", | |
| female = false, | |
| title = "Pioneer Developer", | |
| armour = false, | |
| seed = 2397007322, |