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

Handle old public funcs, fix strings #6890

Merged
merged 2 commits into from
Mar 25, 2019
Merged
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
1 change: 1 addition & 0 deletions addons/medical/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
PREP(addDamageToUnit);
PREP(adjustPainLevel);
PREP(setUnconscious);
6 changes: 6 additions & 0 deletions addons/medical/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ PREP_RECOMPILE_END;

#include "initSettings.sqf"

// Add warning for old functions that were technically public, Remove at 3.14.0
{
missionNamespace setVariable [_x, compileFinal format ['diag_log text "ACE Medical WARNING: Formerly public function [%1] has no effect in medical rewrite."; nil', _x]];
} forEach ["ace_medical_fnc_actionPlaceInBodyBag","ace_medical_fnc_actionRemoveTourniquet","ace_medical_fnc_addHeartRateAdjustment","ace_medical_fnc_addToLog","ace_medical_fnc_addToTriageCard
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All on same line or one line per function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

word wrap should be fine 😄
most of these functions really don't make sense to be called externally,
but I thought it was better to be safe

","ace_medical_fnc_addUnconsciousCondition","ace_medical_fnc_addVitalLoop","ace_medical_fnc_canAccessMedicalEquipment","ace_medical_fnc_canTreat","ace_medical_fnc_displayTriageCard","ace_medical_fnc_dropDownTriageCard","ace_medical_fnc_getTriageStatus","ace_medical_fnc_getUnconsciousCondition","ace_medical_fnc_hasItem","ace_medical_fnc_hasItems","ace_medical_fnc_hasTourniquetAppliedTo","ace_medical_fnc_isInMedicalFacility","ace_medical_fnc_isInMedicalVehicle","ace_medical_fnc_isMedic","ace_medical_fnc_isMedicalVehicle","ace_medical_fnc_itemCheck","ace_medical_fnc_selectionNameToNumber","ace_medical_fnc_setCardiacArrest","ace_medical_fnc_setDead","ace_medical_fnc_setHitPointDamage","ace_medical_fnc_showBloodEffect","ace_medical_fnc_treatment","ace_medical_fnc_treatmentAdvanced_bandage","ace_medical_fnc_treatmentAdvanced_CPR","ace_medical_fnc_treatmentAdvanced_CPRLocal","ace_medical_fnc_treatmentAdvanced_medication","ace_medical_fnc_treatmentAdvanced_medicationLocal","ace_medical_fnc_treatmentIV","ace_medical_fnc_treatmentIVLocal","ace_medical_fnc_unconsciousPFH","ace_medical_fnc_useItem","ace_medical_fnc_useItems"];

ADDON = true;
27 changes: 27 additions & 0 deletions addons/medical/functions/fnc_adjustPainLevel.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "script_component.hpp"
/*
* Author: PabstMirror
* Public interface to allow external modules to safely adjust pain levels.
*
* Arguments:
* 0: The patient <OBJECT>
* 1: Added ammount of pain (can be negative) <NUMBER>
*
* Return Value:
* The new pain level <NUMBER>
*
* Example:
* [guy, 0.5] call ace_medical_fnc_adjustPainLevel
*
* Public: Yes
*/

params ["_unit", "_addedPain"];

if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit); };

private _pain = GET_PAIN(_unit);

_pain = 0 max (_pain + _addedPain) min 1;

