diff --git a/baystation12.dme b/baystation12.dme index e47a050e78df7..e49f506a2f4e7 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -1589,6 +1589,7 @@ #include "code\modules\clothing\under\accessories\fire_overpants.dm" #include "code\modules\clothing\under\accessories\flannel_shirt.dm" #include "code\modules\clothing\under\accessories\ftu_pin.dm" +#include "code\modules\clothing\under\accessories\goggle_mods.dm" #include "code\modules\clothing\under\accessories\hawaii.dm" #include "code\modules\clothing\under\accessories\helmcover.dm" #include "code\modules\clothing\under\accessories\helmet_decor.dm" diff --git a/code/__defines/items_clothing.dm b/code/__defines/items_clothing.dm index 19a095efe35d1..8e291ddb92134 100644 --- a/code/__defines/items_clothing.dm +++ b/code/__defines/items_clothing.dm @@ -35,7 +35,9 @@ #define ACCESSORY_SLOT_ARMOR_M "Misc armor" #define ACCESSORY_SLOT_HELM_C "Helmet cover" #define ACCESSORY_SLOT_HELM_D "Helmet decor" - +#define ACCESSORY_SLOT_VISOR "Helmet visor" +#define ACCESSORY_SLOT_VISION "Vision modification" +#define ACCESSORY_SLOT_HUD "HUD modification" #define ACCESSORY_REMOVABLE FLAG(0) #define ACCESSORY_HIDDEN FLAG(1) diff --git a/code/game/objects/items/weapons/ecigs.dm b/code/game/objects/items/weapons/ecigs.dm index c2c052459f9d6..0efe98e9c63bc 100644 --- a/code/game/objects/items/weapons/ecigs.dm +++ b/code/game/objects/items/weapons/ecigs.dm @@ -2,7 +2,7 @@ name = "electronic cigarette" desc = "Device with modern approach to smoking." icon = 'icons/obj/ecig.dmi' - var/active = 0 + active = 0 var/obj/item/cell/cigcell var/cartridge_type = /obj/item/reagent_containers/ecig_cartridge/med_nicotine var/obj/item/reagent_containers/ecig_cartridge/ec_cartridge diff --git a/code/modules/client/client_color.dm b/code/modules/client/client_color.dm index dfdf0cf23b801..13f30cbba4af8 100644 --- a/code/modules/client/client_color.dm +++ b/code/modules/client/client_color.dm @@ -93,6 +93,10 @@ client_color = list(0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.05, 0.05, 0.05) priority = 300 +/datum/client_color/nvg + client_color = list(0.2, 0.2, 0.2, 0.2, 0.5, 0.5, 0.2, 0.3, 0.5) + priority = 200 + //Disabilities, could be hooked to brain damage or chargen if so desired. /datum/client_color/deuteranopia client_color = list(0.47,0.38,0.15, 0.54,0.31,0.15, 0,0.3,0.7) diff --git a/code/modules/clothing/_clothing.dm b/code/modules/clothing/_clothing.dm index 824f1feae0c9c..7dca47e1842fa 100644 --- a/code/modules/clothing/_clothing.dm +++ b/code/modules/clothing/_clothing.dm @@ -1,8 +1,10 @@ /obj/item/clothing name = "clothing" siemens_coefficient = 0.9 - var/flash_protection = FLASH_PROTECTION_NONE // Sets the item's level of flash protection. - var/tint = TINT_NONE // Sets the item's level of visual impairment tint. + /// Sets the item's level of flash protection. + var/flash_protection = FLASH_PROTECTION_NONE + /// Sets the item's level of visual impairment tint. + var/tint = TINT_NONE var/list/species_restricted = list( "exclude", SPECIES_NABBER @@ -15,8 +17,27 @@ var/ironed_state = WRINKLES_DEFAULT var/smell_state = SMELL_DEFAULT var/volume_multiplier = 1 - - var/move_trail = /obj/effect/decal/cleanable/blood/tracks/footprints // if this item covers the feet, the footprints it should leave + var/hud_type + var/vision_flags = 0 + /// Base human is 2 + var/darkness_view = 0 + var/see_invisible = -1 + var/light_protection = 0 + /// if the clothing should be disrupted by EMP + var/electric = FALSE + /// used by goggles and HUDs + var/toggleable = FALSE + var/active = TRUE + var/activation_sound + /// set this if you want a sound on deactivation + var/deactivation_sound + /// set these in initialize if you want messages other than about the optical matrix + var/toggle_on_message + var/toggle_off_message + var/off_state = null + + /// if this item covers the feet, the footprints it should leave + var/move_trail = /obj/effect/decal/cleanable/blood/tracks/footprints /obj/item/clothing/Initialize() @@ -249,10 +270,6 @@ BLIND // can't see anything w_class = ITEM_SIZE_SMALL body_parts_covered = EYES slot_flags = SLOT_EYES - var/vision_flags = 0 - var/darkness_view = 0//Base human is 2 - var/see_invisible = -1 - var/light_protection = 0 sprite_sheets = list( SPECIES_VOX = 'icons/mob/species/vox/onmob_eyes_vox.dmi', SPECIES_VOX_ARMALIS = 'icons/mob/species/vox/onmob_eyes_vox_armalis.dmi', @@ -265,11 +282,78 @@ BLIND // can't see anything else return icon_state -/obj/item/clothing/glasses/update_clothing_icon() +/obj/item/clothing/update_clothing_icon() if (ismob(src.loc)) var/mob/M = src.loc M.update_inv_glasses() +/obj/item/clothing/proc/activate(mob/user) + if (toggleable && !active) + active = TRUE + flash_protection = initial(flash_protection) + tint = initial(tint) + if (user) + user.update_inv_glasses() + user.update_action_buttons() + if (activation_sound) + sound_to(user, activation_sound) + if (toggle_on_message) + to_chat(user, SPAN_NOTICE(toggle_on_message)) + else + to_chat(user, "You activate the optical matrix on \the [src].") + + update_icon() + update_clothing_icon() + update_vision() + +/obj/item/clothing/proc/deactivate(mob/user, manual = TRUE) + if (toggleable && active) + active = FALSE + if (user) + if (manual) + if (toggle_off_message) + to_chat(user, toggle_off_message) + else + to_chat(user, "You deactivate the optical matrix on \the [src].") + if (deactivation_sound) + sound_to(user, deactivation_sound) + user.update_inv_glasses() + user.update_action_buttons() + + flash_protection = FLASH_PROTECTION_NONE + tint = TINT_NONE + update_icon() + update_clothing_icon() + update_vision() + +/obj/item/clothing/emp_act(severity) + if (electric && active) + if (istype(src.loc, /mob/living/carbon/human)) + var/mob/living/carbon/human/M = src.loc + if (M.glasses != src) + to_chat(M, SPAN_DANGER("\The [name] malfunction[gender != PLURAL ? "s":""], releasing a small spark.")) + else + M.eye_blind = 2 + M.eye_blurry = 4 + to_chat(M, SPAN_DANGER("\The [name] malfunction[gender != PLURAL ? "s":""], blinding you!")) + // Don't cure being nearsighted + if (!(M.disabilities & NEARSIGHTED)) + M.disabilities |= NEARSIGHTED + spawn(100) + M.disabilities &= ~NEARSIGHTED + if (toggleable) + deactivate(M, FALSE) + ..() + +/obj/item/clothing/inherit_custom_item_data(datum/custom_item/citem) + . = ..() + if (toggleable) + if (citem.additional_data["icon_on"]) + set_icon_state(citem.additional_data["icon_on"]) + if (citem.additional_data["icon_off"]) + off_state = citem.additional_data["icon_off"] + + /////////////////////////////////////////////////////////////////////// //Gloves /obj/item/clothing/gloves diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 0e9f4c8b7f8c1..1c227929cdce9 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -6,19 +6,14 @@ SPECIES_VOX_ARMALIS = 'icons/mob/species/vox/onmob_eyes_vox_armalis.dmi', SPECIES_UNATHI = 'icons/mob/species/unathi/onmob_eyes_unathi.dmi' ) - var/hud_type var/prescription = FALSE - var/toggleable = FALSE - var/off_state = "degoggles" - var/active = TRUE - var/activation_sound = 'sound/items/goggles_charge.ogg' - var/deactivation_sound // set this if you want a sound on deactivation + off_state = "degoggles" + activation_sound = 'sound/items/goggles_charge.ogg' + deactivation_sound = null var/obj/screen/overlay = null var/obj/item/clothing/glasses/hud/hud = null // Hud glasses, if any - var/electric = FALSE //if the glasses should be disrupted by EMP + electric = FALSE //if the glasses should be disrupted by EMP - var/toggle_on_message //set these in initialize if you want messages other than about the optical matrix - var/toggle_off_message /obj/item/clothing/glasses/Initialize() . = ..() @@ -35,64 +30,6 @@ /obj/item/clothing/glasses/needs_vision_update() return ..() || overlay || vision_flags || see_invisible || darkness_view -/obj/item/clothing/glasses/proc/activate(mob/user) - if(toggleable && !active) - var/datum/extension/base_icon_state/BIS = get_extension(src, /datum/extension/base_icon_state) - active = TRUE - icon_state = BIS.base_icon_state - flash_protection = initial(flash_protection) - tint = initial(tint) - if(user) - user.update_inv_glasses() - user.update_action_buttons() - if(activation_sound) - sound_to(user, activation_sound) - if(toggle_on_message) - to_chat(user, toggle_on_message) - else - to_chat(user, "You activate the optical matrix on \the [src].") - - update_clothing_icon() - update_vision() - -/obj/item/clothing/glasses/proc/deactivate(mob/user, manual = TRUE) - if(toggleable && active) - active = FALSE - icon_state = off_state - if(user) - if(manual) - if(toggle_off_message) - to_chat(user, toggle_off_message) - else - to_chat(user, "You deactivate the optical matrix on \the [src].") - if(deactivation_sound) - sound_to(user, deactivation_sound) - user.update_inv_glasses() - user.update_action_buttons() - - flash_protection = FLASH_PROTECTION_NONE - tint = TINT_NONE - update_clothing_icon() - update_vision() - -/obj/item/clothing/glasses/emp_act(severity) - if(electric && active) - if(istype(src.loc, /mob/living/carbon/human)) - var/mob/living/carbon/human/M = src.loc - if(M.glasses != src) - to_chat(M, SPAN_DANGER("\The [name] malfunction[gender != PLURAL ? "s":""], releasing a small spark.")) - else - M.eye_blind = 2 - M.eye_blurry = 4 - to_chat(M, SPAN_DANGER("\The [name] malfunction[gender != PLURAL ? "s":""], blinding you!")) - // Don't cure being nearsighted - if(!(M.disabilities & NEARSIGHTED)) - M.disabilities |= NEARSIGHTED - spawn(100) - M.disabilities &= ~NEARSIGHTED - if(toggleable) - deactivate(M, FALSE) - ..() /obj/item/clothing/glasses/attack_self(mob/user) if(toggleable && !user.incapacitated()) @@ -101,14 +38,6 @@ else activate(user) -/obj/item/clothing/glasses/inherit_custom_item_data(datum/custom_item/citem) - . = ..() - if(toggleable) - if(citem.additional_data["icon_on"]) - set_icon_state(citem.additional_data["icon_on"]) - if(citem.additional_data["icon_off"]) - off_state = citem.additional_data["icon_off"] - /obj/item/clothing/glasses/meson name = "meson goggles" desc = "Used for seeing walls, floors, and stuff through anything." @@ -126,6 +55,49 @@ . = ..() overlay = GLOB.global_hud.meson +/obj/item/clothing/glasses/ballistic + name = "ballistic goggles" + desc = "A pair of goggles designed to protect the wearer's eyes from shrapnel." + icon_state = "ballistic" + origin_tech = list(TECH_COMBAT = 2) + siemens_coefficient = 0.6 + armor = list( + melee = ARMOR_MELEE_MINOR, + bullet = ARMOR_BALLISTIC_MINOR, + bomb = ARMOR_BOMB_MINOR + ) + action_button_name = "Toggle Attachments" + valid_accessory_slots = list(ACCESSORY_SLOT_VISION, ACCESSORY_SLOT_HUD) + restricted_accessory_slots = list(ACCESSORY_SLOT_VISION, ACCESSORY_SLOT_HUD) + + +/obj/item/clothing/glasses/ballistic/attack_self(mob/user) // добавить проверку на блекскрин чтобы челики без сознания не меняли модули + var/obj/item/clothing/accessory/glassesmod/choice = input(user, "Toggle which accessory?", "Attachment selection") as null|anything in accessories + if (choice.active) + choice.deactivate(user) + else + choice.activate(user) + + +/obj/item/clothing/glasses/ballistic/prescription + name = "prescription ballistic goggles" + desc = "A pair of goggles designed to protect the wearer's eyes from shrapnel. This set has corrective lenses." + prescription = 5 + + +/obj/item/clothing/glasses/ballistic/fake + name = "budget ballistic goggles" + desc = "A pair of goggles that probably won't protect the wearer's eyes from shrapnel. At least they make you feel more tacticool." + origin_tech = null + armor = null + + +/obj/item/clothing/glasses/ballistic/security + accessories = list(/obj/item/clothing/accessory/glassesmod/hud/security) + +/obj/item/clothing/glasses/ballistic/medic + accessories = list(/obj/item/clothing/accessory/glassesmod/hud/medical) + /obj/item/clothing/glasses/meson/prescription name = "meson goggles" desc = "Used for seeing walls, floors, and stuff through anything. This set has corrective lenses." diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index db5a1a5e6e291..3184edb31ecbc 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -6,8 +6,8 @@ slot_l_hand_str = "helmet", slot_r_hand_str = "helmet", ) - valid_accessory_slots = list(ACCESSORY_SLOT_HELM_C, ACCESSORY_SLOT_HELM_D) - restricted_accessory_slots = list(ACCESSORY_SLOT_HELM_C, ACCESSORY_SLOT_HELM_D) + valid_accessory_slots = list(ACCESSORY_SLOT_HELM_C, ACCESSORY_SLOT_HELM_D, ACCESSORY_SLOT_VISOR) + restricted_accessory_slots = list(ACCESSORY_SLOT_HELM_C, ACCESSORY_SLOT_HELM_D, ACCESSORY_SLOT_VISOR) item_flags = ITEM_FLAG_THICKMATERIAL body_parts_covered = HEAD armor = list( @@ -25,6 +25,21 @@ siemens_coefficient = 0.7 w_class = ITEM_SIZE_NORMAL species_restricted = list("exclude", SPECIES_NABBER, SPECIES_ADHERENT) + action_button_name = "Toggle visor" + + +/obj/item/clothing/head/helmet/attack_self(mob/user) //добавить проверку на сознание + for (var/obj/item/clothing/accessory/glassesmod/choice in accessories) + if (choice.active) + choice.deactivate(user) + else + choice.activate(user) + +/obj/item/clothing/head/helmet/dropped(mob/user) + . = ..() + user.remove_client_color(/datum/client_color/monochrome) + user.remove_client_color( /datum/client_color/nvg) + /obj/item/clothing/head/helmet/nt name = "\improper corporate security helmet" @@ -92,7 +107,7 @@ name = "ablative helmet" desc = "A helmet made from advanced materials which protects against concentrated energy weapons." icon_state = "helmet_reflect" - valid_accessory_slots = null + valid_accessory_slots = list(ACCESSORY_SLOT_VISOR) armor = list( melee = ARMOR_MELEE_SMALL, bullet = ARMOR_BALLISTIC_MINOR, @@ -105,7 +120,7 @@ name = "ballistic helmet" desc = "A helmet with reinforced plating to protect against ballistic projectiles." icon_state = "helmet_bulletproof" - valid_accessory_slots = null + valid_accessory_slots = list(ACCESSORY_SLOT_VISOR) armor = list( melee = ARMOR_MELEE_MINOR, bullet = ARMOR_BALLISTIC_AP, @@ -125,7 +140,7 @@ energy = ARMOR_ENERGY_RESISTANT, bomb = ARMOR_BOMB_PADDED ) - valid_accessory_slots = null + valid_accessory_slots = list(ACCESSORY_SLOT_VISOR) cold_protection = HEAD min_cold_protection_temperature = SPACE_HELMET_MIN_COLD_PROTECTION_TEMPERATURE siemens_coefficient = 0.5 @@ -262,3 +277,34 @@ rad = ARMOR_RAD_SMALL ) species_restricted = list(SPECIES_HUMAN) + +/obj/item/clothing/head/helmet/nvgmount + name = "model helmet" + desc = "A lightweight helmet made of cheap plastic, sporting fiducial marking stickers on either side. You doubt it will provide much protection." + icon_state = "nvgmount" + valid_accessory_slots = list(ACCESSORY_SLOT_VISOR, ACCESSORY_SLOT_HELM_D) + restricted_accessory_slots = list(ACCESSORY_SLOT_VISOR, ACCESSORY_SLOT_HELM_D) + armor = list( + melee = ARMOR_MELEE_MINOR, + ) + +/obj/item/clothing/head/helmet/nvgmount/nvg + accessories = list(/obj/item/clothing/accessory/glassesmod/nvg) + +/obj/item/clothing/head/helmet/nvgmount/thermal + accessories = list(/obj/item/clothing/accessory/glassesmod/thermal) + +/obj/item/clothing/head/helmet/old_commonwealth + name = "old army helmet" + desc = "A worn helmet that appears to have been the property of some spacefaring armed force, many years ago." + accessories = list(/obj/item/clothing/accessory/helmet_cover/green, /obj/item/clothing/accessory/glassesmod/nvg) + +/obj/item/clothing/head/helmet/old_confederation + name = "old army helmet" + desc = "A worn helmet that appears to have been the property of some spacefaring armed force, many years ago." + accessories = list(/obj/item/clothing/accessory/helmet_cover/tan, /obj/item/clothing/accessory/glassesmod/nvg) + +/obj/item/clothing/head/helmet/old_special_ops + name = "old army helmet" + desc = "A worn helmet that appears to have been the property of some spacefaring armed force, many years ago." + accessories = list(/obj/item/clothing/accessory/glassesmod/thermal) diff --git a/code/modules/clothing/masks/miscellaneous.dm b/code/modules/clothing/masks/miscellaneous.dm index 0efef2d84588d..6e010c7489e3f 100644 --- a/code/modules/clothing/masks/miscellaneous.dm +++ b/code/modules/clothing/masks/miscellaneous.dm @@ -143,7 +143,7 @@ body_parts_covered = FACE|EYES action_button_name = "Toggle MUI" origin_tech = list(TECH_DATA = 5, TECH_ENGINEERING = 5) - var/active = FALSE + active = FALSE var/mob/observer/eye/cameranet/eye /obj/item/clothing/mask/ai/New() diff --git a/code/modules/clothing/suits/armor.dm b/code/modules/clothing/suits/armor.dm index 1e82486ed56c9..f49896df44dd9 100644 --- a/code/modules/clothing/suits/armor.dm +++ b/code/modules/clothing/suits/armor.dm @@ -96,7 +96,7 @@ /obj/item/clothing/suit/armor/reactive name = "reactive teleport armor" desc = "Someone separated our Chief Science Officer from their own head!" - var/active = 0.0 + active = 0.0 icon_state = "reactiveoff" blood_overlay_type = "armor" armor = null diff --git a/code/modules/clothing/under/accessories/goggle_mods.dm b/code/modules/clothing/under/accessories/goggle_mods.dm new file mode 100644 index 0000000000000..f185c6f9a8a2c --- /dev/null +++ b/code/modules/clothing/under/accessories/goggle_mods.dm @@ -0,0 +1,80 @@ +/obj/item/clothing/accessory/glassesmod + abstract_type = /obj/item/clothing/accessory/glassesmod + name = "base glasses mod" + desc = "A basic modification for ballistic goggles." + icon_override = 'icons/mob/onmob/onmob_goggle_mod.dmi' + var/obj/screen/overlay = null + var/thermals = FALSE + var/nvg = FALSE + body_location = EYES + accessory_icons = list( + slot_tie_str = 'icons/mob/onmob/onmob_goggle_mod.dmi', + slot_goggles_str = 'icons/mob/onmob/onmob_goggle_mod.dmi', + slot_head_str = 'icons/mob/onmob/onmob_goggle_mod.dmi' + ) + sprite_sheets = list( + SPECIES_UNATHI = 'icons/mob/species/unathi/onmob_goggle_mod_unathi.dmi', + SPECIES_VOX = 'icons/mob/species/vox/onmob_goggle_mod_vox.dmi', + SPECIES_HUMAN = 'icons/mob/onmob/onmob_goggle_mod.dmi' + ) + activation_sound = 'sound/items/goggles_charge.ogg' + +/obj/item/clothing/accessory/glassesmod/proc/process_hud(mob/M) + return + +/obj/item/clothing/accessory/glassesmod/thermal + name = "thermal sights" + desc = "An older set of thermal vision goggles, modified to attach to a helmet." + icon_state = "thermals" + slot = ACCESSORY_SLOT_VISOR + vision_flags = SEE_MOBS + see_invisible = SEE_INVISIBLE_NOLIGHTING + toggleable = TRUE + electric = TRUE + thermals = TRUE + tint = TINT_HEAVY + deactivation_sound = 'sound/items/metal_clicking_4.ogg' + + +/obj/item/clothing/accessory/glassesmod/nvg + name = "light-enhancing sights" + desc = "An older set of light enhancing goggles, modified to attach to a helmet." + icon_state = "nvg" + slot = ACCESSORY_SLOT_VISOR + see_invisible = SEE_INVISIBLE_NOLIGHTING + toggleable = TRUE + off_state = "nvgoff" + electric = TRUE + nvg = TRUE + darkness_view = 4 + tint = TINT_MODERATE + deactivation_sound = 'sound/items/metal_clicking_4.ogg' + +/obj/item/clothing/accessory/glassesmod/hud/process_hud(mob/M) + return + +/obj/item/clothing/accessory/glassesmod/hud/security + name = "security HUD attachment" + desc = "An attachable security HUD for ballistic goggles." + icon_state = "sechud" + slot = ACCESSORY_SLOT_HUD + hud_type = HUD_SECURITY + toggleable = TRUE + off_state = "hudoff" + + +/obj/item/clothing/accessory/glassesmod/hud/security/process_hud(mob/M) + process_sec_hud(M, 1) + + +/obj/item/clothing/accessory/glassesmod/hud/medical + name = "medical HUD attachment" + desc = "An attachable security HUD for ballistic goggles." + icon_state = "medhud" + slot = ACCESSORY_SLOT_HUD + hud_type = HUD_MEDICAL + toggleable = TRUE + off_state = "hudoff" + +/obj/item/clothing/accessory/glassesmod/hud/medical/process_hud(mob/M) + process_med_hud(M, 1) diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index e417e6e9c282e..26a33f7e76e78 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -350,12 +350,18 @@ var/obj/item/clothing/glasses/G = H.glasses var/obj/item/card/id/ID = M.GetIdCard() var/obj/item/organ/internal/augment/active/hud/AUG + var/obj/item/clothing/accessory/glassesmod/hud/ACC for (var/obj/item/organ/internal/augment/active/hud/A in H.internal_organs) // Check for installed and active HUD implants if (A.hud_type & hudtype) AUG = A break - return ((istype(G) && ((G.hud_type & hudtype) || (G.hud && (G.hud.hud_type & hudtype)))) && G.check_access(ID)) || AUG?.active && AUG.check_access(ID) + for (var/obj/item/clothing/accessory/glassesmod/hud/C in G.accessories) // Check for HUD accessories on worn eyewear + if (C.hud_type & hudtype) + ACC = C + break + + return ((istype(G) && ((G.hud_type & hudtype) || (G.hud && (G.hud.hud_type & hudtype)))) && G.check_access(ID)) || AUG?.active && AUG.check_access(ID) || ACC?.active else if(istype(M, /mob/living/silicon/robot)) var/mob/living/silicon/robot/R = M for(var/obj/item/borg/sight/sight in list(R.module_state_1, R.module_state_2, R.module_state_3)) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index fec9cb3337909..77ffe52a3cf90 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -65,6 +65,8 @@ add_clothing_protection(head) if(istype(src.glasses, /obj/item/clothing/glasses)) process_glasses(glasses) + if ((istype(src.glasses, /obj/item/clothing/glasses)) || (istype(src.head, /obj/item/clothing/head))) + process_visor(head, glasses) if(istype(src.wear_mask, /obj/item/clothing/mask)) add_clothing_protection(wear_mask) if(istype(back,/obj/item/rig)) @@ -90,6 +92,53 @@ add_clothing_protection(G) G.process_hud(src) +/mob/living/carbon/human/proc/process_visor(obj/item/clothing/head/H, obj/item/clothing/glasses/G) + remove_client_color(/datum/client_color/monochrome) + remove_client_color(/datum/client_color/nvg) + if (H) + for(var/obj/item/clothing/accessory/glassesmod/M in H.accessories) + if (M?.active) + equipment_darkness_modifier += M.darkness_view + equipment_vision_flags |= M.vision_flags + equipment_light_protection += M.light_protection + if (M.overlay) + equipment_overlays |= M.overlay + if (M.see_invisible >= 0) + if (equipment_see_invis) + equipment_see_invis = min(equipment_see_invis, M.see_invisible) + else + equipment_see_invis = M.see_invisible + if (M.thermals) + //this breaks if more than one thermal accessory is worn at once + add_client_color(/datum/client_color/monochrome) + if (M.nvg) + //this breaks if more than one nvg accessory is worn at once + add_client_color(/datum/client_color/nvg) + add_clothing_protection(M) + M.process_hud(src) + if (G) + for(var/obj/item/clothing/accessory/glassesmod/M in G.accessories) + if (M?.active) + equipment_darkness_modifier += M.darkness_view + equipment_vision_flags |= M.vision_flags + equipment_light_protection += M.light_protection + if (M.overlay) + equipment_overlays |= M.overlay + if (M.see_invisible >= 0) + if (equipment_see_invis) + equipment_see_invis = min(equipment_see_invis, M.see_invisible) + else + equipment_see_invis = M.see_invisible + if (M.thermals) + //this breaks if more than one thermal accessory is worn at once + add_client_color(/datum/client_color/monochrome) + if (M.nvg) + //this breaks if more than one nvg accessory is worn at once + add_client_color(/datum/client_color/nvg) + add_clothing_protection(M) + M.process_hud(src) + src.update_client_color() + /mob/living/carbon/human/proc/process_rig(var/obj/item/rig/O) if(O.visor && O.visor.active && O.visor.vision && O.visor.vision.glasses && (!O.helmet || (head && O.helmet == head))) process_glasses(O.visor.vision.glasses) diff --git a/code/modules/mob/observer/ghost/ghost.dm b/code/modules/mob/observer/ghost/ghost.dm index 2c4e871a23c55..e128881cdd44d 100644 --- a/code/modules/mob/observer/ghost/ghost.dm +++ b/code/modules/mob/observer/ghost/ghost.dm @@ -137,6 +137,9 @@ Works together with spawning an observer, noted above. return 1 /mob/proc/ghostize(var/can_reenter_corpse = CORPSE_CAN_REENTER) + //remove color filters + for(var/datum/client_color/colors in client_colors) + remove_client_color(colors) // Are we the body of an aghosted admin? If so, don't make a ghost. if(teleop && istype(teleop, /mob/observer/ghost)) var/mob/observer/ghost/G = teleop @@ -150,10 +153,10 @@ Works together with spawning an observer, noted above. ghost.key = key if(ghost.client && !ghost.client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed. ghost.verbs -= /mob/observer/ghost/verb/toggle_antagHUD // Poor guys, don't know what they are missing! + ghost.update_client_color() return ghost /mob/observer/ghostize() // Do not create ghosts of ghosts. - /* This is the proc mobs get to turn into a ghost. Forked from ghostize due to compatibility issues. */ @@ -161,6 +164,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "OOC" set name = "Ghost" set desc = "Relinquish your life and enter the land of the dead." + if (admin_paralyzed) + to_chat(usr, SPAN_DEBUG("You cannot ghost while admin paralyzed.")) + return + + //remove color filters + for(var/datum/client_color/colors in client_colors) + remove_client_color(colors) + if(stat == DEAD) announce_ghost_joinleave(ghostize(1)) @@ -184,6 +195,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if (ghost) ghost.timeofdeath = world.time // Because the living mob won't have a time of death and we want the respawn timer to work properly. announce_ghost_joinleave(ghost) + ghost.update_client_color() /mob/observer/ghost/can_use_hands() return 0 /mob/observer/ghost/is_active() return 0 diff --git a/customs/code/foler.dm b/customs/code/foler.dm index 0b410cebf5abc..d1cf8761f54a7 100644 --- a/customs/code/foler.dm +++ b/customs/code/foler.dm @@ -6,3 +6,10 @@ startswith = list( /obj/item/reagent_containers/food/snacks/spider/cooked = 6 ) + +/obj/item/clothing/head/foler + name = "Phoenix group beret" + desc = "A black beret adorned with the gold crest of Phoenix Group IICSCG. For infantryman that are more inclined towards style than safety.Strangely, the beret smells of blood, gunpowder and death." + icon_state = "beret_phoenix_undead" + icon = 'customs/icons/obj/custom_items_obj.dmi' + item_icons = list(slot_head_str = 'customs/icons/mob/custom_items_mob.dmi') \ No newline at end of file diff --git a/customs/icons/mob/custom_items_mob.dmi b/customs/icons/mob/custom_items_mob.dmi index 2edfd7299eb75..8a2d2e64b8027 100644 Binary files a/customs/icons/mob/custom_items_mob.dmi and b/customs/icons/mob/custom_items_mob.dmi differ diff --git a/customs/icons/obj/custom_items_obj.dmi b/customs/icons/obj/custom_items_obj.dmi index 01dec3bc39fbc..f8525f0f703c1 100644 Binary files a/customs/icons/obj/custom_items_obj.dmi and b/customs/icons/obj/custom_items_obj.dmi differ diff --git a/icons/mob/onmob/onmob_accessories.dmi b/icons/mob/onmob/onmob_accessories.dmi index cba8d54825860..03dd97b6f1edf 100644 Binary files a/icons/mob/onmob/onmob_accessories.dmi and b/icons/mob/onmob/onmob_accessories.dmi differ diff --git a/icons/mob/onmob/onmob_eyes.dmi b/icons/mob/onmob/onmob_eyes.dmi index 313c672dbbeb5..b0d78f2bc8b9a 100644 Binary files a/icons/mob/onmob/onmob_eyes.dmi and b/icons/mob/onmob/onmob_eyes.dmi differ diff --git a/icons/mob/onmob/onmob_goggle_mod.dmi b/icons/mob/onmob/onmob_goggle_mod.dmi new file mode 100644 index 0000000000000..337d994410ec5 Binary files /dev/null and b/icons/mob/onmob/onmob_goggle_mod.dmi differ diff --git a/icons/mob/onmob/onmob_head.dmi b/icons/mob/onmob/onmob_head.dmi index 98982e95cea83..6af5ff8deb466 100644 Binary files a/icons/mob/onmob/onmob_head.dmi and b/icons/mob/onmob/onmob_head.dmi differ diff --git a/icons/mob/species/unathi/onmob_eyes_unathi.dmi b/icons/mob/species/unathi/onmob_eyes_unathi.dmi index a328c52db726c..4d574da400e79 100644 Binary files a/icons/mob/species/unathi/onmob_eyes_unathi.dmi and b/icons/mob/species/unathi/onmob_eyes_unathi.dmi differ diff --git a/icons/mob/species/unathi/onmob_goggle_mod_unathi.dmi b/icons/mob/species/unathi/onmob_goggle_mod_unathi.dmi new file mode 100644 index 0000000000000..d13409990dc0d Binary files /dev/null and b/icons/mob/species/unathi/onmob_goggle_mod_unathi.dmi differ diff --git a/icons/mob/species/vox/onmob_eyes_vox.dmi b/icons/mob/species/vox/onmob_eyes_vox.dmi index 1e07612ce10b9..a9d3918d1402a 100644 Binary files a/icons/mob/species/vox/onmob_eyes_vox.dmi and b/icons/mob/species/vox/onmob_eyes_vox.dmi differ diff --git a/icons/mob/species/vox/onmob_goggle_mod_vox.dmi b/icons/mob/species/vox/onmob_goggle_mod_vox.dmi new file mode 100644 index 0000000000000..8aad922d0a9e4 Binary files /dev/null and b/icons/mob/species/vox/onmob_goggle_mod_vox.dmi differ diff --git a/icons/obj/clothing/obj_accessories.dmi b/icons/obj/clothing/obj_accessories.dmi index 5c1219eb15518..5a9e8e70cbc22 100644 Binary files a/icons/obj/clothing/obj_accessories.dmi and b/icons/obj/clothing/obj_accessories.dmi differ diff --git a/icons/obj/clothing/obj_eyes.dmi b/icons/obj/clothing/obj_eyes.dmi index 54a28d70dc1a1..f00c2bac80db8 100644 Binary files a/icons/obj/clothing/obj_eyes.dmi and b/icons/obj/clothing/obj_eyes.dmi differ diff --git a/icons/obj/clothing/obj_head.dmi b/icons/obj/clothing/obj_head.dmi index ab627fdb0ef16..f16831ea4a32f 100644 Binary files a/icons/obj/clothing/obj_head.dmi and b/icons/obj/clothing/obj_head.dmi differ diff --git a/maps/torch/job/corporate_jobs.dm b/maps/torch/job/corporate_jobs.dm index 6f1ec4d3b3022..d9d298f2eefea 100644 --- a/maps/torch/job/corporate_jobs.dm +++ b/maps/torch/job/corporate_jobs.dm @@ -94,8 +94,6 @@ /datum/computer_file/program/atmos_control, /datum/computer_file/program/rcon_console) - intro_music = list('proxima/sound/intro/synth1.ogg') - /datum/job/synthetic/post_equip_rank(var/mob/person, var/alt_title) var/mob/living/carbon/H = person var/obj/item/organ/internal/posibrain/posi = H.internal_organs_by_name[BP_POSIBRAIN] diff --git a/maps/torch/job/security_jobs.dm b/maps/torch/job/security_jobs.dm index d1b71c3aeb7ab..4f6d171d3a362 100644 --- a/maps/torch/job/security_jobs.dm +++ b/maps/torch/job/security_jobs.dm @@ -110,7 +110,7 @@ software_on_spawn = list(/datum/computer_file/program/digitalwarrant, /datum/computer_file/program/camera_monitor) - intro_music = list('proxima/sound/intro/detective1.ogg') + /datum/job/detective/equip(var/mob/living/carbon/human/H) if(H.mind?.role_alt_title == "Psionic Sleuth") @@ -171,8 +171,6 @@ software_on_spawn = list(/datum/computer_file/program/digitalwarrant, /datum/computer_file/program/camera_monitor) - intro_music = list('proxima/sound/intro/sec1.ogg') - /datum/job/officer/get_description_blurb() return "Вы - Каптенармус. Ваша задача - поддерживать порядок на судне и защищать его от различных угроз. Вы подчиняетесь Главе службы безопасности и Смотрителю. \ Проводите задержания, опрашивайте свидетелей. От вас ожидается хорошее знание закона ЦПСС и основных регуляций судна." diff --git a/proxima/code/game/items/weapons/gun/projectiles/bosnia.dm b/proxima/code/game/items/weapons/gun/projectiles/bosnia.dm index d45288c5ec85d..b4678d34acf65 100644 --- a/proxima/code/game/items/weapons/gun/projectiles/bosnia.dm +++ b/proxima/code/game/items/weapons/gun/projectiles/bosnia.dm @@ -15,7 +15,7 @@ /obj/item/gun/projectile/pistol/goodman/on_update_icon() ..() - icon_state = (ammo_magazine)? "adhomian_heavy_pistol" : "adhomian_heavy_pistol-e" + icon_state = (ammo_magazine)? "m8" : "m8-e" /obj/item/gun/projectile/pistol/magnum_pistol/sol name = "magnum pistol" @@ -106,9 +106,89 @@ slot_flags = SLOT_BACK caliber = CALIBER_PISTOL_ANTIQUE ammo_type = /obj/item/ammo_casing/pistol/throwback - load_method = SINGLE_CASING|SPEEDLOADER + load_method = SINGLE_CASING max_shells = 10 accuracy = 3 scope_zoom = 5 scoped_accuracy = -2 wielded_item_state = "heavysniper-wielded" + + +/obj/item/gun/projectile/pistol/police + name = "military police pistol" + desc = "The Hephaestus Industries P20 - a mass produced kinetic sidearm in widespread service with the SCGDF." + caliber = CALIBER_PISTOL + magazine_type = /obj/item/ammo_magazine/pistol + icon = 'proxima/icons/obj/guns/guns_onyx.dmi' + icon_state = "VP78" + item_state = "gun" + item_icons = list( + slot_r_hand_str = 'proxima/icons/mob/onmob/items/guns_r_default.dmi', + slot_l_hand_str = 'proxima/icons/mob/onmob/items/guns_l_default.dmi', + ) + origin_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 2) + fire_delay = 4 + +/obj/item/gun/projectile/pistol/police/on_update_icon() + ..() + icon_state = (ammo_magazine)? "VP78" : "VP78-e" + +/obj/item/gun/projectile/pistol/police/wood + name = "military police pistol" + desc = "The Hephaestus Industries P20 - a mass produced kinetic sidearm in widespread service with the SCGDF." + caliber = CALIBER_PISTOL + magazine_type = /obj/item/ammo_magazine/pistol + icon = 'proxima/icons/obj/guns/guns_onyx.dmi' + icon_state = "VP78wood" + item_state = "gun" + fire_delay = 4 + +/obj/item/gun/projectile/pistol/police/on_update_icon() + ..() + icon_state = (ammo_magazine)? "VP78wood" : "VP78wood-e" + +/obj/item/gun/projectile/pistol/police/tactical + name = "military police pistol" + desc = "The Hephaestus Industries P20 - a mass produced kinetic sidearm in widespread service with the SCGDF." + caliber = CALIBER_PISTOL + magazine_type = /obj/item/ammo_magazine/pistol + icon = 'proxima/icons/obj/guns/guns_onyx.dmi' + icon_state = "VP78tactic" + item_state = "gun" + fire_delay = 4 + +/obj/item/gun/projectile/pistol/police/on_update_icon() + ..() + icon_state = (ammo_magazine)? "VP78tactic" : "VP78tactic-e" + +/obj/item/gun/projectile/automatic/selfdef + name = "self-defence machine pistol" + desc = "This is a submachine gun for self-defense that is loaded with a small magazine from a conventional pistol" + icon_state = "mpistolen" + item_state = "webley" + icon = 'proxima/icons/obj/guns/aurora_port/coltauto.dmi' + item_icons = list( + slot_r_hand_str = 'proxima/icons/mob/onmob/items/guns_r_default.dmi', + slot_l_hand_str = 'proxima/icons/mob/onmob/items/guns_l_default.dmi', + ) + + caliber = CALIBER_PISTOL + origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 3) + slot_flags = SLOT_BELT + load_method = MAGAZINE + magazine_type = /obj/item/ammo_magazine/pistol + screen_shake = 0.5 //SMG + + firemodes = list( + list(mode_name = "semiauto", mode_desc = "Fire as fast as you can pull the trigger", burst=1, fire_delay=0, move_delay=null), + list(mode_name="2-round bursts", mode_desc = "Short, controlled bursts", burst=2, fire_delay=null, move_delay=2, one_hand_penalty=2), + list(mode_name="3-round bursts", mode_desc = "Short, controlled bursts", burst=3, fire_delay=null, move_delay=4, one_hand_penalty=3) + ) + + bulk = GUN_BULK_RIFLE - 1 + w_class = ITEM_SIZE_NORMAL + one_hand_penalty = 2 + +/obj/item/gun/projectile/automatic/bandit/on_update_icon() + ..() + icon_state = (ammo_magazine)? "mpistolen" : "mpistolen-empty" diff --git a/proxima/icons/mob/onmob/items/guns_l_default.dmi b/proxima/icons/mob/onmob/items/guns_l_default.dmi new file mode 100644 index 0000000000000..ff339db7cd290 Binary files /dev/null and b/proxima/icons/mob/onmob/items/guns_l_default.dmi differ diff --git a/proxima/icons/mob/onmob/items/guns_r_default.dmi b/proxima/icons/mob/onmob/items/guns_r_default.dmi new file mode 100644 index 0000000000000..d2155178dfad5 Binary files /dev/null and b/proxima/icons/mob/onmob/items/guns_r_default.dmi differ diff --git a/proxima/icons/obj/guns/guns_onyx.dmi b/proxima/icons/obj/guns/guns_onyx.dmi new file mode 100644 index 0000000000000..7a599debb8c6b Binary files /dev/null and b/proxima/icons/obj/guns/guns_onyx.dmi differ