Merge pull request #14742 from keronshb/specialhudport

(READY) Ports Special Hud icons for some simple mobs
This commit is contained in:
silicons
2021-05-22 01:37:59 -06:00
committed by GitHub
26 changed files with 84 additions and 1 deletions
+1
View File
@@ -89,6 +89,7 @@
//Generic living
#define ui_living_pull "EAST-1:28,CENTER-2:15"
#define ui_living_health "EAST-1:28,CENTER:15"
#define ui_living_healthdoll "EAST-1:28,CENTER-1:15"
//Monkeys
#define ui_monkey_head "CENTER-5:13,SOUTH:5"
+5
View File
@@ -637,6 +637,11 @@
name = "health doll"
screen_loc = ui_healthdoll
/obj/screen/healthdoll/living
icon_state = "fullhealth0"
screen_loc = ui_living_healthdoll
var/filtered = FALSE //so we don't repeatedly create the mask of the mob every update
/obj/screen/mood
name = "mood"
icon_state = "mood5"
+15
View File
@@ -0,0 +1,15 @@
/datum/hud/living/simple_animal
ui_style = 'icons/mob/screen_gen.dmi'
/datum/hud/living/simple_animal/New(mob/living/owner)
..()
pull_icon = new /obj/screen/pull()
pull_icon.icon = ui_style
pull_icon.update_icon()
pull_icon.screen_loc = ui_living_pull
pull_icon.hud = src
static_inventory += pull_icon
//mob health doll! assumes whatever sprite the mob is
healthdoll = new /obj/screen/healthdoll/living()
healthdoll.hud = src
infodisplay += healthdoll
+41 -1
View File
@@ -542,8 +542,48 @@
update_stat()
med_hud_set_health()
med_hud_set_status()
update_health_hud()
//proc used to ressuscitate a mob
/mob/living/update_health_hud()
var/severity = 0
var/healthpercent = (health/maxHealth) * 100
if(hud_used?.healthdoll) //to really put you in the boots of a simplemob
var/obj/screen/healthdoll/living/livingdoll = hud_used.healthdoll
switch(healthpercent)
if(100 to INFINITY)
livingdoll.icon_state = "living0"
if(80 to 100)
livingdoll.icon_state = "living1"
severity = 1
if(60 to 80)
livingdoll.icon_state = "living2"
severity = 2
if(40 to 60)
livingdoll.icon_state = "living3"
severity = 3
if(20 to 40)
livingdoll.icon_state = "living4"
severity = 4
if(1 to 20)
livingdoll.icon_state = "living5"
severity = 5
else
livingdoll.icon_state = "living6"
severity = 6
if(!livingdoll.filtered)
livingdoll.filtered = TRUE
var/icon/mob_mask = icon(icon, icon_state)
if(mob_mask.Height() > world.icon_size || mob_mask.Width() > world.icon_size)
var/health_doll_icon_state = health_doll_icon ? health_doll_icon : "megasprite"
mob_mask = icon('icons/mob/screen_gen.dmi', health_doll_icon_state) //swap to something generic if they have no special doll
UNLINT(livingdoll.filters += filter(type="alpha", icon = mob_mask))
livingdoll.filters += filter(type="drop_shadow", size = -1)
if(severity > 0)
overlay_fullscreen("brute", /obj/screen/fullscreen/brute, severity)
else
clear_fullscreen("brute")
//Proc used to resuscitate a mob, for full_heal see fully_heal()
/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE)
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
if(full_heal)
@@ -94,6 +94,7 @@
var/smoke_delay = 0 //used to prevent spam with smoke reagent reaction on mob.
var/bubble_icon = "default" //what icon the mob uses for speechbubbles
var/health_doll_icon //if this exists AND the normal sprite is bigger than 32x32, this is the replacement icon state (because health doll size limitations). the icon will always be screen_gen.dmi
var/last_bumped = 0
var/unique_name = 0 //if a mob's name should be appended with an id when created e.g. Mob (666)
@@ -149,6 +149,7 @@
icon_state = "alienq"
icon_living = "alienq"
icon_dead = "alienq_dead"
health_doll_icon = "alienq"
bubble_icon = "alienroyal"
move_to_delay = 4
maxHealth = 400
@@ -73,6 +73,7 @@
icon_living = "megacarp"
icon_dead = "megacarp_dead"
icon_gib = "megacarp_gib"
health_doll_icon = "megacarp"
regen_amount = 6
maxHealth = 30
@@ -9,6 +9,7 @@
icon_state = "crawling"
icon_living = "crawling"
icon_dead = "dead"
health_doll_icon = "crawling"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
speak_chance = 80
maxHealth = 220
@@ -28,6 +28,7 @@ Difficulty: Medium
icon_state = "miner"
icon_living = "miner"
icon = 'icons/mob/broadMobs.dmi'
health_doll_icon = "miner"
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
light_color = "#E4C7C5"
movement_type = GROUND
@@ -33,6 +33,7 @@ Difficulty: Hard
icon_state = "bubblegum"
icon_living = "bubblegum"
icon_dead = ""
health_doll_icon = "bubblegum"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/96x96megafauna.dmi'
@@ -32,6 +32,7 @@ Difficulty: Very Hard
icon_state = "eva"
icon_living = "eva"
icon_dead = "dragon_dead"
health_doll_icon = "eva"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/96x96megafauna.dmi'
@@ -48,6 +48,7 @@ Difficulty: Medium
icon_state = "dragon"
icon_living = "dragon"
icon_dead = "dragon_dead"
health_doll_icon = "dragon"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
speak_emote = list("roars")
@@ -44,6 +44,7 @@ Difficulty: Normal
attack_sound = 'sound/weapons/sonic_jackhammer.ogg'
icon_state = "hierophant"
icon_living = "hierophant"
health_doll_icon = "hierophant"
friendly_verb_continuous = "stares down"
friendly_verb_simple = "stare down"
icon = 'icons/mob/lavaland/hierophant_new.dmi'
@@ -26,6 +26,7 @@ SHITCODE AHEAD. BE ADVISED. Also comment extravaganza
spacewalk = TRUE
icon_state = "mega_legion"
icon_living = "mega_legion"
health_doll_icon = "mega_legion"
desc = "One of many."
icon = 'icons/mob/lavaland/96x96megafauna.dmi'
attack_verb_continuous = "chomps"
@@ -75,6 +75,7 @@
icon_living = "watcher"
icon_aggro = "watcher"
icon_dead = "watcher_dead"
health_doll_icon = "watcher"
pixel_x = -10
throw_message = "bounces harmlessly off of"
melee_damage_lower = 15
@@ -25,6 +25,7 @@
icon_aggro = "broodmother"
icon_dead = "egg_sac"
icon_gib = "syndicate_gib"
health_doll_icon = "broodmother"
maxHealth = 800
health = 800
melee_damage_lower = 30
@@ -24,6 +24,7 @@
icon_aggro = "herald"
icon_dead = "herald_dying"
icon_gib = "syndicate_gib"
health_doll_icon = "herald"
maxHealth = 800
health = 800
melee_damage_lower = 20
@@ -24,6 +24,7 @@
icon_aggro = "legionnaire"
icon_dead = "legionnaire_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "legionnaire"
maxHealth = 800
health = 800
melee_damage_lower = 30
@@ -24,6 +24,7 @@
icon_aggro = "pandora"
icon_dead = "pandora_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "pandora"
maxHealth = 800
health = 800
melee_damage_lower = 15
@@ -253,6 +253,7 @@
icon_state = "legion"
icon_living = "legion"
icon_dead = "legion"
health_doll_icon = "legion"
health = 450
maxHealth = 450
melee_damage_lower = 20
@@ -6,6 +6,7 @@
icon_living = "clown"
icon_dead = "clown_dead"
icon_gib = "clown_gib"
health_doll_icon = "clown" //if >32x32, it will use this generic. for all the huge clown mobs that subtype from this
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
turns_per_move = 5
response_disarm_continuous = "gently pushes aside"
@@ -6,6 +6,7 @@
icon_living = "pine_1"
icon_dead = "pine_1"
icon_gib = "pine_1"
health_doll_icon = "pine_1"
gender = NEUTER
speak_chance = 0
turns_per_move = 5
@@ -72,5 +73,6 @@
icon_living = "festivus_pole"
icon_dead = "festivus_pole"
icon_gib = "festivus_pole"
health_doll_icon = "festivus_pole"
loot = list(/obj/item/stack/rods)
speak_emote = list("polls")
@@ -8,6 +8,7 @@
icon_aggro = "Fugu0"
icon_dead = "Fugu_dead"
icon_gib = "syndicate_gib"
health_doll_icon = "Fugu0"
mob_biotypes = MOB_ORGANIC|MOB_BEAST
mouse_opacity = MOUSE_OPACITY_ICON
move_to_delay = 5
@@ -7,6 +7,7 @@
///How much blud it has for bloodsucking
blood_volume = 550
rad_flags = RAD_NO_CONTAMINATE
hud_type = /datum/hud/living/simple_animal
status_flags = CANPUSH