This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Neekow's profile picture

[WIP] NUP (we can't say there's a version ...)

Started by Neekow, 11 April 2013 - 11:33 AM
Neekow #1
Posted 11 April 2013 - 01:33 PM
Before anything (and i don't know where put it in my post):
- As i always say, my english isn't perfect, i'm french, please don't blame me <3
- You can reuse anything i did, but please, just say in your post when you do ^^
- I'm new in Lua (i know CC since july 2012 … but didn't expect that was so funny till i found something to do ^^)
- I'm not a programmer or whatever in real life
So now …


[NUP]

(What is it, why and what i want to do)


"NUP", this weird name come from someone on my server (ultimate pack) who said (dixit): "Neekow, j'ai besoin de ton utilitaire" ("Neekow, i need you utility", if i'm not wrong). So i just take it and create my first real programs under the name of "Neekow Utility Program".

So NUP is a program for people who want play with sensor cards and reader, but don't know a bit in Lua (like every player on my server ^^), i want to do something what they just need to do "pastebin get blablabla" and they have the whole programs ready to use, easy to configurate, easy to understand … sort of advanded nuclear panel for who wants it ;)/>.

My own code is separated by some things, like every colors are at top, batboxes, MFEs and other are called "storage" … i won't list every thing, but if you don't understand something, ask me ;)/>




[NUP]

(Screens, some explanation and what it does atm)


For Storage: Amps = EUs in the MFSu, Flux = Input-Output. As the bar is calculated with percentage, you will see the "Flux" with Batboxes, MFEs, MFSUs ;)/>



For Reactors: need to explain? ^^. Ya, a little thing you will find in my code: MaxAdmissibleHeat, this is 40% of the max heat, so if the right is all red, problems will come, under the max, everythings is ok. And as you can notice, there's "Test", this is the name of the card ;)/>

(Note: i just inverted the greens, now when time is full, it's lime, when 5% passed, it's green)

Before the code and pastebin, what NUP does at the moment:
- Wrap peripherals whatever their side, but if you break reader or monitor, it will stop. But you can change the card without any problems
- Works for Reactor and Storage, no tank now …
- Have beautifull customizable colors (just change in the head) and beautifull bars(?) but you cant change the color of them easly.
- Have a display error on the Reactor's Output when it on then off …




[NUP]

