Files
Bubberstation/code/datums/components/holderloving.dm
Jonathan Rubenstein 456e475da5 Renews Maintenance Drones (#58249)
It's the second try! (First: #48456)

Drones are little robots inspired by Keepers from the Mass Effect games. With laws to maintain both the station, and their distance from the matters of others, they were a great ghost role that let you fix up the station when you were otherwise out of the round. They were in the game for quite a while, but were abused. The abusive players completely ignored the laws and did whatever they wanted. Being tiny ventcrawlers, this became a huge issue for admins.

I attempted to bring them back, this time with some gameplay restrictions to enforce their laws a bit better. It seemed to go well, but I required headmin approval, and this all happened near a headmin election, so the project died.

Recently, some people have wanted to bring drones back. So, they gave me a ring, and I started a discussion with the admin team to see what other changes they would want in addition to the previous ones.

Here are those changes:

    They can't interact at all when close to another being, living or dead
    Their binary chat has been removed to separate them from AI and borgs
    They can only hold a whitelist of items necessary to do their job
    They can only interact with machines necessary to do their job
    The drone satchel is gone, and drones now have built in basic tools
    They also can't interact in some blacklisted high risk areas
    Finally, you must play 40 hours total as a Silicon role in order to play as a drone

Additionally, the drone dispenser is not mapped, and the drones must be researched to be constructed.
Why It's Good For The Game

Drones are a fun way to pass the time, and this time they have a lot less freedom. You can still perform the basic function of maintaining the station, but not without difficulty and tedium. This will allow other station roles to perform much better than the drones, while still letting them chug along at their slower pace.
2021-04-13 13:10:36 +12:00

74 lines
2.4 KiB
Plaintext

/** Holder Loving Component
*
* This component is assigned to an [/obj/item], and also keeps track of a [holder].
* The [parent] is 'bound' to [holder]. [parent] will be kept either directly
* inside [holder], or in the inventory of a [/mob] that is itself holding [holder].
*
* If [parent] is placed in a [loc] that is not [holder] or [holder].[loc]
* (if it's a mob), it is placed back inside [holder].
*
* This is intended for items that are a 'part' of another item.
*
* It can also delete [parent] when [holder] is deleted.
*
*/
/datum/component/holderloving
can_transfer = TRUE
/** Item that parent is bound to.
* We try to keep parent either directly in holder, or in holder's loc if loc is a mob,
* and warp parent into holder if they go anywhere else.
*/
var/atom/holder
/// If parent is deleted when the holder gets deleted
var/del_parent_with_holder = FALSE
/datum/component/holderloving/Initialize(holder, del_parent_with_holder)
if(!isitem(parent) || !holder)
return COMPONENT_INCOMPATIBLE
src.holder = holder
if(del_parent_with_holder)
src.del_parent_with_holder = del_parent_with_holder
/datum/component/holderloving/RegisterWithParent()
RegisterSignal(holder, COMSIG_MOVABLE_MOVED, .proc/check_my_loc)
RegisterSignal(holder, COMSIG_PARENT_QDELETING, .proc/holder_deleting)
RegisterSignal(parent, list(
COMSIG_ITEM_DROPPED,
COMSIG_ITEM_EQUIPPED,
COMSIG_STORAGE_ENTERED,
COMSIG_STORAGE_EXITED,
), .proc/check_my_loc)
/datum/component/holderloving/UnregisterFromParent()
UnregisterSignal(holder, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING))
UnregisterSignal(parent, list(
COMSIG_ITEM_DROPPED,
COMSIG_ITEM_EQUIPPED,
COMSIG_STORAGE_ENTERED,
COMSIG_STORAGE_EXITED,
))
/datum/component/holderloving/PostTransfer()
if(!isitem(parent))
return COMPONENT_INCOMPATIBLE
/datum/component/holderloving/InheritComponent(datum/component/holderloving/friend, i_am_original, list/arguments)
if(i_am_original)
holder = friend.holder
/datum/component/holderloving/proc/check_valid_loc(atom/location)
return (location == holder || ( location == holder.loc && ismob(holder.loc) ))
/datum/component/holderloving/proc/holder_deleting(datum/source, force)
SIGNAL_HANDLER
if(del_parent_with_holder)
qdel(parent)
else
qdel(src)
/datum/component/holderloving/proc/check_my_loc(datum/source)
SIGNAL_HANDLER
var/obj/item/item_parent = parent
if(!check_valid_loc(item_parent.loc))
item_parent.forceMove(holder)