Hitby refactor (#19624)

Refactored hitby to be in line with TG's version.
Refactored item weight defines to a more clear naming scheme, also in
line with TG's version.
Refactored how the movement bumps are handled, ported signals to handle
them, in preparation for the movement update.
Fixed disposal hit bouncing the hitting atom on the wall.
Items do not push other items anymore if they are tiny.
This commit is contained in:
Fluffy
2024-07-28 20:52:08 +00:00
committed by GitHub
parent b84acb8e03
commit a3a4d46fa7
510 changed files with 2282 additions and 1584 deletions
+14 -4
View File
@@ -51,6 +51,15 @@ when portals are shortly lived, or when portals are made to be obvious with spec
var/portal_distance_x = 0 // How far the portal is from the left edge, in tiles.
var/portal_distance_y = 0 // How far the portal is from the top edge.
/obj/effect/map_effect/portal/Initialize()
. = ..()
var/static/list/loc_connections = list(
COMSIG_ATOM_ENTERED = PROC_REF(on_entered),
)
AddElement(/datum/element/connect_loc, loc_connections)
/obj/effect/map_effect/portal/Destroy()
vis_contents = null
if(counterpart)
@@ -59,14 +68,15 @@ when portals are shortly lived, or when portals are made to be obvious with spec
return ..()
// 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)
/obj/effect/map_effect/portal/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
SIGNAL_HANDLER
if(!arrived)
return
if(!counterpart)
return
go_through_portal(AM)
go_through_portal(arrived)
/obj/effect/map_effect/portal/proc/go_through_portal(atom/movable/AM)