From 160f09a092b18da26f6c32bc5d2c3befc8f96517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20V=C4=83n=20=C4=90=E1=BB=A9c?= <83252725+NguyenDuck@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:24:35 +0700 Subject: [PATCH] fix: damage_sensor | triggers | deals_damage accept string only (#328) * damage_sensor.triggers.deals_damage accept string only * fixing the damage_sensor json --------- Co-authored-by: Daan Verstraten --- .../format/components/damage_sensor.json | 24 ++++++------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/source/behavior/entities/format/components/damage_sensor.json b/source/behavior/entities/format/components/damage_sensor.json index 93aa6889..623b4ee0 100644 --- a/source/behavior/entities/format/components/damage_sensor.json +++ b/source/behavior/entities/format/components/damage_sensor.json @@ -9,7 +9,7 @@ "triggers": [ { "cause": "all", - "deals_damage": false + "deals_damage": "no" } ] }, @@ -17,7 +17,7 @@ "triggers": [ { "on_damage": { "filters": { "test": "has_damage", "subject": "self", "value": "fatal" } }, - "deals_damage": false + "deals_damage": "no" } ] } @@ -49,20 +49,10 @@ "title": "Damage Multiplier" }, "deals_damage": { - "anyOf": [ - { - "type": "boolean", - "default": true, - "description": "If true, the damage dealt to the entity will take away health from it, set to false to make the entity ignore that damage.", - "title": "Deals Damage" - }, - { - "default": "yes", - "title": "Deals Damage", - "enum": [ "yes", "no", "no_but_side_effects_apply" ], - "description": "Defines how received damage affects the entity:\n- 'yes', received damage is applied to the entity.\n- 'no', received damage is not applied to the entity.\n- 'no_but_side_effects_apply', received damage is not applied to the entity, but the side effects of the attack are. This means that the attacker's weapon loses durability, enchantment side effects are applied, and so on." - } - ] + "title": "Deals Damage", + "description": "Defines how received damage affects the entity:\n- 'yes', received damage is applied to the entity.\n- 'no', received damage is not applied to the entity.\n- 'no_but_side_effects_apply', received damage is not applied to the entity, but the side effects of the attack are. This means that the attacker's weapon loses durability, enchantment side effects are applied, and so on.", + "enum": [ "yes", "no", "no_but_side_effects_apply" ], + "default": "yes", }, "on_damage": { "type": "object", @@ -86,7 +76,7 @@ [ { "cause": "all", - "deals_damage": false + "deals_damage": "no" } ] ],