Skip to content

Commit

Permalink
damage_sensor.triggers.deals_damage accept string only
Browse files Browse the repository at this point in the history
  • Loading branch information
NguyenDuck authored Dec 3, 2024
1 parent dc8c1c3 commit 30ada4d
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions source/behavior/entities/format/components/damage_sensor.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
"triggers": [
{
"cause": "all",
"deals_damage": false
"deals_damage": "no"
}
]
},
{
"triggers": [
{
"on_damage": { "filters": { "test": "has_damage", "subject": "self", "value": "fatal" } },
"deals_damage": false
"deals_damage": "no"
}
]
}
Expand Down Expand Up @@ -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",
Expand All @@ -86,7 +76,7 @@
[
{
"cause": "all",
"deals_damage": false
"deals_damage": "no"
}
]
],
Expand Down

0 comments on commit 30ada4d

Please sign in to comment.