[Mod] PowerTools [powertools]

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

[Mod] PowerTools [powertools]

by octacian » Sun May 14, 2017 16:18

PowerTools [powertools]
Image
GitHub: octacian/powertools
Download: Master (latest, stable)

PowerTools allows players with the powertools privilege to assign a chatcommand to any item in their hotbar which will be executed whenever they punch any node. This allows quickly assigning things like /time 6000 to an item which will be executed whenever you punch anything.

Any instances of @p inside the chatcommand to be called are replaced with the player's current position, while instances of @n are replaced with the position of the node punched, allowing dynamic commands to be assigned to the items.

When a PowerTool is assigned, the description of the item is changed to display both that it is a PowerTool and the command assigned to it. Whenever a PowerTool is dropped and picked up by another player who is not the owner, the tool will not work and instead the PowerTools status will be removed. Note: PowerTools do not allows players to execute chatcommands without privileges, so the above is simply a safeguard.

PowerTools can only be assigned or unassigned if they are selected in the player's hotbar as the get_wielded_item methods are used to reference the itemstack which is to be modified as a PowerTool.

Usage

Code: Select all
/powertool <chatcommand/"unset">


Chatcommand is the chatcommand to be executed when punching a node with the tool in hand (with beginning slash) or "unset", causing the PowerTool status of the item held to be removed. Note: If unset is called on a non-powertool item nothing will be changed.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
Phoenixflo44
Member
 
Posts: 601
Joined: Fri Jul 28, 2017 15:01
Location: Behind my PC, in Germany
In-game: Phoenixflo44

Re: [Mod] PowerTools [powertools]

by Phoenixflo44 » Sat Jul 29, 2017 20:35

That is coool
You can't see it here. I'm doing everything wrong anyway.
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
Andrey01
Member
 
Posts: 2170
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: [Mod] PowerTools [powertools]

by Andrey01 » Sun Jul 30, 2017 16:45

azekill_DIABLO wrote:hey, it's like in the minecraft mod!! +1

Really?!! Oh no! I thought octacian invented it by yourself.
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
azekill_DIABLO
Member
 
Posts: 7459
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] PowerTools [powertools]

by octacian » Mon Jul 31, 2017 14:19

cx384 wrote:This mod is similar to command_tool.


Yes, you're right, it is. However, my mod is far simpler and uses several new features in Minetest (i.e. node-like metadata and the ability to change itemstack descriptions through metadata). Now, with this in mind, I do like the idea of being able to add multiple commands to run as does HybridDog's mod, so I may consider implementing that in the future.

Andrey01 wrote:
azekill_DIABLO wrote:hey, it's like in the minecraft mod!! +1

Really?!! Oh no! I thought octacian invented it by yourself.


Yes, the idea did come from the MC mod/plugin that does the same basic thing. I mean, even though it is slightly "MC," it's still a great idea so there's no reason not to use it.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

User avatar
BirgitLachner
Member
 
Posts: 358
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] PowerTools [powertools]

by BirgitLachner » Mon Jul 31, 2017 15:43

What about the possibility to add Worldedit commands to it.

I was using a "brush" in MInecraft to build little spheres for sand to build the landscape a bit smother than it is done with the "//set" command for a selected cuboid. And then use the replace to have dirt instead of sand.
 

User avatar
Stix
Member
 
Posts: 1281
Joined: Fri Aug 04, 2017 14:19
Location: USA
IRC: nil
In-game: Stix [+alts]

Re: [Mod] PowerTools [powertools]

by Stix » Sun Aug 06, 2017 15:01

is it possible to set ban to a tool and punch a player to ban them?
Hey, what can i say? I'm the bad guy.
Next release of your favorite game? "Bugfixes" --Wuzzy
[OLD]The new Minetest-offtopic can be found here: https://minetestoftopic.createaforum.com/index.php
 

User avatar
cx384
Member
 
Posts: 492
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] PowerTools [powertools]

by cx384 » Sun Aug 06, 2017 20:37

Stix wrote:is it possible to set ban to a tool and punch a player to ban them?

viewtopic.php?t=9032
Can your read this?
 

User avatar
octacian
Member
 
Posts: 593
Joined: Mon Dec 21, 2015 22:18
Location: BC, Canada
GitHub: octacian
IRC: octacian
In-game: octacian

Re: [Mod] PowerTools [powertools]

by octacian » Mon Aug 07, 2017 00:12

Stix wrote:is it possible to set ban to a tool and punch a player to ban them?


heh, I'll add the ability to set the command to get the punched player's username, which would allow this. In the meantime, use cx384's suggestion.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
 

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


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 1 guest