You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is to track what to remove on a major version:
caseCommand.Decline: {if(command.data.offers){ret.push({label: `Decline ${command.data.offers[0].offer}`,command: `${Command.Decline}${command.data.offers[0].offer}`,warning:
command.data.offers[0].offer==="tech" ? "Are you sure you want to decline a tech tile?" : undefined,});}else{// LEGACY CODE// TODO: Remove when games are updatedret.push({label: `Decline ${command.data.offer}`,command: `${Command.Decline}${command.data.offer}`,});}break;}
[Command.ChargePower](player: PlayerEnum,income: string){constleechCommand=this.availableCommand.data;// leech rewards are including +t, if needed and in the right sequenceconstleechRewards=Reward.parse(income);// Handles legacy stuff. To remove when all games with old engine have endedif(!leechCommand.offers){leechCommand.offers=[{offer: leechCommand.offer,cost: leechCommand.cost}];}constoffer=leechCommand.offers.find((ofr)=>ofr.offer===income);assert(offer,`Cannot leech ${income}. Possible leeches: ${leechCommand.offers.map((ofr)=>ofr.offer).join(" - ")}`);this.player(player).gainRewards(leechRewards,Command.ChargePower);this.player(player).payCosts(Reward.parse(offer.cost),Command.ChargePower);}
// Legacy map generation, to keep old tests validconstoldGen=["Gianluigi-Buffon","randomSeed","12","9876","yellow-paint-8951","green-jeans-8458","Fastgame01","zadbd","bosco-marcuzzo3","Alex-Del-Pieroooooo","SGAMBATA","djfjjv4k","randomSeed2","randomseed","polite-food-8474","green-jeans-8458","waiting-fabs-1","curious-stay-2150","Three","GaiaRocks","SalmurOnTheBoard",].includes(this.seed);const[hexagon, ...hexagons]=conf.sectors.map((val: SectorInMapConfiguration,i)=>{constdef=(conf.mirror||oldGen ? rSectors : sectors)[val.sector].map;if(!val.center){val.center=centers[i];}constcenter=val.center;returnSector.create(def,val.sector,center).rotateRight(val.rotation,center);});
// Due to legacy issuesconstreverseSide=(side: string)=>{return(side[0]+side.slice(1,12).split("").reverse().join("")+side[12]+side.slice(13,18).split("").reverse().join("")+side[18]);};constrSectors=keyBy([s1,s2,s3,s4,s5,s5b,s6,s6b,s7,s7b,s8,s9,s10].map((s)=>({name: s.name,map: reverseSide(s.map)})),"name");
/** Fix old options passed. To remove when legacy data is no more in database */sanitizeOptions(){// if (get(this.options, "map.map")) {// this.options.map.sectors = get(this.options, "map.map");// set(this.options, "map.map", undefined);// }}
it("should render as faded when given legacy data", async () => {
const action = BoardActionEnum.Power1;
const store = makeTestStore();
store.state.gaiaViewer.data.boardActions[action] = PlayerEnum.Player5;
const { container } = render(BoardAction, {
props: {
action,
},
store,
});
expect(container.querySelector(".faded")).to.not.be.null;
});
// LEGACY CODE// TODO: Remove when games are updated (also remove player !== Player.Player5)for(constkeyofObject.keys(engine.boardActions)){constaction=engine.boardActions[key];if(typeofaction=="boolean"){engine.boardActions[key]=action ? null : PlayerEnum.Player5;}}
staticfromData(data: Record<string,any>){const engine =newEngine();deleteengine.version;// here
The Auction behavior
The text was updated successfully, but these errors were encountered:
This issue is to track what to remove on a major version:
The text was updated successfully, but these errors were encountered: