Sentience balloon can now assign antag to affected mobs (#83322)

## About The Pull Request

![изображение](https://github.com/tgstation/tgstation/assets/53361823/732725fe-7c87-48dd-a0d0-bab990e54cef)

![изображение](https://github.com/tgstation/tgstation/assets/53361823/4b78a0ae-05e2-40ea-9f48-574fb9ba1140)

there's probably a better way to show the list of antags
## Why It's Good For The Game
I wanna give out antag datum to things I spawn, doing it one by one is
annoying
## Changelog
🆑
admin: sentience balloon can now assign antag to affected mobs
/🆑
This commit is contained in:
Striders13
2024-05-19 22:06:23 -07:00
committed by GitHub
parent 78d05937c4
commit f1ce07b2e0
2 changed files with 21 additions and 2 deletions
+11
View File
@@ -38,6 +38,8 @@
desc = "When this pops, things are gonna get more aware around here."
var/group_name = "a bunch of giant spiders"
var/effect_range = 3
var/antag_type = null
var/make_antag = FALSE
/obj/effect/fun_balloon/sentience/ui_interact(mob/user, datum/tgui/ui)
ui = SStgui.try_update_ui(user, src, ui)
@@ -49,6 +51,7 @@
var/list/data = list()
data["group_name"] = group_name
data["range"] = effect_range
data["antag"] = make_antag
return data
/obj/effect/fun_balloon/sentience/ui_state(mob/user)
@@ -73,6 +76,11 @@
if("effect_range")
effect_range = params["updated_range"]
if("select_antag")
var/list/paths = subtypesof(/datum/antagonist)
antag_type = input(usr,"Select antag", "Antagonist selection") as null|anything in sort_list(paths)
make_antag = TRUE
if("pop")
if(!popped)
popped = TRUE
@@ -105,6 +113,9 @@
message_admins("[key_name_admin(C)] has taken control of ([key_name_admin(body)])")
body.ghostize(FALSE)
body.key = C.key
if (make_antag)
body.mind.add_antag_datum(antag_type)
continue
new /obj/effect/temp_visual/gravpush(get_turf(body))
// ----------- Emergency Shuttle Balloon