[PTBF] Adds a new, vent-based hallucination (#27619)

* Adds a new 'vent peek' hallucination.

* Remove blank space

* Apply review changes

Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Signed-off-by: ExusA <67055922+ExusA@users.noreply.github.com>

* Apply Review Changes

* Add code comment

Adds a commented summary of the hallucination

---------

Signed-off-by: ExusA <67055922+ExusA@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
ExusA
2025-01-10 10:31:27 +08:00
committed by GitHub
parent d724ced7b2
commit f63e40231e
3 changed files with 25 additions and 0 deletions
@@ -476,3 +476,27 @@
*/
/obj/effect/hallucination/delusion/proc/get_image(mob/living/carbon/human/H)
return image('icons/mob/animal.dmi', H, pick("black_bear", "brown_bear", "corgi", "cow", "deer", "goat", "goose", "pig", "blank-body"))
/**
* # Hallucination - Vent Peek
*
* A suspicious individual peers out of a nearby vent at the target.
*/
/obj/effect/hallucination/ventpeek
duration = 4 SECONDS
/obj/effect/hallucination/ventpeek/Initialize(mapload, mob/living/carbon/hallucination_target)
. = ..()
var/list/venttargets = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in oview(world.view, target))
venttargets += vent
if(!length(venttargets))
return INITIALIZE_HINT_QDEL
var/image/I = image('icons/effects/effects.dmi', get_turf(pick(venttargets)))
add_icon(I)
flick("hallucination_clown", I)
addtimer(CALLBACK(src, PROC_REF(play_honk)), 2.3 SECONDS)
/obj/effect/hallucination/ventpeek/proc/play_honk()
target.playsound_local(target, 'sound/items/bikehorn.ogg', 10, TRUE)
@@ -20,6 +20,7 @@ GLOBAL_LIST_INIT(hallucinations, list(
/obj/effect/hallucination/fake_item = 15,
/obj/effect/hallucination/fake_weapon = 15,
/obj/effect/hallucination/husks = 15,
/obj/effect/hallucination/ventpeek = 15,
),
HALLUCINATE_MAJOR = list(
/obj/effect/hallucination/abduction = 10,