From 1e77e0a22be2b1c001a61f937234002a9b1a8f41 Mon Sep 17 00:00:00 2001 From: "DESKTOP-UH65DCE\\MusTanG" Date: Mon, 3 Jul 2017 19:08:04 -0500 Subject: [PATCH] Add reading documents Add configs for easy editing of readable documents messages Array for multiple messages, even a story. lol Default messages are a hoot! --- .../epoch_code/compile/EPOCH_consumeItem.sqf | 11 ++++ .../Configs/CfgItemInteractions.hpp | 2 +- .../Configs/CfgReadingDocuments.hpp | 58 +++++++++++++++++++ Sources/epoch_config/sandbox_config.hpp | 1 + 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 Sources/epoch_config/Configs/CfgReadingDocuments.hpp diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index 4929c44d..d720dd8b 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -308,6 +308,17 @@ switch _interactOption do { ["Unpacked backpack", 5] call Epoch_message; }; }; + + case 15: { // Read + _msg = getArray(missionConfigFile >> "CfgReadingDocuments" >> _item >> "displayMessage"); + if!(_msg isEqualTo [])then{ + { + [_x,5] call Epoch_message; + }forEach _msg; + }else{ + ["This document can't be read yet. Blame DirtySanchez!",5] call Epoch_message; + }; + }; default { ["Found nothing", 5] call Epoch_message; diff --git a/Sources/epoch_config/Configs/CfgItemInteractions.hpp b/Sources/epoch_config/Configs/CfgItemInteractions.hpp index 12f27843..15a02884 100644 --- a/Sources/epoch_config/Configs/CfgItemInteractions.hpp +++ b/Sources/epoch_config/Configs/CfgItemInteractions.hpp @@ -540,7 +540,7 @@ class CfgItemInteractions class ItemKeyYellow : ItemKey {}; class ItemDoc1 : Default { - interactAction = -1; + interactAction = 15; interactText = "READ"; }; class ItemDoc2 : ItemDoc1 {}; diff --git a/Sources/epoch_config/Configs/CfgReadingDocuments.hpp b/Sources/epoch_config/Configs/CfgReadingDocuments.hpp new file mode 100644 index 00000000..d3918b47 --- /dev/null +++ b/Sources/epoch_config/Configs/CfgReadingDocuments.hpp @@ -0,0 +1,58 @@ +/* + @author = "Aaron Clark - https://EpochMod.com"; + @contributors[] = {"DirtySanchez"}; + @description = "Readable Document Message Configs"; + @licence = "Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike"; + @github = ""; +*/ +class CfgReadingDocuments +{ + class ItemVehDoc1 + { + displayMessage[] = {"Max Speed, Terrain Coef, Gears and more were edited","Upgrade your vehicle's Speed and Offroad Performance"}; + }; + class ItemVehDoc2 + { + displayMessage[] = {"Upgrade your vehicle's body, wheels and windows with armor strength"}; + }; + class ItemVehDoc3 + { + displayMessage[] = {"Increase your vehicle's inventory capacity for items, magazines, weapons and more"}; + }; + class ItemVehDoc4 + { + displayMessage[] = {"Increase your fuel capacity for those long hauls across your favorite ISLANDS"}; + }; + class ItemDoc1 + { + displayMessage[] = {"It was a beautiful day on Johnny's block","While Johnny was watching his father take all he could","Daddy's Roommate by Will Michoite"}; + }; + class ItemDoc2 + { + displayMessage[] = {"An elaborate story on a small town kid with big town mommies, I mean tittied.","Heather has TWO Mommies by Leslea Newman and Diana Solza"}; + }; + class ItemDoc3 + { + displayMessage[] = {"Look its todays edition and OH crap you die today, nvm thats O'Tool whom died","Trade City Obituaries by Your Fellow Community Members and AI"}; + }; + class ItemDoc4 + { + displayMessage[] = {"As you open the manilla folder you see pictures of your mom..."}; + }; + class ItemDoc5 + { + displayMessage[] = {"First you have no liquor and then you get slapped by a woman. This is not your day..."}; + }; + class ItemDoc6 + { + displayMessage[] = {"Wooden Ramp for DUMMIES volume 3"}; + }; + class ItemDoc7 + { + displayMessage[] = {"Swap the Deck, a seductive tale so bad the author couldnt put his name on it!"}; + }; + class ItemDoc8 + { + displayMessage[] = {"'He Touch Me, He Touch Me NOT is Back' raves Cherno Shmerno!","#1 Bestseller throughout Arma 2 DayZ Epoch"}; + }; +}; \ No newline at end of file diff --git a/Sources/epoch_config/sandbox_config.hpp b/Sources/epoch_config/sandbox_config.hpp index 53e5acca..40ca4e61 100644 --- a/Sources/epoch_config/sandbox_config.hpp +++ b/Sources/epoch_config/sandbox_config.hpp @@ -75,6 +75,7 @@ disableRandomization[] = {"All"}; #include "Configs\CfgSay3Dhandler.hpp" #include "Configs\CfgSwitchMovehandler.hpp" #include "Configs\CfgVehicleUpgrades.hpp" +#include "Configs\CfgReadingDocuments.hpp" // A3 specific configs #include "Configs\CfgFunctions.hpp"