diff --git a/hyperstation/code/__DEFINES/traits.dm b/hyperstation/code/__DEFINES/traits.dm new file mode 100644 index 000000000..2889d65b8 --- /dev/null +++ b/hyperstation/code/__DEFINES/traits.dm @@ -0,0 +1 @@ +#define SYTECH_SUIT_TRAIT "sysuit" \ No newline at end of file diff --git a/hyperstation/code/datums/actions/sysuit.dm b/hyperstation/code/datums/actions/sysuit.dm new file mode 100644 index 000000000..4c2697add --- /dev/null +++ b/hyperstation/code/datums/actions/sysuit.dm @@ -0,0 +1,2 @@ +/datum/action/item_action/initialize_sysuit + name = "Toggle SYTech Suit" \ No newline at end of file diff --git a/hyperstation/code/obj/SYSuit/abilities.dm b/hyperstation/code/obj/SYSuit/abilities.dm new file mode 100644 index 000000000..f5e20866c --- /dev/null +++ b/hyperstation/code/obj/SYSuit/abilities.dm @@ -0,0 +1,54 @@ +//Condensed location for abilities of the SYSuit +//Lord forgive me because I'm mostly referencing the ninja suit, and it's kind of messy. + + +/obj/item/clothing/under/syclothing/proc/lock_suit(mob/living/carbon/human/H) + //there is certainly a better way to do this, but again, referencing ninja code for now + //First we make the checks for correct clothing being present + if(!istype(H)) + return FALSE + if(!istype(H.head, /obj/item/clothing/head/sycap)) + to_chat(H, "ERROR: 100113 UNABLE TO LOCATE HEAD GEAR\nABORTING...") + return FALSE + if(!istype(H.glasses, /obj/item/clothing/glasses/hud/toggle/syvisor)) + to_chat(H, "ERROR: 90211 UNABLE TO LOCATE EYE GEAR\nABORTING...") + return FALSE + if(!istype(H.shoes, /obj/item/clothing/shoes/syshoes)) + to_chat(H, "ERROR: 122011 UNABLE TO LOCATE FOOT GEAR\nABORTING...") + return FALSE + if(!istype(H.gloves, /obj/item/clothing/gloves/sygloves)) + to_chat(H, "ERROR: 110223 UNABLE TO LOCATE HAND GEAR\nABORTING...") + return FALSE + //Now we prevent them from being removed + affecting = H + ADD_TRAIT(src, TRAIT_NODROP, SYTECH_SUIT_TRAIT) //apply to the suit itself + sy_cap = H.head + ADD_TRAIT(sy_cap, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + sy_visor = H.glasses + ADD_TRAIT(sy_visor, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + sy_shoes = H.shoes + ADD_TRAIT(sy_shoes, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + sy_gloves = H.gloves + ADD_TRAIT(sy_gloves, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + return TRUE + +//this hurts my eyes to look at +/obj/item/clothing/under/syclothing/proc/unlock_suit() + affecting = null + REMOVE_TRAIT(src, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + if(sy_cap) + REMOVE_TRAIT(sy_cap, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + if(sy_visor) + REMOVE_TRAIT(sy_visor, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + if(sy_shoes) + REMOVE_TRAIT(sy_shoes, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + if(sy_gloves) + REMOVE_TRAIT(sy_gloves, TRAIT_NODROP, SYTECH_SUIT_TRAIT) + +/obj/item/clothing/under/syclothing/ui_action_click(mob/user, action) + if(istype(action, /datum/action/item_action/initialize_sysuit)) + toggle_on_off() + return TRUE + if(!s_initialized) + to_chat(user, "ERROR: suit offline. Please activate suit.") + return FALSE \ No newline at end of file diff --git a/hyperstation/code/obj/SYSuit/main.dm b/hyperstation/code/obj/SYSuit/main.dm new file mode 100644 index 000000000..a4047d81f --- /dev/null +++ b/hyperstation/code/obj/SYSuit/main.dm @@ -0,0 +1,189 @@ +//This is the SYSuit, effectively a way for micros to dominate larger partners. Adminbus only right now, but will soon be purchasable via cargo with a preference to opt into, to prevent abuse. +//It will also have a charge function in the future and further balance passing. +//SYTech, pronounced as Sigh Tech; like what am I doing with my life? +//TO DO: make things a little more optimized and put everything under it's own "SY" obj, so we can get rid of some redundancy +//HEAVY WIP, expect this to be done soon! + +//The suit itself +/obj/item/clothing/under/syclothing + name = "SYTech Nanoweave suit" + desc = "A leading-grade suit developed by SYTech, with an internal dampening field to lessen accidents at micro scales. This one seems to be more skimpy and developed for bedroom-play, though." + icon = 'hyperstation/icons/obj/clothing/uniforms.dmi' + icon_state = "syclothing" + item_state = "syclothing" + //alternate_worn_icon = 'hyperstation/icons/mobs/uniforms.dmi' + armor = list("melee" = 90, "bullet" = 25, "laser" = 5, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 90) + do_not_cover_butt = TRUE + can_adjust = FALSE + + actions_types = list(/datum/action/item_action/initialize_sysuit) + + //var/obj/whateverkinkyitemiputhere + + //The whole getup needs to be worn! Variables referenced for later + var/obj/item/clothing/head/sycap/sy_cap + var/obj/item/clothing/glasses/hud/toggle/syvisor/sy_visor + var/obj/item/clothing/shoes/syshoes/sy_shoes + var/obj/item/clothing/gloves/sygloves/sy_gloves + + var/s_initialized = 0 //Suit starts off + var/s_coold = 0 //If the suit is on cooldown. Can be used to attach different cooldowns to abilities. Ticks down every second based on suit ntick(). + var/s_delay = 40//How fast the suit does certain things, lower is faster. Can be overridden in specific procs. Also determines adverse probability. + + var/s_busy = FALSE + var/mob/living/carbon/affecting //???? i hate byond + +/obj/item/clothing/under/syclothing/examine(mob/user) + . = ..() + if(s_initialized && user == affecting) + . += "All systems operational. Currently online and functioning." //Add more data to this later + +//The overcoat - removed cause i was a little too lazy to make a proper sprite for it lmao +/* +/obj/item/clothing/suit/toggle/sysuit + name = "SYTech Nanoweave overcoat" + desc = "An overcoat complimenting a SYTech suit. Can be worn in different ways, but is required for the function of the Nanoweave tech. This one is incredibly revealing, oddly enough." + icon = 'hyperstation/icons/obj/clothing/suits.dmi' + icon_state = "sysuit" + item_state = "sysuit" + //alternate_worn_icon = 'hyperstation/icons/mobs/suits.dmi' + togglename = "zipper" + body_parts_covered = CHEST|ARMS|LEGS + cold_protection = CHEST|GROIN|LEGS|ARMS + min_cold_protection_temperature = FIRE_SUIT_MIN_TEMP_PROTECT + strip_delay = 70 + equip_delay_other = 40 + max_integrity = 250 + resistance_flags = FLAMMABLE + armor = list("melee" = 90, "bullet" = 25, "laser" = 5, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 90) +*/ + + +//The cap +/obj/item/clothing/head/sycap + name = "SYTech Nanoweave cap" + desc = "A piece of clothing for a SYTech suit, allowing for extended control and breathability at micro scales via amplified hardlight respiration. This one seems to be modeled like a dominatrix cap, however." + icon = 'hyperstation/icons/obj/clothing/head.dmi' + icon_state = "sycap" + item_state = "sycap" + alternate_worn_icon = 'hyperstation/icons/mobs/head.dmi' + armor = list("melee" = 90, "bullet" = 25, "laser" = 5, "energy" = 15, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 90) + cold_protection = HEAD + min_cold_protection_temperature = FIRE_HELM_MIN_TEMP_PROTECT + strip_delay = 60 + resistance_flags = FLAMMABLE + + var/cloaked = 0 + +/obj/item/clothing/head/sycap/dropped() + src.icon_state = "sycap" + src.cloaked=0 + ..() + +/obj/item/clothing/head/sycap/verb/cloakcap() + set category = "Object" + set name = "Cloak hat" + + cloak(usr) + + +/obj/item/clothing/head/sycap/AltClick(mob/user) + . = ..() + if(!user.canUseTopic(src, BE_CLOSE, ismonkey(user))) + return + cloak(user) + return TRUE + + +/obj/item/clothing/head/sycap/proc/cloak(mob/user) + if(!user.incapacitated()) + src.cloaked = !src.cloaked + if(src.cloaked) + icon_state = "sycap_active" + to_chat(user, "You toggle the hat\'s cloaking.") + else + icon_state = "sycap" + to_chat(user, "You reveal the hat again.") + usr.update_inv_head() //so our mob-overlays update + +/obj/item/clothing/head/sycap/examine(mob/user) + . = ..() + . += "Alt-click the hat to toggle it\'s cloaking [cloaked ? "off" : "on"]." + +//The visor +/obj/item/clothing/glasses/hud/toggle/syvisor + name = "SYTech Analysis Visor" + desc = "A high-tech visor developed for SYTech suits, for helping internal processes lead augment decisions. This one looks like a pair of darkened sunglasses." + icon = 'hyperstation/icons/obj/clothing/glasses.dmi' + icon_state = "syvisor" + item_state = "trayson-meson" + flash_protect = 1 + tint = 1 + flags_cover = GLASSESCOVERSEYES + visor_flags_cover = GLASSESCOVERSEYES + alternate_worn_icon = 'hyperstation/icons/mobs/eyes.dmi' + hud_type = DATA_HUD_DIAGNOSTIC_ADVANCED + actions_types = list(/datum/action/item_action/switch_hud) + glass_colour_type = /datum/client_colour/glass_colour/purple + //effectively the same thing as a Zao HUD, but required for SYTech to work. More or less for flavor. + +/obj/item/clothing/glasses/hud/toggle/syvisor/attack_self(mob/user) + if(!ishuman(user)) + return + var/mob/living/carbon/human/wearer = user + if (wearer.glasses != src) + return + + if (hud_type) + var/datum/atom_hud/H = GLOB.huds[hud_type] + H.remove_hud_from(user) + + if (hud_type == DATA_HUD_DIAGNOSTIC_ADVANCED) + icon_state = "zaovisor_off" + item_state = "zaovisor_off" + hud_type = null + flash_protect = 0 + tint = 0 + change_glass_color(user, /datum/client_colour/glass_colour/white) + else + hud_type = DATA_HUD_DIAGNOSTIC_ADVANCED + icon_state = "syvisor" + item_state = "syvisor" + flash_protect = 1 + tint = 1 + change_glass_color(user, /datum/client_colour/glass_colour/purple) + + if (hud_type) + var/datum/atom_hud/H = GLOB.huds[hud_type] + H.add_hud_to(user) + user.update_inv_glasses() + + +//Shoes +/obj/item/clothing/shoes/syshoes + name = "SYTech Nanoweave platform heels" + desc = "A complimentary piece of SYTech apparel for gravity-altering applications. It even allows you to walk up walls! This pair takes on the appearance of skimpy, thigh-high latex boots with stilletos." + icon_state = "syshoes" + item_state = "syshoes" + icon = 'hyperstation/icons/obj/clothing/shoes.dmi' + //alternate_worn_icon = 'hyperstation/icons/mobs/feet.dmi' + +/obj/item/clothing/shoes/syshoes/Initialize() + . = ..() + AddComponent(/datum/component/squeak, list('sound/effects/footstep/highheel1.ogg' = 1,'sound/effects/footstep/highheel2.ogg' = 1), 20) + +//Gloves +/obj/item/clothing/gloves/sygloves + name = "SYTech Nanoweave sleeves" + desc = "A pair of enhanced sleeves, developed by SYTech. These allow remote and psionic levels of manipulation to the electrical currents inside living beings, or objects. Use with caution!" + icon_state = "sygloves" + item_state = "sygloves" + icon = 'hyperstation/icons/obj/clothing/gloves.dmi' + alternate_worn_icon = 'hyperstation/icons/mobs/gloves.dmi' + cold_protection = HANDS + min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT + heat_protection = HANDS + max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT + strip_delay = 120 + resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF + mutantrace_variation = NO_MUTANTRACE_VARIATION \ No newline at end of file diff --git a/hyperstation/code/obj/SYSuit/suit_initialize.dm b/hyperstation/code/obj/SYSuit/suit_initialize.dm new file mode 100644 index 000000000..7aa562194 --- /dev/null +++ b/hyperstation/code/obj/SYSuit/suit_initialize.dm @@ -0,0 +1,89 @@ +/obj/item/clothing/under/syclothing/proc/toggle_on_off() + if(s_busy) + to_chat(loc, "ERROR: You cannot use this function at this time.") + return FALSE + if(s_initialized) + deinitialize() + else + ninitialize() + . = TRUE + +/obj/item/clothing/under/syclothing/proc/ninitialize(delay = s_delay, mob/living/carbon/human/U = loc) + if(!U.mind) + return //Not sure how this could happen. + s_busy = TRUE + to_chat(U, "Now initializing...") + addtimer(CALLBACK(src, .proc/ninitialize_two, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_two(delay, mob/living/carbon/human/U) + if(!lock_suit(U))//To lock the suit onto wearer. + s_busy = FALSE + return + to_chat(U, "Analyzing body composition and data...\nSecuring external locking mechanism...") + addtimer(CALLBACK(src, .proc/ninitialize_three, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_three(delay, mob/living/carbon/human/U) + to_chat(U, "Preparing for psionic link...\nNow monitoring brain activity...") + addtimer(CALLBACK(src, .proc/ninitialize_four, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_four(delay, mob/living/carbon/human/U) + if(U.stat == DEAD|| U.health <= 0) + to_chat(U, "FĆAL �Rr�R: 344--93#�&&21 BR��N |/|/aV� PATT$RN RED\nA-A-aB�rT�NG...") + unlock_suit() + s_busy = FALSE + return + to_chat(U, "Psionic link processing...\nPattern\green GREEN, continuing operation.") + addtimer(CALLBACK(src, .proc/ninitialize_five, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_five(delay, mob/living/carbon/human/U) + to_chat(U, "PHASE-shift device status: ONLINE.\nInertial dampeners: ONLINE.") + addtimer(CALLBACK(src, .proc/ninitialize_six, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_six(delay, mob/living/carbon/human/U) + to_chat(U, "Primary system status: ONLINE.\nBackup system status: ONLINE.\nDownscaling for application...") + do_sparks(5, FALSE, U.loc) + addtimer(CALLBACK(src, .proc/ninitialize_seven, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/ninitialize_seven(delay, mob/living/carbon/human/U) + to_chat(U, "All systems operational. Welcome to SYTech OS, [U.real_name].") + s_initialized = TRUE + s_busy = FALSE + U.size_multiplier = 0.25 + +/obj/item/clothing/under/syclothing/proc/deinitialize(delay = s_delay) + if(affecting==loc) + var/mob/living/carbon/human/U = affecting + if(alert("Are you certain you wish to remove the suit? This will take time and remove all abilities, as well as keep you small!",,"Yes","No")=="No") + return + s_busy = TRUE + addtimer(CALLBACK(src, .proc/deinitialize_two, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_two(delay, mob/living/carbon/human/U) + to_chat(U, "Now de-initializing...") + addtimer(CALLBACK(src, .proc/deinitialize_three, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_three(delay, mob/living/carbon/human/U) + to_chat(U, "Logging off, [U.real_name]. Shutting down SYTech OS.") + addtimer(CALLBACK(src, .proc/deinitialize_four, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_four(delay, mob/living/carbon/human/U) + to_chat(U, "Primary system status: OFFLINE.\nBackup system status: OFFLINE.") + addtimer(CALLBACK(src, .proc/deinitialize_five, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_five(delay, mob/living/carbon/human/U) + to_chat(U, "PHASE-shift device status: OFFLINE.\nInertial dampeners: OFFLINE.") + addtimer(CALLBACK(src, .proc/deinitialize_six, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_six(delay, mob/living/carbon/human/U) + to_chat(U, "Disconnecting psionic-link...\greenSuccess.") + addtimer(CALLBACK(src, .proc/deinitialize_seven, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_seven(delay, mob/living/carbon/human/U) + to_chat(U, "Disengaging body analysis and brain-monitoring...\greenSuccess.") + addtimer(CALLBACK(src, .proc/deinitialize_eight, delay, U), delay) + +/obj/item/clothing/under/syclothing/proc/deinitialize_eight(delay, mob/living/carbon/human/U) + to_chat(U, "Unsecuring external locking mechanism...\nTechnology engram secured.\nOperation status: FINISHED.") + unlock_suit() + s_initialized = FALSE + s_busy = FALSE \ No newline at end of file diff --git a/hyperstation/icons/mob/clothes/extra.dmi b/hyperstation/icons/mob/clothes/extra.dmi index e5023f7fd..1dd717c37 100644 Binary files a/hyperstation/icons/mob/clothes/extra.dmi and b/hyperstation/icons/mob/clothes/extra.dmi differ diff --git a/hyperstation/icons/mobs/eyes.dmi b/hyperstation/icons/mobs/eyes.dmi index d9ecfc2ea..84d9507d8 100644 Binary files a/hyperstation/icons/mobs/eyes.dmi and b/hyperstation/icons/mobs/eyes.dmi differ diff --git a/hyperstation/icons/mobs/feet.dmi b/hyperstation/icons/mobs/feet.dmi index 3a0d6bd2f..93ad37e85 100644 Binary files a/hyperstation/icons/mobs/feet.dmi and b/hyperstation/icons/mobs/feet.dmi differ diff --git a/hyperstation/icons/mobs/gloves.dmi b/hyperstation/icons/mobs/gloves.dmi index 70fa72dc8..516151085 100644 Binary files a/hyperstation/icons/mobs/gloves.dmi and b/hyperstation/icons/mobs/gloves.dmi differ diff --git a/hyperstation/icons/mobs/head.dmi b/hyperstation/icons/mobs/head.dmi index e83719e14..c54c41402 100644 Binary files a/hyperstation/icons/mobs/head.dmi and b/hyperstation/icons/mobs/head.dmi differ diff --git a/hyperstation/icons/mobs/suits.dmi b/hyperstation/icons/mobs/suits.dmi index e7fd46fc5..a2dcf641a 100644 Binary files a/hyperstation/icons/mobs/suits.dmi and b/hyperstation/icons/mobs/suits.dmi differ diff --git a/hyperstation/icons/mobs/uniforms.dmi b/hyperstation/icons/mobs/uniforms.dmi index 2a16fa055..89868e8c4 100644 Binary files a/hyperstation/icons/mobs/uniforms.dmi and b/hyperstation/icons/mobs/uniforms.dmi differ diff --git a/icons/mob/feet.dmi b/icons/mob/feet.dmi index ee7c04134..617fbcf01 100644 Binary files a/icons/mob/feet.dmi and b/icons/mob/feet.dmi differ diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi index 2f8f0e510..43db6a6aa 100644 Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ diff --git a/icons/mob/uniform.dmi b/icons/mob/uniform.dmi index a00f4f9f9..6ba9c3015 100644 Binary files a/icons/mob/uniform.dmi and b/icons/mob/uniform.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 8ddf5cb53..9937961c7 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3078,10 +3078,12 @@ #include "code\modules\zombie\items.dm" #include "code\modules\zombie\organs.dm" #include "hyperstation\code\__DEFINES\economy.dm" +#include "hyperstation\code\__DEFINES\traits.dm" #include "hyperstation\code\__DEFINES\wendigo.dm" #include "hyperstation\code\controllers\subsystem\economy.dm" #include "hyperstation\code\datums\actions.dm" #include "hyperstation\code\datums\ert_hazard_cleanup.dm" +#include "hyperstation\code\datums\actions\sysuit.dm" #include "hyperstation\code\datums\components\crafting\bounties.dm" #include "hyperstation\code\datums\components\crafting\recipes.dm" #include "hyperstation\code\datums\elements\holder_micro.dm" @@ -3189,6 +3191,9 @@ #include "hyperstation\code\obj\sounding.dm" #include "hyperstation\code\obj\stargate_clothing.dm" #include "hyperstation\code\obj\vibrator.dm" +#include "hyperstation\code\obj\SYSuit\abilities.dm" +#include "hyperstation\code\obj\SYSuit\main.dm" +#include "hyperstation\code\obj\SYSuit\suit_initialize.dm" #include "hyperstation\code\obj\ZaoCorp\hat.dm" #include "hyperstation\code\obj\ZaoCorp\suit.dm" #include "hyperstation\code\obj\ZaoCorp\uniform.dm"