Rename getServerGame to getGame to match client
This commit is contained in:
@@ -70,7 +70,7 @@ function stopPlayerAnimationCommand(command, params, client) {
|
||||
// ===========================================================================
|
||||
|
||||
function showAnimationListCommand(command, params, client) {
|
||||
let animList = getGameConfig().animations[getServerGame()].map(function(x) { return x.name; });
|
||||
let animList = getGameConfig().animations[getGame()].map(function(x) { return x.name; });
|
||||
|
||||
let chunkedList = splitArrayIntoChunks(animList, 10);
|
||||
|
||||
@@ -87,7 +87,7 @@ function showAnimationListCommand(command, params, client) {
|
||||
* @param {number} animationSlot - The slot index of the animation
|
||||
* @return {Array} The animation's data (array)
|
||||
*/
|
||||
function getAnimationData(animationSlot, gameId = getServerGame()) {
|
||||
function getAnimationData(animationSlot, gameId = getGame()) {
|
||||
return getGameConfig().animations[gameId][animationSlot];
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ function makePlayerStopAnimation(client) {
|
||||
// ===========================================================================
|
||||
|
||||
function getAnimationFromParams(params) {
|
||||
let animations = getGameConfig().animations[getServerGame()];
|
||||
let animations = getGameConfig().animations[getGame()];
|
||||
if(isNaN(params)) {
|
||||
for(let i in animations) {
|
||||
if(toLowerCase(animations[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||
@@ -152,7 +152,7 @@ function getAnimationFromParams(params) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(typeof getGameConfig().animations[getServerGame()][params] != "undefined") {
|
||||
if(typeof getGameConfig().animations[getGame()][params] != "undefined") {
|
||||
return toInteger(params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user