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
+9
View File
@@ -4,3 +4,12 @@
#define UPDATE_BUTTON_BACKGROUND (1<<2)
#define UPDATE_BUTTON_OVERLAY (1<<3)
#define UPDATE_BUTTON_STATUS (1<<4)
// Defines for formatting cooldown actions for the stat panel.
/// The stat panel the action is displayed in.
#define PANEL_DISPLAY_PANEL "panel"
/// The status shown in the stat panel.
/// Can be stuff like "ready", "on cooldown", "active", "charges", "charge cost", etc.
#define PANEL_DISPLAY_STATUS "status"
/// The name shown in the stat panel.
#define PANEL_DISPLAY_NAME "name"
+2 -1
View File
@@ -85,7 +85,8 @@
#define COMSIG_ACTION_REMOVED "action_removed"
/// From /datum/action/Remove(): (datum/action)
#define COMSIG_MOB_REMOVED_ACTION "mob_action_removed"
/// From /datum/action/apply_button_overlay()
#define COMSIG_ACTION_OVERLAY_APPLY "action_overlay_applied"
// /datum/objective
+11 -5
View File
@@ -10,6 +10,13 @@
/// The HUD this action button belongs to
var/datum/hud/our_hud
/// The overlay we have overtop our button
var/mutable_appearance/button_overlay
/// The icon state of our active overlay, used to prevent re-applying identical overlays
var/active_overlay_icon_state
/// The icon state of our active underlay, used to prevent re-applying identical underlays
var/active_underlay_icon_state
/// Where we are currently placed on the hud. SCRN_OBJ_DEFAULT asks the linked action what it thinks
var/location = SCRN_OBJ_DEFAULT
/// A unique bitflag, combined with the name of our linked action this lets us persistently remember any user changes to our position
@@ -212,10 +219,9 @@
closeToolTip(usr)
return ..()
/mob/proc/update_action_buttons_icon(status_only = FALSE)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtons(status_only)
/mob/proc/update_action_buttons_icon(update_flags = ALL, force = FALSE)
for(var/datum/action/current_action as anything in actions)
current_action.build_all_button_icons(update_flags, force)
//This is the proc used to update all the action buttons.
/mob/proc/update_action_buttons(reload_screen)
@@ -227,7 +233,7 @@
for(var/datum/action/action as anything in actions)
var/atom/movable/screen/movable/action_button/button = action.viewers[hud_used]
action.UpdateButtons()
action.build_all_button_icons()
if(reload_screen)
client.screen += button
client.update_active_keybindings()
+175 -50
View File
@@ -3,14 +3,22 @@
var/desc = null
var/obj/target = null
var/check_flags = 0
/// Icon that our button screen object overlay and background
var/button_overlay_icon = 'icons/mob/actions/actions.dmi'
/// Icon state of screen object overlay
var/button_overlay_icon_state = ACTION_BUTTON_DEFAULT_OVERLAY
/// Icon that our button screen object background will have
var/button_background_icon = 'icons/mob/actions/actions.dmi'
/// This is the icon state state for the BACKGROUND underlay icon of the button
/// (If set to ACTION_BUTTON_DEFAULT_BACKGROUND, uses the hud's default background)
var/background_icon = 'icons/mob/actions/actions.dmi'
/// Icon state of screen object background
var/button_background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND
var/background_icon_state = ACTION_BUTTON_DEFAULT_BACKGROUND
/// This is the file for the icon that appears on the button
var/button_icon = 'icons/mob/actions/actions.dmi'
/// This is the icon state for the icon that appears on the button
var/button_icon_state = ACTION_BUTTON_DEFAULT_OVERLAY
/// This is the file for any FOREGROUND overlay icons on the button (such as borders)
var/overlay_icon = 'icons/mob/actions/actions.dmi'
/// This is the icon state for any FOREGROUND overlay icons on the button (such as borders)
var/overlay_icon_state
var/buttontooltipstyle = ""
var/transparent_when_unavailable = TRUE
var/mob/owner
@@ -20,10 +28,21 @@
var/list/viewers = list()
/// Whether or not this will be shown to observers
var/show_to_observers = TRUE
/// Toggles whether this action is usable or not
var/action_disabled = FALSE
/// The appearance used as an overlay for when the action is unavailable
var/mutable_appearance/unavailable_effect
/datum/action/New(target)
link_to(target)
/datum/action/New(Target)
target = Target
/// Links the passed target to our action, registering any relevant signals
/datum/action/proc/link_to(target_)
target = target_
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clear_ref), override = TRUE)
if(isatom(target))
RegisterSignal(target, COMSIG_ATOM_UPDATED_ICON, PROC_REF(on_target_icon_update))
/datum/action/proc/should_draw_cooldown()
return !IsAvailable()
@@ -79,10 +98,10 @@
UnregisterSignal(owner, COMSIG_PARENT_QDELETING)
owner = null
/datum/action/proc/UpdateButtons(status_only, force)
for(var/datum/hud/hud in viewers)
var/atom/movable/screen/movable/button = viewers[hud]
UpdateButton(button, status_only, force)
/// Builds / updates all buttons we have shared or given out
/datum/action/proc/build_all_button_icons(update_flags = ALL, force)
for(var/datum/hud/hud as anything in viewers)
build_button_icon(viewers[hud], update_flags, force)
/datum/action/proc/Trigger(left_click = TRUE)
if(!IsAvailable())
@@ -123,31 +142,60 @@
return FALSE
return TRUE
/datum/action/proc/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force = FALSE)
/**
* Builds the icon of the button.
*
* Concept:
* - Underlay (Background icon)
* - Icon (button icon)
* - Maptext
* - Overlay (Background border)
*
* button - which button we are modifying the icon of
* force - whether we're forcing a full update
*/
/datum/action/proc/build_button_icon(atom/movable/screen/movable/action_button/button, update_flags = ALL, force = FALSE)
if(!button)
return
if(!status_only)
button.name = name
if(desc)
button.desc = "[desc] [initial(button.desc)]"
if(owner?.hud_used && button_background_icon_state == ACTION_BUTTON_DEFAULT_BACKGROUND)
var/list/settings = owner.hud_used.get_action_buttons_icons()
if(button.icon != settings["bg_icon"])
button.icon = settings["bg_icon"]
if(button.icon_state != settings["bg_state"])
button.icon_state = settings["bg_state"]
else
if(button.icon != button_background_icon)
button.icon = button_background_icon
if(button.icon_state != button_background_icon_state)
button.icon_state = button_background_icon_state
if(update_flags & UPDATE_BUTTON_NAME)
update_button_name(button, force)
if(update_flags & UPDATE_BUTTON_BACKGROUND)
apply_button_background(button, force)
if(update_flags & UPDATE_BUTTON_ICON)
apply_button_icon(button, force)
if(update_flags & UPDATE_BUTTON_OVERLAY)
apply_button_overlay(button, force)
if(update_flags & UPDATE_BUTTON_STATUS)
update_button_status(button, force)
/**
* Updates the name and description of the button to match our action name and discription.
*
* button - what button are we editing?
* force - whether an update is forced regardless of existing status
*/
/datum/action/proc/update_button_name(atom/movable/screen/movable/action_button/button, force = FALSE)
button.name = name
if(desc)
button.desc = desc
/**
* Any other miscellaneous "status" updates within the action button is handled here,
* such as redding out when unavailable or modifying maptext.
*
* button - what button are we editing?
* force - whether an update is forced regardless of existing status
*/
/datum/action/proc/update_button_status(atom/movable/screen/movable/action_button/button, force = FALSE)
button.overlays -= unavailable_effect
button.maptext = ""
if(should_draw_cooldown())
apply_unavailable_effect(button)
else
return TRUE
//Give our action button to the player
/datum/action/proc/GiveAction(mob/viewer)
@@ -164,7 +212,7 @@
return
var/atom/movable/screen/movable/action_button/button = CreateButton()
var/atom/movable/screen/movable/action_button/button = create_button()
SetId(button, viewer)
button.our_hud = our_hud
@@ -186,10 +234,11 @@
qdel(button)
/datum/action/proc/CreateButton()
/datum/action/proc/create_button()
var/atom/movable/screen/movable/action_button/button = new()
button.linked_action = src
button.name = name
build_button_icon(button, ALL, force = TRUE)
// TODO: Pull all of this into the build button structure somehow later
button.actiontooltipstyle = buttontooltipstyle
var/list/our_description = list()
our_description += desc
@@ -197,7 +246,6 @@
button.desc = our_description.Join(" ")
return button
/datum/action/proc/SetId(atom/movable/screen/movable/action_button/our_button, mob/owner)
//button id generation
var/bitfield = 0
@@ -215,20 +263,97 @@
our_button.id = bitflag
return
/datum/action/proc/apply_unavailable_effect(atom/movable/screen/movable/action_button/B)
var/image/img = image('icons/mob/screen_white.dmi', icon_state = "template")
img.alpha = 200
img.appearance_flags = RESET_COLOR | RESET_ALPHA
img.color = "#000000"
img.plane = FLOAT_PLANE + 1
B.add_overlay(img)
/datum/action/proc/apply_unavailable_effect(atom/movable/screen/movable/action_button/button)
if(isnull(unavailable_effect))
unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', icon_state = "template")
unavailable_effect.alpha = 200
unavailable_effect.appearance_flags = RESET_COLOR | RESET_ALPHA
unavailable_effect.color = "#000000"
unavailable_effect.plane = FLOAT_PLANE + 1
button.overlays |= unavailable_effect
/**
* Applies any overlays to our button
*
* button - what button are we editing?
* force - whether an update is forced regardless of existing status
*/
/datum/action/proc/apply_button_overlay(atom/movable/screen/movable/action_button/button, force = FALSE)
SEND_SIGNAL(src, COMSIG_ACTION_OVERLAY_APPLY, button, force)
/datum/action/proc/apply_button_overlay(atom/movable/screen/movable/action_button/current_button)
current_button.cut_overlays()
if(button_overlay_icon && button_overlay_icon_state)
var/image/img = image(button_overlay_icon, current_button, button_overlay_icon_state)
img.appearance_flags = RESET_COLOR | RESET_ALPHA
img.pixel_x = 0
img.pixel_y = 0
current_button.add_overlay(img)
if(!overlay_icon || !overlay_icon_state || (button.active_overlay_icon_state == overlay_icon_state && !force))
return
button.cut_overlay(button.button_overlay)
button.button_overlay = mutable_appearance(icon = overlay_icon, icon_state = overlay_icon_state, appearance_flags = (RESET_COLOR|RESET_ALPHA))
button.add_overlay(button.button_overlay)
button.active_overlay_icon_state = overlay_icon_state
/// Checks if our action is actively selected. Used for selecting icons primarily.
/datum/action/proc/is_action_active(atom/movable/screen/movable/action_button/button)
return FALSE
/**
* Creates the background underlay for the button
*
* button - what button are we editing?
* force - whether an update is forced regardless of existing status
*/
/datum/action/proc/apply_button_background(atom/movable/screen/movable/action_button/button, force = FALSE)
if(!background_icon || !background_icon_state || (button.active_underlay_icon_state == background_icon_state && !force))
return
// What icons we use for our background
var/list/icon_settings = list(
// The icon file
"bg_icon" = background_icon,
// The icon state, if is_action_active() returns FALSE
"bg_state" = background_icon_state,
// The icon state, if is_action_active() returns TRUE
"bg_state_active" = background_icon_state,
)
// If background_icon_state is ACTION_BUTTON_DEFAULT_BACKGROUND instead use our hud's action button scheme
if(background_icon_state == ACTION_BUTTON_DEFAULT_BACKGROUND && owner?.hud_used)
icon_settings = owner.hud_used.get_action_buttons_icons()
// Determine which icon to use
var/used_icon_key = is_action_active(button) ? "bg_state_active" : "bg_state"
// Make the underlay
button.underlays.Cut()
var/image/underlay = image(icon = icon_settings["bg_icon"], icon_state = icon_settings[used_icon_key])
button.underlays += underlay
button.active_underlay_icon_state = icon_settings[used_icon_key]
/**
* Applies our button icon and icon state to the button
*
* button - what button are we editing?
* force - whether an update is forced regardless of existing status
*/
/datum/action/proc/apply_button_icon(atom/movable/screen/movable/action_button/button, force = FALSE)
if(!button_icon || !button_icon_state || (button.icon_state == button_icon_state && !force))
return
button.icon = button_icon
button.icon_state = button_icon_state
/// Updates our buttons if our target's icon was updated
/datum/action/proc/on_target_icon_update(datum/source, updates, updated)
SIGNAL_HANDLER // COMSIG_ATOM_UPDATED_ICON
var/update_flag = NONE
var/forced = FALSE
if(updates & UPDATE_ICON_STATE)
update_flag |= UPDATE_BUTTON_ICON
forced = TRUE
if(updates & UPDATE_OVERLAYS)
update_flag |= UPDATE_BUTTON_OVERLAY
forced = TRUE
if(updates & (UPDATE_NAME|UPDATE_DESC))
update_flag |= UPDATE_BUTTON_NAME
// Status is not relevant, and background is not relevant. Neither will change
// Force the update if an icon state or overlay change was done
build_all_button_icons(update_flag, forced)
+22 -51
View File
@@ -1,17 +1,15 @@
//Presets for item actions
/datum/action/item_action
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_HANDS_BLOCKED|AB_CHECK_CONSCIOUS
var/use_itemicon = TRUE
button_icon_state = null
/datum/action/item_action/New(Target, custom_icon, custom_icon_state)
/datum/action/item_action/New(Target)
..()
var/obj/item/I = target
I.actions += src
if(custom_icon && custom_icon_state)
use_itemicon = FALSE
button_overlay_icon = custom_icon
button_overlay_icon_state = custom_icon_state
UpdateButtons()
// If our button state is null, use the target's icon instead
if(target && isnull(button_icon_state))
AddComponent(/datum/component/action_item_overlay, target)
/datum/action/item_action/Destroy()
var/obj/item/I = target
@@ -27,25 +25,6 @@
I.ui_action_click(owner, type, left_click)
return TRUE
/datum/action/item_action/apply_button_overlay(atom/movable/screen/movable/action_button/current_button)
if(use_itemicon)
if(target)
var/obj/item/I = target
var/old_layer = I.layer
var/old_plane = I.plane
var/old_appearance_flags = I.appearance_flags
I.layer = FLOAT_LAYER //AAAH
I.plane = FLOAT_PLANE //^ what that guy said
I.appearance_flags |= RESET_COLOR | RESET_ALPHA
current_button.cut_overlays()
current_button.add_overlay(I)
I.layer = old_layer
I.plane = old_plane
I.appearance_flags = old_appearance_flags
else
..()
/datum/action/item_action/toggle_light
name = "Toggle Light"
@@ -60,13 +39,11 @@
/datum/action/item_action/print_forensic_report
name = "Print Report"
button_overlay_icon_state = "scanner_print"
use_itemicon = FALSE
button_icon_state = "scanner_print"
/datum/action/item_action/clear_records
name = "Clear Scanner Records"
button_overlay_icon_state = "scanner_clear"
use_itemicon = FALSE
button_icon_state = "scanner_clear"
/datum/action/item_action/toggle_gunlight
name = "Toggle Gunlight"
@@ -86,14 +63,9 @@
/datum/action/item_action/set_internals
name = "Set Internals"
/datum/action/item_action/set_internals/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force)
if(!..()) // no button available
return
if(!iscarbon(owner))
return
var/mob/living/carbon/C = owner
if(target == C.internal)
button.icon_state = "template_active"
/datum/action/item_action/set_internals/is_action_active(atom/movable/screen/movable/action_button/button)
var/mob/living/carbon/carbon_owner = owner
return istype(carbon_owner) && target == carbon_owner.internal
/datum/action/item_action/toggle_mister
name = "Toggle Mister"
@@ -121,27 +93,27 @@
/datum/action/item_action/toggle_unfriendly_fire
name = "Toggle Friendly Fire \[ON\]"
desc = "Toggles if the club's blasts cause friendly fire."
button_overlay_icon_state = "vortex_ff_on"
button_icon_state = "vortex_ff_on"
/datum/action/item_action/toggle_unfriendly_fire/Trigger(left_click)
if(..())
UpdateButtons()
build_all_button_icons()
/datum/action/item_action/toggle_unfriendly_fire/UpdateButtons()
/datum/action/item_action/toggle_unfriendly_fire/build_all_button_icons(update_flags, force)
if(istype(target, /obj/item/hierophant_club))
var/obj/item/hierophant_club/H = target
if(H.friendly_fire_check)
button_overlay_icon_state = "vortex_ff_off"
button_icon_state = "vortex_ff_off"
name = "Toggle Friendly Fire \[OFF\]"
else
button_overlay_icon_state = "vortex_ff_on"
button_icon_state = "vortex_ff_on"
name = "Toggle Friendly Fire \[ON\]"
..()
/datum/action/item_action/vortex_recall
name = "Vortex Recall"
desc = "Recall yourself, and anyone nearby, to an attuned hierophant beacon at any time.<br>If the beacon is still attached, will detach it."
button_overlay_icon_state = "vortex_recall"
button_icon_state = "vortex_recall"
/datum/action/item_action/vortex_recall/IsAvailable()
if(istype(target, /obj/item/hierophant_club))
@@ -278,7 +250,7 @@
/datum/action/item_action/toggle_research_scanner
name = "Toggle Research Scanner"
button_overlay_icon_state = "scan_mode"
button_icon_state = "scan_mode"
/datum/action/item_action/toggle_research_scanner/Trigger(left_click)
if(IsAvailable())
@@ -293,8 +265,8 @@
/datum/action/item_action/toggle_research_scanner/apply_button_overlay(atom/movable/screen/movable/action_button/current_button)
current_button.cut_overlays()
if(button_overlay_icon && button_overlay_icon_state)
var/image/img = image(button_overlay_icon, current_button, "scan_mode")
if(button_icon && button_icon_state)
var/image/img = image(button_icon, current_button, "scan_mode")
img.appearance_flags = RESET_COLOR | RESET_ALPHA
current_button.overlays += img
@@ -320,15 +292,13 @@
/datum/action/item_action/slipping
name = "Tactical Slip"
desc = "Activates the clown shoes' ankle-stimulating module, allowing the user to do a short slip forward going under anyone."
button_overlay_icon_state = "clown"
button_icon_state = "clown"
// Jump boots
/datum/action/item_action/bhop
name = "Activate Jump Boots"
desc = "Activates the jump boot's internal propulsion system, allowing the user to dash over 4-wide gaps."
button_overlay_icon_state = "jetboot"
use_itemicon = FALSE
button_icon_state = "jetboot"
/datum/action/item_action/gravity_jump
name = "Gravity jump"
@@ -408,3 +378,4 @@
/datum/action/item_action/call_link
name = "Call MODlink"
+16 -17
View File
@@ -1,6 +1,6 @@
//Preset for spells
/datum/action/spell_action
button_background_icon_state = "bg_spell"
background_icon_state = "bg_spell"
var/recharge_text_color = "#FFFFFF"
/datum/action/spell_action/New(Target)
@@ -9,12 +9,11 @@
S.action = src
name = S.name
desc = S.desc
button_overlay_icon = S.action_icon
button_background_icon = S.action_background_icon
button_overlay_icon_state = S.action_icon_state
button_background_icon_state = S.action_background_icon_state
UpdateButtons()
button_icon = S.action_icon
button_icon_state = S.action_icon_state
background_icon = S.action_background_icon
background_icon_state = S.action_background_icon_state
build_all_button_icons()
/datum/action/spell_action/Destroy()
var/datum/spell/S = target
@@ -53,17 +52,17 @@
if(!istype(S))
return ..()
var/alpha = S.cooldown_handler.get_cooldown_alpha()
unavailable_effect = mutable_appearance('icons/mob/screen_white.dmi', icon_state = "template")
unavailable_effect.appearance_flags = RESET_COLOR | RESET_ALPHA
unavailable_effect.color = "#000000"
unavailable_effect.plane = FLOAT_PLANE + 1
unavailable_effect.alpha = S.cooldown_handler.get_cooldown_alpha()
var/image/img = image('icons/mob/screen_white.dmi', icon_state = "template")
img.alpha = alpha
img.appearance_flags = RESET_COLOR | RESET_ALPHA
img.color = "#000000"
img.plane = FLOAT_PLANE + 1
button.add_overlay(img)
// Make a holder for the charge text
var/image/count_down_holder = image('icons/effects/effects.dmi', icon_state = "nothing")
count_down_holder.plane = FLOAT_PLANE + 1.1
var/image/count_down_holder = mutable_appearance('icons/effects/effects.dmi', icon_state = "nothing", appearance_flags = RESET_COLOR | RESET_ALPHA)
var/text = S.cooldown_handler.cooldown_info()
count_down_holder.maptext_y = 4
count_down_holder.maptext = "<div style=\"font-size:6pt;color:[recharge_text_color];font:'Small Fonts';text-align:center;\" valign=\"bottom\">[text]</div>"
button.add_overlay(count_down_holder)
unavailable_effect.add_overlay(count_down_holder)
button.overlays |= unavailable_effect
@@ -0,0 +1,81 @@
/**
* Apply to an action to allow it to take an item
* and apply it as an overlay of the action button
*/
/datum/component/action_item_overlay
/// UID of the item the component uses to apply as an overlay.
var/item_uid
/// Callback that dictates what item the component uses to apply as an overlay.
var/datum/callback/item_callback
/// The appearance of the item we've applied
var/mutable_appearance/item_appearance
/datum/component/action_item_overlay/Initialize(atom/movable/item, datum/callback/item_callback)
if(!istype(parent, /datum/action))
return COMPONENT_INCOMPATIBLE
if(item && !istype(item))
stack_trace("[type] created with a non-null, non-movable item; item must be null or movable")
return COMPONENT_INCOMPATIBLE
if(!item && !item_callback)
stack_trace("[type] created without a reference item or an item callback - one or the other is required.")
return COMPONENT_INCOMPATIBLE
src.item_uid = item.UID()
src.item_callback = item_callback
/datum/component/action_item_overlay/Destroy(force)
item_uid = null
item_callback = null
item_appearance = null
return ..()
/datum/component/action_item_overlay/RegisterWithParent()
RegisterSignal(parent, COMSIG_ACTION_OVERLAY_APPLY, PROC_REF(on_overlays_applied))
var/datum/action/parent_action = parent
parent_action.build_all_button_icons(UPDATE_BUTTON_OVERLAY)
/datum/component/action_item_overlay/UnregisterFromParent()
UnregisterSignal(parent, COMSIG_ACTION_OVERLAY_APPLY)
// If we're being unregistered / deleted but our parent is sticking around,
// force an overlay update to get rid of our item appearance
if(!QDELING(parent))
var/datum/action/parent_action = parent
parent_action.build_all_button_icons(UPDATE_BUTTON_OVERLAY)
/// Signal proc for [COMSIG_ACTION_OVERLAY_APPLY], applies the item appearance if possible.
/datum/component/action_item_overlay/proc/on_overlays_applied(datum/action/source, atom/movable/screen/movable/action_button/current_button, force)
SIGNAL_HANDLER
// We're in the middle of being removed / deleted, remove our associated overlay
if(QDELING(src))
if(item_appearance)
current_button.cut_overlay(item_appearance)
item_appearance = null
return
var/atom/movable/muse = item_callback?.Invoke() || locateUID(item_uid)
if(!istype(muse))
if(item_appearance) // New item does not exist but we have an old appearance
current_button.cut_overlay(item_appearance)
item_appearance = null
return
if(item_appearance)
// For caching purposes, we will try not to update if we don't need to
if(!force && item_appearance.icon == muse.icon && item_appearance.icon_state == muse.icon_state)
return
current_button.cut_overlay(item_appearance)
var/mutable_appearance/muse_appearance = new(muse.appearance)
muse_appearance.plane = FLOAT_PLANE
muse_appearance.layer = FLOAT_LAYER
muse_appearance.pixel_x = 0
muse_appearance.pixel_y = 0
current_button.add_overlay(muse_appearance)
item_appearance = muse_appearance
+1 -1
View File
@@ -276,4 +276,4 @@
/datum/action/zoom
name = "Toggle Scope"
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING
button_overlay_icon_state = "sniper_zoom"
button_icon_state = "sniper_zoom"
+1 -1
View File
@@ -168,7 +168,7 @@
/// The hangup action handler, for handling the hangup button displayed in the top left corner of the screen
/datum/action/innate/end_holocall
name = "End Holocall"
button_overlay_icon_state = "camera_off"
button_icon_state = "camera_off"
var/datum/holocall/hcall
/datum/action/innate/end_holocall/New(Target, datum/holocall/HC)
+1 -1
View File
@@ -28,7 +28,7 @@
if(recharge_time > world.time)
return FALSE
current_charges++
spell_parent.action.UpdateButtons()
spell_parent.action.build_all_button_icons()
if(current_charges < max_charges) // we have more recharges to go
recharge_time = world.time + recharge_duration
return FALSE
+2 -2
View File
@@ -33,7 +33,7 @@
if(!spell_parent.action)
stack_trace("[spell_parent.type] ended up with a null action")
return PROCESS_KILL
spell_parent.action.UpdateButtons()
spell_parent.action.build_all_button_icons()
if(should_end_cooldown())
return PROCESS_KILL
@@ -58,7 +58,7 @@
else
recharge_time = get_recharge_time()
if(spell_parent.action)
spell_parent.action.UpdateButtons()
spell_parent.action.build_all_button_icons()
START_PROCESSING(SSfastprocess, src)
/datum/spell_cooldown/proc/revert_cast()
@@ -15,7 +15,7 @@ Updates the spell's actions on use as well, so they know when they can or can't
vessel.stored_plasma = clamp(vessel.stored_plasma + amount, 0, vessel.max_plasma)
update_plasma_display(src)
for(var/datum/action/spell_action/action in actions)
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/alien_spell
action_background_icon_state = "bg_alien"
@@ -35,7 +35,7 @@ Updates the spell's actions on use as well, so they know when they can or can't
name = "[name] ([plasma_cost])"
action.name = name
action.desc = desc
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/alien_spell/write_custom_logs(list/targets, mob/user)
user.create_log(ATTACK_LOG, "Cast the spell [name]")
@@ -14,8 +14,8 @@
/datum/spell/alien_spell/neurotoxin/update_spell_icon()
if(!action)
return
action.button_overlay_icon_state = "alien_neurotoxin_[active]"
action.UpdateButtons()
action.button_icon_state = "alien_neurotoxin_[active]"
action.build_all_button_icons()
/datum/spell/alien_spell/neurotoxin/cast(list/targets, mob/living/carbon/user)
var/target = targets[1]
+1 -1
View File
@@ -105,7 +105,7 @@
if(action)
action.name = name
action.desc = desc
UpdateButtons()
build_all_button_icons()
target.name = "ensouled [target.name]"
target.desc += "<br><span class='warning'>A terrible aura surrounds this item, its very existence is offensive to life itself...</span>"
+5 -5
View File
@@ -212,7 +212,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
custom_handler?.spend_spell_cost(user, src)
if(action)
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/proc/invocation(mob/user) //spelling the spell out and setting it on recharge/reducing charges amount
switch(invocation_type)
@@ -350,7 +350,7 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
cast(targets, user = user)
after_cast(targets, user)
if(action)
action.UpdateButtons()
action.build_all_button_icons()
/**
* Will write additional logs if create_custom_logs is TRUE and the caster has a ckey. Override this
@@ -421,11 +421,11 @@ GLOBAL_LIST_INIT(spells, typesof(/datum/spell))
custom_handler?.revert_cast(user, src)
if(action)
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/proc/UpdateButtons()
/datum/spell/proc/build_all_button_icons()
if(action)
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types
switch(type)
+2 -2
View File
@@ -340,8 +340,8 @@
/datum/spell/fireball/update_spell_icon()
if(!action)
return
action.button_overlay_icon_state = "fireball[active]"
action.UpdateButtons()
action.button_icon_state = "fireball[active]"
action.build_all_button_icons()
/datum/spell/fireball/cast(list/targets, mob/living/user = usr)
var/target = targets[1] //There is only ever one target for fireball
+36 -30
View File
@@ -1,7 +1,7 @@
/// Blood magic handles the creation of blood spells (formerly talismans)
/datum/action/innate/cult/blood_magic
name = "Prepare Blood Magic"
button_overlay_icon_state = "carve"
button_icon_state = "carve"
desc = "Prepare blood magic by carving runes into your flesh. This is easier with an <b>empowering rune</b>."
default_button_position = DEFAULT_BLOODSPELLS
var/list/spells = list()
@@ -74,7 +74,7 @@
/// The next generation of talismans, handles storage/creation of blood magic
/datum/action/innate/cult/blood_spell
name = "Blood Magic"
button_overlay_icon_state = "telerune"
button_icon_state = "telerune"
desc = "Fear the Old Blood."
default_button_position = SCRN_OBJ_CULT_LIST
var/charges = 1
@@ -86,7 +86,11 @@
var/health_cost = 0
/// Have we already been positioned into our starting location?
var/positioned = FALSE
var/mutable_appearance/button_charge_count
/datum/action/innate/cult/blood_spell/New(target)
. = ..()
button_charge_count = image('icons/effects/effects.dmi', icon_state = "nothing")
/datum/action/innate/cult/blood_spell/proc/get_panel_text()
if(initial(charges) == 1)
@@ -94,14 +98,17 @@
var/available_charges = hand_magic ? "[hand_magic.uses]" : "[charges]"
return "[available_charges]/[initial(charges)]"
/datum/action/innate/cult/blood_spell/UpdateButton(atom/movable/screen/movable/action_button/button, status_only, force)
/datum/action/innate/cult/blood_spell/update_button_status(atom/movable/screen/movable/action_button/button, force)
. = ..()
if(!button)
return
button.overlays -= button_charge_count
var/text = get_panel_text()
if(!text || !button)
return
var/image/count_down_holder = image('icons/effects/effects.dmi', icon_state = "nothing")
count_down_holder.maptext = "<div style=\"font-size:8pt;color:white;font:'Small Fonts';text-align:center;\" valign=\"bottom\">[text]</div>"
button.add_overlay(count_down_holder)
button_charge_count.maptext = "<div style=\"font-size:8pt;color:white;font:'Small Fonts';text-align:center;\" valign=\"bottom\">[text]</div>"
button.overlays |= button_charge_count
/datum/action/innate/cult/blood_spell/Grant(mob/living/owner, datum/action/innate/cult/blood_magic/BM)
if(health_cost)
@@ -148,21 +155,21 @@
/datum/action/innate/cult/blood_spell/stun
name = "Stun"
desc = "Will knock down and mute a victim on contact. Strike them with a cult blade to complete the invocation, stunning them and extending the mute."
button_overlay_icon_state = "stun"
button_icon_state = "stun"
magic_path = /obj/item/melee/blood_magic/stun
health_cost = 10
/datum/action/innate/cult/blood_spell/teleport
name = "Teleport"
desc = "Empowers your hand to teleport yourself or another cultist to a teleport rune on contact."
button_overlay_icon_state = "teleport"
button_icon_state = "teleport"
magic_path = /obj/item/melee/blood_magic/teleport
health_cost = 7
/datum/action/innate/cult/blood_spell/emp
name = "Electromagnetic Pulse"
desc = "Releases an Electromagnetic Pulse, affecting nearby non-cultists. <b>The pulse will still affect you.</b>"
button_overlay_icon_state = "emp"
button_icon_state = "emp"
health_cost = 10
invocation = "Ta'gh fara'qha fel d'amar det!"
@@ -198,24 +205,24 @@
/datum/action/innate/cult/blood_spell/shackles
name = "Shadow Shackles"
desc = "Empowers your hand to start handcuffing victim on contact, and mute them if successful."
button_overlay_icon_state = "shackles"
button_icon_state = "shackles"
charges = 4
magic_path = /obj/item/melee/blood_magic/shackles
/datum/action/innate/cult/blood_spell/construction
name = "Twisted Construction"
desc = "Empowers your hand to corrupt certain metalic objects.<br><u>Converts:</u><br>Plasteel into runed metal<br>50 metal into a construct shell<br>Cyborg shells into construct shells<br>Airlocks into brittle runed airlocks after a delay (harm intent)"
button_overlay_icon_state = "transmute"
button_icon_state = "transmute"
magic_path = "/obj/item/melee/blood_magic/construction"
health_cost = 12
/datum/action/innate/cult/blood_spell/dagger
name = "Summon Dagger"
desc = "Summon a ritual dagger, necessary to scribe runes."
button_overlay_icon_state = "cult_dagger"
button_icon_state = "cult_dagger"
/datum/action/innate/cult/blood_spell/dagger/New()
button_overlay_icon_state = GET_CULT_DATA(dagger_icon, "cult_dagger")
button_icon_state = GET_CULT_DATA(dagger_icon, "cult_dagger")
..()
/datum/action/innate/cult/blood_spell/dagger/Activate()
@@ -238,13 +245,13 @@
/datum/action/innate/cult/blood_spell/equipment
name = "Summon Equipment"
desc = "Empowers your hand to summon combat gear onto a cultist you touch, including cult armor into open slots, a cult bola, and a cult sword."
button_overlay_icon_state = "equip"
button_icon_state = "equip"
magic_path = /obj/item/melee/blood_magic/armor
/datum/action/innate/cult/blood_spell/horror
name = "Hallucinations"
desc = "Gives hallucinations to a target at range. A silent and invisible spell."
button_overlay_icon_state = "horror"
button_icon_state = "horror"
var/datum/spell/horror/PH
charges = 4
@@ -296,10 +303,9 @@
var/mob/living/carbon/human/H = target
H.Hallucinate(120 SECONDS)
attached_action.charges--
attached_action.UpdateButtons()
attached_action.desc = attached_action.base_desc
attached_action.desc += "<br><b><u>Has [attached_action.charges] use\s remaining</u></b>."
attached_action.UpdateButtons()
attached_action.build_all_button_icons()
user.ranged_ability.remove_ranged_ability(user, "<span class='cult'><b>[H] has been cursed with living nightmares!</b></span>")
if(attached_action.charges <= 0)
to_chat(ranged_ability_user, "<span class='cult'>You have exhausted the spell's power!</span>")
@@ -309,7 +315,7 @@
name = "Conceal Presence"
desc = "Alternates between hiding and revealing nearby cult structures, cult airlocks and runes."
invocation = "Kla'atu barada nikt'o!"
button_overlay_icon_state = "veiling"
button_icon_state = "veiling"
charges = 10
var/revealing = FALSE //if it reveals or not
@@ -329,7 +335,7 @@
O.cult_conceal()
revealing = TRUE // Switch on use
name = "Reveal Runes"
button_overlay_icon_state = "revealing"
button_icon_state = "revealing"
else // Unhiding stuff
owner.visible_message("<span class='warning'>A flash of light shines from [owner]'s hand!</span>", \
@@ -344,19 +350,19 @@
O.cult_reveal()
revealing = FALSE // Switch on use
name = "Conceal Runes"
button_overlay_icon_state = "veiling"
button_icon_state = "veiling"
if(charges <= 0)
qdel(src)
desc = "[revealing ? "Reveals" : "Conceals"] nearby cult structures, airlocks, and runes."
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
UpdateButtons()
build_all_button_icons()
/datum/action/innate/cult/blood_spell/manipulation
name = "Blood Rites"
desc = "Empowers your hand to manipulate blood. Use on blood or a noncultist to absorb blood to be used later, use on yourself or another cultist to heal them using absorbed blood. \
\nUse the spell in-hand to cast advanced rites, such as summoning a magical blood spear, firing blood projectiles out of your hands, and more!"
invocation = "Fel'th Dol Ab'orod!"
button_overlay_icon_state = "manip"
button_icon_state = "manip"
charges = 5
magic_path = /obj/item/melee/blood_magic/manipulator
@@ -403,7 +409,7 @@
source.charges = uses
source.desc = source.base_desc
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
source.UpdateButtons()
source.build_all_button_icons()
return ..()
/obj/item/melee/blood_magic/customised_abstract_text(mob/living/carbon/owner)
@@ -436,7 +442,7 @@
else if(source)
source.desc = source.base_desc
source.desc += "<br><b><u>Has [uses] use\s remaining</u></b>."
source.UpdateButtons()
source.build_all_button_icons()
//The spell effects
@@ -576,7 +582,7 @@
user.visible_message("<span class='cultitalic'>This victim doesn't have enough arms to complete the restraint!</span>")
return
CuffAttack(C, user)
source.UpdateButtons()
source.build_all_button_icons()
..()
/obj/item/melee/blood_magic/shackles/proc/CuffAttack(mob/living/carbon/C, mob/living/user)
@@ -872,12 +878,12 @@
target.clean_blood()
else
steal_blood(user, target)
source.UpdateButtons()
source.build_all_button_icons()
return
if(isconstruct(target))
heal_construct(user, target)
source.UpdateButtons()
source.build_all_button_icons()
return
if(istype(target, /obj/item/blood_orb))
@@ -887,10 +893,10 @@
to_chat(user, "<span class='warning'>You obtain [candidate.blood] blood from the orb of blood!</span>")
playsound(user, 'sound/misc/enter_blood.ogg', 50, extrarange = SOUND_RANGE_SET(7))
qdel(candidate)
source.UpdateButtons()
source.build_all_button_icons()
return
blood_draw(target, user)
source.UpdateButtons()
source.build_all_button_icons()
/obj/item/melee/blood_magic/manipulator/proc/blood_draw(atom/target, mob/living/carbon/human/user)
var/temp = 0
@@ -994,4 +1000,4 @@
to_chat(user, "<span class='warning'>You need a free hand for this rite!</span>")
uses += BLOOD_BARRAGE_COST // Refund the charges
qdel(rite)
source.UpdateButtons()
source.build_all_button_icons()
+7 -7
View File
@@ -1,6 +1,6 @@
/datum/action/innate/cult
button_overlay_icon = 'icons/mob/actions/actions_cult.dmi'
button_background_icon_state = "bg_cult"
button_icon = 'icons/mob/actions/actions_cult.dmi'
background_icon_state = "bg_cult"
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS
buttontooltipstyle = "cult"
@@ -14,7 +14,7 @@
/datum/action/innate/cult/comm
name = "Communion"
desc = "Whispered words that all cultists can hear.<br><b>Warning:</b>Nearby non-cultists can still hear you."
button_overlay_icon_state = "cult_comms"
button_icon_state = "cult_comms"
check_flags = AB_CHECK_CONSCIOUS
/datum/action/innate/cult/comm/Activate()
@@ -87,12 +87,12 @@
//Objectives
/datum/action/innate/cult/check_progress
name = "Study the Veil"
button_overlay_icon_state = "tome"
button_icon_state = "tome"
desc = "Check your cult's current progress and objective."
check_flags = AB_CHECK_CONSCIOUS
/datum/action/innate/cult/check_progress/New()
button_overlay_icon_state = GET_CULT_DATA(tome_icon, "tome")
button_icon_state = GET_CULT_DATA(tome_icon, "tome")
..()
/datum/action/innate/cult/check_progress/IsAvailable()
@@ -111,11 +111,11 @@
/datum/action/innate/cult/use_dagger
name = "Draw Blood Rune"
desc = "Use the ritual dagger to create a powerful blood rune."
button_overlay_icon_state = "blood_dagger"
button_icon_state = "blood_dagger"
default_button_position = "10:29,4:-2"
/datum/action/innate/cult/use_dagger/Grant()
button_overlay_icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
button_icon_state = GET_CULT_DATA(dagger_icon, "blood_dagger")
..()
/datum/action/innate/cult/use_dagger/Activate()
+1 -1
View File
@@ -634,7 +634,7 @@
/datum/action/innate/cult/spear
name = "Bloody Bond"
desc = "Recall the blood spear to your hand."
button_overlay_icon_state = "bloodspear"
button_icon_state = "bloodspear"
default_button_position = "11:31,4:-2"
var/obj/item/cult_spear/spear
var/cooldown = 0
@@ -76,7 +76,7 @@
if(QDELETED(src) || uses) //Not sure if not having src here would cause a runtime, so it's here to be safe
return
desc = "[initial(desc)] It has [uses] use\s remaining."
UpdateButtons()
build_all_button_icons()
/datum/spell/ai_spell/proc/check_camera_vision(mob/user, atom/target)
var/turf/target_turf = get_turf(target)
@@ -207,7 +207,7 @@
else //Adding uses to an existing module
action.uses += initial(action.uses)
action.desc = "[initial(action.desc)] It has [action.uses] use\s remaining."
action.UpdateButtons()
action.build_all_button_icons()
temp = "Additional use[action.uses > 1 ? "s" : ""] added to [action.name]!"
processing_time -= AM.cost
@@ -69,7 +69,7 @@
/datum/action/innate/teleport_in
name = "Send To"
button_overlay_icon_state = "beam_down"
button_icon_state = "beam_down"
/datum/action/innate/teleport_in/Activate()
if(!target || !iscarbon(owner))
@@ -83,7 +83,7 @@
/datum/action/innate/teleport_out
name = "Retrieve"
button_overlay_icon_state = "beam_up"
button_icon_state = "beam_up"
/datum/action/innate/teleport_out/Activate()
if(!target || !iscarbon(owner))
@@ -96,7 +96,7 @@
/datum/action/innate/teleport_self
name = "Send Self"
button_overlay_icon_state = "beam_down"
button_icon_state = "beam_down"
/datum/action/innate/teleport_self/Activate()
if(!target || !iscarbon(owner))
@@ -110,7 +110,7 @@
/datum/action/innate/vest_mode_swap
name = "Switch Vest Mode"
button_overlay_icon_state = "vest_mode"
button_icon_state = "vest_mode"
/datum/action/innate/vest_mode_swap/Activate()
if(!target || !iscarbon(owner))
@@ -121,7 +121,7 @@
/datum/action/innate/vest_disguise_swap
name = "Switch Vest Disguise"
button_overlay_icon_state = "vest_disguise"
button_icon_state = "vest_disguise"
/datum/action/innate/vest_disguise_swap/Activate()
if(!target || !iscarbon(owner))
@@ -131,7 +131,7 @@
/datum/action/innate/set_droppoint
name = "Set Experiment Release Point"
button_overlay_icon_state = "set_drop"
button_icon_state = "set_drop"
/datum/action/innate/set_droppoint/Activate()
if(!target || !iscarbon(owner))
@@ -170,8 +170,8 @@
AddSpell(new /datum/spell/fireball/shadow_grapple)
var/datum/spell/bloodcrawl/shadow_crawl/S = new
AddSpell(S)
whisper_action.button_overlay_icon_state = "shadow_whisper"
whisper_action.button_background_icon_state = "shadow_demon_bg"
whisper_action.button_icon_state = "shadow_whisper"
whisper_action.background_icon_state = "shadow_demon_bg"
if(istype(loc, /obj/effect/dummy/slaughter))
S.phased = TRUE
RegisterSignal(loc, COMSIG_MOVABLE_MOVED, TYPE_PROC_REF(/mob/living/simple_animal/demon/shadow, check_darkness))
@@ -164,8 +164,8 @@
/datum/action/innate/demon_whisper
name = "Demonic Whisper"
button_overlay_icon_state = "demon_comms"
button_background_icon_state = "bg_demon"
button_icon_state = "demon_comms"
background_icon_state = "bg_demon"
/datum/action/innate/demon_whisper/IsAvailable()
return ..()
@@ -5,8 +5,8 @@
*/
/datum/action/guardian
name = "Generic guardian host action"
button_overlay_icon = 'icons/mob/guardian.dmi'
button_overlay_icon_state = "base"
button_icon = 'icons/mob/guardian.dmi'
button_icon_state = "base"
var/mob/living/simple_animal/hostile/guardian/guardian
/datum/action/guardian/Grant(mob/M, mob/living/simple_animal/hostile/guardian/G)
@@ -24,7 +24,7 @@
/datum/action/guardian/communicate
name = "Communicate"
desc = "Communicate telepathically with your guardian."
button_overlay_icon_state = "communicate"
button_icon_state = "communicate"
/datum/action/guardian/communicate/Trigger(left_click)
var/input = tgui_input_text(owner, "Enter a message to tell your guardian:", "Message")
@@ -50,7 +50,7 @@
/datum/action/guardian/recall
name = "Recall Guardian"
desc = "Forcibly recall your guardian."
button_overlay_icon_state = "recall"
button_icon_state = "recall"
/datum/action/guardian/recall/Trigger(left_click)
guardian.Recall()
@@ -63,7 +63,7 @@
/datum/action/guardian/reset_guardian
name = "Replace Guardian Player"
desc = "Replace your guardian's player with a ghost. This can only be done once."
button_overlay_icon_state = "reset"
button_icon_state = "reset"
var/cooldown_timer
/datum/action/guardian/reset_guardian/IsAvailable()
@@ -82,7 +82,7 @@
// Do this immediately, so the user can't spam a bunch of polls.
cooldown_timer = addtimer(CALLBACK(src, PROC_REF(reset_cooldown)), 5 MINUTES)
UpdateButtons()
build_all_button_icons()
to_chat(owner, "<span class='danger'>Searching for a replacement ghost...</span>")
var/list/mob/dead/observer/candidates = SSghost_spawns.poll_candidates("Do you want to play as [guardian.real_name]?", ROLE_GUARDIAN, FALSE, 15 SECONDS, source = guardian)
@@ -184,7 +184,7 @@
*/
/datum/action/guardian/reset_guardian/proc/reset_cooldown()
cooldown_timer = null
UpdateButtons()
build_all_button_icons()
/**
* Grants all existing `/datum/action/guardian` type actions to the src mob.
@@ -145,7 +145,7 @@
/mob/living/simple_animal/hostile/morph/proc/add_food(amount)
gathered_food += amount
for(var/datum/action/spell_action/action in actions)
action.UpdateButtons()
action.build_all_button_icons()
/mob/living/simple_animal/hostile/morph/proc/assume()
@@ -155,8 +155,8 @@
melee_damage_lower = 5
melee_damage_upper = 5
speed = MORPHED_SPEED
ambush_spell.UpdateButtons()
pass_airlock_spell.UpdateButtons()
ambush_spell.build_all_button_icons()
pass_airlock_spell.build_all_button_icons()
move_resist = MOVE_FORCE_DEFAULT // They become more fragile and easier to move
/mob/living/simple_animal/hostile/morph/proc/restore()
@@ -171,7 +171,7 @@
if(ambush_prepared)
to_chat(src, "<span class='warning'>The ambush potential has faded as you take your true form.</span>")
failed_ambush()
pass_airlock_spell.UpdateButtons()
pass_airlock_spell.build_all_button_icons()
move_resist = MOVE_FORCE_STRONG // Return to their fatness
@@ -183,7 +183,7 @@
/mob/living/simple_animal/hostile/morph/proc/failed_ambush()
ambush_prepared = FALSE
ambush_spell.UpdateButtons()
ambush_spell.build_all_button_icons()
mimic_spell.perfect_disguise = FALSE // Reset the perfect disguise
remove_status_effect(/datum/status_effect/morph_ambush)
UnregisterSignal(src, COMSIG_MOVABLE_MOVED)
@@ -10,7 +10,7 @@
name = "[name] ([hunger_cost])"
action.name = name
action.desc = desc
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/morph_spell/create_new_handler()
var/datum/spell_handler/morph/H = new
@@ -169,8 +169,8 @@
update_glow()
playsound(get_turf(src), 'sound/effects/eleczap.ogg', 30, TRUE)
give_spells()
whisper_action.button_overlay_icon_state = "pulse_whisper"
whisper_action.button_background_icon_state = "bg_pulsedemon"
whisper_action.button_icon_state = "pulse_whisper"
whisper_action.background_icon_state = "bg_pulsedemon"
/mob/living/simple_animal/demon/pulse_demon/proc/deleted_handler(our_demon, force)
SIGNAL_HANDLER
@@ -344,7 +344,7 @@
if(!S.action || S.locked)
continue
if(S.requires_area)
S.action.UpdateButtons()
S.action.build_all_button_icons()
// can enter an apc at all?
/mob/living/simple_animal/demon/pulse_demon/proc/is_valid_apc(obj/machinery/power/apc/A)
@@ -457,7 +457,7 @@
var/dist = S.cast_cost - orig
// only update icon if the amount is actually enough to change a spell's availability
if(dist == 0 || (dist > 0 && realdelta >= dist) || (dist < 0 && realdelta <= dist))
S.action.UpdateButtons()
S.action.build_all_button_icons()
return realdelta
// linear scale for glow strength, see table:
@@ -34,7 +34,7 @@
desc = "[initial(desc)][spell_level == level_max ? "" : " It costs [format_si_suffix(upgrade_cost)] APC\s to upgrade. <b>Alt-Click</b> this spell to upgrade it."]"
action.name = name
action.desc = desc
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/pulse_demon/can_cast(mob/living/simple_animal/demon/pulse_demon/user, charge_check, show_message)
if(!..())
@@ -276,8 +276,8 @@
/datum/spell/pulse_demon/toggle/proc/do_toggle(varstate, mob/user)
if(action)
action.button_background_icon_state = varstate ? action_background_icon_state : "[action_background_icon_state]_disabled"
action.UpdateButtons()
action.background_icon_state = varstate ? action_background_icon_state : "[action_background_icon_state]_disabled"
action.build_all_button_icons()
if(user)
to_chat(user, "<span class='notice'>You will [varstate ? "now" : "no longer"] [base_message]</span>")
return varstate
@@ -175,7 +175,7 @@
name = "[initial(name)] ([cast_amount]E)"
action.name = name
action.desc = desc
action.UpdateButtons()
action.build_all_button_icons()
/datum/spell/aoe/revenant/revert_cast(mob/user)
. = ..()
@@ -212,7 +212,7 @@
user.reveal(reveal)
user.stun(stun)
if(action)
action.UpdateButtons()
action.build_all_button_icons()
return TRUE
//Overload Light: Breaks a light that's online and sends out lightning bolts to all nearby people.
+5 -5
View File
@@ -456,15 +456,15 @@
//action given to antag clowns
/datum/action/innate/toggle_clumsy
name = "Toggle Clown Clumsy"
button_overlay_icon_state = "clown"
button_icon_state = "clown"
/datum/action/innate/toggle_clumsy/Activate()
var/mob/living/carbon/human/H = owner
H.dna.SetSEState(GLOB.clumsyblock, TRUE)
singlemutcheck(H, GLOB.clumsyblock, MUTCHK_FORCED)
active = TRUE
button_background_icon_state = "bg_spell"
UpdateButtons()
background_icon_state = "bg_spell"
build_all_button_icons()
to_chat(H, "<span class='notice'>You start acting clumsy to throw suspicions off. Focus again before using weapons.</span>")
/datum/action/innate/toggle_clumsy/Deactivate()
@@ -472,8 +472,8 @@
H.dna.SetSEState(GLOB.clumsyblock, FALSE)
singlemutcheck(H, GLOB.clumsyblock, MUTCHK_FORCED)
active = FALSE
button_background_icon_state = "bg_default"
UpdateButtons()
background_icon_state = "bg_default"
build_all_button_icons()
to_chat(H, "<span class='notice'>You focus and can now use weapons regularly.</span>")
/datum/job/mime
@@ -80,7 +80,7 @@
/datum/action/innate/camera_off
name = "End Camera View"
button_overlay_icon_state = "camera_off"
button_icon_state = "camera_off"
/datum/action/innate/camera_off/Activate()
if(!target || !iscarbon(target))
@@ -92,7 +92,7 @@
/datum/action/innate/camera_jump
name = "Jump To Camera"
button_overlay_icon_state = "camera_jump"
button_icon_state = "camera_jump"
/datum/action/innate/camera_jump/Activate()
if(!target || !iscarbon(target))
+32 -32
View File
@@ -21,7 +21,7 @@
/datum/action/innate/mecha
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUNNED | AB_CHECK_CONSCIOUS
button_overlay_icon = 'icons/mob/actions/actions_mecha.dmi'
button_icon = 'icons/mob/actions/actions_mecha.dmi'
var/obj/mecha/chassis
/datum/action/innate/mecha/Grant(mob/living/L, obj/mecha/M)
@@ -35,7 +35,7 @@
/datum/action/innate/mecha/mech_eject
name = "Eject From Mech"
button_overlay_icon_state = "mech_eject"
button_icon_state = "mech_eject"
/datum/action/innate/mecha/mech_eject/Activate()
if(!owner)
@@ -46,20 +46,20 @@
/datum/action/innate/mecha/mech_toggle_internals
name = "Toggle Internal Airtank Usage"
button_overlay_icon_state = "mech_internals_off"
button_icon_state = "mech_internals_off"
/datum/action/innate/mecha/mech_toggle_internals/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.use_internal_tank = !chassis.use_internal_tank
button_overlay_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
button_icon_state = "mech_internals_[chassis.use_internal_tank ? "on" : "off"]"
chassis.occupant_message("Now taking air from [chassis.use_internal_tank ? "internal airtank" : "environment"].")
chassis.log_message("Now taking air from [chassis.use_internal_tank ? "internal airtank" : "environment"].")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_toggle_lights
name = "Toggle Lights"
button_overlay_icon_state = "mech_lights_off"
button_icon_state = "mech_lights_off"
/datum/action/innate/mecha/mech_toggle_lights/Activate()
if(!owner || !chassis || chassis.occupant != owner)
@@ -67,17 +67,17 @@
chassis.lights = !chassis.lights
if(chassis.lights)
chassis.set_light(chassis.lights_range, chassis.lights_power)
button_overlay_icon_state = "mech_lights_on"
button_icon_state = "mech_lights_on"
else
chassis.set_light(chassis.lights_range_ambient, chassis.lights_power_ambient)
button_overlay_icon_state = "mech_lights_off"
button_icon_state = "mech_lights_off"
chassis.occupant_message("Toggled lights [chassis.lights ? "on" : "off"].")
chassis.log_message("Toggled lights [chassis.lights ? "on" : "off"].")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_view_stats
name = "View Stats"
button_overlay_icon_state = "mech_view_stats"
button_icon_state = "mech_view_stats"
/datum/action/innate/mecha/mech_view_stats/Activate()
if(!owner || !chassis || chassis.occupant != owner)
@@ -86,7 +86,7 @@
/datum/action/innate/mecha/mech_defence_mode
name = "Toggle Defence Mode"
button_overlay_icon_state = "mech_defense_mode_off"
button_icon_state = "mech_defense_mode_off"
/datum/action/innate/mecha/mech_defence_mode/Activate(forced_state = null)
if(!owner || !chassis || chassis.occupant != owner)
@@ -95,7 +95,7 @@
chassis.defence_mode = forced_state
else
chassis.defence_mode = !chassis.defence_mode
button_overlay_icon_state = "mech_defense_mode_[chassis.defence_mode ? "on" : "off"]"
button_icon_state = "mech_defense_mode_[chassis.defence_mode ? "on" : "off"]"
if(chassis.defence_mode)
chassis.deflect_chance = chassis.defence_mode_deflect_chance
chassis.occupant_message("<span class='notice'>You enable [chassis] defence mode.</span>")
@@ -103,11 +103,11 @@
chassis.deflect_chance = initial(chassis.deflect_chance)
chassis.occupant_message("<span class='danger'>You disable [chassis] defence mode.</span>")
chassis.log_message("Toggled defence mode.")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_overload_mode
name = "Toggle leg actuators overload"
button_overlay_icon_state = "mech_overload_off"
button_icon_state = "mech_overload_off"
/datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null)
if(!owner || !chassis || chassis.occupant != owner)
@@ -119,7 +119,7 @@
chassis.leg_overload_mode = forced_state
else
chassis.leg_overload_mode = !chassis.leg_overload_mode
button_overlay_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
button_icon_state = "mech_overload_[chassis.leg_overload_mode ? "on" : "off"]"
chassis.log_message("Toggled leg actuators overload.")
if(chassis.leg_overload_mode)
chassis.leg_overload_mode = 1
@@ -133,11 +133,11 @@
chassis.step_in = initial(chassis.step_in)
chassis.step_energy_drain = chassis.normal_step_energy_drain
chassis.occupant_message("<span class='notice'>You disable leg actuators overload.</span>")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_toggle_thrusters
name = "Toggle Thrusters"
button_overlay_icon_state = "mech_thrusters_off"
button_icon_state = "mech_thrusters_off"
/datum/action/innate/mecha/mech_toggle_thrusters/Activate()
if(!owner || !chassis || chassis.occupant != owner)
@@ -146,13 +146,13 @@
chassis.thrusters_active = !chassis.thrusters_active
if(!chassis.thrusters_active)
chassis.step_in = initial(chassis.step_in)
button_overlay_icon_state = "mech_thrusters_[chassis.thrusters_active ? "on" : "off"]"
button_icon_state = "mech_thrusters_[chassis.thrusters_active ? "on" : "off"]"
chassis.log_message("Toggled thrusters.")
chassis.occupant_message("<font color='[chassis.thrusters_active ? "blue" : "red"]'>Thrusters [chassis.thrusters_active ? "en" : "dis"]abled.")
/datum/action/innate/mecha/mech_smoke
name = "Smoke"
button_overlay_icon_state = "mech_smoke"
button_icon_state = "mech_smoke"
/datum/action/innate/mecha/mech_smoke/Activate()
if(!owner || !chassis || chassis.occupant != owner)
@@ -168,14 +168,14 @@
/datum/action/innate/mecha/mech_zoom
name = "Zoom"
button_overlay_icon_state = "mech_zoom_off"
button_icon_state = "mech_zoom_off"
/datum/action/innate/mecha/mech_zoom/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
if(owner.client)
chassis.zoom_mode = !chassis.zoom_mode
button_overlay_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
button_icon_state = "mech_zoom_[chassis.zoom_mode ? "on" : "off"]"
chassis.log_message("Toggled zoom mode.")
chassis.occupant_message("<font color='[chassis.zoom_mode ? "blue" : "red"]'>Zoom mode [chassis.zoom_mode ? "en" : "dis"]abled.</font>")
if(chassis.zoom_mode)
@@ -183,24 +183,24 @@
SEND_SOUND(owner, sound(chassis.zoomsound, volume = 50))
else
owner.client.RemoveViewMod("mecha")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_toggle_phasing
name = "Toggle Phasing"
button_overlay_icon_state = "mech_phasing_off"
button_icon_state = "mech_phasing_off"
/datum/action/innate/mecha/mech_toggle_phasing/Activate()
if(!owner || !chassis || chassis.occupant != owner)
return
chassis.phasing = !chassis.phasing
button_overlay_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
button_icon_state = "mech_phasing_[chassis.phasing ? "on" : "off"]"
chassis.occupant_message("<font color=\"[chassis.phasing?"#00f\">En":"#f00\">Dis"]abled phasing.</font>")
UpdateButtons()
build_all_button_icons()
/datum/action/innate/mecha/mech_switch_damtype
name = "Reconfigure arm microtool arrays"
button_overlay_icon_state = "mech_damtype_brute"
button_icon_state = "mech_damtype_brute"
/datum/action/innate/mecha/mech_switch_damtype/Activate()
if(!owner || !chassis || chassis.occupant != owner)
@@ -217,16 +217,16 @@
new_damtype = "tox"
chassis.occupant_message("A bone-chillingly thick plasteel needle protracts from the exosuit's palm.")
chassis.damtype = new_damtype
button_overlay_icon_state = "mech_damtype_[new_damtype]"
button_icon_state = "mech_damtype_[new_damtype]"
playsound(src, 'sound/mecha/mechmove01.ogg', 50, TRUE)
UpdateButtons()
build_all_button_icons()
// Floor Buffer Action
/datum/action/innate/mecha/mech_toggle_floorbuffer
name = "Toggle Floor Buffer"
desc = "Movement speed is decreased while active."
button_overlay_icon = 'icons/obj/vehicles.dmi'
button_overlay_icon_state = "upgrade"
button_icon = 'icons/obj/vehicles.dmi'
button_icon_state = "upgrade"
/datum/action/innate/mecha/mech_toggle_floorbuffer/Activate()
if(!chassis.floor_buffer)
@@ -245,8 +245,8 @@
if(!_equipment)
return FALSE
equipment = _equipment
button_overlay_icon = equipment.icon
button_overlay_icon_state = equipment.icon_state
button_icon = equipment.icon
button_icon_state = equipment.icon_state
name = "Switch module to [equipment.name]"
return ..()
+3 -7
View File
@@ -70,10 +70,6 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
var/list/actions = list()
/// List of paths of action datums to give to the item on New().
var/list/actions_types = list()
/// List of icons-sheets for a given action to override the icon.
var/list/action_icon = list()
/// List of icon states for a given action to override the icon_state.
var/list/action_icon_state = list()
/// What materials the item yields when broken down. Some methods will not recover everything (autolathes only recover metal and glass, for example).
var/list/materials = list()
@@ -215,7 +211,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/obj/item/Initialize(mapload)
. = ..()
for(var/path in actions_types)
new path(src, action_icon[path], action_icon_state[path])
new path(src)
if(isstorage(loc)) //marks all items in storage as being such
in_storage = TRUE
@@ -1028,9 +1024,9 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
/obj/item/proc/should_stack_with(obj/item/other)
return type == other.type && name == other.name
/obj/item/proc/update_action_buttons(status_only = FALSE, force = FALSE)
/obj/item/proc/update_action_buttons(update_flags = ALL, force = FALSE)
for(var/datum/action/current_action as anything in actions)
current_action.UpdateButtons(status_only, force)
current_action.build_all_button_icons(update_flags, force)
/**
* Handles the bulk of cigarette lighting interactions. You must call `light()` to actually light the cigarette.
@@ -18,9 +18,8 @@
name = "Deploy Box"
desc = "Find inner peace, here, in the box."
check_flags = AB_CHECK_HANDS_BLOCKED | AB_CHECK_IMMOBILE | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED
button_background_icon_state = "bg_agent"
button_overlay_icon_state = "deploy_box"
use_itemicon = FALSE
background_icon_state = "bg_agent"
button_icon_state = "deploy_box"
/// If TRUE, the box can't be deployed
var/on_cooldown = FALSE
@@ -63,11 +62,11 @@
on_cooldown = TRUE
addtimer(CALLBACK(src, PROC_REF(end_cooldown)), 10 SECONDS)
owner.clear_fullscreen("agent_box")
UpdateButtons()
build_all_button_icons()
/datum/action/item_action/agent_box/proc/end_cooldown()
on_cooldown = FALSE
UpdateButtons()
build_all_button_icons()
/datum/action/item_action/agent_box/IsAvailable()
if(..() && !on_cooldown)
@@ -3,7 +3,7 @@
/datum/action/changeling
name = "Prototype Sting"
desc = "" // Fluff
button_background_icon_state = "bg_changeling"
background_icon_state = "bg_changeling"
/// A reference to the changeling's changeling antag datum.
var/datum/antagonist/changeling/cling
/// Datum path used to determine the location and name of the power in changeling evolution menu UI
@@ -6,7 +6,7 @@
/datum/action/changeling/evolution_menu
name = "Evolution Menu"
desc = "Choose our method of subjugation."
button_overlay_icon_state = "changelingsting"
button_icon_state = "changelingsting"
power_type = CHANGELING_INNATE_POWER
/// Which UI view will be displayed. Compact mode will show only power names, and will leave out their descriptions and helptext.
var/view_mode = EXPANDED_MODE
@@ -1,7 +1,7 @@
/datum/action/changeling/absorb_dna
name = "Absorb DNA"
desc = "Absorb the DNA of our victim. Requires us to strangle them."
button_overlay_icon_state = "absorb_dna"
button_icon_state = "absorb_dna"
power_type = CHANGELING_INNATE_POWER
req_human = TRUE
@@ -2,7 +2,7 @@
name = "Apex Predator"
desc = "We evolve a keen intuition, allowing us to detect the anxieties of nearby lifeforms."
helptext = "We will be able to detect the direction and room our prey is in, as well as if they have any injuries."
button_overlay_icon_state = "predator"
button_icon_state = "predator"
dna_cost = 1
power_type = CHANGELING_PURCHASABLE_POWER
category = /datum/changeling_power_category/utility
@@ -2,7 +2,7 @@
name = "Augmented Eyesight"
desc = "Creates more light sensing rods in our eyes, allowing our vision to penetrate most blocking objects. Protects our vision from flashes while inactive."
helptext = "Grants us x-ray vision or flash protection. We will become a lot more vulnerable to flash-based devices while x-ray vision is active."
button_overlay_icon_state = "augmented_eyesight"
button_icon_state = "augmented_eyesight"
dna_cost = 4
power_type = CHANGELING_PURCHASABLE_POWER
category = /datum/changeling_power_category/utility
@@ -2,7 +2,7 @@
name = "Last Resort"
desc = "We sacrifice our current body in a moment of need, placing us in control of a vessel that can plant our likeness in a new host. Costs 20 chemicals."
helptext = "We will be placed in control of a small, fragile creature. We may attack a corpse like this to plant an egg which will slowly mature into a new form for us."
button_overlay_icon_state = "last_resort"
button_icon_state = "last_resort"
chemical_cost = 20
dna_cost = 2
req_human = TRUE
@@ -2,7 +2,7 @@
name = "Biodegrade"
desc = "Dissolves restraints or other objects preventing free movement if we are restrained. Prepares hand to vomit acid on other objects, doesn't work on living targets. Costs 30 chemicals."
helptext = "This is obvious to nearby people, and can destroy standard restraints and closets, and break you out of grabs."
button_overlay_icon_state = "biodegrade"
button_icon_state = "biodegrade"
chemical_cost = 30 //High cost to prevent spam
dna_cost = 4
req_human = TRUE
@@ -2,7 +2,7 @@
name = "Chameleon Skin"
desc = "Our skin pigmentation rapidly changes to suit our current environment. Costs 25 chemicals."
helptext = "Allows us to become invisible after a few seconds of standing still. While active, it silences our footsteps. Can be toggled on and off."
button_overlay_icon_state = "chameleon_skin"
button_icon_state = "chameleon_skin"
dna_cost = 4
chemical_cost = 25
req_human = TRUE
@@ -1,7 +1,7 @@
/datum/action/changeling/contort_body
name = "Contort Body"
desc = "We contort our body, allowing us to fit in and under things we normally wouldn't be able to. Costs 25 chemicals."
button_overlay_icon_state = "contort_body"
button_icon_state = "contort_body"
chemical_cost = 25
dna_cost = 4
power_type = CHANGELING_PURCHASABLE_POWER
@@ -2,7 +2,7 @@
name = "Digital Camouflage"
desc = "By evolving the ability to distort our form and proportions, we defeat common algorithms used to detect lifeforms on cameras."
helptext = "We cannot be tracked by camera while using this skill."
button_overlay_icon_state = "digital_camo"
button_icon_state = "digital_camo"
dna_cost = 2
power_type = CHANGELING_PURCHASABLE_POWER
category = /datum/changeling_power_category/utility
@@ -3,7 +3,7 @@
desc = "Our skin pigmentations rapidly change to suit the environment around us. Needs 10 chemicals in-storage to toggle. Slows down our chemical regeneration by 15%"
helptext = "Allows us to darken and change the translucency of our pigmentation. \
The translucent effect works best in dark environments and garments. Can be toggled on and off."
button_overlay_icon_state = "enviro_adaptation"
button_icon_state = "enviro_adaptation"
dna_cost = 2
chemical_cost = 10
power_type = CHANGELING_PURCHASABLE_POWER
@@ -2,7 +2,7 @@
name = "Epinephrine Overdose"
desc = "We evolve additional sacs of adrenaline throughout our body. Costs 30 chemicals."
helptext = "Removes all stuns instantly and adds a short term reduction in further stuns. Can be used while unconscious. Continued use poisons the body."
button_overlay_icon_state = "adrenaline"
button_icon_state = "adrenaline"
chemical_cost = 30
dna_cost = 4
req_human = TRUE
@@ -1,7 +1,7 @@
/datum/action/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fall into a stasis, allowing us to regenerate and trick our enemies. Costs 15 chemicals."
button_overlay_icon_state = "fake_death"
button_icon_state = "fake_death"
chemical_cost = 15
power_type = CHANGELING_INNATE_POWER
req_dna = 1
@@ -2,7 +2,7 @@
name = "Fleshmend"
desc = "Our flesh rapidly regenerates, healing our burns, bruises, and shortness of breath. Costs 20 chemicals."
helptext = "Does not regrow limbs. Partially recovers our blood. Functions while unconscious."
button_overlay_icon_state = "fleshmend"
button_icon_state = "fleshmend"
chemical_cost = 20
dna_cost = 5
req_stat = UNCONSCIOUS
@@ -5,7 +5,7 @@ GLOBAL_LIST_EMPTY(hivemind_bank)
name = "Hivemind Access"
desc = "Allows us to upload or absorb DNA in the airwaves. Does not count towards absorb objectives. Costs 10 chemicals."
helptext = "Tunes our chemical receptors for hivemind communication, which passively grants us access to the Changeling Hivemind."
button_overlay_icon_state = "hive_absorb"
button_icon_state = "hive_absorb"
chemical_cost = 10
power_type = CHANGELING_INNATE_POWER
category = /datum/changeling_power_category/utility
@@ -1,7 +1,7 @@
/datum/action/changeling/humanform
name = "Human form"
desc = "We change into a human. Costs 5 chemicals."
button_overlay_icon_state = "human_form"
button_icon_state = "human_form"
chemical_cost = 5
req_dna = 1
@@ -2,7 +2,7 @@
name = "Lesser form"
desc = "We debase ourselves and become lesser. We become a monkey. Costs 5 chemicals."
helptext = "The transformation greatly reduces our size, allowing us to slip out of cuffs and climb through vents."
button_overlay_icon_state = "lesser_form"
button_icon_state = "lesser_form"
chemical_cost = 5
dna_cost = 2
req_human = TRUE
@@ -2,7 +2,7 @@
name = "Mimic Voice"
desc = "We shape our vocal glands to sound like a desired voice."
helptext = "Will turn your voice into the name that you enter."
button_overlay_icon_state = "mimic_voice"
button_icon_state = "mimic_voice"
dna_cost = 2
req_human = TRUE
power_type = CHANGELING_PURCHASABLE_POWER
@@ -119,7 +119,7 @@
name = "Arm Blade"
desc = "We reform one of our arms into a deadly blade. Costs 15 chemicals."
helptext = "We may retract our armblade in the same manner as we form it. Cannot be used while in lesser form."
button_overlay_icon_state = "armblade"
button_icon_state = "armblade"
chemical_cost = 15
dna_cost = 4
req_human = TRUE
@@ -183,7 +183,7 @@
Grab will immobilize the target and wrap a tentacle around them. \
Harm will drag the target closer and hit them with the object in our other hand. \
Cannot be used while in our lesser form."
button_overlay_icon_state = "tentacle"
button_icon_state = "tentacle"
chemical_cost = 10
dna_cost = 4
req_human = TRUE
@@ -406,7 +406,7 @@
name = "Organic Shield"
desc = "We reform one of our arms into a hard shield. Costs 20 chemicals."
helptext = "Organic tissue cannot resist damage forever, with the shield breaking after it is hit 6 times. Can be used to parry attacks and projectiles. Cannot be used while in lesser form."
button_overlay_icon_state = "organic_shield"
button_icon_state = "organic_shield"
chemical_cost = 20
dna_cost = 2
req_human = TRUE
@@ -441,7 +441,7 @@
name = "Organic Space Suit"
desc = "We grow an organic suit to protect ourselves from space exposure. Costs 20 chemicals."
helptext = "We must constantly repair our form to make it space proof, reducing chemical production while we are protected. Cannot be used in lesser form."
button_overlay_icon_state = "organic_suit"
button_icon_state = "organic_suit"
chemical_cost = 20
dna_cost = 4
req_human = TRUE
@@ -488,7 +488,7 @@
name = "Chitinous Armor"
desc = "We turn our skin into tough chitin to protect us from damage. Costs 25 chemicals."
helptext = "Upkeep of the armor requires a low expenditure of chemicals. The armor is strong against brute force, but does not provide much protection from lasers. Cannot be used in lesser form."
button_overlay_icon_state = "chitinous_armor"
button_icon_state = "chitinous_armor"
chemical_cost = 25
dna_cost = 4
req_human = TRUE
@@ -586,7 +586,7 @@
name = "Bone Shard"
desc = "We evolve the ability to break off shards of our bone and shape them into throwing weapons which embed into our foes. Costs 15 chemicals."
helptext = "The shards of bone will dull upon hitting a target, rendering them unusable as weapons."
button_overlay_icon_state = "boneshard"
button_icon_state = "boneshard"
chemical_cost = 15
dna_cost = 3
req_human = TRUE
@@ -2,7 +2,7 @@
name = "Anatomic Panacea"
desc = "Expels impurifications from our form, curing diseases, removing parasites, sobering us, purging toxins and radiation, and resetting our genetic code completely. Costs 20 chemicals."
helptext = "Can be used while unconscious."
button_overlay_icon_state = "panacea"
button_icon_state = "panacea"
chemical_cost = 20
dna_cost = 2
req_stat = UNCONSCIOUS
@@ -1,7 +1,7 @@
/datum/action/changeling/revive
name = "Regenerate"
desc = "We regenerate, healing all damage from our form."
button_overlay_icon_state = "revive"
button_icon_state = "revive"
req_dna = 1
req_stat = DEAD
bypass_fake_death = TRUE
@@ -2,7 +2,7 @@
name = "Resonant Shriek"
desc = "Our lungs and vocal cords shift, allowing us to briefly emit a noise that deafens and confuses the weak minded. Costs 30 chemicals."
helptext = "Emits a high frequency sound that confuses and deafens humans, blows out nearby lights and overloads cyborg sensors."
button_overlay_icon_state = "resonant_shriek"
button_icon_state = "resonant_shriek"
chemical_cost = 30
dna_cost = 2
req_human = TRUE
@@ -42,7 +42,7 @@
/datum/action/changeling/dissonant_shriek
name = "Dissonant Shriek"
desc = "We shift our vocal cords to release a high frequency sound that overloads nearby electronics. Costs 30 chemicals."
button_overlay_icon_state = "dissonant_shriek"
button_icon_state = "dissonant_shriek"
chemical_cost = 30
dna_cost = 2
power_type = CHANGELING_PURCHASABLE_POWER
@@ -5,7 +5,7 @@
name = "Strained Muscles"
desc = "We evolve the ability to reduce the acid buildup in our muscles, allowing us to move much faster."
helptext = "The strain will use up our chemicals faster over time, and is not sustainable. Can not be used in lesser form."
button_overlay_icon_state = "strained_muscles"
button_icon_state = "strained_muscles"
dna_cost = 2
req_human = TRUE
power_type = CHANGELING_PURCHASABLE_POWER
@@ -7,7 +7,7 @@
name = "Spread Infestation"
desc = "Our form divides, creating an aggressive arachnid which will regard us as a friend. Costs 30 chemicals."
helptext = "The spiders are thoughtless creatures, but will not attack their creators. Their orders can be changed via remote hivemind (Alt+Shift click)."
button_overlay_icon_state = "spread_infestation"
button_icon_state = "spread_infestation"
chemical_cost = 30
dna_cost = 4
/// This var keeps track of the changeling's spider count
@@ -2,7 +2,7 @@
name = "Swap Forms"
desc = "We force ourselves into the body of another form, pushing their consciousness into the form we left behind. Costs 40 chemicals."
helptext = "We will bring all our abilities with us, but we will lose our old form DNA in exchange for the new one. The process will seem suspicious to any observers."
button_overlay_icon_state = "cling_mindswap"
button_icon_state = "cling_mindswap"
chemical_cost = 40
dna_cost = 2
req_human = TRUE //Monkeys can't grab
@@ -79,7 +79,7 @@
name = "Extract DNA Sting"
desc = "We stealthily sting a target and extract their DNA. Costs 25 chemicals."
helptext = "Will give you the DNA of your target, allowing you to transform into them."
button_overlay_icon_state = "sting_extract"
button_icon_state = "sting_extract"
sting_icon = "sting_extract"
chemical_cost = 25
power_type = CHANGELING_INNATE_POWER
@@ -99,7 +99,7 @@
name = "Mute Sting"
desc = "We silently sting a human, completely silencing them for a short time. Costs 20 chemicals."
helptext = "Does not provide a warning to the victim that they have been stung, until they try to speak and cannot."
button_overlay_icon_state = "sting_mute"
button_icon_state = "sting_mute"
sting_icon = "sting_mute"
chemical_cost = 20
dna_cost = 4
@@ -115,7 +115,7 @@
name = "Blind Sting"
desc = "We temporarily blind our victim. Costs 25 chemicals."
helptext = "This sting completely blinds a target for a short time, and leaves them with blurred vision for a long time."
button_overlay_icon_state = "sting_blind"
button_icon_state = "sting_blind"
sting_icon = "sting_blind"
chemical_cost = 25
dna_cost = 2
@@ -135,7 +135,7 @@
name = "Cryogenic Sting"
desc = "We silently sting our victim with a cocktail of chemicals that freezes them from the inside. Costs 15 chemicals."
helptext = "Does not provide a warning to the victim, though they will likely realize they are suddenly freezing."
button_overlay_icon_state = "sting_cryo"
button_icon_state = "sting_cryo"
sting_icon = "sting_cryo"
chemical_cost = 15
dna_cost = 4
@@ -153,7 +153,7 @@
name = "Lethargic Sting"
desc = "We silently sting our victim with a chemical that will gradually drain their stamina. Costs 50 chemicals."
helptext = "Does not provide a warning to the victim, though they will quickly realize they have been poisoned."
button_overlay_icon_state = "sting_lethargic"
button_icon_state = "sting_lethargic"
sting_icon = "sting_lethargic"
chemical_cost = 50
dna_cost = 4
@@ -1,7 +1,7 @@
/datum/action/changeling/transform
name = "Transform"
desc = "We take on the appearance and voice of one we have absorbed. Costs 5 chemicals."
button_overlay_icon_state = "transform"
button_icon_state = "transform"
chemical_cost = 5
power_type = CHANGELING_INNATE_POWER
req_dna = 1
@@ -268,7 +268,7 @@
return // TODO, add a refund proc?
user_eyes.AddComponent(/datum/component/scope, item_action_type = /datum/action/item_action/organ_action/toggle, flags = SCOPE_CLICK_MIDDLE)
for(var/datum/action/action in user_eyes.actions)
action.button_background_icon_state = "bg_flayer"
action.background_icon_state = "bg_flayer"
action.Grant(owner)
/datum/mindflayer_passive/telescopic_eyes/on_remove()
@@ -341,7 +341,7 @@
if(!internal_jammer)
internal_jammer = new /obj/item/jammer(owner) //Shove it in the flayer's chest
for(var/datum/action/action in internal_jammer.actions)
action.button_background_icon_state = "bg_flayer"
action.background_icon_state = "bg_flayer"
action.Grant(owner)
internal_jammer.range = 15 + ((level - 1) * 5) //Base range of the jammer is 15, each level adds 5 tiles for a max of 25 if you want to be REALLY annoying
@@ -301,7 +301,7 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
check_vampire_upgrade(TRUE)
for(var/datum/spell/S in powers)
if(S.action)
S.action.UpdateButtons()
S.action.build_all_button_icons()
/**
* Safely subtract vampire's bloodusable. Clamped between 0 and bloodtotal.
@@ -14,7 +14,7 @@
action.name = "[initial(name)] ([V.iscloaking ? "Deactivate" : "Activate"])"
SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_NAME)
UpdateButtons()
build_all_button_icons()
/datum/spell/vampire/self/cloak/cast(list/targets, mob/user = usr)
var/datum/antagonist/vampire/V = user.mind.has_antag_datum(/datum/antagonist/vampire)
+4 -4
View File
@@ -2,7 +2,7 @@
/datum/action/chameleon_outfit
name = "Select Chameleon Outfit"
button_overlay_icon_state = "chameleon_outfit"
button_icon_state = "chameleon_outfit"
var/list/outfit_options //By default, this list is shared between all instances. It is not static because if it were, subtypes would not be able to have their own. If you ever want to edit it, copy it first.
/datum/action/chameleon_outfit/New()
@@ -92,7 +92,7 @@
qdel(O)
..()
/datum/action/item_action/chameleon_change/UpdateButton(atom/movable/screen/movable/action_button/button, status_only, force)
/datum/action/item_action/chameleon_change/update_button_name(atom/movable/screen/movable/action_button/button, force)
. = ..()
if(.)
button.name = "Change [chameleon_name] Appearance"
@@ -138,7 +138,7 @@
update_look(usr, chameleon_list[chameleon_name][params["new_appearance"]])
/datum/action/item_action/chameleon_change/proc/initialize_disguises()
UpdateButtons()
build_all_button_icons()
chameleon_blacklist |= typecacheof(target.type)
if(!isnull(chameleon_list[chameleon_name]))
return
@@ -179,7 +179,7 @@
var/obj/item/thing = target
thing.update_slot_icon()
SStgui.update_uis(src)
UpdateButtons()
build_all_button_icons()
/datum/action/item_action/chameleon_change/proc/update_item(obj/item/picked_item)
target.name = initial(picked_item.name)
+2 -2
View File
@@ -206,8 +206,8 @@
/datum/action/innate/communicate_overmind_blob
name = "Speak with the overmind"
button_overlay_icon = 'icons/mob/guardian.dmi'
button_overlay_icon_state = "communicate"
button_icon = 'icons/mob/guardian.dmi'
button_icon_state = "communicate"
/datum/action/innate/communicate_overmind_blob/Activate()
var/mob/living/simple_animal/hostile/blob/blobbernaut/user = owner
+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))
+4 -4
View File
@@ -13,7 +13,7 @@
/datum/action/neutral_stance
name = "Neutral Stance - You relax, cancelling your last Krav Maga stance attack."
button_overlay_icon_state = "neutralstance"
button_icon_state = "neutralstance"
/datum/action/neutral_stance/Trigger(left_click)
var/mob/living/carbon/human/H = owner
@@ -27,7 +27,7 @@
/datum/action/neck_chop
name = "Neck Chop - Injures the neck, stopping the victim from speaking for a while."
button_overlay_icon_state = "neckchop"
button_icon_state = "neckchop"
/datum/action/neck_chop/Trigger(left_click)
var/mob/living/carbon/human/H = owner //This is a janky solution, but I want to refactor krav anyway and un-jank this (written in may 2023)
@@ -45,7 +45,7 @@
H.mind.martial_art.in_stance = TRUE
/datum/action/leg_sweep
name = "Leg Sweep - Trips the victim, rendering them prone and unable to move for a short time."
button_overlay_icon_state = "legsweep"
button_icon_state = "legsweep"
/datum/action/leg_sweep/Trigger(left_click)
var/mob/living/carbon/human/H = owner
@@ -70,7 +70,7 @@
/datum/action/lung_punch//referred to internally as 'quick choke'
name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time."
button_overlay_icon_state = "lungpunch"
button_icon_state = "lungpunch"
/datum/action/lung_punch/Trigger(left_click)
var/mob/living/carbon/human/H = owner
+1 -1
View File
@@ -244,7 +244,7 @@
/datum/action/defensive_stance
name = "Defensive Stance - Ready yourself to be attacked, allowing you to parry incoming melee hits."
button_overlay_icon_state = "block"
button_icon_state = "block"
/datum/action/defensive_stance/Trigger(left_click)
var/mob/living/carbon/human/H = owner
@@ -13,7 +13,7 @@
given_action.Grant(src)
/datum/action/innate/admin
button_overlay_icon = 'icons/mob/actions/actions_admin.dmi'
button_icon = 'icons/mob/actions/actions_admin.dmi'
var/rights_required = R_ADMIN
/datum/action/innate/admin/Trigger()
@@ -29,11 +29,12 @@
/datum/action/innate/admin/ticket
name = "Adminhelps"
desc = "There are 0 open tickets."
button_overlay_icon_state = "adminhelp"
button_icon_state = "adminhelp"
var/mutable_appearance/button_text
var/ticket_amt = 0
/datum/action/innate/admin/ticket/New(Target)
button_overlay_icon_state = "nohelp"
button_icon_state = "nohelp"
. = ..()
register_ticket_signals()
@@ -48,24 +49,26 @@
ticket_amt = _ticket_amt
desc = "There are [ticket_amt] open tickets."
if(ticket_amt > 0)
button_overlay_icon_state = initial(button_overlay_icon_state)
button_icon_state = initial(button_icon_state)
else
button_overlay_icon_state = "nohelp"
UpdateButtons()
button_icon_state = "nohelp"
build_all_button_icons(force = TRUE)
/datum/action/innate/admin/ticket/UpdateButton(atom/movable/screen/movable/action_button/button, status_only, force)
/datum/action/innate/admin/ticket/apply_button_overlay(atom/movable/screen/movable/action_button/button, force)
. = ..()
if(ticket_amt <= 0)
return
var/image/maptext_holder = image('icons/effects/effects.dmi', icon_state = "nothing")
maptext_holder.plane = FLOAT_PLANE + 1.1
maptext_holder.maptext = "<span class='maptext'>[ticket_amt]</span>"
maptext_holder.maptext_x = 2
button.add_overlay(maptext_holder)
// TODO: We need a generic way to handle button text for actions bc this is atrocious
// Yes cutting and adding the overlay each time is required
button.cut_overlay(button_text)
button_text = mutable_appearance('icons/effects/effects.dmi', icon_state = "nothing")
button_text.appearance_flags = RESET_COLOR | RESET_ALPHA
button_text.plane = FLOAT_PLANE + 1
button_text.maptext_x = 2
button_text.maptext = ticket_amt > 0 ? "<span class='maptext'>[ticket_amt]</span>" : ""
button.add_overlay(button_text)
/datum/action/innate/admin/ticket/mentor
name = "Mentorhelps"
button_overlay_icon_state = "mentorhelp"
button_icon_state = "mentorhelp"
rights_required = R_MENTOR|R_ADMIN
/datum/action/innate/admin/ticket/mentor/register_ticket_signals()
@@ -1,10 +1,10 @@
/datum/action/innate/minedrone
check_flags = AB_CHECK_CONSCIOUS
button_background_icon_state = "bg_default"
background_icon_state = "bg_default"
/datum/action/innate/minedrone/toggle_light
name = "Toggle Light"
button_overlay_icon_state = "mech_lights_off"
button_icon_state = "mech_lights_off"
/datum/action/innate/minedrone/toggle_light/Activate()
var/mob/living/basic/mining_drone/user = owner
@@ -18,7 +18,7 @@
/datum/action/innate/minedrone/toggle_meson_vision
name = "Toggle Meson Vision"
button_overlay_icon_state = "meson"
button_icon_state = "meson"
/datum/action/innate/minedrone/toggle_meson_vision/Activate()
var/mob/living/user = owner
@@ -41,7 +41,7 @@
/datum/action/innate/minedrone/dump_ore
name = "Dump Ore"
button_overlay_icon_state = "mech_eject"
button_icon_state = "mech_eject"
/datum/action/innate/minedrone/dump_ore/Activate()
var/mob/living/basic/mining_drone/user = owner
+4 -4
View File
@@ -79,7 +79,7 @@
alien = 0
if(radio_action)
radio_action.UpdateButtons()
radio_action.build_all_button_icons()
SSblackbox.record_feedback("amount", "mmis_filled", 1)
else
to_chat(user, "<span class='warning'>You can't drop [B]!</span>")
@@ -178,7 +178,7 @@
/obj/item/mmi/proc/become_occupied(new_icon)
icon_state = new_icon
if(radio)
radio_action.UpdateButtons()
radio_action.build_all_button_icons()
/obj/item/mmi/examine(mob/user)
. = ..()
@@ -212,8 +212,8 @@
return ..()
/datum/action/generic/configure_mmi_radio/apply_button_overlay(atom/movable/screen/movable/action_button/current_button)
button_overlay_icon = mmi.icon
button_overlay_icon_state = mmi.icon_state
button_icon = mmi.icon
button_icon_state = mmi.icon_state
..()
/obj/item/mmi/emp_act(severity)
@@ -213,7 +213,7 @@ Des: Removes all infected images from the alien.
and carry the owner just to make sure*/
/mob/living/carbon/proc/update_plasma_display(mob/owner)
for(var/datum/action/spell_action/action in actions)
action.UpdateButtons()
action.build_all_button_icons()
if(!hud_used || !isalien(owner)) //clientless aliens or non aliens
return
hud_used.alien_plasma_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'> <font face='Small Fonts' color='magenta'>[get_plasma()]</font></div>"
@@ -155,7 +155,7 @@
name = "Ignite"
desc = "Set yourself aflame, bringing yourself closer to exploding!"
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon_state = "sacredflame"
button_icon_state = "sacredflame"
/datum/action/innate/golem_ignite/Activate()
if(ishuman(owner))
@@ -504,6 +504,7 @@
/datum/action/innate/unstable_teleport
name = "Unstable Teleport"
check_flags = AB_CHECK_CONSCIOUS
button_icon_state = "blink"
var/activated = FALSE // To prevent spamming
var/cooldown = 150
var/last_teleport = 0
@@ -545,9 +546,9 @@
H.unbuckle(force = TRUE)
do_teleport(H, picked)
last_teleport = world.time
UpdateButtons() //action icon looks unavailable
build_all_button_icons() //action icon looks unavailable
sleep(cooldown + 5)
UpdateButtons() //action icon looks available again
build_all_button_icons() //action icon looks available again
/datum/unarmed_attack/golem/bluespace
attack_verb = "bluespace punch"
@@ -138,7 +138,7 @@
/datum/action/innate/change_monitor
name = "Change Monitor"
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon_state = "scan_mode"
button_icon_state = "scan_mode"
/datum/action/innate/change_monitor/Activate()
var/mob/living/carbon/human/H = owner
@@ -157,8 +157,8 @@
name = "Cocoon"
desc = "Restore your wings and antennae, and heal some damage. If your cocoon is broken externally you will take heavy damage!"
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_CONSCIOUS|AB_CHECK_TURF
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "cocoon1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "cocoon1"
/datum/action/innate/cocoon/Activate()
var/mob/living/carbon/human/moth/H = owner
@@ -113,8 +113,8 @@
/datum/action/innate/slimecolor
name = "Toggle Recolor"
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "greenglow"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "greenglow"
/datum/action/innate/slimecolor/Activate()
var/mob/living/carbon/human/H = owner
@@ -129,8 +129,8 @@
/datum/action/innate/regrow
name = "Regrow limbs"
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "greenglow"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "greenglow"
/datum/action/innate/regrow/Activate()
var/mob/living/carbon/human/H = owner
@@ -79,8 +79,8 @@
/datum/action/innate/unathi_ignite
name = "Ignite"
desc = "A fire forms in your mouth, fierce enough to... light a cigarette. Requires you to drink welding fuel beforehand."
button_overlay_icon = 'icons/obj/cigarettes.dmi'
button_overlay_icon_state = "match_unathi"
button_icon = 'icons/obj/cigarettes.dmi'
button_icon_state = "match_unathi"
var/cooldown = 0
var/cooldown_duration = 20 SECONDS
var/welding_fuel_used = 3 //one sip, with less strict timing
@@ -1,7 +1,7 @@
/datum/action/innate/robot_sight
var/sight_mode = null
button_overlay_icon = 'icons/obj/decals.dmi'
button_overlay_icon_state = "securearea"
button_icon = 'icons/obj/decals.dmi'
button_icon_state = "securearea"
/datum/action/innate/robot_sight/Activate()
var/mob/living/silicon/robot/R = owner
@@ -22,19 +22,19 @@
/datum/action/innate/robot_sight/thermal
name = "Thermal Vision"
sight_mode = BORGTHERM
button_overlay_icon = 'icons/obj/clothing/glasses.dmi'
button_overlay_icon_state = "thermal"
button_icon = 'icons/obj/clothing/glasses.dmi'
button_icon_state = "thermal"
// ayylmao
/datum/action/innate/robot_sight/thermal/alien
button_overlay_icon = 'icons/mob/alien.dmi'
button_overlay_icon_state = "borg-extra-vision"
button_icon = 'icons/mob/alien.dmi'
button_icon_state = "borg-extra-vision"
/datum/action/innate/robot_sight/meson
name = "Meson Vision"
sight_mode = BORGMESON
button_overlay_icon = 'icons/obj/clothing/glasses.dmi'
button_overlay_icon_state = "meson"
button_icon = 'icons/obj/clothing/glasses.dmi'
button_icon_state = "meson"
#define MODE_NONE ""
#define MODE_MESON "meson"
@@ -46,8 +46,8 @@
/datum/action/innate/robot_sight/engineering_scanner
name = "Engineering Scanner Vision"
sight_mode = BORGMESON
button_overlay_icon = 'icons/obj/clothing/glasses.dmi'
button_overlay_icon_state = "trayson-meson"
button_icon = 'icons/obj/clothing/glasses.dmi'
button_icon_state = "trayson-meson"
var/list/mode_list = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_RAD, MODE_RAD = MODE_PRESSURE, MODE_PRESSURE = MODE_NONE)
var/mode = MODE_NONE
@@ -55,7 +55,7 @@
var/mob/living/silicon/robot/R = owner
mode = mode_list[mode]
to_chat(owner, "<span class='notice'>You turn your enhanced optics [mode ? "to [mode] mode." : "off."]</span>")
button_overlay_icon_state = "trayson-[mode]"
button_icon_state = "trayson-[mode]"
if(mode == MODE_MESON)
R.sight_mode |= sight_mode
@@ -95,8 +95,8 @@
/datum/action/innate/robot_magpulse
name = "Magnetic pulse"
button_overlay_icon = 'icons/obj/clothing/shoes.dmi'
button_overlay_icon_state = "magboots0"
button_icon = 'icons/obj/clothing/shoes.dmi'
button_icon_state = "magboots0"
var/slowdown_active = 2 // Same as magboots
/datum/action/innate/robot_magpulse/Activate()
@@ -104,7 +104,7 @@
to_chat(owner, "You turn your magboots on.")
var/mob/living/silicon/robot/robot = owner
robot.speed += slowdown_active
button_overlay_icon_state = "magboots1"
button_icon_state = "magboots1"
active = TRUE
/datum/action/innate/robot_magpulse/Deactivate()
@@ -112,12 +112,12 @@
to_chat(owner, "You turn your magboots off.")
var/mob/living/silicon/robot/robot = owner
robot.speed -= slowdown_active
button_overlay_icon_state = initial(button_overlay_icon_state)
button_icon_state = initial(button_icon_state)
active = FALSE
/datum/action/innate/robot_override_lock
name = "Override lockdown"
button_overlay_icon_state = "unlock_self"
button_icon_state = "unlock_self"
/datum/action/innate/robot_override_lock/Activate()
to_chat(owner, "<span class='danger'>HARDWARE_OVERRIDE_SYNDICATE: Lockdown lifted. Connection to NT systems severed.</span>")
@@ -57,8 +57,8 @@
/datum/action/innate/diona/merge
name = "Merge with gestalt"
button_overlay_icon = 'icons/mob/human_races/r_diona.dmi'
button_overlay_icon_state = "preview"
button_icon = 'icons/mob/human_races/r_diona.dmi'
button_icon_state = "preview"
/datum/action/innate/diona/merge/Activate()
var/mob/living/simple_animal/diona/user = owner
@@ -66,8 +66,8 @@
/datum/action/innate/diona/evolve
name = "Evolve"
button_overlay_icon = 'icons/obj/cloning.dmi'
button_overlay_icon_state = "pod_cloning"
button_icon = 'icons/obj/cloning.dmi'
button_icon_state = "pod_cloning"
/datum/action/innate/diona/evolve/Activate()
var/mob/living/simple_animal/diona/user = owner
@@ -75,8 +75,8 @@
/datum/action/innate/diona/steal_blood
name = "Steal blood"
button_overlay_icon = 'icons/goonstation/objects/iv.dmi'
button_overlay_icon_state = "bloodbag"
button_icon = 'icons/goonstation/objects/iv.dmi'
button_icon_state = "bloodbag"
/datum/action/innate/diona/steal_blood/Activate()
var/mob/living/simple_animal/diona/user = owner
@@ -132,8 +132,8 @@
/datum/action/innate/nian_caterpillar_emerge
name = "Evolve"
desc = "Weave a cocoon around yourself to evolve into a greater form. The worme."
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "cocoon1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "cocoon1"
/datum/action/innate/nian_caterpillar_emerge/proc/emerge(obj/structure/moth_cocoon/C)
for(var/mob/living/carbon/human/H in C)
@@ -4,7 +4,7 @@
var/layer_to_change_from = MOB_LAYER
var/layer_to_change_to = TURF_LAYER + 0.2
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon_state = "mouse_gray_sleep"
button_icon_state = "mouse_gray_sleep"
/datum/action/innate/hide/Activate()
var/mob/living/simple_animal/simplemob = owner
@@ -23,9 +23,9 @@
/datum/action/innate/hide/alien_larva_hide
desc = "Allows to hide beneath tables or certain items. Toggled on or off."
button_background_icon_state = "bg_alien"
button_overlay_icon_state = "alien_hide"
background_icon_state = "bg_alien"
button_icon_state = "alien_hide"
layer_to_change_to = ABOVE_NORMAL_TURF_LAYER
/datum/action/innate/hide/drone_hide
button_overlay_icon_state = "repairbot"
button_icon_state = "repairbot"
@@ -163,8 +163,8 @@
/datum/action/innate/web_giant_spider
name = "Lay Web"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "stickyweb1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "stickyweb1"
/datum/action/innate/web_giant_spider/Activate()
var/mob/living/simple_animal/hostile/poison/giant_spider/user = owner
@@ -172,8 +172,8 @@
/datum/action/innate/wrap_giant_spider
name = "Wrap"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "cocoon_large1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "cocoon_large1"
/datum/action/innate/wrap_giant_spider/Activate()
var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/user = owner
@@ -181,8 +181,8 @@
/datum/action/innate/lay_eggs_giant_spider
name = "Lay Eggs"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "eggs"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "eggs"
/datum/action/innate/lay_eggs_giant_spider/Activate()
var/mob/living/simple_animal/hostile/poison/giant_spider/nurse/user = owner
@@ -56,8 +56,8 @@
/datum/action/innate/gorilla_toggle
name = "Toggle Stand"
desc = "Toggles between crawling and standing up."
button_overlay_icon = 'icons/mob/actions/actions_animal.dmi'
button_overlay_icon_state = "gorilla_toggle"
button_icon = 'icons/mob/actions/actions_animal.dmi'
button_icon_state = "gorilla_toggle"
check_flags = AB_CHECK_CONSCIOUS
/datum/action/innate/gorilla_toggle/Activate()
@@ -73,22 +73,22 @@ Difficulty: Medium
/datum/action/innate/megafauna_attack/dash
name = "Dash To Target"
button_overlay_icon = 'icons/mob/actions/actions.dmi'
button_overlay_icon_state = "sniper_zoom"
button_icon = 'icons/mob/actions/actions.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now dashing to your target.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/kinetic_accelerator
name = "Fire Kinetic Accelerator"
button_overlay_icon = 'icons/obj/guns/energy.dmi'
button_overlay_icon_state = "kineticgun"
button_icon = 'icons/obj/guns/energy.dmi'
button_icon_state = "kineticgun"
chosen_message = "<span class='colossus'>You are now shooting your kinetic accelerator.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/transform_weapon
name = "Transform Weapon"
button_overlay_icon = 'icons/obj/lavaland/artefacts.dmi'
button_overlay_icon_state = "cleaving_saw"
button_icon = 'icons/obj/lavaland/artefacts.dmi'
button_icon_state = "cleaving_saw"
chosen_message = "<span class='colossus'>You are now transforming your weapon.</span>"
chosen_attack_num = 3
@@ -97,29 +97,29 @@ Difficulty: Hard
/datum/action/innate/megafauna_attack/triple_charge
name = "Triple Charge"
button_overlay_icon = 'icons/mob/actions/actions.dmi'
button_overlay_icon_state = "sniper_zoom"
button_icon = 'icons/mob/actions/actions.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now triple charging at the target you click on.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/hallucination_charge
name = "Hallucination Charge"
button_overlay_icon = 'icons/effects/bubblegum.dmi'
button_overlay_icon_state = "smack ya one"
button_icon = 'icons/effects/bubblegum.dmi'
button_icon_state = "smack ya one"
chosen_message = "<span class='colossus'>You are now charging with hallucinations at the target you click on.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/hallucination_surround
name = "Surround Target"
button_overlay_icon = 'icons/turf/walls/wall.dmi'
button_overlay_icon_state = "wall-0"
button_icon = 'icons/turf/walls/wall.dmi'
button_icon_state = "wall-0"
chosen_message = "<span class='colossus'>You are now surrounding the target you click on with hallucinations.</span>"
chosen_attack_num = 3
/datum/action/innate/megafauna_attack/blood_warp
name = "Blood Warp"
button_overlay_icon = 'icons/effects/blood.dmi'
button_overlay_icon_state = "floor1"
button_icon = 'icons/effects/blood.dmi'
button_icon_state = "floor1"
chosen_message = "<span class='colossus'>You are now warping to blood around your clicked position.</span>"
chosen_attack_num = 4
@@ -80,29 +80,29 @@ Difficulty: Very Hard
/datum/action/innate/megafauna_attack/spiral_attack
name = "Spiral Shots"
button_overlay_icon = 'icons/mob/actions/actions.dmi'
button_overlay_icon_state = "sniper_zoom"
button_icon = 'icons/mob/actions/actions.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now firing in a spiral.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/aoe_attack
name = "All Directions"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "at_shield2"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "at_shield2"
chosen_message = "<span class='colossus'>You are now firing in all directions.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/shotgun
name = "Shotgun Fire"
button_overlay_icon = 'icons/obj/guns/projectile.dmi'
button_overlay_icon_state = "shotgun"
button_icon = 'icons/obj/guns/projectile.dmi'
button_icon_state = "shotgun"
chosen_message = "<span class='colossus'>You are now firing shotgun shots where you aim.</span>"
chosen_attack_num = 3
/datum/action/innate/megafauna_attack/alternating_cardinals
name = "Alternating Shots"
button_overlay_icon = 'icons/obj/guns/projectile.dmi'
button_overlay_icon_state = "pistol"
button_icon = 'icons/obj/guns/projectile.dmi'
button_icon_state = "pistol"
chosen_message = "<span class='colossus'>You are now firing in alternating cardinal directions.</span>"
chosen_attack_num = 4
@@ -73,29 +73,29 @@ Difficulty: Medium
/datum/action/innate/megafauna_attack/fire_cone
name = "Fire Cone"
button_overlay_icon = 'icons/obj/wizard.dmi'
button_overlay_icon_state = "fireball"
button_icon = 'icons/obj/wizard.dmi'
button_icon_state = "fireball"
chosen_message = "<span class='colossus'>You are now shooting fire at your target.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/fire_cone_meteors
name = "Fire Cone With Meteors"
button_overlay_icon = 'icons/mob/actions/actions.dmi'
button_overlay_icon_state = "sniper_zoom"
button_icon = 'icons/mob/actions/actions.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now shooting fire at your target and raining fire around you.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/mass_fire
name = "Mass Fire Attack"
button_overlay_icon = 'icons/effects/fire.dmi'
button_overlay_icon_state = "1"
button_icon = 'icons/effects/fire.dmi'
button_icon_state = "1"
chosen_message = "<span class='colossus'>You are now shooting mass fire at your target.</span>"
chosen_attack_num = 3
/datum/action/innate/megafauna_attack/lava_swoop
name = "Lava Swoop"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "lavastaff_warn"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "lavastaff_warn"
chosen_message = "<span class='colossus'>You are now swooping and raining lava at your target.</span>"
chosen_attack_num = 4
@@ -92,29 +92,29 @@ Difficulty: Hard
/datum/action/innate/megafauna_attack/blink
name = "Blink To Target"
button_overlay_icon = 'icons/mob/actions/actions.dmi'
button_overlay_icon_state = "sniper_zoom"
button_icon = 'icons/mob/actions/actions.dmi'
button_icon_state = "sniper_zoom"
chosen_message = "<span class='colossus'>You are now blinking to your target.</span>"
chosen_attack_num = 1
/datum/action/innate/megafauna_attack/chaser_swarm
name = "Chaser Swarm"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "hierophant_squares_indefinite"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "hierophant_squares_indefinite"
chosen_message = "<span class='colossus'>You are firing a chaser swarm at your target.</span>"
chosen_attack_num = 2
/datum/action/innate/megafauna_attack/cross_blasts
name = "Cross Blasts"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "hierophant_blast_indefinite"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "hierophant_blast_indefinite"
chosen_message = "<span class='colossus'>You are now firing cross blasts at your target.</span>"
chosen_attack_num = 3
/datum/action/innate/megafauna_attack/blink_spam
name = "Blink Chase"
button_overlay_icon = 'icons/obj/lavaland/artefacts.dmi'
button_overlay_icon_state = "hierophant_club_ready_beacon"
button_icon = 'icons/obj/lavaland/artefacts.dmi'
button_icon_state = "hierophant_club_ready_beacon"
chosen_message = "<span class='colossus'>You are now repeatedly blinking at your target.</span>"
chosen_attack_num = 4
@@ -216,8 +216,8 @@
/datum/action/innate/megafauna_attack
name = "Megafauna Attack"
button_overlay_icon = 'icons/mob/actions/actions_animal.dmi'
button_overlay_icon_state = ""
button_icon = 'icons/mob/actions/actions_animal.dmi'
button_icon_state = ""
var/mob/living/simple_animal/hostile/megafauna/M
var/chosen_message
var/chosen_attack_num = 0
@@ -102,15 +102,15 @@ While using this makes the system rely on OnFire, it still gives options for tim
/datum/action/innate/elite_attack
name = "Elite Attack"
button_overlay_icon = 'icons/mob/actions/actions_elites.dmi'
button_overlay_icon_state = ""
button_background_icon_state = "bg_default"
button_icon = 'icons/mob/actions/actions_elites.dmi'
button_icon_state = ""
background_icon_state = "bg_default"
///The displayed message into chat when this attack is selected
var/chosen_message
///The internal attack ID for the elite's OpenFire() proc to use
var/chosen_attack_num = 0
/datum/action/innate/elite_attack/CreateButton()
/datum/action/innate/elite_attack/create_button()
var/atom/movable/screen/movable/action_button/button = ..()
button.maptext = ""
button.maptext_x = 8
@@ -124,11 +124,11 @@ While using this makes the system rely on OnFire, it still gives options for tim
STOP_PROCESSING(SSfastprocess, src)
qdel(src)
return
UpdateButtons()
build_all_button_icons()
/datum/action/innate/elite_attack/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force = FALSE)
/datum/action/innate/elite_attack/build_button_icon(atom/movable/screen/movable/action_button/button, update_flags, force)
. = ..()
if(status_only)
if(update_flags & UPDATE_BUTTON_STATUS)
return
var/mob/living/simple_animal/hostile/asteroid/elite/elite_owner = owner
var/timeleft = max(elite_owner.ranged_cooldown - world.time, 0)
@@ -52,25 +52,25 @@
/datum/action/innate/elite_attack/tentacle_patch
name = "Tentacle Patch"
button_overlay_icon_state = "tentacle_patch"
button_icon_state = "tentacle_patch"
chosen_message = "<span class='boldwarning'>You are now attacking with a patch of tentacles.</span>"
chosen_attack_num = TENTACLE_PATCH
/datum/action/innate/elite_attack/spawn_children
name = "Spawn Children"
button_overlay_icon_state = "spawn_children"
button_icon_state = "spawn_children"
chosen_message = "<span class='boldwarning'>You will spawn two children at your location to assist you in combat. You can have up to 8.</span>"
chosen_attack_num = SPAWN_CHILDREN
/datum/action/innate/elite_attack/rage
name = "Rage"
button_overlay_icon_state = "rage"
button_icon_state = "rage"
chosen_message = "<span class='boldwarning'>You will temporarily increase your movement speed.</span>"
chosen_attack_num = RAGE
/datum/action/innate/elite_attack/call_children
name = "Call Children"
button_overlay_icon_state = "call_children"
button_icon_state = "call_children"
chosen_message = "<span class='boldwarning'>You will summon your children to your location.</span>"
chosen_attack_num = CALL_CHILDREN
@@ -74,25 +74,25 @@
/datum/action/innate/elite_attack/herald_trishot
name = "Triple Shot"
button_overlay_icon_state = "herald_trishot"
button_icon_state = "herald_trishot"
chosen_message = "<span class='boldwarning'>You are now firing three shots in your chosen direction.</span>"
chosen_attack_num = HERALD_TRISHOT
/datum/action/innate/elite_attack/herald_directionalshot
name = "Circular Shot"
button_overlay_icon_state = "herald_directionalshot"
button_icon_state = "herald_directionalshot"
chosen_message = "<span class='boldwarning'>You are firing projectiles in all directions.</span>"
chosen_attack_num = HERALD_DIRECTIONALSHOT
/datum/action/innate/elite_attack/herald_teleshot
name = "Teleport Shot"
button_overlay_icon_state = "herald_teleshot"
button_icon_state = "herald_teleshot"
chosen_message = "<span class='boldwarning'>You will now fire a shot which teleports you where it lands.</span>"
chosen_attack_num = HERALD_TELESHOT
/datum/action/innate/elite_attack/herald_mirror
name = "Summon Mirror"
button_overlay_icon_state = "herald_mirror"
button_icon_state = "herald_mirror"
chosen_message = "<span class='boldwarning'>You will spawn a mirror which duplicates your attacks.</span>"
chosen_attack_num = HERALD_MIRROR
@@ -55,25 +55,25 @@
/datum/action/innate/elite_attack/legionnaire_charge
name = "Legionnaire Charge"
button_overlay_icon_state = "legionnaire_charge"
button_icon_state = "legionnaire_charge"
chosen_message = "<span class='boldwarning'>You will attempt to grab your opponent and throw them.</span>"
chosen_attack_num = LEGIONNAIRE_CHARGE
/datum/action/innate/elite_attack/head_detach
name = "Release Head"
button_overlay_icon_state = "head_detach"
button_icon_state = "head_detach"
chosen_message = "<span class='boldwarning'>You will now detach your head or kill it if it is already released.</span>"
chosen_attack_num = HEAD_DETACH
/datum/action/innate/elite_attack/bonfire_teleport
name = "Bonfire Teleport"
button_overlay_icon_state = "bonfire_teleport"
button_icon_state = "bonfire_teleport"
chosen_message = "<span class='boldwarning'>You will leave a bonfire. Second use will let you swap positions with it indefintiely. Using this move on the same tile as your active bonfire removes it.</span>"
chosen_attack_num = BONFIRE_TELEPORT
/datum/action/innate/elite_attack/spew_smoke
name = "Spew Smoke"
button_overlay_icon_state = "spew_smoke"
button_icon_state = "spew_smoke"
chosen_message = "<span class='boldwarning'>Your head will spew smoke in an area, wherever it may be.</span>"
chosen_attack_num = SPEW_SMOKE
@@ -56,25 +56,25 @@
/datum/action/innate/elite_attack/chaser_burst
name = "Chaser Burst"
button_overlay_icon_state = "singular_shot"
button_icon_state = "singular_shot"
chosen_message = "<span class='boldwarning'>You fire a chaser after all mobs in view.</span>"
chosen_attack_num = CHASER_BURST
/datum/action/innate/elite_attack/magic_box
name = "Magic Box"
button_overlay_icon_state = "magic_box"
button_icon_state = "magic_box"
chosen_message = "<span class='boldwarning'>You are now attacking with a box of magic squares.</span>"
chosen_attack_num = MAGIC_BOX
/datum/action/innate/elite_attack/pandora_teleport
name = "Line Teleport"
button_overlay_icon_state = "pandora_teleport"
button_icon_state = "pandora_teleport"
chosen_message = "<span class='boldwarning'>You will now teleport to your target.</span>"
chosen_attack_num = PANDORA_TELEPORT
/datum/action/innate/elite_attack/aoe_squares
name = "AOE Blast"
button_overlay_icon_state = "aoe_squares"
button_icon_state = "aoe_squares"
chosen_message = "<span class='boldwarning'>Your attacks will spawn an AOE blast at your target location.</span>"
chosen_attack_num = AOE_SQUARES
@@ -2,8 +2,8 @@
/datum/action/innate/terrorspider/web
name = "Web"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "stickyweb1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "stickyweb1"
/datum/action/innate/terrorspider/web/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
@@ -11,8 +11,8 @@
/datum/action/innate/terrorspider/wrap
name = "Wrap"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "cocoon_large1"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "cocoon_large1"
/datum/action/innate/terrorspider/wrap/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
@@ -23,8 +23,8 @@
/datum/action/innate/terrorspider/greeneggs
name = "Lay Green Eggs"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "eggs"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "eggs"
/datum/action/innate/terrorspider/greeneggs/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/green/user = owner
@@ -35,8 +35,8 @@
/datum/action/innate/terrorspider/ventsmash
name = "Smash Welded Vent"
button_overlay_icon = 'icons/atmos/vent_pump.dmi'
button_overlay_icon_state = "map_vent"
button_icon = 'icons/atmos/vent_pump.dmi'
button_icon_state = "map_vent"
/datum/action/innate/terrorspider/ventsmash/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
@@ -44,8 +44,8 @@
/datum/action/innate/terrorspider/remoteview
name = "Remote View"
button_overlay_icon = 'icons/obj/eyes.dmi'
button_overlay_icon_state = "heye"
button_icon = 'icons/obj/eyes.dmi'
button_icon_state = "heye"
/datum/action/innate/terrorspider/remoteview/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/user = owner
@@ -56,7 +56,7 @@
/datum/action/innate/terrorspider/mother/royaljelly
name = "Lay Royal Jelly"
button_overlay_icon_state = "spiderjelly"
button_icon_state = "spiderjelly"
/datum/action/innate/terrorspider/mother/royaljelly/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/mother/user = owner
@@ -64,8 +64,8 @@
/datum/action/innate/terrorspider/mother/gatherspiderlings
name = "Gather Spiderlings"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "spiderling"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "spiderling"
/datum/action/innate/terrorspider/mother/gatherspiderlings/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/mother/user = owner
@@ -73,8 +73,8 @@
/datum/action/innate/terrorspider/mother/incubateeggs
name = "Incubate Eggs"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "eggs"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "eggs"
/datum/action/innate/terrorspider/mother/incubateeggs/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/mother/user = owner
@@ -84,8 +84,8 @@
/datum/action/innate/terrorspider/queen/queennest
name = "Nest"
button_overlay_icon = 'icons/mob/terrorspider.dmi'
button_overlay_icon_state = "terror_queen"
button_icon = 'icons/mob/terrorspider.dmi'
button_icon_state = "terror_queen"
/datum/action/innate/terrorspider/queen/queennest/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/user = owner
@@ -93,7 +93,7 @@
/datum/action/innate/terrorspider/queen/queensense
name = "Hive Sense"
button_overlay_icon_state = "mindswap"
button_icon_state = "mindswap"
/datum/action/innate/terrorspider/queen/queensense/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/user = owner
@@ -101,8 +101,8 @@
/datum/action/innate/terrorspider/queen/queeneggs
name = "Lay Queen Eggs"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "eggs"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "eggs"
/datum/action/innate/terrorspider/queen/queeneggs/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/user = owner
@@ -113,8 +113,8 @@
/datum/action/innate/terrorspider/queen/empress/empresserase
name = "Empress Erase Brood"
button_overlay_icon = 'icons/effects/blood.dmi'
button_overlay_icon_state = "mgibbl1"
button_icon = 'icons/effects/blood.dmi'
button_icon_state = "mgibbl1"
/datum/action/innate/terrorspider/queen/empress/empresserase/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/user = owner
@@ -122,8 +122,8 @@
/datum/action/innate/terrorspider/queen/empress/empresslings
name = "Empresss Spiderlings"
button_overlay_icon = 'icons/effects/effects.dmi'
button_overlay_icon_state = "spiderling"
button_icon = 'icons/effects/effects.dmi'
button_icon_state = "spiderling"
/datum/action/innate/terrorspider/queen/empress/empresslings/Activate()
var/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/user = owner
@@ -44,7 +44,7 @@
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/NestMode()
..()
queeneggs_action.name = "Empress Eggs"
queeneggs_action.UpdateButtons()
queeneggs_action.build_all_button_icons()
/mob/living/simple_animal/hostile/poison/terror_spider/queen/empress/LayQueenEggs()
var/eggtype = tgui_input_list(src, "What kind of eggs?", "Egg laying", list(TS_DESC_QUEEN, TS_DESC_MOTHER, TS_DESC_PRINCE, TS_DESC_PRINCESS, TS_DESC_RED, TS_DESC_GRAY, TS_DESC_GREEN, TS_DESC_BLACK, TS_DESC_PURPLE, TS_DESC_WHITE, TS_DESC_BROWN))
@@ -7,8 +7,8 @@
/datum/action/innate/slime
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon = 'icons/mob/actions/actions_slime.dmi'
button_background_icon_state = "bg_alien"
button_icon = 'icons/mob/actions/actions_slime.dmi'
background_icon_state = "bg_alien"
var/needs_growth = NO_GROWTH_NEEDED
/datum/action/innate/slime/IsAvailable()
@@ -42,7 +42,7 @@
/datum/action/innate/slime/feed
name = "Feed"
button_overlay_icon_state = "slimeeat"
button_icon_state = "slimeeat"
/datum/action/innate/slime/feed/Activate()
@@ -144,7 +144,7 @@
/datum/action/innate/slime/evolve
name = "Evolve"
button_overlay_icon_state = "slimegrow"
button_icon_state = "slimegrow"
needs_growth = GROWTH_NEEDED
/datum/action/innate/slime/evolve/Activate()
@@ -205,7 +205,7 @@
/datum/action/innate/slime/reproduce
name = "Reproduce"
button_overlay_icon_state = "slimesplit"
button_icon_state = "slimesplit"
needs_growth = GROWTH_NEEDED
/datum/action/innate/slime/reproduce/Activate()
+1 -1
View File
@@ -82,7 +82,7 @@
if(mind)
for(var/S in mind.spell_list)
var/datum/spell/spell = S
spell.UpdateButtons()
spell.build_all_button_icons()
return TRUE
+21 -21
View File
@@ -1,12 +1,11 @@
/datum/action/item_action/mod
button_overlay_icon = 'icons/mob/actions/actions_mod.dmi'
button_overlay_icon_state = "bg_mod_border"
button_background_icon = 'icons/mob/actions/actions_mod.dmi'
button_background_icon_state = "bg_mod"
button_icon = 'icons/mob/actions/actions_mod.dmi'
button_icon_state = "bg_mod_border"
background_icon = 'icons/mob/actions/actions_mod.dmi'
background_icon_state = "bg_mod"
check_flags = AB_CHECK_CONSCIOUS
use_itemicon = FALSE
/datum/action/item_action/mod/New(Target, custom_icon, custom_icon_state)
/datum/action/item_action/mod/New(Target)
..()
if(!ismodcontrol(Target))
qdel(src)
@@ -23,7 +22,7 @@
/datum/action/item_action/mod/deploy
name = "Deploy MODsuit"
desc = "LMB: Deploy/Undeploy full suit. MMB: Deploy/Undeploy part."
button_overlay_icon_state = "deploy"
button_icon_state = "deploy"
/datum/action/item_action/mod/deploy/Trigger(left_click, attack_self)
. = ..()
@@ -38,7 +37,7 @@
/datum/action/item_action/mod/activate
name = "Activate MODsuit"
desc = "LMB: Activate/Deactivate suit with prompt. MMB: Activate/Deactivate suit skipping prompt."
button_overlay_icon_state = "activate"
button_icon_state = "activate"
/// First time clicking this will set it to TRUE, second time will activate it.
var/ready = FALSE
@@ -48,8 +47,8 @@
return
if(!ready && left_click)
ready = TRUE
button_overlay_icon_state = "activate-ready"
UpdateButtons()
button_icon_state = "activate-ready"
build_all_button_icons()
addtimer(CALLBACK(src, PROC_REF(reset_ready)), 3 SECONDS)
return
var/obj/item/mod/control/mod = target
@@ -59,13 +58,13 @@
/// Resets the state requiring to be doubleclicked again.
/datum/action/item_action/mod/activate/proc/reset_ready()
ready = FALSE
button_overlay_icon_state = initial(button_overlay_icon_state)
UpdateButtons()
button_icon_state = initial(button_icon_state)
build_all_button_icons()
/datum/action/item_action/mod/module
name = "Toggle Module"
desc = "Toggle a MODsuit module."
button_overlay_icon_state = "module"
button_icon_state = "module"
/datum/action/item_action/mod/module/Trigger(left_click, attack_self)
. = ..()
@@ -77,7 +76,7 @@
/datum/action/item_action/mod/panel
name = "MODsuit Panel"
desc = "Open the MODsuit's panel."
button_overlay_icon_state = "panel"
button_icon_state = "panel"
/datum/action/item_action/mod/panel/Trigger(left_click, attack_self)
. = ..()
@@ -88,20 +87,21 @@
/datum/action/item_action/mod/pinned_module
desc = "Activate the module."
button_overlay_icon = 'icons/obj/clothing/modsuit/mod_modules.dmi'
button_overlay_icon_state = "module"
button_icon = 'icons/obj/clothing/modsuit/mod_modules.dmi'
button_icon_state = "module"
/// Module we are linked to.
var/obj/item/mod/module/module
/// A ref to the mob we are pinned to.
var/pinner_uid
/datum/action/item_action/mod/pinned_module/New(Target, custom_icon, custom_icon_state, obj/item/mod/module/linked_module, mob/user)
/datum/action/item_action/mod/pinned_module/New(Target, obj/item/mod/module/linked_module, mob/user)
button_icon = linked_module.icon
button_icon_state = linked_module.icon_state
name = "Activate [capitalize(linked_module.name)]"
desc = "Quickly activate [linked_module]."
..()
module = linked_module
button_overlay_icon_state = module.icon_state
button_background_icon_state = ((module.module_type == MODULE_TOGGLE && module.active) ? "bg_mod_active" : "bg_mod")
background_icon_state = ((module.module_type == MODULE_TOGGLE && module.active) ? "bg_mod_active" : "bg_mod")
if(linked_module.allow_flags & MODULE_ALLOW_INCAPACITATED)
// clears check hands
check_flags = AB_CHECK_CONSCIOUS
@@ -131,5 +131,5 @@
/datum/action/item_action/mod/pinned_module/proc/linked_button_update()
if(module.module_type != MODULE_PASSIVE)
button_background_icon_state = (module.active ? "bg_mod_active" : "bg_mod")
UpdateButtons()
background_icon_state = (module.active ? "bg_mod_active" : "bg_mod")
build_all_button_icons()

Some files were not shown because too many files have changed in this diff Show More