Use new locale strings
This commit is contained in:
@@ -174,7 +174,7 @@ function createBusinessLocationCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ function deleteBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ function setBusinessNameCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -269,12 +269,12 @@ function setBusinessOwnerCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!newBusinessOwner) {
|
||||
messagePlayerError(client, "Player not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidPlayer"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -302,12 +302,12 @@ function setBusinessJobCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getJobData(jobId)) {
|
||||
messagePlayerError(client, "Job not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidJob"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -329,14 +329,14 @@ function setBusinessClanCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError("Business not found!");
|
||||
messagePlayerError(getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
let clanId = getPlayerClan(client);
|
||||
|
||||
if(!getClanData(clanId)) {
|
||||
messagePlayerError(client, "Clan not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidClan"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ function setBusinessRankCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError("Business not found!");
|
||||
messagePlayerError(getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ function setBusinessRankCommand(command, params, client) {
|
||||
let clanId = getClanIdFromDatabaseId(getBusinessData(businessId).ownerId);
|
||||
rankId = getClanRankFromParams(clanId, params);
|
||||
if(!getClanRankData(clanId, rankId)) {
|
||||
messagePlayerError(client, "Clan rank not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "ClanRankInvalid"));
|
||||
return false;
|
||||
}
|
||||
getBusinessData(businessId).rank = getClanRankData(clanId, rankId).databaseId;
|
||||
@@ -406,21 +406,21 @@ function setBusinessRankCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError("Business not found!");
|
||||
messagePlayerError(getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
let clanId = getPlayerClan(client);
|
||||
|
||||
if(!getClanData(clanId)) {
|
||||
messagePlayerError(client, "Clan not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidClan"));
|
||||
return false;
|
||||
}
|
||||
|
||||
let clanRankId = getClanRankFromParams(clanId, params);
|
||||
|
||||
if(!getClanRankData(clanId, clanRankId)) {
|
||||
messagePlayerError(client, "Clan rank not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "ClanRankInvalid"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -457,12 +457,12 @@ function setBusinessJobCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!getJobData(jobId)) {
|
||||
messagePlayerError(client, "Job not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidJob"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -483,7 +483,7 @@ function setBusinessPublicCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ function lockUnlockBusinessCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -535,7 +535,7 @@ function lockUnlockBusinessCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ function setBusinessEntranceFeeCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ function getBusinessInfoCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -624,7 +624,7 @@ function getBusinessFloorItemsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ function getBusinessStorageItemsCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ function setBusinessPickupCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -687,7 +687,7 @@ function setBusinessInteriorTypeCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ function setBusinessBlipCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -773,7 +773,7 @@ function giveDefaultItemsToBusinessCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ function setBusinessEntranceLabelToDealershipCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -823,7 +823,7 @@ function deleteBusinessFloorItemsCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -844,7 +844,7 @@ function deleteBusinessStorageItemsCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -871,7 +871,7 @@ function withdrawFromBusinessCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -907,7 +907,7 @@ function setBusinessBuyPriceCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -942,7 +942,7 @@ function depositIntoBusinessCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -995,7 +995,7 @@ function orderItemForBusinessCommand(command, params, client) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.Business] ${getPlayerDisplayForConsole(client)} is ordering ${amount} ${splitParams.slice(0,-2).join(" ")} (${value})`);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1041,7 +1041,7 @@ function viewBusinessTillAmountCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1059,7 +1059,7 @@ function buyBusinessCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1093,7 +1093,7 @@ function moveBusinessEntranceCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1124,7 +1124,7 @@ function moveBusinessExitCommand(command, params, client) {
|
||||
}
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1618,7 +1618,7 @@ function buyFromBusinessCommand(command, params, client) {
|
||||
let splitParams = params.split(" ");
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1716,7 +1716,7 @@ function setBusinessItemSellPriceCommand(command, params, client) {
|
||||
let businessId = getBusinessFromParams(splitParams[2]) || getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1751,7 +1751,7 @@ function storeItemInBusinessStorageCommand(command, params, client) {
|
||||
let businessId = getBusinessFromParams(splitParams[2]) || getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1787,7 +1787,7 @@ function stockItemOnBusinessFloorCommand(command, params, client) {
|
||||
let businessId = getPlayerBusiness(client);
|
||||
|
||||
if(!getBusinessData(businessId)) {
|
||||
messagePlayerError(client, "Business not found!");
|
||||
messagePlayerError(client, getLocaleString(client, "InvalidBusiness"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user