Skip to content

Commit

Permalink
Add msgbox to command_config (for MSGBOX_YESNO), and only warn about …
Browse files Browse the repository at this point in the history
…numLines in appropriate contexts
  • Loading branch information
huderlem committed Nov 5, 2024
1 parent ca49cb5 commit 9d332fe
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 92 deletions.
185 changes: 94 additions & 91 deletions command_config.json
Original file line number Diff line number Diff line change
@@ -1,94 +1,97 @@
{
"autovar_commands": {
"specialvar": {
"var_name_arg_position": 0
},
"getpartysize": {
"var_name": "VAR_RESULT"
},
"additem": {
"var_name": "VAR_RESULT"
},
"removeitem": {
"var_name": "VAR_RESULT"
},
"checkitemspace": {
"var_name": "VAR_RESULT"
},
"checkitem": {
"var_name": "VAR_RESULT"
},
"checkitemtype": {
"var_name": "VAR_RESULT"
},
"addpcitem": {
"var_name": "VAR_RESULT"
},
"checkpcitem": {
"var_name": "VAR_RESULT"
},
"adddecoration": {
"var_name": "VAR_RESULT"
},
"removedecoration": {
"var_name": "VAR_RESULT"
},
"checkdecor": {
"var_name": "VAR_RESULT"
},
"checkdecorspace": {
"var_name": "VAR_RESULT"
},
"yesnobox": {
"var_name": "VAR_RESULT"
},
"multichoice": {
"var_name": "VAR_RESULT"
},
"multichoicedefault": {
"var_name": "VAR_RESULT"
},
"multichoicegrid": {
"var_name": "VAR_RESULT"
},
"givemon": {
"var_name": "VAR_RESULT"
},
"giveegg": {
"var_name": "VAR_RESULT"
},
"checkpartymove": {
"var_name": "VAR_RESULT"
},
"choosecontestmon": {
"var_name": "VAR_0x8004"
},
"random": {
"var_name": "VAR_RESULT"
},
"checkmoney": {
"var_name": "VAR_RESULT"
},
"getpokenewsactive": {
"var_name": "VAR_RESULT"
},
"checkplayergender": {
"var_name": "VAR_RESULT"
},
"checkcoins": {
"var_name_arg_position": 0
},
"addcoins": {
"var_name": "VAR_RESULT"
},
"removecoins": {
"var_name": "VAR_RESULT"
},
"dowildbattle": {
"var_name": "VAR_RESULT"
},
"checkmodernfatefulencounter": {
"var_name": "VAR_RESULT"
}
"autovar_commands": {
"specialvar": {
"var_name_arg_position": 0
},
"getpartysize": {
"var_name": "VAR_RESULT"
},
"additem": {
"var_name": "VAR_RESULT"
},
"removeitem": {
"var_name": "VAR_RESULT"
},
"checkitemspace": {
"var_name": "VAR_RESULT"
},
"checkitem": {
"var_name": "VAR_RESULT"
},
"checkitemtype": {
"var_name": "VAR_RESULT"
},
"addpcitem": {
"var_name": "VAR_RESULT"
},
"checkpcitem": {
"var_name": "VAR_RESULT"
},
"adddecoration": {
"var_name": "VAR_RESULT"
},
"removedecoration": {
"var_name": "VAR_RESULT"
},
"checkdecor": {
"var_name": "VAR_RESULT"
},
"checkdecorspace": {
"var_name": "VAR_RESULT"
},
"yesnobox": {
"var_name": "VAR_RESULT"
},
"multichoice": {
"var_name": "VAR_RESULT"
},
"multichoicedefault": {
"var_name": "VAR_RESULT"
},
"multichoicegrid": {
"var_name": "VAR_RESULT"
},
"givemon": {
"var_name": "VAR_RESULT"
},
"giveegg": {
"var_name": "VAR_RESULT"
},
"checkpartymove": {
"var_name": "VAR_RESULT"
},
"choosecontestmon": {
"var_name": "VAR_0x8004"
},
"random": {
"var_name": "VAR_RESULT"
},
"checkmoney": {
"var_name": "VAR_RESULT"
},
"getpokenewsactive": {
"var_name": "VAR_RESULT"
},
"checkplayergender": {
"var_name": "VAR_RESULT"
},
"checkcoins": {
"var_name_arg_position": 0
},
"addcoins": {
"var_name": "VAR_RESULT"
},
"removecoins": {
"var_name": "VAR_RESULT"
},
"dowildbattle": {
"var_name": "VAR_RESULT"
},
"checkmodernfatefulencounter": {
"var_name": "VAR_RESULT"
},
"msgbox": {
"var_name": "VAR_RESULT"
}
}
}
4 changes: 3 additions & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,9 @@ func (p *Parser) parseFormatStringOperator() (token.Token, string, string, error
if numLines <= 0 {
numLines = p.fonts.Fonts[fontID].NumLines
if numLines <= 0 {
log.Printf("PORYSCRIPT WARNING: Font id '%s' has no 'numLines' in the font config file '%s'. Update the font config to include a 'numLines' value for that font. Defaulting to numLines=2 for now.\n", fontID, p.fontConfigFilepath)
if p.enableEnvironmentErrors {
log.Printf("PORYSCRIPT WARNING: Font id '%s' has no 'numLines' in the font config file '%s'. Update the font config to include a 'numLines' value for that font. Defaulting to numLines=2 for now.\n", fontID, p.fontConfigFilepath)
}
numLines = 2
}
}
Expand Down

0 comments on commit 9d332fe

Please sign in to comment.