[Mod] Player Must Have Item [mod]

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

[Mod] Player Must Have Item [mod]

by lordfingle » Tue Dec 20, 2016 12:42

Image
This is the musthave mod, the mod for game creators that want to insist that players be carrying certain items at all times.

Download at https://github.com/eidy/musthave/archive/master.zip

Specify some item types that the player must always have one of in their inventory. They can't drop it and if it's trashed it will just be re-created.

Could be used for a loadstone or similarly sticky magical item.

minetest.conf Parameters

musthave

If set, every player must have the items specified.

eg

musthave="default:dirt,default:stone"

(Because it's always handy to have some dirt and stone)

API

musthave.set(playername, itemlist)

Specifies a list of items a specific player must have.
(Note: This is not currently saved)

musthave.get(playername)

Returns a table of items (spec strings) the player must have


Licence: Apache 2.0
Github: https://github.com/eidy/musthave
Attachments
url.jpg
url.jpg (7.62 KiB) Viewed 1385 times
Last edited by lordfingle on Tue Jan 03, 2017 17:51, edited 1 time in total.
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: [Mod] Must Have Mod [Mod]

by D00Med » Tue Dec 20, 2016 19:18

That's an interesting idea.
Could the mod also have mustnothave?
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Must Have Mod [Mod]

by Diamond knight » Sat Dec 24, 2016 05:12

Must not have is remove the item from the game as if you can NEVER have it why have it in code
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] Must Have Mod [Mod]

by ShadMOrdre » Mon Dec 26, 2016 22:05

Diamond knight wrote:Must not have is remove the item from the game as if you can NEVER have it why have it in code


Not true.

There are plenty of mods that I run that I'd like to still have available when playing with my 5 year old, yet, limit what items he can/cannot have, without taking those items from me.

Same on any server where admins must have items, and users must not ever have certain items. Added security. Worth a try at the least.

Shad MOrdre
My other virtual world is an Opensimulator.
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Must Have Mod [Mod]

by Diamond knight » Mon Jan 02, 2017 17:37

i thought you meant all players couldn't have it, makes more sense now
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

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

Re: [Mod] Must Have Mod [Mod]

by rubenwardy » Mon Jan 02, 2017 18:13

I suggest renaming this mod to "Players Must Have Item", as "must have mod" sounds like you must have the mod

The title would then be "[Mod] Player Must Have Item [player_must_have_item]"
 

User avatar
firefox
Member
 
Posts: 1185
Joined: Wed Jan 14, 2015 07:34
In-game: Red_Fox

Re: [Mod] Must Have Mod [Mod]

by firefox » Tue Jan 03, 2017 12:38

rubenwardy wrote:I suggest renaming this mod to "Players Must Have Item", as "must have mod" sounds like you must have the mod

The title would then be "[Mod] Player Must Have Item [player_must_have_item]"

but... i clicked this because i thought i must have this mod...

:P
 

User avatar
lordfingle
Member
 
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle

Re: [Mod] Must Have Mod [Mod]

by lordfingle » Tue Jan 03, 2017 17:50

I agree with the rename, although it does make it sound less exciting (which is appropriate i guess)
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 3 guests

cron