(Code, Pastebin and what i've to do now)


Pastebin
Spoiler

--- couleurs ---
  --- couleurs des cadres ---
	couleurCadreBase = colors.blue
	couleurCadrePassword = colors.lime
  --- couleurs des boutons password ---
	couleurButtonPassNum = colors.gray
	couleurButtonPassVal = colors.lime
	couleurButtonPassCor = colors.red
  --- couleurs des titres page principale ---
	couleurTitrePage = colors.lightGray
	couleurCarPage = colors.lightGray
	couleurCarVar = colors.gray
--- initialisation fonctions ---
  --- fonction peripherals --
	mon = nil
	monSide = nil
	reader = nil
	readerSide = nil
	card = nil
  --- fonction page principale ---  
	PagePrin = nil
  --- fonction barre nucleaire ---
	timeb = 10000
  --- fonction barre storage ---
	Stor1 = 0
	Stor2 = 0
--- fonctions ---
function peripherals()
  for i, side in pairs(rs.getSides()) do
	if peripheral.getType(side) == "monitor" then
	  mon = peripheral.wrap(side)
	  monSide = side  
	end
	if peripheral.getType(side) == "nuclearReader" then
	  reader = peripheral.wrap(side)
	  readerSide = side
	end
	if reader ~= nil then
	  uid,state,title,data= reader.get(1)
	  if data == nil then
		sleep(1)
		peripherals()
	  else
		for i,j in pairs(data) do
		  if i == "liquidMeta" then card = 0 end
		  if i == "heat" then card = 1 end
		  if i == "energyL" then card = 2 end
		end
	  end
	end
  end
end

function cadreBase()
  local cadreBase = {
	' _______  _______ ',
	'|	   ||	   |',
	'|   ____||____   |',
	'|  |		  |  |',
	'|  |__________|  |',
	'|  |		  |  |',
	'|  |		  |  |',
	'|  |		  |  |',
	'|  |		  |  |',
	'|  |____  ____|  |',
	'|  |	||	|  |',
	'|__|____||____|__|'}


  for i = 1, #cadreBase do
		   mon.setTextColor(couleurCadreBase)
		   mon.setCursorPos(1,i)
		   mon.write(cadreBase[i])
end
end
function cadrePassword()
  local x = 0
  local cadrePassord = {
  '| || || || |',
  '|_||_||_||_|',
  '| || || || |',
  '|_||_||_||_|',
   '  | || | ',
   ' _|_||_|_',
   '|   ||   |',
   '|___||___|'}


for i = 1, #cadrePassword do
		 if i<5 then x = 0 else x = 1 end
		 mon.setTextColor(couleurPassword)
		 mon.setCursorPos(4+x,i+3)
		 mon.write(cadrePassword[i])
end
mon.setCursorPos(9,12)
mon.setTextColor(couleurCadreBase)
mon.write("__")
end
function buttonPassword()
-- numButton, name, PosX, PosY, Couleur, Xmax
buttonsPassword={
{1 ,"1"   ,5  ,4  ,couleurButtonPassNum ,5 },
{2 ,"2"   ,8  ,4  ,couleurButtonPassNum ,8 },
{3 ,"3"   ,11 ,4  ,couleurButtonPassNum ,11},
{4 ,"4"   ,14 ,4  ,couleurButtonPassNum ,14},
{5 ,"5"   ,5  ,6  ,couleurButtonPassNum ,5 },
{6 ,"6"   ,8  ,6  ,couleurButtonPassNum ,8 },
{7 ,"7"   ,11 ,6  ,couleurButtonPassNum ,11},
{8 ,"8"   ,14 ,6  ,couleurButtonPassNum ,14},
{9 ,"9"   ,8  ,8  ,couleurButtonPassNum ,8 },
{10,"0"   ,11 ,8  ,couleurButtonPassNum ,11},
{11,"Val" ,6  ,10 ,couleurButtonPassVal ,8 },
{12,"Cor" ,11 ,10 ,couleurButtonPassCor ,13}}

for n,buttonP in ipairs(buttonsPassword) do
mon.setCursorPos(buttonP[3],buttonP[4])
mon.setTextColor(buttonP[5])
-----------------------------------------------------------------------mettre le changement "Cor">"Ret" si le pin == nil
mon.write(buttonP[2])
end
end
function buttonPagePrin()
  datas()
  if card == 2 then
	datas()
	if tonumber(tostring(data["maxStorageL"])) == 10000000 then
	  typestorage = "   MFSu   "
	  storageOutput = "   512	"
	end
	if tonumber(tostring(data["maxStorageL"])) == 600000 then
	  typestorage = "   MFE	"
	  storageOutput = "   128	"
	end
	if tonumber(tostring(data["maxStorageL"])) == 40000 then
	  typestorage = " Bat Box  "
	  storageOutput = "	32	"
	end
  else
	typestorage = "  "
	storageOutput = "  "
  end



-- nameTank, nameReactor, nameStorage PosX, PosY, couleur
buttonsPagePrin={
  {"Flux","Time","Flux",5,2,couleurTitrePage},
  {"Tank","Heat","Amps",11,2,couleurTitrePage},
  {title,title,title,5,4,couleurTitrePage},
  {"   Type   "," Max Heat ","   Type   ",5,6,couleurCarPage},
  {typetank,"   "..maxHeat,typestorage,5,7,couleurCarVar},
  {" Capacity ","  Output  ","  Output  ",5,8,couleurCarPage},
  {capaTank,"	"..output,storageOutput,5,9,couleurCarVar}
}

for n,buttonPage in ipairs(buttonsPagePrin) do
mon.setCursorPos(buttonPage[4],buttonPage[5])
mon.setTextColor(buttonPage[6])
mon.write(buttonPage[1+card])
end
end
function datas()
uid, state, title, data = reader.get(1)
  if state== "OK" then
	if card == 0 then
	  liquideMeta = tostring(data["liquidMeta"])
	  capacity = tostring(data["capacity"])
	  liquidId = tostring(data["liquidId"])
	  amount = tostring(data["amount"])
	
	  heat = 0
	  isSteam = 0
	  reactorPoweredB = 0
	  maxHeat = 0
	  timeLeft = 0
	  output = 0
	  maxAdmissibleHeat = 0  
	
	  energyL = 0
	  maxStorageL = 0  
	end
	if card == 1 then
	  liquideMeta = 0
	  capacity = 0
	  liquidId = 0
	  amount = 0
  
	  heat = tostring(data["heat"])
	  isSteam = tostring(data["isSteam"])
	  reactorPoweredB = tostring(data["reactorPoweredB"])
	  maxHeat = tostring(data["maxHeat"])
	  timeLeft = tostring(data["timeLeft"])
	  output = tostring(data["output"])
	  maxAdmissibleHeat = (maxHeat/100*40)
	
	  energyL = 0
	  maxStorageL = 0  
  
	end
	if card == 2 then
	  liquideMeta = 0
	  capacity = 0
	  liquidId = 0
	  amount = 0
  
	  heat = 0
	  isSteam = 0
	  reactorPoweredB = 0
	  maxHeat = 0
	  timeLeft = 0
	  output = 0
	  maxAdmissibleHeat = 0
  
	  energyL = tostring(data["energyL"])
	  maxStorageL = tostring(data["maxStorageL"])  
	end
  else
	peripherals()
  end
end
--- fonctions barres --
function Barres()
  if card == 0 then print("tralala")
  end
  if card == 1 then
   barreTime()
   barreHeat()
  end
  if card == 2 then print("tralala")
  barreStorage()
  barreStorageFlux()
  end
end
function barreTime()
  if tonumber(timeLeft) > 0 then
	for i = 1,20 do
	  if  100*timeLeft/timeb > math.abs(i-21)*5 then
		mon.setCursorPos(2,math.ceil(i/2)+1)
		mon.setTextColor(colors.lime)
		mon.setBackgroundColor(colors.lime)
		mon.write("##")
	  else
		if  100*timeLeft/timeb < math.abs(i-21)*5 and 100*timeLeft/timeb > math.abs(i-20)*5 then
		  mon.setCursorPos(2,math.ceil(i/2)+1)
		  mon.setTextColor(colors.green)
		  mon.setBackgroundColor(colors.green)
		  mon.write("##")
		else
		  mon.setCursorPos(2,math.ceil(i/2)+1)
		  mon.setTextColor(colors.black)
		  mon.setBackgroundColor(colors.black)
		  mon.write("  ")
		end
	  end
	end
  end
  mon.setBackgroundColor(colors.black)
end
function barreHeat()
  for i = 1,20 do
	if math.abs(i-21)*maxAdmissibleHeat/20 < tonumber(heat) and math.abs(i-22)*maxAdmissibleHeat/20 > tonumber(heat) then
	  mon.setCursorPos(16,math.ceil(i/2)+1)
	  mon.setTextColor(colors.orange)
	  mon.setBackgroundColor(colors.orange)
	  mon.write("##")
	else
	  if  math.abs(i-21)*maxAdmissibleHeat/20 < tonumber(heat) and math.abs(i-22)*maxAdmissibleHeat/20 < tonumber(heat) then
		mon.setCursorPos(16,math.ceil(i/2)+1)
		mon.setTextColor(colors.red)
		mon.setBackgroundColor(colors.red)
		mon.write("##")
	  else
		mon.setCursorPos(16,math.ceil(i/2)+1)
		mon.setTextColor(colors.black)
		mon.setBackgroundColor(colors.black)
		mon.write("  ")
	  end
	end
  end
  mon.setBackgroundColor(colors.black)
end
function barreStorage()
  for i = 1,20 do
	if  energyL/maxStorageL*100 > math.abs(i-21)*5 and energyL/maxStorageL*100 < math.abs(i-22)*5 then
	  mon.setCursorPos(16,math.ceil(i/2)+1)
	  mon.setTextColor(colors.lightBlue)
	  mon.setBackgroundColor(colors.lightBlue)
	  mon.write("##")
	else
	  if energyL/maxStorageL*100 >= math.abs(i-21)*5 and energyL/maxStorageL*100 >= math.abs(i-22)*5 then
		mon.setCursorPos(16,math.ceil(i/2)+1)
		mon.setTextColor(colors.cyan)
		mon.setBackgroundColor(colors.cyan)
		mon.write("##")
	  else
		mon.setCursorPos(16,math.ceil(i/2)+1)
		mon.setTextColor(colors.black)
		mon.setBackgroundColor(colors.black)
		mon.write("  ")
	  end
	end
  end
  mon.setBackgroundColor(colors.black)
end
function barreStorageFlux()
  if tonumber(maxStorageL) == 10000000 then storOutput = 512 end
  if tonumber(maxStorageL) == 600000 then storOutput = 128 end
  if tonumber(maxStorageL) == 40000 then storOutput = 32 end

  Stor2 = tonumber(energyL)
  PercStor = (Stor2-Stor1)/20
  PercStorOutput = ((PercStor/storOutput)*100)

--- flux positif
  for i = 1,10 do
	if PercStorOutput > 0 and PercStorOutput > math.abs(i-11)*10 and PercStorOutput < math.abs(i-12)*10 then
	  mon.setCursorPos(2,math.ceil(i/2)+1)
	  mon.setTextColor(colors.lime)
	  mon.setBackgroundColor(colors.lime)
	  mon.write("##")
	else
	  if PercStorOutput > 0 and PercStorOutput > math.abs(i-11)*10 and PercStorOutput > math.abs(i-12)*10 then
		mon.setCursorPos(2,math.ceil(i/2)+1)
		mon.setTextColor(colors.green)
		mon.setBackgroundColor(colors.green)
		mon.write("##")
	  else
		mon.setCursorPos(2,math.ceil(i/2)+1)
		mon.setTextColor(colors.black)
		mon.setBackgroundColor(colors.black)
		mon.write("  ")
	  end
	end
  end
--- flux negatif
  for i = 1,10 do
	if PercStorOutput < 0 and math.abs(PercStorOutput) > i*10 and math.abs(PercStorOutput) < (i+1)*10 then
	  mon.setCursorPos(2,math.ceil(i/2)+6)
	  mon.setTextColor(colors.orange)
	  mon.setBackgroundColor(colors.orange)
	  mon.write("##")
	else
	  if PercStorOutput < 0 and math.abs(PercStorOutput) > i*10 and math.abs(PercStorOutput) > (i+1)*10 then
		mon.setCursorPos(2,math.ceil(i/2)+6)
		mon.setTextColor(colors.red)
		mon.setBackgroundColor(colors.red)
		mon.write("##")
	  else
		mon.setCursorPos(2,math.ceil(i/2)+6)
		mon.setTextColor(colors.black)
		mon.setBackgroundColor(colors.black)
		mon.write("  ")
	  end
	end
  end
  mon.setBackgroundColor(colors.black)
  Stor1 = Stor2
end
--- Programme ---
peripherals()
cadreBase()
while true do
   peripherals()
   datas()
   buttonPagePrin()
   Barres()
   sleep(1)
end

What the program should do (in future versions):
- Correct the "Output" of reactor when it falls at 0
- Get monitor, reader and sensor card, whatever their side/kind, don't bug if one is removed.
- Adjust tables if there's more than 2*2 monitor, do a configurable option.
- Implement the Password option.
- Extend to GregTech sensor card.
- Add "on/off" for nuclear reactor, "1/2" for storage to choose circuits you want to connect, don't know now what i wanna do for tanks.
- Find a way to get the lenght of words to automaticly put it in the center
- The programs causes some lags for low computer, so i'll cut it in some parts, think one part by kind of card + the main.


Hope you will enjoy and feedback =)




