diff --git a/code/datums/action.dm b/code/datums/action.dm index f536a5d933..6a1bbe5e63 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -157,7 +157,7 @@ /datum/action/proc/OnUpdatedIcon() SIGNAL_HANDLER - UpdateButtons() + UpdateButtons(force = TRUE) //Give our action button to the player /datum/action/proc/GiveAction(mob/viewer) @@ -267,12 +267,10 @@ /datum/action/item_action/toggle_light name = "Toggle Light" -/datum/action/item_action/toggle_light/Trigger(trigger_flags) +/datum/action/item_action/toggle_light/pda/Trigger(trigger_flags) if(istype(target, /obj/item/pda)) var/obj/item/pda/P = target - P.toggle_light(owner) - return - ..() + return P.toggle_light(owner) /datum/action/item_action/toggle_hood name = "Toggle Hood" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 6a7b78b8dd..1554ac9964 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -613,7 +613,10 @@ cut_overlay(managed_overlays) managed_overlays = null if(length(new_overlays)) - managed_overlays = new_overlays + if (length(new_overlays) == 1) + managed_overlays = new_overlays[1] + else + managed_overlays = new_overlays add_overlay(new_overlays) . |= UPDATE_OVERLAYS diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 8e04f591f2..32876fc36a 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -29,7 +29,7 @@ GLOBAL_LIST_EMPTY(PDAs) item_flags = NOBLUDGEON w_class = WEIGHT_CLASS_TINY slot_flags = ITEM_SLOT_ID | ITEM_SLOT_BELT - actions_types = list(/datum/action/item_action/toggle_light) + actions_types = list(/datum/action/item_action/toggle_light/pda) armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 100, ACID = 100) resistance_flags = FIRE_PROOF | ACID_PROOF @@ -963,7 +963,7 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/proc/toggle_light() if(hasSiliconAccessInArea(usr) || !usr.canUseTopic(src, BE_CLOSE)) - return + return FALSE if(fon) fon = FALSE set_light(0) @@ -971,6 +971,7 @@ GLOBAL_LIST_EMPTY(PDAs) fon = TRUE set_light(f_lum, f_pow, f_col) update_icon() + return TRUE /obj/item/pda/proc/remove_pen()