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

Remove stupid functions.sqf #612

Merged
merged 46 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1cc038b
move functions client side
blackfisch Feb 15, 2020
4b64f0a
rework all affected functions
blackfisch Feb 15, 2020
ca6aafa
spyglass to lowercase
blackfisch Mar 9, 2020
0069564
git rm functions.sqf
BoGuu Mar 9, 2020
3639c24
Merge branch 'BlackFisch-remove-stupid-functions.sqf'
BoGuu Mar 9, 2020
c2db35f
Appease the new gods
BoGuu Mar 9, 2020
44baf62
rename player_query -> playerQuery
blackfisch Mar 10, 2020
e5ba4df
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 10, 2020
63e1ac6
spyglass lowercase
blackfisch Mar 10, 2020
b9a73ee
max message length as config setting
blackfisch Mar 10, 2020
c46f1ae
fancy number checking
blackfisch Mar 10, 2020
5a50d4a
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 11, 2020
55702f4
tested& fixed (prefix wrong)
blackfisch Mar 19, 2020
c6e81e1
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
fe13833
centralized sendMEssage file instead of 5 single ones
blackfisch Mar 19, 2020
b4ed6a8
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 19, 2020
8b1f49e
params fix
blackfisch Mar 19, 2020
7f238bb
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
22a2d5f
remove check since EVH should be working
blackfisch Mar 19, 2020
22c77f0
me stupid, only select for msg to player
blackfisch Mar 19, 2020
752442a
spyglass for dom
blackfisch Mar 19, 2020
734746e
ton_ to life_
blackfisch Mar 19, 2020
f449f66
spyglass for dom #2
blackfisch Mar 19, 2020
71c7947
move terrainsort
blackfisch Mar 19, 2020
ab630f1
Update Altis_Life.Altis/stringtable.xml
blackfisch Mar 19, 2020
e9110aa
newlines and var renaming
blackfisch Mar 19, 2020
bdd91a2
Update Altis_Life.Altis/stringtable.xml
blackfisch Mar 19, 2020
2dea8a4
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Mar 19, 2020
c1b20bd
rework clientMessage to use string parameter, warning message if no u…
blackfisch Mar 19, 2020
036611e
Merge branch 'remove-stupid-functions.sqf' of https://github.com/Blac…
blackfisch Mar 19, 2020
0d65d9e
more languages
blackfisch Mar 19, 2020
f5d3e5c
grpnull
blackfisch Mar 19, 2020
029097c
more grpnull
blackfisch Mar 19, 2020
f459897
locality for gang stuff etc
blackfisch Mar 21, 2020
b8206f6
stringtable
blackfisch Mar 21, 2020
7c4c48e
tab stuff or whatever
blackfisch Mar 21, 2020
84bed35
jip
blackfisch Mar 21, 2020
1ebc0d4
remtoeexec -> remoteexeccall
blackfisch Mar 21, 2020
4903f00
local check since groupowner is server only
blackfisch Mar 21, 2020
1db636d
Merge branch 'master' into remove-stupid-functions.sqf
BoGuu Mar 25, 2020
dc5380f
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Mar 25, 2020
1e2cfa9
BE filters
blackfisch Mar 26, 2020
ec6f28c
Merge branch 'master' into remove-stupid-functions.sqf
blackfisch Mar 26, 2020
592d629
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Apr 3, 2020
40d86a9
Merge branch 'master' into remove-stupid-functions.sqf
DomT602 Apr 13, 2020
8be3611
Update Altis_Life.Altis/core/gangs/fn_gangKick.sqf
BoGuu Apr 13, 2020
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
14 changes: 1 addition & 13 deletions Altis_Life.Altis/Functions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,7 @@ class Tonic {
class index {};
class isNumber {};
class playerQuery {};
};
};

class TON_Cellphone {
tag = "TON_cell";
class cellphone {
file = "core\functions\TON\cell";
class adminmsg {};
class adminmsgall {};
class emsrequest {};
class textadmin {};
class textcop {};
class textmsg {};
class sendMessage {};
};
};

Expand Down
21 changes: 0 additions & 21 deletions Altis_Life.Altis/core/functions/TON/cell/fn_adminmsg.sqf

This file was deleted.

19 changes: 0 additions & 19 deletions Altis_Life.Altis/core/functions/TON/cell/fn_adminmsgall.sqf

This file was deleted.

18 changes: 0 additions & 18 deletions Altis_Life.Altis/core/functions/TON/cell/fn_emsrequest.sqf

