Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
74f260b
Updated Documentation on StartGuiManagerScript.cs
nsmonagh Oct 13, 2019
d74876c
Manager.cs Cleanup
nsmonagh Oct 14, 2019
b8f4aaa
Reactivated Fullscreen shortcut key
nsmonagh Oct 15, 2019
05496be
Update to documentation in Manager.c
nsmonagh Oct 17, 2019
343ea01
Added more Documentation to Manager.cs
nsmonagh Oct 19, 2019
c18f32b
Merge branch 'master' into Documentation-2
nsmonagh Oct 19, 2019
029c5c3
Added more documentation on Manager.cs...
nsmonagh Oct 28, 2019
ba7a9ca
Merge branch 'master' into Documentation-2
nsmonagh Oct 28, 2019
9e0450b
Documented Roughly 20 more functions
nsmonagh Oct 30, 2019
ac36303
It's not possible to place the initial population group in a cell hav…
chahuistle Sep 4, 2022
4ff2124
Initializing with 0 to avoid NullReferenceException (#351)
chahuistle Sep 5, 2022
977d6f1
Updated Unity version to 2021.3
Zematus Oct 3, 2022
d6afd39
Added ethnicities (not fully implemented)
Zematus Oct 3, 2022
e5ab4fb
Code setup
Denormos Jul 24, 2023
9d962ee
Update GuiManagerScript.cs
Denormos Jul 24, 2023
1342488
Update readme.md
Denormos Jul 25, 2023
ca0180c
Added a simpler map view
Denormos Aug 9, 2023
e69b56d
"Exit" - > "Quit" on main menu
Denormos Aug 9, 2023
71af9be
Added #357
Denormos Aug 9, 2023
c1bac6e
Enhanced 71af9bec
Denormos Aug 10, 2023
f534c7b
Added #308
Denormos Aug 10, 2023
713d9e7
Fixed bug caused by f534c7b7
Denormos Aug 11, 2023
d065b12
Update random worlds notes.txt
Denormos Aug 26, 2023
5324452
Added #310
Denormos Aug 30, 2023
9c570ae
Update GuiManagerScript.cs
Denormos Aug 31, 2023
74bcec0
Added #311 and arrival dates for groups
Denormos Sep 1, 2023
8537014
Added #326 + region info improvement
Denormos Sep 1, 2023
2f8fcc6
Fixed bug
Denormos Sep 1, 2023
22b37fa
Update World.cs
Denormos Sep 1, 2023
10b34a7
Misc changes
Denormos Sep 16, 2023
6f3fdff
Brought in chahuistle's fix
CTH999 Jul 3, 2025
2838b7c
the unity update by @Zematus
CTH999 Jul 3, 2025
9d90fcd
Update Unity by @Zematus
CTH999 Jul 3, 2025
2d8c6c4
Add Ethnicities
CTH999 Jul 3, 2025
c5555d3
Merge branch 'minor-adjustments' into culture
CTH999 Jul 3, 2025
3e5591e
Transfer in enhancements
CTH999 Jul 3, 2025
0313541
Compatibility with enhancments
CTH999 Jul 3, 2025
b47a550
Merge branch 'enhancments' into adjustments-compat
CTH999 Jul 3, 2025
1568c63
Minor Adjustments branch
CTH999 Jul 3, 2025
7acd4f0
Merge branch 'culture' into enhancments
CTH999 Jul 3, 2025
ac8db62
Put enhancments in culture
CTH999 Jul 3, 2025
fb15796
move readme
CTH999 Jul 3, 2025
d58df7d
Create documentation.txt
CTH999 Jul 3, 2025
785c66d
Merge branch 'Documentation-2' into documentation
CTH999 Jul 3, 2025
ee9821d
Merge branch 'main' into documentation
CTH999 Jul 3, 2025
b23a7b3
Merge branch 'minor-adjustments' into documentation
CTH999 Jul 3, 2025
0781447
Merge branch 'documentation' into culture
CTH999 Jul 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions readme.md → .github/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Note that the results from using a heightmap to generate a world might not perfe
- O : Cycle between 'Population' map overlays
- P : Cycle between 'Polity' map overlays
- G : Enable 'General' map overlay
- E : Enable 'Debug' map overlay (debug must not be set to 'none')
- Tab : Cycle between overlay subtypes when available
- 1: Set simulation speed to 'Max 1 Day/sec'
- 2: Set simulation speed to 'Max 7 Days/sec'
Expand Down
56 changes: 56 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"files.exclude":
{
"**/.DS_Store":true,
"**/.git":true,
"**/.gitignore":true,
"**/.gitmodules":true,
"**/*.booproj":true,
"**/*.pidb":true,
"**/*.suo":true,
"**/*.user":true,
"**/*.userprefs":true,
"**/*.unityproj":true,
"**/*.dll":true,
"**/*.exe":true,
"**/*.pdf":true,
"**/*.mid":true,
"**/*.midi":true,
"**/*.wav":true,
"**/*.gif":true,
"**/*.ico":true,
"**/*.jpg":true,
"**/*.jpeg":true,
"**/*.png":true,
"**/*.psd":true,
"**/*.tga":true,
"**/*.tif":true,
"**/*.tiff":true,
"**/*.3ds":true,
"**/*.3DS":true,
"**/*.fbx":true,
"**/*.FBX":true,
"**/*.lxo":true,
"**/*.LXO":true,
"**/*.ma":true,
"**/*.MA":true,
"**/*.obj":true,
"**/*.OBJ":true,
"**/*.asset":true,
"**/*.cubemap":true,
"**/*.flare":true,
"**/*.mat":true,
"**/*.meta":true,
"**/*.prefab":true,
"**/*.unity":true,
"build/":true,
"Build/":true,
"Library/":true,
"library/":true,
"obj/":true,
"Obj/":true,
"ProjectSettings/":true,
"temp/":true,
"Temp/":true
}
}
Binary file modified Assets/Materials/sphereMap.mat
Binary file not shown.
Binary file modified Assets/Materials/sphereMapActivity.mat
Binary file not shown.
Binary file modified Assets/Materials/sphereMapOverlay.mat
Binary file not shown.
Binary file modified Assets/Materials/sphereMapOverlayDrainage.mat
Binary file not shown.
Binary file modified Assets/Prefabs/UI/MainMenuDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/MessageDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/OverlayDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/ProgressDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/SelectFileDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/SetSeedDialogPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/SliderPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/Toolbars/ActionToolbar/ActionPanel.prefab
Binary file not shown.
Binary file modified Assets/Prefabs/UI/ViewsDialogPanel.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions Assets/Resources.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Assets/Resources/BillingMode.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"androidStore":"GooglePlay"}
7 changes: 7 additions & 0 deletions Assets/Resources/BillingMode.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

