Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
24 changes: 24 additions & 0 deletions addons/aceWakeup/config.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#include "script_component.hpp"

class CfgFunctions {
class overwrite_ace_medical_status {
tag = "ace_medical_status";
class ace_medical_status {
class hasStableVitals {
file = "\potato_ace_wakeup\functions\fnc_hasStableVitals.sqf";
};
};
};
};

class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = { "potato_core", "ace_medical" };\
author = "Potato";
authorUrl = "https://github.com/BourbonWarfare/POTATO";
VERSION_CONFIG;
};
};
18 changes: 18 additions & 0 deletions addons/aceWakeup/functions/fnc_hasStableVitals.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include "\z\ace\addons\medical_engine\script_macros_medical.hpp"
#include "\z\ace\addons\medical_engine\script_macros_config.hpp"
#include "\z\ace\addons\main\script_mod.hpp"
#include "\z\ace\addons\main\script_macros.hpp"

params ["_unit"];

if (GET_BLOOD_VOLUME(_unit) > BLOOD_VOLUME_CLASS_2_HEMORRHAGE) exitwith {true};

if ((GET_BLOOD_VOLUME(_unit) <= BLOOD_VOLUME_CLASS_2_HEMORRHAGE) && {random 3 < 1}) exitwith {true};

if ((GET_BLOOD_VOLUME(_unit) <= BLOOD_VOLUME_CLASS_4_HEMORRHAGE) && {random 6 < 1}) exitwith {true}; // Maybe up to 5?

// The below code is intended to add a mechanic wherein if players are not stable but woke up, they have a %chance to go back uncon so as to simulate a fade-in fade-out mechanic

// if ((GET_BLOOD_VOLUME(_unit) <= BLOOD_VOLUME_CLASS_2_HEMORRHAGE) && {random 2 < 1} && (IS_UNCONSCIOUS(_unit) == true)) exitwith {false};

// if ((GET_BLOOD_VOLUME(_unit) <= BLOOD_VOLUME_CLASS_4_HEMORRHAGE) && {random 2 < 1} && (IS_UNCONSCIOUS(_unit) == true)) exitwith {false};