mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
[MIRROR] small modlink fixes [MDB IGNORE] (#23293)
* small modlink fixes (#77804) ## About The Pull Request fixes bug in multitools where they didnt unregister signals fixes modlink scryers checking battery charge without a battery frequency stuff is a bit more explained ## Why It's Good For The Game good stuf ## Changelog 🆑 fix: fixes multitools possibly randomly losing their buffer fix: fixes modlinks checking battery charge without a battery and working without charge qol: modlink stuff is a bit more explained fix: modlinks printed from rnd no longer start with a frequency (remember to copy it from another one with a multitool buffer, robotics starts with 2 NT frequency linked ones) /🆑 * small modlink fixes --------- Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@
|
||||
mod_link.frequency = tool_frequency
|
||||
|
||||
/obj/item/mod/control/proc/can_call()
|
||||
return wearer && wearer.stat < DEAD
|
||||
return get_charge() && wearer && wearer.stat < DEAD
|
||||
|
||||
/obj/item/mod/control/proc/make_link_visual()
|
||||
return make_link_visual_generic(mod_link, PROC_REF(on_overlay_change))
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
/obj/item/mod/control/proc/on_wearer_set_dir(atom/source, dir, newdir)
|
||||
SIGNAL_HANDLER
|
||||
on_user_set_dir_generic(mod_link, newdir)
|
||||
on_user_set_dir_generic(mod_link, newdir || SOUTH)
|
||||
|
||||
/obj/item/clothing/neck/link_scryer
|
||||
name = "\improper MODlink scryer"
|
||||
@@ -144,7 +144,7 @@
|
||||
/// The MODlink datum we operate.
|
||||
var/datum/mod_link/mod_link
|
||||
/// Initial frequency of the MODlink.
|
||||
var/starting_frequency = "NT"
|
||||
var/starting_frequency
|
||||
/// An additional name tag for the scryer, seen as "MODlink scryer - [label]"
|
||||
var/label
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
. += span_notice("The battery charge reads [cell.percent()]%. <b>Right-click</b> with an empty hand to remove it.")
|
||||
else
|
||||
. += span_notice("It is missing a battery, one can be installed by clicking with a power cell on it.")
|
||||
. += span_notice("The MODlink ID is [mod_link.id], frequency is [mod_link.frequency]. <b>Right-click</b> with multitool to copy/imprint frequency.")
|
||||
. += span_notice("The MODlink ID is [mod_link.id], frequency is [mod_link.frequency || "unset"]. <b>Right-click</b> with multitool to copy/imprint frequency.")
|
||||
. += span_notice("Use in hand to set name.")
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/equipped(mob/living/user, slot)
|
||||
@@ -260,7 +260,7 @@
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/proc/can_call()
|
||||
var/mob/living/user = loc
|
||||
return istype(user) && cell.charge && user.stat < DEAD
|
||||
return istype(user) && cell?.charge && user.stat < DEAD
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/proc/make_link_visual()
|
||||
var/mob/living/user = mod_link.get_user_callback.Invoke()
|
||||
@@ -296,7 +296,10 @@
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/proc/on_user_set_dir(atom/source, dir, newdir)
|
||||
SIGNAL_HANDLER
|
||||
on_user_set_dir_generic(mod_link, newdir)
|
||||
on_user_set_dir_generic(mod_link, newdir || SOUTH)
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/loaded
|
||||
starting_frequency = "NT"
|
||||
|
||||
/obj/item/clothing/neck/link_scryer/loaded/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"has_pai" = ispAI(ai_assistant),
|
||||
"is_ai" = ai_assistant && ai_assistant == user,
|
||||
"link_id" = mod_link.id,
|
||||
"link_freq" = mod_link.frequency,
|
||||
"link_call" = mod_link.get_other()?.id,
|
||||
// Wires
|
||||
"open" = open,
|
||||
|
||||
Reference in New Issue
Block a user