Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add hasLicense in Config_vitems #651

Open
wants to merge 5 commits into
base: v5.X.X
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions Altis_Life.Altis/config/Config_vItems.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class VirtualShops {
* buyPrice = Item Buy Price
* sellPrice = Item Sell Price
* illegal = Illegal Item
* hasLicense = Item hasLicense traitement
* edible = Item Edible (-1 = Disabled, other values = added value)
* drinkable = Item Drinkable (-1 = Disabled, other values = added value)
* icon = Item Icon
Expand Down Expand Up @@ -310,6 +311,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_oilUnprocessed.paa";
Expand All @@ -322,6 +324,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 3200;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_oilProcessed.paa";
Expand All @@ -334,6 +337,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_copperOre.paa";
Expand All @@ -346,6 +350,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 1500;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_copper.paa";
Expand All @@ -358,6 +363,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_ironOre.paa";
Expand All @@ -370,6 +376,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 3200;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_iron.paa";
Expand All @@ -382,6 +389,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_saltUnprocessed.paa";
Expand All @@ -394,6 +402,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 1450;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_saltProcessed.paa";
Expand All @@ -406,6 +415,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_sand.paa";
Expand All @@ -418,6 +428,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 1450;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_glass.paa";
Expand All @@ -430,6 +441,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 750;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_diamondUncut.paa";
Expand All @@ -442,6 +454,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 2000;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_diamondCut.paa";
Expand All @@ -454,6 +467,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_rock.paa";
Expand All @@ -466,6 +480,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 1950;
illegal = false;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_cement.paa";
Expand All @@ -479,6 +494,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = true;
hasLicense = true;
edible = -1;
drinkable = -1;
icon = "icons\ico_heroinUnprocessed.paa";
Expand All @@ -492,6 +508,7 @@ class VirtualItems {
buyPrice = 3500;
sellPrice = 2560;
illegal = true;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_heroinProcessed.paa";
Expand All @@ -504,6 +521,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = true;
hasLicense = true;
edible = -1;
drinkable = -1;
icon = "icons\ico_cannabis.paa";
Expand All @@ -517,6 +535,7 @@ class VirtualItems {
buyPrice = 2800;
sellPrice = 2350;
illegal = true;
hasLicense = true;
edible = -1;
drinkable = -1;
icon = "icons\ico_marijuana.paa";
Expand All @@ -529,6 +548,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = -1;
illegal = true;
hasLicense = true;
edible = -1;
drinkable = -1;
icon = "icons\ico_cocaineUnprocessed.paa";
Expand All @@ -542,6 +562,7 @@ class VirtualItems {
buyPrice = -1;
sellPrice = 5000;
illegal = true;
hasLicense = false;
edible = -1;
drinkable = -1;
icon = "icons\ico_cocaineProcessed.paa";
Expand Down
3 changes: 2 additions & 1 deletion Altis_Life.Altis/core/actions/fn_processAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,13 @@ _totalConversions = [];

if (_exit) exitWith {life_is_processing = false; hint localize "STR_NOTF_NotEnoughItemProcess"; life_action_inUse = false;};

if (_vendor in [mari_processor,coke_processor,heroin_processor]) then {
if (ITEM_HASLICENSE(_type) isEqualTo 1) then {
_hasLicense = true;
} else {
_hasLicense = LICENSE_VALUE(_type,"civ");
};


_cost = _cost * (count _oldItem);

_minimumConversions = _totalConversions call BIS_fnc_lowestNum;
Expand Down
1 change: 1 addition & 0 deletions Altis_Life.Altis/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#define ITEM_SELLPRICE(varName) M_CONFIG(getNumber,"VirtualItems",varName,"sellPrice")
#define ITEM_BUYPRICE(varName) M_CONFIG(getNumber,"VirtualItems",varName,"buyPrice")
#define ITEM_NAME(varName) M_CONFIG(getText,"VirtualItems",varName,"displayName")
#define ITEM_HASLICENSE(varName) M_CONFIG(getNumber,"VirtualItems",varName,"hasLicense")

//Condition Macros
#define KINDOF_ARRAY(a,b) [##a,##b] call {_veh = _this select 0;_types = _this select 1;_res = false; {if (_veh isKindOf _x) exitWith { _res = true };} forEach _types;_res}
Expand Down