mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
You can install B.O.R.I.S. in circuits with MMI components (+other MMI component changes) (#92002)
## About The Pull Request This PR adds the ability to install a B.O.R.I.S. in a circuit that contains an MMI component. These circuits can then be remotely connected to by an AI by clicking on them or anything they are inside of. To indicate that a circuit allows remote AI connection, an indicator is given to the circuit and anything containing it. Additionally: - Refactors the MMI component to use `item_interaction`, since it was pertinent. - You cannot insert an MMI/B.O.R.I.S. into a locked circuit. - You can no longer hotswap MMIs/B.O.R.I.S.es - you must manually eject the inserted one. Let me know what changelog labels I should use for the hotswap removal and the prevention of insertion into locked circuits. ## Why It's Good For The Game If you can put an MMI or posibrain in a circuit, why not allow an AI to use it using a B.O.R.I.S.? ## Changelog 🆑 add: B.O.R.I.S.es can be installed inside of integrated circuits with MMI components, allowing an AI to remotely interface with them the same way an MMI or posibrain could. refactor: The MMI component now uses item interaction behavior for inserting MMIs/B.O.R.I.S.es. /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
var/datum/callback/load_callback
|
||||
/// Weakref to the human we are currently carried by
|
||||
var/datum/weakref/tracked_human_ref
|
||||
/// Weakref to the connect_containers component that tracks the human
|
||||
var/datum/weakref/connect_ref
|
||||
|
||||
/datum/component/loads_avatar_gear/Initialize(datum/callback/load_callback)
|
||||
if(!isitem(parent))
|
||||
@@ -18,14 +20,14 @@
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERING = PROC_REF(on_entered_loc),
|
||||
)
|
||||
AddComponent(/datum/component/connect_containers, parent, loc_connections)
|
||||
connect_ref = WEAKREF(AddComponent(/datum/component/connect_containers, parent, loc_connections))
|
||||
|
||||
/datum/component/loads_avatar_gear/UnregisterFromParent()
|
||||
UnregisterSignal(parent, list(
|
||||
COMSIG_ATOM_ENTERING,
|
||||
))
|
||||
|
||||
qdel(GetComponent(/datum/component/connect_containers))
|
||||
qdel(connect_ref)
|
||||
|
||||
/datum/component/loads_avatar_gear/Destroy(force)
|
||||
load_callback = null
|
||||
|
||||
Reference in New Issue
Block a user