refactor action buttons (#29416)

* refactor action buttons

* fix cult spell charge overlay

* lewc review

* update for a/mhelp buttons and xenobio organs

* update for minebot

* properly create button each time

* directly add/remove unavail overlay for reasons

* lewc review
This commit is contained in:
warriorstar-orion
2025-07-28 19:13:28 +00:00
committed by GitHub
parent f9016e65ff
commit 56f4960ed4
115 changed files with 815 additions and 584 deletions
+6 -12
View File
@@ -301,8 +301,7 @@
// deck datum actions
/datum/action/item_action/draw_card
name = "Draw - Draw one card"
button_overlay_icon_state = "draw"
use_itemicon = FALSE
button_icon_state = "draw"
/datum/action/item_action/draw_card/Trigger(left_click)
if(istype(target, /obj/item/deck))
@@ -312,8 +311,7 @@
/datum/action/item_action/deal_card
name = "Deal - deal one card to a person next to you"
button_overlay_icon_state = "deal_card"
use_itemicon = FALSE
button_icon_state = "deal_card"
/datum/action/item_action/deal_card/Trigger(left_click)
if(istype(target, /obj/item/deck))
@@ -323,8 +321,7 @@
/datum/action/item_action/deal_card_multi
name = "Deal multiple card - Deal multiple card to a person next to you"
button_overlay_icon_state = "deal_card_multi"
use_itemicon = FALSE
button_icon_state = "deal_card_multi"
/datum/action/item_action/deal_card_multi/Trigger(left_click)
if(istype(target, /obj/item/deck))
@@ -334,8 +331,7 @@
/datum/action/item_action/shuffle
name = "Shuffle - shuffle the deck"
button_overlay_icon_state = "shuffle"
use_itemicon = FALSE
button_icon_state = "shuffle"
/datum/action/item_action/shuffle/Trigger(left_click)
if(istype(target, /obj/item/deck))
@@ -890,8 +886,7 @@
/datum/action/item_action/remove_card
name = "Remove a card - Remove a single card from the hand."
button_overlay_icon_state = "remove_card"
use_itemicon = FALSE
button_icon_state = "remove_card"
/datum/action/item_action/remove_card/IsAvailable()
var/obj/item/cardhand/C = target
@@ -909,8 +904,7 @@
/datum/action/item_action/discard
name = "Discard - Place one or more cards from your hand in front of you."
button_overlay_icon_state = "discard"
use_itemicon = FALSE
button_icon_state = "discard"
/datum/action/item_action/discard/Trigger(left_click)
if(istype(target, /obj/item/cardhand))