mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Sentience balloon added
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
/obj/effect/fun_balloon
|
||||
name = "fun balloon"
|
||||
desc = "This is going to be a laugh riot."
|
||||
anchoured = TRUE
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon_state = "syndballoon"
|
||||
anchored = TRUE
|
||||
|
||||
/obj/effect/fun_balloon/New()
|
||||
. = ..()
|
||||
@@ -14,11 +16,55 @@
|
||||
/obj/effect/fun_balloon/process()
|
||||
if(check())
|
||||
pop()
|
||||
visible_message("[src] pops!")
|
||||
playsound(get_turf(src), 'sound/items/party_horn.ogg', 50, 1, -1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/fun_balloon/proc/check()
|
||||
return TRUE
|
||||
|
||||
/obj/effect/fun_balloon/proc/pop()
|
||||
visual_message("[src] pops!")
|
||||
playsound(get_turf(src), 'sound/items/party_horn.ogg', 50, 1, -1)
|
||||
return
|
||||
|
||||
/obj/effect/fun_balloon/sentience
|
||||
name = "sentience fun balloon"
|
||||
desc = "When this pops, things are gonna get more aware around here."
|
||||
var/effect_range = 3
|
||||
var/group_name = "a bunch of giant spiders"
|
||||
|
||||
/obj/effect/fun_balloon/sentience/pop()
|
||||
var/list/bodies = list()
|
||||
for(var/mob/living/M in range(effect_range, get_turf(src)))
|
||||
bodies += M
|
||||
|
||||
var/question = "Would you like to be [group_name]?"
|
||||
var/list/candidates = pollCandidates(question, "pAI", null, FALSE, 100)
|
||||
while(candidates.len && bodies.len)
|
||||
var/mob/dead/observer/ghost = pick_n_take(candidates)
|
||||
var/mob/living/body = pick_n_take(bodies)
|
||||
|
||||
body << "Your mob has been taken over by a ghost!"
|
||||
message_admins("[key_name_admin(ghost)] has taken control \
|
||||
of ([key_name_admin(body)])")
|
||||
body.ghostize(0)
|
||||
body.key = ghost.key
|
||||
new /obj/effect/overlay/sparkle(null, body)
|
||||
|
||||
/obj/effect/overlay/sparkle
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "shieldsparkles"
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
var/lifetime = 10
|
||||
|
||||
/obj/effect/overlay/sparkle/New(atom/movable/AM)
|
||||
. = ..(null)
|
||||
AM.overlays += src
|
||||
addtimer(src, "expire", lifetime, FALSE, AM)
|
||||
|
||||
/obj/effect/overlay/sparkle/proc/expire(atom/movable/AM)
|
||||
AM.overlays -= src
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/overlay/sparkle/tailsweep
|
||||
icon_state = "tailsweep"
|
||||
|
||||
Reference in New Issue
Block a user