mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Blobbernaut HUD improvements (#57922)
This commit is contained in:
@@ -172,5 +172,8 @@
|
||||
#define ui_ghost_mafia "SOUTH: 6, CENTER+2:24"
|
||||
#define ui_ghost_language_menu "SOUTH: 22, CENTER+3:8"
|
||||
|
||||
//Blobbernauts
|
||||
#define ui_blobbernaut_overmind_health "EAST-1:28,CENTER+0:19"
|
||||
|
||||
//Families
|
||||
#define ui_wanted_lvl "NORTH,11"
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
/datum/hud/living/blobbernaut/New(mob/living/owner)
|
||||
. = ..()
|
||||
|
||||
blobpwrdisplay = new /atom/movable/screen/healths/blob/overmind()
|
||||
blobpwrdisplay.hud = src
|
||||
infodisplay += blobpwrdisplay
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
/datum/hud/blobbernaut/New(mob/owner)
|
||||
..()
|
||||
|
||||
blobpwrdisplay = new /atom/movable/screen/healths/blob/naut/core()
|
||||
blobpwrdisplay.hud = src
|
||||
infodisplay += blobpwrdisplay
|
||||
|
||||
healths = new /atom/movable/screen/healths/blob/naut()
|
||||
healths.hud = src
|
||||
infodisplay += healths
|
||||
@@ -633,15 +633,11 @@
|
||||
screen_loc = ui_internal
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/atom/movable/screen/healths/blob/naut
|
||||
name = "health"
|
||||
icon = 'icons/hud/blob.dmi'
|
||||
icon_state = "nauthealth"
|
||||
|
||||
/atom/movable/screen/healths/blob/naut/core
|
||||
/atom/movable/screen/healths/blob/overmind
|
||||
name = "overmind health"
|
||||
icon = 'icons/hud/blob.dmi'
|
||||
icon_state = "corehealth"
|
||||
screen_loc = ui_health
|
||||
screen_loc = ui_blobbernaut_overmind_health
|
||||
|
||||
/atom/movable/screen/healths/guardian
|
||||
name = "summoner health"
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
force_threshold = 10
|
||||
pressure_resistance = 50
|
||||
mob_size = MOB_SIZE_LARGE
|
||||
hud_type = /datum/hud/blobbernaut
|
||||
hud_type = /datum/hud/living/blobbernaut
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/Initialize()
|
||||
. = ..()
|
||||
@@ -314,15 +314,6 @@
|
||||
I.color = overmind.blobstrain.complementary_color
|
||||
flick_overlay_view(I, src, 8)
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
|
||||
. = ..()
|
||||
if(updating_health)
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/update_health_hud()
|
||||
if(hud_used)
|
||||
hud_used.healths.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round((health / maxHealth) * 100, 0.5)]%</font></div>")
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/AttackingTarget()
|
||||
. = ..()
|
||||
if(. && isliving(target) && overmind)
|
||||
|
||||
@@ -219,14 +219,15 @@ GLOBAL_LIST_EMPTY(blob_nodes)
|
||||
|
||||
/mob/camera/blob/update_health_hud()
|
||||
if(blob_core)
|
||||
hud_used.healths.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round(blob_core.obj_integrity)]</font></div>")
|
||||
var/current_health = round((blob_core.obj_integrity / blob_core.max_integrity) * 100)
|
||||
hud_used.healths.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[current_health]%</font></div>")
|
||||
for(var/mob/living/simple_animal/hostile/blob/blobbernaut/B in blob_mobs)
|
||||
if(B.hud_used && B.hud_used.blobpwrdisplay)
|
||||
B.hud_used.blobpwrdisplay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_core.obj_integrity)]</font></div>")
|
||||
B.hud_used.blobpwrdisplay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[current_health]%</font></div>")
|
||||
|
||||
/mob/camera/blob/proc/add_points(points)
|
||||
blob_points = clamp(blob_points + points, 0, max_blob_points)
|
||||
hud_used.blobpwrdisplay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_points)]</font></div>")
|
||||
hud_used.blobpwrdisplay.maptext = MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round(blob_points)]</font></div>")
|
||||
|
||||
/mob/camera/blob/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
if (!message)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 25 KiB |
+1
-1
@@ -243,7 +243,7 @@
|
||||
#include "code\_onclick\hud\alien.dm"
|
||||
#include "code\_onclick\hud\alien_larva.dm"
|
||||
#include "code\_onclick\hud\blob_overmind.dm"
|
||||
#include "code\_onclick\hud\blobbernauthud.dm"
|
||||
#include "code\_onclick\hud\blobbernaut.dm"
|
||||
#include "code\_onclick\hud\credits.dm"
|
||||
#include "code\_onclick\hud\drones.dm"
|
||||
#include "code\_onclick\hud\families.dm"
|
||||
|
||||
Reference in New Issue
Block a user