Changeset View
Changeset View
Standalone View
Standalone View
source/ps/scripting/JSInterface_VFS.cpp
Show First 20 Lines • Show All 300 Lines • ▼ Show 20 Lines | |||||
void RegisterScriptFunctions_ReadOnlySimulation(const ScriptRequest& rq) | void RegisterScriptFunctions_ReadOnlySimulation(const ScriptRequest& rq) | ||||
{ | { | ||||
ScriptFunction::Register<&Script_ListDirectoryFiles_Simulation>(rq, "ListDirectoryFiles"); | ScriptFunction::Register<&Script_ListDirectoryFiles_Simulation>(rq, "ListDirectoryFiles"); | ||||
ScriptFunction::Register<&Script_FileExists_Simulation>(rq, "FileExists"); | ScriptFunction::Register<&Script_FileExists_Simulation>(rq, "FileExists"); | ||||
ScriptFunction::Register<&Script_ReadJSONFile_Simulation>(rq, "ReadJSONFile"); | ScriptFunction::Register<&Script_ReadJSONFile_Simulation>(rq, "ReadJSONFile"); | ||||
} | } | ||||
void RegisterScriptFunctions_ReadOnlySimulationMaps(const ScriptRequest& rq) | void RegisterScriptFunctions_ReadOnlySimulationMaps(const ScriptRequest& rq, | ||||
const u16 flags /*= JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT */) | |||||
vladislavbelov: I think it's not necessary to duplicate default values here. | |||||
phositAuthorUnsubmitted Done Inline ActionsWhy not here? phosit: Why not here?
Either everywere or nowhere i would say. | |||||
vladislavbelovUnsubmitted Not Done Inline ActionsI mean that it's a complex value and might be changed in the future (because of SM version change). vladislavbelov: I mean that it's a complex value and might be changed in the future (because of SM version… | |||||
{ | { | ||||
ScriptFunction::Register<&Script_ListDirectoryFiles_Maps>(rq, "ListDirectoryFiles"); | ScriptFunction::Register<&Script_ListDirectoryFiles_Maps>(rq, "ListDirectoryFiles", flags); | ||||
ScriptFunction::Register<&Script_FileExists_Maps>(rq, "FileExists"); | ScriptFunction::Register<&Script_FileExists_Maps>(rq, "FileExists", flags); | ||||
ScriptFunction::Register<&Script_ReadJSONFile_Maps>(rq, "ReadJSONFile"); | ScriptFunction::Register<&Script_ReadJSONFile_Maps>(rq, "ReadJSONFile", flags); | ||||
} | } | ||||
} | } |
Wildfire Games · Phabricator
I think it's not necessary to duplicate default values here.