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 15:13:28 -04:00
committed by GitHub
parent f9016e65ff
commit 56f4960ed4
115 changed files with 815 additions and 584 deletions
@@ -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()
+1 -1
View File
@@ -331,7 +331,7 @@
qdel(M)
pinned_to = list()
return
var/datum/action/item_action/mod/pinned_module/new_action = new(Target = mod, custom_icon = src.icon, custom_icon_state = src.icon_state, linked_module = src, user = user)
var/datum/action/item_action/mod/pinned_module/new_action = new(Target = mod, linked_module = src, user = user)
to_chat(user, "[new_action] is now pinned to the UI!")
@@ -211,12 +211,11 @@
/datum/action/item_action/mod_recall
name = "Recall MOD"
desc = "Recall a MODsuit anyplace, anytime."
use_itemicon = FALSE
check_flags = AB_CHECK_CONSCIOUS
button_overlay_icon = 'icons/mob/actions/actions_mod.dmi'
button_overlay_icon_state = "recall"
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 = "recall"
background_icon = 'icons/mob/actions/actions_mod.dmi'
background_icon_state = "bg_mod"
/// The cooldown for the recall.
COOLDOWN_DECLARE(recall_cooldown)
@@ -191,7 +191,7 @@
// === SLIME ACTION DATUMS ====
/datum/action/innate/slime_place
name = "Place Slimes"
button_overlay_icon_state = "slime_down"
button_icon_state = "slime_down"
/datum/action/innate/slime_place/Activate()
if(!target || !ishuman(owner))
@@ -211,7 +211,7 @@
/datum/action/innate/slime_pick_up
name = "Pick up Slime"
button_overlay_icon_state = "slime_up"
button_icon_state = "slime_up"
/datum/action/innate/slime_pick_up/Activate()
if(!target || !ishuman(owner))
@@ -233,7 +233,7 @@
/datum/action/innate/feed_slime
name = "Feed Slimes"
button_overlay_icon_state = "monkey_down"
button_icon_state = "monkey_down"
/datum/action/innate/feed_slime/Activate()
if(!target || !ishuman(owner))
@@ -276,7 +276,7 @@
/datum/action/innate/monkey_recycle
name = "Recycle Monkeys"
button_overlay_icon_state = "monkey_up"
button_icon_state = "monkey_up"
/datum/action/innate/monkey_recycle/Activate()
if(!target || !ishuman(owner))
@@ -301,7 +301,7 @@
/datum/action/innate/slime_scan
name = "Scan Slime"
button_overlay_icon_state = "slime_scan"
button_icon_state = "slime_scan"
/datum/action/innate/slime_scan/Activate()
if(!target || !isliving(owner))
@@ -317,7 +317,7 @@
/datum/action/innate/feed_potion
name = "Apply Potion"
button_overlay_icon_state = "slime_potion"
button_icon_state = "slime_potion"
/datum/action/innate/feed_potion/Activate()
if(!target || !ishuman(owner))
@@ -340,7 +340,7 @@
/datum/action/innate/hotkey_help
name = "Hotkey Help"
button_overlay_icon_state = "hotkey_help"
button_icon_state = "hotkey_help"
/datum/action/innate/hotkey_help/Activate()
if(!target || !isliving(owner))
@@ -248,8 +248,8 @@
/datum/spell/drake_breath/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/drake_breath/cast(list/targets, mob/living/user)
. = ..()
@@ -1030,8 +1030,8 @@
/datum/action/innate/migo_noise
name = "Make some noise!"
desc = "Your organ YEARNS to make noises of all kinds. Let it loose for a moment!"
button_overlay_icon = 'icons/mob/animal.dmi'
button_overlay_icon_state = "mi-go"
button_icon = 'icons/mob/animal.dmi'
button_icon_state = "mi-go"
var/cooldown = 0
COOLDOWN_DECLARE(migo_cooldown)
+4 -4
View File
@@ -257,8 +257,8 @@
/datum/action/innate/shuttledocker_rotate
name = "Rotate"
button_overlay_icon = 'icons/mob/actions/actions_mecha.dmi'
button_overlay_icon_state = "mech_cycle_equip_off"
button_icon = 'icons/mob/actions/actions_mecha.dmi'
button_icon_state = "mech_cycle_equip_off"
/datum/action/innate/shuttledocker_rotate/Activate()
if(QDELETED(target) || !isliving(target))
@@ -270,8 +270,8 @@
/datum/action/innate/shuttledocker_place
name = "Place"
button_overlay_icon = 'icons/mob/actions/actions_mecha.dmi'
button_overlay_icon_state = "mech_zoom_off"
button_icon = 'icons/mob/actions/actions_mecha.dmi'
button_icon_state = "mech_zoom_off"
/datum/action/innate/shuttledocker_place/Activate()
if(QDELETED(target) || !isliving(target))
+6 -1
View File
@@ -37,7 +37,7 @@
user.drop_item()
tool.forceMove(target)
var/datum/action/item_action/hands_free/activate_pill/P = new(tool, tool.icon, tool.icon_state)
var/datum/action/item_action/hands_free/activate_pill/P = new(tool)
P.name = "Activate Pill ([tool.name])"
P.Grant(target)
@@ -47,6 +47,11 @@
/datum/action/item_action/hands_free/activate_pill
name = "Activate Pill"
/datum/action/item_action/hands_free/activate_pill/New(Target, obj/item/tool)
button_icon = tool.icon
button_icon_state = tool.icon_state
return ..()
/datum/action/item_action/hands_free/activate_pill/Trigger(left_click = TRUE)
if(!..(left_click, FALSE))
return
+66 -30
View File
@@ -219,6 +219,9 @@
/obj/item/organ/internal/cyberimp/arm/gun/taser/l
parent_organ = "l_arm"
/datum/action/item_action/organ_action/toggle/utility_belt
button_icon = 'icons/obj/clothing/belts.dmi'
button_icon_state = "utilitybelt"
/obj/item/organ/internal/cyberimp/arm/toolset
name = "integrated toolset implant"
@@ -227,8 +230,7 @@
origin_tech = "materials=3;engineering=4;biotech=3;powerstorage=4"
contents = newlist(/obj/item/screwdriver/cyborg, /obj/item/wrench/cyborg, /obj/item/weldingtool/largetank/cyborg,
/obj/item/crowbar/cyborg, /obj/item/wirecutters/cyborg, /obj/item/multitool/cyborg)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/clothing/belts.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "utilitybelt")
actions_types = list(/datum/action/item_action/organ_action/toggle/utility_belt)
/obj/item/organ/internal/cyberimp/arm/toolset/l
parent_organ = "l_arm"
@@ -240,26 +242,32 @@
return TRUE
return FALSE
/datum/action/item_action/organ_action/toggle/abductor_belt
button_icon = 'icons/obj/abductor.dmi'
button_icon_state = "belt"
/obj/item/organ/internal/cyberimp/arm/toolset_abductor
name = "alien toolset implant"
desc = "An alien toolset, designed to be installed on subject's arm."
icon_state = "toolkit_engineering"
origin_tech = "materials=5;engineering=5;plasmatech=5;powerstorage=4;abductor=3"
contents = newlist(/obj/item/screwdriver/abductor, /obj/item/wirecutters/abductor, /obj/item/crowbar/abductor, /obj/item/wrench/abductor, /obj/item/weldingtool/abductor, /obj/item/multitool/abductor)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/abductor.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "belt")
actions_types = list(/datum/action/item_action/organ_action/toggle/abductor_belt)
/obj/item/organ/internal/cyberimp/arm/toolset_abductor/l
parent_organ = "l_arm"
/datum/action/item_action/organ_action/toggle/abductor_janibelt
button_icon = 'icons/obj/abductor.dmi'
button_icon_state = "janibelt_abductor"
/obj/item/organ/internal/cyberimp/arm/janitorial_abductor
name = "alien janitorial toolset implant"
desc = "A set of alien janitorial tools, designed to be installed on subject's arm."
icon_state = "toolkit_janitor"
origin_tech = "materials=5;engineering=5;biotech=5;powerstorage=4;abductor=2"
contents = newlist(/obj/item/mop/advanced/abductor, /obj/item/soap/syndie/abductor, /obj/item/lightreplacer/bluespace/abductor, /obj/item/holosign_creator/janitor, /obj/item/melee/flyswatter/abductor, /obj/item/reagent_containers/spray/cleaner/safety/abductor)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/abductor.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "janibelt_abductor")
actions_types = list(/datum/action/item_action/organ_action/toggle/abductor_belt)
/obj/item/organ/internal/cyberimp/arm/janitorial_abductor/l
parent_organ = "l_arm"
@@ -270,8 +278,7 @@
icon_state = "toolkit_surgical"
origin_tech = "materials=5;engineering=5;plasmatech=5;powerstorage=4;abductor=2"
contents = newlist(/obj/item/retractor/alien, /obj/item/hemostat/alien, /obj/item/bonesetter/alien, /obj/item/scalpel/laser/alien, /obj/item/circular_saw/alien, /obj/item/bonegel/alien, /obj/item/fix_o_vein/alien, /obj/item/surgicaldrill/alien)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/abductor.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "belt")
actions_types = list(/datum/action/item_action/organ_action/toggle/abductor_belt)
/obj/item/organ/internal/cyberimp/arm/surgical_abductor/l
parent_organ = "l_arm"
@@ -282,21 +289,27 @@
contents = newlist(/obj/item/melee/energy/blade/hardlight)
origin_tech = "materials=4;combat=5;biotech=3;powerstorage=2;syndicate=5"
/datum/action/item_action/organ_action/toggle/medibeam
button_icon = 'icons/obj/chronos.dmi'
button_icon_state = "chronogun"
/obj/item/organ/internal/cyberimp/arm/medibeam
name = "integrated medical beamgun"
desc = "A cybernetic implant that allows the user to project a healing beam from their hand."
contents = newlist(/obj/item/gun/medbeam)
origin_tech = "materials=5;combat=2;biotech=5;powerstorage=4;syndicate=1"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/chronos.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "chronogun")
actions_types = list(/datum/action/item_action/organ_action/toggle/medibeam)
/datum/action/item_action/organ_action/toggle/flash
button_icon = 'icons/obj/device.dmi'
button_icon_state = "flash"
/obj/item/organ/internal/cyberimp/arm/flash
name = "integrated high-intensity photon projector" //Why not
desc = "An integrated projector mounted onto a user's arm, that is able to be used as a powerful flash."
contents = newlist(/obj/item/flash/armimplant)
origin_tech = "materials=4;combat=3;biotech=4;magnets=4;powerstorage=3"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/device.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "flash")
actions_types = list(/datum/action/item_action/organ_action/toggle/medibeam)
/obj/item/organ/internal/cyberimp/arm/flash/New()
..()
@@ -331,27 +344,33 @@
icon_state = "m1911"
emp_proof = 1
/datum/action/item_action/organ_action/toggle/dufflebag_med
button_icon = 'icons/obj/storage.dmi'
button_icon_state = "duffel-med"
/obj/item/organ/internal/cyberimp/arm/surgery
name = "surgical toolset implant"
desc = "A set of surgical tools hidden behind a concealed panel on the user's arm."
icon_state = "toolkit_surgical"
contents = newlist(/obj/item/retractor/augment, /obj/item/hemostat/augment, /obj/item/cautery/augment, /obj/item/bonesetter/augment, /obj/item/scalpel/augment, /obj/item/circular_saw/augment, /obj/item/bonegel/augment, /obj/item/fix_o_vein/augment, /obj/item/surgicaldrill/augment)
origin_tech = "materials=3;engineering=3;biotech=3;programming=2;magnets=3"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/storage.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "duffel-med")
actions_types = list(/datum/action/item_action/organ_action/toggle/dufflebag_med)
/obj/item/organ/internal/cyberimp/arm/surgery/l
parent_organ = "l_arm"
slot = "l_arm_device"
/datum/action/item_action/organ_action/toggle/janibelt
button_icon = 'icons/obj/clothing/belts.dmi'
button_icon_state = "janibelt"
/obj/item/organ/internal/cyberimp/arm/janitorial
name = "janitorial toolset implant"
desc = "A set of janitorial tools hidden behind a concealed panel on the user's arm."
icon_state = "toolkit_janitor"
contents = newlist(/obj/item/mop/advanced, /obj/item/soap, /obj/item/lightreplacer, /obj/item/holosign_creator/janitor, /obj/item/melee/flyswatter, /obj/item/reagent_containers/spray/cleaner/safety)
origin_tech = "materials=3;engineering=4;biotech=3"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/clothing/belts.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "janibelt")
actions_types = list(/datum/action/item_action/organ_action/toggle/janibelt)
/obj/item/organ/internal/cyberimp/arm/janitorial/l
parent_organ = "l_arm"
@@ -363,8 +382,7 @@
desc = "A set of advanced janitorial tools hidden behind a concealed panel on the user's arm."
contents = newlist(/obj/item/mop/advanced, /obj/item/soap/deluxe, /obj/item/lightreplacer/bluespace, /obj/item/holosign_creator/janitor, /obj/item/melee/flyswatter, /obj/item/reagent_containers/spray/cleaner/advanced)
origin_tech = "materials=5;engineering=6;biotech=5"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/clothing/belts.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "janibelt")
actions_types = list(/datum/action/item_action/organ_action/toggle/janibelt)
emp_proof = TRUE
/// its for ERT, but still probably a good idea.
@@ -372,14 +390,17 @@
parent_organ = "l_arm"
slot = "l_arm_device"
/datum/action/item_action/organ_action/toggle/botanybelt
button_icon = 'icons/obj/clothing/belts.dmi'
button_icon_state = "botanybelt"
/obj/item/organ/internal/cyberimp/arm/botanical
name = "botanical toolset implant"
desc = "A set of botanical tools hidden behind a concealed panel on the user's arm."
icon_state = "toolkit_hydro"
contents = newlist(/obj/item/plant_analyzer, /obj/item/cultivator, /obj/item/hatchet, /obj/item/shovel/spade, /obj/item/reagent_containers/spray/weedspray, /obj/item/reagent_containers/spray/pestspray)
origin_tech = "materials=3;engineering=4;biotech=3"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/clothing/belts.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "botanybelt")
actions_types = list(/datum/action/item_action/organ_action/toggle/botanybelt)
/obj/item/organ/internal/cyberimp/arm/botanical/l
parent_organ = "l_arm"
@@ -467,21 +488,27 @@
H.visible_message("<span class='notice'>[H] unplugs from \the [A].</span>", "<span class='notice'>You unplug from \the [A].</span>")
drawing_power = FALSE
/datum/action/item_action/organ_action/toggle/telebaton
button_icon = 'icons/obj/items.dmi'
button_icon_state = "baton"
/obj/item/organ/internal/cyberimp/arm/telebaton
name = "telebaton implant"
desc = "Telescopic baton implant. Does what it says on the tin" // A better description
contents = newlist(/obj/item/melee/classic_baton)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/items.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "baton")
actions_types = list(/datum/action/item_action/organ_action/toggle/telebaton)
/datum/action/item_action/organ_action/toggle/advanced_mop
button_icon = 'icons/obj/janitor.dmi'
button_icon_state = "advmop"
/obj/item/organ/internal/cyberimp/arm/advmop
name = "advanced mop implant"
desc = "Advanced mop implant. Does what it says on the tin" // A better description
contents = newlist(/obj/item/mop/advanced)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/janitor.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "advmop")
actions_types = list(/datum/action/item_action/organ_action/toggle/advanced_mop)
// Razorwire implant, long reach whip made of extremely thin wire, ouch!
@@ -563,14 +590,17 @@
return FALSE
return TRUE
/datum/action/item_action/organ_action/toggle/razorwire
button_icon = 'icons/obj/surgery.dmi'
button_icon_state = "razorwire"
/obj/item/organ/internal/cyberimp/arm/razorwire
name = "razorwire spool implant"
desc = "An integrated spool of razorwire, capable of being used as a weapon when whipped at your foes. \
Built into the back of your hand, try your best to not get it tangled."
contents = newlist(/obj/item/melee/razorwire)
icon_state = "razorwire"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/surgery.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "razorwire")
actions_types = list(/datum/action/item_action/organ_action/toggle/razorwire)
origin_tech = "combat=5;biotech=5;syndicate=2"
stealth_level = 1 // Hidden from health analyzers
@@ -618,13 +648,16 @@
ammo_type = /obj/item/ammo_casing/shotgun/rubbershot
max_ammo = 1
/datum/action/item_action/organ_action/toggle/shell_cannon
button_icon = 'icons/obj/surgery.dmi'
button_icon_state = "shell_cannon"
/obj/item/organ/internal/cyberimp/arm/shell_launcher
name = "shell launch system implant"
desc = "A mounted, single-shot housing for a shell launch cannon; capable of firing twelve-gauge shotgun shells."
contents = newlist(/obj/item/gun/projectile/revolver/doublebarrel/shell_launcher)
icon_state = "shell_cannon"
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/surgery.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "shell_cannon")
actions_types = list(/datum/action/item_action/organ_action/toggle/shell_cannon)
/obj/item/organ/internal/cyberimp/arm/shell_launcher/emp_act(severity)
if(!owner)
@@ -673,6 +706,10 @@
mercenaries, and firearm enthusiasts. Its appeal lies not just in its stealth but also in its compatibility with Shellguard's range of modular products, \
and the potential beyond its advertised capabilities.</i>"
/datum/action/item_action/organ_action/toggle/v1_arm
button_icon = 'icons/obj/items.dmi'
button_icon_state = "v1_arm"
/obj/item/organ/internal/cyberimp/arm/v1_arm
name = "vortex feedback arm implant"
desc = "An implant, that when deployed surrounds the users arm in armor and circuitry, allowing them to redirect nearby projectiles with feedback from the vortex anomaly core."
@@ -683,8 +720,7 @@
slot = "l_arm_device"
contents = newlist(/obj/item/shield/v1_arm)
action_icon = list(/datum/action/item_action/organ_action/toggle = 'icons/obj/items.dmi')
action_icon_state = list(/datum/action/item_action/organ_action/toggle = "v1_arm")
actions_types = list(/datum/action/item_action/organ_action/toggle/v1_arm)
var/disabled = FALSE
/obj/item/organ/internal/cyberimp/arm/v1_arm/emp_act(severity)
@@ -380,8 +380,8 @@
/datum/action/item_action/organ_action/toggle/sensory_enhancer
name = "Activate Qani-Laaca System"
desc = "Activates your Qani-Laaca computer and grants you its powers. LMB: Short, safer activation. ALT/MIDDLE: Longer, more powerful, more dangerous activation."
button_overlay_icon = 'icons/obj/surgery.dmi'
button_overlay_icon_state = "sandy"
button_icon = 'icons/obj/surgery.dmi'
button_icon_state = "sandy"
/// Keeps track of how much mephedrone we inject into people on activation
var/injection_amount = 10
@@ -15,13 +15,12 @@
var/obj/item/held_item
/datum/action/item_action/organ_action/toggle/headpocket
use_itemicon = FALSE
button_overlay_icon_state = "skrell_headpocket_in"
button_icon_state = "skrell_headpocket_in"
/obj/item/organ/internal/headpocket/proc/update_button_state()
for(var/datum/action/item_action/T in actions)
T.button_overlay_icon_state = "skrell_headpocket[held_item ? "_out" : "_in"]"
T.UpdateButtons()
T.button_icon_state = "skrell_headpocket[held_item ? "_out" : "_in"]"
T.build_all_button_icons()
/obj/item/organ/internal/headpocket/Destroy()
empty_contents()
+2 -2
View File
@@ -20,8 +20,8 @@
/datum/action/ambulance_alarm
name = "Toggle Sirens"
button_overlay_icon = 'icons/obj/vehicles.dmi'
button_overlay_icon_state = "docwagon2"
button_icon = 'icons/obj/vehicles.dmi'
button_icon_state = "docwagon2"
check_flags = AB_CHECK_RESTRAINED | AB_CHECK_STUNNED | AB_CHECK_LYING | AB_CHECK_CONSCIOUS
var/toggle_cooldown = 40
var/cooldown = 0
+2 -2
View File
@@ -45,8 +45,8 @@
/datum/action/bicycle_bell
name = "Ring Bell"
desc = "Go on, ring your bicycle bell!"
button_overlay_icon = 'icons/obj/bureaucracy.dmi'
button_overlay_icon_state = "desk_bell"
button_icon = 'icons/obj/bureaucracy.dmi'
button_icon_state = "desk_bell"
COOLDOWN_DECLARE(ring_cooldown)
/datum/action/bicycle_bell/Trigger(left_click)
+2 -2
View File
@@ -46,8 +46,8 @@
/datum/action/floor_buffer
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/floor_buffer/Trigger(left_click)
. = ..()
@@ -188,9 +188,9 @@
/datum/action/vehicle
check_flags = AB_CHECK_HANDS_BLOCKED | AB_CHECK_IMMOBILE | AB_CHECK_CONSCIOUS
button_background_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_overlay_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_overlay_icon_state = "vehicle_eject"
background_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon = 'icons/mob/actions/actions_vehicle.dmi'
button_icon_state = "vehicle_eject"
var/obj/tgvehicle/vehicle_target
var/obj/tgvehicle/vehicle_ridden_target
@@ -201,7 +201,7 @@
/datum/action/vehicle/skateboard/ollie
name = "Ollie"
desc = "Get some air! Land on a table or fence to do a gnarly grind."
button_overlay_icon_state = "skateboard_ollie"
button_icon_state = "skateboard_ollie"
check_flags = AB_CHECK_CONSCIOUS
/datum/action/vehicle/skateboard/ollie/Trigger(left_click)
@@ -251,7 +251,7 @@
/datum/action/vehicle/skateboard/kickflip
name = "Kickflip"
desc = "Kick your board up and catch it."
button_overlay_icon_state = "skateboard_ollie"
button_icon_state = "skateboard_ollie"
check_flags = AB_CHECK_CONSCIOUS
/datum/action/vehicle/skateboard/kickflip/Trigger(left_click)