mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Merge pull request #24342 from ChangelingRain/researchscanfix
You can now have multiple research scanners active at a time
This commit is contained in:
+10
-12
@@ -330,32 +330,30 @@
|
||||
/datum/action/item_action/hands_free/activate
|
||||
name = "Activate"
|
||||
|
||||
|
||||
/datum/action/item_action/hands_free/shift_nerves
|
||||
name = "Shift Nerves"
|
||||
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner
|
||||
name = "Toggle Research Scanner"
|
||||
button_icon_state = "scan_mode"
|
||||
var/active = FALSE
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/Trigger()
|
||||
if(IsAvailable())
|
||||
owner.research_scanner = !owner.research_scanner
|
||||
owner << "<span class='notice'>Research analyzer is now [owner.research_scanner ? "active" : "deactivated"].</span>"
|
||||
active = !active
|
||||
if(active)
|
||||
owner.research_scanner++
|
||||
else
|
||||
owner.research_scanner--
|
||||
owner << "<span class='notice'>[target] research scanner has been [active ? "activated" : "deactivated"].</span>"
|
||||
return 1
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/Remove(mob/M)
|
||||
if(owner)
|
||||
owner.research_scanner = 0
|
||||
if(owner && active)
|
||||
owner.research_scanner--
|
||||
active = FALSE
|
||||
..()
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner/ApplyIcon(obj/screen/movable/action_button/current_button)
|
||||
current_button.cut_overlays()
|
||||
if(button_icon && button_icon_state)
|
||||
var/image/img = image(button_icon, current_button, "scan_mode")
|
||||
current_button.add_overlay(img)
|
||||
|
||||
/datum/action/item_action/organ_action
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user