PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

ComputerCraft suggestion : add string getDroneName() & string getOwnerName()

Sewef opened this issue ยท 5 comments

commented

Hi there,
I was building a doc (link, if someone want...) and something is wrong imo :

  • We have setRenameString(string name) but we don't have a getDroneName(string name) function. That's not consistent with other get/set functions
  • The method that adds setBlockOrder(<closest/highToLow/lowToHigh>) converts the argument into string. Why don't we have setBlockOrder(string <"closest"/"highToLow"/"lowToHigh">) instead? Again, it would be consistent with setOperator(string <"="/">=">)
commented

Back from testing!
Well, everything is right : it does accept strings only.
image

So, documentations need a fix here :
From
[prefix{l}]setBlockOrder(<closest/highToLow/lowToHigh>) [prefix{}]
To
[prefix{l}]setBlockOrder(<"closest"/"highToLow"/"lowToHigh">) [prefix{}]
๐Ÿ˜ƒ

commented

Cool, that's an easy change then :)

commented

getDroneName() would be a reasonable addition, sure.

Regarding setBlockOrder(), have you tried just passing a string? I'm not in a position to test right now, but looking at the code here, it looks like the argument is parsed as a string.

commented

(string getOwner() would be cool too)

I'll try today, but according to the code it converts the argument into string anyway. It's not very fancy, imo, as it suggests you can send something else. I'd use args[0] instead of declaring string arg and let the no valid order exception works, or something like that

commented

Fixed in 0.7.4