Skip to content

Commit 103e1b3

Browse files
authored
Merge pull request #1552 from Kyrozis/rename-script-fix
Add entity_id check to the get_target function in gui/rename
2 parents 64ca609 + c31f399 commit 103e1b3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Template for new versions:
3434
- `trackstop`: can now modify pressure plates; permits minecart and creature triggers to be set beyond normal sensitivity
3535

3636
## Fixes
37+
- `gui/rename`: added check for entity_id input in get_target function
3738

3839
## Misc Improvements
3940
- `gui/notify`: reduced severity of the missing nemesis records warning if no units on the map are affected. clarified wording.

gui/rename.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -983,6 +983,9 @@ local function get_target(opts)
983983
if opts.histfig_id then
984984
target = get_hf_target(df.historical_figure.find(opts.histfig_id))
985985
if not target then qerror('Historical figure not found') end
986+
elseif opts.entity_id then
987+
target = get_entity_target(df.historical_entity.find(opts.entity_id))
988+
if not target then qerror('Entity not found') end
986989
elseif opts.item_id then
987990
target = get_artifact_target(df.item.find(opts.item_id))
988991
if not target then qerror('Artifact not found') end

0 commit comments

Comments
 (0)