[right]phew, for a 4 or 5th post … long one![/right]
Sammich Lord #2
Posted 11 April 2013 - 01:36 PM
This looks REALLY cool man. Nice job on doing it.
Spongy141 #3
Posted 11 April 2013 - 01:42 PM
Looks really nice, but I found one spelling error that really bothers me, its Lua not LUA, I used to make the same mistake.
SuicidalSTDz #4
Posted 11 April 2013 - 01:44 PM
Are you a robot? Seriously, I love, well, everything :D/>. Good job dude. This is truely amazing ^_^/>
Dlcruz129 #5
Posted 11 April 2013 - 01:46 PM
Good job!
Neekow #6
Posted 11 April 2013 - 01:47 PM
no more "LUA" ;)/>
and added some words i forgot -__-"

Wow, you write faster than me (normal …)


Nope, i'm not a robot, why should be one? Oo"

Happy to see your comments =)
Engineer #7
Posted 11 April 2013 - 01:51 PM
Holy ( censored for the well-being of my account and not encouraging kids to use these words )

That being said, this looks great!
A really good job on explaining what it does and upcoming changes. And of course the program is also great! :)/>

Et je ne parle pas le francais.
(I dont speak french)

To be honest, I used to know french, this is what I still know.. Oeh!

Tu parles l'Anglais?:P/>
(do you speak English)
Spongy141 #8
Posted 11 April 2013 - 01:53 PM
no more "LUA" ;)/>
and added some words i forgot -__-"

