Skip to content

Commit 4478d93

Browse files
Merge remote-tracking branch 'origin/master' into client-release
2 parents 36723fb + 9b02d26 commit 4478d93

30 files changed

+116
-147
lines changed

client/src/components/sidebar/game/game.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ export const GamePage: React.FC<Props> = React.memo((props) => {
9494
}
9595

9696
const isGameModeCooperation =
97-
!!round &&
97+
(round ?? true) &&
9898
!!game &&
9999
(() => {
100-
const t0 = round.stat.getTeamStat(game.teams[0])?.gameModeCooperation ?? true
101-
const t1 = round.stat.getTeamStat(game.teams[1])?.gameModeCooperation ?? true
100+
const t0 = round?.stat.getTeamStat(game.teams[0])?.gameModeCooperation ?? true
101+
const t1 = round?.stat.getTeamStat(game.teams[1])?.gameModeCooperation ?? true
102102
return t0 && t1
103103
})()
104104

client/src/components/sidebar/game/team-table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const ResourceTable: React.FC<ResourceTableProps> = ({ map, teamStat, tea
7272
ratKingPercent = teamStat.ratKingPercent
7373
}
7474

75-
const formatPercent = (val: number) => (val * 100).toFixed(1)
75+
const formatPercent = (val: number) => (val * 100).toFixed(1).toString() + '%'
7676

7777
const teamName = TEAM_COLOR_NAMES[teamIdx].toLowerCase()
7878
return (
@@ -82,7 +82,7 @@ export const ResourceTable: React.FC<ResourceTableProps> = ({ map, teamStat, tea
8282
<div className="w-[30px] h-[30px] mr-5">
8383
<img style={{ transform: 'scale(1.5)' }} src={imageSource(`icons/cheese_64x64.png`)} />
8484
</div>
85-
<div>Count:</div>
85+
<div>Amount:</div>
8686
<div className="ml-1">
8787
<b>{cheeseAmount}</b>
8888
</div>

client/src/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const CLIENT_VERSION = '1.0.0'
1+
export const CLIENT_VERSION = '1.0.2'
22
export const SPEC_VERSION = '1'
33
export const BATTLECODE_YEAR: number = 2026
44
export const MAP_SIZE_RANGE = {

client/src/playback/Actions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ export const ACTION_DEFINITIONS: Record<schema.Action, typeof Action<ActionUnion
188188
// move the target onto the source adjust target's size using scale factor
189189
const src = round.bodies.getById(this.robotId)
190190
const target = round.bodies.getById(this.actionData.id()) // rat getting napped
191+
192+
target.carriedRobot = undefined
193+
src.carriedRobot = target.id
191194

192195
target.lastPos = { ...target.pos }
193196
target.pos = { x: src.pos.x + RatNapAction.OFFSET.x, y: src.pos.y + RatNapAction.OFFSET.y }

client/src/playback/Bodies.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ export class Body {
363363
public moveCooldown: number = 0
364364
public actionCooldown: number = 0
365365
public turningCooldown: number = 0
366+
public carriedRobot: number | undefined = undefined // id of carried robot
366367
public bytecodesUsed: number = 0
367368
public cheese: number = 0
368369

@@ -687,6 +688,7 @@ export class Body {
687688
`Move Cooldown: ${this.moveCooldown}`,
688689
`Action Cooldown: ${this.actionCooldown}`,
689690
`${this.robotType !== schema.RobotType.CAT ? 'Turning Cooldown: ' + this.turningCooldown : ''}`,
691+
`${this.carriedRobot !== undefined ? 'Carrying: ' + this.carriedRobot : ''}`,
690692
`Bytecodes Used: ${this.bytecodesUsed}${
691693
this.bytecodesUsed >= this.metadata.bytecodeLimit() ? ' <EXCEEDED!>' : ''
692694
}`

client/src/playback/Brushes.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,13 @@ export class CatBrush extends SymmetricMapEditorBrush<StaticMap> {
492492
if (body && body.robotType === schema.RobotType.CAT) {
493493
this.lastSelectedCat = selectedBodyID
494494
lastSelectedCatLoc = this.bodies.getById(this.lastSelectedCat)?.pos
495+
} else {
496+
this.lastSelectedCat = -1
497+
lastSelectedCatLoc = null
495498
}
496499
}
500+
501+
// console.log(`last selected cat: ${this.lastSelectedCat}`)
497502

498503
if (fields.catOrWaypointMode.value === 1) {
499504
// Waypoint mode

client/src/playback/RoundStat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const EMPTY_ROBOT_COUNTS: Record<schema.RobotType, number> = {
1111
}
1212

1313
export class TeamRoundStat {
14-
gameModeCooperation: boolean = false
14+
gameModeCooperation: boolean = true
1515
cheeseAmount: number = 0
1616
cheesePercent: number = 0
1717
catDamageAmount: number = 0

crossplay_temp/started_java.txt

Whitespace-only changes.

engine/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jar {
7676

7777
javadoc {
7878
includes = ["**/common/**"]
79-
options.windowTitle = "Battlecode 2025"
79+
options.windowTitle = "Battlecode 2026"
8080
options.classpath = sourceSets.main.compileClasspath as List
8181
options.doclet = "jdk.javadoc.doclet.StandardDoclet"
8282
options.taglets = ["battlecode.doc.CostlyMethodTaglet"]

engine/src/main/battlecode/common/RobotController.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,5 +1034,3 @@ void setIndicatorLine(MapLocation startLoc, MapLocation endLoc, int red, int gre
10341034
*/
10351035
void setTimelineMarker(String label, int red, int green, int blue);
10361036
}
1037-
// TODO: update bytecode costs, particularly for new methods + methods that got
1038-
// renamed from last year

0 commit comments

Comments
 (0)