diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 7a732e656fbe..89985a883a1c 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -139,6 +139,7 @@ #define TRAIT_NOHARDCRIT "nohardcrit" #define TRAIT_NOSOFTCRIT "nosoftcrit" #define TRAIT_MINDSHIELD "mindshield" +#define TRAIT_ANCHOR "anchor" #define TRAIT_HIJACKER "hijacker" #define TRAIT_SIXTHSENSE "sixthsense" #define TRAIT_DISSECTED "dissected" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 76d17324b7f5..b1e5c2d2b9bd 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -69,6 +69,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_NOHARDCRIT" = TRAIT_NOHARDCRIT, "TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT, "TRAIT_MINDSHIELD" = TRAIT_MINDSHIELD, + "TRAIT_ANCHOR" = TRAIT_ANCHOR, "TRAIT_HIJACKER" = TRAIT_HIJACKER, "TRAIT_DISSECTED" = TRAIT_DISSECTED, "TRAIT_SIXTHSENSE" = TRAIT_SIXTHSENSE, diff --git a/code/_rendering/atom_huds/data_huds.dm b/code/_rendering/atom_huds/data_huds.dm index 3912a1f00de3..490040637ac4 100644 --- a/code/_rendering/atom_huds/data_huds.dm +++ b/code/_rendering/atom_huds/data_huds.dm @@ -271,6 +271,11 @@ var/icon/IC = icon(icon, icon_state, dir) holder.pixel_y = IC.Height() - world.icon_size holder.icon_state = "hud_imp_loyal" + if(HAS_TRAIT(src, TRAIT_ANCHOR)) + holder = hud_list[IMPLOYAL_HUD] + var/icon/IC = icon(icon, icon_state, dir) + holder.pixel_y = IC.Height() - world.icon_size + holder.icon_state = "hud_imp_anchor" /mob/living/carbon/human/proc/sec_hud_set_security_status() var/image/holder = hud_list[WANTED_HUD] diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 5af7200f55c9..b6d8c934e36f 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/modular_bluemoon/Fink/code/items/implant_anchor.dm b/modular_bluemoon/Fink/code/items/implant_anchor.dm index 5150d34e8bc2..835adc8954d1 100644 --- a/modular_bluemoon/Fink/code/items/implant_anchor.dm +++ b/modular_bluemoon/Fink/code/items/implant_anchor.dm @@ -1,7 +1,7 @@ /obj/item/implant/anchor name = "anchor implant" desc = "Prevents you from leaving local sector, guarded by you." - var/base_z_level + var/list/allowed_z_levels /obj/item/implant/anchor/get_data() var/dat = {"Implant Specifications:
@@ -19,26 +19,27 @@ imp_type = /obj/item/implant/anchor /obj/item/implant/anchor/Initialize() - . = ..() - var/base_z_level = imp_in.z - return base_z_level - - //шаблон имплантации раундстартом, вставить в желаемую гостроль - //var/mob/living/M = mob_override || owner.current - //M.faction |= ROLE_??? - //var/obj/item/implant/anchor/Implant = new/obj/item/implant/anchor(M) + .=..() + allowed_z_levels = list(1,12,imp_in.z) // dynamic набор: цк, межшатолье, инфдормы, сектор имплантации + if(GLOB.master_mode == "Extended") + allowed_z_levels.Add(2,5,6) // экстовая добавка: станционный, шахта, ксено + return allowed_z_levels /obj/item/implant/anchor/implant(mob/living/target, mob/user, silent, force) . = ..() - - RegisterSignal(target, COMSIG_LIVING_LIFE, .proc/on_life) - var/base_z_level = target.z - - return base_z_level - -/obj/item/implant/anchor/proc/on_life(mob/living/owner, base_z_level) - if((owner.z != base_z_level) && (owner.z != 1)) // не сектор спавна и не сектор цк? - to_chat(owner, "It hurts!") + RegisterSignal(imp_in, COMSIG_LIVING_LIFE, .proc/on_life) + ADD_TRAIT(target, TRAIT_ANCHOR, "implant") + target.sec_hud_set_implants() + return TRUE + + +/obj/item/implant/anchor/proc/on_life(mob/living/owner) + if(!(allowed_z_levels)) + allowed_z_levels = Initialize() +// to_chat(owner, "allowed_z_levels [allowed_z_levels], owner.z [owner.z] ") +// to_chat(owner, "Tick") + if(!(owner.z in allowed_z_levels)) + to_chat(owner, "It hurts!") owner.adjustBruteLoss(0.5, FALSE) //Provides slow harassing for both brute and burn damage. owner.adjustFireLoss(0.5, FALSE) - to_chat(owner, "I don`t feeling well leaving my local sector.") + to_chat(owner, "I don`t feeling well leaving my local sector.")