mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 16:13:19 +01:00
Fixes invisible alien leap
This commit is contained in:
@@ -110,6 +110,7 @@
|
||||
|
||||
if(leaping)
|
||||
leaping = 0
|
||||
update_icons()
|
||||
update_canmove()
|
||||
|
||||
|
||||
|
||||
@@ -7,11 +7,14 @@
|
||||
var/obj/item/weapon/r_store = null
|
||||
var/obj/item/weapon/l_store = null
|
||||
var/caste = ""
|
||||
var/alt_icon = 'icons/mob/alienleap.dmi' //used to switch between the two alien icon files.
|
||||
var/next_attack = 0
|
||||
var/pounce_cooldown = 0
|
||||
var/pounce_cooldown_time = 30
|
||||
update_icon = 1
|
||||
var/leap_on_click = 0
|
||||
var/custom_pixel_x_offset = 0 //for admin fuckery.
|
||||
var/custom_pixel_y_offset = 0
|
||||
|
||||
//This is fine right now, if we're adding organ specific damage this needs to be updated
|
||||
/mob/living/carbon/alien/humanoid/New()
|
||||
@@ -336,4 +339,20 @@ In all, this is a lot like the monkey code. /N
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/canBeHandcuffed()
|
||||
return 1
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_standard_pixel_y_offset(lying = 0)
|
||||
if(leaping)
|
||||
return -32
|
||||
else if(custom_pixel_y_offset)
|
||||
return custom_pixel_y_offset
|
||||
else
|
||||
return initial(pixel_y)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_standard_pixel_x_offset(lying = 0)
|
||||
if(leaping)
|
||||
return -32
|
||||
else if(custom_pixel_x_offset)
|
||||
return custom_pixel_x_offset
|
||||
else
|
||||
return initial(pixel_x)
|
||||
@@ -41,14 +41,20 @@
|
||||
icon_state = "alien[caste]_s"
|
||||
|
||||
if(leaping)
|
||||
icon = 'icons/mob/alienleap.dmi'
|
||||
if(alt_icon == initial(alt_icon))
|
||||
var/old_icon = icon
|
||||
icon = alt_icon
|
||||
alt_icon = old_icon
|
||||
icon_state = "alien[caste]_leap"
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
else if(icon == 'icons/mob/alienleap.dmi' && pixel_x == -32 && pixel_y == -32)
|
||||
icon = initial(icon)// ^ this looks odd, but in theory it will prevent the icon and pixel_xy from being reset unless it needs to be
|
||||
pixel_x = initial(pixel_x)
|
||||
pixel_y = initial(pixel_y)
|
||||
else
|
||||
if(alt_icon != initial(alt_icon))
|
||||
var/old_icon = icon
|
||||
icon = alt_icon
|
||||
alt_icon = old_icon
|
||||
pixel_x = get_standard_pixel_x_offset(lying)
|
||||
pixel_y = get_standard_pixel_y_offset(lying)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/regenerate_icons()
|
||||
..()
|
||||
|
||||
@@ -936,4 +936,5 @@
|
||||
return initial(pixel_y)
|
||||
|
||||
/mob/living/proc/spawn_dust()
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
new /obj/effect/decal/cleanable/ash(loc)
|
||||
|
||||
Reference in New Issue
Block a user