mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
use new custom var to track mission state
EPOCH_playerMissionArray
This commit is contained in:
parent
7218acaf5a
commit
69e38997ae
@ -66,13 +66,13 @@ class FSM
|
|||||||
"" \n
|
"" \n
|
||||||
"//Mission Control - WIP. TODO: Move to serverside mission control UINamespace not secure." \n
|
"//Mission Control - WIP. TODO: Move to serverside mission control UINamespace not secure." \n
|
||||||
"//uiNameSpace setVariable [""axeTask"",_taskName];" \n
|
"//uiNameSpace setVariable [""axeTask"",_taskName];" \n
|
||||||
"_plyrVar = player getVariable [""SERVER_VARS"",[]];" \n
|
"_plyrVar = missionNamespace getVariable [""EPOCH_playerMissionArray"",[]];" \n
|
||||||
"_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n
|
"_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n
|
||||||
"if(_taskIndex > -1)then{" \n
|
"if(_taskIndex > -1)then{" \n
|
||||||
"_plyrVar deleteAt _taskIndex;" \n
|
"_plyrVar deleteAt _taskIndex;" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
"_plyrVar pushBack [""axeTask"",_taskName];" \n
|
"_plyrVar pushBack [""axeTask"",_taskName];" \n
|
||||||
"player setVariable [""SERVER_VARS"",_plyrVar,true];" \n
|
"missionNamespace setVariable [""EPOCH_playerMissionArray"",_plyrVar];" \n
|
||||||
"" \n
|
"" \n
|
||||||
"missionNameSpace setVariable [""axeTask"",_taskName];" \n
|
"missionNameSpace setVariable [""axeTask"",_taskName];" \n
|
||||||
"" \n
|
"" \n
|
||||||
@ -268,12 +268,12 @@ class FSM
|
|||||||
itemno = 6;
|
itemno = 6;
|
||||||
init = "//uiNameSpace setVariable [""axeTask"",nil];" \n
|
init = "//uiNameSpace setVariable [""axeTask"",nil];" \n
|
||||||
"if!(_doBin)then{" \n
|
"if!(_doBin)then{" \n
|
||||||
"_plyrVar = player getVariable [""SERVER_VARS"",[]];" \n
|
"_plyrVar = missionNamespace getVariable [""EPOCH_playerMissionArray"",[]];" \n
|
||||||
"_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n
|
"_taskIndex = ((_plyrVar apply {_x find ""axeTask"" > -1;}) find true);" \n
|
||||||
"if(_taskIndex > -1)then{" \n
|
"if(_taskIndex > -1)then{" \n
|
||||||
"_plyrVar deleteAt _taskIndex;" \n
|
"_plyrVar deleteAt _taskIndex;" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
"player setVariable [""SERVER_VARS"",_plyrVar,true];" \n
|
"missionNamespace setVariable [""EPOCH_playerMissionArray"",_plyrVar];" \n
|
||||||
"};" \n
|
"};" \n
|
||||||
"if(count _missionCleanUp > 0)then{" \n
|
"if(count _missionCleanUp > 0)then{" \n
|
||||||
"{" \n
|
"{" \n
|
||||||
|
@ -18,7 +18,7 @@ _hours = floor(servertime/60/60);
|
|||||||
_customVars = "";
|
_customVars = "";
|
||||||
{
|
{
|
||||||
_val = missionNamespace getVariable [format ["EPOCH_player%1",_x],EPOCH_defaultVars select _forEachIndex];
|
_val = missionNamespace getVariable [format ["EPOCH_player%1",_x],EPOCH_defaultVars select _forEachIndex];
|
||||||
if !(_x in ["AliveTime","SpawnArray","HitPoints"]) then {
|
if !(_x in ["AliveTime","SpawnArray","HitPoints","MissionArray"]) then {
|
||||||
if (_x == "Temp") then {
|
if (_x == "Temp") then {
|
||||||
_customVars = _customVars + format["<t size='1.15' font='puristaLight' align='left'>%1: </t><t size='1.15' font='puristaLight' align='right'>%2°F | %3°C</t><br/>", _x,_val,_val call EPOCH_convertTemp];
|
_customVars = _customVars + format["<t size='1.15' font='puristaLight' align='left'>%1: </t><t size='1.15' font='puristaLight' align='right'>%2°F | %3°C</t><br/>", _x,_val,_val call EPOCH_convertTemp];
|
||||||
} else {
|
} else {
|
||||||
|
@ -80,7 +80,7 @@ _menuCondition = getText(getMissionConfig "epochMissions" >> (_missionClasses se
|
|||||||
_doTask = (_missionTasks select 0);
|
_doTask = (_missionTasks select 0);
|
||||||
_allowTask = true;
|
_allowTask = true;
|
||||||
//_uiNSTask = uiNameSpace getVariable ["axeTask",""];//TODO: Use hive to store this via dynamic vars. Or server mission control server_vars
|
//_uiNSTask = uiNameSpace getVariable ["axeTask",""];//TODO: Use hive to store this via dynamic vars. Or server mission control server_vars
|
||||||
_plyrVar = player getVariable ["SERVER_VARS",[]] select {_x find "axeTask" > -1;};
|
_plyrVar = missionNamespace getVariable ["EPOCH_playerMissionArray",[]] select {_x find "axeTask" > -1;};
|
||||||
_uiNSTask = "";
|
_uiNSTask = "";
|
||||||
if(count _plyrVar > 0)then{
|
if(count _plyrVar > 0)then{
|
||||||
_uiNSTask = _plyrVar select 0 select 1;
|
_uiNSTask = _plyrVar select 0 select 1;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
player setVariable ["SERVER_VARS",[],true];
|
missionNamespace setVariable ["EPOCH_playerMissionArray",[]];
|
||||||
[format ["<t size='1.6' color='#99ffffff'>%1</t>","Missions Reset - Re-open Trader Menu."], 5] call Epoch_dynamicText;
|
[format ["<t size='1.6' color='#99ffffff'>%1</t>","Missions Reset - Re-open Trader Menu."], 5] call Epoch_dynamicText;
|
@ -15,7 +15,7 @@
|
|||||||
private ["_lbl","_missionClasses","_missionName","_menuCondition","_toolTip","_plyrVar","_uiNSTask"];
|
private ["_lbl","_missionClasses","_missionName","_menuCondition","_toolTip","_plyrVar","_uiNSTask"];
|
||||||
params [["_currentTask",""]];
|
params [["_currentTask",""]];
|
||||||
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
|
_missionClasses = getArray(getMissionConfig "EpochMissionList" >> "traderMissionClasses");
|
||||||
_plyrVar = player getVariable ["SERVER_VARS",[]] select {_x find "axeTask" > -1;};
|
_plyrVar = missionNamespace getVariable ["EPOCH_playerMissionArray",[]] select {_x find "axeTask" > -1;};
|
||||||
_uiNSTask = "";
|
_uiNSTask = "";
|
||||||
if(count _plyrVar > 0)then{
|
if(count _plyrVar > 0)then{
|
||||||
_uiNSTask = _plyrVar select 0 select 1;
|
_uiNSTask = _plyrVar select 0 select 1;
|
||||||
|
@ -42,7 +42,8 @@ EPOCH_customVarsDefaults = [
|
|||||||
["Karma",0,[50000,-50000]],
|
["Karma",0,[50000,-50000]],
|
||||||
["Alcohol",0,[100,0]],
|
["Alcohol",0,[100,0]],
|
||||||
["Radiation",0,[100,0]],
|
["Radiation",0,[100,0]],
|
||||||
["Nuisance",0,[100,0]]
|
["Nuisance",0,[100,0]],
|
||||||
|
["MissionArray",[],[]]
|
||||||
];
|
];
|
||||||
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", EPOCH_customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2;
|
_customVarsInit = ["CfgEpochClient", "customVarsDefaults", EPOCH_customVarsDefaults] call EPOCH_fnc_returnConfigEntryV2;
|
||||||
{
|
{
|
||||||
|
@ -53,7 +53,8 @@ class CfgEpochClient
|
|||||||
{"Karma",0,{50000,-50000}},
|
{"Karma",0,{50000,-50000}},
|
||||||
{"Alcohol",0,{100,0}},
|
{"Alcohol",0,{100,0}},
|
||||||
{"Radiation",0,{100,0}},
|
{"Radiation",0,{100,0}},
|
||||||
{"Nuisance",0,{100,0}}
|
{"Nuisance",0,{100,0}},
|
||||||
|
{"MissionArray",{},{}}
|
||||||
};
|
};
|
||||||
// controls max group limit and cost
|
// controls max group limit and cost
|
||||||
group_upgrade_lvl[] = {4,"100",6,"300",8,"500",10,"1000",12,"1500",13,"1750",14,"2000",15,"3000",16,"5000"};
|
group_upgrade_lvl[] = {4,"100",6,"300",8,"500",10,"1000",12,"1500",13,"1750",14,"2000",15,"3000",16,"5000"};
|
||||||
|
@ -62,7 +62,7 @@ Fridge_EPOCH = [[[0,0,1.1],[0,0,-0.1]],[[0,0,1.1],[0,0,2.1]],[[0,0,1.1],[0.5,0,1
|
|||||||
Shelf_EPOCH = [[[0,0,1],[0,0,-0.1]],[[0,0,1],[0,0,1.8]],[[0,0,1],[0.5,0,1]],[[0,0,1],[-0.5,0,1]],[[0,0,1],[0,0.2,1]],[[0,0,1],[0,-0.6,1]]];
|
Shelf_EPOCH = [[[0,0,1],[0,0,-0.1]],[[0,0,1],[0,0,1.8]],[[0,0,1],[0.5,0,1]],[[0,0,1],[-0.5,0,1]],[[0,0,1],[0,0.2,1]],[[0,0,1],[0,-0.6,1]]];
|
||||||
Couch_EPOCH = [[[0,0,0.4],[0,0,-0.1]],[[0,0,0.4],[0,0,1.2]],[[0,0,0.4],[1.3,0,0.4]],[[0,0,0.4],[-0.3,0,0.4]],[[0,0,0.4],[0,1.4,0.4]],[[0,0,0.4],[0,-1.4,0.4]]];
|
Couch_EPOCH = [[[0,0,0.4],[0,0,-0.1]],[[0,0,0.4],[0,0,1.2]],[[0,0,0.4],[1.3,0,0.4]],[[0,0,0.4],[-0.3,0,0.4]],[[0,0,0.4],[0,1.4,0.4]],[[0,0,0.4],[0,-1.4,0.4]]];
|
||||||
wardrobe_epoch = [[[0,0,1.3],[0,0,-0.1]],[[0,0,1.3],[0,0,2.3]],[[0,0,1.3],[0.7,0,1.3]],[[0,0,1.3],[-0.7,0,1.3]],[[0,0,1.3],[0,0.4,1.3]],[[0,0,1.3],[0,-0.6,1.3]]];
|
wardrobe_epoch = [[[0,0,1.3],[0,0,-0.1]],[[0,0,1.3],[0,0,2.3]],[[0,0,1.3],[0.7,0,1.3]],[[0,0,1.3],[-0.7,0,1.3]],[[0,0,1.3],[0,0.4,1.3]],[[0,0,1.3],[0,-0.6,1.3]]];
|
||||||
cooker_epoch = [[[0,0,0],[0,0,-0.7]],[[0,0,0],[0,0,0.7]],[[0,0,0],[0.4,0,0]],[[0,0,0],[-0.4,0,0]],[[0,0,0],[0,0.5,0]],[[0,0,0],[0,-0.7,0]]];
|
cooker_epoch = [[[0,0,0],[0,0,-0.1]],[[0,0,0],[0,0,0.7]],[[0,0,0],[0.4,0,0]],[[0,0,0],[-0.4,0,0]],[[0,0,0],[0,0.5,0]],[[0,0,0],[0,-0.7,0]]];
|
||||||
Chair_EPOCH = [[[0,0,0.5],[0,0,-0.1]],[[0,0,0.5],[0,0,1.5]],[[0,0,0.6],[0.6,0,0.6]],[[0,0,0.6],[-0.6,0,0.6]],[[0,0,0.6],[0,0.6,0.6]],[[0,0,0.5],[0,-0.6,0.5]]];
|
Chair_EPOCH = [[[0,0,0.5],[0,0,-0.1]],[[0,0,0.5],[0,0,1.5]],[[0,0,0.6],[0.6,0,0.6]],[[0,0,0.6],[-0.6,0,0.6]],[[0,0,0.6],[0,0.6,0.6]],[[0,0,0.5],[0,-0.6,0.5]]];
|
||||||
Filing_epoch = [[[0,0,0.8],[0,0,-0.1]],[[0,0,0.8],[0,0,1.6]],[[0,0,0.8],[0.3,0,0.8]],[[0,0,0.8],[-0.3,0,0.8]],[[0,0,0.8],[0,0.4,0.8]],[[0,0,0.8],[0,-0.5,0.8]]];
|
Filing_epoch = [[[0,0,0.8],[0,0,-0.1]],[[0,0,0.8],[0,0,1.6]],[[0,0,0.8],[0.3,0,0.8]],[[0,0,0.8],[-0.3,0,0.8]],[[0,0,0.8],[0,0.4,0.8]],[[0,0,0.8],[0,-0.5,0.8]]];
|
||||||
Pelican_EPOCH = [[[0,0,0.2],[0,0,-0.1]],[[0,0,0.2],[0,0,0.7]],[[0,0,0.2],[0.9,0,0.2]],[[0,0,0.2],[-0.9,0,0.2]],[[0,0,0.2],[0,0.6,0.2]],[[0,0,0.2],[0,-0.4,0.2]]];
|
Pelican_EPOCH = [[[0,0,0.2],[0,0,-0.1]],[[0,0,0.2],[0,0,0.7]],[[0,0,0.2],[0.9,0,0.2]],[[0,0,0.2],[-0.9,0,0.2]],[[0,0,0.2],[0,0.6,0.2]],[[0,0,0.2],[0,-0.4,0.2]]];
|
||||||
@ -71,7 +71,7 @@ Locker_EPOCH = [[[0,0,1.1],[0,0,-0.1]],[[0,0,1.1],[0,0,2.1]],[[0,0,1.1],[1,0,1.1
|
|||||||
ToolRack_EPOCH = [[[0,0,1.5],[0,0,-0.1]],[[0,0,1.5],[0,0,2.3]],[[0,0,1.5],[1,0,1.5]],[[0,0,1.5],[-0.9,0,1.5]],[[0,0,1.5],[0,0.05,1.5]],[[0,0,1.5],[0,-0.4,1.5]]];
|
ToolRack_EPOCH = [[[0,0,1.5],[0,0,-0.1]],[[0,0,1.5],[0,0,2.3]],[[0,0,1.5],[1,0,1.5]],[[0,0,1.5],[-0.9,0,1.5]],[[0,0,1.5],[0,0.05,1.5]],[[0,0,1.5],[0,-0.4,1.5]]];
|
||||||
Shoebox_EPOCH = [[[0,0,0.1],[0,0,-0.1]],[[0,0,0.1],[0,0,0.3]],[[0,0,0.1],[0.3,0,0.1]],[[0,0,0.1],[-0.3,0,0.1]],[[0,0,0.1],[0,0.2,0.1]],[[0,0,0.1],[0,-0.2,0.1]]];
|
Shoebox_EPOCH = [[[0,0,0.1],[0,0,-0.1]],[[0,0,0.1],[0,0,0.3]],[[0,0,0.1],[0.3,0,0.1]],[[0,0,0.1],[-0.3,0,0.1]],[[0,0,0.1],[0,0.2,0.1]],[[0,0,0.1],[0,-0.2,0.1]]];
|
||||||
Tarp_EPOCH = [[[0,0,0.2],[0,0,-0.1]],[[0,0,0.2],[0,0,1]],[[0,0,0.2],[0.9,0,0.2]],[[0,0,0.2],[-0.9,0,0.2]],[[0,0,0.2],[0,1,0.2]],[[0,0,0.2],[0,-0.9,0.2]]];
|
Tarp_EPOCH = [[[0,0,0.2],[0,0,-0.1]],[[0,0,0.2],[0,0,1]],[[0,0,0.2],[0.9,0,0.2]],[[0,0,0.2],[-0.9,0,0.2]],[[0,0,0.2],[0,1,0.2]],[[0,0,0.2],[0,-0.9,0.2]]];
|
||||||
Freezer_EPOCH = [[[0,0,0.5],[0,0,-0.2]],[[0,0,0.5],[0,0,1.1]],[[0,0,0.5],[0.7,0,0.5]],[[0,0,0.5],[-0.7,0,0.5]],[[0,0,0.5],[0,0.5,0.5]],[[0,0,0.5],[0,-0.6,0.5]]];
|
Freezer_EPOCH = [[[0,0,0.5],[0,0,-0.1]],[[0,0,0.5],[0,0,1.1]],[[0,0,0.5],[0.7,0,0.5]],[[0,0,0.5],[-0.7,0,0.5]],[[0,0,0.5],[0,0.5,0.5]],[[0,0,0.5],[0,-0.6,0.5]]];
|
||||||
Cabinet_EPOCH = [[[0,0,0],[0,0,-0.4]],[[0,0,0],[0,0,0.4]],[[0,0,0],[0.2,0,0]],[[0,0,0],[-0.1,0,0]],[[0,0,0],[0,0.3,0]],[[0,0,0],[0,-0.3,0]]];
|
Cabinet_EPOCH = [[[0,0,0],[0,0,-0.4]],[[0,0,0],[0,0,0.4]],[[0,0,0],[0.2,0,0]],[[0,0,0],[-0.1,0,0]],[[0,0,0],[0,0.3,0]],[[0,0,0],[0,-0.3,0]]];
|
||||||
|
|
||||||
EPOCH_lootClassesRaw = [
|
EPOCH_lootClassesRaw = [
|
||||||
|
Loading…
Reference in New Issue
Block a user