Difference between revisions of "User talk:PROXiCiDE/SkyIndent.lua"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Cipscis
 
imported>Verteiron
m (→‎Property Indent correction: add missing sig, been too long since I wiki'd)
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:


-- [[User:Cipscis|Cipscis]] 15:32, 16 February 2012 (EST)
-- [[User:Cipscis|Cipscis]] 15:32, 16 February 2012 (EST)
Version 0.2a will have Tab Indent, its already implemented its just i did not provide options for it, next release will have TAB as default unless specified with the -s# command line option
--[[User:PROXiCiDE|PROXiCiDE]] 20:01, 17 February 2012 (EST)
==Property Indent correction==
Right now...
   
Float Property Foo Auto
...gets indented correctly but...
Float Property Foo
  Bool Function get()
    Return _foo
  EndFunction
  Function set(Float newFoo)
    _foo = newFoo
  EndFunction
EndProperty
...does not: the interior of the Property block gets an indent stripped. I corrected this by moving "AutoReadOnly" and "Auto" to the IndentLeft group, and "Property" to the IndentRight group. This should indent Property lines unless nullified by an Auto or AutoReadOnly keyword, so Auto Properties don't get indented but non-auto Property blocks do. I don't know Lua, so I'm not sure whether this is the best way to correct it, but it  seems to be working for me so far.
--[[User:Verteiron|Verteiron]] ([[User talk:Verteiron|talk]]) 2014-07-10T12:40:11 (EDT)

Latest revision as of 11:40, 10 July 2014

Tab Indent[edit source]

Thanks, this looks useful, especially when helping others with their scripts as many people posting to forums seem to find indenting difficult. Any chance of adding a switch to use tab characters instead of spaces to indent? That's always been my personal preference.

-- Cipscis 15:32, 16 February 2012 (EST)

Version 0.2a will have Tab Indent, its already implemented its just i did not provide options for it, next release will have TAB as default unless specified with the -s# command line option

--PROXiCiDE 20:01, 17 February 2012 (EST)

Property Indent correction[edit source]

Right now...

Float Property Foo Auto

...gets indented correctly but...

Float Property Foo
  Bool Function get()
    Return _foo
  EndFunction
  Function set(Float newFoo)
    _foo = newFoo
  EndFunction
EndProperty

...does not: the interior of the Property block gets an indent stripped. I corrected this by moving "AutoReadOnly" and "Auto" to the IndentLeft group, and "Property" to the IndentRight group. This should indent Property lines unless nullified by an Auto or AutoReadOnly keyword, so Auto Properties don't get indented but non-auto Property blocks do. I don't know Lua, so I'm not sure whether this is the best way to correct it, but it seems to be working for me so far.

--Verteiron (talk) 2014-07-10T12:40:11 (EDT)