Skip to content

Commit

Permalink
smallfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Nashet committed Jun 5, 2017
1 parent 227775f commit a6ff5fb
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 17 deletions.
Binary file modified Assets/base.unity
Binary file not shown.
6 changes: 3 additions & 3 deletions Assets/code/Logic/Army.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ public class Army
static Modifier modifierFirearms = new Modifier(x => (x as Army).getEquippedFirearmsSupply(), "Equipped Firearms", 2f, false);
static Modifier modifierArtillery = new Modifier(x => (x as Army).getEquippedArtillerySupply(), "Equipped Artillery", 1f, false);

static Modifier modifierCars = new Modifier(x => (x as Army).getEquippedCarsSupply(), "Equipped cars", 2f, false);
static Modifier modifierTanks = new Modifier(x => (x as Army).getEquippedTanksSupply(), "Equipped tanks", 1f, false);
static Modifier modifierAirplanes = new Modifier(x => (x as Army).getEquippedAirplanesSupply(), "Equipped airplanes", 1f, false);
static Modifier modifierCars = new Modifier(x => (x as Army).getEquippedCarsSupply(), "Equipped Cars", 2f, false);
static Modifier modifierTanks = new Modifier(x => (x as Army).getEquippedTanksSupply(), "Equipped Tanks", 1f, false);
static Modifier modifierAirplanes = new Modifier(x => (x as Army).getEquippedAirplanesSupply(), "Equipped Airplanes", 1f, false);
static Modifier modifierLuck = new Modifier(x => (float)Math.Round(UnityEngine.Random.Range(-0.5f, 0.5f), 2), "Luck", 1f, false);

private float getColdArmsSupply()
Expand Down
14 changes: 7 additions & 7 deletions Assets/code/Logic/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,17 +403,17 @@ void findNeighborprovinces()
}
void generateMapImage()
{
//mapImage = new Texture2D(200, 100);
mapImage = new Texture2D(100, 50);
mapImage = new Texture2D(200, 100);
//mapImage = new Texture2D(100, 50);
Color emptySpaceColor = Color.black;//.setAlphaToZero();
mapImage.setColor(emptySpaceColor);
int amountOfProvince;
if (Game.devMode)
amountOfProvince = 10;
else
amountOfProvince = 12 + Game.Random.Next(8);
amountOfProvince = 60 + Game.Random.Next(20);
//amountOfProvince = 160 + Game.random.Next(20);
//amountOfProvince = 60 + Game.Random.Next(20);
amountOfProvince = 160 + Game.Random.Next(20);
for (int i = 0; i < amountOfProvince; i++)
mapImage.SetPixel(mapImage.getRandomX(), mapImage.getRandomY(), UtilsMy.getRandomColor());

Expand Down Expand Up @@ -775,10 +775,10 @@ void makeHelloMessage()
{
new Message("Tutorial", "Hi, this is VERY early demo of game-like economy simulator" +
"\n\nCurrently there is: "
+ "\n\npopulation agents \nbasic trade & production \nbasic warfare \nbasic inventions \nbasic reforms (voting is not implemented)"
+ " \npopulation demotion\\promotion to other classes \nmigration (inside country) \nassimilation"
+ "\n\npopulation agents \nbasic trade & production \nbasic warfare \nbasic inventions \nbasic reforms (population can vote for reforms)"
+ " \npopulation demotion\\promotion to other classes \nmigration\\immigration\nassimilation"
+ "\n\nYou play as " + Game.Player.getName() + " country yet there is no much gameplay for now. You can try to growth economy or conquer the world."
+ "\nTry arrows or WASD for scrolling map and mouse wheel for scale"
+ "\n\nTry arrows or WASD for scrolling map and mouse wheel for scale"
+ "\nEnter key to close top window, space - to pause\\unpause"
, "Ok");
;
Expand Down
8 changes: 4 additions & 4 deletions Assets/code/Logic/Invention.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ public class Invention : AbstractCondition
steamPower = new Invention("Steam Power", "Increases efficiency of all enterprises by 25%", new Value(100f)),
Welfare = new Invention("Welfare", "Allows min wage and.. other", new Value(100f)),
Gunpowder = new Invention("Gunpowder", "Allows Artillery & Ammunition", new Value(100f)),
Firearms = new Invention("Hand-held cannons", "Allows Firearms, very efficient in battles", new Value(100f)),
CombustionEngine = new Invention("Combustion engine", "", new Value(200f)),
Tanks = new Invention("Tanks", "", new Value(400f)),
Airplanes = new Invention("Airplanes", "", new Value(800f))
Firearms = new Invention("Hand-held cannons", "Allows Firearms, very efficient in battles", new Value(200f)),
CombustionEngine = new Invention("Combustion engine", "Allows Oil, Fuel, Cars, Rubber and Machinery", new Value(400f)),
Tanks = new Invention("Tanks", "Allows Tanks", new Value(800f)),
Airplanes = new Invention("Airplanes", "Allows Airplanes", new Value(1200f))
;
readonly public static Condition SteamPowerInvented = new Condition(x => (x as Country).isInvented(Invention.steamPower), "Steam Power is invented", true);
readonly public static Condition IndividualRightsInvented = new Condition(x => (x as Country).isInvented(Invention.individualRights), "Individual Rights are invented", true);
Expand Down
2 changes: 1 addition & 1 deletion Assets/code/Panels/InventionsPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void refresh()
if (selectedInvention != null)
{
descriptionText.text = "Science points: " + Game.Player.sciencePoints
+ "\n\n" + selectedInvention.ToString() + " description: " + selectedInvention.getDescription();
+ "\n\n" + selectedInvention + " : " + selectedInvention.getDescription();

// invention available
if (!Game.Player.inventions.isInvented(selectedInvention) && Game.Player.sciencePoints.get() >= selectedInvention.cost.get())
Expand Down
6 changes: 5 additions & 1 deletion Assets/code/Panels/TopPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void Update()
public void refresh()
{

generalText.text = "Economic Simulation v11 Date: " + Game.date + " Country: " + Game.Player.getName()
generalText.text = "Economic Simulation v0.11.0 Date: " + Game.date + " Country: " + Game.Player.getName()
+ "\nMoney: " + Game.Player.cash
+ " Science points: " + Game.Player.sciencePoints
+ " Men: " + Game.Player.getMenPopulation();
Expand All @@ -37,6 +37,10 @@ public void onTradeClick()
else
MainCamera.tradeWindow.show(true);
}
public void onExitClick()
{
Application.Quit();
}
public void onMilitaryClick()
{
if (MainCamera.militaryPanel.isActiveAndEnabled)
Expand Down
2 changes: 1 addition & 1 deletion Assets/code/Utils/Procent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void addPoportionally(int baseValue, int secondValue, Procent secondProce
public override string ToString()
{
if (get() > 0)
return System.Convert.ToString(get() * 100f) + "%";
return (get() * 100f).ToString("0.00") + "%";
else return "0%";
}

Expand Down
Binary file modified ProjectSettings/ProjectSettings.asset
Binary file not shown.

0 comments on commit a6ff5fb

Please sign in to comment.