From dd4008ea73f44e310d0b670902efb6f1c56cea9b Mon Sep 17 00:00:00 2001
From: Wuzzy <almikes@aol.com>
Date: Thu, 25 Jan 2018 22:01:19 +0100
Subject: [PATCH] Add totem of undying into combat category

---
 mods/HUD/mcl_inventory/creative.lua | 2 +-
 mods/ITEMS/mcl_totems/depends.txt   | 1 +
 mods/ITEMS/mcl_totems/init.lua      | 5 +++++
 3 files changed, 7 insertions(+), 1 deletion(-)
 create mode 100644 mods/ITEMS/mcl_totems/depends.txt
 create mode 100644 mods/ITEMS/mcl_totems/init.lua

diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua
index 814c1a08c..41bd3bc0d 100644
--- a/mods/HUD/mcl_inventory/creative.lua
+++ b/mods/HUD/mcl_inventory/creative.lua
@@ -23,7 +23,7 @@ do
 				return def.groups.tool or (def.tool_capabilities ~= nil and def.tool_capabilities.damage_groups == nil)
 			end
 			local is_weapon_or_armor = function(def)
-				return def.groups.weapon or def.groups.weapon_ranged or def.groups.ammo or ((def.groups.armor_head or def.groups.armor_torso or def.groups.armor_legs or def.groups.armor_feet or def.groups.horse_armor) and def.groups.non_combat_armor ~= 1)
+				return def.groups.weapon or def.groups.weapon_ranged or def.groups.ammo or def.groups.combat_item or ((def.groups.armor_head or def.groups.armor_torso or def.groups.armor_legs or def.groups.armor_feet or def.groups.horse_armor) and def.groups.non_combat_armor ~= 1)
 			end
 			if def.groups.building_block then
 				table.insert(inventory_lists["blocks"], name)
diff --git a/mods/ITEMS/mcl_totems/depends.txt b/mods/ITEMS/mcl_totems/depends.txt
new file mode 100644
index 000000000..9b7650e03
--- /dev/null
+++ b/mods/ITEMS/mcl_totems/depends.txt
@@ -0,0 +1 @@
+mobs_mc
diff --git a/mods/ITEMS/mcl_totems/init.lua b/mods/ITEMS/mcl_totems/init.lua
new file mode 100644
index 000000000..b4ec3eb8d
--- /dev/null
+++ b/mods/ITEMS/mcl_totems/init.lua
@@ -0,0 +1,5 @@
+-- Node is currently defined in mobs_mc.
+-- TODO: Add full item definition here when status effects become a thing.
+
+-- Add group for Creative Mode.
+minetest.override_item("mobs_mc:totem", {groups = { combat_item=1}})