Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Bokkiewokkie committed Jun 20, 2024
1 parent b77b483 commit e238169
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions nsv13/code/modules/overmap/shieldgen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
duration = 0.75 SECONDS
layer = ABOVE_MOB_LAYER+0.1
animate_movement = NO_STEPS // Override the inbuilt movement engine to avoid bouncing
appearance_flags = TILE_BOUND | PIXEL_SCALE
vis_flags = VIS_INHERIT_ID
var/obj/structure/overmap/overmap

/obj/effect/temp_visual/overmap_shield_hit/Initialize(mapload, obj/structure/overmap/OM)
Expand All @@ -357,13 +357,19 @@
var/resize_x = I.Width()/96
var/resize_y = I.Height()/96
desired.Scale(resize_x,resize_y)
desired.Turn(OM.angle)
transform = desired
OM.vis_contents |= src
//Don't even ask, this makes it fit on the ship sprite properly most of the time
if(I.Width() <= 48)
pixel_x = -24
pixel_y = -24
else
pixel_x += round(I.Width()/16, 1)
pixel_y += pixel_x*round(I.Height()/32, 1)
OM.overlays.Add(src) //Otherwise it won't animate with the ship nicely
overmap = OM

/obj/effect/temp_visual/overmap_shield_hit/Destroy()
overmap?.vis_contents -= src
overmap?.overlays.Remove(src)
overmap = null
return ..()

Expand Down

0 comments on commit e238169

Please sign in to comment.