Wow, you write faster than me (normal …)


Nope, i'm not a robot, why should be one? Oo"

Happy to see your comments =)
I'll take that as you didn't read my comment, its spelled "Lua" not "LUA" LUA stands for (In internet slag) Love u always, or for Microsoft (Low-Privileged User Account) and Lua is a word… so it doesn't mean anything.

EDIT: Sorry I didn't realize that you meant you fixed the spelling error. But still I will keep the explanation of the difference up so that anyone else that does "LUA" can see what they are really saying.
Engineer #9
Posted 11 April 2013 - 01:55 PM
-snip-
Come on.. You know where he is talking about, right?
Neekow #10
Posted 11 April 2013 - 02:00 PM
I honestly don't understand what you want =/. There's probably a difference of grammar, synthax or something else between english and french that i don't get =/. I changed every "LUA" in "Lua" in my first post, by thinking doing well =/

Anyway, i'll search where i'm wrong and correct it when i understand my mistake ;)/>
Spongy141 #11
Posted 11 April 2013 - 02:00 PM
-snip-
Come on.. You know where he is talking about, right?
Not to be rude, but your sentence didn't fully make sense, but if you meant "You know what he is talking about, right" Yes, at first no, since I really wasn't paying attention and only saw "LUA" and I remember posting on this topic that that was a spelling error. But then I soon realized that he meant he fixed the error.
Spongy141 #12
Posted 11 April 2013 - 02:02 PM
I honestly don't understand what you want =/. There's probably a difference of grammar, synthax or something else between english and french that i don't get =/. I changed every "LUA" in "Lua" in my first post, by thinking doing well =/

