mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
that's a lot of actions (#28067)
Why did the crusher have a spawn? No idea. Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
+1
-3
@@ -678,9 +678,7 @@
|
||||
|
||||
/obj/item/update_filters()
|
||||
. = ..()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/atom/proc/get_filter(name)
|
||||
if(filter_data && filter_data[name])
|
||||
|
||||
@@ -102,9 +102,7 @@ CONTENTS:
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user)
|
||||
if(slot == ITEM_SLOT_OUTER_SUIT) //we only give the mob the ability to activate the vest if he's actually wearing it.
|
||||
@@ -265,9 +263,7 @@ CONTENTS:
|
||||
|
||||
to_chat(usr, "<span class='notice'>You switch the baton to [txt] mode.</span>")
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/abductor_baton/update_icon_state()
|
||||
switch(mode)
|
||||
|
||||
@@ -988,6 +988,10 @@ 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)
|
||||
for(var/datum/action/current_action as anything in actions)
|
||||
current_action.UpdateButtons(status_only, force)
|
||||
|
||||
/**
|
||||
* Handles the bulk of cigarette lighting interactions. You must call `light()` to actually light the cigarette.
|
||||
*
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
on = !on
|
||||
playsound(user, togglesound, 100, 1)
|
||||
update_brightness()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/flashlight/attack__legacy__attackchain(mob/living/M as mob, mob/living/user as mob)
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
GLOB.active_jammers |= src
|
||||
else
|
||||
GLOB.active_jammers -= src
|
||||
for(var/datum/action/item_action/toggle_radio_jammer/A in actions)
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/teleporter
|
||||
name = "syndicate teleporter"
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
icon_state = "voice_changer_[active ? "on" : "off"]"
|
||||
to_chat(user, "<span class='notice'>You toggle [src] [active ? "on" : "off"].</span>")
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/voice_changer/proc/set_voice(mob/user)
|
||||
var/chosen_voice = tgui_input_text(user, "What voice would you like to mimic? Leave this empty to use the voice on your ID card.", "Set Voice Changer")
|
||||
|
||||
@@ -209,9 +209,7 @@
|
||||
/obj/item/borg/upgrade/selfrepair/update_icon_state()
|
||||
if(cyborg)
|
||||
icon_state = "selfrepair_[on ? "on" : "off"]"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
else
|
||||
icon_state = "cyborg_upgrade5"
|
||||
|
||||
|
||||
@@ -157,9 +157,7 @@
|
||||
remove_paddles(user)
|
||||
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/defibrillator/equipped(mob/user, slot)
|
||||
..()
|
||||
|
||||
@@ -79,9 +79,7 @@
|
||||
else
|
||||
turn_off(user)
|
||||
to_chat(user, "<span class='notice'>You turn the jetpack off.</span>")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/tank/jetpack/proc/turn_on(mob/user)
|
||||
if(SEND_SIGNAL(src, COMSIG_JETPACK_ACTIVATED, user) & JETPACK_ACTIVATION_FAILED)
|
||||
|
||||
@@ -471,9 +471,7 @@
|
||||
if(src == user.get_active_hand()) //update inhands
|
||||
user.update_inv_l_hand()
|
||||
user.update_inv_r_hand()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/chainsaw/attack_hand(mob/user)
|
||||
. = ..()
|
||||
|
||||
@@ -62,9 +62,7 @@
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.head_update(src, forced = 1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
return TRUE
|
||||
|
||||
/obj/item/clothing/proc/visor_toggling() //handles all the actual toggling of flags
|
||||
@@ -609,9 +607,7 @@
|
||||
H.wear_mask_update(src, toggle_off = up)
|
||||
usr.update_inv_wear_mask()
|
||||
usr.update_inv_head()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
//////////////////////////////
|
||||
// MARK: SHOES
|
||||
@@ -835,9 +831,7 @@
|
||||
if(adjust_flavour)
|
||||
flavour = "[copytext(adjust_flavour, 3, length(adjust_flavour) + 1)] up" //Trims off the 'un' at the beginning of the word. unzip -> zip, unbutton->button.
|
||||
to_chat(user, "You [flavour] \the [src].")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
else
|
||||
var/flavour = "open"
|
||||
icon_state += "_open"
|
||||
@@ -845,9 +839,7 @@
|
||||
if(adjust_flavour)
|
||||
flavour = "[adjust_flavour]"
|
||||
to_chat(user, "You [flavour] \the [src].")
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
suit_adjusted = !suit_adjusted
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
|
||||
@@ -75,9 +75,7 @@
|
||||
H.update_sight()
|
||||
|
||||
update_icon(UPDATE_ICON_STATE)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/glasses/meson/engine/attack_self__legacy__attackchain(mob/user)
|
||||
toggle_mode(user, TRUE)
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_head()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
|
||||
set_light(brightness_on)
|
||||
|
||||
@@ -33,9 +33,7 @@
|
||||
to_chat(user, "You flip the hat back in normal position.")
|
||||
user.update_inv_head() //so our mob-overlays update
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/head/soft/red
|
||||
name = "red cap"
|
||||
|
||||
@@ -53,9 +53,7 @@
|
||||
to_chat(user, "You [magpulse ? "enable" : "disable"] the [magpulse_name].")
|
||||
user.update_inv_shoes() //so our mob-overlays update
|
||||
user.update_gravity(user.mob_has_gravity())
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
check_mag_pulse(user, removing = (user.get_item_by_slot(ITEM_SLOT_SHOES) != src))
|
||||
|
||||
/obj/item/clothing/shoes/magboots/proc/check_mag_pulse(mob/user, removing = FALSE)
|
||||
|
||||
@@ -65,9 +65,7 @@
|
||||
set_light(brightness_on)
|
||||
else
|
||||
set_light(0)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/extinguish_light(force = FALSE)
|
||||
if(on)
|
||||
@@ -310,9 +308,7 @@
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.head_update(src, forced = 1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/hardsuit/syndi/proc/toggle_hardsuit_mode(mob/user) //Helmet Toggles Suit Mode
|
||||
if(linkedsuit)
|
||||
|
||||
@@ -50,9 +50,7 @@
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/update_icon(updates=ALL)
|
||||
. = ..()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/head/helmet/space/plasmaman/update_icon_state()
|
||||
if(!up)
|
||||
|
||||
@@ -452,9 +452,7 @@
|
||||
item_state = "reactiveoff"
|
||||
add_fingerprint(user)
|
||||
user.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/suit/armor/reactive/emp_act(severity)
|
||||
var/emp_power = 5 + (severity-1 ? 0 : 5)
|
||||
|
||||
@@ -49,9 +49,7 @@
|
||||
H.update_inv_wear_suit()
|
||||
else
|
||||
hood.forceMove(src)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/suit/hooded/dropped()
|
||||
..()
|
||||
@@ -71,9 +69,7 @@
|
||||
suit_adjusted = 1
|
||||
icon_state = "[initial(icon_state)]_hood"
|
||||
H.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
else
|
||||
if((hood?.flags & NODROP) && respects_nodrop)
|
||||
if(ishuman(loc))
|
||||
|
||||
@@ -1207,9 +1207,7 @@
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
usr.update_inv_wear_suit()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/suit/lordadmiral
|
||||
name = "lord admiral's coat"
|
||||
|
||||
@@ -1006,9 +1006,7 @@
|
||||
item_state += "_on"
|
||||
suit_adjusted = 1 //Lights On
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
to_chat(user, "You turn [src]'s lighting system [flavour].")
|
||||
user.update_inv_wear_suit()
|
||||
|
||||
@@ -1332,9 +1330,7 @@
|
||||
name = plushie_color
|
||||
icon_state = plush_colors[plushie_color]
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/toy/plushie/fluff/fox/ui_action_click(mob/user)
|
||||
change_color(user)
|
||||
@@ -1406,9 +1402,7 @@
|
||||
to_chat(usr, "You transform \the [src].")
|
||||
adjusted = 1
|
||||
usr.update_inv_head()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/// chronx100: Hughe O'Splash
|
||||
/obj/item/clothing/suit/chaplain_hoodie/fluff/chronx
|
||||
|
||||
@@ -1046,9 +1046,7 @@
|
||||
if(!length(cards))
|
||||
return
|
||||
if(length(cards) <= 2)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
..()
|
||||
|
||||
/obj/item/cardhand/update_name()
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
else if(actiontype == /datum/action/item_action/toggle_music_notes)
|
||||
toggle_visual_notes(user)
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/clothing/ears/headphones/proc/toggle_visual_notes(mob/user)
|
||||
on = !on
|
||||
|
||||
@@ -189,10 +189,7 @@
|
||||
. += "[icon_state]_uncharged"
|
||||
if(light_on)
|
||||
. += "[icon_state]_lit"
|
||||
spawn(1)
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
//destablizing force
|
||||
/obj/item/projectile/destabilizer
|
||||
|
||||
@@ -130,9 +130,7 @@
|
||||
. = ..()
|
||||
if(!inert && !preserved)
|
||||
. += "legion_soul_crackle"
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/organ/internal/regenerative_core/legion/go_inert()
|
||||
..()
|
||||
|
||||
@@ -428,9 +428,7 @@
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/gun/proc/clear_bayonet()
|
||||
if(!bayonet)
|
||||
|
||||
@@ -75,9 +75,7 @@
|
||||
|
||||
playsound(user, 'sound/weapons/gun_interactions/selector.ogg', 100, 1)
|
||||
update_icon()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtons()
|
||||
update_action_buttons()
|
||||
|
||||
/obj/item/gun/projectile/automatic/can_shoot()
|
||||
return get_ammo()
|
||||
|
||||
Reference in New Issue
Block a user