[MIRROR] default tgui alert input handling (#8891)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
CHOMPStation2
2024-09-02 00:28:35 +02:00
committed by GitHub
co-authored by Kashargul Kashargul
parent ec8834f9e5
commit 9f42148ab1
106 changed files with 675 additions and 178 deletions
@@ -459,11 +459,12 @@
if(is_taken_over()) return
if(!istype(M) || !gem) return
if(!gem.owner) return
if((tgui_alert(gem.owner, "Do you want to allow [owner] to transfer [selected_soul] to your soulcatcher?", "Allow Transfer", list("No", "Yes")) == "Yes"))
if(!in_range(gem.owner, owner))
return
if(!(gem.owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TRANSFER))
return
if((tgui_alert(gem.owner, "Do you want to allow [owner] to transfer [selected_soul] to your soulcatcher?", "Allow Transfer", list("No", "Yes")) != "Yes"))
return
if(!in_range(gem.owner, owner))
return
if(!(gem.owner.soulcatcher_pref_flags & SOULCATCHER_ALLOW_TRANSFER))
return
if(M.mind == own_mind)
own_mind = null
brainmobs -= M