mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-17 04:27:39 +00:00
## About The Pull Request [This PR is a bounty requested by Ophaq and worked on by Singul0.](https://tgstation13.org/phpBB/viewtopic.php?f=5&t=36013) All of the following description in this PR is written by Ophaq as to what this PR entails: In this PR, the medical and engineering cyborg's tools are completely reworked and condensed into an arm similar to the implant a carbon would get. The tools are shown in a radial wheel around the character to quick select what is needed instead of looking for it in a cluttered bag of items. There are a few tools such as the blood filter for the medical cyborg, as well as the welder, gas analyzer, and t-ray scanner for the engineering cyborg excluded from the radial wheel. mostly due to their inherent inmodularity   Each cyborg gets two arms in case the player wishes to have one on the side to quick swap to, like having a scalpel in one arm and a hemostat in the other on the hotbar for convenience or just preference. An upgraded version of the tools has been added to each respective cyborg upgrade node with somewhat faster action speed. The upgrade replaces the arms and transforms them into the "advanced" version which is currently the same sprite as the regular but just a faster and more efficient version. The sprites for the surgical arm currently look good but may need replacing later if someone who wishes to resprite them down the line decides to do so. ## Why It's Good For The Game As it currently stands, the medical cyborg's magical bag of gadgets takes up a lot of your screen space and as a player who plays medical A LOT, this was a MUCH NEEDED quality of life feature. The amount of clutter in a medical cyborg's bag makes it in my opinion, hard to see at the bottom of the screen and a nuisance to constantly close compared to other models. My standard set up for playing medical cyborg on the hotbar is 1=med analyzer, 2=usually a secondary surgery tool or injector, and 3=another surgery tool. The flow of gameplay during surgery ends up being surgery tool, hit 3 and drop it, surgery tool, repeat or for efficiency using X to swap between the two surgery tools I need on 2 and 3. This gets tedious especially after so many hours of playing medical cyborg. I know some people may disagree, but I think it would help a lot of help to speed up this flow of gameplay during surgery and declutter. By turning the medical cyborg's toolset into an omni-surgery tool which functions like the surgery arm implant's radial wheel, this would greatly declutter by like an entire row and make things easier on medical cyborg players. Having a secondary in the bag helps with efficiency for those players who like having an extra tool on their hotbar and swapping back and forth would also improve efficiency and make less swapping by hitting Z needed. Additionally with the upgraded version as an optional upgrade in the mediborg tech, this also lets them be on par with players who use advanced tools late game but not at the level of alien tools where players would obviously out compete a mediborg in terms of action speed. Engineering models also benefit from this rework but at a slightly different and lesser way whereas certain tools are excluded such as the welder, due to the way they work on refill and the gas scanner and t-ray scanner not counting as tool components are not included in the arms. Syndicate versions of the engineering and medical cyborg also get these arms, unupgraded. ## Changelog 🆑 add: Adds an omnitoolset for both engineering and medical cyborgs, containing various basic tools qol: Engineer and Medical module inventory space is now significantly decluttered /🆑 --------- Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
159 lines
5.1 KiB
Plaintext
159 lines
5.1 KiB
Plaintext
#define PROXIMITY_NONE ""
|
|
#define PROXIMITY_ON_SCREEN "_red"
|
|
#define PROXIMITY_NEAR "_yellow"
|
|
|
|
/**
|
|
* Multitool -- A multitool is used for hacking electronic devices.
|
|
*
|
|
*/
|
|
|
|
|
|
|
|
|
|
/obj/item/multitool
|
|
name = "multitool"
|
|
desc = "Used for pulsing wires to test which to cut. Not recommended by doctors."
|
|
icon = 'icons/obj/devices/tool.dmi'
|
|
icon_state = "multitool"
|
|
inhand_icon_state = "multitool"
|
|
lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi'
|
|
force = 5
|
|
w_class = WEIGHT_CLASS_SMALL
|
|
tool_behaviour = TOOL_MULTITOOL
|
|
throwforce = 0
|
|
throw_range = 7
|
|
throw_speed = 3
|
|
drop_sound = 'sound/items/handling/multitool_drop.ogg'
|
|
pickup_sound = 'sound/items/handling/multitool_pickup.ogg'
|
|
custom_materials = list(/datum/material/iron= SMALL_MATERIAL_AMOUNT * 0.5, /datum/material/glass= SMALL_MATERIAL_AMOUNT * 0.2)
|
|
custom_premium_price = PAYCHECK_COMMAND * 3
|
|
toolspeed = 1
|
|
usesound = 'sound/weapons/empty.ogg'
|
|
var/datum/buffer // simple machine buffer for device linkage
|
|
var/mode = 0
|
|
|
|
/obj/item/multitool/examine(mob/user)
|
|
. = ..()
|
|
. += span_notice("Its buffer [buffer ? "contains [buffer]." : "is empty."]")
|
|
|
|
/obj/item/multitool/suicide_act(mob/living/carbon/user)
|
|
user.visible_message(span_suicide("[user] puts the [src] to [user.p_their()] chest. It looks like [user.p_theyre()] trying to pulse [user.p_their()] heart off!"))
|
|
return OXYLOSS//theres a reason it wasn't recommended by doctors
|
|
|
|
/**
|
|
* Sets the multitool internal object buffer
|
|
*
|
|
* Arguments:
|
|
* * buffer - the new object to assign to the multitool's buffer
|
|
*/
|
|
/obj/item/multitool/proc/set_buffer(datum/buffer)
|
|
if(src.buffer)
|
|
UnregisterSignal(src.buffer, COMSIG_QDELETING)
|
|
src.buffer = buffer
|
|
if(!QDELETED(buffer))
|
|
RegisterSignal(buffer, COMSIG_QDELETING, PROC_REF(on_buffer_del))
|
|
|
|
/**
|
|
* Called when the buffer's stored object is deleted
|
|
*
|
|
* This proc does not clear the buffer of the multitool, it is here to
|
|
* handle the deletion of the object the buffer references
|
|
*/
|
|
/obj/item/multitool/proc/on_buffer_del(datum/source)
|
|
SIGNAL_HANDLER
|
|
buffer = null
|
|
|
|
// Syndicate device disguised as a multitool; it will turn red when an AI camera is nearby.
|
|
|
|
/obj/item/multitool/ai_detect
|
|
actions_types = list(/datum/action/item_action/toggle_multitool)
|
|
var/detect_state = PROXIMITY_NONE
|
|
var/rangealert = 8 //Glows red when inside
|
|
var/rangewarning = 20 //Glows yellow when inside
|
|
var/hud_type = DATA_HUD_AI_DETECT
|
|
var/detecting = FALSE
|
|
|
|
/obj/item/multitool/ai_detect/Destroy()
|
|
STOP_PROCESSING(SSfastprocess, src)
|
|
return ..()
|
|
|
|
/obj/item/multitool/ai_detect/ui_action_click()
|
|
return
|
|
|
|
/obj/item/multitool/ai_detect/update_icon_state()
|
|
. = ..()
|
|
icon_state = "[initial(icon_state)][detect_state]"
|
|
|
|
/obj/item/multitool/ai_detect/process()
|
|
var/old_detect_state = detect_state
|
|
multitool_detect()
|
|
if(detect_state != old_detect_state)
|
|
update_appearance()
|
|
|
|
/obj/item/multitool/ai_detect/proc/toggle_detect(mob/user)
|
|
detecting = !detecting
|
|
if(user)
|
|
to_chat(user, span_notice("You toggle the ai detection feature on [src] [detecting ? "on" : "off"]."))
|
|
if(!detecting)
|
|
detect_state = PROXIMITY_NONE
|
|
update_appearance()
|
|
STOP_PROCESSING(SSfastprocess, src)
|
|
return
|
|
if(detecting)
|
|
START_PROCESSING(SSfastprocess, src)
|
|
|
|
/obj/item/multitool/ai_detect/proc/multitool_detect()
|
|
var/turf/our_turf = get_turf(src)
|
|
detect_state = PROXIMITY_NONE
|
|
|
|
for(var/mob/camera/ai_eye/AI_eye as anything in GLOB.aiEyes)
|
|
if(!AI_eye.ai_detector_visible)
|
|
continue
|
|
|
|
var/distance = get_dist(our_turf, get_turf(AI_eye))
|
|
|
|
if(distance == -1) //get_dist() returns -1 for distances greater than 127 (and for errors, so assume -1 is just max range)
|
|
if(our_turf == get_turf(AI_eye)) // EXCEPT if the AI is on our TURF(ITS RIGHT ONTOP OF US!!!!)
|
|
detect_state = PROXIMITY_ON_SCREEN
|
|
break
|
|
continue
|
|
|
|
if(distance < rangealert) //ai should be able to see us
|
|
detect_state = PROXIMITY_ON_SCREEN
|
|
break
|
|
if(distance < rangewarning) //ai cant see us but is close
|
|
detect_state = PROXIMITY_NEAR
|
|
|
|
/datum/action/item_action/toggle_multitool
|
|
name = "Toggle AI detecting mode"
|
|
check_flags = NONE
|
|
|
|
/datum/action/item_action/toggle_multitool/Trigger(trigger_flags)
|
|
if(!..())
|
|
return FALSE
|
|
if(target)
|
|
var/obj/item/multitool/ai_detect/M = target
|
|
M.toggle_detect(owner)
|
|
return TRUE
|
|
|
|
/obj/item/multitool/abductor
|
|
name = "alien multitool"
|
|
desc = "An omni-technological interface."
|
|
icon = 'icons/obj/antags/abductor.dmi'
|
|
icon_state = "multitool"
|
|
belt_icon_state = "multitool_alien"
|
|
custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 1.25, /datum/material/plasma = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/titanium = SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SHEET_MATERIAL_AMOUNT)
|
|
toolspeed = 0.1
|
|
|
|
/obj/item/multitool/cyborg
|
|
name = "electronic multitool"
|
|
desc = "Optimised version of a regular multitool. Streamlines processes handled by its internal microchip."
|
|
icon = 'icons/obj/items_cyborg.dmi'
|
|
icon_state = "toolkit_engiborg_multitool"
|
|
toolspeed = 0.5
|
|
|
|
#undef PROXIMITY_NEAR
|
|
#undef PROXIMITY_NONE
|
|
#undef PROXIMITY_ON_SCREEN
|