Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Костюмы, подкладки, куртки и т.д. с Пары (для лодаутов) #953

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4cd326f
Базовая отгрузка, на очереди исправление
msw7007 Jul 14, 2024
93f2307
Правки HEV
msw7007 Jul 14, 2024
0c4a30a
Починил гребанные худы
msw7007 Jul 14, 2024
f8f3d45
Merge branch 'ss220club:master' into suits_instrumets
msw7007 Jul 15, 2024
8a2e3be
Правка и внедрение лодаута
msw7007 Jul 15, 2024
cef56ff
Правки и внедрения в лодауты
msw7007 Jul 15, 2024
3644df7
Правка рук (жаль не моих)
msw7007 Jul 15, 2024
d99b5e9
Merge branch 'ss220club:master' into suits_instrumets
msw7007 Jul 15, 2024
5deb95e
Фиксы по рантайму
msw7007 Jul 15, 2024
dab3357
Чистка по рантайму 2
msw7007 Jul 15, 2024
aee4be2
Правка тестов missing_icon и worn_icon
msw7007 Jul 15, 2024
46c535f
Попытка разобраться с create_and_destroy, правка ударной установки
msw7007 Jul 15, 2024
4aebb9c
Правка чистки ударных
msw7007 Jul 15, 2024
63f36a4
Попытка преодолеть ошибки проверок №1
msw7007 Jul 15, 2024
1e75629
Приведение кода к единому виду
msw7007 Jul 15, 2024
876031c
Попытка преодолеть ошибки проверок №2
msw7007 Jul 16, 2024
b532244
Новая чистка кода
msw7007 Jul 16, 2024
57d93e4
Переопределение наследования ударной
msw7007 Jul 16, 2024
16c776b
Попытки обойти рантайм 3
msw7007 Jul 16, 2024
c510be8
Слишком накрутил инициализацию
msw7007 Jul 16, 2024
35873e6
Merge branch 'master' into suits_instrumets
msw7007 Jul 16, 2024
efc0c57
Попытки пройти проблемы райнтайма
msw7007 Jul 16, 2024
b37702a
Merge branch 'master' into suits_instrumets
msw7007 Jul 16, 2024
aa12707
Попытка одолеть рантайм 4
msw7007 Jul 16, 2024
48f5479
Merge branch 'suits_instrumets' of https://github.com/msw7007/Bandast…
msw7007 Jul 16, 2024
301fa60
Расширение лодаута
msw7007 Jul 16, 2024
6c5be29
Merge branch 'master' into suits_instrumets
msw7007 Jul 16, 2024
57b5349
Правка того, правка сего
msw7007 Jul 17, 2024
46b4ecb
Вырезка лишнего для разнесения по другим ПР
msw7007 Jul 23, 2024
8b91241
Одежда - база
msw7007 Jul 23, 2024
7250a83
Фиксы при разделении костюмов базовых
msw7007 Jul 23, 2024
108cc69
Фикс подцепок
msw7007 Jul 23, 2024
bb7ad95
Чистка-чистка-чистка
msw7007 Jul 23, 2024
6db3160
Отгрузка костюмов
msw7007 Jul 23, 2024
cb5c9b0
Чистка 2
msw7007 Jul 23, 2024
cae0f01
Выносим мусор
msw7007 Jul 25, 2024
4b09aea
Merge branch 'ss220club:master' into suits
msw7007 Dec 20, 2024
72c2010
Откай джейсона
msw7007 Dec 20, 2024
d01cdca
Вынос ХЕВа в отдельный файл
msw7007 Dec 20, 2024
c76206c
Merge branch 'master' into suits
msw7007 Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions modular_bandastation/clothing/_clothing.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/datum/modpack/clothing
name = "Одежда"
desc = "Всё для модного приговора."
author = "Aylong220, Yata9arasu"
5 changes: 5 additions & 0 deletions modular_bandastation/clothing/_clothing.dme
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include "_clothing.dm"
#include "code/hev_suit.dm"
#include "code/suits.dm"
#include "code/under.dm"

14 changes: 14 additions & 0 deletions modular_bandastation/clothing/code/clothing_vendors.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/obj/machinery/vending/autodrobe/Initialize(mapload)
products += list(
/obj/item/clothing/head/ratge = 1,
)
. = ..()