_unit setVariable [VAR_PAIN, _pain];
2 changes: 1 addition & 1 deletion addons/medical/functions/fnc_setUnconscious.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (_knockOut) then {
// If unit still has stable vitals at min waiting time, then force wake up
[{
params [["_unit", objNull]];
if ((alive _unit) && {_unit call FUNC(hasStableVitals)}) then {
if ((alive _unit) && {_unit call EFUNC(medical_status,hasStableVitals)}) then {
TRACE_1("Doing delay wakeup",_unit);
[QGVAR(WakeUp), _unit] call CBA_fnc_localEvent;
} else {
Expand Down
175 changes: 0 additions & 175 deletions addons/medical/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -335,166 +335,6 @@
<Chinesesimp>在哪里可以使用肾上腺素? (基本医疗)</Chinesesimp>
<Chinese>在哪裡可以使用腎上腺素? (基本醫療)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useLocation_PAK_Description">
<English>Where can the PAK be used?</English>
<Russian>Где может использоваться аптечка?</Russian>
<Polish>Gdzie można korzystać z apteczek osobistych?</Polish>
<Spanish>¿Dónde se puede utilizar el equipo de primeros auxilios?</Spanish>
<German>Wo kann das Erste-Hilfe-Set verwendet werden?</German>
<Czech>Kde může být použita osobní lékárnička (PAK)?</Czech>
<Portuguese>Onde o kit de primeiros socorros pode ser utilizado?</Portuguese>
<French>Où la trousse sanitaire peut être utilisée ?</French>
<Hungarian>Hol lehet az elsősegélycsomagot használni?</Hungarian>
<Italian>Dove può essere usato il Kit Pronto Soccorso?</Italian>
<Japanese>どこでも応急処置キットを使えるようにしますか?</Japanese>
<Korean>어디에서 개인응급키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>在哪里可以使用个人急救包?</Chinesesimp>
<Chinese>在哪裡可以使用個人急救包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useCondition_PAK_DisplayName">
<English>Condition PAK</English>
<German>Bedingungen für d. Erste-Hilfe-Set</German>
<Czech>Podmínky pro použití osobní lékárničky</Czech>
<Spanish>Condición EPA</Spanish>
<French>Condition d'utilisation de la trousse sanitaire</French>
<Polish>Warunek apteczek</Polish>
<Hungarian>Elsősegélycsomag állapot</Hungarian>
<Portuguese>Condição do KPS</Portuguese>
<Russian>Условие использования аптечки</Russian>
<Italian>Condizioni Kit Pronto Soccorso</Italian>
<Japanese>応急処置キットの状態</Japanese>
<Korean>개인응급키트 상태</Korean>
<Chinesesimp>个人急救包使用条件</Chinesesimp>
<Chinese>個人急救包使用條件</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useCondition_PAK_Description">
<English>When can the PAK be used?</English>
<German>Wann kann das Erste-Hilfe-Set verwendet werden?</German>
<Czech>Kdy může být použita osobní lékárnička?</Czech>
<Spanish>¿Cuando se puede utilizar el Equipo de primeros auxilios?</Spanish>
<French>Quand peut être utilisé la trousse sanitaire?</French>
<Polish>Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie?</Polish>
<Hungarian>Mikor lehet az elsősegélycsomagot használni?</Hungarian>
<Portuguese>Onde o kit de primeiros socorros pode ser utilizado?</Portuguese>
<Russian>Когда может использоваться аптечка?</Russian>
<Italian>Quando può essere usato il Kit Pronto Soccorso?</Italian>
<Japanese>どこでも応急処置キットを使えるようにしますか?</Japanese>
<Korean>언제 개인응급키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>何时可以使用个人急救包?</Chinesesimp>
<Chinese>何時可以使用個人急救包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_medicSetting_SurgicalKit_DisplayName">
<English>Allow Surgical Kit (Adv)</English>
<Russian>Хирургический набор может использоваться (усл.)</Russian>
<Polish>Ustawienia zestawu chirurgicznego</Polish>
<Spanish>Permitir equipo quirúrgico (Avanzado)</Spanish>
<German>Erlaube Operationskasten</German>
<Czech>Povolit chirurgickou soupravu (Pokr.)</Czech>
<Portuguese>Permite kit cirúrgico (avançado)</Portuguese>
<French>Permettre les trousses chirurgicales (Avancé)</French>
<Hungarian>Sebészkészlet (Fejlett) engedélyezése</Hungarian>
<Italian>Permetti Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットの許可 (アド)</Japanese>
<Korean>봉합키트 활성화 (고급)</Korean>
<Chinesesimp>允许使用手术包 (进阶伤口)</Chinesesimp>
<Chinese>允許使用手術包 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_medicSetting_SurgicalKit_Description">
<English>Who can use the Surgical Kit?</English>
<Russian>Кто может использовать хирургический набор?</Russian>
<Polish>Kto może skorzystać z zestawu chirurgicznego w celu zszycia ran?</Polish>
<Spanish>¿Quién puede utilizar el equipo quirúrgico?</Spanish>
<German>Wer kann den Operationskasten verwenden?</German>
<Czech>Kdo může použít chirurgickou soupravu?</Czech>
<Portuguese>Quem pode usar o kit cirúrgico?</Portuguese>
<French>Qui peut utiliser les trousses chirurgicales?</French>
<Hungarian>Ki használhatja a sebészkészletet?</Hungarian>
<Italian>Chi può usare il Kit Chirurgico?</Italian>
<Japanese>だれでも縫合キットを使えるようにしますか?</Japanese>
<Korean>어느 인원이 봉합키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>谁能够使用手术包?</Chinesesimp>
<Chinese>誰能夠使用手術包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_consumeItem_SurgicalKit_Description">
<English>Should Surgical kit be removed on usage?</English>
<Russian>Нужно ли удалять хирургический набор после использования?</Russian>
<Polish>Czy zestaw chirurgiczny powinien zniknąć z ekwipunku po jego użyciu?</Polish>
<Spanish>Eliminar el equipo quirúrgico después del uso</Spanish>
<German>Entferne Operationskästen bei Verwendung?</German>
<Czech>Odebrat chirurgickou soupravu po použití?</Czech>
<Portuguese>Deve o kit cirúrgico ser removido após o uso?</Portuguese>
<French>La trousse chirurgicale doit être consommée à l'utilisation?</French>
<Hungarian>Eltávolítódjon a sebészkészlet használatkor?</Hungarian>
<Italian>Il Kit Chirurgico dev'essere rimosso dopo l'uso?</Italian>
<Japanese>縫合キットを使った後に削除しますか?</Japanese>
<Korean>봉합키트를 사용하고 나서 제거합니까?</Korean>
<Chinesesimp>手术包会在使用后被删除吗?</Chinesesimp>
<Chinese>手術包會在使用後被刪除嗎?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useLocation_SurgicalKit_DisplayName">
<English>Locations Surgical Kit (Adv)</English>
<Russian>Место использования хирургического набора (усл.)</Russian>
<Polish>Ograniczenie zestawu chirurgicznego</Polish>
<Spanish>Ubicaciones del equipo quirúrgico (Avanzado)</Spanish>
<German>Orte für Operationskästen (erweitert)</German>
<Czech>Lokace chirurgické soupravy (Pokr.)</Czech>
<Portuguese>Localizações do kit cirúrgico (avançado)</Portuguese>
<French>Lieu d'utilisation des trousses chirurgicales</French>
<Hungarian>Sebészkészlet (Fejlett) helyei</Hungarian>
<Italian>Località Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットをつかう場所 (アド)</Japanese>
<Korean>봉합키트 사용 장소 (고급)</Korean>
<Chinesesimp>手术包使用地点 (进阶伤口)</Chinesesimp>
<Chinese>手術包使用地點 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useLocation_SurgicalKit_Description">
<English>Where can the Surgical Kit be used?</English>
<Russian>Где может использоваться хирургический набор?</Russian>
<Polish>Gdzie można korzystać z zestawu chirurgicznego?</Polish>
<Spanish>Dónde se puede utilizar el equipo quirúrgico</Spanish>
<German>Wo kann der Operationskasten verwendet werden?</German>
<Czech>Kde může být použita chirurgická souprava?</Czech>
<Portuguese>Onde o kit cirúrgico pode ser utilizado?</Portuguese>
<French>Où peut être utilisé les trousses chirurgicales?</French>
<Hungarian>Hol lehet a sebészkészletet használni?</Hungarian>
<Italian>Dove può essere usato il Kit Chirurgico?</Italian>
<Japanese>どこでも縫合キットを使えるようにしますか?</Japanese>
<Korean>어디에서 봉합키트를 사용할 수 있게 합니까?</Korean>
<Chinesesimp>定义手术包可被使用的地方?</Chinesesimp>
<Chinese>定義手術包可被使用的地方?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useCondition_SurgicalKit_DisplayName">
<English>Condition Surgical Kit (Adv)</English>
<German>Beding. für d. Operationskasten (erw.)</German>
<Czech>Podmínka chirurgické soupravy (Pokr.)</Czech>
<Spanish>Condición de equipo quirúrgico (Av)</Spanish>
<French>Conditions d'utilisation de la trousse chirurgicale (Av.)</French>
<Polish>Warunek zestawu chirurgicznego</Polish>
<Hungarian>Sebészkészlet állapot</Hungarian>
<Portuguese>Condição do Kit Cirúrgico (Avançado)</Portuguese>
<Russian>Условие использования хирургического набора (усл.)</Russian>
<Italian>Condizioni Kit Chirurgico (Avanzato)</Italian>
<Japanese>縫合キットの状態 (アド)</Japanese>
<Korean>봉합키트 상태 (고급)</Korean>
<Chinesesimp>使用手术包的条件 (进阶伤口)</Chinesesimp>
<Chinese>使用手術包的條件 (進階傷口)</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_useCondition_SurgicalKit_Description">
<English>When can the Surgical Kit be used?</English>
<German>Wann kann der Operationskasten verwendet werden?</German>
<Czech>Kde může být použita chirurgická souprava?</Czech>
<Spanish>¿Cuando se puede utilizar el equipo quirúrgico?</Spanish>
<French>Quand peut être utilisé la trousse chirurgicale</French>
<Polish>Po spełnieniu jakich warunków zestaw chirurgiczny może zostać zastosowany na pacjencie?</Polish>
<Hungarian>Mikor lehet a sebészkészletet használni?</Hungarian>
<Portuguese>Onde o kit cirúrgico pode ser utilizado?</Portuguese>
<Russian>Когда может использоваться хирургический набор?</Russian>
<Italian>Quando può essere usato il Kit Chirurgico?</Italian>
<Japanese>いつでも縫合キットを使えるようにしますか?</Japanese>
<Korean>언제 봉합키트를 사용할 수 있습니까?</Korean>
<Chinesesimp>何时可以使用手术工具包?</Chinesesimp>
<Chinese>何時可以使用手術工具包?</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_healHitPointAfterAdvBandage_DisplayName">
<English>Heal hitpoints</English>
<German>Heile Trefferpunkte</German>
Expand Down Expand Up @@ -615,21 +455,6 @@
<Chinesesimp>此人(%1)是清醒且不能被装载</Chinesesimp>
<Chinese>此人(%1)是清醒且不能被裝載</Chinese>
</Key>
<Key ID="STR_ACE_Medical_noTourniquetOnBodyPart">
<English>There is no tourniquet on this body part!</English>
<German>An diesem Körperteil befindet sich kein Tourniquet!</German>
<Polish>Na tej części ciała nie ma stazy!</Polish>
<Spanish>No hay torniquete en esta parte del cuerpo!</Spanish>
<Russian>Нет жгута на этой части тела!</Russian>
<Portuguese>Não existe nenhum torniquete nesta parte do corpo!</Portuguese>
<Czech>Žádné škrtidlo na této části těla!</Czech>
<Italian>Non c'è nessun laccio emostatico su questa parte del corpo!</Italian>
<French>Il n'y a pas de garrot sur ce membre !</French>
<Japanese>身体には止血帯が無い!</Japanese>
<Korean>이 부위에는 지혈대가 없습니다!</Korean>
<Chinesesimp>这部位没有止血带!</Chinesesimp>
<Chinese>這部位沒有止血帶!</Chinese>
</Key>
<Key ID="STR_ACE_Medical_MedicalSettings_spontaneousWakeUpChance_DisplayName">
<English>Unconscious Wake Up Chance</English>
</Key>
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_feedback/ACE_Settings.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class ACE_Settings {
// Not currently used anywhere
class GVAR(enableScreams) {
category = CSTRING(Category_Medical);
category = ECSTRING(medical,Category_Medical);
displayName = CSTRING(enableScreams_DisplayName);
description = CSTRING(enableScreams_Description);
typeName = "BOOL";
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_gui/InteractionBodyParts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ACE_Torso {
modifierFunction = QUOTE([ARR_3(_target,1,_this select 3)] call FUNC(modifyAction));
runOnHover = 1;
class TriageCard {
displayName = ECSTRING(medical_treatment,Actions_TriageCard);
displayName = CSTRING(Actions_TriageCard);
exceptions[] = {"isNotInside", "isNotSitting"};
condition = "true";
statement = QUOTE(_target call FUNC(displayTriageCard));
Expand Down
2 changes: 1 addition & 1 deletion addons/medical_gui/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class GVAR(RscTriageCard) {
class Title: RscText {
idc = -1;
style = ST_CENTER;
text = ECSTRING(medical_treatment,Actions_TriageCard);
text = CSTRING(Actions_TriageCard);
x = POS_X(12.5);
y = POS_Y(3);
w = POS_W(15);
Expand Down
16 changes: 16 additions & 0 deletions addons/medical_gui/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -833,5 +833,21 @@
<Chinesesimp>鼻咽管</Chinesesimp>
<Chinese>鼻咽管</Chinese>
</Key>
<Key ID="STR_ACE_Medical_GUI_Actions_TriageCard">
<English>Triage Card</English>
<German>Triagekarte</German>
<Spanish>Tarjeta de clasificación</Spanish>
<Russian>Медкарта</Russian>
<Polish>Karta segregacyjna</Polish>
<Czech>Štítek</Czech>
<French>Fiche de triage</French>
<Hungarian>Orvosi lap</Hungarian>
<Italian>Triage Card</Italian>
<Portuguese>Cartão de Triagem</Portuguese>
<Japanese>トリアージ カード</Japanese>
<Korean>부상자 분류 카드</Korean>
<Chinesesimp>检伤分类卡</Chinesesimp>
<Chinese>檢傷分類卡</Chinese>
</Key>
</Package>
</Project>
Loading