Field of Vision component. (#12075)

* Hopeless WIP for vision cones.

* Core component and hooks done

* Removing clutter.

* linter bashing me for using statements as args.

* Ok.

* continue

* bring back the macro

* Configs and openspace filter.

* Chat plane, reset perspective signal, mechs/vehicles cases, machineries.

* view, viewers and spoopy ghosts.

* Renamed component, admin fun button and snowflakes robots.

* Whoopsie.

* Yikes

* test merge tweak.

* radial yaketi sax.

* Fixed tgui UIs, some messages not displayed to the target.

* Documentation and a little bugfix.

* Pulling QoL, seventh plane made in this PR.

* Fix.

* Tweaks and improvements.

* Update randomverbs.dm
This commit is contained in:
Ghom
2020-05-15 15:25:04 -07:00
committed by GitHub
parent b21fb97bda
commit 7c7147cb3e
122 changed files with 947 additions and 347 deletions
-27
View File
@@ -72,30 +72,3 @@
/mob/proc/AltRangedAttack(atom/A, params)
return FALSE
/mob/proc/mouse_face_atom(atom/A) //Basically a copy of face_atom but with ismousemovement set to TRUE
if( buckled || stat != CONSCIOUS || !A || !x || !y || !A.x || !A.y )
return
var/dx = A.x - x
var/dy = A.y - y
if(!dx && !dy) // Wall items are graphically shifted but on the floor
if(A.pixel_y > 16)
setDir(NORTH, ismousemovement = TRUE)
else if(A.pixel_y < -16)
setDir(SOUTH, ismousemovement = TRUE)
else if(A.pixel_x > 16)
setDir(EAST, ismousemovement = TRUE)
else if(A.pixel_x < -16)
setDir(WEST, ismousemovement = TRUE)
return
if(abs(dx) < abs(dy))
if(dy > 0)
setDir(NORTH, ismousemovement = TRUE)
else
setDir(SOUTH, ismousemovement = TRUE)
else
if(dx > 0)
setDir(EAST, ismousemovement = TRUE)
else
setDir(WEST, ismousemovement = TRUE)
+4 -4
View File
@@ -12,7 +12,7 @@
if(isturf(A) || incapacitated()) // pretty annoying to wave your fist at floors and walls. And useless.
return TRUE
changeNext_move(CLICK_CD_RANGE)
var/list/target_viewers = viewers(11, A) //Byond proc, doesn't check for blindness.
var/list/target_viewers = get_actual_viewers(11, A) //doesn't check for blindness.
if(!(src in target_viewers)) //click catcher issuing calls for out of view objects.
return TRUE
if(!has_active_hand())
@@ -26,16 +26,16 @@
switch(a_intent)
if(INTENT_DISARM)
the_action = "shoos away [A]"
what_action = "shoo away something you can't see"
what_action = "shoo away something out of your vision"
self_action = "shoo away [A]"
if(INTENT_GRAB)
the_action = "beckons [A] to come"
what_action = "beckons something you can't see to come"
what_action = "beckons something out of your vision to come"
self_action = "beckon [A] to come"
if(INTENT_HARM)
var/pronoun = "[p_their()]"
the_action = "shakes [pronoun] fist at [A]"
what_action = "shakes [pronoun] fist at something you can't see"
what_action = "shakes [pronoun] fist at something out of your vision"
self_action = "shake your fist at [A]"
if(!eye_blind)