mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
The Great Enspacening begins!
This commit is contained in:
@@ -76,7 +76,7 @@ module Compiler
|
||||
return line
|
||||
end
|
||||
|
||||
def csvQuote(str,always=false)
|
||||
def csvQuote(str,always = false)
|
||||
return "" if nil_or_empty?(str)
|
||||
if always || str[/[,\"]/] # || str[/^\s/] || str[/\s$/] || str[/^#/]
|
||||
str = str.gsub(/[\"]/,"\\\"")
|
||||
@@ -278,7 +278,7 @@ module Compiler
|
||||
return ret
|
||||
end
|
||||
|
||||
def csvBoolean!(str,_line=-1)
|
||||
def csvBoolean!(str,_line = -1)
|
||||
field = csvfield!(str)
|
||||
if field[/^1|[Tt][Rr][Uu][Ee]|[Yy][Ee][Ss]|[Yy]$/]
|
||||
return true
|
||||
@@ -288,7 +288,7 @@ module Compiler
|
||||
raise _INTL("Field {1} is not a Boolean value (true, false, 1, 0)\r\n{2}",field,FileLineData.linereport)
|
||||
end
|
||||
|
||||
def csvInt!(str,_line=-1)
|
||||
def csvInt!(str,_line = -1)
|
||||
ret = csvfield!(str)
|
||||
if !ret[/^\-?\d+$/]
|
||||
raise _INTL("Field {1} is not an integer\r\n{2}",ret,FileLineData.linereport)
|
||||
@@ -296,7 +296,7 @@ module Compiler
|
||||
return ret.to_i
|
||||
end
|
||||
|
||||
def csvPosInt!(str,_line=-1)
|
||||
def csvPosInt!(str,_line = -1)
|
||||
ret = csvfield!(str)
|
||||
if !ret[/^\d+$/]
|
||||
raise _INTL("Field {1} is not a positive integer\r\n{2}",ret,FileLineData.linereport)
|
||||
@@ -304,7 +304,7 @@ module Compiler
|
||||
return ret.to_i
|
||||
end
|
||||
|
||||
def csvFloat!(str,_line=-1)
|
||||
def csvFloat!(str,_line = -1)
|
||||
ret = csvfield!(str)
|
||||
return Float(ret) rescue raise _INTL("Field {1} is not a number\r\n{2}",ret,FileLineData.linereport)
|
||||
end
|
||||
|
||||
@@ -114,7 +114,7 @@ module Compiler
|
||||
return route
|
||||
end
|
||||
|
||||
def push_move_route(list,character,route,indent=0)
|
||||
def push_move_route(list,character,route,indent = 0)
|
||||
route = generate_move_route(route) if route.is_a?(Array)
|
||||
for i in 0...route.list.length
|
||||
list.push(RPG::EventCommand.new(
|
||||
@@ -123,16 +123,16 @@ module Compiler
|
||||
end
|
||||
end
|
||||
|
||||
def push_move_route_and_wait(list,character,route,indent=0)
|
||||
def push_move_route_and_wait(list,character,route,indent = 0)
|
||||
push_move_route(list,character,route,indent)
|
||||
push_event(list,210,[],indent)
|
||||
end
|
||||
|
||||
def push_wait(list,frames,indent=0)
|
||||
def push_wait(list,frames,indent = 0)
|
||||
push_event(list,106,[frames],indent)
|
||||
end
|
||||
|
||||
def push_event(list,cmd,params=nil,indent=0)
|
||||
def push_event(list,cmd,params = nil,indent = 0)
|
||||
list.push(RPG::EventCommand.new(cmd,indent,params ? params : []))
|
||||
end
|
||||
|
||||
@@ -140,14 +140,14 @@ module Compiler
|
||||
list.push(RPG::EventCommand.new(0,0,[]))
|
||||
end
|
||||
|
||||
def push_comment(list,cmt,indent=0)
|
||||
def push_comment(list,cmt,indent = 0)
|
||||
textsplit2 = cmt.split(/\n/)
|
||||
for i in 0...textsplit2.length
|
||||
list.push(RPG::EventCommand.new((i==0) ? 108 : 408,indent,[textsplit2[i].gsub(/\s+$/,"")]))
|
||||
end
|
||||
end
|
||||
|
||||
def push_text(list,text,indent=0)
|
||||
def push_text(list,text,indent = 0)
|
||||
return if !text
|
||||
textsplit = text.split(/\\m/)
|
||||
for t in textsplit
|
||||
@@ -163,7 +163,7 @@ module Compiler
|
||||
end
|
||||
end
|
||||
|
||||
def push_script(list,script,indent=0)
|
||||
def push_script(list,script,indent = 0)
|
||||
return if !script
|
||||
first = true
|
||||
textsplit2 = script.split(/\n/)
|
||||
@@ -176,25 +176,25 @@ module Compiler
|
||||
end
|
||||
end
|
||||
|
||||
def push_exit(list,indent=0)
|
||||
def push_exit(list,indent = 0)
|
||||
list.push(RPG::EventCommand.new(115,indent,[]))
|
||||
end
|
||||
|
||||
def push_else(list,indent=0)
|
||||
def push_else(list,indent = 0)
|
||||
list.push(RPG::EventCommand.new(0,indent,[]))
|
||||
list.push(RPG::EventCommand.new(411,indent-1,[]))
|
||||
end
|
||||
|
||||
def push_branch(list,script,indent=0)
|
||||
def push_branch(list,script,indent = 0)
|
||||
list.push(RPG::EventCommand.new(111,indent,[12,script]))
|
||||
end
|
||||
|
||||
def push_branch_end(list,indent=0)
|
||||
def push_branch_end(list,indent = 0)
|
||||
list.push(RPG::EventCommand.new(0,indent,[]))
|
||||
list.push(RPG::EventCommand.new(412,indent-1,[]))
|
||||
end
|
||||
|
||||
def push_self_switch(list,swtch,switchOn,indent=0)
|
||||
def push_self_switch(list,swtch,switchOn,indent = 0)
|
||||
list.push(RPG::EventCommand.new(123,indent,[swtch,switchOn ? 0 : 1]))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user