From 98231fdb5830f37624a4b34e52d8011a265d8d5d Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 23 Dec 2018 11:41:04 +1100 Subject: [PATCH] rearrange feature specific modules into appropriate directories --- gamemodes/irresistible/cnr/_cnr.pwn | 9 ++------- gamemodes/irresistible/cnr/features/_features.pwn | 3 +++ .../cnr/features/ammunation/_ammunation.pwn | 9 +++++++++ .../cnr/{ => features/ammunation}/ammunation.pwn | 0 .../irresistible/cnr/features/player/_player.pwn | 3 +++ .../cnr/{ => features/player}/experience.pwn | 2 +- .../cnr/{ => features/player}/irresistibleguard.pwn | 0 .../cnr/{ => features/player}/player_settings.pwn | 0 gamemodes/irresistible/cnr/features/vip/_vip.pwn | 12 ++++++++++++ .../cnr/{ => features}/vip/coin_generation.pwn | 0 .../cnr/{ => features}/vip/coin_market.pwn | 4 +++- .../cnr/{ => features}/vip/player_market.pwn | 0 .../cnr/{ => features}/vip/redeem_code.pwn | 0 gamemodes/irresistible/cnr/jobs.pwn | 2 +- gamemodes/irresistible/cnr/vip/_vip.pwn | 12 ------------ 15 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 gamemodes/irresistible/cnr/features/ammunation/_ammunation.pwn rename gamemodes/irresistible/cnr/{ => features/ammunation}/ammunation.pwn (100%) rename gamemodes/irresistible/cnr/{ => features/player}/experience.pwn (99%) rename gamemodes/irresistible/cnr/{ => features/player}/irresistibleguard.pwn (100%) rename gamemodes/irresistible/cnr/{ => features/player}/player_settings.pwn (100%) create mode 100644 gamemodes/irresistible/cnr/features/vip/_vip.pwn rename gamemodes/irresistible/cnr/{ => features}/vip/coin_generation.pwn (100%) rename gamemodes/irresistible/cnr/{ => features}/vip/coin_market.pwn (99%) rename gamemodes/irresistible/cnr/{ => features}/vip/player_market.pwn (100%) rename gamemodes/irresistible/cnr/{ => features}/vip/redeem_code.pwn (100%) delete mode 100644 gamemodes/irresistible/cnr/vip/_vip.pwn diff --git a/gamemodes/irresistible/cnr/_cnr.pwn b/gamemodes/irresistible/cnr/_cnr.pwn index f826418..cf9abd4 100644 --- a/gamemodes/irresistible/cnr/_cnr.pwn +++ b/gamemodes/irresistible/cnr/_cnr.pwn @@ -18,16 +18,11 @@ #include "irresistible\cnr\entrances.pwn" #include "irresistible\cnr\checkpoints.pwn" #include "irresistible\cnr\wanted_level.pwn" +#include "irresistible\cnr\jobs.pwn" +#include "irresistible\cnr\model_preview.pwn" // reliant on core definitions #include "irresistible\cnr\auth\_auth.pwn" -#include "irresistible\cnr\vip\_vip.pwn" -#include "irresistible\cnr\jobs.pwn" -#include "irresistible\cnr\experience.pwn" -#include "irresistible\cnr\ammunation.pwn" -#include "irresistible\cnr\irresistibleguard.pwn" -#include "irresistible\cnr\player_settings.pwn" -#include "irresistible\cnr\model_preview.pwn" // discord feature #include "irresistible\cnr\discord\_discord.pwn" diff --git a/gamemodes/irresistible/cnr/features/_features.pwn b/gamemodes/irresistible/cnr/features/_features.pwn index 0613e94..5768b81 100644 --- a/gamemodes/irresistible/cnr/features/_features.pwn +++ b/gamemodes/irresistible/cnr/features/_features.pwn @@ -7,7 +7,9 @@ /* ** Includes ** */ +#include "irresistible\cnr\features\vip\_vip.pwn" #include "irresistible\cnr\features\player\_player.pwn" +#include "irresistible\cnr\features\ammunation\_ammunation.pwn" #include "irresistible\cnr\features\stocks\_stocks.pwn" #include "irresistible\cnr\features\houses\_houses.pwn" #include "irresistible\cnr\features\vehicles\_vehicles.pwn" @@ -24,6 +26,7 @@ // #include "irresistible\cnr\features\eastereggs.pwn" // other +#include "irresistible\cnr\features\ammunation.pwn" #include "irresistible\cnr\features\movie_mode.pwn" #include "irresistible\cnr\features\passive_mode.pwn" #include "irresistible\cnr\features\server_rules.pwn" diff --git a/gamemodes/irresistible/cnr/features/ammunation/_ammunation.pwn b/gamemodes/irresistible/cnr/features/ammunation/_ammunation.pwn new file mode 100644 index 0000000..5720aa8 --- /dev/null +++ b/gamemodes/irresistible/cnr/features/ammunation/_ammunation.pwn @@ -0,0 +1,9 @@ +/* + * Irresistible Gaming (c) 2018 + * Developed by Lorenc + * Module: cnr\features\player\_player.pwn + * Purpose: encloses all ammu-nation/weapon dealing modules & components (cnr) + */ + +/* ** Includes ** */ +#include "irresistible\cnr\features\ammunation\ammunation.pwn" diff --git a/gamemodes/irresistible/cnr/ammunation.pwn b/gamemodes/irresistible/cnr/features/ammunation/ammunation.pwn similarity index 100% rename from gamemodes/irresistible/cnr/ammunation.pwn rename to gamemodes/irresistible/cnr/features/ammunation/ammunation.pwn diff --git a/gamemodes/irresistible/cnr/features/player/_player.pwn b/gamemodes/irresistible/cnr/features/player/_player.pwn index a386229..03192de 100644 --- a/gamemodes/irresistible/cnr/features/player/_player.pwn +++ b/gamemodes/irresistible/cnr/features/player/_player.pwn @@ -6,5 +6,8 @@ */ /* ** Includes ** */ +#include "irresistible\cnr\features\player\experience.pwn" +#include "irresistible\cnr\features\player\player_settings.pwn" +#include "irresistible\cnr\features\player\irresistibleguard.pwn" #include "irresistible\cnr\features\player\streaks.pwn" #include "irresistible\cnr\features\player\weapon_stats.pwn" diff --git a/gamemodes/irresistible/cnr/experience.pwn b/gamemodes/irresistible/cnr/features/player/experience.pwn similarity index 99% rename from gamemodes/irresistible/cnr/experience.pwn rename to gamemodes/irresistible/cnr/features/player/experience.pwn index dcf63fe..f1d2cc7 100644 --- a/gamemodes/irresistible/cnr/experience.pwn +++ b/gamemodes/irresistible/cnr/features/player/experience.pwn @@ -1,7 +1,7 @@ /* * Irresistible Gaming (c) 2018 * Developed by Lorenc - * Module: cnr\experience.pwn + * Module: cnr\features\player\experience.pwn * Purpose: player experience system 2.0 */ diff --git a/gamemodes/irresistible/cnr/irresistibleguard.pwn b/gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn similarity index 100% rename from gamemodes/irresistible/cnr/irresistibleguard.pwn rename to gamemodes/irresistible/cnr/features/player/irresistibleguard.pwn diff --git a/gamemodes/irresistible/cnr/player_settings.pwn b/gamemodes/irresistible/cnr/features/player/player_settings.pwn similarity index 100% rename from gamemodes/irresistible/cnr/player_settings.pwn rename to gamemodes/irresistible/cnr/features/player/player_settings.pwn diff --git a/gamemodes/irresistible/cnr/features/vip/_vip.pwn b/gamemodes/irresistible/cnr/features/vip/_vip.pwn new file mode 100644 index 0000000..36a88f3 --- /dev/null +++ b/gamemodes/irresistible/cnr/features/vip/_vip.pwn @@ -0,0 +1,12 @@ +/* + * Irresistible Gaming (c) 2018 + * Developed by Lorenc + * Module: cnr\vip\_vip.pwn + * Purpose: encloses all vip modules & components (cnr) + */ + +/* ** Includes ** */ +#include "irresistible\cnr\features\vip\coin_market.pwn" +#include "irresistible\cnr\features\vip\coin_generation.pwn" +#include "irresistible\cnr\features\vip\redeem_code.pwn" +#include "irresistible\cnr\features\vip\player_market.pwn" diff --git a/gamemodes/irresistible/cnr/vip/coin_generation.pwn b/gamemodes/irresistible/cnr/features/vip/coin_generation.pwn similarity index 100% rename from gamemodes/irresistible/cnr/vip/coin_generation.pwn rename to gamemodes/irresistible/cnr/features/vip/coin_generation.pwn diff --git a/gamemodes/irresistible/cnr/vip/coin_market.pwn b/gamemodes/irresistible/cnr/features/vip/coin_market.pwn similarity index 99% rename from gamemodes/irresistible/cnr/vip/coin_market.pwn rename to gamemodes/irresistible/cnr/features/vip/coin_market.pwn index 275fb3b..7af8728 100644 --- a/gamemodes/irresistible/cnr/vip/coin_market.pwn +++ b/gamemodes/irresistible/cnr/features/vip/coin_market.pwn @@ -753,4 +753,6 @@ static stock CheckPlayerVipExpiry( playerid ) p_VIPWep2{ playerid } = 0; p_VIPWep3{ playerid } = 0; } -} \ No newline at end of file +} + +stock IsPlayerPlatinumVIP( playerid ) return p_VIPLevel[ playerid ] >= VIP_PLATINUM; diff --git a/gamemodes/irresistible/cnr/vip/player_market.pwn b/gamemodes/irresistible/cnr/features/vip/player_market.pwn similarity index 100% rename from gamemodes/irresistible/cnr/vip/player_market.pwn rename to gamemodes/irresistible/cnr/features/vip/player_market.pwn diff --git a/gamemodes/irresistible/cnr/vip/redeem_code.pwn b/gamemodes/irresistible/cnr/features/vip/redeem_code.pwn similarity index 100% rename from gamemodes/irresistible/cnr/vip/redeem_code.pwn rename to gamemodes/irresistible/cnr/features/vip/redeem_code.pwn diff --git a/gamemodes/irresistible/cnr/jobs.pwn b/gamemodes/irresistible/cnr/jobs.pwn index a37a83d..8e04e3b 100644 --- a/gamemodes/irresistible/cnr/jobs.pwn +++ b/gamemodes/irresistible/cnr/jobs.pwn @@ -76,7 +76,7 @@ CMD:playerjobs( playerid, params[ ] ) /* ** Functions ** */ stock IsPlayerJob( playerid, jobid ) { - return ( p_Job{ playerid } == jobid ) || ( p_VIPLevel[ playerid ] >= VIP_PLATINUM && p_VIPJob{ playerid } == jobid ); + return ( p_Job{ playerid } == jobid ) || ( IsPlayerPlatinumVIP( playerid ) && p_VIPJob{ playerid } == jobid ); } stock GetJobIDFromName( const job_name[ ] ) diff --git a/gamemodes/irresistible/cnr/vip/_vip.pwn b/gamemodes/irresistible/cnr/vip/_vip.pwn deleted file mode 100644 index 414b9b3..0000000 --- a/gamemodes/irresistible/cnr/vip/_vip.pwn +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Irresistible Gaming (c) 2018 - * Developed by Lorenc - * Module: cnr\vip\_vip.pwn - * Purpose: encloses all vip modules & components (cnr) - */ - -/* ** Includes ** */ -#include "irresistible\cnr\vip\coin_market.pwn" -#include "irresistible\cnr\vip\coin_generation.pwn" -#include "irresistible\cnr\vip\redeem_code.pwn" -#include "irresistible\cnr\vip\player_market.pwn"