Added multiple tag colors

This commit is contained in:
BaerMitUmlaut 2015-07-19 20:23:16 +02:00
parent af7d596cc3
commit 7fe5cf7e3f
42 changed files with 182 additions and 61 deletions

View File

@ -1,65 +1,101 @@
class CfgVehicles {
class UserTexture1m_F;
class ACE_tagWall0 : UserTexture1m_F {
hiddenSelectionsTextures[] = {"\z\ace\addons\tagging\UI\tag0.paa"};
scope = 1;
};
class ACE_tagWall1 : ACE_tagWall0 {
hiddenSelectionsTextures[] = {"\z\ace\addons\tagging\UI\tag1.paa"};
};
class ACE_tagWall2 : ACE_tagWall0 {
hiddenSelectionsTextures[] = {"\z\ace\addons\tagging\UI\tag2.paa"};
};
class ACE_tagWall3 : ACE_tagWall0 {
hiddenSelectionsTextures[] = {"\z\ace\addons\tagging\UI\tag3.paa"};
};
class ACE_tagWall4 : ACE_tagWall0 {
hiddenSelectionsTextures[] = {"\z\ace\addons\tagging\UI\tag4.paa"};
};
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
class ACE_tagWall {
displayName = CSTRING(tagWall);
condition = QUOTE(('ACE_Spraypaint' in items ACE_player) && ([] call FUNC(checkTaggable)));
statement = QUOTE([] call FUNC(tagWall));
class ACE_tagWallBlack {
displayName = CSTRING(tagWallBlack);
condition = QUOTE(('ACE_SpraypaintBlack' in items ACE_player) && ([] call FUNC(checkTaggable)));
statement = QUOTE(['black'] call FUNC(tagWall));
showDisabled = 0;
priority = 3;
icon = QUOTE(PATHTOF(UI\iconTagging.paa));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa));
};
class ACE_tagGround {
displayName = CSTRING(tagGround);
condition = QUOTE('ACE_Spraypaint' in items ACE_player);
statement = QUOTE([] call FUNC(tagGround));
class ACE_tagWallRed: ACE_tagWallBlack {
displayName = CSTRING(tagWallRed);
condition = QUOTE(('ACE_SpraypaintRed' in items ACE_player) && ([] call FUNC(checkTaggable)));
statement = QUOTE(['red'] call FUNC(tagWall));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa));
};
class ACE_tagWallGreen: ACE_tagWallBlack {
displayName = CSTRING(tagWallGreen);
condition = QUOTE(('ACE_SpraypaintGreen' in items ACE_player) && ([] call FUNC(checkTaggable)));
statement = QUOTE(['green'] call FUNC(tagWall));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa));
};
class ACE_tagWallBlue: ACE_tagWallBlack {
displayName = CSTRING(tagWallBlue);
condition = QUOTE(('ACE_SpraypaintBlue' in items ACE_player) && ([] call FUNC(checkTaggable)));
statement = QUOTE(['blue'] call FUNC(tagWall));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa));
};
class ACE_tagGroundBlack {
displayName = CSTRING(tagGroundBlack);
condition = QUOTE('ACE_SpraypaintBlack' in items ACE_player);
statement = QUOTE(['black'] call FUNC(tagGround));
showDisabled = 0;
priority = 3;
icon = QUOTE(PATHTOF(UI\iconTagging.paa));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa));
};
class ACE_tagGroundRed: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundRed);
condition = QUOTE('ACE_SpraypaintRed' in items ACE_player);
statement = QUOTE(['red'] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa));
};
class ACE_tagGroundGreen: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundGreen);
condition = QUOTE('ACE_SpraypaintGreen' in items ACE_player);
statement = QUOTE(['green'] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa));
};
class ACE_tagGroundBlue: ACE_tagGroundBlack {
displayName = CSTRING(tagGroundBlue);
condition = QUOTE('ACE_SpraypaintBlue' in items ACE_player);
statement = QUOTE(['blue'] call FUNC(tagGround));
icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa));
};
};
};
};
class Item_Base_F;
class ACE_Item_Spraypaint: Item_Base_F {
class ACE_Item_SpraypaintBlack: Item_Base_F {
author = "jokoho48";
scope = 2;
scopeCurator = 2;
displayName = CSTRING(spraypaint);
displayName = CSTRING(spraypaintBlack);
vehicleClass = "Items";
class TransportItems {
class ACE_Spraypaint {
name = "ACE_Spraypaint";
count = 1;
};
MACRO_ADDITEM(ACE_SpraypaintBlack,1);
};
};
class ACE_Item_SpraypaintRed: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintRed);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintRed,1);
};
};
class ACE_Item_SpraypaintGreen: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintGreen);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintGreen,1);
};
};
class ACE_Item_SpraypaintBlue: ACE_Item_SpraypaintBlack {
displayName = CSTRING(spraypaintBlue);
class TransportItems {
MACRO_ADDITEM(ACE_SpraypaintBlue,1);
};
};
class Box_NATO_Support_F;
class ACE_Box_Misc: Box_NATO_Support_F {
class TransportItems {
MACRO_ADDITEM(ACE_Spraypaint,5);
MACRO_ADDITEM(ACE_SpraypaintBlack,5);
MACRO_ADDITEM(ACE_SpraypaintRed,5);
MACRO_ADDITEM(ACE_SpraypaintBlue,5);
MACRO_ADDITEM(ACE_SpraypaintGreen,5);
};
};
};

