Refactors beams. Adds tethering. IV drips/bags are now tethered. (#29570)

* refactor

* tether

* tetherrrs

* logic fix (i hope)

* ci fix

* ok please work
This commit is contained in:
Contrabang
2025-07-09 14:49:40 +00:00
committed by GitHub
parent 6c2aa06eb3
commit 1f124ac835
15 changed files with 404 additions and 106 deletions
@@ -232,7 +232,7 @@
var/mob/living/simple_animal/demon/shadow/current_demon = firer
if(istype(current_demon))
current_demon.block_shadow_crawl()
firer.Beam(src, icon_state = "grabber_beam", time = INFINITY, maxdistance = INFINITY, beam_sleep_time = 1, beam_type = /obj/effect/ebeam/floor)
firer.Beam(src, icon_state = "grabber_beam", time = INFINITY, maxdistance = INFINITY, beam_type = /obj/effect/ebeam/floor)
return ..()
/obj/item/projectile/magic/shadow_hand/on_hit(atom/target, blocked, hit_zone)
+4 -1
View File
@@ -59,6 +59,7 @@
if(bag)
user.put_in_hands(bag)
bag.update_icon(UPDATE_OVERLAYS)
bag.update_iv_type()
bag = null
update_icon(UPDATE_OVERLAYS)
@@ -72,6 +73,7 @@
used.forceMove(src)
bag = used
bag.update_iv_type()
to_chat(user, "<span class='notice'>You attach [used] to [src].</span>")
update_icon(UPDATE_OVERLAYS)
START_PROCESSING(SSmachines, src)
@@ -95,8 +97,9 @@
. += bag.examine(user)
/obj/machinery/iv_drip/Move(NewLoc, direct)
var/oldloc = loc
. = ..()
if(!.) // ..() will return 0 if we didn't actually move anywhere.
if(oldloc == loc) // ..() will return 0 if we didn't actually move anywhere, except for some diagonal cases.
return
playsound(loc, pick('sound/items/cartwheel1.ogg', 'sound/items/cartwheel2.ogg'), 75, TRUE, ignore_walls = FALSE)
+3 -4
View File
@@ -840,10 +840,9 @@
held_items += held.UID()
/obj/structure/table/tray/Move(NewLoc, direct)
var/atom/OldLoc = loc
var/atom/oldloc = loc
. = ..()
if(!.) // ..() will return 0 if we didn't actually move anywhere.
if(oldloc == loc) // ..() will return 0 if we didn't actually move anywhere, except for some diagonal cases.
return
if(direct & (direct - 1)) // This represents a diagonal movement, which is split into multiple cardinal movements. We'll handle moving the items on the cardinals only.
@@ -857,7 +856,7 @@
if(!held)
held_items -= held_uid
continue
if(OldLoc != held.loc)
if(oldloc != held.loc)
held_items -= held_uid
continue
held.forceMove(NewLoc)