Skip to content

Commit

Permalink
Clean up a couple of small niggles
Browse files Browse the repository at this point in the history
As I was going through a few of the open PR, there were some small
changes which made for nice QoL improvements so I added them here.
  • Loading branch information
jt-traub committed May 5, 2024
1 parent ba48ada commit 1e78f2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions parseorders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1553,8 +1553,7 @@ void Game::ProcessBuildOrder(Unit *unit, AString *o, OrdersCheck *pCheck)
}
int flying = ItemDefs[st].fly;
if (!reg->IsCoastalOrLakeside() && (flying <= 0)) {
unit->error("BUILD: Can't build ship in "
"non-coastal or lakeside region.");
unit->error("BUILD: Can't build ship in non-coastal or lakeside region.");
return;
}
unit->build = -st;
Expand Down Expand Up @@ -2924,12 +2923,13 @@ void Game::ProcessTransportOrder(Unit *u, AString *o, OrdersCheck *pCheck)
return;
}
int item = ParseTransportableItem(token);
delete token;

if (item == -1) {
parse_error(pCheck, u, 0, "TRANSPORT: Invalid item.");
parse_error(pCheck, u, 0, "TRANSPORT: Invalid item" + string(token->const_str()) + ".");
delete token;
return;
}
delete token;

int except = 0;
token = o->gettoken();
Expand Down
1 change: 1 addition & 0 deletions unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,7 @@ int Unit::Practice(int sk)
skills.SetExp(sk, exp);
}
practiced = 1;
event("Gets " + to_string(bonus) +" days of practice with " + SkillDefs[sk].name + ".", "practice");
}

return bonus;
Expand Down

0 comments on commit 1e78f2a

Please sign in to comment.