Anyway, i'll search where i'm wrong and correct it when i understand my mistake ;)/>
Sorry if you thought I was being rude, I wasn't trying to be, and I noticed even on this forums were everyone is coding in Lua, a lot of people still say "LUA". So don't feel bad for not knowing that. Anyways nice program, looks great!
SuicidalSTDz #13
Posted 11 April 2013 - 02:05 PM
Not to be rude, but your sentence didn't fully make sense
Engineer is Dutch if I remember correctly. Give him some credit :P/>

Main Post: Can we use different monitor sizes? Or is it confined to a 2x2. I don't really mind, just wondering ^_^/>
Dlcruz129 #14
Posted 11 April 2013 - 02:12 PM
-snip-
Come on.. You know where he is talking about, right?
Not to be rude, but your sentence didn't fully make sense, but if you meant "You know what he is talking about, right" Yes, at first no, since I really wasn't paying attention and only saw "LUA" and I remember posting on this topic that that was a spelling error. But then I soon realized that he meant he fixed the error.

Oh for god's sake, are you really that dumb or are you just being a smart-ass.
Said a great mind: said:
Either you're stupid or you're pretending to be stupid, and pretending to be stupid is stupid.
Spongy141 #15
Posted 11 April 2013 - 02:17 PM
-snip-
Come on.. You know where he is talking about, right?
Not to be rude, but your sentence didn't fully make sense, but if you meant "You know what he is talking about, right" Yes, at first no, since I really wasn't paying attention and only saw "LUA" and I remember posting on this topic that that was a spelling error. But then I soon realized that he meant he fixed the error.

