mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Sentience balloon can now assign antag to affected mobs (#83322)
## About The Pull Request   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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user