75 changes: 45 additions & 30 deletions Assets/Scripts/2D/GuiManagerScript.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ public void OnAutoSave()
PlanetOverlay.PolityAdminCost,
PlanetOverlay.FactionCoreDistance,
PlanetOverlay.PolityCluster,
PlanetOverlay.ClusterAdminCost
PlanetOverlay.ClusterAdminCost,
PlanetOverlay.FormationDate
};
private int _currentPolityOverlay = 0;

Expand All @@ -280,7 +281,8 @@ public void OnAutoSave()
PlanetOverlay.UpdateSpan,
PlanetOverlay.Migration,
PlanetOverlay.MigrationPressure,
PlanetOverlay.PolityMigrationPressure
PlanetOverlay.PolityMigrationPressure,
PlanetOverlay.HumanArrival
};
private int _currentDebugOverlay = 0;

Expand Down Expand Up @@ -1085,7 +1087,7 @@ private void ReadKeyboardInput_MapOverlays()

if (Manager.CurrentDevMode != DevMode.None)
{
Manager.HandleKeyUp(KeyCode.D, false, false, ActivateDebugOverlay);
Manager.HandleKeyUp(KeyCode.E, false, false, ActivateDebugOverlay);
}
}

Expand Down Expand Up @@ -1298,6 +1300,11 @@ public void SetCoastlineView()
SetView(PlanetView.Coastlines);
}

