Files
Bubberstation/code/modules/mob/camera/camera.dm
SkyratBot 12b23baf2c [MIRROR] Imaginary friend refactor [MDB IGNORE] (#17585)
* Imaginary friend refactor (#71058)

## About The Pull Request

This makes imaginary friends less janky. It adds many QoL features like
runechat and typing indicators, fixes jankyness that results from a
runtime. You can now even emote and whisper as an imaginary friend which
adds countless RP possibilities that weren't available before.

![image](https://user-images.githubusercontent.com/27156122/199902939-c3d98955-7a1d-4752-86d2-710f38b077a2.png)

![image](https://user-images.githubusercontent.com/27156122/199902999-c88ffb5f-fed0-4cdf-a202-f221a5cb836e.png)

![image](https://user-images.githubusercontent.com/27156122/199903282-50146014-bf09-4e6b-98d2-aa8ebc94b5e3.png)

![image](https://user-images.githubusercontent.com/27156122/199903417-105cf372-a69b-4d49-bfa6-47390a0e64cf.png)

![image](https://user-images.githubusercontent.com/27156122/199936352-c614ee9e-8084-4c27-b817-779aeff427ce.png)

![image](https://user-images.githubusercontent.com/27156122/199936394-063e1431-59ff-4f5c-9b0f-47c342797cfe.png)

![image](https://user-images.githubusercontent.com/27156122/199936483-1941c349-91c1-4754-8827-7f9b9f5bb967.png)

## Why It's Good For The Game

It makes an old feature better.

## Changelog

🆑 Riggle
qol: Imaginary friends now have runechat, typing indicators and emotes!
qol: Imaginary friends can point and spin
fix: Fixed a bug with imaginary friends where ghosts would stay after
aghosting
refactor: Imaginary friend code massively improved
refactor: Imaginary friends now support multiple friends at the same
time!
admin: Imaginary friends no longer bypass filters
/🆑

* Imaginary friend refactor

Co-authored-by: Riggle <27156122+RigglePrime@users.noreply.github.com>
2022-11-20 00:28:08 +00:00

48 lines
1.3 KiB
Plaintext

// Camera mob, used by AI camera and blob.
/mob/camera
name = "camera mob"
density = FALSE
move_force = INFINITY
move_resist = INFINITY
status_flags = GODMODE // You can't damage it.
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
see_in_dark = 7
invisibility = INVISIBILITY_ABSTRACT // No one can see us
sight = SEE_SELF | SEE_BLACKNESS
move_on_shuttle = FALSE
/// Toggles if the camera can use emotes
var/has_emotes = FALSE
/mob/camera/Initialize(mapload)
. = ..()
SSpoints_of_interest.make_point_of_interest(src)
/mob/camera/experience_pressure_difference()
return
/mob/camera/canUseStorage()
return FALSE
/mob/camera/up()
set name = "Move Upwards"
set category = "IC"
if(zMove(UP, z_move_flags = ZMOVE_FEEDBACK))
to_chat(src, span_notice("You move upwards."))
/mob/camera/down()
set name = "Move Down"
set category = "IC"
if(zMove(DOWN, z_move_flags = ZMOVE_FEEDBACK))
to_chat(src, span_notice("You move down."))
/mob/camera/can_z_move(direction, turf/start, turf/destination, z_move_flags = NONE, mob/living/rider)
z_move_flags |= ZMOVE_IGNORE_OBSTACLES //cameras do not respect these FLOORS you speak so much of
return ..()
/mob/camera/emote(act, m_type=1, message = null, intentional = FALSE, force_silence = FALSE)
if(has_emotes)
return ..()
return FALSE