Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Survey #132

Merged
merged 40 commits into from
Apr 3, 2016
Merged

Survey #132

merged 40 commits into from
Apr 3, 2016

Conversation

NathanH-
Copy link
Contributor

@NathanH- NathanH- commented Apr 3, 2016

Alpha 4 should be ready.

the backend work for declaring sensors is complete, the frontend work,
and the mechanics and functionality of survey sensors are yet to be done
however.
Survey sensors should now be ready for mechanics work to begin, but some
mineral issues will need to be resolved and survey points need to be
created and handled. jumppoints should also be assigned to survey points
for the primary only jp option.
Hopefully this should be roughly what I want from mineral generation,
tweaking will be required though.
Geo survey should work now, but has not yet been tested. the order
itself now appears, mineral generation is being done now on planetary
geo survey, and the survey costs have been worked out.
This also contains the determination for where the survey point rings
are going to be located, and comments on what the angles for each survey
point should be.
Survey points can be generated for stars, and it should be possible to
determine which survey point a jumppoint would be within the area of.
This is not quite ready yet however.

Also some short circuits were put into the construction cycle.
3 instead of 32.
Survey points are displayed as white circles now. Zoom level will need
work, and some provision for updating them to be filled in circles will
have to be made later.
survey points are now displayed properly on all zoom levels, and can be
added as a location for a taskgroup to target. The actual survey
mechanics are not yet implemented, and will require storage within a
starsystem of the results.  I'll want to have a bool for a totally
completed survey of a starsystem, as well as some way to store partial
results since it will be unlikely for any player to leave a starsystem
in an incompletely surveyed state, and thus having to constantly iterate
through 30 points to determine if a system is fully surveyed will be
unnecessary most of the time.
jumpPoints are now linked to survey points for PrimaryOnlyJPs.
Seems roughly the same, though this should generate fewer JPs.
I want to determine the size of a font, or other primitive displayed on
the screen, and if there is any potential overlap with another font or
primitive.
overlapping labels will no longer be drawn. I may have messed some
min-orbit code up somewhere along the way, and I should look at that as
these shouldn't be displayed on maximum zoom anyway.
Gravitational survey should work, it is not yet tested however.
some issues resolved, full testing for grav and geo survey is yet to be
done however.
Survey conditionals will be done next to verify that surveying works as
intended, and the first step of that is to set up the UI.
taskgroups will be able to determine based on pre-set conditions if
there is some task they should perform without further user input when
done. the list of orders should be extensible, and merely a matter of
implementing the order when all is said and done.
Each system now keeps a list of what surveying is currently in progress,
and taskgroups will now check on order removal to make sure that this
list does not have spurious entries in it. this is important for default
orders to work properly, and make sure that multiple ships don't
re-survey the same point or body.
The only piece left for survey is connecting the UI to the back end so
that default orders selected by the user translate into action.
Testing is required, but default orders appear to work now, and so
ordered craft will look for planets and survey points to survey.
Survey is nearly ready, several bugs remain however. partial JP
discovery results are not displayed properly in the TG window. jps are
being marked as added to the survey results list when the point opposite
the point they belong to is surveyed. gas giants need a specialized
mineral generation routine since they are not habitable planets and can
only have sorium. Adding engines of a different type can cause problems
with size being incorrect for ships, and possibly other things.

These will all have to be resolved.
The number of JPs in SystemGen.cs has been uped to 10, be sure to check
this. a few pretty horrible math errors have been fixed, but survey is
not quite right. Also a terrible memoryleak has been discovered with the
main window.
several sensor display bugs including the memory leak are fixed, and jps
should finally be in the correct position, a few more bugs remain to be
fixed: the engine addtion bug and gas giant mineral generation.
Engine replacement should not cause any issues now, and gas giants have
their own sorium generation routine. Colonies can be created(except on
gas giants, ice giants, and gas dwarves).
The economics display now updates when the system display updates, an
infinite loop in the mineral generation code should be resolved, a
sensor bug on transferring craft between taskgroups should be resolved.

However many issues have been found:
GravSurvey went off to infinity after surveying 7,8 and 9, while
targetted on 18. moving the ship back near earth allowed survey of 18 to
continue as normal.

Geosurvey distance calculations are wrong for nearest body, and the
craft was choosing to continually switch between Uranus and Neptune.

Commercial shipyard tonnage is either wrong or displayed incorrectly(at
1KT), likewise the mod rates seem wrong, as well as the time to add
capacity expansion.

UI data between shipyards should be cleared but is not currently.

