From 4b2bffdff0fd4c49a50400895f2caf0b82f1186c Mon Sep 17 00:00:00 2001 From: Artur <24881678+Arturlang@users.noreply.github.com> Date: Thu, 29 Jul 2021 14:06:18 +0300 Subject: [PATCH] Actually makes it work by /obj/screen --> /atom/movable/screen --- code/_onclick/hud/action_button.dm | 2 +- code/_onclick/hud/alert.dm | 2 +- code/_onclick/hud/fullscreen.dm | 2 +- code/_onclick/hud/map_popups.dm | 2 +- code/_onclick/hud/picture_in_picture.dm | 2 +- code/_onclick/hud/radial.dm | 4 ++-- code/_onclick/hud/screen_objects.dm | 8 ++------ code/datums/action.dm | 4 ++-- code/datums/components/crafting/crafting.dm | 2 +- code/modules/client/client_defines.dm | 2 +- .../mob/living/carbon/human/species_types/jellypeople.dm | 4 ++-- code/modules/mob/living/silicon/ai/multicam.dm | 2 +- 12 files changed, 16 insertions(+), 20 deletions(-) diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 735c95b28e..791cf336ac 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -235,7 +235,7 @@ return "WEST[coord_col]:[coord_col_offset],NORTH[coord_row]:-6" -/datum/hud/proc/SetButtonCoords(obj/screen/button,number, supportedcolumns) +/datum/hud/proc/SetButtonCoords(atom/movable/screen/button,number, supportedcolumns) var/row = round((number-1)/supportedcolumns) var/col = ((number - 1)%(supportedcolumns)) + 1 var/x_offset = 32*(col-1) + 4 + 2*col diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index e148ae301d..ed4c91dd9b 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -69,7 +69,7 @@ thealert.timeout = world.time + thealert.timeout - world.tick_lag return thealert -/mob/proc/alert_timeout(obj/screen/alert/alert, category) +/mob/proc/alert_timeout(atom/movable/screen/alert/alert, category) if(alert.timeout && alerts[category] == alert && world.time >= alert.timeout) clear_alert(category) diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm index 7481baa2c0..a7247ccf09 100644 --- a/code/_onclick/hud/fullscreen.dm +++ b/code/_onclick/hud/fullscreen.dm @@ -31,7 +31,7 @@ client.screen -= screen qdel(screen) -/mob/proc/clear_fullscreen_after_animate(obj/screen/fullscreen/screen) +/mob/proc/clear_fullscreen_after_animate(atom/movable/screen/fullscreen/screen) if(client) client.screen -= screen qdel(screen) diff --git a/code/_onclick/hud/map_popups.dm b/code/_onclick/hud/map_popups.dm index 72c98433a6..7c40f654ff 100644 --- a/code/_onclick/hud/map_popups.dm +++ b/code/_onclick/hud/map_popups.dm @@ -46,7 +46,7 @@ * Registers screen obj with the client, which makes it visible on the * assigned map, and becomes a part of the assigned map's lifecycle. */ -/client/proc/register_map_obj(obj/screen/screen_obj) +/client/proc/register_map_obj(atom/movable/screen/screen_obj) if(!screen_obj.assigned_map) CRASH("Can't register [screen_obj] without 'assigned_map' property.") if(!screen_maps[screen_obj.assigned_map]) diff --git a/code/_onclick/hud/picture_in_picture.dm b/code/_onclick/hud/picture_in_picture.dm index 847c49b0cc..6cf1bfd6a6 100644 --- a/code/_onclick/hud/picture_in_picture.dm +++ b/code/_onclick/hud/picture_in_picture.dm @@ -26,7 +26,7 @@ QDEL_NULL(button_expand) return ..() -/atom/movable/screen/movable/pic_in_pic/component_click(obj/screen/component_button/component, params) +/atom/movable/screen/movable/pic_in_pic/component_click(atom/movable/screen/component_button/component, params) if(component == button_x) qdel(src) else if(component == button_expand) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index f817851999..3cce288e67 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -159,7 +159,7 @@ GLOBAL_LIST_EMPTY(radial_menus) else SetElement(E,page_choices[i],angle,anim = anim,anim_order = i) -/datum/radial_menu/proc/HideElement(obj/screen/radial/slice/E) +/datum/radial_menu/proc/HideElement(atom/movable/screen/radial/slice/E) E.cut_overlays() E.alpha = 0 E.name = "None" @@ -168,7 +168,7 @@ GLOBAL_LIST_EMPTY(radial_menus) E.choice = null E.next_page = FALSE -/datum/radial_menu/proc/SetElement(obj/screen/radial/slice/E,choice_id,angle,anim,anim_order) +/datum/radial_menu/proc/SetElement(atom/movable/screen/radial/slice/E,choice_id,angle,anim,anim_order) //Position var/py = round(cos(angle) * radius) + py_shift var/px = round(sin(angle) * radius) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 517ecfec48..bfbdce41fd 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -11,7 +11,6 @@ icon = 'icons/mob/screen_gen.dmi' layer = HUD_LAYER plane = HUD_PLANE - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF animate_movement = SLIDE_STEPS speech_span = SPAN_ROBOT vis_flags = VIS_INHERIT_PLANE @@ -34,9 +33,6 @@ */ var/del_on_map_removal = TRUE -/atom/movable/screen/take_damage() - return - /atom/movable/screen/Destroy() master = null hud = null @@ -48,7 +44,7 @@ /atom/movable/screen/orbit() return -/atom/movable/screen/proc/component_click(obj/screen/component_button/component, params) +/atom/movable/screen/proc/component_click(atom/movable/screen/component_button/component, params) return /atom/movable/screen/text @@ -695,7 +691,7 @@ /atom/movable/screen/component_button var/atom/movable/screen/parent -/atom/movable/screen/component_button/Initialize(mapload, obj/screen/parent) +/atom/movable/screen/component_button/Initialize(mapload, atom/movable/screen/parent) . = ..() src.parent = parent diff --git a/code/datums/action.dm b/code/datums/action.dm index 66a3530c82..1a8ea7a60f 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -159,7 +159,7 @@ button.color = rgb(255,255,255,255) return 1 -/datum/action/proc/ApplyIcon(obj/screen/movable/action_button/current_button, force = FALSE) +/datum/action/proc/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force = FALSE) if(icon_icon && button_icon_state && ((current_button.button_icon_state != button_icon_state) || force)) current_button.cut_overlays() current_button.add_overlay(mutable_appearance(icon_icon, button_icon_state)) @@ -821,7 +821,7 @@ icon_icon = 'icons/mob/actions/actions_items.dmi' button_icon_state = "storage_gather_switch" -/datum/action/item_action/storage_gather_mode/ApplyIcon(obj/screen/movable/action_button/current_button) +/datum/action/item_action/storage_gather_mode/ApplyIcon(atom/movable/screen/movable/action_button/current_button) . = ..() var/old_layer = target.layer var/old_plane = target.plane diff --git a/code/datums/components/crafting/crafting.dm b/code/datums/components/crafting/crafting.dm index 3f0e2c3b1c..3ed3e521e4 100644 --- a/code/datums/components/crafting/crafting.dm +++ b/code/datums/components/crafting/crafting.dm @@ -323,7 +323,7 @@ Deletion.Cut(Deletion.len) qdel(DL) -/datum/component/personal_crafting/proc/component_ui_interact(obj/screen/craft/image, location, control, params, user) +/datum/component/personal_crafting/proc/component_ui_interact(atom/movable/screen/craft/image, location, control, params, user) if(user == parent) ui_interact(user) diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index f428088fe1..99f24107c7 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -88,7 +88,7 @@ var/datum/player_details/player_details //these persist between logins/logouts during the same round. - var/list/char_render_holders //Should only be a key-value list of north/south/east/west = obj/screen. + var/list/char_render_holders //Should only be a key-value list of north/south/east/west = atom/movable/screen. /// Last time they used fix macros var/last_macro_fix = 0 diff --git a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm index 2f463fa8bc..7a5bcc9e3a 100644 --- a/code/modules/mob/living/carbon/human/species_types/jellypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/jellypeople.dm @@ -505,7 +505,7 @@ button_icon_state = "slimeeject" ..() -/datum/action/innate/integrate_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force) +/datum/action/innate/integrate_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force) ..(current_button, TRUE) if(species && species.current_extract) current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state)) @@ -559,7 +559,7 @@ return TRUE return FALSE -/datum/action/innate/use_extract/ApplyIcon(obj/screen/movable/action_button/current_button, force) +/datum/action/innate/use_extract/ApplyIcon(atom/movable/screen/movable/action_button/current_button, force) ..(current_button, TRUE) if(species && species.current_extract) current_button.add_overlay(mutable_appearance(species.current_extract.icon, species.current_extract.icon_state)) diff --git a/code/modules/mob/living/silicon/ai/multicam.dm b/code/modules/mob/living/silicon/ai/multicam.dm index 7e7f609169..54713acac4 100644 --- a/code/modules/mob/living/silicon/ai/multicam.dm +++ b/code/modules/mob/living/silicon/ai/multicam.dm @@ -251,7 +251,7 @@ GLOBAL_DATUM(ai_camera_room_landmark, /obj/effect/landmark/ai_multicam_room) to_chat(src, "Multiple-camera viewing mode deactivated.") -/mob/living/silicon/ai/proc/select_main_multicam_window(obj/screen/movable/pic_in_pic/ai/P) +/mob/living/silicon/ai/proc/select_main_multicam_window(atom/movable/screen/movable/pic_in_pic/ai/P) if(master_multicam == P) return