Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Cheat.js
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Lines | case "metaCheat": | ||||
for (let resource of Resources.GetCodes()) | for (let resource of Resources.GetCodes()) | ||||
Cheat({ "player": input.player, "action": "addresource", "text": resource, "parameter": input.parameter }); | Cheat({ "player": input.player, "action": "addresource", "text": resource, "parameter": input.parameter }); | ||||
Cheat({ "player": input.player, "action": "maxpopulation" }); | Cheat({ "player": input.player, "action": "maxpopulation" }); | ||||
Cheat({ "player": input.player, "action": "changemaxpopulation" }); | Cheat({ "player": input.player, "action": "changemaxpopulation" }); | ||||
Cheat({ "player": input.player, "action": "fastactions" }); | Cheat({ "player": input.player, "action": "fastactions" }); | ||||
for (let i=0; i<2; ++i) | for (let i=0; i<2; ++i) | ||||
Cheat({ "player": input.player, "action": "changephase", "selected": input.selected }); | Cheat({ "player": input.player, "action": "changephase", "selected": input.selected }); | ||||
return; | return; | ||||
case "playRetro": | |||||
let play = input.parameter.toLowerCase() != "off"; | |||||
cmpGuiInterface.PushNotification({ | |||||
"type": "play-tracks", | |||||
"tracks": play && input.parameter.split(" "), | |||||
"lock": play, | |||||
"players": [input.player] | |||||
}); | |||||
return; | |||||
default: | default: | ||||
warn("Cheat '" + input.action + "' is not implemented"); | warn("Cheat '" + input.action + "' is not implemented"); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
Engine.RegisterGlobal("Cheat", Cheat); | Engine.RegisterGlobal("Cheat", Cheat); |
Wildfire Games · Phabricator