mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-09 16:05:07 +00:00
[MIRROR] Removes Internals HUD element [MDB IGNORE] (#15104)
* Removes Internals HUD element * Removes the proc calls that were no longer necessary Co-authored-by: 13spacemen <46101244+13spacemen@users.noreply.github.com> Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
This commit is contained in:
@@ -93,12 +93,12 @@
|
||||
#define ui_palette_scroll_offset(north_offset) ("WEST+1:8,NORTH-[6+north_offset]:28")
|
||||
|
||||
//Middle right (status indicators)
|
||||
#define ui_healthdoll "EAST-1:28,CENTER-2:13"
|
||||
#define ui_health "EAST-1:28,CENTER-1:15"
|
||||
#define ui_internal "EAST-1:28,CENTER+1:17"
|
||||
#define ui_mood "EAST-1:28,CENTER:17"
|
||||
#define ui_spacesuit "EAST-1:28,CENTER-4:10"
|
||||
#define ui_stamina "EAST-1:28,CENTER-3:10"
|
||||
#define ui_healthdoll "EAST-1:28,CENTER-2:17"
|
||||
#define ui_health "EAST-1:28,CENTER-1:19"
|
||||
#define ui_internal "EAST-1:28,CENTER+1:21"
|
||||
#define ui_mood "EAST-1:28,CENTER:21"
|
||||
#define ui_spacesuit "EAST-1:28,CENTER-4:14"
|
||||
#define ui_stamina "EAST-1:28,CENTER-3:14"
|
||||
|
||||
//Pop-up inventory
|
||||
#define ui_shoes "WEST+1:8,SOUTH:5"
|
||||
@@ -211,3 +211,5 @@
|
||||
#define SCRN_OBJ_IN_LIST "list"
|
||||
/// In the collapseable palette
|
||||
#define SCRN_OBJ_IN_PALETTE "palette"
|
||||
///Inserted first in the list
|
||||
#define SCRN_OBJ_INSERT_FIRST "first"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
var/button_icon_state
|
||||
var/appearance_cache
|
||||
|
||||
var/mutable_appearance/button_overlay
|
||||
/// Where we are currently placed on the hud. SCRN_OBJ_DEFAULT asks the linked action what it thinks
|
||||
var/location = SCRN_OBJ_DEFAULT
|
||||
/// A unique bitflag, combined with the name of our linked action this lets us persistently remember any user changes to our position
|
||||
|
||||
@@ -101,7 +101,6 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
|
||||
var/atom/movable/screen/healths
|
||||
var/atom/movable/screen/stamina
|
||||
var/atom/movable/screen/healthdoll
|
||||
var/atom/movable/screen/internals
|
||||
var/atom/movable/screen/spacesuit
|
||||
// subtypes can override this to force a specific UI style
|
||||
var/ui_style
|
||||
@@ -173,7 +172,6 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
|
||||
healths = null
|
||||
stamina = null
|
||||
healthdoll = null
|
||||
internals = null
|
||||
spacesuit = null
|
||||
blobpwrdisplay = null
|
||||
alien_plasma_display = null
|
||||
@@ -418,6 +416,9 @@ GLOBAL_LIST_INIT(available_erp_ui_styles, list(
|
||||
listed_actions.insert_action(button)
|
||||
if(SCRN_OBJ_IN_PALETTE)
|
||||
palette_actions.insert_action(button)
|
||||
if(SCRN_OBJ_INSERT_FIRST)
|
||||
listed_actions.insert_action(button, index = 1)
|
||||
position = SCRN_OBJ_IN_LIST
|
||||
else // If we don't have it as a define, this is a screen_loc, and we should be floating
|
||||
floating_actions += button
|
||||
button.screen_loc = position
|
||||
|
||||
@@ -355,10 +355,6 @@
|
||||
rest_icon.hud = src
|
||||
static_inventory += rest_icon
|
||||
|
||||
internals = new /atom/movable/screen/internals()
|
||||
internals.hud = src
|
||||
infodisplay += internals
|
||||
|
||||
spacesuit = new /atom/movable/screen/spacesuit
|
||||
spacesuit.hud = src
|
||||
infodisplay += spacesuit
|
||||
|
||||
@@ -307,66 +307,6 @@
|
||||
icon = 'icons/hud/screen_cyborg.dmi'
|
||||
screen_loc = ui_borg_intents
|
||||
|
||||
/atom/movable/screen/internals
|
||||
name = "toggle internals"
|
||||
icon_state = "internal0"
|
||||
screen_loc = ui_internal
|
||||
|
||||
/atom/movable/screen/internals/Click()
|
||||
if(!iscarbon(usr))
|
||||
return
|
||||
var/mob/living/carbon/C = usr
|
||||
if(C.incapacitated())
|
||||
return
|
||||
|
||||
if(C.internal)
|
||||
C.internal = null
|
||||
to_chat(C, span_notice("You are no longer running on internals."))
|
||||
icon_state = "internal0"
|
||||
else
|
||||
if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(!istype(C.wear_mask, /obj/item/clothing/mask))
|
||||
to_chat(C, span_warning("You are not wearing an internals mask!"))
|
||||
return 1
|
||||
else
|
||||
var/obj/item/clothing/mask/M = C.wear_mask
|
||||
if(M.mask_adjusted) // if mask on face but pushed down
|
||||
M.adjustmask(C) // adjust it back
|
||||
if( !(M.clothing_flags & MASKINTERNALS) )
|
||||
to_chat(C, span_warning("You are not wearing an internals mask!"))
|
||||
return
|
||||
|
||||
var/obj/item/I = C.is_holding_item_of_type(/obj/item/tank)
|
||||
if(I)
|
||||
to_chat(C, span_notice("You are now running on internals from [I] in your [C.get_held_index_name(C.get_held_index_of_item(I))]."))
|
||||
C.internal = I
|
||||
else if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(istype(H.s_store, /obj/item/tank))
|
||||
to_chat(H, span_notice("You are now running on internals from [H.s_store] on your [H.wear_suit.name]."))
|
||||
H.internal = H.s_store
|
||||
else if(istype(H.belt, /obj/item/tank))
|
||||
to_chat(H, span_notice("You are now running on internals from [H.belt] on your belt."))
|
||||
H.internal = H.belt
|
||||
else if(istype(H.l_store, /obj/item/tank))
|
||||
to_chat(H, span_notice("You are now running on internals from [H.l_store] in your left pocket."))
|
||||
H.internal = H.l_store
|
||||
else if(istype(H.r_store, /obj/item/tank))
|
||||
to_chat(H, span_notice("You are now running on internals from [H.r_store] in your right pocket."))
|
||||
H.internal = H.r_store
|
||||
|
||||
//Separate so CO2 jetpacks are a little less cumbersome.
|
||||
if(!C.internal && istype(C.back, /obj/item/tank))
|
||||
to_chat(C, span_notice("You are now running on internals from [C.back] on your back."))
|
||||
C.internal = C.back
|
||||
|
||||
if(C.internal)
|
||||
icon_state = "internal1"
|
||||
else
|
||||
to_chat(C, span_warning("You don't have an oxygen tank!"))
|
||||
return
|
||||
C.update_action_buttons_icon()
|
||||
|
||||
/atom/movable/screen/spacesuit
|
||||
name = "Space suit cell status"
|
||||
icon_state = "spacesuit_0"
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
var/icon_icon = 'icons/hud/actions.dmi'
|
||||
/// This is the icon state for the icon that appears OVER the button background
|
||||
var/button_icon_state = "default"
|
||||
var/button_overlay_state
|
||||
///List of all mobs that are viewing our action button -> A unique movable for them to view.
|
||||
var/list/viewers = list()
|
||||
|
||||
@@ -166,6 +167,11 @@
|
||||
|
||||
ApplyIcon(button, force)
|
||||
|
||||
if(button_overlay_state)
|
||||
button.cut_overlay(button.button_overlay)
|
||||
button.button_overlay = mutable_appearance(icon = 'icons/hud/actions.dmi', icon_state = button_overlay_state)
|
||||
button.add_overlay(button.button_overlay)
|
||||
|
||||
var/available = IsAvailable()
|
||||
if(available)
|
||||
button.color = rgb(255,255,255,255)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/datum/action/item_action/set_internals
|
||||
name = "Set Internals"
|
||||
default_button_position = SCRN_OBJ_INSERT_FIRST
|
||||
button_overlay_state = "ab_goldborder"
|
||||
|
||||
/datum/action/item_action/set_internals/UpdateButton(atom/movable/screen/movable/action_button/button, status_only = FALSE, force)
|
||||
. = ..()
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
if(H.internal == src)
|
||||
to_chat(H, span_notice("You close [src] valve."))
|
||||
H.internal = null
|
||||
H.update_internals_hud_icon(0)
|
||||
else
|
||||
if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if(!H.wear_mask)
|
||||
@@ -73,7 +72,6 @@
|
||||
else
|
||||
to_chat(H, span_notice("You open [src] valve."))
|
||||
H.internal = src
|
||||
H.update_internals_hud_icon(1)
|
||||
H.update_action_buttons_icon()
|
||||
|
||||
|
||||
|
||||
@@ -234,7 +234,6 @@
|
||||
if(isplasmaman(H))
|
||||
H.equipOutfit(plasmaman_outfit)
|
||||
H.internal = H.get_item_for_held_index(2)
|
||||
H.update_internals_hud_icon(1)
|
||||
H.equipOutfit(outfit)
|
||||
|
||||
|
||||
|
||||
@@ -789,10 +789,6 @@
|
||||
else
|
||||
hud_used.stamina.icon_state = "stamina6"
|
||||
|
||||
/mob/living/carbon/proc/update_internals_hud_icon(internal_state = 0)
|
||||
if(hud_used?.internals)
|
||||
hud_used.internals.icon_state = "internal[internal_state]"
|
||||
|
||||
/mob/living/carbon/proc/update_spacesuit_hud_icon(cell_state = "empty")
|
||||
if(hud_used?.spacesuit)
|
||||
hud_used.spacesuit.icon_state = "spacesuit_[cell_state]"
|
||||
|
||||
@@ -223,11 +223,9 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list(
|
||||
carbon_source.internal = null
|
||||
|
||||
// This isn't meant to be FALSE, it correlates to the icon's name.
|
||||
carbon_source.update_internals_hud_icon(0)
|
||||
else if (!QDELETED(item))
|
||||
if((carbon_source.wear_mask?.clothing_flags & MASKINTERNALS) || carbon_source.getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
carbon_source.internal = item
|
||||
carbon_source.update_internals_hud_icon(1)
|
||||
|
||||
carbon_source.visible_message(
|
||||
span_danger("[user] [isnull(carbon_source.internal) ? "closes": "opens"] the valve on [source]'s [item.name]."),
|
||||
|
||||
@@ -384,7 +384,6 @@
|
||||
if((I.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(I.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR)))
|
||||
update_hair()
|
||||
if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
update_internals_hud_icon(0)
|
||||
internal = null
|
||||
if(I.flags_inv & HIDEEYES)
|
||||
update_inv_glasses()
|
||||
|
||||
@@ -122,8 +122,6 @@
|
||||
if(job.plasmaman_outfit)
|
||||
equipping.equipOutfit(job.plasmaman_outfit, visuals_only)
|
||||
equipping.internal = equipping.get_item_for_held_index(2)
|
||||
equipping.update_internals_hud_icon(1)
|
||||
|
||||
|
||||
/datum/species/plasmaman/random_name(gender,unique,lastname)
|
||||
if(unique)
|
||||
|
||||
@@ -348,12 +348,9 @@
|
||||
if(internal)
|
||||
if(internal.loc != src && !(wear_mask.clothing_flags & MASK_EXTEND_RANGE)) //SKYRAT EDIT ANESTHETIC MACHINE. ORIGNIAL CODE: if(internal.loc != src)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else
|
||||
update_internals_hud_icon(1)
|
||||
. = internal.remove_air_volume(volume_needed)
|
||||
if(!.)
|
||||
return FALSE //to differentiate between no internals and active, but empty internals
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -79,7 +79,6 @@
|
||||
return
|
||||
lungs_holding.Insert(carbon_holder, drop_if_replaced = FALSE)
|
||||
lungs_holding.organ_flags &= ~ORGAN_FROZEN
|
||||
carbon_holder.update_internals_hud_icon(1)
|
||||
|
||||
/datum/quirk/equipping/lungs/on_equip_item(obj/item/equipped, success)
|
||||
var/mob/living/carbon/human/human_holder = quirk_holder
|
||||
@@ -135,4 +134,3 @@
|
||||
if (!success || !istype(carbon_holder) || !istype(equipped, /obj/item/tank/internals))
|
||||
return
|
||||
carbon_holder.internal = equipped
|
||||
carbon_holder.update_internals_hud_icon(1)
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
var/datum/outfit/vox/vox_outfit = new /datum/outfit/vox
|
||||
equipping.equipOutfit(vox_outfit, visuals_only)
|
||||
equipping.internal = equipping.get_item_for_held_index(2)
|
||||
equipping.update_internals_hud_icon(1)
|
||||
|
||||
/datum/species/vox_primalis/random_name(gender, unique, lastname)
|
||||
if(unique)
|
||||
|
||||
@@ -71,7 +71,6 @@
|
||||
var/datum/outfit/vox/O = new /datum/outfit/vox
|
||||
equipping.equipOutfit(O, visuals_only)
|
||||
equipping.internal = equipping.get_item_for_held_index(2)
|
||||
equipping.update_internals_hud_icon(1)
|
||||
|
||||
/datum/species/vox/random_name(gender,unique,lastname)
|
||||
if(unique)
|
||||
|
||||
@@ -131,7 +131,6 @@
|
||||
target.internal = attached_tank
|
||||
mask_out = TRUE
|
||||
START_PROCESSING(SSmachines, src)
|
||||
target.update_internals_hud_icon(1)
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/anesthetic_machine/process()
|
||||
|
||||
Reference in New Issue
Block a user