From 045a279f8b26152f623064800be08bab1b85de7e Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 26 Feb 2024 15:42:12 -0800 Subject: [PATCH 1/2] fixes the vulture spotting scope teleporting you --- code/game/objects/structures/vulture_spotter.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/game/objects/structures/vulture_spotter.dm b/code/game/objects/structures/vulture_spotter.dm index d90a1ec1615a..4d8e5d06749b 100644 --- a/code/game/objects/structures/vulture_spotter.dm +++ b/code/game/objects/structures/vulture_spotter.dm @@ -87,7 +87,7 @@ if(user.client) RegisterSignal(user.client, COMSIG_PARENT_QDELETING, PROC_REF(do_unscope)) user.client.change_view(scope_zoom, src) - RegisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED), PROC_REF(do_unscope)) + RegisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_LIVING_SET_BODY_POSITION), PROC_REF(do_unscope)) user.see_in_dark += darkness_view user.lighting_alpha = 127 user.sync_lighting_plane_alpha() @@ -234,7 +234,7 @@ user.lighting_alpha = user.default_lighting_alpha user.sync_lighting_plane_alpha() user.clear_fullscreen("vulture_spotter") - UnregisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED)) + UnregisterSignal(user, list(COMSIG_MOB_PICKUP_ITEM, COMSIG_MOB_RESISTED, COMSIG_MOB_DEATH, COMSIG_LIVING_SET_BODY_POSITION)) user.pixel_x = 0 user.pixel_y = 0 if(user.client) @@ -295,6 +295,10 @@ return rifle.attachments["rail"] +/obj/structure/vulture_spotter_tripod/check_eye(mob/living/user) + if((user.body_position != STANDING_UP) || (get_dist(user, src) > 0) || user.is_mob_incapacitated() || !user.client) + do_unscope() + /datum/action/vulture_tripod_unscope name = "Stop Using Scope" action_icon_state = "vulture_tripod_close" From 54216e87c9ca15be77f22a77323f5e7a61b02eb4 Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 26 Feb 2024 16:08:10 -0800 Subject: [PATCH 2/2] fix vulture attachment camo --- code/modules/projectiles/gun_attachables.dm | 44 +++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 37094bb12775..394e40cacde5 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -1271,6 +1271,19 @@ Defined in conflicts.dm of the #defines folder. QDEL_NULL(scope_element) return ..() +/obj/item/attachable/vulture_scope/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection) + . = ..() + var/new_attach_icon + switch(SSmapping.configs[GROUND_MAP].camouflage_type) + if("snow") + attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon + if("desert") + attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon + if("classic") + attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon + if("urban") + attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon + /obj/item/attachable/vulture_scope/tgui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -1814,6 +1827,7 @@ Defined in conflicts.dm of the #defines folder. /obj/item/attachable/stock/vulture name = "\improper M707 heavy stock" icon_state = "vulture_stock" + attach_icon = "vulture_stock" hud_offset_mod = 3 /obj/item/attachable/stock/vulture/Initialize(mapload, ...) @@ -1821,6 +1835,19 @@ Defined in conflicts.dm of the #defines folder. select_gamemode_skin(type) // Doesn't give any stat additions due to the gun already having really good ones, and this is unremovable from the gun itself +/obj/item/attachable/stock/vulture/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection) + . = ..() + var/new_attach_icon + switch(SSmapping.configs[GROUND_MAP].camouflage_type) + if("snow") + attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon + if("desert") + attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon + if("classic") + attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon + if("urban") + attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon + /obj/item/attachable/stock/tactical name = "\improper MK221 tactical stock" desc = "A metal stock made for the MK221 tactical shotgun." @@ -3513,6 +3540,23 @@ Defined in conflicts.dm of the #defines folder. attach_icon = "vulture_bipod" heavy_bipod = TRUE +/obj/item/attachable/bipod/vulture/Initialize(mapload, ...) + . = ..() + select_gamemode_skin(type) + +/obj/item/attachable/bipod/vulture/select_gamemode_skin(expected_type, list/override_icon_state, list/override_protection) + . = ..() + var/new_attach_icon + switch(SSmapping.configs[GROUND_MAP].camouflage_type) + if("snow") + attach_icon = new_attach_icon ? new_attach_icon : "s_" + attach_icon + if("desert") + attach_icon = new_attach_icon ? new_attach_icon : "d_" + attach_icon + if("classic") + attach_icon = new_attach_icon ? new_attach_icon : "c_" + attach_icon + if("urban") + attach_icon = new_attach_icon ? new_attach_icon : "u_" + attach_icon + /obj/item/attachable/burstfire_assembly name = "burst fire assembly" desc = "A small angled piece of fine machinery that increases the burst count on some weapons, and grants the ability to others. \nIncreases weapon scatter."