/obj/machinery/vending/chefdrobe/Initialize(mapload)
products += list(
/obj/item/clothing/under/rank/civilian/chef/red = 2,
/obj/item/clothing/suit/chef/red = 2,
/obj/item/clothing/head/chefhat/red = 2,
/obj/item/clothing/suit/apron/chef/red = 1,
)
. = ..()
182 changes: 182 additions & 0 deletions modular_bandastation/clothing/code/hev_suit.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
#define SOUND_BEEP(sound) add_queue(##sound, 20)
#define MORPHINE_INJECTION_DELAY (30 SECONDS)
//Suit
/obj/item/clothing/suit/space/hev
name = "\improper hazardous environment suit"
desc = "The Mark IV HEV suit protects the user from a number of hazardous environments and has in build ballistic protection."
icon = 'modular_bandastation/clothing/icons/object/suits.dmi'
worn_icon = 'modular_bandastation/clothing/icons/mob/suits.dmi'
lefthand_file = 'modular_bandastation/clothing/icons/inhands/left_hand.dmi'
righthand_file = 'modular_bandastation/clothing/icons/inhands/right_hand.dmi'
icon_state = "hev"
inhand_icon_state = "hev"
resistance_flags = FIRE_PROOF | ACID_PROOF | FREEZE_PROOF
body_parts_covered = CHEST|GROIN|ARMS|LEGS|FEET
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT
armor_type = /datum/armor/armor_heavy
allowed = list(
/obj/item/tank/internals/emergency_oxygen,
/obj/item/tank/internals/plasmaman,
/obj/item/gun/energy,
/obj/item/crowbar,
)
slowdown = 0.25

var/static/list/funny_signals = list(
COMSIG_MOB_SAY = PROC_REF(handle_speech),
COMSIG_MOB_DEATH = PROC_REF(handle_death),
COMSIG_LIVING_IGNITED = PROC_REF(handle_ignite),
COMSIG_LIVING_ELECTROCUTE_ACT = PROC_REF(handle_shock),
// COMSIG_MOB_APPLY_DAMAGE= PROC_REF(handle_damage),
)


var/list/sound_queue = list()

var/mob/living/carbon/owner

var/obj/item/geiger_counter/GC

COOLDOWN_DECLARE(next_damage_notify)
COOLDOWN_DECLARE(next_morphine)

/obj/item/clothing/suit/space/hev/Initialize(mapload)
. = ..()
GC = new(src)
GC.scanning = TRUE
update_appearance(UPDATE_ICON)

/obj/item/clothing/suit/space/hev/Destroy()
QDEL_NULL(GC)
owner = null
return ..()

/obj/item/clothing/suit/space/hev/proc/process_sound_queue()

var/list/sound_data = sound_queue[1]
var/sound_file = sound_data[1]
var/sound_delay = sound_data[2]

playsound(owner, sound_file, 20)

sound_queue.Cut(1,2)

if(!length(sound_queue))
return

addtimer(CALLBACK(src, PROC_REF(process_sound_queue)), sound_delay)

/obj/item/clothing/suit/space/hev/proc/add_queue(desired_file, desired_delay, purge_queue=FALSE)

var/was_empty_sound_queue = !length(sound_queue)

if(purge_queue)
sound_queue.Cut()

sound_queue += list(list(desired_file,desired_delay)) //BYOND is fucking weird so you have to do this bullshit if you want to add a list to a list.

if(was_empty_sound_queue)
addtimer(CALLBACK(src, PROC_REF(process_sound_queue)), 1 SECONDS)

return TRUE

//Signal handling.
/obj/item/clothing/suit/space/hev/equipped(mob/M, slot)
..()
if(iscarbon(M))
for(var/voice in funny_signals)
RegisterSignal(M, voice, funny_signals[voice])
owner = M
add_queue('modular_bandastation/clothing/sound/hev/blip.ogg', 2 SECONDS, purge_queue=TRUE)
add_queue('modular_bandastation/clothing/sound/hev/01_hev_logon.ogg', 11 SECONDS)
add_queue('modular_bandastation/clothing/sound/hev/04_vitalsigns_on.ogg', 4 SECONDS)
add_queue('modular_bandastation/clothing/sound/hev/09_safe_day.ogg', 8 SECONDS)
else
for(var/voice in funny_signals)
UnregisterSignal(M, voice)

