1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

clean up code

changed to return early pattern for consistency

Co-authored-by: Moppler <48440667+Moppler@users.noreply.github.com>
This commit is contained in:
MrYawnie 2020-07-18 17:32:54 +10:00 committed by GitHub
parent 0a1bf83966
commit 68edf3ff45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -217,14 +217,15 @@ export class HubGoals extends BasicSerializableObject {
required: 1,
reward: enumHubGoalRewards.no_reward_freeplay,
};
} else {
this.currentGoal = {
/** @type {ShapeDefinition} */
definition: this.createRandomShape(),
required: 10000 + findNiceIntegerValue(this.level * 2000),
reward: enumHubGoalRewards.no_reward_freeplay,
};
return;
}
this.currentGoal = {
/** @type {ShapeDefinition} */
definition: this.createRandomShape(),
required: 10000 + findNiceIntegerValue(this.level * 2000),
reward: enumHubGoalRewards.no_reward_freeplay,
};
return;
}
/**