mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 08:37:43 +01:00
Leash Beam Fixes (#1583)
## About The Pull Request What the title says, I also marked the lines per our modularity guidelines ## Why It's Good For The Game ## Proof Of Testing ## Changelog 🆑 fix: Fixes the leash beam randomly dissapering /🆑 --------- Co-authored-by: Swift <jackwars4@gmail.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
This commit is contained in:
co-authored by
Swift
Waterpig
parent
a2df4eda50
commit
709ac98b86
@@ -11,8 +11,8 @@
|
||||
/// Weakref to the leash component we're using, if it exists.
|
||||
var/datum/weakref/our_leash_component
|
||||
|
||||
/// Fishing line visual for the hooked item
|
||||
var/datum/beam/leash_line/leash_line
|
||||
/// Leash line visual for the hooked item // BUBBER EDIT //
|
||||
var/datum/beam/leash_line/leash_line // BUBBER EDIT
|
||||
|
||||
unique_reskin = list(
|
||||
"Pink" = "neckleash_pink",
|
||||
@@ -79,8 +79,8 @@
|
||||
// Owner Signals
|
||||
RegisterSignal(owner, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_item_attack_self))
|
||||
RegisterSignal(owner, COMSIG_ITEM_DROPPED, PROC_REF(on_item_dropped))
|
||||
RegisterSignal(owner, COMSIG_ITEM_EQUIPPED, PROC_REF(on_item_dropped))
|
||||
RegisterSignal(owner, COMSIG_ITEM_EQUIPPED_AS_OUTFIT, PROC_REF(on_item_dropped))
|
||||
RegisterSignal(owner, COMSIG_ITEM_EQUIPPED, PROC_REF(on_item_dropped)) // Bubber Edit
|
||||
RegisterSignal(owner, COMSIG_ITEM_EQUIPPED_AS_OUTFIT, PROC_REF(on_item_dropped)) // Bubber Edit
|
||||
// Parent Signals
|
||||
RegisterSignal(parent, COMSIG_LIVING_RESIST, PROC_REF(on_parent_resist))
|
||||
if(istype(owner, /obj/item/clothing/erp_leash))
|
||||
@@ -141,7 +141,9 @@
|
||||
qdel(src)
|
||||
else qdel(src) // If they're not an item; something is very wrong - qdel anyways without the breakout time.
|
||||
|
||||
// LEASH Line
|
||||
// LEASH Line BUBBER ADDON
|
||||
// Bubber EDIT STARTS HERE
|
||||
// Adds leash as beam, definetly not copy pasted from fishing line
|
||||
|
||||
/obj/item/clothing/erp_leash/proc/create_leash_line(atom/movable/target, target_py = null)
|
||||
var/mob/user = loc
|
||||
@@ -162,7 +164,7 @@
|
||||
SIGNAL_HANDLER
|
||||
. = NONE
|
||||
|
||||
if(!CheckToolReach(src, source.target, 2))
|
||||
if(!CheckToolReach(src, source.target, 6)) // More distance than leash itself, prevents it from suddenly dissapearing...HOPEFULLY
|
||||
qdel(source)
|
||||
return BEAM_CANCEL_DRAW
|
||||
|
||||
@@ -206,3 +208,5 @@
|
||||
/datum/beam/leash_line/proc/update_offsets(user_dir)
|
||||
override_origin_pixel_x = lefthand ? lefthand_px : righthand_px
|
||||
override_origin_pixel_y = lefthand ? lefthand_py : righthand_py
|
||||
|
||||
// Bubber addon ends here
|
||||
|
||||
Reference in New Issue
Block a user