[Mod] Backpacks [backpacks]

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Backpacks [backpacks]

by everamzah » Sun May 08, 2016 21:23

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
Attachments
backpacks-1.0.zip
1st version with bigger inventory and more backpacks
(16.15 KiB) Downloaded 125 times
screenshot_20160619_083215.png
screenshot_20160619_083215.png (213.48 KiB) Viewed 1472 times
screenshot_20160508_171313.png
1.0
screenshot_20160508_171313.png (117.31 KiB) Viewed 1472 times
Last edited by everamzah on Sun Jun 19, 2016 12:37, edited 1 time in total.
 

User avatar
Napiophelios
Member
 
Posts: 752
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Backpacks [backpacks]

by Napiophelios » Sun May 08, 2016 23:01

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 :)
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Backpacks [backpacks]

by everamzah » Sun Jun 19, 2016 12:38

Okay, now it's just a wool backpack and leather backpack. Inventory was reduced to half.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Backpacks [backpacks]

by Sokomine » Sat Jul 16, 2016 17:59

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?
A list of my mods can be found here.
 

User avatar
everamzah
Member
 
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Backpacks [backpacks]

by everamzah » Sat Jul 16, 2016 18:03

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.
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

Re: [Mod] Backpacks [backpacks]

by Fixerol » Wed Nov 09, 2016 16:29

 

xisd
Member
 
Posts: 42
Joined: Sun Oct 02, 2016 22:38
GitHub: xisd

Re: [Mod] Backpacks [backpacks]

by xisd » Wed Jan 18, 2017 14:03

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
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Wed Jan 18, 2017 15:37

Thanks for the suggestion

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

xisd
Member
 
Posts: 42
Joined: Sun Oct 02, 2016 22:38
GitHub: xisd

Re: [Mod] Backpacks [backpacks]

by xisd » Sat Jan 21, 2017 18:53

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)
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: [Mod] Backpacks [backpacks]

by taikedz » Mon Jan 30, 2017 16:57

I've updated the mod to use colourful backpacks. Should make sorting a little easier.

Image
Last edited by taikedz on Tue Jan 31, 2017 18:24, edited 2 times in total.
 

User avatar
TenPlus1
Member
 
Posts: 1874
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: [Mod] Backpacks [backpacks]

by TenPlus1 » Mon Jan 30, 2017 20:18

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
 

User avatar
Chibi ghost
Member
 
Posts: 161
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Backpacks [backpacks]

by Chibi ghost » Tue Jan 31, 2017 13:26

nice I like this I can mine for longer
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 10 guests

cron