[0.11.22] Recipe Clipboard [WIP/First]
[0.11.22] Recipe Clipboard [WIP/First]
Hi guys
This is my first attempt at a mod, so any criticism/advice on improvements are welcome
Project homepage: https://github.com/leflings/RecipeClipboard
The homepage contains a more detailed readme.
Recipe Clipboard adds the ability to
[*] Copy the ingredient list and count from any assembling machine (or anything with a recipe configured)
[*] Copy the product item from any assembling machine
[*] Paste ingredient list and count to logistic chest
[*] Paste recipe product item to any smart capable inserter
This is my first attempt at a mod, so any criticism/advice on improvements are welcome
Project homepage: https://github.com/leflings/RecipeClipboard
The homepage contains a more detailed readme.
Recipe Clipboard adds the ability to
[*] Copy the ingredient list and count from any assembling machine (or anything with a recipe configured)
[*] Copy the product item from any assembling machine
[*] Paste ingredient list and count to logistic chest
[*] Paste recipe product item to any smart capable inserter
- Attachments
-
- paste_inserter.jpg (582.82 KiB) Viewed 22509 times
-
- paste_chest.jpg (579.08 KiB) Viewed 22509 times
-
- copy.jpg (490.86 KiB) Viewed 22509 times
- Xterminator
- Filter Inserter
- Posts: 981
- Joined: Sun Jun 15, 2014 4:49 pm
- Contact:
Re: [0.11.22] Recipe Clipboard [WIP/First]
This is awesome! Wanted something like this for a long time. Keep up the good work, I will definitely be using this.
Re: [0.11.22] Recipe Clipboard [WIP/First]
Nice one, but how about including the zip for download
Or i'm supposed do run over to git
Or i'm supposed do run over to git
- MagicLegend
- Long Handed Inserter
- Posts: 65
- Joined: Tue Dec 30, 2014 6:17 pm
- Contact:
Re: [0.11.22] Recipe Clipboard [WIP/First]
Looks really cool! This is something that should be in the basegame!
~ML
Ps. I'll test this mod with Dytech for you
~ML
Ps. I'll test this mod with Dytech for you
Very good at pressing buttons.
-
- Fast Inserter
- Posts: 185
- Joined: Sat Apr 11, 2015 7:52 pm
- Contact:
Re: [0.11.22] Recipe Clipboard [WIP/First]
Wait... what'S the difference to Shift+LeftClick/Shift+RightcCick?
Re: [0.11.22] Recipe Clipboard [WIP/First]
Shift click works only if the entitys are the same, means from chest to hest or chem plant to chemplant, this works from assembler to requester chest and alike.
Re: [0.11.22] Recipe Clipboard [WIP/First]
When loading saved MP game. What can I do?
Re: [0.11.22] Recipe Clipboard [WIP/First]
THat is because this is a single player mod :/!Blob wrote:When loading saved MP game. What can I do?
THOUGH it should be possible to make it multiplayer compatible at the very least (atleast so 1 player can use it) !
Putting up a fix for you:
Do note that the only thing i did was to change:
game.player. to --> game.players[1].
Now how to make it work with all the players in a multiplayer game you will need to make it check which player it was that did it! Hence the talk about the for loop down under:
Code: Select all
game.onevent(defines.events.ontick,
function(e)
--Now i havent read through the code but adding a for i = 1, numPlayers on do
--loop you should be able to make it possible to use this mod with more than just 1 player! Remember to change
--the 1 with i as players[1] Just means player number 1 in a multiplayer game OR the player in singleplayer so it works even
--In singleplayer!
if game.players[1].opened then
if pcall(function() return game.players[1].opened.recipe end) then
if not getBtn('copyButton') then
dbg('+ Copy button')
createButton('Copy Build Requirements', 'copyButton')
end
elseif game.players[1].opened.name == 'logistic-chest-requester' then
if not getBtn('pasteButton') then
dbg(' + Paste Button')
createButton('Paste Build Requirements', 'pasteButton')
end
elseif game.players[1].opened.type == 'inserter' then
if not getBtn('pasteButton') then
if string.find(game.players[1].opened.name, "smart") then
createButton('Paste Build Requirements', 'pasteButton')
end
end
end
else
if getBtn('copyButton') then
dbg(' - Copy Button')
getBtn('copyButton').destroy()
end
if getBtn('pasteButton') then
dbg(' - Paste Button')
getBtn('pasteButton').destroy()
end
end
end)
- Attachments
-
- MultiplayerFixClipBoardMod.zip
- This works for multiplayer games too!
- (1.64 KiB) Downloaded 297 times
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^Thanks for listening to our suggestions, devs !
I would jump of joy if we could specify which tiles spawned in a surfaces
Re: [0.11.22] Recipe Clipboard [WIP/First]
If you want to make it compatible with multiplayer I think there is a player index in the event object. I know for sure that player created event carries it.
Re: [0.11.22] Recipe Clipboard [WIP/First]
Hey guys
Thanks for the kind words.
Yeah, in this initial release, I did nothing to enable multiplayer, because I have never tried it. From what I can tell, and others are writing, it would be a small deal to add in support for. Sadly, this releasing this mod, I've barely had time to play Factorio myself, much less do further development on the mod. And it will be another week before I'm back from vacation, to look at these things again.
Thanks for the kind words.
Yeah, in this initial release, I did nothing to enable multiplayer, because I have never tried it. From what I can tell, and others are writing, it would be a small deal to add in support for. Sadly, this releasing this mod, I've barely had time to play Factorio myself, much less do further development on the mod. And it will be another week before I'm back from vacation, to look at these things again.
Re: [0.11.22] Recipe Clipboard [WIP/First]
I think when you save it it should be saved in a table like this: date = table[playerNumb][1]leflings wrote:Hey guys
Thanks for the kind words.
Yeah, in this initial release, I did nothing to enable multiplayer, because I have never tried it. From what I can tell, and others are writing, it would be a small deal to add in support for. Sadly, this releasing this mod, I've barely had time to play Factorio myself, much less do further development on the mod. And it will be another week before I'm back from vacation, to look at these things again.
Then when it pastes it reades, who clicked the button and put the player number in the table:
paste = table[player1][1]
Logo
Noticed the told change in FFF #111 so il continue to use my signature ^_^Thanks for listening to our suggestions, devs !
I would jump of joy if we could specify which tiles spawned in a surfaces
Re: [0.11.22] Recipe Clipboard [WIP/First]
[Moved to helper mods by Koub]
Koub - Please consider English is not my native language.