Skip to content

Commit 20d8db9

Browse files
authored
[Reviewed] [Health] Fix the compatibility with old versions of the extension (#779)
1 parent 53db662 commit 20d8db9

File tree

1 file changed

+61
-14
lines changed

1 file changed

+61
-14
lines changed

extensions/reviewed/Health.json

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "Health",
99
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/heart-half-full.svg",
1010
"shortDescription": "Manage health points and damage, including a protective shield and armor.",
11-
"version": "0.1.0",
11+
"version": "0.2.0",
1212
"description": [
1313
"Manage health points including a protective shield and armor. Health can be assigned to players, enemies, NPCs, or even inanimate objects such as breaking doors and mining rocks.",
1414
"",
@@ -1205,7 +1205,7 @@
12051205
"fullName": "Change health points",
12061206
"functionType": "Action",
12071207
"group": "Health configuration",
1208-
"name": "SetCurrentHealth",
1208+
"name": "SetHealth",
12091209
"sentence": "Change the health of _PARAM0_ to _PARAM2_ points",
12101210
"events": [
12111211
{
@@ -1288,6 +1288,53 @@
12881288
],
12891289
"objectGroups": []
12901290
},
1291+
{
1292+
"description": "Change the health points of the object. Will not trigger damage cooldown.",
1293+
"fullName": "Change health points (deprecated)",
1294+
"functionType": "Action",
1295+
"group": "Health configuration",
1296+
"name": "SetCurrentHealth",
1297+
"private": true,
1298+
"sentence": "Change the health of _PARAM0_ to _PARAM2_ points",
1299+
"events": [
1300+
{
1301+
"type": "BuiltinCommonInstructions::Standard",
1302+
"conditions": [],
1303+
"actions": [
1304+
{
1305+
"type": {
1306+
"value": "Health::Health::SetHealth"
1307+
},
1308+
"parameters": [
1309+
"Object",
1310+
"Behavior",
1311+
"GetArgumentAsNumber(\"Value\")",
1312+
""
1313+
]
1314+
}
1315+
]
1316+
}
1317+
],
1318+
"parameters": [
1319+
{
1320+
"description": "Object",
1321+
"name": "Object",
1322+
"type": "object"
1323+
},
1324+
{
1325+
"description": "Behavior",
1326+
"name": "Behavior",
1327+
"supplementaryInformation": "Health::Health",
1328+
"type": "behavior"
1329+
},
1330+
{
1331+
"description": "New health value",
1332+
"name": "Value",
1333+
"type": "expression"
1334+
}
1335+
],
1336+
"objectGroups": []
1337+
},
12911338
{
12921339
"description": "Heal the object by increasing its health points.",
12931340
"fullName": "Heal object",
@@ -2488,12 +2535,12 @@
24882535
"objectGroups": []
24892536
},
24902537
{
2491-
"description": "Maximum health points of the object.",
2538+
"description": "maximum health points of the object.",
24922539
"fullName": "Maximum health points",
2493-
"functionType": "Expression",
2540+
"functionType": "ExpressionAndCondition",
24942541
"group": "Health",
24952542
"name": "MaxHealth",
2496-
"sentence": "",
2543+
"sentence": "maximum health points",
24972544
"events": [
24982545
{
24992546
"type": "BuiltinCommonInstructions::Standard",
@@ -2570,12 +2617,12 @@
25702617
"objectGroups": []
25712618
},
25722619
{
2573-
"description": "Current health points of the object.",
2620+
"description": "current health points of the object.",
25742621
"fullName": "Health points",
2575-
"functionType": "Expression",
2622+
"functionType": "ExpressionAndCondition",
25762623
"group": "Health",
25772624
"name": "Health",
2578-
"sentence": "",
2625+
"sentence": "health points",
25792626
"events": [
25802627
{
25812628
"type": "BuiltinCommonInstructions::Standard",
@@ -3726,12 +3773,12 @@
37263773
"objectGroups": []
37273774
},
37283775
{
3729-
"description": "Maximum shield points of the object.",
3776+
"description": "maximum shield points of the object.",
37303777
"fullName": "Maximum shield points",
3731-
"functionType": "Expression",
3778+
"functionType": "ExpressionAndCondition",
37323779
"group": "Shield",
37333780
"name": "MaxShield",
3734-
"sentence": "",
3781+
"sentence": "maximum shield points",
37353782
"events": [
37363783
{
37373784
"type": "BuiltinCommonInstructions::Standard",
@@ -3957,12 +4004,12 @@
39574004
"objectGroups": []
39584005
},
39594006
{
3960-
"description": "Current shield points of the object.",
4007+
"description": "current shield points of the object.",
39614008
"fullName": "Shield points",
3962-
"functionType": "Expression",
4009+
"functionType": "ExpressionAndCondition",
39634010
"group": "Shield",
39644011
"name": "ShieldPoints",
3965-
"sentence": "",
4012+
"sentence": "shield points",
39664013
"events": [
39674014
{
39684015
"type": "BuiltinCommonInstructions::Standard",

0 commit comments

Comments
 (0)