mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-22 05:25:15 +01:00
[MIRROR] Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. [MDB IGNORE] (#17907)
* Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. * conflicts * Modular! * update modular * icon icon icon icon icon Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com> Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@
|
||||
|
||||
/datum/action/innate/bci_action
|
||||
name = "Action"
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
check_flags = AB_CHECK_CONSCIOUS
|
||||
button_icon_state = "bci_power"
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
/datum/action/innate/bci_charge_action
|
||||
name = "Check BCI Charge"
|
||||
check_flags = NONE
|
||||
icon_icon = 'icons/obj/power.dmi'
|
||||
button_icon = 'icons/obj/power.dmi'
|
||||
button_icon_state = "cell"
|
||||
|
||||
var/obj/item/circuit_component/bci_core/circuit_component
|
||||
@@ -248,11 +248,11 @@
|
||||
|
||||
src.circuit_component = circuit_component
|
||||
|
||||
UpdateButtons()
|
||||
build_all_button_icons()
|
||||
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/datum/action/innate/bci_charge_action/CreateButton()
|
||||
/datum/action/innate/bci_charge_action/create_button()
|
||||
var/atom/movable/screen/movable/action_button/button = ..()
|
||||
button.maptext_x = 2
|
||||
button.maptext_y = 0
|
||||
@@ -276,14 +276,10 @@
|
||||
to_chat(owner, span_info("You can recharge it by using a cyborg recharging station."))
|
||||
|
||||
/datum/action/innate/bci_charge_action/process(delta_time)
|
||||
UpdateButtons()
|
||||
build_all_button_icons(UPDATE_BUTTON_STATUS)
|
||||
|
||||
/datum/action/innate/bci_charge_action/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force = FALSE)
|
||||
/datum/action/innate/bci_charge_action/update_button_status(atom/movable/screen/movable/action_button/button, force = FALSE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(status_only)
|
||||
return
|
||||
var/obj/item/stock_parts/cell/cell = circuit_component.parent.cell
|
||||
button.maptext = cell ? MAPTEXT("[cell.percent()]%") : ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user