Merge pull request #15482 from SandPoot/balloon-alert-port
Ports Balloon Alert from TG
This commit is contained in:
@@ -38,9 +38,6 @@
|
||||
|
||||
#define CHAT_PLANE -1 //We don't want heard messages to be hidden by FoV.
|
||||
|
||||
/// Plane for balloon text (text that fades up)
|
||||
#define BALLOON_CHAT_PLANE -1.2
|
||||
|
||||
#define CHAT_LAYER 12.0001 // Do not insert layers between these two values
|
||||
#define CHAT_LAYER_MAX 12.9999
|
||||
|
||||
@@ -156,6 +153,10 @@
|
||||
#define CAMERA_STATIC_LAYER 19
|
||||
#define CAMERA_STATIC_RENDER_TARGET "CAMERA_STATIC_PLANE"
|
||||
|
||||
/// Plane for balloon text (text that fades up)
|
||||
/// It's over lighting and every other crap because this is nearly as important as hud content and only visible to the user.
|
||||
#define BALLOON_CHAT_PLANE 20
|
||||
|
||||
//HUD layer defines
|
||||
|
||||
#define FULLSCREEN_PLANE 20
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
var/image/balloon_alert = image(loc = get_atom_on_turf(src), layer = ABOVE_MOB_LAYER)
|
||||
balloon_alert.plane = BALLOON_CHAT_PLANE
|
||||
balloon_alert.alpha = 0
|
||||
balloon_alert.appearance_flags = RESET_ALPHA|RESET_COLOR|RESET_TRANSFORM
|
||||
balloon_alert.maptext = MAPTEXT("<span style='text-align: center; -dm-text-outline: 1px #0005'>[text]</span>")
|
||||
balloon_alert.maptext_x = (BALLOON_TEXT_WIDTH - bound_width) * -0.5
|
||||
balloon_alert.maptext_height = WXH_TO_HEIGHT(viewer_client?.MeasureText(text, null, BALLOON_TEXT_WIDTH))
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[i+1]
|
||||
else
|
||||
amount_per_transfer_from_this = possible_transfer_amounts[1]
|
||||
to_chat(user, "<span class='notice'>[src]'s transfer amount is now [amount_per_transfer_from_this] units.</span>")
|
||||
balloon_alert(user, "Transferring [amount_per_transfer_from_this]u")
|
||||
return
|
||||
|
||||
/obj/item/reagent_containers/attack(mob/living/M, mob/living/user, attackchain_flags = NONE, damage_multiplier = 1)
|
||||
|
||||
Reference in New Issue
Block a user