Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
3 changes: 3 additions & 0 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@
//slimes
#define ui_slime_health "EAST,CENTER:15" //same as humans and constructs

//Blobbernauts
#define ui_blobbernaut_overmind_health "EAST-1:28,CENTER+0:19"

// AI

#define ui_ai_core "CENTER-6:-32,SOUTH:6"
Expand Down
13 changes: 5 additions & 8 deletions code/_onclick/hud/blobbernauthud.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/datum/hud/living/blobbernaut/New(mob/living/owner)
. = ..()

/datum/hud/blobbernaut/New(mob/owner)
..()

blobpwrdisplay = new /obj/screen/healths/blob/naut/core()
infodisplay += blobpwrdisplay

healths = new /obj/screen/healths/blob/naut()
infodisplay += healths
blobpwrdisplay = new /obj/screen/healths/blob/overmind()
blobpwrdisplay.hud = src
infodisplay += blobpwrdisplay
10 changes: 3 additions & 7 deletions code/_onclick/hud/screen_objects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -607,14 +607,10 @@
screen_loc = ui_internal
mouse_opacity = MOUSE_OPACITY_TRANSPARENT

/obj/screen/healths/blob/naut
name = "health"
icon = 'icons/mob/blob.dmi'
icon_state = "nauthealth"

/obj/screen/healths/blob/naut/core
/obj/screen/healths/blob/overmind
name = "overmind health"
screen_loc = ui_health
icon = 'icons/mob/blob.dmi'
screen_loc = ui_blobbernaut_overmind_health
icon_state = "corehealth"

/obj/screen/healths/guardian
Expand Down
11 changes: 1 addition & 10 deletions code/modules/antagonists/blob/blob_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,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/Life()
if(..())
Expand Down Expand Up @@ -285,15 +285,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 = "<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)
Expand Down
7 changes: 4 additions & 3 deletions code/modules/antagonists/blob/overmind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,15 @@ GLOBAL_LIST_EMPTY(blob_nodes)

/mob/camera/blob/update_health_hud()
if(blob_core)
hud_used.healths.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 = "<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 = "<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 = "<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 = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#82ed00'>[round(blob_points)]</font></div>"
hud_used.blobpwrdisplay.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, var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
if (!message)
Expand Down