/obj/item/clothing/suit/space/hev/dropped(mob/M)
..()
for(var/voice in funny_signals)
UnregisterSignal(M, voice)

//Death
/obj/item/clothing/suit/space/hev/proc/handle_death(gibbed)
SIGNAL_HANDLER
add_queue('modular_bandastation/clothing/sound/hev/death.ogg', 5 SECONDS, purge_queue=TRUE)

//Mute
/obj/item/clothing/suit/space/hev/proc/handle_speech(datum/source, mob/speech_args)
SIGNAL_HANDLER
var/static/list/cancel_messages = list(
"Вам трудно говорить, когда костюм туго сдавливает ваше горло...",
"Ваши связки ощущаются сдавленными, что пресекает любую попытку выдавить хоть какой-то звук...",
"Вы пытаетесь что-то сказать, но костюм сдавливает вам гортань..."
)

speech_args[SPEECH_MESSAGE] = "..."

Check warning on line 117 in modular_bandastation/clothing/code/hev_suit.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD2304: Invalid index operation. datum[] index operations are not valid starting in BYOND 515.1641
to_chat(source, span_warning(pick(cancel_messages)))

//Fire
/obj/item/clothing/suit/space/hev/proc/handle_ignite(mob/living)
SIGNAL_HANDLER
SOUND_BEEP('modular_bandastation/clothing/sound/hev/beep_3.ogg')
add_queue('modular_bandastation/clothing/sound/hev/heat.ogg', 3 SECONDS)

//Shock
/obj/item/clothing/suit/space/hev/proc/handle_shock(mob/living)
SIGNAL_HANDLER
SOUND_BEEP('modular_bandastation/clothing/sound/hev/beep_3.ogg')
add_queue('modular_bandastation/clothing/sound/hev/shok.ogg', 3 SECONDS)

//Helmet
/obj/item/clothing/head/helmet/hev_helmet
name = "hazardous environment suit helmet"
desc = "The Mark IV HEV suit helmet."
icon = 'modular_bandastation/clothing/icons/object/helmet.dmi'
worn_icon = 'modular_bandastation/clothing/icons/mob/helmet.dmi'
lefthand_file = 'modular_bandastation/clothing/icons/inhands/left_hand.dmi'
righthand_file = 'modular_bandastation/clothing/icons/inhands/right_hand.dmi'
icon_state = "hev_helmet0"
inhand_icon_state = "hev_helmet"
armor_type = /datum/armor/armor_heavy
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE|HIDEHAIR
visor_flags = BLOCK_GAS_SMOKE_EFFECT | MASKINTERNALS
flash_protect = FLASH_PROTECTION_WELDER
dog_fashion = null
var/on = FALSE
var/brightness_on = 4
actions_types = list(/datum/action/item_action/toggle_helmet_light)
var/hud_types = list(DATA_HUD_MEDICAL_ADVANCED)

/obj/item/clothing/head/helmet/hev_helmet/equipped(mob/living/carbon/human/user, slot)
..()
if(ishuman(user) && slot_flags & slot)
for(var/new_hud in hud_types)
var/datum/atom_hud/H = GLOB.huds[new_hud]
if(H)
H.show_to(user)

/obj/item/clothing/head/helmet/hev_helmet/dropped(mob/living/carbon/human/user)
..()
if(ishuman(user))
for(var/new_hud in hud_types)
var/datum/atom_hud/H = GLOB.huds[new_hud]
if(H)
H.hide_from(user)

/obj/item/clothing/head/helmet/hev_helmet/ui_action_click(mob/user, toggle_helmet_light)
light_toggle(user)

/obj/item/clothing/head/helmet/hev_helmet/proc/light_toggle(mob/user)
on = !on
icon_state = "hev_helmet[on]"
//КТГ
if(on)
set_light(brightness_on)
else
set_light(0)

#undef MORPHINE_INJECTION_DELAY
#undef SOUND_BEEP
Loading
Loading