Page 1 of 1

[Mod] Backpacks [backpacks]

PostPosted: Sun May 08, 2016 21:23
by everamzah
Adds backpacks made of wool and leather, that can store anything but themselves in an 8*4 8*2 inventory. The backpacks can only be accessed once they're placed. Picking them up preserves their contents. They obey regular protection rules.

License: GPL3+
Depends: defualt, wool
Download: GitHub or master.zip

Image

Re: [Mod] Backpacks [backpacks]

PostPosted: Sun May 08, 2016 23:01
by Napiophelios
these are pretty neat, it reminds me of prestibags mod.

I think it should not be able to hold as much as a chest though.
Also think it would be better to just have one type based on a single texture
instead of registering 16 different backpacks using the wool textures.

any way, its a cool mod despite my opinion :)

Re: [Mod] Backpacks [backpacks]

PostPosted: Sun Jun 19, 2016 12:38
by everamzah
Okay, now it's just a wool backpack and leather backpack. Inventory was reduced to half.

Re: [Mod] Backpacks [backpacks]

PostPosted: Sat Jul 16, 2016 17:59
by Sokomine
unified_inventory also has bags, though those are mostly items that store other items. They do not really appear ingame apart from beeing a craftitem. Your bag gave me an idea...how about changing the player model if and when the player carries a bag?

Re: [Mod] Backpacks [backpacks]

PostPosted: Sat Jul 16, 2016 18:03
by everamzah
That was the original intention. Also, swapping backpacks would swap your lower 8*3 inventory.
https://github.com/everamzah/dcb/commit ... ckpack.lua

PS. I got it to work, I don't remember where exactly I left off. Probably around the time I noticed problems with drag & drop into forbidden lists.

Re: [Mod] Backpacks [backpacks]

PostPosted: Wed Nov 09, 2016 16:29
by Fixerol

Re: [Mod] Backpacks [backpacks]

PostPosted: Wed Jan 18, 2017 14:03
by xisd
Nice mod ! I was looking for something like that !

depends.txt is wrong though : there is hard dependency on "mobs"

Checking for the mod existence before registering leather backpack recipe would fix it

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- The recipe is only registered if mobs mod exist
if minetest.get_modpath("mobs") then
   minetest.register_craft({
      output = "backpacks:backpack_leather",
      recipe = {
         {"mobs:leather", "mobs:leather", "mobs:leather"},
         {"mobs:leather", "", "mobs:leather"},
         {"mobs:leather", "mobs:leather", "mobs:leather"},
      }
   })
end

Re: [Mod] Backpacks [backpacks]

PostPosted: Wed Jan 18, 2017 15:37
by taikedz
Thanks for the suggestion

I've updated this so that the leather backpack and the recipe are both dependent on mobs

Re: [Mod] Backpacks [backpacks]

PostPosted: Sat Jan 21, 2017 18:53
by xisd
taikedz wrote:Thanks for the suggestion

I've updated this so that the leather backpack and the recipe are both dependent on mobs


Nice ! But you should check the existence of mobs mod using minetest.get_modpath instead of (or at least before) looking for the mobs variable, mainly because it result in this warning if the table doesn't exist :
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
2017-01-21 19:27:36: WARNING[Main]: Undeclared global variable "mobs" accessed at .../minetest_game/mods/backpacks/init.lua:106

and also because an other mods could have a variable called mobs (even if they should not)

Re: [Mod] Backpacks [backpacks]

PostPosted: Mon Jan 30, 2017 16:57
by taikedz
I've updated the mod to use colourful backpacks. Should make sorting a little easier.

Image

Re: [Mod] Backpacks [backpacks]

PostPosted: Mon Jan 30, 2017 20:18
by TenPlus1
I would remove the 'mobs' dependency from the depends.txt file and use something like this instead:

if minetest.get_modpath("mobs") then
-- add recipe here
end

Re: [Mod] Backpacks [backpacks]

PostPosted: Tue Jan 31, 2017 13:26
by Chibi ghost
nice I like this I can mine for longer