Merge pull request #12087 from KasparoVy/skrekked_myself_up

Fixes Bug with Species-fitted Inhand Icons
This commit is contained in:
variableundefined
2019-08-26 06:40:35 -04:00
committed by GitHub
3 changed files with 6 additions and 5 deletions
+1
View File
@@ -87,6 +87,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
If index term exists and icon_override is not set, this sprite sheet will be used.
*/
var/list/sprite_sheets = null
var/list/sprite_sheets_inhand = null //Used to override inhand items. Use a single .dmi and suffix the icon states inside with _l and _r for each hand.
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
@@ -1022,9 +1022,9 @@ var/global/list/damage_icon_parts = list()
t_state = r_hand.icon_state
var/mutable_appearance/standing
if(r_hand.sprite_sheets && r_hand.sprite_sheets[dna.species.name])
if(r_hand.sprite_sheets_inhand && r_hand.sprite_sheets_inhand[dna.species.name])
t_state = "[t_state]_r"
standing = mutable_appearance(r_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -R_HAND_LAYER)
standing = mutable_appearance(r_hand.sprite_sheets_inhand[dna.species.name], "[t_state]", layer = -R_HAND_LAYER)
else
standing = mutable_appearance(r_hand.righthand_file, "[t_state]", layer = -R_HAND_LAYER)
standing = center_image(standing, r_hand.inhand_x_dimension, r_hand.inhand_y_dimension)
@@ -1041,9 +1041,9 @@ var/global/list/damage_icon_parts = list()
t_state = l_hand.icon_state
var/mutable_appearance/standing
if(l_hand.sprite_sheets && l_hand.sprite_sheets[dna.species.name])
if(l_hand.sprite_sheets_inhand && l_hand.sprite_sheets_inhand[dna.species.name])
t_state = "[t_state]_l"
standing = mutable_appearance(l_hand.sprite_sheets[dna.species.name], "[t_state]", layer = -L_HAND_LAYER)
standing = mutable_appearance(l_hand.sprite_sheets_inhand[dna.species.name], "[t_state]", layer = -L_HAND_LAYER)
else
standing = mutable_appearance(l_hand.lefthand_file, "[t_state]", layer = -L_HAND_LAYER)
standing = center_image(standing, l_hand.inhand_x_dimension, l_hand.inhand_y_dimension)
+1 -1
View File
@@ -80,7 +80,7 @@
ammo_type = list(/obj/item/ammo_casing/energy/sonic)
cell_type = /obj/item/stock_parts/cell/super
restricted_species = list(/datum/species/vox/armalis)
sprite_sheets = list("Vox Armalis" = 'icons/mob/species/armalis/held.dmi')
sprite_sheets_inhand = list("Vox Armalis" = 'icons/mob/species/armalis/held.dmi') //Big guns big birds.
/obj/item/gun/energy/noisecannon/update_icon()
return