mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-29 16:47:04 +01:00
pixel w/z stuff (#7477)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request byond shenanigans <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: you can now point items inside your inventory tweak: update fulton /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
This commit is contained in:
@@ -97,16 +97,19 @@ TYPE_REGISTER_SPATIAL_GRID(/mob/living, SSspatial_grids.living)
|
||||
start_pulling(AM)
|
||||
|
||||
//mob verbs are faster than object verbs. See above.
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in view())
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in view(client.view, src))
|
||||
if(src.stat || src.restrained())
|
||||
return 0
|
||||
return FALSE
|
||||
if(src.status_flags & STATUS_FAKEDEATH)
|
||||
return 0
|
||||
if(!..())
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
usr.visible_message("<b>[src]</b> points to [A]")
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/mob/living/_pointed(atom/pointing_at)
|
||||
if(!..())
|
||||
return FALSE
|
||||
log_emote("POINTED --> at [pointing_at] ([COORD(pointing_at)]).", src)
|
||||
visible_message(SPAN_INFOPLAIN("[SPAN_NAME("[src]")] points at [pointing_at]."), SPAN_NOTICE("You point at [pointing_at]."))
|
||||
|
||||
/*one proc, four uses
|
||||
swapping: if it's 1, the mobs are trying to switch, if 0, non-passive is pushing passive
|
||||
|
||||
+91
-16
@@ -391,6 +391,8 @@
|
||||
to_chat(src, "<blockquote class='info'>[result.Join("\n")]</blockquote>")
|
||||
SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, A)
|
||||
|
||||
#define POINT_TIME (2.5 SECONDS)
|
||||
|
||||
/**
|
||||
* Point at an atom
|
||||
*
|
||||
@@ -408,27 +410,100 @@
|
||||
set name = "Point To"
|
||||
set category = VERB_CATEGORY_OBJECT
|
||||
|
||||
if(!src || !isturf(src.loc) || !(A in view(14, src)))
|
||||
return 0
|
||||
|
||||
if(istype(A, /obj/effect/temp_visual/point))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/tile = get_turf(A)
|
||||
if (!tile)
|
||||
return 0
|
||||
// i am queued sometimes
|
||||
_pointed(A)
|
||||
|
||||
var/obj/P = new /obj/effect/temp_visual/point(tile)
|
||||
P.invisibility = invisibility
|
||||
P.plane = ABOVE_PLANE
|
||||
P.layer = FLY_LAYER
|
||||
P.pixel_x = A.pixel_x + world.icon_size * (x - A.x)
|
||||
P.pixel_y = A.pixel_y + world.icon_size * (y - A.y)
|
||||
animate(P, pixel_x = A.pixel_x, pixel_y = A.pixel_y, time = 0.5 SECONDS, easing = QUAD_EASING)
|
||||
face_atom(A)
|
||||
log_emote("POINTED --> at [A] ([COORD(A)]).", src)
|
||||
/mob/proc/_pointed(atom/pointing_at)
|
||||
if(client) //Clientless mobs can just go ahead and point
|
||||
if(!(pointing_at in view(client.view, src)))
|
||||
return FALSE
|
||||
// since we dont have the datum emote for pointing, too lazy to implement! (it sets the cooldown)
|
||||
// if(iscarbon(src)) // special interactions for carbons
|
||||
// var/mob/living/carbon/our_carbon = src
|
||||
// if(our_carbon.get_usable_hand_count() <= 0 || our_carbon.handcuffed /* || HAS_TRAIT(src, TRAIT_HANDS_BLOCKED)*/)
|
||||
// if(!TIMER_COOLDOWN_CHECK(src, "point_verb_emote_cooldown"))
|
||||
// //cooldown handled in the emote.
|
||||
// our_carbon.emote("point [pointing_at]")
|
||||
// else
|
||||
// to_chat(src, SPAN_WARNING("You need to wait before pointing again!"))
|
||||
// return FALSE
|
||||
|
||||
point_at(pointing_at, TRUE)
|
||||
return 1
|
||||
|
||||
/**
|
||||
* Point at an atom
|
||||
*
|
||||
* Intended to enable and standardise the pointing animation for all atoms
|
||||
*
|
||||
* Not intended as a replacement for the mob verb
|
||||
*/
|
||||
/atom/movable/proc/point_at(atom/pointed_atom, intentional = FALSE)
|
||||
if(!isturf(loc))
|
||||
return FALSE
|
||||
|
||||
if (pointed_atom in src)
|
||||
create_point_bubble(pointed_atom)
|
||||
return FALSE
|
||||
|
||||
var/turf/tile = get_turf(pointed_atom)
|
||||
if (!tile)
|
||||
return FALSE
|
||||
|
||||
var/turf/our_tile = get_turf(src)
|
||||
var/obj/visual = new /obj/effect/temp_visual/point(our_tile, invisibility)
|
||||
|
||||
// SEND_SIGNAL(src, COMSIG_MOVABLE_POINTED, pointed_atom, visual, intentional)
|
||||
|
||||
animate(visual, pixel_x = (tile.x - our_tile.x) * world.icon_size + pointed_atom.pixel_x, pixel_y = (tile.y - our_tile.y) * world.icon_size + pointed_atom.pixel_y, time = 1.7, easing = EASE_OUT)
|
||||
return TRUE
|
||||
|
||||
/mob/point_at(atom/pointed_atom, intentional = FALSE)
|
||||
. = ..()
|
||||
if(.)
|
||||
face_atom(pointed_atom)
|
||||
|
||||
/atom/movable/proc/create_point_bubble(atom/pointed_atom)
|
||||
var/mutable_appearance/thought_bubble = mutable_appearance(
|
||||
'icons/effects/effects.dmi',
|
||||
"thought_bubble",
|
||||
plane = POINT_PLANE,
|
||||
appearance_flags = KEEP_APART,
|
||||
)
|
||||
|
||||
var/mutable_appearance/pointed_atom_appearance = new(pointed_atom.appearance)
|
||||
pointed_atom_appearance.blend_mode = BLEND_INSET_OVERLAY
|
||||
pointed_atom_appearance.plane = FLOAT_PLANE
|
||||
pointed_atom_appearance.layer = FLOAT_LAYER
|
||||
pointed_atom_appearance.pixel_x = 0
|
||||
pointed_atom_appearance.pixel_y = 0
|
||||
thought_bubble.overlays += pointed_atom_appearance
|
||||
// pointed_atom_appearance.remove_filter(HOVER_OUTLINE_FILTER)
|
||||
|
||||
thought_bubble.pixel_w = 16
|
||||
thought_bubble.pixel_z = 32
|
||||
thought_bubble.alpha = 200
|
||||
|
||||
var/mutable_appearance/point_visual = mutable_appearance(
|
||||
'icons/mob/screen1.dmi',
|
||||
"arrow"
|
||||
)
|
||||
|
||||
thought_bubble.overlays += point_visual
|
||||
|
||||
add_overlay(thought_bubble)
|
||||
// LAZYADD(update_overlays_on_z, thought_bubble)
|
||||
addtimer(CALLBACK(src, PROC_REF(clear_point_bubble), thought_bubble), POINT_TIME)
|
||||
|
||||
/atom/movable/proc/clear_point_bubble(mutable_appearance/thought_bubble)
|
||||
// LAZYREMOVE(update_overlays_on_z, thought_bubble)
|
||||
cut_overlay(thought_bubble)
|
||||
|
||||
#undef POINT_TIME
|
||||
|
||||
/mob/verb/set_self_relative_layer()
|
||||
set name = "Set relative layer"
|
||||
set desc = "Set your relative layer to other mobs on the same layer as yourself"
|
||||
|
||||
@@ -595,11 +595,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
W.add_hiddenprint(src)
|
||||
W.visible_message("<font color='red'>Invisible fingers crudely paint something in blood on [T]...</font>")
|
||||
|
||||
/mob/observer/dead/pointed(atom/A as mob|obj|turf in view())
|
||||
/mob/observer/dead/_pointed(atom/pointed_at)
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A]</span>")
|
||||
return 1
|
||||
return FALSE
|
||||
|
||||
visible_message(SPAN_DEADSAY("<b>[src]</b> points to [pointed_at]."))
|
||||
|
||||
/mob/observer/dead/proc/manifest(mob/user)
|
||||
is_manifest = TRUE
|
||||
|
||||
Reference in New Issue
Block a user