Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/helpers/Commands.js
Show First 20 Lines • Show All 596 Lines • ▼ Show 20 Lines | cmpGuiInterface.PushNotification({ | ||||
"players": [player], | "players": [player], | ||||
"message": markForTranslation("(Cheat - promoted units)"), | "message": markForTranslation("(Cheat - promoted units)"), | ||||
"translateMessage": true | "translateMessage": true | ||||
}); | }); | ||||
for (let ent of cmd.entities) | for (let ent of cmd.entities) | ||||
{ | { | ||||
var cmpPromotion = Engine.QueryInterface(ent, IID_Promotion); | var cmpPromotion = Engine.QueryInterface(ent, IID_Promotion); | ||||
if (cmpPromotion) | if (cmpPromotion && cmpPromotion.GetRequiredXp()) | ||||
cmpPromotion.IncreaseXp(cmpPromotion.GetRequiredXp() - cmpPromotion.GetCurrentXp()); | cmpPromotion.IncreaseXp(cmpPromotion.GetRequiredXp() - cmpPromotion.GetCurrentXp()); | ||||
} | } | ||||
}, | }, | ||||
"stance": function(player, cmd, data) | "stance": function(player, cmd, data) | ||||
{ | { | ||||
for (let ent of data.entities) | for (let ent of data.entities) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 1,114 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator