mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
up ports incorp and proximity handling (#17106)
* up ports inCorp and proximity handling * anim size * bullets no longer hit shadekin * fix throwing and clicking * use the proc * and add the proc * . * No moving when you can't move * fixes portal runtime * No bonk when throwing at incorporeal entities * MAR - I coded in picking yourself up years ago and someone broke it (by adding a lying check). This unbreaks it. Additionally, picking yourself up was made immediate instead of a 0.5 delay since before hitting the U key was slow and doing it this way was quicker. That's not the case anymore. - Makes attack_hand not happen if the person is incorporeal - Makes you not contract touch spread viruses when you click one someone and don't do an interaction (you will now always do an interaction) - Makes it so you can't mousedrop items while phased. * no more spreading viruses while phased / to phased * F --------- Co-authored-by: C.L. <killer65311@gmail.com>
This commit is contained in:
@@ -71,8 +71,6 @@ when portals are shortly lived, or when portals are made to be obvious with spec
|
||||
|
||||
// Called when something touches the portal, and usually teleports them to the other side.
|
||||
/obj/effect/map_effect/portal/Crossed(atom/movable/AM)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
..()
|
||||
if(!AM)
|
||||
return
|
||||
|
||||
@@ -11,6 +11,7 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
|
||||
var/obj/item/target = null
|
||||
var/creator = null
|
||||
anchored = TRUE
|
||||
var/event = FALSE
|
||||
|
||||
/obj/effect/portal/Bumped(mob/M as mob|obj)
|
||||
if(ismob(M) && !(isliving(M)))
|
||||
@@ -22,7 +23,11 @@ GLOBAL_LIST_BOILERPLATE(all_portals, /obj/effect/portal)
|
||||
|
||||
/obj/effect/portal/Crossed(atom/movable/AM as mob|obj)
|
||||
if(AM.is_incorporeal())
|
||||
return
|
||||
if(!event)
|
||||
return
|
||||
if(iscarbon(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
H.attack_dephase(null, src)
|
||||
if(ismob(AM) && !(isliving(AM)))
|
||||
return //do not send ghosts, zshadows, ai eyes, etc
|
||||
spawn(0)
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
|
||||
/obj/item/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(isliving(hit_atom)) //Living mobs handle hit sounds differently.
|
||||
if(isliving(hit_atom) && !hit_atom.is_incorporeal()) //Living mobs handle hit sounds differently.
|
||||
var/volume = get_volume_by_throwforce_and_or_w_class()
|
||||
if (throwforce > 0)
|
||||
if (mob_throw_hit_sound)
|
||||
|
||||
@@ -56,15 +56,21 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/transfer_valve/HasProximity(turf/T, atom/movable/AM, old_loc)
|
||||
attached_device?.HasProximity(T, AM, old_loc)
|
||||
/obj/item/transfer_valve/HasProximity(turf/T, datum/weakref/WF, old_loc)
|
||||
SIGNAL_HANDLER
|
||||
if(isnull(WF))
|
||||
return
|
||||
var/atom/movable/AM = WF.resolve()
|
||||
if(isnull(AM))
|
||||
log_debug("DEBUG: HasProximity called without reference on [src].")
|
||||
attached_device?.HasProximity(T, WEAKREF(AM), old_loc)
|
||||
|
||||
/obj/item/transfer_valve/Moved(old_loc, direction, forced)
|
||||
. = ..()
|
||||
if(isturf(old_loc))
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = old_loc)
|
||||
unsense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity), center = old_loc)
|
||||
if(isturf(loc))
|
||||
sense_proximity(callback = /atom/proc/HasProximity)
|
||||
sense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity))
|
||||
|
||||
/obj/item/transfer_valve/attack_self(mob/user)
|
||||
tgui_interact(user)
|
||||
|
||||
@@ -661,13 +661,20 @@ var/list/global/tank_gauge_cache = list()
|
||||
tank.update_icon()
|
||||
tank.cut_overlay("bomb_assembly")
|
||||
|
||||
/obj/item/tankassemblyproxy/HasProximity(turf/T, atom/movable/AM, old_loc)
|
||||
assembly?.HasProximity(T, AM, old_loc)
|
||||
/obj/item/tankassemblyproxy/HasProximity(turf/T, datum/weakref/WF, old_loc)
|
||||
SIGNAL_HANDLER
|
||||
if(isnull(WF))
|
||||
return
|
||||
var/atom/movable/AM = WF
|
||||
if(isnull(AM))
|
||||
log_debug("DEBUG: HasProximity called without reference on [src].")
|
||||
return
|
||||
assembly?.HasProximity(T, WEAKREF(AM), old_loc)
|
||||
|
||||
/obj/item/tankassemblyproxy/Moved(old_loc, direction, forced)
|
||||
if(isturf(old_loc))
|
||||
unsense_proximity(callback = /atom/proc/HasProximity, center = old_loc)
|
||||
unsense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity), center = old_loc)
|
||||
if(isturf(loc))
|
||||
sense_proximity(callback = /atom/proc/HasProximity)
|
||||
sense_proximity(callback = TYPE_PROC_REF(/atom,HasProximity))
|
||||
|
||||
#undef TANK_IDEAL_PRESSURE
|
||||
|
||||
Reference in New Issue
Block a user