Merge pull request #16798 from SabreML/telescopic-blood-overlays

Blood overlay fix for telescopic weapons
This commit is contained in:
Fox McCloud
2021-09-28 00:31:41 -04:00
committed by GitHub
4 changed files with 29 additions and 18 deletions
-1
View File
@@ -6,7 +6,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /image, image("icon" = 'icons/goonstation/effect
move_resist = null // Set in the Initialise depending on the item size. Unless it's overriden by a specific item
var/discrete = 0 // used in item_attack.dm to make an item not show an attack message to viewers
var/image/blood_overlay = null //this saves our blood splatter overlay, which will be processed not to go over the edges of the sprite
var/blood_overlay_color = null
var/item_state = null
var/lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
var/righthand_file = 'icons/mob/inhands/items_righthand.dmi'
+2 -2
View File
@@ -189,9 +189,10 @@
H.update_inv_r_hand()
// Update blood splatter
if(blood_overlay)
var/blood_color = blood_overlay.color
cut_overlay(blood_overlay)
qdel(blood_overlay)
add_blood_overlay(blood_overlay_color)
add_blood_overlay(blood_color)
playsound(loc, extend_sound, 50, TRUE)
add_fingerprint(user)
@@ -210,5 +211,4 @@
blood_overlay = image(blood_splatter_icon)
blood_overlay.color = color
blood_overlay_color = color
add_overlay(blood_overlay)