[MIRROR] Fixes some invisible inhands from the transforming component [MDB IGNORE] (#19721)

* Fixes some invisible inhands from the transforming component (#73807)

## About The Pull Request

The original issue caused by #70037
Esword issue caused by #73716

Originally the transforming component did not override the inhand icon
state of the the item on its own (instead putting the onus on the item
itself if they wanted unique behavior). It was changed to always update
inhand icon state, most of which don't have one

I don't really like this fix, it should be explicit "I want inhand to
change" and not default, but this will work for now

Also the PR that fixed the Jaws issue didn't actually set the var they
created

Fixes #73805
Fixes #73711 (Actually)

## Why It's Good For The Game

Invisible sword bad

## Changelog

🆑 Melbert
fix: Fixed a eswords, some tools, and some other misc. items from being
invisible while extended / active
fix: Teleshields and other misc items not extending in hand when active
fix: Switchblades click on extend again
fix: Pendrivers click on extend
/🆑

* Fixes some invisible inhands from the transforming component

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-08 11:33:50 +00:00
committed by GitHub
co-authored by MrMelbert
parent 1ee561ebff
commit 257d63f360
11 changed files with 28 additions and 15 deletions
+2 -1
View File
@@ -69,6 +69,7 @@
src.hitsound_on = hitsound_on
src.w_class_on = w_class_on
src.clumsy_check = clumsy_check
src.inhand_icon_change = inhand_icon_change
if(attack_verb_continuous_on)
src.attack_verb_continuous_on = attack_verb_continuous_on
@@ -191,7 +192,7 @@
source.hitsound = hitsound_on
source.w_class = w_class_on
source.icon_state = "[source.icon_state]_on"
if(inhand_icon_change)
if(inhand_icon_change && source.inhand_icon_state)
source.inhand_icon_state = "[source.inhand_icon_state]_on"
if(ismob(source.loc))
var/mob/loc_mob = source.loc