diff --git a/code/game/objects/auras/personal_shield.dm b/code/game/objects/auras/personal_shield.dm index 1b6c3772f4b..dc66777dd37 100644 --- a/code/game/objects/auras/personal_shield.dm +++ b/code/game/objects/auras/personal_shield.dm @@ -1,5 +1,7 @@ /obj/aura/personal_shield name = "personal shield" + icon = 'icons/effects/effects.dmi' + icon_state = "shield" /obj/aura/personal_shield/added_to(mob/living/L) ..() @@ -8,7 +10,7 @@ /obj/aura/personal_shield/bullet_act(obj/item/projectile/P, var/def_zone) user.visible_message(SPAN_WARNING("\The [user]'s [src.name] flashes before \the [P] can hit them!")) - + flick("shield_impact", src) playsound(user, 'sound/effects/basscannon.ogg', 35, TRUE) return AURA_FALSE|AURA_CANCEL diff --git a/code/game/objects/items/devices/personal_shield.dm b/code/game/objects/items/devices/personal_shield.dm index 98d186d2569..6848d58095b 100644 --- a/code/game/objects/items/devices/personal_shield.dm +++ b/code/game/objects/items/devices/personal_shield.dm @@ -1,8 +1,13 @@ /obj/item/device/personal_shield name = "personal shield" desc = "Truely a life-saver: this device protects its user from being hit by objects moving very, very fast, though only for a few shots." - icon = 'icons/obj/device.dmi' - icon_state = "batterer" + icon = 'icons/obj/personal_shield.dmi' + icon_state = "personal_shield" + item_state = "personal_shield" + contained_sprite = TRUE + slot_flags = SLOT_BELT + w_class = ITEMSIZE_LARGE + action_button_name = "Toggle Shield" var/next_recharge var/uses = 5 var/obj/aura/personal_shield/device/shield @@ -28,8 +33,11 @@ shield = new /obj/aura/personal_shield/device(user) shield.added_to(user) shield.set_shield(src) + user.update_inv_belt() else dissipate() + user.update_inv_belt() + update_icon() /obj/item/device/personal_shield/Move() dissipate() @@ -48,10 +56,12 @@ return /obj/item/device/personal_shield/update_icon() - if(uses) - icon_state = "batterer" + if(uses && shield) + icon_state = "[icon_state]_on" + item_state = "[icon_state]_on" else - icon_state = "battererburnt" + icon_state = "[icon_state]" + item_state = "[icon_state]" /obj/item/device/personal_shield/Destroy() dissipate() @@ -61,4 +71,5 @@ /obj/item/device/personal_shield/proc/dissipate() if(shield?.user) to_chat(shield.user, FONT_LARGE(SPAN_WARNING("\The [src] fades around you, dissipating."))) - QDEL_NULL(shield) \ No newline at end of file + QDEL_NULL(shield) + update_icon() \ No newline at end of file diff --git a/html/changelogs/alberyk-personalshield.yml b/html/changelogs/alberyk-personalshield.yml new file mode 100644 index 00000000000..6a817148f18 --- /dev/null +++ b/html/changelogs/alberyk-personalshield.yml @@ -0,0 +1,7 @@ +author: Alberyk + +delete-after: True + +changes: + - rscadd: "Added a new icon to the personal shield and its aura." + - tweak: "Personal shields can now be stored on the belt slot." diff --git a/icons/obj/machines/shielding.dmi b/icons/obj/machines/shielding.dmi index fbab5efaf91..1b6af22eb55 100644 Binary files a/icons/obj/machines/shielding.dmi and b/icons/obj/machines/shielding.dmi differ diff --git a/icons/obj/personal_shield.dmi b/icons/obj/personal_shield.dmi new file mode 100644 index 00000000000..ee5b0f29dfc Binary files /dev/null and b/icons/obj/personal_shield.dmi differ