Skip to content

Commit

Permalink
#191 - SB + PO
Browse files Browse the repository at this point in the history
  • Loading branch information
AloisSeckar committed Jan 15, 2024
1 parent a529200 commit 6bee499
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 6 deletions.
4 changes: 4 additions & 0 deletions assets/json/library.json
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,10 @@
"file": "po-r3",
"name": "Pick off - C to 3B (R3)"
},
{
"file": "pocs-r1-1364",
"name": "Pick off + Caught stealing - P to 1B to SS to 2B (R1)"
},
{
"file": "error-poa-r1",
"name": "Pick off attempt - e1T (R1)"
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
"POE" : "Picked off attempt + (throwing) error",
"POEN" : "Picked off attempt + (throwing) error (no advance)",
"CSO" : "Caught stealing",
"PO" : "Picked off"
"PO" : "Picked off",
"POCS" : "Picked off + caught stealing"
},
"out" : {
"title" : "Aut",
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@
"POE" : "Picked off attempt with (throwing) error",
"POEN" : "Picked off attempt with (throwing) error (no advance)",
"CSO" : "Caught stealing",
"PO" : "Picked off"
"PO" : "Picked off",
"POCS" : "Picked off + caught stealing"
},
"out" : {
"title" : "Out",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/json/pocs-r1-1364.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"group":"input-r1","baseAction":"ste","specAction":"POCS","origBase":1,"base":2,"tie":false,"runtype":"e","pos":"1364"}]
4 changes: 3 additions & 1 deletion utils/wbsc-eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ function changeRunnerSpecificAction (group: string) {
minPosItems = targetPosItems = 2
break
case 'CSO':
case 'POCS':
case 'GO':
case 'GOT':
out = true
Expand Down Expand Up @@ -592,7 +593,8 @@ function processInput (input: WBSCInput, batter: number): WBSCOutput {
break
case 'CSO':
case 'PO':
output.text1 = action.substring(0, 2)
case 'POCS':
output.text1 = action === 'CSO' ? action.substring(0, 2) : action
output.text2 = pos
output.out = true
output.num = true
Expand Down
1 change: 1 addition & 0 deletions utils/wbsc-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ function renderRunnerSpecificActionOptions (action: string, group: string) {
options.push(`<optgroup label="${rOut}">`)
options.push(`<option value="CSO">${useT('editor.action.sb.CSO')}</option>`)
options.push(`<option value="PO">${useT('editor.action.sb.PO')}</option>`)
options.push(`<option value="POCS">${useT('editor.action.sb.POCS')}</option>`)
options.push('</optgroup>')
break
case 'fdc':
Expand Down
8 changes: 5 additions & 3 deletions utils/wbsc-output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,14 +449,16 @@ function writeSituation (output: WBSCOutput) {
row1font = row2font = FONT_B2_LARGE
row1offset = 45
row2offset = 6
if (text1.length > 2) {
if (text1.length > 3) {
row1font = row2font = FONT_B2_SMALL
} else if (text1.length > 2) {
row1font = row2font = FONT_B2_MEDIUM
}
if (text2.length > 3) {
if (text2.length > 4) {
row1offset = 35
row2offset = 2
row2font = FONT_B2_TINY
} else if (text2.length > 2) {
} else if (text2.length > 3) {
row1offset = 40
row2offset = 4
row2font = FONT_B2_SMALL
Expand Down

0 comments on commit 6bee499

Please # to comment.