Oh for god's sake, are you really that dumb or are you just being a smart-ass.
Said a great mind: said:
Either you're stupid or you're pretending to be stupid, and pretending to be stupid is stupid.
Lol, truth is all day I have been a smart-ass, but still being stupid is more fun than being smart sometimes, because no matter what to you no one can prove you wrong, since your're to dumb to understand what there saying (dumb was referring to me not you).
Neekow #16
Posted 11 April 2013 - 02:21 PM
-snip- (love the sound when i say this … x))

Main Post: Can we use different monitor sizes? Or is it confined to a 2x2. I don't really mind, just wondering ^_^/>

it's confined to a 2x2 ;)/>, at the moment, if you do a bigger monitor, it will stay in your top-left corner ^^

one of the next step is:
- When you do a 4 wide and 2 high monitor, you will be able to chose where the 2x2 will be =) (same for all size, if it can be "divided" by 2x2 squares ^^)


PS: plz guys =(

PPS: Oh, found how to explain the "Flux" (was easy …), it's the Input-Output. As the bar is calculated with percentage, you will see the "Flux" with Batboxes, MFEs, MFSUs ;)/> (Main post edited to add this)
SuicidalSTDz #17
Posted 11 April 2013 - 02:35 PM
-snip- (love the sound when i say this … x))

Main Post: Can we use different monitor sizes? Or is it confined to a 2x2. I don't really mind, just wondering ^_^/>

it's confined to a 2x2 ;)/>, at the moment, if you do a bigger monitor, it will stay in your top-left corner ^^
Why not use a center function? Let me explain ^_^/>

