aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSyndamia <kamen.d.mladenov@protonmail.com>2020-04-08 12:52:27 +0300
committerSyndamia <kamen.d.mladenov@protonmail.com>2020-04-08 12:52:27 +0300
commitac284aceee93e54152e0d362c88e9c07233cf4e8 (patch)
treee48c6a5b8972971aef0934a4f074535f314b0b75
parent5183cabbeff1cc0f759aa1a37767925f02766e77 (diff)
downloadMundus-ac284aceee93e54152e0d362c88e9c07233cf4e8.tar
Mundus-ac284aceee93e54152e0d362c88e9c07233cf4e8.tar.gz
Mundus-ac284aceee93e54152e0d362c88e9c07233cf4e8.zip
Making a hole will now only delete structure underneath that isn't walkable
-rw-r--r--Mundus Build 08-04-2020.exebin539648 -> 539648 bytes
-rw-r--r--Mundus/Service/Mobs/MobTerraforming.cs7
-rw-r--r--Mundus/Views/Windows/SmallGameWindow.cs4
3 files changed, 7 insertions, 4 deletions
diff --git a/Mundus Build 08-04-2020.exe b/Mundus Build 08-04-2020.exe
index 60ac671..0e547a6 100644
--- a/Mundus Build 08-04-2020.exe
+++ b/Mundus Build 08-04-2020.exe
Binary files differ
diff --git a/Mundus/Service/Mobs/MobTerraforming.cs b/Mundus/Service/Mobs/MobTerraforming.cs
index aa7300a..6111676 100644
--- a/Mundus/Service/Mobs/MobTerraforming.cs
+++ b/Mundus/Service/Mobs/MobTerraforming.cs
@@ -19,9 +19,12 @@ namespace Mundus.Service.Mobs {
if (selGround.ReqShovelClass <= selTool.Class) {
LMI.Player.CurrSuperLayer.SetGroundAtPosition(null, mapYPos, mapXPos);
+ //When a shovel destroys ground tile, it destroys the structure below, if it is not walkable
ISuperLayer under = LMI.Player.GetLayerUndearneathCurr();
- if (under != null) {
- under.RemoveStructureFromPosition(mapYPos, mapXPos);
+ if (under != null && under.GetStructureLayerTile(mapYPos, mapXPos) != null) {
+ if (!under.GetStructureLayerTile(mapYPos, mapXPos).IsWalkable) {
+ under.RemoveStructureFromPosition(mapYPos, mapXPos);
+ }
}
if (LMI.Player.Inventory.Items.Contains(null) && selGround.DroppedMaterial != null) {
diff --git a/Mundus/Views/Windows/SmallGameWindow.cs b/Mundus/Views/Windows/SmallGameWindow.cs
index f983e62..d37137b 100644
--- a/Mundus/Views/Windows/SmallGameWindow.cs
+++ b/Mundus/Views/Windows/SmallGameWindow.cs
@@ -918,8 +918,8 @@ namespace Mundus.Views.Windows {
}
protected void OnBtnIG2Clicked(object sender, EventArgs e) {
- Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[1] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Pickaxe, 1);
- Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[0] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Axe, 1);
+ //Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[1] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Pickaxe, 1);
+ //Mundus.Data.Superlayers.Mobs.LMI.Player.Inventory.Hotbar[0] = new Service.Tiles.Items.Tool("blank_hand", Mundus.Data.Tiles.ToolTypes.Axe, 1);
MobStatsController.TryHealPlayer(1);
PrintMainMenu();