Optimize and standardize tactical data formatting.

This commit is contained in:
Roman Jaroš 2025-03-30 22:00:13 +02:00
parent 3cb2ed503f
commit b727b537ef
4 changed files with 64 additions and 82 deletions

View file

@ -80,13 +80,7 @@ const generateRoleTactic = (role: (string | null)[]) => {
for (const ability of role) {
if (ability == null) continue;
const information = ability.split('\n');
luaQuestRecord += `\t\t\t{\n`;
luaQuestRecord += `\t\t\t\tname = "${information[0]}",\n`;
luaQuestRecord += `\t\t\t\tphase = "${information[1]}",\n`;
luaQuestRecord += `\t\t\t\tdescription = "${information[2]}",\n`;
luaQuestRecord += `\t\t\t\thowTo = "${information[3]}",\n`;
luaQuestRecord += `\t\t\t\tdangerous = "${information[4]}",\n`;
luaQuestRecord += `\t\t\t},\n`;
luaQuestRecord += `\t\t{"${information[0].trim()}","${information[1].trim()}","${information[2].trim()}","${information[3].trim()}"},\n`;
}
return luaQuestRecord;
};