local w,h = term.getSize()
local center(text, y)
 term.setCursorPos(((w-#text+1)/2), y)
 term.write(text)
end
Neekow #18
Posted 11 April 2013 - 02:43 PM
Hum … why not, i'll take a look to see if i can implement that without bugs x) (probably do that in the same time of the other function ^^)


What he should be at the end (i just did a 6x2, but it will works with any size ^^)


[right](yeah, don't notice the trolling machine behind … was tired last night … and on this words, i gonna sleep, 3am here x))[/right]
SuicidalSTDz #19
Posted 11 April 2013 - 03:00 PM
Hum … why not, i'll take a look to see if i can implement that without bugs x) (probably do that in the same time of the other function ^^)


What he should be at the end (i just did a 6x2, but it will works with any size ^^)


[right](yeah, don't notice the trolling machine behind … was tired last night … and on this words, i gonna sleep, 3am here x))[/right]
Umm.. Nice mining wells :P/>

Nice to see new implementations coming in the future ^_^/>
Symmetryc #20
Posted 11 April 2013 - 03:26 PM
Woah, nice!

On the topic of French…
I read a book once that had a bit of French in it, all I remember is that "je" means "I", "vous" means "I go", "tue" means "shoot", "tu" means "you", and "d'accord?" means "understand?". :P/>.
Neekow #21
Posted 12 April 2013 - 03:44 AM
So … worked a bit this night (yeah, lied, didnt sleep … what a geek!).

Think i found how i've to do the center + customisable side for the monitor. As my code is all relative (dunno if it's the right word), i'll just have to add "decaleX" and "decaleY" ^^

Things i probably need help is to do a function in my main program (to cut the actual in many parts) which automaticly grap ohter part from the net … i really don't understand a word with io.openfile and cie ><



You almost had it Symmetryc ^^ but translating english in french is harder than french in english ^^.
"Je vous tue, d'accord?" => "I kill you, agree'd?"
the hardest things to get is that "you" can be "vous" or "tu" (yeah, 2 words …), the difference between both are:
"tu" is used to talk with a single person, a friend, family etc … ie: "can you wash the car"
"vous" can be used in 2 situations:
- When you talk to many people (brother + sister, 2 or more friends etc …). football match: "Did you won?"
- When you talk to a single person who you have to be respectful, usualy a professor when you'r kid, boss, policeman …

French use many words with so many sences … just in exemple, "a car", in french, can be:
une caisse, une tire, une voiture, une bagnole, un tape-cul.
Every words are used, only one is polite, others … ^^
Symmetryc #22
Posted 12 April 2013 - 12:50 PM
So … worked a bit this night (yeah, lied, didnt sleep … what a geek!).

Think i found how i've to do the center + customisable side for the monitor. As my code is all relative (dunno if it's the right word), i'll just have to add "decaleX" and "decaleY" ^^

Things i probably need help is to do a function in my main program (to cut the actual in many parts) which automaticly grap ohter part from the net … i really don't understand a word with io.openfile and cie ><



You almost had it Symmetryc ^^ but translating english in french is harder than french in english ^^.
"Je vous tue, d'accord?" => "I kill you, agree'd?"
the hardest things to get is that "you" can be "vous" or "tu" (yeah, 2 words …), the difference between both are:
"tu" is used to talk with a single person, a friend, family etc … ie: "can you wash the car"
"vous" can be used in 2 situations:
- When you talk to many people (brother + sister, 2 or more friends etc …). football match: "Did you won?"
- When you talk to a single person who you have to be respectful, usualy a professor when you'r kid, boss, policeman …

French use many words with so many sences … just in exemple, "a car", in french, can be:
une caisse, une tire, une voiture, une bagnole, un tape-cul.
Every words are used, only one is polite, others … ^^
Oops…:P/>

I thought that "vous" was "go" because in Spanish "voy" is "go".
Dlcruz129 #23
Posted 12 April 2013 - 12:54 PM
So … worked a bit this night (yeah, lied, didnt sleep … what a geek!).

Think i found how i've to do the center + customisable side for the monitor. As my code is all relative (dunno if it's the right word), i'll just have to add "decaleX" and "decaleY" ^^

Things i probably need help is to do a function in my main program (to cut the actual in many parts) which automaticly grap ohter part from the net … i really don't understand a word with io.openfile and cie ><



You almost had it Symmetryc ^^ but translating english in french is harder than french in english ^^.
"Je vous tue, d'accord?" => "I kill you, agree'd?"
the hardest things to get is that "you" can be "vous" or "tu" (yeah, 2 words …), the difference between both are:
"tu" is used to talk with a single person, a friend, family etc … ie: "can you wash the car"
"vous" can be used in 2 situations:
- When you talk to many people (brother + sister, 2 or more friends etc …). football match: "Did you won?"
- When you talk to a single person who you have to be respectful, usualy a professor when you'r kid, boss, policeman …

French use many words with so many sences … just in exemple, "a car", in french, can be:
une caisse, une tire, une voiture, une bagnole, un tape-cul.
Every words are used, only one is polite, others … ^^
Oops… :P/>

I thought that "vous" was "go" because in Spanish "voy" is "go".

Spanish ~= French
Symmetryc #24
Posted 12 April 2013 - 01:47 PM
So … worked a bit this night (yeah, lied, didnt sleep … what a geek!).

Think i found how i've to do the center + customisable side for the monitor. As my code is all relative (dunno if it's the right word), i'll just have to add "decaleX" and "decaleY" ^^

Things i probably need help is to do a function in my main program (to cut the actual in many parts) which automaticly grap ohter part from the net … i really don't understand a word with io.openfile and cie ><



You almost had it Symmetryc ^^ but translating english in french is harder than french in english ^^.
"Je vous tue, d'accord?" => "I kill you, agree'd?"
the hardest things to get is that "you" can be "vous" or "tu" (yeah, 2 words …), the difference between both are:
"tu" is used to talk with a single person, a friend, family etc … ie: "can you wash the car"
"vous" can be used in 2 situations:
- When you talk to many people (brother + sister, 2 or more friends etc …). football match: "Did you won?"
- When you talk to a single person who you have to be respectful, usualy a professor when you'r kid, boss, policeman …

French use many words with so many sences … just in exemple, "a car", in french, can be:
une caisse, une tire, une voiture, une bagnole, un tape-cul.
Every words are used, only one is polite, others … ^^
Oops… :P/>

I thought that "vous" was "go" because in Spanish "voy" is "go".

Spanish ~= French
Yeah but they have some words that are similar.
Smiley43210 #25
Posted 12 April 2013 - 05:50 PM
-snip-
Yeah but they have some words that are similar.
Like tu

On topic:
That looks awesome! Nice job! Now, if only I had CCSensors installed…
Neekow #26
Posted 12 April 2013 - 09:25 PM
CCSensors isn't needed ^^ but MiscPeripherals.

NUP works with the Nuclear Information Reader



"to go" in french = "aller". "aller" in futur (I) = "je vais". "voy", "vais" … seems similar ^^
Neekow #27
Posted 13 April 2013 - 10:03 AM
Working on the "main"
How does it should be (on term):



I don't forget the center option, but dunno how to present it in this screen, and, i'll don't add an "terminate" button … hope every one knows ctrl +T ^^
Symmetryc #28
Posted 13 April 2013 - 11:00 AM
CCSensors isn't needed ^^ but MiscPeripherals.

NUP works with the Nuclear Information Reader



"to go" in french = "aller". "aller" in futur (I) = "je vais". "voy", "vais" … seems similar ^^
Is "aller" pronounced "Ah-Yehr"? Because "ayer" is the Spanish word for "yesterday" :P/>.
Neekow #29
Posted 14 April 2013 - 12:09 PM
"aller is pronouced "ah-lay" english doesn't have the sound "é" like french ^^


On NUP, extracted the peripherals function (as every parts need it …), cleaned a bit, and added a little bit of maths to detect how much 2x2 we have ;)/>

