Skip to content

Commit

Permalink
Rewrite (#1)
Browse files Browse the repository at this point in the history
* init

* Create README.md

* Update README.md

* Update README.md

* Update README.md

* move compats to ME

* im not losing this again

* really not forgetting this time

* Update fnc_unitProcess.sqf

* lets not lose modules again

* make meds IV

* Move hose handling to core

* Update fnc_unitProcess.sqf

Rebalance

* Update README.md

* postinit completed local event

* Update fnc_unitProcess.sqf

change default

* Update XEH_PostInit.sqf

* 1.0.0.0
  • Loading branch information
SpicyBagpipes authored Feb 19, 2024
1 parent 2864164 commit 6c71ca1
Show file tree
Hide file tree
Showing 79 changed files with 1,432 additions and 1,445 deletions.
1 change: 1 addition & 0 deletions $PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
y\KJW_Radiate
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.vscode/*
.hemttout/*
hemtt.exe
releases/*
15 changes: 15 additions & 0 deletions .hemtt/project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name = "KJW's Radiate"
prefix = "KJW_Radiate"
author = "KJW"
mainprefix = "y"

[files]
include = [
"mod.cpp",
"*.paa"
]

[version]
git_hash = 0 # Disabled

path = "addons/core/script_version.hpp" # Default
20 changes: 20 additions & 0 deletions .hemtt/scripts/bump_build.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.open_file()
.read();

// Replace the current version with the new version
let prefix = "#define BUILD ";
let current = HEMTT.project().version().build();
let next = current + 1;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());

// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.create_file()
.write(script_version);
20 changes: 20 additions & 0 deletions .hemtt/scripts/bump_major.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.open_file()
.read();

// Replace the current version with the new version
let prefix = "#define MAJOR ";
let current = HEMTT.project().version().major();
let next = current + 1;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());

// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.create_file()
.write(script_version);
20 changes: 20 additions & 0 deletions .hemtt/scripts/bump_minor.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.open_file()
.read();

// Replace the current version with the new version
let prefix = "#define MINOR ";
let current = HEMTT.project().version().minor();
let next = current + 1;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());

// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.create_file()
.write(script_version);
20 changes: 20 additions & 0 deletions .hemtt/scripts/bump_patch.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.open_file()
.read();

// Replace the current version with the new version
let prefix = "#define PATCH ";
let current = HEMTT.project().version().patch();
let next = current + 1;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());

// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.create_file()
.write(script_version);
20 changes: 20 additions & 0 deletions .hemtt/scripts/clear_patch.rhai
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Read the current contents of script_version.hpp
let script_version = HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.open_file()
.read();

// Replace the current version with the new version
let prefix = "#define PATCH ";
let current = HEMTT.project().version().patch();
let next = 0;

script_version.replace(prefix + current.to_string(), prefix + next.to_string());

// Write the modified contents to script_version.hpp
HEMTT_RFS.join("addons")
.join("core")
.join("script_version.hpp")
.create_file()
.write(script_version);
20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
# KJW_Radiate
A modification for Arma 3 that adds high-fidelity Radiological threats to the game, configurable by mission makers.
# KJW's Medical Expansion: Radiate

Steam Workshop: https://steamcommunity.com/sharedfiles/filedetails/?id=2917867026
Radiate is a part of [KJW's Medical Expansion](https://github.com/SpicyBagpipes/KJW_MedicalExpansion) set of mods which aim to expand on the existing ACE medical system for Arma 3 with interesting new threats.

Wiki: https://kjws-arma-enhancements.gitbook.io/kjws-radiate/

## Features
- Expands on base game Contact DLC and other CBRN equipment. Adds only one new item, the Geiger Counter.
- Configurable radiation properties.
- Allows for mission makers to make Alpha, Beta or Gamma radiation more or less damaging, penetrating and so on.
- PPE and PPE for your friends.
- Allows for players to put gas masks on themselves and their friends should they have passed out before the threat was prevalent.
- Irradiation, Decontamination, Background Radiation and more.
Specifically, Radiate implements high-fidelity and high-versatility radiological threats, with an aim on providing the player with a wide range of radiological capabilities that they can add to their missions when they desire, with the exact level of difficulty that suits the players they are making the mission for. The highlights of this mod are:
- Highly configurable radiological threats, with the capability for players to add their own radiation types.
- Decontamination from radioactive dust.
- High-fidelity PPE with a wide range of options for difficulty.
- Accurate radiation poisoning symptoms and effects (as accurate as you can make it in Arma, anyway).
- Medications to treat radiation poisoning.
1 change: 1 addition & 0 deletions addons/core/$PBOPREFIX$
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
y\KJW_Radiate\addons\core
54 changes: 54 additions & 0 deletions addons/core/Cfg3den.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
class Cfg3den {
class Object {
class AttributeCategories {
class KJW_Radiate {
displayName = "KJW's Radiate";
collapsed = 1;
class Attributes {
class KJW_Radiate_Core_radiationSource {
displayName = "Is Radiation Source";
toolTip = "Is the object a source of radiation?";
property = "KJW_Radiate_Core_radiationSource";
control = "Checkbox";
defaultValue = "false";
expression = "_this setVariable ['%s',_value, true];";
};
class KJW_Radiate_Core_RadiationType {
displayName = "Radiation Type";
toolTip = "What type of radiation is the object? (Alpha, Beta, Gamma)";
property = "KJW_Radiate_Core_RadiationType";
control = "Combo";
defaultValue = "''";
expression = "_this setVariable ['%s',_value, true];";
class Values {
class Alpha {
name = "Alpha";
tooltip = "Low penetrating power, but highly ionising and more damaging to biological tissue.";
value = "alpha";
};
class Beta {
name = "Beta";
tooltip = "Medium penetrating power with medium ionising power. Can be damaging to biological tissue.";
value = "beta";
};
class Gamma {
name = "Gamma";
tooltip = "High penetrating power, not very ionising. Rarely damaging to biological tissue.";
value = "gamma";
};
};
};
class KJW_Radiate_Core_countRate {
displayName = "Activity of object";
toolTip = "Measured in counts per minute.";
property = "KJW_Radiate_Core_countRate";
control = "EditShort";
defaultValue = "'0'";
expression = "_this setVariable ['%s',_value, true];";
validate = "number";
};
};
};
};
};
};
8 changes: 8 additions & 0 deletions addons/core/CfgSounds.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class CfgSounds {
sounds[]={};
class KJW_Geiger_Click {
name = "Geiger Click";
sound[] = {QPATHTOF(data\sfx\geiger_click.wss),1,1};
titles[] = {0,""};
};
};
49 changes: 49 additions & 0 deletions addons/core/CfgVehicles.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
class CfgVehicles {
class B_W_Soldier_F;
class B_W_Soldier_CBRN_F : B_W_Soldier_F {
linkedItems[] = {"V_PlateCarrier1_wdl","H_HelmetB_plain_wdl","G_AirPurifyingRespirator_01_F","ItemMap","ItemCompass","KJW_Radiate_GeigerCounter","ItemRadio","NVGoggles_INDEP"};
};

class DeconShower_02_base_F;
class DeconShower_02_F : DeconShower_02_base_F {
class UserActions {
class Activate {
actionNamedSel = "ControlBox_Action";
condition = "alive this AND {!(this getVariable ['bin_deconshower_disableAction',false])} AND {this animationSourcePhase 'valve_source' isEqualTo 0}";
displayName = "Activate shower";
displayNameDefault = "Activate shower";
onlyForPlayer = 1;
position = "";
radius = 1.7;
statement = "player playActionNow 'PutDown';[this,5.4,4,2,true] spawn bin_fnc_deconShowerAnimLarge; private _zone = this getVariable ['KJW_Radiate_Core_deconZone',objNull]; _zone setVariable ['KJW_Radiate_Core_turnedOn', true];";
};
class Deactivate : Activate {
condition = "alive this AND {!(this getVariable ['bin_deconshower_disableAction',false])} AND {this animationSourcePhase 'valve_source' > 0}";
displayName = "Deactivate shower";
displayNameDefault = "Deactivate shower";
statement = "player playActionNow 'PutDown';[this] call bin_fnc_deconShowerAnimStop; private _zone = this getVariable ['KJW_Radiate_Core_deconZone',objNull]; _zone setVariable ['KJW_Radiate_Core_turnedOn', false];";
};
};
};
class DeconShower_01_base_F;
class DeconShower_01_F : DeconShower_01_base_F {
class UserActions {
class Activate {
actionNamedSel = "ControlBox_Action";
condition = "alive this AND {!(this getVariable ['bin_deconshower_disableAction',false])} AND {this animationSourcePhase 'valve_source' isEqualTo 0}";
displayName = "Activate shower";
displayNameDefault = "Activate shower";
onlyForPlayer = 1;
position = "";
radius = 1.7;
statement = "player playActionNow 'PutDown';[this,1.5,9] spawn bin_fnc_deconShowerAnim; private _zone = this getVariable ['KJW_Radiate_Core_deconZone',objNull]; _zone setVariable ['KJW_Radiate_Core_turnedOn', true];";
};
class Deactivate : Activate {
condition = "alive this AND {!(this getVariable ['bin_deconshower_disableAction',false])} AND {this animationSourcePhase 'valve_source' > 0}";
displayName = "Deactivate shower";
displayNameDefault = "Deactivate shower";
statement = "player playActionNow 'PutDown';[this] call bin_fnc_deconShowerAnimStop; private _zone = this getVariable ['KJW_Radiate_Core_deconZone',objNull]; _zone setVariable ['KJW_Radiate_Core_turnedOn', false];";
};
};
};
};
17 changes: 17 additions & 0 deletions addons/core/CfgWeapons.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class CfgWeapons {
class ItemWatch;
class KJW_Radiate_GeigerCounter : ItemWatch {
ACE_hideItemType = "Watch";
author = "KJW";
descriptionShort = "A Geiger Counter used for displaying radiation counts per second.";
displayName = "Geiger Counter";
picture = QPATHTOF(data\tx\geigercounter_ca.paa);
};
class ACE_morphine;
class KJW_Radiate_EDTA : ACE_morphine {
displayName = "EDTA";
};
class KJW_Radiate_EACA : ACE_morphine {
displayName = "EACA";
};
};
35 changes: 17 additions & 18 deletions RscTitles.hpp → addons/core/RscTitles.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
class RscText;
class RscPicture;
class RscTitles {
class KJW_Radiate_Counter {
class Default {
idd = -1;
fadein = 0;
fadeout = 0;
duration = 0;
};
class GVAR(counter) {
idd = 4948;
enableSimulation = 1;
movingEnable = 0;
Expand All @@ -12,32 +18,25 @@ class RscTitles {
class controls {
class CounterImage : RscPicture {
idc = 4949;
text = "KJW_Radiate\data\counterunlit.paa";
x = 0.118437 * safezoneW + safezoneX;
y = 0.471 * safezoneH + safezoneY;
w = 0.20625 * safezoneW;
h = 0.51 * safezoneH;
text = QPATHTOF(data\tx\geigercounter_ca.paa);
x = QUOTE(0.118437 * safezoneW + safezoneX);
y = QUOTE(0.471 * safezoneH + safezoneY);
w = QUOTE(0.20625 * safezoneW);
h = QUOTE(0.51 * safezoneH);
};
class CounterText: RscText {
idc = 1244;
text = "00000";
x = 0.160937 * safezoneW + safezoneX;
y = 0.560 * safezoneH + safezoneY;
w = 0.125 * safezoneW;
h = 0.063 * safezoneH;
sizeEx = 0.078 * safezoneH;
x = QUOTE(0.160937 * safezoneW + safezoneX);
y = QUOTE(0.560 * safezoneH + safezoneY);
w = QUOTE(0.125 * safezoneW);
h = QUOTE(0.063 * safezoneH);
sizeEx = QUOTE(0.078 * safezoneH);
shadow = 0;
font = "LCD14";
colorBackground[] = {0,0,0,0};
colorText[] = {0,0,0,1};
};
};
};
class Default
{
idd = -1;
fadein = 0;
fadeout = 0;
duration = 0;
};
};
29 changes: 29 additions & 0 deletions addons/core/XEH_PREP.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "script_component.hpp"
/*
* Author: KJW
*
* Handles function prep for the addon
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call KJW_Radiate_Core_XEH_PREP
*
* Public: No
*/

PREP(addEventHandlers)
PREP(addSettings)
PREP(addKeybinds)
PREP(addSource)
PREP(createDustZone)
PREP(unitProcess)
PREP(handleGeigerUI)
PREP(resetVariables)
PREP(initDeconShower)
PREP(deleteSource)
PREP(module_registerModules)
Loading

0 comments on commit 6c71ca1

Please sign in to comment.