View File

@ -2,15 +2,32 @@ class CfgWeapons {
class ACE_ItemCore;
class InventoryItem_Base_F;
class ACE_Spraypaint : ACE_ItemCore {
class ACE_SpraypaintBlack : ACE_ItemCore {
author = "jokoho48";
displayname = CSTRING(spraypaint);
displayname = CSTRING(spraypaintBlack);
descriptionShort = CSTRING(descSpraypaint);
picture = QUOTE(PATHTOF(UI\itemSpraypaint.paa));
picture = QUOTE(PATHTOF(UI\items\itemSpraypaintBlack.paa));
model = QUOTE(PATHTOF(data\SprayCan.p3d));
scope = 2;
hiddenSelections[] = {"camo"};
hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanBlack_co.paa))};
class ItemInfo: InventoryItem_Base_F {
mass = 10;
};
};
class ACE_SpraypaintRed : ACE_SpraypaintBlack {
displayname = CSTRING(spraypaintRed);
picture = QUOTE(PATHTOF(UI\items\itemSpraypaintRed.paa));
hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanRed_co.paa))};
};
class ACE_SpraypaintGreen : ACE_SpraypaintBlack {
displayname = CSTRING(spraypaintGreen);
picture = QUOTE(PATHTOF(UI\items\itemSpraypaintGreen.paa));
hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanGreen_co.paa))};
};
class ACE_SpraypaintBlue : ACE_SpraypaintBlack {
displayname = CSTRING(spraypaintBlue);
picture = QUOTE(PATHTOF(UI\items\itemSpraypaintBlue.paa));
hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanBlue_co.paa))};
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,8 +2,8 @@
class CfgPatches {
class ADDON {
units[] = {"ACE_tagWall0", "ACE_tagWall1", "ACE_tagWall2", "ACE_tagWall3", "ACE_tagWall4", "ACE_Item_Spraypaint"};
weapons[] = {"ACE_Spraypaint"};
units[] = {"ACE_Item_SpraypaintBlack", "ACE_Item_SpraypaintRed", "ACE_Item_SpraypaintGreen", "ACE_Item_SpraypaintBlue"};
weapons[] = {"ACE_SpraypaintBlack", "ACE_SpraypaintRed", "ACE_SpraypaintGreen", "ACE_SpraypaintBlue"};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_interaction"};
author[] = {"BaerMitUmlaut"};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,20 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
};
class CfgModels {
class Default {
sectionsInherit="";
sections[] = {""};
skeletonName = "";
};
class SprayCan {
sectionsInherit = "";
sections[] = {"camo"};
skeletonName = "";
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,20 +3,25 @@
* Creates a tag on a wall that is within 2m on front of the player.
*
* Arguments:
* None
* 0: The colour of the tag (valid colours are black, red, green and blue) <STRING>
*
* Return Value:
* None
*
* Example:
* [] call ace_tagging_fnc_tagGround
* ["blue"] call ace_tagging_fnc_tagGround
*
* Public: No
*/
#include "script_component.hpp"
private ["_tagPos", "_groundPos", "_vectorDirAndUp"];
private ["_color", "_tagPos", "_groundPos", "_vectorDirAndUp"];
PARAMS_1(_color);
if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith {
["%1 is not a valid tag colour.", _color] call BIS_fnc_error;
};
_tagPos = player modelToWorld [0, 1.2, 0];
_vectorDirAndUp = [];
@ -38,7 +43,8 @@ ACE_player playActionNow "PutDown";
[{
private ["_tag"];
playSound3D [QUOTE(PATHTO_R(sounds\spray.ogg)), ACE_player, false, (getPosASL ACE_player), 10, 1, 15];
_tag = ("ACE_tagWall" + str (floor (random 5))) createVehicle [0,0,0];
_tag = "UserTexture1m_F" createVehicle [0,0,0];
_tag setObjectTextureGlobal [0, '\z\ace\addons\tagging\UI\tags\' + (_this select 2) + '\' + str (floor (random 3)) + '.paa'];
_tag setPosATL (_this select 0);
_tag setVectorDirAndUp (_this select 1);
}, [_tagPos, _vectorDirAndUp], 0.6] call EFUNC(common,waitAndExecute);
}, [_tagPos, _vectorDirAndUp, _color], 0.6] call EFUNC(common,waitAndExecute);

View File

@ -3,20 +3,25 @@
* Creates a tag on a wall that is within 2m on front of the player.
*
* Arguments:
* None
* 0: The colour of the tag (valid colours are black, red, green and blue) <STRING>
*
* Return Value:
* None
*
* Example:
* [] call ace_tagging_fnc_tagWall
* ["blue"] call ace_tagging_fnc_tagWall
*
* Public: No
*/
#include "script_component.hpp"
private ["_eyepos", "_touchingPoints", "_pointCloser", "_pointFurther", "_posCheckCloser", "_posCheckFurther", "_touchingPoint"];
private ["_color", "_eyepos", "_touchingPoints", "_pointCloser", "_pointFurther", "_posCheckCloser", "_posCheckFurther", "_touchingPoint"];
PARAMS_1(_color);
if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith {
["%1 is not a valid tag colour.", _color] call BIS_fnc_error;
};
//Cache eyepos in case player moves
_eyepos = eyePos ACE_player;
@ -61,7 +66,8 @@ ACE_player playActionNow "PutDown";
[{
private ["_tag"];
playSound3D [QUOTE(PATHTO_R(sounds\spray.ogg)), ACE_player, false, (getPosASL ACE_player), 10, 1, 15];
_tag = ("ACE_tagWall" + str (floor (random 5))) createVehicle [0,0,0];
_tag setPosASL (((_this select 0) vectorAdd (_this select 1)) vectorMultiply 0.5);
_tag setDir ((_this call BIS_fnc_dirTo) - 90);
}, _touchingPoints, 0.6] call EFUNC(common,waitAndExecute);
_tag = "UserTexture1m_F" createVehicle [0,0,0];
_tag setObjectTextureGlobal [0, '\z\ace\addons\tagging\UI\tags\' + (_this select 1) + '\' + str (floor (random 3)) + '.paa'];
_tag setPosASL (((_this select 0 select 0) vectorAdd (_this select 0 select 1)) vectorMultiply 0.5);
_tag setDir (((_this select 0) call BIS_fnc_dirTo) - 90);
}, [_touchingPoints, _color], 0.6] call EFUNC(common,waitAndExecute);

View File

@ -1,17 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Tagging">
<Key ID="STR_ACE_tagging_tagWall">
<English>Tag wall</English>
<German>Wand markieren</German>
<Key ID="STR_ACE_tagging_tagWallBlack">
<English>Tag wall black</English>
<German>Wand schwarz markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagGround">
<English>Tag ground</English>
<German>Boden markieren</German>
<Key ID="STR_ACE_tagging_tagWallRed">
<English>Tag wall red</English>
<German>Wand rot markieren</German>
</Key>
<Key ID="STR_ACE_tagging_spraypaint">
<English>Spray paint</English>
<German>Sprühfarbe</German>
<Key ID="STR_ACE_tagging_tagWallGreen">
<English>Tag wall green</English>
<German>Wand grün markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagWallBLue">
<English>Tag wall blue</English>
<German>Wand blau markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagGroundBlack">
<English>Tag ground black</English>
<German>Boden schwarz markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagGroundRed">
<English>Tag ground red</English>
<German>Boden rot markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagGroundGreen">
<English>Tag ground green</English>
<German>Boden grün markieren</German>
</Key>
<Key ID="STR_ACE_tagging_tagGroundBlue">
<English>Tag ground blue</English>
<German>Boden blau markieren</German>
</Key>
<Key ID="STR_ACE_tagging_spraypaintBlack">
<English>Black spray paint</English>
<German>Schwarze Sprühfarbe</German>
</Key>
<Key ID="STR_ACE_tagging_spraypaintRed">
<English>Red spray paint</English>
<German>Rote Sprühfarbe</German>
</Key>
<Key ID="STR_ACE_tagging_spraypaintGreen">
<English>Green spray paint</English>
<German>Grüne Sprühfarbe</German>
</Key>
<Key ID="STR_ACE_tagging_spraypaintBlue">
<English>Blue spray paint</English>
<German>Blaue Sprühfarbe</German>
</Key>
<Key ID="STR_ACE_tagging_descSpraypaint">
<English>A can of spray paint for tagging walls.</English>