And comments for who don't understand it ;)/>


--- Initialisation ---
		mon = nil
		monSide = nil
		monX = nil
		monY = nil
		reader = nil
		readerSide = nil
		card = nil

--- fonction ---
  for i, side in pairs(rs.getSides()) do				  --- will "scan" all computers sides
if peripheral.getType(side) == "monitor" then		 --- will wrap the monitor if ever the peripheral is a monitor
   mon = peripheral.wrap(side)						  --- wraping it
   monSide = side			  --- wraping the side, useless atm, but maybe will be cool to have it
   monX, monY = mon.getSize()						 --- need to explain?
   monX = math.floor((monX+2)/20)					--- maths function to know how many "2 wide monitor" i have
   monY = math.floor(monY/12)						--- same here, for the height
end
if peripheral.getType(side) == "nuclearReader" then	--- same as the monitor
   reader = peripheral.wrap(side)
   readerSide = side
end
if reader ~= nil then
   uid,state,title,data = reader.get(1)			--- wrap the card in the reader, if theres one, data ~= nil
   if data ~= nil then
  for i,j in pairs(data) do
	if i == "liquidMeta" then card = "Tanks" end	--- these 3 things are for recognize the card (3 basics cards from IC2)
	if i == "heat" then card = "Reactor" end
	if i == "energyL" then card = "Storage" end
	 end
   end
end
  end

I know, for comments, it's "–", but 2 "-" is too mainstream, so i put 3! (jk … i always put 3 "-", by this way people on my server know that's me)
Engineer #30
Posted 14 April 2013 - 01:42 PM
I have one comment on your code:
make the first 7 variables local and you are good to go :D/>

Its very nice that you are implementing the center when you have bigger screens :)/>
Neekow #31
Posted 14 April 2013 - 02:02 PM
I'll won't put var in local because … they may change in future version ^^ (and all my variables are unique so …)

about the control by the terminal, i changed somethings:
- Screens wiill be 4 high max (because 6 was way to high if i implement a touch_screen event)
- Implemented 3 new buttons: Center (put in the center of monitor ;)/>), CFGs (will be usefull when i'll finish the reactor parts), colors (by this way, every one will can change the colors by just a click)

Here's a screen (schema):



What i wanna do:
you see these 8 squares? this represent the max wide and 2 "mon" high (4 single monitor, so 2x2 ;)/>). I want (by the mon.getSize()), put the correct screens available (so you just have 2x1, it should let you just 2 squares), and, to choose one what monitor the program will run, you will have to clic on one of these square ^^


EDIT: Just tested peripherals(), it works perfectly ;)/> (yeah … noticed that i "released" something i didnt test …)
Edited on 14 April 2013 - 12:19 PM