Wierdness is happening with shipyard activity assignments when
attempting to override the shipyard assignment.

A floating point issue still exists for CI that I'm not sure how to
resolve.
The shipyard tonnage bug was fixed, I was setting the tonnage to 1000
after checking for yard specific tonnage. woops.

Shipyards can be set to No Activity now, this was an oversight with
setActivity that it could not.

Geosurvey distances were being calculated incorrectly, they are now
fixed.

The treeview is now properly selectable, key and mouse press events were
happening before the selection was being made, switching to afterSelect
resolves this.

The agricultural and environmental percentages are spurious and will
need to be looked at, and any issue from last update that was not
resolved here is likely still a problem
I was not properly writing the categories for infrastructure. Also
colony cost related displays are now cut off after two decimal places
for appearances sake.
switching to a new planet with no shipyards will now properly clear the
shipyard grid, and functions for population maximums and required
infrastructure have been moved to the population class. hopefully that
should keep everything straight on infrastructure requirements. I am not
sure if those are implemented yet however.
Atmosphereless body temperatures were being converted to kelvin, and
then not being converted back to celsius, this has been fixed. The data
for planetary gravity, albedo, and base temperature has been filled in
for the solar system, giving plausible data there. lastly uninhabitable
bodies are marked as not habitable rather than -1.0 colony cost on the
economics page.

The solar system should be ready to go now.
duplicate populations were showing up in various places, that has been
fixed(this caused issues with the tree view having multiples of the same
item added to dictionaries).
Gravitational Survey Sensors are now military components, before all
survey sensors were civilian.
The cost listbox for the currently selected item to build on the
economics page is now being refreshed on a softRefresh(time advancement,
which does not need a full refresh of the entire page).

Designs don't seem to be locking immediately, I'm not sure how to
resolve this, it isn't immediately important however. Shipyard eligible
classes require all such designs to be locked in order to function.
The CI rounding bug is still present, and as with the above, I'm not
quite sure what to do about it.
the conventional industry rounding issue has been resolved, and
hopefully any mine or component rounding issues were preemptively fixed.
Date of completion for construction projects is fixed, I was just doing
that calculation wrong, and producing spurious time values in the
process. Fuel refineries were incorrectly labeled as ordnance factories,
and build percentages weren't being capped, those are correctly being
done now. Lastly the UI label for which project the player has chosen is
now displaying the name of the industrial project in the groupbox.
The sensor model should now be fully moved over to use currentSecond and
currentYear, rather than the old model which was just a tick value. this
should clear up any spurious "you detected this" events which were
popping up. On the construction front, etas for items with less than 1
item remaining are now fixed, and additional rounding issues have been
resolved.
when jumping to a new system, CanOrder was not properly being set to
AcceptOrders, this is fixed. likewise the homeworld mineral generation
kludge was removed, and now body mineral generation is handled in
systembody.cs for the most part.

Construction factories were costing Corrundum instead of vendarite, that
is fixed for when that all gets moved to a json file.

Ships failing 1 conditional order do not warn if another conditional
succeeds now, and warnings for no geosurvey target are now correctly
labeled as geosurvey target failures.
Now installations and minerals can be selected to be loaded to a
freighter, the work to implement such an order is not yet completed
however. Also a divide by zero with taskgroup pathing was discovered and
fixed.
CargoListEntries were also created for minerals, two bugs with sensors
wer fixed, and some legalOrders cleanup was done.
loads and unloads for minerals should now work, with both the ships
cargo lists, as well as previous orders being looked at to figure out
what to load and unload. It is currently up to the user to not mess up
unload orders, if they do it will crash.

Also a sensor bug was fixed, and a minor issue with ship naming for
elligible classes may have been resolved.
Colonists and Infrastructure can now be moved from one colony to
another, but there are no repeating orders just yet. Also the annual
growth rate for colonies is not negative if they exceed their
infrastructure.

Other minor issues to look at are that costs for cap expansion for
shipyards may be off, and double clicking on an item in the secondary
orders listbox should issue an order.
Shipclass summary will now update properly, adding new ship construction
tasks should increment the name counter properly, cycle moves has been
added, ships that attempt and fail a load order will now cancel all
orders and wait, and a few other fixes.
I lied on the last update apparently.
infrastructure display is rounded, and cargolists now don't add items of
0 tons to cargo ships.
@NathanH- NathanH- merged commit 3e26118 into master Apr 3, 2016
@NathanH- NathanH- deleted the Survey branch April 3, 2016 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant