mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
[MIRROR] ghost alerts now resize to 32x32 if larger [MDB IGNORE] (#12970)
* Ghost alerts now resize to 32x32, if larger (#66352) * ghost alerts now resize to 32x32 if larger Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
This commit is contained in:
@@ -242,6 +242,17 @@
|
||||
A.target = source
|
||||
if(!alert_overlay)
|
||||
alert_overlay = new(source)
|
||||
var/icon/size_check = icon(source.icon, source.icon_state)
|
||||
var/scale = 1
|
||||
var/width = size_check.Width()
|
||||
var/height = size_check.Height()
|
||||
if(width > world.icon_size || height > world.icon_size)
|
||||
if(width >= height)
|
||||
scale = world.icon_size / width
|
||||
else
|
||||
scale = world.icon_size / height
|
||||
alert_overlay.transform = alert_overlay.transform.Scale(scale)
|
||||
alert_overlay.appearance_flags |= TILE_BOUND
|
||||
alert_overlay.layer = FLOAT_LAYER
|
||||
alert_overlay.plane = FLOAT_PLANE
|
||||
A.add_overlay(alert_overlay)
|
||||
|
||||
Reference in New Issue
Block a user