[Mod] Trash Can

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

[Mod] Trash Can

by tinoesroho » Sun Aug 12, 2012 04:31

Image
This mod is outdated!
This mod has not been updated to work with Minetest 0.4.1 or newer. It is functional in older dev versions, but relies on deprecated commands.



This is a simple mod that allows for a quick, easy method of dumping unwanted items. It utilizes the default textures.
Image

Screenshots:
Image
Image

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.
Last edited by tinoesroho on Sun Dec 28, 2014 01:20, edited 2 times in total.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

jin_xi
Member
 
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Sun Aug 12, 2012 08:59

good idea, very useful for mod testing!
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Aug 12, 2012 09:16

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.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Mon Aug 13, 2012 15:49

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

wood wood wood
wood cobble wood
wood wood wood
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Mon Aug 13, 2012 17:07

Updated. See first post.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
qwrwed
Member
 
Posts: 323
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Tue Aug 14, 2012 18:08

+1 This is very useful, but I can't remove it; any tools I try to use to remove it are thrown away.
Is there any way around this?
Last edited by qwrwed on Sun Oct 20, 2013 15:02, edited 1 time in total.
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Tue Aug 14, 2012 19:45

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Tue Aug 14, 2012 21:25

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:
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
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.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
InfinityProject
Member
 
Posts: 1009
Joined: Sat Mar 17, 2012 00:52

by InfinityProject » Tue Aug 14, 2012 21:33

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.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Tue Aug 14, 2012 22:26

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.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Aug 20, 2012 14:18

Would you mind adding screenshots? Thanks.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
RealBadAngel
Member
 
Posts: 556
Joined: Wed Jul 18, 2012 16:30

by RealBadAngel » Wed Aug 22, 2012 05:58

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

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed Aug 22, 2012 06:09

Mmm. I never thought of that method. I'll see what I can do.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Wed Aug 22, 2012 10:26

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

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Thu Aug 23, 2012 01:05

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
 

User avatar
tonyka
Member
 
Posts: 320
Joined: Sat Jun 16, 2012 04:08

by tonyka » Thu Aug 23, 2012 11:31

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 ...
Last edited by tonyka on Thu Aug 23, 2012 11:34, edited 1 time in total.
My mod: [MOD]3D Forniture 1.0
Download: 3DForniture_v_1.0.zip
Page development (European Castilian):
Moviliario 3D (proyecto 3D Forniture)
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Thu Aug 23, 2012 14:17

I'm thinking of stealing some code from the Furnaces. -.-
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

Matsetes
 

by Matsetes » Tue Sep 04, 2012 13:07

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)
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Tue Sep 04, 2012 14:35

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
 

Matsetes
 

by Matsetes » Fri Sep 07, 2012 15:40

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

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Fri Sep 07, 2012 16:31

He has a trash field in the creative mode.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
nomohakon
Member
 
Posts: 207
Joined: Fri Aug 10, 2012 16:34
IRC: nomohakon
In-game: nomohakon

by nomohakon » Fri Oct 12, 2012 16:50

tinoesroho: how is trash can you said you will make?
"To learn who rules over you, simply find out who you are not allowed to criticize." - Voltaire
"Knowledge, like air, is vital to life. Like air, no one should be denied it." - Alan Moore, V for Vendetta
- - -
"To never die... and to conquer all, that is winning." ―Illyria
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Fri Oct 12, 2012 18:16

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.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Fri Oct 12, 2012 18:58

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

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
nomohakon
Member
 
Posts: 207
Joined: Fri Aug 10, 2012 16:34
IRC: nomohakon
In-game: nomohakon

by nomohakon » Sat Oct 13, 2012 14:55

Working like a charm. Thanks!

EDIT: Maybe i try to make it chest-like.
Last edited by nomohakon on Sat Oct 13, 2012 15:13, edited 1 time in total.
"To learn who rules over you, simply find out who you are not allowed to criticize." - Voltaire
"Knowledge, like air, is vital to life. Like air, no one should be denied it." - Alan Moore, V for Vendetta
- - -
"To never die... and to conquer all, that is winning." ―Illyria
 

User avatar
terminalerror
Member
 
Posts: 33
Joined: Tue Oct 30, 2012 22:46

by terminalerror » Tue Oct 30, 2012 22:54

Good mod. I tweaked the code a bit, see if you like it. (This makes it removable by hand instead, like PilzAdam's bed.)

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
 
minetest.register_alias("trash:block", "trash:can")

minetest.register_node("trash:block", {
description = "Trash block",
tile_images = {"default_nc_front.png",},
is_ground_content = true,
stack_max = 1,
groups = {snappy=1,bendy=2,cracky=1,melty=2,flammable=3, oddly_breakable_by_hand=2},
--     material = minetest.digprop_constanttime(9.0),
sounds = default_stone_sounds
})

minetest.register_craft({
    output = 'trash:block',
    recipe = {
        {'default:wood', 'default:wood', 'default:wood'},
        {'default:wood', 'default:cobble', 'default:wood'},
        {'default:wood', 'default:wood', 'default:wood'},
    }
})

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

if hit_with_name ~= "" then
puncher:get_inventory():remove_item("main", hit_with)
minetest.chat_send_player(puncher:get_player_name(), 'Clunk!')
end end end)
ERROR[main]: ModError: Failed to load and run a sarcastic remark.
 

tinoesroho
Member
 
Posts: 570
Joined: Fri Feb 17, 2012 21:55

by tinoesroho » Wed Oct 31, 2012 00:47

Smart tweak, terminalerror.
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/
 

User avatar
Johnyknowhow
Member
 
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian

by Johnyknowhow » Sun Oct 20, 2013 01:55

You should be able t make it with nyancats
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here
 

User avatar
Johnyknowhow
Member
 
Posts: 358
Joined: Fri Sep 21, 2012 15:17
In-game: Minetestian

by Johnyknowhow » Sun Oct 20, 2013 01:55

You should be able t make it with nyancats
I lost interest in Minetest for a couple of years and... I am still not really paying much attention. I rarely browse these forums anymore but it's nice to see old faces.

obligatory fancy signature goes here
 

User avatar
Evergreen
Member
 
Posts: 2131
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Sun Oct 20, 2013 01:58

Johnyknowhow wrote:You should be able t make it with nyancats
This mod is old and outdated. You can check out my mod if you want.
"Help! I searched for a mod but I couldn't find it!"
http://krock-works.16mb.com/MTstuff/modSearch.php
 


Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 19 guests

cron