Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/tests/test_Player.js
Resources = { | Resources = { | ||||
Stan: add var here while at it. | |||||
Not Done Inline ActionsI'm sorry, add 'var' where exactly? I thought you meant before "Resources = {" but that gives a build error. Freagarach: I'm sorry, add 'var' where exactly? I thought you meant before "Resources = {" but that gives a… | |||||
"GetCodes": () => ["food", "metal", "stone", "wood"], | "GetCodes": () => ["food", "metal", "stone", "wood"], | ||||
"GetTradableCodes": () => ["food", "metal", "stone", "wood"], | |||||
"GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | |||||
"GetResource": () => ({}), | "GetResource": () => ({}), | ||||
"BuildSchema": (type) => { | "BuildSchema": (type) => { | ||||
let schema = ""; | let schema = ""; | ||||
for (let res of Resources.GetCodes()) | for (let res of Resources.GetCodes()) | ||||
schema += | schema += | ||||
Not Done Inline ActionsCould probably be put in a function to avoid duplication Stan: Could probably be put in a function to avoid duplication | |||||
"<optional>" + | "<optional>" + | ||||
"<element name='" + res + "'>" + | "<element name='" + res + "'>" + | ||||
"<ref name='" + type + "'/>" + | "<ref name='" + type + "'/>" + | ||||
"</element>" + | "</element>" + | ||||
"</optional>"; | "</optional>"; | ||||
return "<interleave>" + schema + "</interleave>"; | return "<interleave>" + schema + "</interleave>"; | ||||
} | } | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
add var here while at it.