From 750e105ce65682fad95c0b2dc6d3317f6552bcf9 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 8 Apr 2020 12:26:30 +0300 Subject: You can now move up a superlayer using climable structures (for now only with L_wooden_ladder). Placing one on a hole in the ground will place it underneath the hole (if it can). Added info for player in map menu. Permanantly fixed issue where code builds wouldn't work on Windows. Structure also need an inventory icon (added for L_tree and L_boulder). Fixed bug where you could place structures on top of holes in the ground and on top of (replaces) other structures. Holes can be generated in land (the structure below gets deleted) and structures will no longer be able to be generated on top of holes. --- Mundus/Data/Crafting/RI.cs | 7 +- Mundus/Data/SuperLayers/Land.cs | 4 + Mundus/Data/SuperLayers/Underground.cs | 4 + Mundus/Data/Windows/WI.cs | 23 +- .../Icons/Land/Structures/L_boulder_inventory.png | Bin 0 -> 4339 bytes Mundus/Icons/Land/Structures/L_tree_inventory.png | Bin 0 -> 4339 bytes Mundus/Icons/Land/Structures/L_wooden_ladder.png | Bin 0 -> 4339 bytes .../Land/Structures/L_wooden_ladder_inventory.png | Bin 0 -> 4339 bytes Mundus/Icons/Project files/L_boulder.xcf | Bin 5824 -> 6427 bytes Mundus/Icons/Project files/L_tree.xcf | Bin 6062 -> 6661 bytes Mundus/Icons/Project files/L_wooden_ladder.xcf | Bin 0 -> 4491 bytes Mundus/Mundus.csproj | 7 +- Mundus/Service/Mobs/IMob.cs | 3 +- Mundus/Service/Mobs/LandMobs/Player.cs | 7 + Mundus/Service/Mobs/MobMovement.cs | 16 +- Mundus/Service/Mobs/MobStatsController.cs | 27 ++ Mundus/Service/Mobs/MobTerraforming.cs | 30 +- .../Generators/LandSuperLayerGenerator.cs | 20 +- .../Generators/UndergroundSuperLayerGenerator.cs | 9 +- Mundus/Service/SuperLayers/ImageController.cs | 21 +- Mundus/Service/SuperLayers/StructurePresets.cs | 19 - .../Service/Tiles/ItemPresets/StructurePresets.cs | 23 + Mundus/Service/Tiles/Items/Structure.cs | 37 +- Mundus/Views/Windows/CraftingWindow.cs | 8 +- Mundus/Views/Windows/SmallGameWindow.cs | 13 + Mundus/gtk-gui/Mundus.Views.Dialogs.ExitDialog.cs | 3 +- Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs | 2 +- .../gtk-gui/Mundus.Views.Windows.NewGameWindow.cs | 4 - Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs | 5 +- .../Mundus.Views.Windows.SmallGameWindow.cs | 224 ++++++---- Mundus/gtk-gui/generated.cs | 8 + Mundus/gtk-gui/gui.stetic | 470 +++++++++++++-------- 32 files changed, 666 insertions(+), 328 deletions(-) create mode 100644 Mundus/Icons/Land/Structures/L_boulder_inventory.png create mode 100644 Mundus/Icons/Land/Structures/L_tree_inventory.png create mode 100644 Mundus/Icons/Land/Structures/L_wooden_ladder.png create mode 100644 Mundus/Icons/Land/Structures/L_wooden_ladder_inventory.png create mode 100644 Mundus/Icons/Project files/L_wooden_ladder.xcf delete mode 100644 Mundus/Service/SuperLayers/StructurePresets.cs create mode 100644 Mundus/Service/Tiles/ItemPresets/StructurePresets.cs diff --git a/Mundus/Data/Crafting/RI.cs b/Mundus/Data/Crafting/RI.cs index 7bdcf42..8c3999c 100644 --- a/Mundus/Data/Crafting/RI.cs +++ b/Mundus/Data/Crafting/RI.cs @@ -14,6 +14,8 @@ namespace Mundus.Data.Crafting { public static CraftingRecipe StonePickAxe { get; private set; } public static CraftingRecipe StoneAxe { get; private set; } + public static CraftingRecipe WoodenLadder { get; private set; } + public static void CreateInstances() { WoodenShovel = new CraftingRecipe(ToolPresets.GetAWoodenShovel(), 5, MaterialPresets.GetAStick()); WoodenPickaxe = new CraftingRecipe(ToolPresets.GetAWoodenPickaxe(), 4, MaterialPresets.GetAStick()); @@ -23,9 +25,12 @@ namespace Mundus.Data.Crafting { StonePickAxe = new CraftingRecipe(ToolPresets.GetAStonePickaxe(), 4, MaterialPresets.GetALandRock(), 2, MaterialPresets.GetAStick()); StoneAxe = new CraftingRecipe(ToolPresets.GetAStoneAxe(), 3, MaterialPresets.GetALandRock(), 2, MaterialPresets.GetAStick()); + WoodenLadder = new CraftingRecipe(StructurePresets.GetAWoodenLadder(), 6, MaterialPresets.GetAStick()); + AllRecipies = new List { WoodenShovel, WoodenPickaxe, WoodenAxe, - StoneShovel, StonePickAxe, StoneAxe + StoneShovel, StonePickAxe, StoneAxe, + WoodenLadder }; } } diff --git a/Mundus/Data/SuperLayers/Land.cs b/Mundus/Data/SuperLayers/Land.cs index 8e88374..2f4e16c 100644 --- a/Mundus/Data/SuperLayers/Land.cs +++ b/Mundus/Data/SuperLayers/Land.cs @@ -48,5 +48,9 @@ namespace Mundus.Data.SuperLayers { public void RemoveGroundFromPosition(int yPos, int xPos) { groundLayer[yPos, xPos] = null; } + + public override string ToString() { + return "Land"; + } } } diff --git a/Mundus/Data/SuperLayers/Underground.cs b/Mundus/Data/SuperLayers/Underground.cs index 1d98c2d..22d13c0 100644 --- a/Mundus/Data/SuperLayers/Underground.cs +++ b/Mundus/Data/SuperLayers/Underground.cs @@ -50,5 +50,9 @@ namespace Mundus.Data.SuperLayers { public void RemoveGroundFromPosition(int yPos, int xPos) { groundLayer[yPos, xPos] = null; } + + public override string ToString() { + return "Underground"; + } } } diff --git a/Mundus/Data/Windows/WI.cs b/Mundus/Data/Windows/WI.cs index b00dc71..7fd3e99 100644 --- a/Mundus/Data/Windows/WI.cs +++ b/Mundus/Data/Windows/WI.cs @@ -14,30 +14,25 @@ namespace Mundus.Data.Windows { public static MusicWindow WMusic { get; private set; } public static CraftingWindow WCrafting { get; private set; } + //Gtk opens all window instances in the project automatically, unless they are hidden public static void CreateInstances() { WMain = new MainWindow(); - WNewGame = new NewGameWindow(); - WSGame = new SmallGameWindow(); - WMGame = new MediumGameWindow(); - WLGame = new LargeGameWindow(); - WSettings = new SettingsWindow(); - WPause = new PauseWindow(); - WMusic = new MusicWindow(); - WCrafting = new CraftingWindow(); - - HideAll(); - } - - //Gtk opens all window instances in the project automatically, unless they are hidden - private static void HideAll() { WMain.Hide(); + WNewGame = new NewGameWindow(); WNewGame.Hide(); + WSGame = new SmallGameWindow(); WSGame.Hide(); + WMGame = new MediumGameWindow(); WMGame.Hide(); + WLGame = new LargeGameWindow(); WLGame.Hide(); + WSettings = new SettingsWindow(); WSettings.Hide(); + WPause = new PauseWindow(); WPause.Hide(); + WMusic = new MusicWindow(); WMusic.Hide(); + WCrafting = new CraftingWindow(); WCrafting.Hide(); } } diff --git a/Mundus/Icons/Land/Structures/L_boulder_inventory.png b/Mundus/Icons/Land/Structures/L_boulder_inventory.png new file mode 100644 index 0000000..68f9107 Binary files /dev/null and b/Mundus/Icons/Land/Structures/L_boulder_inventory.png differ diff --git a/Mundus/Icons/Land/Structures/L_tree_inventory.png b/Mundus/Icons/Land/Structures/L_tree_inventory.png new file mode 100644 index 0000000..bb6f832 Binary files /dev/null and b/Mundus/Icons/Land/Structures/L_tree_inventory.png differ diff --git a/Mundus/Icons/Land/Structures/L_wooden_ladder.png b/Mundus/Icons/Land/Structures/L_wooden_ladder.png new file mode 100644 index 0000000..f37ff04 Binary files /dev/null and b/Mundus/Icons/Land/Structures/L_wooden_ladder.png differ diff --git a/Mundus/Icons/Land/Structures/L_wooden_ladder_inventory.png b/Mundus/Icons/Land/Structures/L_wooden_ladder_inventory.png new file mode 100644 index 0000000..4d38159 Binary files /dev/null and b/Mundus/Icons/Land/Structures/L_wooden_ladder_inventory.png differ diff --git a/Mundus/Icons/Project files/L_boulder.xcf b/Mundus/Icons/Project files/L_boulder.xcf index a53ac41..12498fd 100644 Binary files a/Mundus/Icons/Project files/L_boulder.xcf and b/Mundus/Icons/Project files/L_boulder.xcf differ diff --git a/Mundus/Icons/Project files/L_tree.xcf b/Mundus/Icons/Project files/L_tree.xcf index 4afac9e..1b881a8 100644 Binary files a/Mundus/Icons/Project files/L_tree.xcf and b/Mundus/Icons/Project files/L_tree.xcf differ diff --git a/Mundus/Icons/Project files/L_wooden_ladder.xcf b/Mundus/Icons/Project files/L_wooden_ladder.xcf new file mode 100644 index 0000000..26de0a0 Binary files /dev/null and b/Mundus/Icons/Project files/L_wooden_ladder.xcf differ diff --git a/Mundus/Mundus.csproj b/Mundus/Mundus.csproj index 8cc14c9..36b14e2 100644 --- a/Mundus/Mundus.csproj +++ b/Mundus/Mundus.csproj @@ -46,6 +46,7 @@ False + @@ -75,6 +76,10 @@ + + + + @@ -128,7 +133,6 @@ - @@ -139,6 +143,7 @@ + diff --git a/Mundus/Service/Mobs/IMob.cs b/Mundus/Service/Mobs/IMob.cs index df60892..0ff282e 100644 --- a/Mundus/Service/Mobs/IMob.cs +++ b/Mundus/Service/Mobs/IMob.cs @@ -5,7 +5,8 @@ namespace Mundus.Service.Mobs { public interface IMob { MobTile Tile { get; } ISuperLayer CurrSuperLayer { get; set; } - ISuperLayer GetLayerUndearneathCurr(); + ISuperLayer GetLayerUndearneathCurr(); + ISuperLayer GetLayerOnTopOfCurr(); int XPos { get; set; } int YPos { get; set; } int Health { get; set; } diff --git a/Mundus/Service/Mobs/LandMobs/Player.cs b/Mundus/Service/Mobs/LandMobs/Player.cs index 57913a6..cb048a1 100644 --- a/Mundus/Service/Mobs/LandMobs/Player.cs +++ b/Mundus/Service/Mobs/LandMobs/Player.cs @@ -24,6 +24,13 @@ namespace Mundus.Service.Mobs.LandMobs { return LI.Underground; } return null; + } + + public ISuperLayer GetLayerOnTopOfCurr() { + if (CurrSuperLayer == LI.Underground) { + return LI.Land; + } + return null; } } } diff --git a/Mundus/Service/Mobs/MobMovement.cs b/Mundus/Service/Mobs/MobMovement.cs index e97ead6..89ff359 100644 --- a/Mundus/Service/Mobs/MobMovement.cs +++ b/Mundus/Service/Mobs/MobMovement.cs @@ -17,9 +17,19 @@ namespace Mundus.Service.Mobs { if (Walkable(mob, yPos, xPos)) { mob.CurrSuperLayer.RemoveMobFromPosition(mob.YPos, mob.XPos); - if (mob.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null) { + if (mob.CurrSuperLayer.GetGroundLayerTile(yPos, xPos) == null && + mob.GetLayerUndearneathCurr() != null) { mob.CurrSuperLayer = mob.GetLayerUndearneathCurr(); } + else if (mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) != null) { + //Mobs can only climb to the superlayer on top of them, if there is a climable structure + //and there is a "hole" on top of the climable structure + if (mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos).IsClimable && + mob.GetLayerOnTopOfCurr() != null && + mob.GetLayerOnTopOfCurr().GetGroundLayerTile(yPos, xPos) == null) { + mob.CurrSuperLayer = mob.GetLayerOnTopOfCurr(); + } + } mob.YPos = yPos; mob.XPos = xPos; @@ -32,10 +42,6 @@ namespace Mundus.Service.Mobs { return (mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos) == null || mob.CurrSuperLayer.GetStructureLayerTile(yPos, xPos).IsWalkable) || mob.CurrSuperLayer.GetMobLayerTile(yPos, xPos) != null; - } - - public static bool PlayerCanWalkTo(int yPos, int xPos) { - return Walkable(LMI.Player, yPos, xPos); } } } diff --git a/Mundus/Service/Mobs/MobStatsController.cs b/Mundus/Service/Mobs/MobStatsController.cs index d8475e4..06bac39 100644 --- a/Mundus/Service/Mobs/MobStatsController.cs +++ b/Mundus/Service/Mobs/MobStatsController.cs @@ -35,5 +35,32 @@ namespace Mundus.Service.Mobs { LMI.Player.Health = MapSizes.CurrSize / 5 * 4; } } + + public static string GetPlayerSuperLayerName() { + return LMI.Player.CurrSuperLayer.ToString(); + } + + /// + /// Returns the player's horizontal (X) coordinates + /// + /// Player.XPos + public static int GetPlayerXCoord() { + return LMI.Player.XPos; + } + + /// + /// Returns the player's vertical (Y) coordinates + /// + /// Player.YPos + public static int GetPlayerYCoord() { + return LMI.Player.YPos; + } + + public static bool ExistsHoleOnTopOfPlayer() { + if (LMI.Player.GetLayerOnTopOfCurr() == null) { + return false; + } + return LMI.Player.GetLayerOnTopOfCurr().GetGroundLayerTile(LMI.Player.YPos, LMI.Player.XPos) == null; + } } } diff --git a/Mundus/Service/Mobs/MobTerraforming.cs b/Mundus/Service/Mobs/MobTerraforming.cs index 9ddf087..aa7300a 100644 --- a/Mundus/Service/Mobs/MobTerraforming.cs +++ b/Mundus/Service/Mobs/MobTerraforming.cs @@ -35,10 +35,13 @@ namespace Mundus.Service.Mobs { if (selStructure.ReqToolType == selTool.Type && selStructure.ReqToolClass <= selTool.Class) { int damagePoints = 1 + (selTool.Class - selStructure.ReqToolClass); - if (selStructure.DroppedMaterial != null) { + if (selStructure.GetDrop() != selStructure) { for (int i = 0; (i < damagePoints && i < selStructure.Health) && LMI.Player.Inventory.Items.Contains(null); i++) { - LMI.Player.Inventory.AppendToItems(new Material(selStructure.DroppedMaterial)); + LMI.Player.Inventory.AppendToItems(new Material((Material)selStructure.GetDrop())); } + } + else { + LMI.Player.Inventory.AppendToItems((Structure)selStructure.GetDrop()); } if (!selStructure.Damage(damagePoints)) { @@ -62,14 +65,29 @@ namespace Mundus.Service.Mobs { } if (toPlace != null) { - PlayerBuildAt(mapYPos, mapXPos, (Structure)toPlace[inventoryPlaceIndex]); - toPlace[inventoryPlaceIndex] = null; + //Remove item from inventory, only if it is placed + if (PlayerBuildAt(mapYPos, mapXPos, (Structure)toPlace[inventoryPlaceIndex])) { + toPlace[inventoryPlaceIndex] = null; + } } } } - private static void PlayerBuildAt(int mapYPos, int mapXPos, Structure toPlace) { - LMI.Player.CurrSuperLayer.SetStructureAtPosition(toPlace, mapYPos, mapXPos); + private static bool PlayerBuildAt(int mapYPos, int mapXPos, Structure toPlace) { + //You can't place things on top of "holes" (null in ground), but climable structures will be placed + //under the hole (if they can be) + if (toPlace.IsClimable && LMI.Player.CurrSuperLayer.GetGroundLayerTile(mapYPos, mapXPos) == null + && LMI.Player.GetLayerUndearneathCurr().GetStructureLayerTile(mapYPos, mapXPos) == null) { + LMI.Player.GetLayerUndearneathCurr().SetStructureAtPosition(toPlace, mapYPos, mapXPos); + + return true; + } + else if (LMI.Player.CurrSuperLayer.GetGroundLayerTile(mapYPos, mapXPos) != null) { + LMI.Player.CurrSuperLayer.SetStructureAtPosition(toPlace, mapYPos, mapXPos); + + return true; + } + return false; } public static void TryPlaceStructure(ISuperLayer superLayer, int yPos, int xPos, Structure toPlace) { diff --git a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs index b414f9b..2659d86 100644 --- a/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs +++ b/Mundus/Service/SuperLayers/Generators/LandSuperLayerGenerator.cs @@ -3,6 +3,7 @@ using Mundus.Data.Superlayers.Mobs; using Mundus.Data.SuperLayers; using Mundus.Data.Tiles; using Mundus.Service.Tiles; +using Mundus.Service.Tiles.ItemPresets; using Mundus.Service.Tiles.Items; namespace Mundus.Service.SuperLayers.Generators { @@ -37,7 +38,12 @@ namespace Mundus.Service.SuperLayers.Generators { for(int col = 0; col < size; col++) { for(int row = 0; row < size; row++) { - tiles[col, row] = GroundPresets.GetALGrass(); + if (rnd.Next(0, 100) == 1) { + tiles[col, row] = null; + } + else { + tiles[col, row] = GroundPresets.GetALGrass(); + } } } return tiles; @@ -48,11 +54,13 @@ namespace Mundus.Service.SuperLayers.Generators { for (int col = 0; col < size; col++) { for (int row = 0; row < size; row++) { - if (rnd.Next( 0, 50 ) == 1) { - tiles[col, row] = StructurePresets.GetALBoulder(); - } - if (rnd.Next(0, 10) == 1) { - tiles[col, row] = StructurePresets.GetALTree(); + if (LI.Land.GetGroundLayerTile(col, row) != null) { + if (rnd.Next(0, 50) == 1) { + tiles[col, row] = StructurePresets.GetALBoulder(); + } + if (rnd.Next(0, 10) == 1) { + tiles[col, row] = StructurePresets.GetALTree(); + } } } } diff --git a/Mundus/Service/SuperLayers/Generators/UndergroundSuperLayerGenerator.cs b/Mundus/Service/SuperLayers/Generators/UndergroundSuperLayerGenerator.cs index 0e77336..cb831ab 100644 --- a/Mundus/Service/SuperLayers/Generators/UndergroundSuperLayerGenerator.cs +++ b/Mundus/Service/SuperLayers/Generators/UndergroundSuperLayerGenerator.cs @@ -2,6 +2,7 @@ using Mundus.Data.Superlayers.Mobs; using Mundus.Data.SuperLayers; using Mundus.Service.Tiles; +using Mundus.Service.Tiles.ItemPresets; using Mundus.Service.Tiles.Items; namespace Mundus.Service.SuperLayers.Generators { @@ -42,9 +43,11 @@ namespace Mundus.Service.SuperLayers.Generators { for (int col = 0; col < size; col++) { for (int row = 0; row < size; row++) { - tiles[col, row] = StructurePresets.GetAURock(); - if (rnd.Next(0, 10) == 1) { - tiles[col, row] = null; + if (LI.Land.GetGroundLayerTile(col, row) != null) { + tiles[col, row] = StructurePresets.GetAURock(); + if (rnd.Next(0, 10) == 1) { + tiles[col, row] = null; + } } } } diff --git a/Mundus/Service/SuperLayers/ImageController.cs b/Mundus/Service/SuperLayers/ImageController.cs index 941affe..b1f3d7a 100644 --- a/Mundus/Service/SuperLayers/ImageController.cs +++ b/Mundus/Service/SuperLayers/ImageController.cs @@ -2,6 +2,7 @@ using Mundus.Data; using Mundus.Data.Superlayers.Mobs; using Mundus.Data.SuperLayers; +using Mundus.Service.Tiles.Items; namespace Mundus.Service.SuperLayers { public static class ImageController { @@ -41,7 +42,7 @@ namespace Mundus.Service.SuperLayers { //Return a tile if it exists, otherwise return the "blank" icon public static Image GetStructureImage(int row, int col) { ISuperLayer superLayer = LMI.Player.CurrSuperLayer; - Image img = new Image( "blank", IconSize.Dnd ); + Image img = new Image("blank", IconSize.Dnd ); if (row >= 0 && col >= 0 && col < MapSizes.CurrSize && row < MapSizes.CurrSize && superLayer.GetStructureLayerTile( row, col ) != null) { @@ -55,7 +56,14 @@ namespace Mundus.Service.SuperLayers { if (index < LMI.Player.Inventory.Hotbar.Length) { if (LMI.Player.Inventory.Hotbar[index] != null) { - img = LMI.Player.Inventory.Hotbar[index].Texture; + //Structures have two icons, one when they are placed and one as an inventory item + if (LMI.Player.Inventory.Hotbar[index].GetType() == typeof(Structure)) { + Structure tmp = (Structure)LMI.Player.Inventory.Hotbar[index]; + img = new Image(tmp.inventory_stock_id, IconSize.Dnd); + } + else { + img = LMI.Player.Inventory.Hotbar[index].Texture; + } } } return img; @@ -65,7 +73,14 @@ namespace Mundus.Service.SuperLayers { Image img = new Image("blank", IconSize.Dnd); if (index < LMI.Player.Inventory.Items.Length) { if (LMI.Player.Inventory.Items[index] != null) { - img = LMI.Player.Inventory.Items[index].Texture; + //Structures have two icons, one when they are placed and one as an inventory item + if (LMI.Player.Inventory.Items[index].GetType() == typeof(Structure)) { + Structure tmp = (Structure)LMI.Player.Inventory.Items[index]; + img = new Image(tmp.inventory_stock_id, IconSize.Dnd); + } + else { + img = LMI.Player.Inventory.Items[index].Texture; + } } } return img; diff --git a/Mundus/Service/SuperLayers/StructurePresets.cs b/Mundus/Service/SuperLayers/StructurePresets.cs deleted file mode 100644 index a1219d4..0000000 --- a/Mundus/Service/SuperLayers/StructurePresets.cs +++ /dev/null @@ -1,19 +0,0 @@ -using Mundus.Data.Tiles; -using Mundus.Service.Tiles.ItemPresets; -using Mundus.Service.Tiles.Items; - -namespace Mundus.Service.SuperLayers { - public static class StructurePresets { - public static Structure GetALBoulder() { - return new Structure("L_boulder", 7, ToolTypes.Pickaxe, 1, false, MaterialPresets.GetALandRock()); - } - - public static Structure GetALTree() { - return new Structure("L_tree", 5, ToolTypes.Axe, 1, false, MaterialPresets.GetAStick()); - } - - public static Structure GetAURock() { - return new Structure("U_rock", 10, ToolTypes.Pickaxe, 2); - } - } -} diff --git a/Mundus/Service/Tiles/ItemPresets/StructurePresets.cs b/Mundus/Service/Tiles/ItemPresets/StructurePresets.cs new file mode 100644 index 0000000..8feb3d3 --- /dev/null +++ b/Mundus/Service/Tiles/ItemPresets/StructurePresets.cs @@ -0,0 +1,23 @@ +using System; +using Mundus.Data.Tiles; +using Mundus.Service.Tiles.Items; + +namespace Mundus.Service.Tiles.ItemPresets { + public static class StructurePresets { + public static Structure GetALBoulder() { + return new Structure("L_boulder", "L_boulder_inventory", 7, ToolTypes.Pickaxe, 1, false, false, MaterialPresets.GetALandRock()); + } + + public static Structure GetALTree() { + return new Structure("L_tree", "L_tree_inventory", 5, ToolTypes.Axe, 1, false, false, MaterialPresets.GetAStick()); + } + + public static Structure GetAURock() { + return new Structure("U_rock", "U_rock", 10, ToolTypes.Pickaxe, 2); + } + + public static Structure GetAWoodenLadder() { + return new Structure("L_wooden_ladder", "L_wooden_ladder_inventory", 1, ToolTypes.Axe, 1, true, true); + } + } +} diff --git a/Mundus/Service/Tiles/Items/Structure.cs b/Mundus/Service/Tiles/Items/Structure.cs index e6e784c..54bb548 100644 --- a/Mundus/Service/Tiles/Items/Structure.cs +++ b/Mundus/Service/Tiles/Items/Structure.cs @@ -1,23 +1,48 @@ namespace Mundus.Service.Tiles.Items { public class Structure : ItemTile { + private Material droppedMaterial; + + public string inventory_stock_id { get; private set; } public int ReqToolType { get; private set; } public int ReqToolClass { get; private set; } - public Material DroppedMaterial { get; private set; } public int Health { get; private set; } + public bool IsClimable { get; private set; } public bool IsWalkable { get; private set; } - public Structure(Structure structure) :this(structure.stock_id, structure.Health, structure.ReqToolType, structure.ReqToolClass, structure.IsWalkable, - new Material(structure.DroppedMaterial.stock_id)) { + public Structure(Structure structure) :this(structure.stock_id, structure.inventory_stock_id, structure.Health, structure.ReqToolType, structure.ReqToolClass, structure.IsWalkable, + structure.IsWalkable, (structure.droppedMaterial != null)?new Material(structure.droppedMaterial.stock_id):null) { } - public Structure(string stock_id, int health, int reqToolType, int reqToolClass, bool isWalkable = false, Material droppedMaterial = null) : base(stock_id) { + /// + /// Initializes a new instance of the Stucture class. + /// + /// Stock identifier. + /// Health. + /// Required tool type. + /// Required tool class. + /// If set to true is walkable. + /// Dropped material. If null, structure drops itself + public Structure(string stock_id, string inventory_stock_id, int health, int reqToolType, int reqToolClass, bool isWalkable = false, bool isClimable = false, Material droppedMaterial = null) : base(stock_id) { + this.inventory_stock_id = inventory_stock_id; this.Health = health; this.ReqToolType = reqToolType; this.ReqToolClass = reqToolClass; this.IsWalkable = isWalkable; - this.DroppedMaterial = droppedMaterial; + this.IsClimable = isClimable; + this.droppedMaterial = droppedMaterial; + } + + /// + /// Returns what the structure drops after being broken + /// + /// The drop. + public ItemTile GetDrop() { + if (droppedMaterial == null) { + return this; + } + return droppedMaterial; } /// @@ -31,7 +56,7 @@ public override string ToString() { return $"Structure | ID: {this.stock_id} H: {this.Health} TT: {this.ReqToolType} TC: {this.ReqToolClass} " + - $"W: {this.IsWalkable} DM ID: {this.DroppedMaterial.stock_id}"; + $"W: {this.IsWalkable} DM ID: {((droppedMaterial != null)?this.droppedMaterial.stock_id:null)}"; } } } diff --git a/Mundus/Views/Windows/CraftingWindow.cs b/Mundus/Views/Windows/CraftingWindow.cs index f5c2c3d..6ee95c3 100644 --- a/Mundus/Views/Windows/CraftingWindow.cs +++ b/Mundus/Views/Windows/CraftingWindow.cs @@ -35,7 +35,13 @@ namespace Mundus.Views.Windows { CraftingRecipe recipe = Recipes[recipeIndex]; btnCraft.Sensitive = true; - imgItem.SetFromStock(recipe.ResultItem.stock_id, IconSize.Dnd); + if (recipe.ResultItem.GetType() == typeof(Structure)) { + Structure tmp = (Structure)recipe.ResultItem; + imgItem.SetFromStock(tmp.inventory_stock_id, IconSize.Dnd); + } + else { + imgItem.SetFromStock(recipe.ResultItem.stock_id, IconSize.Dnd); + } lblInfo.Text = recipe.ResultItem.ToString(); lblC1.Text = recipe.Count1 + ""; diff --git a/Mundus/Views/Windows/SmallGameWindow.cs b/Mundus/Views/Windows/SmallGameWindow.cs index 230bffb..f983e62 100644 --- a/Mundus/Views/Windows/SmallGameWindow.cs +++ b/Mundus/Views/Windows/SmallGameWindow.cs @@ -87,6 +87,10 @@ namespace Mundus.Views.Windows { imgG24.Visible = isVisible; imgG25.Visible = isVisible; + lblSuperLayer.Visible = isVisible; + lblCoord1.Visible = isVisible; + lblCoord2.Visible = isVisible; + lblItemLayer.Visible = isVisible; imgI1.Visible = isVisible; imgI2.Visible = isVisible; @@ -114,6 +118,9 @@ namespace Mundus.Views.Windows { imgI24.Visible = isVisible; imgI25.Visible = isVisible; + lblHoleMsg.Visible = isVisible; + lblHoleOnTop.Visible = isVisible; + lblBlank5.Visible = isVisible; } @@ -308,6 +315,10 @@ namespace Mundus.Views.Windows { } } + lblSuperLayer.Text = MobStatsController.GetPlayerSuperLayerName(); + lblCoord1.Text = "X: " + MobStatsController.GetPlayerXCoord(); + lblCoord2.Text = "Y: " + MobStatsController.GetPlayerYCoord(); + //Prints the "Item layer" in map menu for (int row = Calculate.CalculateStartY(Size), maxY = Calculate.CalculateMaxY(Size), img = 1; row <= maxY; row++) { for (int col = Calculate.CalculateStartX(Size), maxX = Calculate.CalculateMaxX(Size); col <= maxX; col++, img++) { @@ -342,6 +353,8 @@ namespace Mundus.Views.Windows { } } } + + lblHoleOnTop.Text = MobStatsController.ExistsHoleOnTopOfPlayer() + ""; } public void PrintInventory() { diff --git a/Mundus/gtk-gui/Mundus.Views.Dialogs.ExitDialog.cs b/Mundus/gtk-gui/Mundus.Views.Dialogs.ExitDialog.cs index b5c946a..d41fb25 100644 --- a/Mundus/gtk-gui/Mundus.Views.Dialogs.ExitDialog.cs +++ b/Mundus/gtk-gui/Mundus.Views.Dialogs.ExitDialog.cs @@ -17,6 +17,7 @@ namespace Mundus.Views.Dialogs global::Stetic.Gui.Initialize(this); // Widget Mundus.Views.Dialogs.ExitDialog this.Name = "Mundus.Views.Dialogs.ExitDialog"; + this.Title = ""; this.WindowPosition = ((global::Gtk.WindowPosition)(4)); // Internal child Mundus.Views.Dialogs.ExitDialog.VBox global::Gtk.VBox w1 = this.VBox; @@ -27,7 +28,7 @@ namespace Mundus.Views.Dialogs this.lblMessage.HeightRequest = 50; this.lblMessage.Name = "lblMessage"; this.lblMessage.LabelProp = "You haven\'t saved for {number} of seconds. Are you sure you want to exit without " + - "saving?"; + "saving?"; w1.Add(this.lblMessage); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.lblMessage])); w2.Position = 0; diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs index 7ef6476..c7cf374 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.MainWindow.cs @@ -23,7 +23,7 @@ namespace Mundus.Views.Windows global::Stetic.Gui.Initialize(this); // Widget Mundus.Views.Windows.MainWindow this.Name = "Mundus.Views.Windows.MainWindow"; - this.Title = "Mundus"; + this.Title = "Mundus"; this.WindowPosition = ((global::Gtk.WindowPosition)(4)); this.Resizable = false; this.AllowGrow = false; diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs index 685ae15..81f98a1 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.NewGameWindow.cs @@ -246,7 +246,6 @@ namespace Mundus.Views.Windows this.rbCreative.WidthRequest = 90; this.rbCreative.CanFocus = true; this.rbCreative.Name = "rbCreative"; - this.rbCreative.Active = true; this.rbCreative.DrawIndicator = true; this.rbCreative.UseUnderline = true; this.rbCreative.Group = new global::GLib.SList(global::System.IntPtr.Zero); @@ -263,7 +262,6 @@ namespace Mundus.Views.Windows this.rbEasy.WidthRequest = 90; this.rbEasy.CanFocus = true; this.rbEasy.Name = "rbEasy"; - this.rbEasy.Active = true; this.rbEasy.DrawIndicator = true; this.rbEasy.UseUnderline = true; this.rbEasy.Group = new global::GLib.SList(global::System.IntPtr.Zero); @@ -312,7 +310,6 @@ namespace Mundus.Views.Windows this.rbLarge.WidthRequest = 90; this.rbLarge.CanFocus = true; this.rbLarge.Name = "rbLarge"; - this.rbLarge.Active = true; this.rbLarge.DrawIndicator = true; this.rbLarge.UseUnderline = true; this.rbLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero); @@ -344,7 +341,6 @@ namespace Mundus.Views.Windows this.rbMLarge = new global::Gtk.RadioButton("Large"); this.rbMLarge.CanFocus = true; this.rbMLarge.Name = "rbMLarge"; - this.rbMLarge.Active = true; this.rbMLarge.DrawIndicator = true; this.rbMLarge.UseUnderline = true; this.rbMLarge.Group = new global::GLib.SList(global::System.IntPtr.Zero); diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs index cf0c2f3..f9b728b 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.PauseWindow.cs @@ -55,7 +55,8 @@ namespace Mundus.Views.Windows // Container child hbox1.Gtk.Box+BoxChild this.lblTitle = new global::Gtk.Label(); this.lblTitle.Name = "lblTitle"; - this.lblTitle.LabelProp = "Pause menu (replace with picture)"; + this.lblTitle.LabelProp = "Pause menu"; + this.lblTitle.Justify = ((global::Gtk.Justification)(2)); this.hbox1.Add(this.lblTitle); global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblTitle])); w2.Position = 1; @@ -133,7 +134,7 @@ namespace Mundus.Views.Windows { this.Child.ShowAll(); } - this.DefaultWidth = 260; + this.DefaultWidth = 191; this.DefaultHeight = 285; this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); diff --git a/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs b/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs index d4b2b04..1ca896b 100644 --- a/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs +++ b/Mundus/gtk-gui/Mundus.Views.Windows.SmallGameWindow.cs @@ -298,12 +298,20 @@ namespace Mundus.Views.Windows private global::Gtk.Label lblBlank9; + private global::Gtk.Label lblCoord1; + + private global::Gtk.Label lblCoord2; + private global::Gtk.Label lblEventLog; private global::Gtk.Label lblGear; private global::Gtk.Label lblGroundLayer; + private global::Gtk.Label lblHoleMsg; + + private global::Gtk.Label lblHoleOnTop; + private global::Gtk.Label lblHotbar; private global::Gtk.Label lblInfo; @@ -318,6 +326,8 @@ namespace Mundus.Views.Windows private global::Gtk.Label lblLog4; + private global::Gtk.Label lblSuperLayer; + protected virtual void Build() { global::Stetic.Gui.Initialize(this); @@ -502,11 +512,10 @@ namespace Mundus.Views.Windows w20.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.btnCrafting = new global::Gtk.Button(); - this.btnCrafting.HeightRequest = 50; this.btnCrafting.CanFocus = true; this.btnCrafting.Name = "btnCrafting"; this.btnCrafting.UseUnderline = true; - this.btnCrafting.Label = "Crafting Menu"; + this.btnCrafting.Label = "Crafting"; this.tbUI.Add(this.btnCrafting); global::Gtk.Table.TableChild w21 = ((global::Gtk.Table.TableChild)(this.tbUI[this.btnCrafting])); w21.TopAttach = ((uint)(6)); @@ -2545,19 +2554,47 @@ namespace Mundus.Views.Windows w218.XOptions = ((global::Gtk.AttachOptions)(4)); w218.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild + this.lblCoord1 = new global::Gtk.Label(); + this.lblCoord1.WidthRequest = 50; + this.lblCoord1.HeightRequest = 50; + this.lblCoord1.Name = "lblCoord1"; + this.lblCoord1.Justify = ((global::Gtk.Justification)(2)); + this.tbUI.Add(this.lblCoord1); + global::Gtk.Table.TableChild w219 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblCoord1])); + w219.TopAttach = ((uint)(7)); + w219.BottomAttach = ((uint)(8)); + w219.LeftAttach = ((uint)(4)); + w219.RightAttach = ((uint)(5)); + w219.XOptions = ((global::Gtk.AttachOptions)(4)); + w219.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child tbUI.Gtk.Table+TableChild + this.lblCoord2 = new global::Gtk.Label(); + this.lblCoord2.WidthRequest = 50; + this.lblCoord2.HeightRequest = 50; + this.lblCoord2.Name = "lblCoord2"; + this.lblCoord2.Justify = ((global::Gtk.Justification)(2)); + this.tbUI.Add(this.lblCoord2); + global::Gtk.Table.TableChild w220 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblCoord2])); + w220.TopAttach = ((uint)(7)); + w220.BottomAttach = ((uint)(8)); + w220.LeftAttach = ((uint)(5)); + w220.RightAttach = ((uint)(6)); + w220.XOptions = ((global::Gtk.AttachOptions)(4)); + w220.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child tbUI.Gtk.Table+TableChild this.lblEventLog = new global::Gtk.Label(); this.lblEventLog.WidthRequest = 50; this.lblEventLog.HeightRequest = 50; this.lblEventLog.Name = "lblEventLog"; this.lblEventLog.LabelProp = "Event Log"; this.tbUI.Add(this.lblEventLog); - global::Gtk.Table.TableChild w219 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblEventLog])); - w219.TopAttach = ((uint)(11)); - w219.BottomAttach = ((uint)(12)); - w219.LeftAttach = ((uint)(8)); - w219.RightAttach = ((uint)(13)); - w219.XOptions = ((global::Gtk.AttachOptions)(4)); - w219.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w221 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblEventLog])); + w221.TopAttach = ((uint)(11)); + w221.BottomAttach = ((uint)(12)); + w221.LeftAttach = ((uint)(8)); + w221.RightAttach = ((uint)(13)); + w221.XOptions = ((global::Gtk.AttachOptions)(4)); + w221.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblGear = new global::Gtk.Label(); this.lblGear.HeightRequest = 50; @@ -2565,25 +2602,54 @@ namespace Mundus.Views.Windows this.lblGear.LabelProp = "Gear"; this.lblGear.Justify = ((global::Gtk.Justification)(2)); this.tbUI.Add(this.lblGear); - global::Gtk.Table.TableChild w220 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblGear])); - w220.TopAttach = ((uint)(11)); - w220.BottomAttach = ((uint)(12)); - w220.LeftAttach = ((uint)(15)); - w220.RightAttach = ((uint)(20)); - w220.XOptions = ((global::Gtk.AttachOptions)(4)); - w220.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w222 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblGear])); + w222.TopAttach = ((uint)(11)); + w222.BottomAttach = ((uint)(12)); + w222.LeftAttach = ((uint)(15)); + w222.RightAttach = ((uint)(20)); + w222.XOptions = ((global::Gtk.AttachOptions)(4)); + w222.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblGroundLayer = new global::Gtk.Label(); this.lblGroundLayer.Name = "lblGroundLayer"; this.lblGroundLayer.LabelProp = "Ground Layer"; this.tbUI.Add(this.lblGroundLayer); - global::Gtk.Table.TableChild w221 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblGroundLayer])); - w221.TopAttach = ((uint)(1)); - w221.BottomAttach = ((uint)(2)); - w221.LeftAttach = ((uint)(1)); - w221.RightAttach = ((uint)(6)); - w221.XOptions = ((global::Gtk.AttachOptions)(4)); - w221.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w223 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblGroundLayer])); + w223.TopAttach = ((uint)(1)); + w223.BottomAttach = ((uint)(2)); + w223.LeftAttach = ((uint)(1)); + w223.RightAttach = ((uint)(6)); + w223.XOptions = ((global::Gtk.AttachOptions)(4)); + w223.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child tbUI.Gtk.Table+TableChild + this.lblHoleMsg = new global::Gtk.Label(); + this.lblHoleMsg.WidthRequest = 200; + this.lblHoleMsg.HeightRequest = 50; + this.lblHoleMsg.Name = "lblHoleMsg"; + this.lblHoleMsg.LabelProp = "There is a hole above player:"; + this.lblHoleMsg.Justify = ((global::Gtk.Justification)(2)); + this.tbUI.Add(this.lblHoleMsg); + global::Gtk.Table.TableChild w224 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblHoleMsg])); + w224.TopAttach = ((uint)(15)); + w224.BottomAttach = ((uint)(16)); + w224.LeftAttach = ((uint)(1)); + w224.RightAttach = ((uint)(5)); + w224.XOptions = ((global::Gtk.AttachOptions)(4)); + w224.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child tbUI.Gtk.Table+TableChild + this.lblHoleOnTop = new global::Gtk.Label(); + this.lblHoleOnTop.WidthRequest = 50; + this.lblHoleOnTop.HeightRequest = 50; + this.lblHoleOnTop.Name = "lblHoleOnTop"; + this.lblHoleOnTop.Justify = ((global::Gtk.Justification)(2)); + this.tbUI.Add(this.lblHoleOnTop); + global::Gtk.Table.TableChild w225 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblHoleOnTop])); + w225.TopAttach = ((uint)(15)); + w225.BottomAttach = ((uint)(16)); + w225.LeftAttach = ((uint)(5)); + w225.RightAttach = ((uint)(6)); + w225.XOptions = ((global::Gtk.AttachOptions)(4)); + w225.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblHotbar = new global::Gtk.Label(); this.lblHotbar.WidthRequest = 50; @@ -2591,13 +2657,13 @@ namespace Mundus.Views.Windows this.lblHotbar.Name = "lblHotbar"; this.lblHotbar.LabelProp = "Hotbar"; this.tbUI.Add(this.lblHotbar); - global::Gtk.Table.TableChild w222 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblHotbar])); - w222.TopAttach = ((uint)(9)); - w222.BottomAttach = ((uint)(10)); - w222.LeftAttach = ((uint)(8)); - w222.RightAttach = ((uint)(13)); - w222.XOptions = ((global::Gtk.AttachOptions)(4)); - w222.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w226 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblHotbar])); + w226.TopAttach = ((uint)(9)); + w226.BottomAttach = ((uint)(10)); + w226.LeftAttach = ((uint)(8)); + w226.RightAttach = ((uint)(13)); + w226.XOptions = ((global::Gtk.AttachOptions)(4)); + w226.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblInfo = new global::Gtk.Label(); this.lblInfo.WidthRequest = 250; @@ -2606,77 +2672,91 @@ namespace Mundus.Views.Windows this.lblInfo.Wrap = true; this.lblInfo.Justify = ((global::Gtk.Justification)(2)); this.tbUI.Add(this.lblInfo); - global::Gtk.Table.TableChild w223 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblInfo])); - w223.TopAttach = ((uint)(15)); - w223.BottomAttach = ((uint)(16)); - w223.LeftAttach = ((uint)(15)); - w223.RightAttach = ((uint)(20)); - w223.XOptions = ((global::Gtk.AttachOptions)(4)); - w223.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w227 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblInfo])); + w227.TopAttach = ((uint)(15)); + w227.BottomAttach = ((uint)(16)); + w227.LeftAttach = ((uint)(15)); + w227.RightAttach = ((uint)(20)); + w227.XOptions = ((global::Gtk.AttachOptions)(4)); + w227.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblItemLayer = new global::Gtk.Label(); this.lblItemLayer.Name = "lblItemLayer"; this.lblItemLayer.LabelProp = "Structure Layer"; this.tbUI.Add(this.lblItemLayer); - global::Gtk.Table.TableChild w224 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblItemLayer])); - w224.TopAttach = ((uint)(9)); - w224.BottomAttach = ((uint)(10)); - w224.LeftAttach = ((uint)(1)); - w224.RightAttach = ((uint)(6)); - w224.XOptions = ((global::Gtk.AttachOptions)(4)); - w224.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w228 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblItemLayer])); + w228.TopAttach = ((uint)(9)); + w228.BottomAttach = ((uint)(10)); + w228.LeftAttach = ((uint)(1)); + w228.RightAttach = ((uint)(6)); + w228.XOptions = ((global::Gtk.AttachOptions)(4)); + w228.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblLog1 = new global::Gtk.Label(); this.lblLog1.HeightRequest = 50; this.lblLog1.Name = "lblLog1"; this.lblLog1.LabelProp = "label6"; this.tbUI.Add(this.lblLog1); - global::Gtk.Table.TableChild w225 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog1])); - w225.TopAttach = ((uint)(12)); - w225.BottomAttach = ((uint)(13)); - w225.LeftAttach = ((uint)(8)); - w225.RightAttach = ((uint)(13)); - w225.XOptions = ((global::Gtk.AttachOptions)(4)); - w225.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w229 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog1])); + w229.TopAttach = ((uint)(12)); + w229.BottomAttach = ((uint)(13)); + w229.LeftAttach = ((uint)(8)); + w229.RightAttach = ((uint)(13)); + w229.XOptions = ((global::Gtk.AttachOptions)(4)); + w229.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblLog2 = new global::Gtk.Label(); this.lblLog2.HeightRequest = 50; this.lblLog2.Name = "lblLog2"; this.lblLog2.LabelProp = "label7"; this.tbUI.Add(this.lblLog2); - global::Gtk.Table.TableChild w226 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog2])); - w226.TopAttach = ((uint)(13)); - w226.BottomAttach = ((uint)(14)); - w226.LeftAttach = ((uint)(8)); - w226.RightAttach = ((uint)(13)); - w226.XOptions = ((global::Gtk.AttachOptions)(4)); - w226.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w230 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog2])); + w230.TopAttach = ((uint)(13)); + w230.BottomAttach = ((uint)(14)); + w230.LeftAttach = ((uint)(8)); + w230.RightAttach = ((uint)(13)); + w230.XOptions = ((global::Gtk.AttachOptions)(4)); + w230.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblLog3 = new global::Gtk.Label(); this.lblLog3.HeightRequest = 50; this.lblLog3.Name = "lblLog3"; this.lblLog3.LabelProp = "label7"; this.tbUI.Add(this.lblLog3); - global::Gtk.Table.TableChild w227 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog3])); - w227.TopAttach = ((uint)(14)); - w227.BottomAttach = ((uint)(15)); - w227.LeftAttach = ((uint)(8)); - w227.RightAttach = ((uint)(13)); - w227.XOptions = ((global::Gtk.AttachOptions)(4)); - w227.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w231 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog3])); + w231.TopAttach = ((uint)(14)); + w231.BottomAttach = ((uint)(15)); + w231.LeftAttach = ((uint)(8)); + w231.RightAttach = ((uint)(13)); + w231.XOptions = ((global::Gtk.AttachOptions)(4)); + w231.YOptions = ((global::Gtk.AttachOptions)(4)); // Container child tbUI.Gtk.Table+TableChild this.lblLog4 = new global::Gtk.Label(); this.lblLog4.HeightRequest = 50; this.lblLog4.Name = "lblLog4"; this.lblLog4.LabelProp = "label7"; this.tbUI.Add(this.lblLog4); - global::Gtk.Table.TableChild w228 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog4])); - w228.TopAttach = ((uint)(15)); - w228.BottomAttach = ((uint)(16)); - w228.LeftAttach = ((uint)(8)); - w228.RightAttach = ((uint)(13)); - w228.XOptions = ((global::Gtk.AttachOptions)(4)); - w228.YOptions = ((global::Gtk.AttachOptions)(4)); + global::Gtk.Table.TableChild w232 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblLog4])); + w232.TopAttach = ((uint)(15)); + w232.BottomAttach = ((uint)(16)); + w232.LeftAttach = ((uint)(8)); + w232.RightAttach = ((uint)(13)); + w232.XOptions = ((global::Gtk.AttachOptions)(4)); + w232.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child tbUI.Gtk.Table+TableChild + this.lblSuperLayer = new global::Gtk.Label(); + this.lblSuperLayer.WidthRequest = 100; + this.lblSuperLayer.HeightRequest = 50; + this.lblSuperLayer.Name = "lblSuperLayer"; + this.lblSuperLayer.Justify = ((global::Gtk.Justification)(2)); + this.tbUI.Add(this.lblSuperLayer); + global::Gtk.Table.TableChild w233 = ((global::Gtk.Table.TableChild)(this.tbUI[this.lblSuperLayer])); + w233.TopAttach = ((uint)(7)); + w233.BottomAttach = ((uint)(8)); + w233.LeftAttach = ((uint)(1)); + w233.RightAttach = ((uint)(3)); + w233.XOptions = ((global::Gtk.AttachOptions)(4)); + w233.YOptions = ((global::Gtk.AttachOptions)(4)); this.Add(this.tbUI); if ((this.Child != null)) { diff --git a/Mundus/gtk-gui/generated.cs b/Mundus/gtk-gui/generated.cs index 11c091f..d1017c8 100644 --- a/Mundus/gtk-gui/generated.cs +++ b/Mundus/gtk-gui/generated.cs @@ -60,6 +60,14 @@ namespace Stetic w1.Add("U_roche", w24); global::Gtk.IconSet w25 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Ground.L_hole.png")); w1.Add("L_hole", w25); + global::Gtk.IconSet w26 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Structures.L_wooden_ladder.png")); + w1.Add("L_wooden_ladder", w26); + global::Gtk.IconSet w27 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Structures.L_boulder_inventory.png")); + w1.Add("L_boulder_inventory", w27); + global::Gtk.IconSet w28 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Structures.L_tree_inventory.png")); + w1.Add("L_tree_inventory", w28); + global::Gtk.IconSet w29 = new global::Gtk.IconSet(global::Gdk.Pixbuf.LoadFromResource("Mundus.Icons.Land.Structures.L_wooden_ladder_inventory.png")); + w1.Add("L_wooden_ladder_inventory", w29); w1.AddDefault(); } } diff --git a/Mundus/gtk-gui/gui.stetic b/Mundus/gtk-gui/gui.stetic index 6675c89..b5603bd 100644 --- a/Mundus/gtk-gui/gui.stetic +++ b/Mundus/gtk-gui/gui.stetic @@ -127,10 +127,30 @@ resource:Mundus.Icons.Land.Ground.L_hole.png + + + resource:Mundus.Icons.Land.Structures.L_wooden_ladder.png + + + + + resource:Mundus.Icons.Land.Structures.L_boulder_inventory.png + + + + + resource:Mundus.Icons.Land.Structures.L_tree_inventory.png + + + + + resource:Mundus.Icons.Land.Structures.L_wooden_ladder_inventory.png + + - Create a New Game + Create a New Game CenterOnParent False False @@ -200,7 +220,7 @@ 50 True TextOnly - Back + Back True 3 @@ -226,7 +246,7 @@ 50 True TextOnly - Generate + Generate True 3 @@ -371,7 +391,7 @@ 90 50 - Difficulty + Difficulty 3 @@ -394,7 +414,7 @@ 90 50 - Game Mode: + Game Mode: 2 @@ -417,7 +437,7 @@ 90 50 - Map size + Map size 5 @@ -440,7 +460,7 @@ 90 50 - Screen & Inventory size + Screen & Inventory size True Center @@ -465,7 +485,7 @@ 180 50 - New Game (replace with picture) + New Game (replace with picture) True Center @@ -488,8 +508,7 @@ 90 True - Creative - True + Creative True True True @@ -517,8 +536,7 @@ 90 True - Easy - True + Easy True True True @@ -545,7 +563,7 @@ 90 True - Hard + Hard True True True @@ -572,7 +590,7 @@ 90 True - Insane + Insane True True True @@ -599,8 +617,7 @@ 90 True - Large - True + Large True True True @@ -628,7 +645,7 @@ 90 True - Medium + Medium True True True @@ -655,8 +672,7 @@ True - Large - True + Large True True True @@ -683,7 +699,7 @@ 90 True - Medium + Medium True True True @@ -710,7 +726,7 @@ 90 True - Small + Small True True True @@ -737,7 +753,7 @@ 90 True - Normal + Normal True True True @@ -764,7 +780,7 @@ 90 True - Peaceful + Peaceful True True True @@ -791,7 +807,7 @@ 90 True - Small + Small True True True @@ -819,7 +835,7 @@ 90 True - Survival + Survival True True True @@ -846,7 +862,7 @@ - Mundus (Small Window) + Mundus (Small Window) CenterOnParent False False @@ -1288,33 +1304,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1322,7 +1311,7 @@ 50 True TextAndIcon - + True @@ -1349,7 +1338,7 @@ 50 True TextAndIcon - + True @@ -1376,7 +1365,7 @@ 50 True TextAndIcon - + True @@ -1403,7 +1392,7 @@ 50 True TextAndIcon - + True @@ -1430,7 +1419,7 @@ 50 True TextAndIcon - + True @@ -1457,7 +1446,7 @@ 50 True TextAndIcon - + True @@ -1484,7 +1473,7 @@ 50 True TextAndIcon - + True @@ -1511,7 +1500,7 @@ 50 True TextAndIcon - + True @@ -1538,7 +1527,7 @@ 50 True TextAndIcon - + True @@ -1565,7 +1554,7 @@ 50 True TextAndIcon - + True @@ -1588,10 +1577,9 @@ - 50 True TextOnly - Crafting Menu + Crafting True @@ -1618,7 +1606,7 @@ 50 True TextAndIcon - + True @@ -1645,7 +1633,7 @@ 50 True TextAndIcon - + True @@ -1672,7 +1660,7 @@ 50 True TextAndIcon - + True @@ -1699,7 +1687,7 @@ 50 True TextAndIcon - + True @@ -1726,7 +1714,7 @@ 50 True TextAndIcon - + True @@ -1753,7 +1741,7 @@ 50 True TextAndIcon - + True Half @@ -1781,7 +1769,7 @@ 50 True TextAndIcon - + True Half @@ -1809,7 +1797,7 @@ 50 True TextAndIcon - + True Half @@ -1837,7 +1825,7 @@ 50 True TextAndIcon - + True Half @@ -1865,7 +1853,7 @@ 50 True TextAndIcon - + True Half @@ -1893,7 +1881,7 @@ 50 True TextAndIcon - + True Half @@ -1921,7 +1909,7 @@ 50 True TextAndIcon - + True Half @@ -1949,7 +1937,7 @@ 50 True TextAndIcon - + True Half @@ -1977,7 +1965,7 @@ 50 True TextAndIcon - + True Half @@ -2005,7 +1993,7 @@ 50 True TextAndIcon - + True Half @@ -2033,7 +2021,7 @@ 50 True TextAndIcon - + True Half @@ -2061,7 +2049,7 @@ 50 True TextAndIcon - + True Half @@ -2089,7 +2077,7 @@ 50 True TextAndIcon - + True Half @@ -2117,7 +2105,7 @@ 50 True TextAndIcon - + True Half @@ -2145,7 +2133,7 @@ 50 True TextAndIcon - + True Half @@ -2173,7 +2161,7 @@ 50 True TextAndIcon - + True Half @@ -2201,7 +2189,7 @@ 50 True TextAndIcon - + True Half @@ -2229,7 +2217,7 @@ 50 True TextAndIcon - + True Half @@ -2257,7 +2245,7 @@ 50 True TextAndIcon - + True Half @@ -2285,7 +2273,7 @@ 50 True TextAndIcon - + True Half @@ -2313,7 +2301,7 @@ 50 True TextAndIcon - + True Half @@ -2341,7 +2329,7 @@ 50 True TextAndIcon - + True Half @@ -2369,7 +2357,7 @@ 50 True TextAndIcon - + True Half @@ -2397,7 +2385,7 @@ 50 True TextAndIcon - + True Half @@ -2425,7 +2413,7 @@ 50 True TextAndIcon - + True Half @@ -2453,7 +2441,7 @@ 50 True TextAndIcon - + True Half @@ -2481,7 +2469,7 @@ 50 True TextAndIcon - + True Half @@ -2509,7 +2497,7 @@ 50 True TextAndIcon - + True Half @@ -2537,7 +2525,7 @@ 50 True TextAndIcon - + True Half @@ -2565,7 +2553,7 @@ 50 True TextAndIcon - + True Half @@ -2593,7 +2581,7 @@ 50 True TextAndIcon - + True @@ -2620,7 +2608,7 @@ 50 True TextAndIcon - + True @@ -2647,7 +2635,7 @@ 50 True TextOnly - Inv + Inv True @@ -2674,7 +2662,7 @@ 50 True TextOnly - Map + Map True @@ -2701,7 +2689,7 @@ 50 True TextOnly - Music + Music True @@ -2728,7 +2716,7 @@ 50 True TextAndIcon - + True None @@ -2756,7 +2744,7 @@ 50 True TextAndIcon - + True None @@ -2784,7 +2772,7 @@ 50 True TextAndIcon - + True None @@ -2812,7 +2800,7 @@ 50 True TextAndIcon - + True None @@ -2840,7 +2828,7 @@ 50 True TextAndIcon - + True None @@ -2868,7 +2856,7 @@ 50 True TextAndIcon - + True None @@ -2896,7 +2884,7 @@ 50 True TextAndIcon - + True None @@ -2924,7 +2912,7 @@ 50 True TextAndIcon - + True None @@ -2952,7 +2940,7 @@ 50 True TextAndIcon - + True None @@ -2980,7 +2968,7 @@ 50 True TextAndIcon - + True None @@ -3008,7 +2996,7 @@ 50 True TextAndIcon - + True None @@ -3036,7 +3024,7 @@ 50 True TextAndIcon - + True None @@ -3064,7 +3052,7 @@ 50 True TextAndIcon - + True None @@ -3092,7 +3080,7 @@ 50 True TextAndIcon - + True None @@ -3120,7 +3108,7 @@ 50 True TextAndIcon - + True None @@ -3148,7 +3136,7 @@ 50 True TextAndIcon - + True None @@ -3176,7 +3164,7 @@ 50 True TextAndIcon - + True None @@ -3204,7 +3192,7 @@ 50 True TextAndIcon - + True None @@ -3232,7 +3220,7 @@ 50 True TextAndIcon - + True None @@ -3260,7 +3248,7 @@ 50 True TextAndIcon - + True None @@ -3288,7 +3276,7 @@ 50 True TextAndIcon - + True None @@ -3316,7 +3304,7 @@ 50 True TextAndIcon - + True None @@ -3344,7 +3332,7 @@ 50 True TextAndIcon - + True None @@ -3372,7 +3360,7 @@ 50 True TextAndIcon - + True None @@ -3400,7 +3388,7 @@ 50 True TextAndIcon - + True None @@ -3428,7 +3416,7 @@ 50 True TextOnly - Pause + Pause True @@ -4756,7 +4744,7 @@ 50 - Accessories + Accessories Center @@ -4925,12 +4913,58 @@ False + + + + 50 + 50 + Center + + + 7 + 8 + 4 + 5 + True + Fill + Fill + False + True + False + False + True + False + + + + + + 50 + 50 + Center + + + 7 + 8 + 5 + 6 + True + Fill + Fill + False + True + False + False + True + False + + 50 50 - Event Log + Event Log 11 @@ -4952,7 +4986,7 @@ 50 - Gear + Gear Center @@ -4974,7 +5008,7 @@ - Ground Layer + Ground Layer 1 @@ -4992,12 +5026,59 @@ False + + + + 200 + 50 + There is a hole above player: + Center + + + 15 + 16 + 1 + 5 + True + Fill + Fill + False + True + False + False + True + False + + + + + + 50 + 50 + Center + + + 15 + 16 + 5 + 6 + True + Fill + Fill + False + True + False + False + True + False + + 50 25 - Hotbar + Hotbar 9 @@ -5042,7 +5123,7 @@ - Structure Layer + Structure Layer 9 @@ -5064,7 +5145,7 @@ 50 - label6 + label6 12 @@ -5086,7 +5167,7 @@ 50 - label7 + label7 13 @@ -5108,7 +5189,7 @@ 50 - label7 + label7 14 @@ -5130,7 +5211,7 @@ 50 - label7 + label7 15 @@ -5148,12 +5229,35 @@ False + + + + 100 + 50 + Center + + + 7 + 8 + 1 + 3 + True + Fill + Fill + False + True + False + False + True + False + + - MediumGameWindow + MediumGameWindow CenterOnParent @@ -5161,7 +5265,7 @@ - LargeGameWindow + LargeGameWindow CenterOnParent @@ -5169,7 +5273,7 @@ - Settings + Settings CenterOnParent False False @@ -5236,7 +5340,7 @@ 50 True TextOnly - Back + Back True 3 @@ -5374,7 +5478,7 @@ - Settings (replace with picture) + Settings (replace with picture) 3 @@ -5393,9 +5497,9 @@ - + - PauseWindow + PauseWindow CenterOnParent False False @@ -5415,7 +5519,7 @@ 50 True TextOnly - Back + Back True @@ -5429,7 +5533,8 @@ - Pause menu (replace with picture) + Pause menu + Center 1 @@ -5465,7 +5570,7 @@ 50 True TextOnly - Settings + Settings True 3 @@ -5483,7 +5588,7 @@ 50 True TextOnly - Save + Save True 3 @@ -5501,7 +5606,7 @@ 50 True TextOnly - Save & Exit + Save & Exit True 3 @@ -5519,7 +5624,7 @@ 50 True TextOnly - Exit + Exit True 3 @@ -5536,7 +5641,7 @@ - CraftingWindow + CraftingWindow CenterOnParent @@ -5677,7 +5782,7 @@ False True TextOnly - Craft + Craft True @@ -5686,7 +5791,7 @@ 10 1 6 - True + False Fill Fill False @@ -5703,7 +5808,7 @@ False True TextOnly - Next + Next True @@ -5731,7 +5836,7 @@ False True TextOnly - Prev + Prev True @@ -6151,7 +6256,7 @@ - 0 + 0 Center @@ -6173,7 +6278,7 @@ - 0 + 0 Center @@ -6195,7 +6300,7 @@ - 0 + 0 3 @@ -6216,7 +6321,7 @@ - 0 + 0 Center @@ -6238,7 +6343,7 @@ - 0 + 0 Center @@ -6287,7 +6392,7 @@ 600 - MusicWindow + MusicWindow CenterOnParent False False @@ -6330,7 +6435,7 @@ 50 True TextOnly - Back + Back True 3 @@ -6356,7 +6461,7 @@ 50 True TextOnly - Next + Next True @@ -6383,7 +6488,7 @@ 50 True TextOnly - Play + Play True @@ -6410,7 +6515,7 @@ 50 True TextOnly - Prev + Prev True @@ -6436,7 +6541,7 @@ 50 True TextOnly - Rnd + Rnd True @@ -6463,7 +6568,7 @@ 50 True TextOnly - Stop + Stop True @@ -6567,7 +6672,7 @@ 50 - No file chosen + No file chosen True Center True @@ -6591,7 +6696,7 @@ - Music (replace with picture) + Music (replace with picture) 2 @@ -6612,7 +6717,7 @@ - Mundus + Mundus CenterOnParent False False @@ -6652,7 +6757,7 @@ 90 True TextOnly - Load Game + Load Game True 0.49 7 @@ -6669,7 +6774,7 @@ 90 True TextOnly - New Game + New Game True 7 @@ -6686,7 +6791,7 @@ 90 True TextOnly - Tutorial + Tutorial True 7 @@ -6705,7 +6810,7 @@ 90 True TextOnly - Settings + Settings True 7 @@ -6722,6 +6827,7 @@ + CenterOnParent 3 False @@ -6734,7 +6840,7 @@ 50 - You haven't saved for {number} of seconds. Are you sure you want to exit without saving? + You haven't saved for {number} of seconds. Are you sure you want to exit without saving? 0 @@ -6758,7 +6864,7 @@ True True TextOnly - Cancel + Cancel True -6 @@ -6773,7 +6879,7 @@ True True TextOnly - Save & Exit + Save & Exit True -3 @@ -6788,7 +6894,7 @@ True TextOnly - Exit without saving + Exit without saving True -2 -- cgit v1.2.3