mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 20:13:08 +00:00
* Base work for the unathi robot subspecies. * Adds metabolism species, kidney vars, and the robot unathi organs. * Moves some action buttons to organs, pretty much a bay port right now. Todo: the unathi and alien stuff should also go here. * First autakh implant power. * Fixes the organs action button this time. * Finishes more implants, and interactions with flashs and vaurca. * Prepare for great changes. * Drops the real bomb, boss. * He who fights with monsters. * Far more work into augments and limb removing powers. * Limb verbs should be good now. * A LOT of work into the assited organ, allowing it to bleed and etc, as well adding a new chem that will stop bleeding in their case. * Probably the last work on implants. * Some extra touches. * Some tweaks to the species. * More fixes and adds kyre's sprites. * More runtime fixes. * Fixes the species name too. * Fixes travis. * Updates this file too to work with the new tools procs. * Adds changelog * Fixed changelog. * Unathi hair and lore description. * Some tweaks to this too. * Locks away them for now, they will be released after we got all the events and etc done. * Changes this chemical. * Fixes an airlock runtime. * Adds the non scan flag to the autakh, mostly due to some bizzare interactions with changelings and cloning. * Organs removal changes; can't take out the organ if it is too damage. * Restricts them back again. * Robotic organs now have the proper icons and names. * Adds sprites for their organs and some extra tweaks. * Fixes this missing icon. * emp should also now hurt assited organs. * Tweaks more organ related things. * Fixes the head not being properly set as well. * Fixes their flags. * fixes the flag for real this time. * Poze's review. * Changes the au'takh organ buttons to don't be animated. * Helps with adminbus or something. * Fowl's requested changes. * Fixes a typo. * Robotic limb's brute and burn mods are now controlled by the limb model. * Fowl's changes once more. * Stops some spam. * More grammar. * No eal. * Skull's review.
77 lines
2.5 KiB
Plaintext
77 lines
2.5 KiB
Plaintext
/**
|
|
* Multitool -- A multitool is used for hacking electronic devices.
|
|
* TO-DO -- Using it as a power measurement tool for cables etc. Nannek.
|
|
*
|
|
*/
|
|
|
|
/obj/item/device/multitool
|
|
name = "multitool"
|
|
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
|
icon_state = "multitool"
|
|
flags = CONDUCT
|
|
force = 5.0
|
|
w_class = 2.0
|
|
throwforce = 5.0
|
|
throw_range = 15
|
|
throw_speed = 3
|
|
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
|
|
|
|
matter = list(DEFAULT_WALL_MATERIAL = 50,"glass" = 20)
|
|
|
|
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINEERING = 1)
|
|
|
|
var/obj/machinery/buffer // simple machine buffer for device linkage
|
|
var/obj/machinery/clonepod/connecting //same for cryopod linkage
|
|
var/buffer_name
|
|
var/atom/buffer_object
|
|
|
|
/obj/item/device/multitool/Destroy()
|
|
unregister_buffer(buffer_object)
|
|
return ..()
|
|
|
|
/obj/item/device/multitool/ismultitool()
|
|
return TRUE
|
|
|
|
/obj/item/device/multitool/proc/get_buffer(var/typepath)
|
|
// Only allow clearing the buffer name when someone fetches the buffer.
|
|
// Means you cannot be sure the source hasn't been destroyed until the very moment it's needed.
|
|
get_buffer_name(TRUE)
|
|
if(buffer_object && (!typepath || istype(buffer_object, typepath)))
|
|
return buffer_object
|
|
|
|
/obj/item/device/multitool/proc/get_buffer_name(var/null_name_if_missing = FALSE)
|
|
if(buffer_object)
|
|
buffer_name = buffer_object.name
|
|
else if(null_name_if_missing)
|
|
buffer_name = null
|
|
return buffer_name
|
|
|
|
/obj/item/device/multitool/proc/set_buffer(var/atom/buffer)
|
|
if(!buffer || istype(buffer))
|
|
buffer_name = buffer ? buffer.name : null
|
|
if(buffer != buffer_object)
|
|
unregister_buffer(buffer_object)
|
|
buffer_object = buffer
|
|
if(buffer_object)
|
|
destroyed_event.register(buffer_object, src, /obj/item/device/multitool/proc/unregister_buffer)
|
|
|
|
/obj/item/device/multitool/proc/unregister_buffer(var/atom/buffer_to_unregister)
|
|
// Only remove the buffered object, don't reset the name
|
|
// This means one cannot know if the buffer has been destroyed until one attempts to use it.
|
|
if(buffer_to_unregister == buffer_object && buffer_object)
|
|
destroyed_event.unregister(buffer_object, src)
|
|
buffer_object = null
|
|
|
|
/obj/item/device/multitool/resolve_attackby(atom/A, mob/user)
|
|
if(!isobj(A))
|
|
return ..(A, user)
|
|
|
|
var/obj/O = A
|
|
var/datum/expansion/multitool/MT = LAZYACCESS(O.expansions, /datum/expansion/multitool)
|
|
if(!MT)
|
|
return ..(A, user)
|
|
|
|
user.AddTopicPrint(src)
|
|
MT.interact(src, user)
|
|
return 1
|