[Mod] Send Stack [sendstack]

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

[Mod] Send Stack [sendstack]

by ChimneySwift » Sun Dec 24, 2017 04:45

Send Stack

Adds a command to Minetest which enables you to send the stack you are currently holding to another player's inventory.

GitHub
ZIP Download

Code license: MIT

Dependencies: None

Usage

/sendstack <playername>

Takes the item you are holding and sends it to playername, setting the stack you are holding to what couldn't be added to the player's inventory (none if all was added, partial stack if partially added and a full stack if none was added)

Privs
By default the command will require the `interact` priv. On lines 1 to 4 you can enable or disable and set an additional privilege (such as ban) to also be required.
Last edited by ChimneySwift on Wed Dec 27, 2017 05:40, edited 1 time in total.
A spoon is basically a tiny bowl with a stick on it
 

pengnuin
New member
 
Posts: 9
Joined: Sat Dec 23, 2017 18:39

Re: [Mod] Send Stack [sendstack]

by pengnuin » Sun Dec 24, 2017 09:23

This is looking pretty neat. Not quite sure what it could be used for specifically, but I like the idea of a simple mod for item transfer. The feedback looks well implemented from what I can tell. Keep it up!

EDIT: Grammar
 

User avatar
KatzEyez
Member
 
Posts: 29
Joined: Tue Aug 08, 2017 18:24
Location: (IG: Depends) (RL: USA)
GitHub: LadyK
IRC: LadyK
In-game: LadyK

Re: [Mod] Send Stack [sendstack]

by KatzEyez » Sun Dec 24, 2017 12:11

I am assuming this is for player to player instead of mod/admin/owner to player.
If this allows a normal player to send items to someone without having to drop them and worry that someone else might steal them, then this would be a nice mod to have.
Hiya everyone! ^_^ LadyK is officially back! Got Discord? I'm LadyK#3914 if you want to add me.
 

Chem871
Member
 
Posts: 870
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris

Re: [Mod] Send Stack [sendstack]

by Chem871 » Sun Dec 24, 2017 15:48

That is a cool concept, would be good to have on Hometown and other big servers.
What is SCP-055 again? I forgot.
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Send Stack [sendstack]

by ChimneySwift » Mon Dec 25, 2017 02:48

Originally it was designed to transfer valuable or limited items from staff to player, however all actions are logged so I see no issue with it being available ot regular players, so I've made it now that by default if you wish to lock it's use to a particular priv, you must uncomment (remove "--") line 4 of init.lua (default priv is ban)
A spoon is basically a tiny bowl with a stick on it
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Send Stack [sendstack]

by Byakuren » Wed Dec 27, 2017 04:04

ChimneySwift wrote:Originally it was designed to transfer valuable or limited items from staff to player, however all actions are logged so I see no issue with it being available ot regular players, so I've made it now that by default if you wish to lock it's use to a particular priv, you must uncomment (remove "--") line 4 of init.lua (default priv is ban)

Why not make it a configuration setting?
Every time a mod API is left undocumented, a koala dies.
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Send Stack [sendstack]

by ChimneySwift » Wed Dec 27, 2017 05:39

Byakuren wrote:Why not make it a configuration setting?


Excellent point.

Privs
By default the command will require the `interact` priv. On lines 1 to 4 you can enable or disable and set an additional privilege (such as ban) to also be required.
A spoon is basically a tiny bowl with a stick on it
 

User avatar
ManElevation
Member
 
Posts: 893
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Send Stack [sendstack]

by Byakuren » Wed Dec 27, 2017 20:07

ChimneySwift wrote:
Byakuren wrote:Why not make it a configuration setting?


Excellent point.

Privs
By default the command will require the `interact` priv. On lines 1 to 4 you can enable or disable and set an additional privilege (such as ban) to also be required.

I meant using Minetest's settings API.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Send Stack [sendstack]

by ChimneySwift » Thu Dec 28, 2017 00:35

Byakuren wrote:I meant using Minetest's settings API.


Hmm, I don't personally like that api, but, *sigh* I guess I should use it...
A spoon is basically a tiny bowl with a stick on it
 


Return to WIP Mods



Who is online

Users browsing this forum: Google [Bot] and 4 guests