[MIRROR] fixes a few plane issues (#9639)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2024-12-15 18:13:23 -07:00
committed by GitHub
parent 709e7852da
commit 3d5b084661
10 changed files with 133 additions and 156 deletions

View File

@@ -106,6 +106,8 @@ What is the naming convention for planes or layers?
// Invisible things plane
#define CLOAKED_PLANE -15
#define PLANE_CH_STOMACH -11 //Stomach Plane
// Top plane (in the sense that it's the highest in 'the world' and not a UI element)
#define ABOVE_PLANE -10
@@ -161,6 +163,12 @@ What is the naming convention for planes or layers?
#define PLANE_CH_SPECIAL 23 //Special role icon (revhead or w/e)
#define PLANE_CH_STATUS_OOC 24 //OOC status hud for spooks
// "Character HUDs", aka HUDs, but not the game's UI. Things like medhuds.
#define PLANE_CH_HEALTH_VR 26 //Hidden healthbar when at full health
#define PLANE_CH_STATUS_R 27 //Right-side status icon
#define PLANE_CH_BACKUP 28 //Backup implant
#define PLANE_CH_VANTAG 29 //Vore Antag hud
#define PLANE_MESONS 30 //Stuff seen with mesons, like open ceilings. This is 30 for downstreams.
#define PLANE_JANHUD 31 //Stuff seen with janiHUD. Mostly highlight of dirt.
@@ -168,6 +176,9 @@ What is the naming convention for planes or layers?
#define PLANE_BUILDMODE 39 //Things that only show up when you have buildmode on
#define PLANE_AUGMENTED 40 //Augmented-reality plane
#define PLANE_SOULCATCHER 41 //Soulcatcher
//Fullscreen overlays under inventory
#define PLANE_FULLSCREEN 90 //Blindness, mesons, druggy, etc
#define OBFUSCATION_LAYER 5 //Where images covering the view for eyes are put

View File

@@ -1,9 +0,0 @@
// "Character HUDs", aka HUDs, but not the game's UI. Things like medhuds.
#define PLANE_CH_HEALTH_VR 26 //Hidden healthbar when at full health
#define PLANE_CH_STATUS_R 27 //Right-side status icon
#define PLANE_CH_BACKUP 28 //Backup implant
#define PLANE_CH_VANTAG 29 //Vore Antag hud
#define PLANE_CH_STOMACH -11 //Stomach Plane
#define PLANE_AUGMENTED 40 //Augmented-reality plane
#define PLANE_SOULCATCHER 41 //CHOMPAdd Soulcatcher

View File

@@ -44,7 +44,11 @@
#define SPECIALROLE_HUD 8 // AntagHUD image.
#define STATUS_HUD_OOC 9 // STATUS_HUD without virus DB check for someone being ill.
#define LIFE_HUD 10 // STATUS_HUD that only reports dead or alive
#define TOTAL_HUDS 10 // Total number of HUDs. Like body layers, and other things, it comes up sometimes.
#define BACKUP_HUD 11 // HUD for showing whether or not they have a backup implant.
#define STATUS_R_HUD 12 // HUD for showing the same STATUS_HUD info on the right side, but not for 'boring' statuses (transparent icons)
#define HEALTH_VR_HUD 13 // HUD with blank 100% bar so it's hidden most of the time.
#define VANTAG_HUD 14 // HUD for showing being-an-antag-target prefs
#define TOTAL_HUDS 14 // Total number of HUDs. Like body layers, and other things, it comes up sometimes.
#define CLIENT_FROM_VAR(I) (ismob(I) ? I:client : (isclient(I) ? I : null))
@@ -502,3 +506,79 @@ GLOBAL_LIST_INIT(all_volume_channels, list(
// Vote Types
#define VOTE_RESULT_TYPE_MAJORITY "Majority"
#define VOTE_RESULT_TYPE_SKEWED "Seventy"
#define ECO_MODIFIER 10
#define VANTAG_NONE "hudblank"
#define VANTAG_VORE "vantag_vore"
#define VANTAG_KIDNAP "vantag_kidnap"
#define VANTAG_KILL "vantag_kill"
// ColorMate states
#define COLORMATE_TINT 1
#define COLORMATE_HSV 2
#define COLORMATE_MATRIX 3
#define DEPARTMENT_OFFDUTY "Off-Duty"
#define ANNOUNCER_NAME "Facility PA"
//For custom species
#define STARTING_SPECIES_POINTS 1 //CHOMPEdit
#define MAX_SPECIES_TRAITS 6 //CHOMPEdit - Cap positive traits at 6, given negatives are unlimited.
// Xenochimera thing mostly
#define REVIVING_NOW -1
#define REVIVING_DONE 0
#define REVIVING_READY 1
// Resleeving Mind Record Status
#define MR_NORMAL 0
#define MR_UNSURE 1
#define MR_DEAD 2
//Shuttle madness!
#define SHUTTLE_CRASHED 3 // Yup that can happen now
//Herm Gender
#define HERM "herm"
// Bluespace shelter deploy checks
#define SHELTER_DEPLOY_ALLOWED "allowed"
#define SHELTER_DEPLOY_BAD_TURFS "bad turfs"
#define SHELTER_DEPLOY_BAD_AREA "bad area"
#define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects"
#define SHELTER_DEPLOY_SHIP_SPACE "ship not in space"
#define PTO_SECURITY "Security"
#define PTO_MEDICAL "Medical"
#define PTO_ENGINEERING "Engineering"
#define PTO_SCIENCE "Science"
#define PTO_EXPLORATION "Exploration"
#define PTO_CARGO "Cargo"
#define PTO_CIVILIAN "Civilian"
#define PTO_CYBORG "Cyborg"
#define PTO_TALON "Talon Contractor"
#define DEPARTMENT_TALON "ITV Talon"
#define MAT_TITANIUMGLASS "ti-glass"
#define MAT_PLASTITANIUM "plastitanium"
#define MAT_PLASTITANIUMHULL "plastitanium hull"
#define MAT_PLASTITANIUMGLASS "plastitanium glass"
#define MAT_GOLDHULL "gold hull"
#define RESIZE_MINIMUM 0.25
#define RESIZE_MAXIMUM 2
#define RESIZE_MINIMUM_DORMS 0.01
#define RESIZE_MAXIMUM_DORMS 6
#define RESIZE_HUGE 2
#define RESIZE_BIG 1.5
#define RESIZE_NORMAL 1
#define RESIZE_SMALL 0.5
#define RESIZE_TINY 0.25
#define RESIZE_A_HUGEBIG (RESIZE_HUGE + RESIZE_BIG) / 2
#define RESIZE_A_BIGNORMAL (RESIZE_BIG + RESIZE_NORMAL) / 2
#define RESIZE_A_NORMALSMALL (RESIZE_NORMAL + RESIZE_SMALL) / 2
#define RESIZE_A_SMALLTINY (RESIZE_SMALL + RESIZE_TINY) / 2

View File

@@ -1,84 +0,0 @@
#define ECO_MODIFIER 10
// Because of omnihud having overlapping issues, we have extra ones.
#define BACKUP_HUD 11 // HUD for showing whether or not they have a backup implant.
#define STATUS_R_HUD 12 // HUD for showing the same STATUS_HUD info on the right side, but not for 'boring' statuses (transparent icons)
#define HEALTH_VR_HUD 13 // HUD with blank 100% bar so it's hidden most of the time.
#define VANTAG_HUD 14 // HUD for showing being-an-antag-target prefs
#undef TOTAL_HUDS //Undo theirs.
#define TOTAL_HUDS 14 // Total number of HUDs.
#define VANTAG_NONE "hudblank"
#define VANTAG_VORE "vantag_vore"
#define VANTAG_KIDNAP "vantag_kidnap"
#define VANTAG_KILL "vantag_kill"
// ColorMate states
#define COLORMATE_TINT 1
#define COLORMATE_HSV 2
#define COLORMATE_MATRIX 3
#define DEPARTMENT_OFFDUTY "Off-Duty"
#define ANNOUNCER_NAME "Facility PA"
//For custom species
#define STARTING_SPECIES_POINTS 1 //CHOMPEdit
#define MAX_SPECIES_TRAITS 6 //CHOMPEdit - Cap positive traits at 6, given negatives are unlimited.
// Xenochimera thing mostly
#define REVIVING_NOW -1
#define REVIVING_DONE 0
#define REVIVING_READY 1
// Resleeving Mind Record Status
#define MR_NORMAL 0
#define MR_UNSURE 1
#define MR_DEAD 2
//Shuttle madness!
#define SHUTTLE_CRASHED 3 // Yup that can happen now
//Herm Gender
#define HERM "herm"
// Bluespace shelter deploy checks
#define SHELTER_DEPLOY_ALLOWED "allowed"
#define SHELTER_DEPLOY_BAD_TURFS "bad turfs"
#define SHELTER_DEPLOY_BAD_AREA "bad area"
#define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects"
#define SHELTER_DEPLOY_SHIP_SPACE "ship not in space"
#define PTO_SECURITY "Security"
#define PTO_MEDICAL "Medical"
#define PTO_ENGINEERING "Engineering"
#define PTO_SCIENCE "Science"
#define PTO_EXPLORATION "Exploration"
#define PTO_CARGO "Cargo"
#define PTO_CIVILIAN "Civilian"
#define PTO_CYBORG "Cyborg"
#define PTO_TALON "Talon Contractor"
#define DEPARTMENT_TALON "ITV Talon"
#define MAT_TITANIUMGLASS "ti-glass"
#define MAT_PLASTITANIUM "plastitanium"
#define MAT_PLASTITANIUMHULL "plastitanium hull"
#define MAT_PLASTITANIUMGLASS "plastitanium glass"
#define MAT_GOLDHULL "gold hull"
#define RESIZE_MINIMUM 0.25
#define RESIZE_MAXIMUM 2
#define RESIZE_MINIMUM_DORMS 0.01
#define RESIZE_MAXIMUM_DORMS 6
#define RESIZE_HUGE 2
#define RESIZE_BIG 1.5
#define RESIZE_NORMAL 1
#define RESIZE_SMALL 0.5
#define RESIZE_TINY 0.25
#define RESIZE_A_HUGEBIG (RESIZE_HUGE + RESIZE_BIG) / 2
#define RESIZE_A_BIGNORMAL (RESIZE_BIG + RESIZE_NORMAL) / 2
#define RESIZE_A_NORMALSMALL (RESIZE_NORMAL + RESIZE_SMALL) / 2
#define RESIZE_A_SMALLTINY (RESIZE_SMALL + RESIZE_TINY) / 2

View File

@@ -1595,6 +1595,7 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
. += new /obj/screen/plane_master{plane = PLANE_MESONS} //Meson-specific things like open ceilings.
. += new /obj/screen/plane_master{plane = PLANE_BUILDMODE} //Things that only show up while in build mode
. += new /obj/screen/plane_master{plane = PLANE_JANHUD}
// Real tangible stuff planes
. += new /obj/screen/plane_master/main{plane = TURF_PLANE}

View File

@@ -164,6 +164,10 @@
hud_list[IMPTRACK_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK)
hud_list[SPECIALROLE_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL)
hud_list[STATUS_HUD_OOC] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC)
hud_list[HEALTH_VR_HUD] = gen_hud_image(ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
hud_list[STATUS_R_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R)
hud_list[BACKUP_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP)
hud_list[VANTAG_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG)
add_overlay(hud_list)
/mob/living/carbon/human/recalculate_vis()

View File

@@ -1,13 +1,6 @@
var/static/icon/ingame_hud_vr = icon('modular_chomp/icons/mob/hud_vore.dmi') //CHOMPEdit - expanded vore huds
var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
/mob/living/carbon/human/make_hud_overlays()
. = ..()
hud_list[HEALTH_VR_HUD] = gen_hud_image(ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
hud_list[STATUS_R_HUD] = gen_hud_image(ingame_hud_vr, src, plane = PLANE_CH_STATUS_R)
hud_list[BACKUP_HUD] = gen_hud_image(ingame_hud_vr, src, plane = PLANE_CH_BACKUP)
hud_list[VANTAG_HUD] = gen_hud_image(ingame_hud_vr, src, plane = PLANE_CH_VANTAG)
/mob/living/carbon/human/proc/remove_marking(var/datum/sprite_accessory/marking/mark_datum)
if (!mark_datum)
return FALSE

View File

@@ -2097,13 +2097,16 @@
/mob/living/carbon/human/proc/handle_hud_list()
if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/holder = grab_hud(HEALTH_HUD)
var/image/health_us = grab_hud(HEALTH_VR_HUD)
if(stat == DEAD)
holder.icon_state = "-100" // X_X
else
holder.icon_state = RoundHealth((health-CONFIG_GET(number/health_threshold_crit))/(getMaxHealth()-CONFIG_GET(number/health_threshold_crit))*100)
if(block_hud)
holder.icon_state = "hudblank"
health_us.icon_state = holder.icon_state
apply_hud(HEALTH_HUD, holder)
apply_hud(HEALTH_VR_HUD, health_us)
if (BITTEST(hud_updateflag, LIFE_HUD))
var/image/holder = grab_hud(LIFE_HUD)
@@ -2126,6 +2129,7 @@
var/image/holder = grab_hud(STATUS_HUD)
var/image/holder2 = grab_hud(STATUS_HUD_OOC)
var/image/status_r = grab_hud(STATUS_R_HUD)
if (isSynthetic())
holder.icon_state = "hudrobo"
else if(stat == DEAD)
@@ -2154,7 +2158,9 @@ End Chomp edit */
holder.icon_state = "hudblank"
holder2.icon_state = "hudblank"
status_r.icon_state = holder.icon_state
apply_hud(STATUS_HUD, holder)
apply_hud(STATUS_R_HUD, status_r)
apply_hud(STATUS_HUD_OOC, holder2)
if (BITTEST(hud_updateflag, ID_HUD))
@@ -2236,7 +2242,36 @@ End Chomp edit */
holder.icon_state = "hudsyndicate"
apply_hud(SPECIALROLE_HUD, holder)
attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs.
//Backup implant hud status
if (BITTEST(hud_updateflag, BACKUP_HUD))
var/image/holder = grab_hud(BACKUP_HUD)
holder.icon_state = "hudblank"
for(var/obj/item/organ/external/E in organs)
for(var/obj/item/implant/I in E.implants)
if(I.implanted && istype(I,/obj/item/implant/backup))
var/obj/item/implant/backup/B = I
if(!mind)
holder.icon_state = "hud_backup_nomind"
else if(!(mind.name in B.our_db.body_scans))
holder.icon_state = "hud_backup_nobody"
else
holder.icon_state = "hud_backup_norm"
if(block_hud)
holder.icon_state = "hudblank"
apply_hud(BACKUP_HUD, holder)
//VOREStation Antag Hud
if (BITTEST(hud_updateflag, VANTAG_HUD))
var/image/vantag = grab_hud(VANTAG_HUD)
if(vantag_pref)
vantag.icon_state = vantag_pref
else
vantag.icon_state = "hudblank"
if(block_hud)
vantag.icon_state = "hudblank"
apply_hud(VANTAG_HUD, vantag)
hud_updateflag = 0

View File

@@ -14,57 +14,6 @@
species.silk_reserve = min(species.silk_reserve + 2, species.silk_max_reserve)
adjust_nutrition(-0.4)
/mob/living/carbon/human/proc/handle_hud_list_vr()
//Right-side status hud updates with left side one.
if (BITTEST(hud_updateflag, STATUS_HUD))
var/image/other_status = hud_list[STATUS_HUD]
var/image/status_r = grab_hud(STATUS_R_HUD)
status_r.icon_state = other_status.icon_state
if(block_hud)
status_r.icon_state = "hudblank"
apply_hud(STATUS_R_HUD, status_r)
//Our custom health bar HUD
if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/other_health = hud_list[HEALTH_HUD]
var/image/health_us = grab_hud(HEALTH_VR_HUD)
health_us.icon_state = other_health.icon_state
if(block_hud)
health_us.icon_state = "hudblank"
apply_hud(HEALTH_VR_HUD, health_us)
//Backup implant hud status
if (BITTEST(hud_updateflag, BACKUP_HUD))
var/image/holder = grab_hud(BACKUP_HUD)
holder.icon_state = "hudblank"
for(var/obj/item/organ/external/E in organs)
for(var/obj/item/implant/I in E.implants)
if(I.implanted && istype(I,/obj/item/implant/backup))
var/obj/item/implant/backup/B = I
if(!mind)
holder.icon_state = "hud_backup_nomind"
else if(!(mind.name in B.our_db.body_scans))
holder.icon_state = "hud_backup_nobody"
else
holder.icon_state = "hud_backup_norm"
if(block_hud)
holder.icon_state = "hudblank"
apply_hud(BACKUP_HUD, holder)
//VOREStation Antag Hud
if (BITTEST(hud_updateflag, VANTAG_HUD))
var/image/vantag = grab_hud(VANTAG_HUD)
if(vantag_pref)
vantag.icon_state = vantag_pref
else
vantag.icon_state = "hudblank"
if(block_hud)
vantag.icon_state = "hudblank"
apply_hud(VANTAG_HUD, vantag)
//Our call for the NIF to do whatever
/mob/living/carbon/human/proc/handle_nif()
if(!nif) return
@@ -89,4 +38,3 @@
/mob/living/carbon
var/synth_cosmetic_pain = FALSE

View File

@@ -27,7 +27,6 @@
#include "code\__defines\_init.dm"
#include "code\__defines\_lists.dm"
#include "code\__defines\_planes+layers.dm"
#include "code\__defines\_planes+layers_vr.dm"
#include "code\__defines\_protect.dm"
#include "code\__defines\_reagents.dm"
#include "code\__defines\_reagents_ch.dm"
@@ -101,7 +100,6 @@
#include "code\__defines\mecha.dm"
#include "code\__defines\misc.dm"
#include "code\__defines\misc_ch.dm"
#include "code\__defines\misc_vr.dm"
#include "code\__defines\mob_ch.dm"
#include "code\__defines\mobs.dm"
#include "code\__defines\mobs_vr.dm"