This file was deleted.

19 changes: 0 additions & 19 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textadmin.sqf

This file was deleted.

19 changes: 0 additions & 19 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textcop.sqf

This file was deleted.

21 changes: 0 additions & 21 deletions Altis_Life.Altis/core/functions/TON/cell/fn_textmsg.sqf

This file was deleted.

1 change: 1 addition & 0 deletions Altis_Life.Altis/core/functions/TON/fn_clientMessage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
2 = message to admin
3 = message from admin
4 = admin message to all
5 = ems message
*/
params [
["_msg", "", [""]],
Expand Down
70 changes: 70 additions & 0 deletions Altis_Life.Altis/core/functions/TON/fn_sendMessage.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/*
File: fn_sendMessage.sqf
Author: blackfisch

Description: send message to target
*/
params [
["_ehParams", [], []],
DomT602 marked this conversation as resolved.
Show resolved Hide resolved
["_target", "player", [""]]
];
_ehParams params [
["_control", controlNull, [controlNull]]
];

if (isNull _control) exitWith {hint "An error occured"};
_control ctrlEnable false;

private _to = call compile format ["%1",(lbData[3004,(lbCurSel 3004)])];
BoGuu marked this conversation as resolved.
Show resolved Hide resolved
if (!(_target in ["admin", "adminAll"]) && {isNil "_to" || {isNull _to}}) exitWith {
_control ctrlEnable true;
};

private _msg = ctrlText 3003;
if (_msg isEqualTo "") exitWith {
hint localize "STR_CELLMSG_EnterMSG";
_control ctrlEnable true;
};

private _maxLength = getNumber(missionConfigFile >> "Life_Settings" >> "message_maxlength");
if (_maxLength > -1 && {(count _msg) > _maxLength}) exitWith {
hint localize "STR_CELLMSG_LIMITEXCEEDED";
_control ctrlEnable true;
};

private _targetFunction = 0;
private _sender = player getVariable ["realName", profileName];
private _toName = (if (isNil "_to" || {isNull _to}) then {"ERROR"} else {_to getVariable ["realname", name _to]});
private _confirmMessage = "STR_CELLMSG_ToPerson";

switch (_target) do {
case "cop": {
_to = west;
_targetFunction = 1;
_confirmMessage = "STR_CELLMSG_ToPolice";
};
case "med": {
_to = independent;
_targetFunction = 5;
_confirmMessage = "STR_CELLMSG_ToEMS";
};
case "admin": {
_to = -2;
_targetFunction = 2;
_confirmMessage = "STR_CELLMSG_ToAdmin";
};
case "adminToPlayer": {
_targetFunction = 3;
_confirmMessage = "STR_CELLMSG_AdminToPerson";
};
case "adminAll": {
_to = -2;
_targetFunction = 4;
_confirmMessage = "STR_CELLMSG_AdminToAll";
};
};
blackfisch marked this conversation as resolved.
Show resolved Hide resolved

[_msg,_sender,_targetFunction, mapGridPosition player] remoteExecCall ["TON_fnc_clientMessage",_to];
call life_fnc_cellphone;
hint format [localize _confirmMessage,_toName,_msg];
_control ctrlEnable true;
14 changes: 7 additions & 7 deletions Altis_Life.Altis/dialog/cell_phone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Life_cell_phone {
idc = 3015;
text = "$STR_CELL_TextMSGBtn";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_textmsg";
onButtonClick = "[_this, 'player'] call TON_fnc_sendMessage";
x = 0.11;
y = 0.35;
w = 0.2;
Expand All @@ -79,7 +79,7 @@ class Life_cell_phone {
idc = 3016;
text = "$STR_CELL_TextPolice";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_textcop";
onButtonClick = "[_this, 'cop'] call TON_fnc_sendMessage";
x = 0.32;
y = 0.35;
w = 0.2;
Expand All @@ -90,7 +90,7 @@ class Life_cell_phone {
idc = 3017;
text = "$STR_CELL_TextAdmins";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_textadmin";
onButtonClick = "[_this, 'admin'] call TON_fnc_sendMessage";
x = 0.53;
y = 0.35;
w = 0.2;
Expand All @@ -101,7 +101,7 @@ class Life_cell_phone {
idc = 3020;
text = "$STR_CELL_AdminMsg";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_adminmsg";
onButtonClick = "[_this, 'adminToPlayer'] call TON_fnc_sendMessage";
x = 0.32;
y = 0.4;
w = 0.2;
Expand All @@ -112,7 +112,7 @@ class Life_cell_phone {
idc = 3021;
text = "$STR_CELL_AdminMSGAll";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_adminmsgall";
onButtonClick = "[_this, 'adminAll'] call TON_fnc_sendMessage";
x = 0.53;
y = 0.4;
w = 0.2;
Expand All @@ -123,7 +123,7 @@ class Life_cell_phone {
idc = 3022;
text = "$STR_CELL_EMSRequest";
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
onButtonClick = "[] call TON_cell_fnc_emsrequest";
onButtonClick = "[_this, 'med'] call TON_fnc_sendMessage";
x = 0.11;
y = 0.45;
w = 0.2;
Expand All @@ -140,4 +140,4 @@ class Life_cell_phone {
h = (1 / 25);
};
};
};
};
46 changes: 35 additions & 11 deletions Altis_Life.Altis/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,30 @@
<Polish>You have sent a message to all EMS Units.</Polish>
<Chinesesimp>你已经向所有医护人员发送了消息.</Chinesesimp>
</Key>
<Key ID="STR_CELLMSG_ToPolice">
<Original>You have sent a message to all Police Units.</Original>
<Czech>You have sent a message to all Police Units.</Czech>
<Spanish>You have sent a message to all Police Units.</Spanish>
<Russian>You have sent a message to all Police Units.</Russian>
<German>Du hast eine Nachricht an alle Polizisten gesendet.</German>
<French>Vous avez envoyé un message à tous les Police.</French>
<Italian>You have sent a message to all Police Units.</Italian>
<Portuguese>You have sent a message to all Police Units.</Portuguese>
<Polish>You have sent a message to all Police Units.</Polish>
<Chinesesimp></Chinesesimp>
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
</Key>
<Key ID="STR_CELLMSG_ToAdmin">
<Original>You have sent a message to all Admins.</Original>
<Czech>You have sent a message to all Admins.</Czech>
<Spanish>You have sent a message to all Admins.</Spanish>
<Russian>You have sent a message to all Admins.</Russian>
<German>Du hast eine Nachricht an alle Admins gesendet.</German>
<French>Vous avez envoyé un message à tous les Admins.</French>
<Italian>You have sent a message to all Admins.</Italian>
<Portuguese>You have sent a message to all Admins.</Portuguese>
<Polish>You have sent a message to all Admins.</Polish>
<Chinesesimp></Chinesesimp>
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
</Key>
<Key ID="STR_CELLMSG_ToPerson">
<Original>You sent %1 a message: %2</Original>
<Czech>You sent %1 a message: %2</Czech>
Expand Down Expand Up @@ -1527,16 +1551,16 @@
<Chinesesimp>管理员消息发送给: %1 - 信息: %2</Chinesesimp>
</Key>
<Key ID="STR_CELLMSG_AdminToAll">
<Original>Admin Message Sent To All: %1</Original>
<Czech>Admin Message Sent To All: %1</Czech>
<Spanish>Admin Message Sent To All: %1</Spanish>
<Russian>Admin Message Sent To All: %1</Russian>
<German>Admin Nachricht Gesendet an Alle: %1</German>
<French>Message admin envoyé à tous les joueurs : %1</French>
<Italian>Admin Message Sent To All: %1</Italian>
<Portuguese>Admin Message Sent To All: %1</Portuguese>
<Polish>Admin Message Sent To All: %1</Polish>
<Chinesesimp>管理员发送信息到全体: %1</Chinesesimp>
<Original>Admin Message Sent To All: %2</Original>
<Czech>Admin Message Sent To All: %2</Czech>
<Spanish>Admin Message Sent To All: %2</Spanish>
<Russian>Admin Message Sent To All: %2</Russian>
<German>Admin Nachricht Gesendet an Alle: %2</German>
<French>Message admin envoyé à tous les joueurs : %2</French>
<Italian>Admin Message Sent To All: %2</Italian>
<Portuguese>Admin Message Sent To All: %2</Portuguese>
<Polish>Admin Message Sent To All: %2</Polish>
<Chinesesimp>管理员发送信息到全体: %2</Chinesesimp>
blackfisch marked this conversation as resolved.
Show resolved Hide resolved
</Key>
</Package>
<Package name="Chop_Shop">
Expand Down Expand Up @@ -13391,4 +13415,4 @@
<Chinesesimp>%1 - %2 将 $%3 存进他们的银行账户。银行存款余额:$%4 手上现金:$%5</Chinesesimp>
</Key>
</Package>
</Project>
</Project>