public void SetDebugView()
{
SetView(PlanetView.Debug);
}

private void ReadKeyboardInput()
{
if (_backgroundProcessActive)
Expand Down Expand Up @@ -1690,6 +1697,19 @@ private void RegenerateWorld(GenerationType type)
_regenMapOverlayTexture = true;
}

public void ResetWorld()
{
ResetGuiManagerState();

Manager.ResetWorld();

MainMenuDialogPanelScript.SetVisible(false);

_hasToSetInitialPopulation = true;

OpenModeSelectionDialog();
}

private void GenerateWorld(bool randomSeed = true, int seed = 0, bool useHeightmap = false)
{
if (randomSeed)
Expand Down Expand Up @@ -1985,15 +2005,22 @@ private bool TryCompleteGroupSelectionRequest(
private void ClickOp_SelectPopulationPlacement(Vector2 mapPosition)
{
int population = AddPopulationDialogScript.Population;
int longitude = (int)mapPosition.x;
int latitude = (int)mapPosition.y;

if (AddPopulationGroupAtPosition(mapPosition, population))
if (Manager.CanAddPopulationGroupAtPosition(longitude, latitude))
{
Manager.GenerateHumanGroup(longitude, latitude, population);
UninterruptSimAndShowHiddenInterPanels();

DisplayTip_MapScroll();

_mapLeftClickOp -= ClickOp_SelectPopulationPlacement;
}
// else {
//TODO: have some sort of visual feedback:
// 1. use the tooltip panel to display "Invalid cell for initial population."
// 2. highlight the cell with red (go back to normal color once pointer is not over the cell)
// }

}

public void SelectPopulationPlacement()
Expand All @@ -2004,39 +2031,19 @@ public void SelectPopulationPlacement()

SetStartingSpeed(AddPopulationDialogScript.StartSpeedLevelIndex);

Debug.Log(string.Format("Player chose to select cell for population placement of {0}...", population));
Debug.LogFormat("Player chose to select cell for population placement of {0}...", population);

if (population <= 0)
{
Debug.LogWarningFormat("Obtained a negative population value from AddPopulationDialogScript: {0}", population);
return;
}

DisplayTip_InitialPopulationPlacement();

_mapLeftClickOp += ClickOp_SelectPopulationPlacement;
}

private bool AddPopulationGroupAtPosition(Vector2 mapPosition, int population)
{
World world = Manager.CurrentWorld;

int longitude = (int)mapPosition.x;
int latitude = (int)mapPosition.y;

if ((longitude < 0) || (longitude >= world.Width))
return false;

if ((latitude < 0) || (latitude >= world.Height))
return false;

TerrainCell cell = world.GetCell(longitude, latitude);

if (cell.IsLiquidSea)
return false;

Manager.GenerateHumanGroup(longitude, latitude, population);

return true;
}

private void DisplayTip_InitialPopulationPlacement()
{
if (_displayedTip_initialPopulation)
Expand Down Expand Up @@ -3022,6 +3029,10 @@ public void ChangePlanetOverlayToSelected()
{
ChangePlanetOverlay(PlanetOverlay.PolityAdminCost, false);
}
else if (OverlayDialogPanelScript.FormationDateToggle.isOn)
{
ChangePlanetOverlay(PlanetOverlay.FormationDate, false);
}
else if (OverlayDialogPanelScript.TemperatureToggle.isOn)
{
ChangePlanetOverlay(PlanetOverlay.Temperature, false);
Expand Down Expand Up @@ -3082,6 +3093,10 @@ public void ChangePlanetOverlayToSelected()
{
ChangePlanetOverlay(PlanetOverlay.PolityMigrationPressure, false);
}
else if (OverlayDialogPanelScript.HumanArrivalToggle.isOn)
{
ChangePlanetOverlay(PlanetOverlay.HumanArrival, false);
}
else
{
ChangePlanetOverlay(PlanetOverlay.None, false);
Expand Down
Loading