From 1f3689a0acddd06c718ff0adbe91a984dd28b16f Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 26 Jun 2026 23:45:46 +0900 Subject: [PATCH] entity api change (#442) * Update warps.lua * . * . --- exp_legacy/module/config/expcore/roles.lua | 2 +- exp_legacy/module/modules/control/warps.lua | 2 +- exp_scenario/module/control/mine_depletion.lua | 2 +- exp_scenario/module/control/spawn_area.lua | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exp_legacy/module/config/expcore/roles.lua b/exp_legacy/module/config/expcore/roles.lua index df346afb..8ffbb53f 100644 --- a/exp_legacy/module/config/expcore/roles.lua +++ b/exp_legacy/module/config/expcore/roles.lua @@ -14,7 +14,7 @@ Roles.define_flag_trigger("is_spectator", function(player, state) end) Roles.define_flag_trigger("is_jail", function(player, state) if player.character then - player.character.active = not state + player.character.disabled_by_script = not state end end) diff --git a/exp_legacy/module/modules/control/warps.lua b/exp_legacy/module/modules/control/warps.lua index b6cad0a9..fdca5b62 100644 --- a/exp_legacy/module/modules/control/warps.lua +++ b/exp_legacy/module/modules/control/warps.lua @@ -182,7 +182,7 @@ function Warps.make_warp_area(warp_id) } entity.destructible = false entity.health = 0 - entity.minable = false + entity.minable_flag = false entity.rotatable = false -- Save reference of the last power pole diff --git a/exp_scenario/module/control/mine_depletion.lua b/exp_scenario/module/control/mine_depletion.lua index 799d0649..6bd8d24e 100644 --- a/exp_scenario/module/control/mine_depletion.lua +++ b/exp_scenario/module/control/mine_depletion.lua @@ -43,7 +43,7 @@ local function prevent_deconstruction(entity) end -- Not minable, selectable, or deconstructive - if not entity.minable or not entity.prototype.selectable_in_game or entity.has_flag("not-deconstructable") then + if not entity.minable_flag or not entity.prototype.selectable_in_game or entity.has_flag("not-deconstructable") then return true end diff --git a/exp_scenario/module/control/spawn_area.lua b/exp_scenario/module/control/spawn_area.lua index 8c1626b7..e4c7213e 100644 --- a/exp_scenario/module/control/spawn_area.lua +++ b/exp_scenario/module/control/spawn_area.lua @@ -56,7 +56,7 @@ end local function protect_entity(entity) if entity and entity.valid then entity.destructible = false - entity.minable = false + entity.minable_flag = false entity.rotatable = false entity.operable = false end