diff --git a/_maps/map_files220/MetaStation/MetaStation.dmm b/_maps/map_files220/MetaStation/MetaStation.dmm index 55cfbd2888b7..4d92019de8db 100644 --- a/_maps/map_files220/MetaStation/MetaStation.dmm +++ b/_maps/map_files220/MetaStation/MetaStation.dmm @@ -40047,6 +40047,7 @@ /turf/simulated/floor/plating, /area/station/maintenance/port) "cKC" = ( +/obj/random/hampter, /turf/simulated/floor/mech_bay_recharge_floor, /area/station/maintenance/apmaint) "cKD" = ( @@ -45782,6 +45783,13 @@ /obj/structure/cable/yellow, /turf/simulated/floor/plating, /area/station/hallway/secondary/exit) +"dAN" = ( +/obj/structure/chair{ + dir = 8 + }, +/obj/random/hampter, +/turf/simulated/floor/plating, +/area/station/maintenance/fpmaint) "dAO" = ( /obj/structure/cable/yellow{ d2 = 2; @@ -49485,6 +49493,10 @@ icon_state = "darkgrey" }, /area/station/engineering/tech_storage) +"fpi" = ( +/obj/random/hampter, +/turf/simulated/floor/plating, +/area/station/maintenance/asmaint) "fpk" = ( /obj/effect/decal/cleanable/dirt, /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ @@ -110137,7 +110149,7 @@ aky anI aph aqA -auE +dAN ksz auE aOB @@ -126419,7 +126431,7 @@ bHo emj cPc cTk -emj +fpi gVL dhl emj diff --git a/_maps/map_files220/cyberiad/cyberiad.dmm b/_maps/map_files220/cyberiad/cyberiad.dmm index 1b30891f4358..df454e109ea3 100644 --- a/_maps/map_files220/cyberiad/cyberiad.dmm +++ b/_maps/map_files220/cyberiad/cyberiad.dmm @@ -70065,6 +70065,16 @@ }, /turf/simulated/floor/plasteel, /area/station/science/hallway) +"mCW" = ( +/obj/structure/chair/stool{ + dir = 1 + }, +/obj/effect/decal/cleanable/dirt, +/obj/random/hampter, +/turf/simulated/floor/plasteel{ + icon_state = "grimy" + }, +/area/station/maintenance/fpmaint2) "mDs" = ( /obj/machinery/light/small/directional/east, /obj/structure/cable{ @@ -72837,6 +72847,12 @@ }, /turf/simulated/floor/carpet, /area/station/command/office/hop) +"nDi" = ( +/obj/structure/bed, +/obj/machinery/light/small/directional/east, +/obj/random/hampter, +/turf/simulated/floor/plating, +/area/station/maintenance/fore) "nDq" = ( /obj/structure/disposalpipe/segment{ dir = 4 @@ -97933,6 +97949,7 @@ /obj/structure/bed, /obj/item/bedsheet/black, /obj/effect/spawner/random_spawners/cobweb_right_rare, +/obj/random/hampter, /turf/simulated/floor/carpet/royalblack, /area/station/maintenance/apmaint) "wOf" = ( @@ -118104,7 +118121,7 @@ aII aDC aEK aFX -aHk +mCW aHl aKW aDD @@ -139164,7 +139181,7 @@ nCV ifJ dEI atG -apY +nDi arS aqc auZ diff --git a/_maps/map_files220/delta/delta.dmm b/_maps/map_files220/delta/delta.dmm index 7ce69e25209f..d7f4d3fb3c65 100644 --- a/_maps/map_files220/delta/delta.dmm +++ b/_maps/map_files220/delta/delta.dmm @@ -2739,6 +2739,7 @@ }, /obj/machinery/atmospherics/unary/vent_scrubber/on, /obj/effect/landmark/damageturf, +/obj/random/hampter, /turf/simulated/floor/wood/oak, /area/station/maintenance/electrical_shop) "arw" = ( @@ -61762,6 +61763,7 @@ "jvm" = ( /obj/structure/table/reinforced, /obj/effect/decal/cleanable/dirt, +/obj/random/hampter, /turf/simulated/floor/plasteel{ icon_state = "redyellowfull" }, @@ -69252,6 +69254,12 @@ /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/plating, /area/station/maintenance/aft) +"lYq" = ( +/obj/structure/table/wood/poker, +/obj/effect/decal/cleanable/dirt, +/obj/random/hampter, +/turf/simulated/floor/plasteel/grimy, +/area/station/maintenance/abandonedbar) "lYz" = ( /obj/effect/spawner/random_spawners/grille_maybe, /obj/structure/cable{ @@ -123720,7 +123728,7 @@ dcM daf lTi dhv -duT +lYq dYm lTi dmM diff --git a/modular_ss220/hampter/_hampter.dm b/modular_ss220/hampter/_hampter.dm new file mode 100644 index 000000000000..a93fe27edb7d --- /dev/null +++ b/modular_ss220/hampter/_hampter.dm @@ -0,0 +1,4 @@ +/datum/modpack/hampter + name = "Hampter Toys" + desc = "Набор игрушек хамптеров. 10 штук. Возврату не подлежат." + author = "RomainzZ, FanTik" diff --git a/modular_ss220/hampter/_hampter.dme b/modular_ss220/hampter/_hampter.dme new file mode 100644 index 000000000000..8b5ef7609946 --- /dev/null +++ b/modular_ss220/hampter/_hampter.dme @@ -0,0 +1,3 @@ +#include "_hampter.dm" + +#include "code/hampter.dm" diff --git a/modular_ss220/hampter/code/hampter.dm b/modular_ss220/hampter/code/hampter.dm new file mode 100644 index 000000000000..ac5147dc8dc0 --- /dev/null +++ b/modular_ss220/hampter/code/hampter.dm @@ -0,0 +1,143 @@ +// "Микро-компонент" модульности ради...? Возможно, и, скорее всего, плохая идея. +// Не использовал squeak.dm ибо у squeak есть регистрация COMSIG_ITEM_ATTACK_SELF, который мешает использовать attack_self() с проверкой интентов +/datum/component/plushtoy/Initialize() + . = ..() + // Пищит при ударах + RegisterSignal(parent, list(COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY, COMSIG_MOVABLE_BUMP, COMSIG_ITEM_ATTACK, COMSIG_ITEM_ATTACK_OBJ), PROC_REF(play_squeak)) + + // Пищит при наступании + RegisterSignal(parent, COMSIG_MOVABLE_CROSSED, PROC_REF(play_squeak_crossed)) + +// Пищание +/datum/component/plushtoy/proc/play_squeak() + playsound(parent, 'modular_ss220/hampter/sound/squeaktoy.ogg', 50, TRUE, -10) + +// Стащенный кусок кода для фикса большого числа писков в зависимости от числа хамптеров в инвентаре +/datum/component/plushtoy/proc/play_squeak_crossed(atom/movable/AM) + if(isitem(AM)) + var/obj/item/I = AM + if(I.flags & ABSTRACT) + return + else if(istype(AM, /obj/item/projectile)) + var/obj/item/projectile/P = AM + if(P.original != parent) + return + if(ismob(AM)) + var/mob/M = AM + if(M.flying) + return + if(isliving(AM)) + var/mob/living/L = M + if(L.floating) + return + var/atom/current_parent = parent + if(isturf(current_parent.loc)) + play_squeak() + + +// Спавнер рандомного хамптера для карты +/obj/random/hampter + name = "Random Hampter" + desc = "This is a random hampter spawner" + icon = 'modular_ss220/hampter/icons/hampter.dmi' + icon_state = "hampter" + +/obj/random/hampter/item_to_spawn() + return pick(typesof(/obj/item/toy/hampter)) + + +// Хамптер +/obj/item/toy/hampter + name = "Hampter" + desc = "Просто плюшевый хамптер. Самый обычный." + icon = 'modular_ss220/hampter/icons/hampter.dmi' + icon_state = "hampter" + icon_override = 'modular_ss220/hampter/icons/inhead/head.dmi' + lefthand_file = 'modular_ss220/hampter/icons/inhands/hampter_lefthand.dmi' + righthand_file = 'modular_ss220/hampter/icons/inhands/hampter_righthand.dmi' + slot_flags = SLOT_FLAG_HEAD + w_class = WEIGHT_CLASS_TINY + blood_color = "#d42929" + var/squeak = 'modular_ss220/hampter/sound/squeaktoy.ogg' + var/crush = 'modular_ss220/hampter/sound/bone_break_3.ogg' + var/cooldown = 0 + +// Добавляем наш "микро-компонент" хамптеру +/obj/item/toy/hampter/Initialize(mapload) + . = ..() + AddComponent(/datum/component/plushtoy) + +// Действия при взаимодействии в руке при разных интентах +/obj/item/toy/hampter/attack_self(mob/living/carbon/human/user) + . = ..() + // Небольшой кулдаун дабы нельзя было спамить + if(cooldown < world.time - 10) + switch(user.a_intent) + // Если выбрано что угодно кроме харма - жмякаем с писком хамптера + if (INTENT_HELP, INTENT_DISARM, INTENT_GRAB) + playsound(get_turf(src), squeak, 50, 1, -10) + + // Если выбран харм, сжимаем хамптера до "краски" (?) в его туловище + if (INTENT_HARM) + // Прописываю это здесь ибо иначе хомяки будут отмечаться кровавыми в игре + blood_DNA = "Plush hampter's paint" + + user.visible_message("[user] раздавил хамптера в своей руке!", "Вы раздавили хамптера в своей руке!") + playsound(get_turf(src), crush, 50, TRUE, -10) + + user.hand_blood_color = blood_color + user.transfer_blood_dna(blood_DNA) + // Сколько бы я не хотел ставить 0 - не выйдет. Нельзя будет отмыть руки в раковине + user.bloody_hands = 1 + user.update_inv_gloves() + + qdel(src) + + cooldown = world.time + + +// Подвиды +/obj/item/toy/hampter/assistant + name = "Assistant Hampter" + desc = "Плюшевый хамптер ассистент. Зачем ему изольки?" + icon_state = "hampter_ass" + +/obj/item/toy/hampter/security + name = "Security Hampter" + desc = "Плюшевый хамптер офицер СБ. У него станбатон!" + icon_state = "hampter_sec" + +/obj/item/toy/hampter/medical + name = "Medical Hampter" + desc = "Плюшевый хамптер врач. Тащите дефибриллятор!" + icon_state = "hampter_med" + +/obj/item/toy/hampter/janitor + name = "Janitor Hampter" + desc = "Плюшевый хамптер уборщик. Переключись на шаг." + icon_state = "hampter_jan" + +/obj/item/toy/hampter/old_captain + name = "Old Captain Hampter" + desc = "ПЛюшевый хамптер капитан в старой униформе. Это какой год?" + icon_state = "hampter_old-cap" + +/obj/item/toy/hampter/captain + name = "Captain Hampter" + desc = "Плюшевый хамптер капитан. Где его запасная карта?" + icon_state = "hampter_cap" + +/obj/item/toy/hampter/syndicate + name = "Syndicate Hampter" + desc = "Плюшевый хамптер агент Синдиката. Ваши активы пострадают." + icon_state = "hampter_sdy" + +/obj/item/toy/hampter/deadsquad + name = "Dead Squad Hampter" + desc = "Плюшевый хамптер Отряда Смерти. Все контракты расторгнуты." + icon_state = "hampter_ded" + +/obj/item/toy/hampter/ert + name = "ERT Hampter" + desc = "Плюшевый хамптер ОБР. Доложите о ситуации на станции." + icon_state = "hampter_ert" diff --git a/modular_ss220/hampter/icons/hampter.dmi b/modular_ss220/hampter/icons/hampter.dmi new file mode 100644 index 000000000000..4c73360608c4 Binary files /dev/null and b/modular_ss220/hampter/icons/hampter.dmi differ diff --git a/modular_ss220/hampter/icons/inhands/hampter_lefthand.dmi b/modular_ss220/hampter/icons/inhands/hampter_lefthand.dmi new file mode 100644 index 000000000000..99fd270e738b Binary files /dev/null and b/modular_ss220/hampter/icons/inhands/hampter_lefthand.dmi differ diff --git a/modular_ss220/hampter/icons/inhands/hampter_righthand.dmi b/modular_ss220/hampter/icons/inhands/hampter_righthand.dmi new file mode 100644 index 000000000000..741b3d1a174f Binary files /dev/null and b/modular_ss220/hampter/icons/inhands/hampter_righthand.dmi differ diff --git a/modular_ss220/hampter/icons/inhead/head.dmi b/modular_ss220/hampter/icons/inhead/head.dmi new file mode 100644 index 000000000000..b47d9ce9b1a5 Binary files /dev/null and b/modular_ss220/hampter/icons/inhead/head.dmi differ diff --git a/modular_ss220/hampter/sound/bone_break_3.ogg b/modular_ss220/hampter/sound/bone_break_3.ogg new file mode 100644 index 000000000000..420c61a9f8d8 Binary files /dev/null and b/modular_ss220/hampter/sound/bone_break_3.ogg differ diff --git a/modular_ss220/hampter/sound/squeaktoy.ogg b/modular_ss220/hampter/sound/squeaktoy.ogg new file mode 100644 index 000000000000..88e46efded22 Binary files /dev/null and b/modular_ss220/hampter/sound/squeaktoy.ogg differ diff --git a/modular_ss220/modular_ss220.dme b/modular_ss220/modular_ss220.dme index b9fadfce30f9..d3a208a234b1 100644 --- a/modular_ss220/modular_ss220.dme +++ b/modular_ss220/modular_ss220.dme @@ -33,6 +33,7 @@ #include "wire_splicing/wiresplicing.dme" #include "silicons/_silicons.dme" #include "silicon_hats/_silicon_hats.dme" +#include "hampter/_hampter.dme" // --- MISC --- // #include "administration/_administration.dme"