Page 1 of 1

[Mod] Player Must Have Item [mod]

PostPosted: Tue Dec 20, 2016 12:42
by lordfingle
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

Re: [Mod] Must Have Mod [Mod]

PostPosted: Tue Dec 20, 2016 19:18
by D00Med
That's an interesting idea.
Could the mod also have mustnothave?

Re: [Mod] Must Have Mod [Mod]

PostPosted: Sat Dec 24, 2016 05:12
by Diamond knight
Must not have is remove the item from the game as if you can NEVER have it why have it in code

Re: [Mod] Must Have Mod [Mod]

PostPosted: Mon Dec 26, 2016 22:05
by ShadMOrdre
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

Re: [Mod] Must Have Mod [Mod]

PostPosted: Mon Jan 02, 2017 17:37
by Diamond knight
i thought you meant all players couldn't have it, makes more sense now

Re: [Mod] Must Have Mod [Mod]

PostPosted: Mon Jan 02, 2017 18:13
by rubenwardy
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]"

Re: [Mod] Must Have Mod [Mod]

PostPosted: Tue Jan 03, 2017 12:38
by firefox
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

Re: [Mod] Must Have Mod [Mod]

PostPosted: Tue Jan 03, 2017 17:50
by lordfingle
I agree with the rename, although it does make it sound less exciting (which is appropriate i guess)