1 (edited by tinoesroho 2013-02-13 19:50:32)

Topic: [Mod] Trash Can

This is a simple mod that allows for a quick, easy method of dumping unwanted items. It utilizes the default textures.
https://github.com/celeron55/minetest_game/blob/master/mods/default/textures/default_nc_front.png?raw=true

Screenshots:
http://i47.tinypic.com/2wgu2pe.png
http://i50.tinypic.com/5bcsaf.jpg

Craft:
Wood Wood Wood
Wood Cobble Wood
Wood Wood Wood

Dependencies:
default

License:
CC0

Download:
First release here
Trash 0.1 - first "stable" release
Trash 0.2 - Second "stable" release, makes it flammable.
Trash 0.3 - Third "stable" release, makes it removable with a stick. Optional compatibility with Minetest 0.4 Dev <20120428.

Re: [Mod] Trash Can

good idea, very useful for mod testing!

Re: [Mod] Trash Can

Two wood blocks side by side like that conflicts with Mesecons (wooden pressure plate).  I might suggest something exotic such as two cobble and a bucket of lava.

Re: [Mod] Trash Can

I wasn't aware that it conflicted with Mesecons. Perhaps this would be more appropriate:

wood wood wood
wood cobble wood
wood wood wood

Re: [Mod] Trash Can

Updated. See first post.

Re: [Mod] Trash Can

+1 This is very useful, but I cant remove it; any tools i try to use to remove it are thrown away.
Is there any way around this?

Try my mods, Lights+ and Hills

Re: [Mod] Trash Can

qwrwed wrote:

+1 This is very useful, but I cant remove it; any tools i try to use to remove it are thrown away.
Is there any way around this?

You could set the node to air using worldedit.

Check out my Diamonds Mod. This adds diamonds that can be mined as well as tools.

Click here to be enlightened by the Blue Devils.

Re: [Mod] Trash Can

InfinityProject wrote:
qwrwed wrote:

+1 This is very useful, but I cant remove it; any tools i try to use to remove it are thrown away.
Is there any way around this?

You could set the node to air using worldedit.

^ This, and commanding Harvey are the only two ways to remove it at the moment. If you'd like to know why any tools you hit it with are removed, look at this chunk of code:

minetest.register_on_punchnode(function(pos, node, puncher)    if node.name == "trash:block" then
hit_with = puncher:get_wielded_item()
hit_with_name = hit_with:get_name()
hit_with_count = hit_with:get_count()

puncher:get_inventory():remove_item("main", hit_with)
minetest.chat_send_player(puncher:get_player_name(), 'Clunk!')
end end)

What's happening here is that it checks when you it a block to see a)If it's a trash can, if so then b)what was it hit with and c)how big was the stack, and then removes the whole stack of it. Handy for tossing stuff, but it also precludes the possibility of removing the block by punching it - unless you try it empty handed.

If anybody has input on how I should set it up to check for a removal tool and subsequently remove itself, do speak up.

Re: [Mod] Trash Can

You could also put the trash can into the "flammable" group and burn it.

But anyways I think this would look very nice if it had a nodebox model.

Check out my Diamonds Mod. This adds diamonds that can be mined as well as tools.

Click here to be enlightened by the Blue Devils.

Re: [Mod] Trash Can

Good idea, 'finity. I'm not sure how to pull off a nodebox model myself, so it might be a week to the next update.

Re: [Mod] Trash Can

Would you mind adding screenshots?  Thanks.

Re: [Mod] Trash Can

check "wear" of the wielded item. if >0 then its a tool

Re: [Mod] Trash Can

Mmm. I never thought of that method. I'll see what I can do.

Re: [Mod] Trash Can

I think it would be better if you open it up like as chest, and drag the items into it

Websites: Multa - Mt Extensions
Mods: Food - Awards  - Priv Areas - More
Tools: Nodebox Editor
I am working on a mob mod, and a capture the flag game.

Re: [Mod] Trash Can

rubenwardy wrote:

I think it would be better if you open it up like as chest, and drag the items into it

that would be cool.  you put your items in there, and then there is an EMPTY TRASH button that removes all the items from the chest's inventory

16 (edited by tonyka 2012-08-23 11:34:15)

Re: [Mod] Trash Can

great idea!
would be great to have a look more like a garbage disposal, or you could use my toilet.
also to remove incompatibilities could add a screen and then add the blocks to remove them click a button ... That will remove the problem that destroy hit everything with what ...

My mod: [MOD]3D Forniture 1.0
Download: 3DForniture_v_1.0.zip
Page development (European Castilian):
Moviliario 3D (proyecto 3D Forniture)

Re: [Mod] Trash Can

I'm thinking of stealing some code from the Furnaces. -.-

18

Re: [Mod] Trash Can

Is it possible to make it similar to the furnace? You move into the item you want to destroy...
Or also make it breakable with the hand (no object selected)

Re: [Mod] Trash Can

Matsetes wrote:

Is it possible to make it similar to the furnace? You move into the item you want to destroy...
Or also make it breakable with the hand (no object selected)

My fork of the default game adds this to creative inventory: https://github.com/PilzAdam/minetest_game

20

Re: [Mod] Trash Can

I didn't understand? What is in your game in the creative mode?

Re: [Mod] Trash Can

He has a trash field in the creative mode.

Re: [Mod] Trash Can

tinoesroho: how is trash can you said you will make?

Rule #1: Don't be an asshole.

Re: [Mod] Trash Can

Still working on it. I hate not knowing a lick of code; makes it very tough to work on mods. I will, I swear, post the update when it's done.

Re: [Mod] Trash Can

Well, updated. The latest update adds removability (use stick) aaaaaand adds compatibility with old versions. Go trash!

25 (edited by nomohakon 2012-10-13 15:13:19)

Re: [Mod] Trash Can

Working like a charm. Thanks!

EDIT: Maybe i try to make it chest-like.

Rule #1: Don't be an asshole.