diff --git a/TODO.md b/TODO.md index 653cc0b7..45a94941 100644 --- a/TODO.md +++ b/TODO.md @@ -38,10 +38,6 @@ * stairs:stair_cobble -> moreblocks:stair_cobble #### Craft items that need new aliases -* kpgmobs - * kpgmobs:horsearah1 (HorseBlack) - * kpgmobs:horseh1 (Horse) - * kpgmobs:horsepegh1 (HorseWhite) * my_future_doors * my_future_doors:door2a * my_future_doors:door3a @@ -54,13 +50,5 @@ * Add alias for 'simple_protection:claim' #### Craft items that need new descriptions -* kpgmobs - * kpgmobs:horsearah1 (HorseBlack) - * kpgmobs:horseh1 (Horse) - * kpgmobs:horsepegh1 (HorseWhite) #### Craft items that need new inventory textures -* kpgmobs - * kpgmobs:horsearah1 (HorseBlack) - * kpgmobs:horseh1 (Horse) - * kpgmobs:horsepegh1 (HorseWhite) diff --git a/mods/antum/overrides/depends.txt b/mods/antum/overrides/depends.txt index 387da6a8..3bcd357a 100644 --- a/mods/antum/overrides/depends.txt +++ b/mods/antum/overrides/depends.txt @@ -8,6 +8,7 @@ ethereal? farming? helicopter? homedecor? +kpgmobs? moreblocks? walking_light? wool? diff --git a/mods/antum/overrides/items.lua b/mods/antum/overrides/items.lua index 974141f1..a0075dad 100644 --- a/mods/antum/overrides/items.lua +++ b/mods/antum/overrides/items.lua @@ -25,16 +25,17 @@ --]] -local itemsdir = antum.overrides.modpath .. "/items" +local itemsdir = antum.overrides.modpath .. '/items' local modoverrides = { - "animalmaterials", - "cooking", + 'animalmaterials', + 'cooking', + 'kpgmobs', } for I in pairs(modoverrides) do local modname = modoverrides[I] if minetest.get_modpath(modname) then - dofile(itemsdir .. "/" .. modname .. ".lua") + dofile(itemsdir .. '/' .. modname .. '.lua') end end diff --git a/mods/antum/overrides/items/kpgmobs.lua b/mods/antum/overrides/items/kpgmobs.lua new file mode 100644 index 00000000..7115971f --- /dev/null +++ b/mods/antum/overrides/items/kpgmobs.lua @@ -0,0 +1,74 @@ +--[[ LICENSE HEADER + + The MIT License (MIT) + + Copyright © 2016 Jordan Irwin + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is furnished to do + so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +--]] + + +-- Directory where textures are located +local tdir = 'animal_inventory' + +minetest.register_craftitem(':kpgmobs:horseh1', { + description = 'Brown Horse', + inventory_image = tdir .. '/horse_brown', + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.above then + minetest.env:add_entity(pointed_thing.above, 'kpgmobs:horseh1') + itemstack:take_item() + end + return itemstack + end, +}) +minetest.register_alias('kpgmobs:brown_horse', 'kpgmobs:horseh1') +minetest.register_alias('brown_horse', 'kpgmobs:horseh1') + +minetest.register_craftitem(':kpgmobs:horsepegh1', { + description = 'White Horse', + inventory_image = tdir .. '/horse_white', + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.above then + minetest.env:add_entity(pointed_thing.above, 'kpgmobs:horsepegh1') + itemstack:take_item() + end + return itemstack + end, +}) +minetest.register_alias('kpgmobs:white_horse', 'kpgmobs:horsepegh1') +minetest.register_alias('white_horse', 'kpgmobs:horsepegh1') + +minetest.register_craftitem(':kpgmobs:horsearah1', { + description = 'Black Horse', + inventory_image = tdir .. '/horse_black', + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.above then + minetest.env:add_entity(pointed_thing.above, 'kpgmobs:horsearah1') + itemstack:take_item() + end + return itemstack + end, +}) +minetest.register_alias('kpgmobs:black_horse', 'kpgmobs:horsearah1') +minetest.register_alias('black_horse', 'kpgmobs:horsearah1')