From ca8a22ed17cf9889c6e063ea77ad52cde6201523 Mon Sep 17 00:00:00 2001 From: Enty Date: Sat, 4 Jan 2025 01:09:05 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=9C=D1=8B=D1=88=D0=B8=20=D0=B4=D0=BB?= =?UTF-8?q?=D1=8F=20=D0=B3=D0=BE=D1=81=D1=82=D0=BE=D0=B2,=20=D0=BE=D1=81?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE=D0=B9=20=D0=BA=D0=BE=D0=B4.=20?= =?UTF-8?q?=D0=A7=D0=B0=D1=81=D1=82=D1=8C=20=D0=BA=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B7=D1=8F=D1=82=D0=B0=20=D0=B8=D0=B7=20vorestation.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/game_options.txt | 3 + .../modules/mouse_ghost/code/configuration.dm | 9 +++ .../code/mob/dead/observer/observer.dm | 57 ++++++++++++++++++ .../code/mob/living/basic/vermin/mouse.dm | 51 ++++++++++++++++ .../code/modules/client/client_defines.dm | 2 + .../mouse_ghost/icons/mob/simple/mouse.dmi | Bin 0 -> 5771 bytes .../mouse_ghost/icons/ui/chat/language.dmi | Bin 0 -> 339 bytes tgstation.dme | 4 ++ 8 files changed, 126 insertions(+) create mode 100644 tff_modular/modules/mouse_ghost/code/configuration.dm create mode 100644 tff_modular/modules/mouse_ghost/code/mob/dead/observer/observer.dm create mode 100644 tff_modular/modules/mouse_ghost/code/mob/living/basic/vermin/mouse.dm create mode 100644 tff_modular/modules/mouse_ghost/code/modules/client/client_defines.dm create mode 100644 tff_modular/modules/mouse_ghost/icons/mob/simple/mouse.dmi create mode 100644 tff_modular/modules/mouse_ghost/icons/ui/chat/language.dmi diff --git a/config/game_options.txt b/config/game_options.txt index 5812daf382b..969cb43fad9 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -591,3 +591,6 @@ RANDOM_LOOT_WEIGHT_MODIFIER 1 ## FF CONFIGS ROUNDSTART_RACES nabber +MOUSE_GHOST_RESPAWN_TIME 0.1 +MOUSE_GHOST_DISABLE 0 +MOUSE_GHOST_ONLY_VETERAN 0 diff --git a/tff_modular/modules/mouse_ghost/code/configuration.dm b/tff_modular/modules/mouse_ghost/code/configuration.dm new file mode 100644 index 00000000000..e0e12340bbf --- /dev/null +++ b/tff_modular/modules/mouse_ghost/code/configuration.dm @@ -0,0 +1,9 @@ +/datum/config_entry/number/mouse_ghost_respawn_time + default = 3 + integer = FALSE + min_val = 0 + +/datum/config_entry/flag/mouse_ghost_disable + +/datum/config_entry/flag/mouse_ghost_only_veteran + default = TRUE diff --git a/tff_modular/modules/mouse_ghost/code/mob/dead/observer/observer.dm b/tff_modular/modules/mouse_ghost/code/mob/dead/observer/observer.dm new file mode 100644 index 00000000000..c844b854c30 --- /dev/null +++ b/tff_modular/modules/mouse_ghost/code/mob/dead/observer/observer.dm @@ -0,0 +1,57 @@ +/mob/ghostize() + . = ..() + var/mob/dead/observer/ghost = . + ghost?.client?.time_died_as_mouse = ghost?.client?.player_details.time_of_death + +/mob/dead/observer/verb/become_mouse() + set name = "Become mouse" + set category = "Ghost" + + if(CONFIG_GET(flag/mouse_ghost_disable)) + to_chat(src, span_warning("Spawning as a mouse is currently disabled.")) + return + + if(!client) + return + if(mind && mind.current && mind.current.stat != DEAD && can_reenter_corpse) + to_chat(src, span_warning("Your non-dead body prevent you from respawning.")) + return + + if (CONFIG_GET(flag/mouse_ghost_only_veteran) && !SSplayer_ranks.is_veteran(client)) + to_chat(src, span_warning("At the moment, this requires veteran rank.")) + return + + var/mouse_ghost_respawn_time = CONFIG_GET(number/mouse_ghost_respawn_time) + var/timedifference = world.time - client.time_died_as_mouse + if(client.time_died_as_mouse && timedifference <= mouse_ghost_respawn_time * 600) + var/timedifference_text + timedifference_text = time2text(mouse_ghost_respawn_time * 600 - timedifference,"mm:ss") + to_chat(src, span_warning("You may only spawn again as a mouse more than [mouse_ghost_respawn_time] minutes after your death. You have [timedifference_text] left.")) + return + + var/response = tgui_alert(src, "Are you -sure- you want to become a mouse?","Are you sure you want to squeek?",list("Squeek!","Nope!")) + if(response != "Squeek!") return //Hit the wrong key...again. + + var/mob/living/basic/mouse/host + var/obj/machinery/atmospherics/components/unary/vent_pump/vent_found + var/list/vents = list() + // Поиск подходящей вентиляции + for(var/obj/machinery/atmospherics/components/unary/vent_pump/temp_vent in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/atmospherics/components/unary/vent_pump)) + if(QDELETED(temp_vent)) + continue + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) + var/datum/pipeline/temp_vent_parent = temp_vent.parents[1] + if(!temp_vent_parent) + continue + if(length(temp_vent_parent.other_atmos_machines) > 20) + vents += temp_vent + if(vents.len) + vent_found = pick(vents) + host = new /mob/living/basic/mouse/(get_turf(vent_found)) + else + to_chat(src, span_warning("Unable to find any unwelded vents to spawn mice at.")) + + if(host) + host.ckey = src.ckey + host.move_into_vent(vent_found) + to_chat(host, span_info("You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.")) diff --git a/tff_modular/modules/mouse_ghost/code/mob/living/basic/vermin/mouse.dm b/tff_modular/modules/mouse_ghost/code/mob/living/basic/vermin/mouse.dm new file mode 100644 index 00000000000..592d6fd13fe --- /dev/null +++ b/tff_modular/modules/mouse_ghost/code/mob/living/basic/vermin/mouse.dm @@ -0,0 +1,51 @@ +/mob/living/basic/mouse + mobility_flags = MOBILITY_FLAGS_REST_CAPABLE_DEFAULT + icon = 'tff_modular/modules/mouse_ghost/icons/mob/simple/mouse.dmi' + +/mob/living/basic/mouse/Initialize() + . = ..() + add_verb(src, /mob/living/proc/toggle_resting) + +/mob/living/basic/mouse/death() + if(client) + client.time_died_as_mouse = world.time + . = ..() + +/mob/living/basic/mouse/update_resting() + . = ..() + if(stat == DEAD) + return + update_appearance(UPDATE_ICON_STATE) + +/mob/living/basic/mouse/update_icon_state() + . = ..() + if (resting) + icon_state = "[icon_living]_rest" + return + icon_state = "[icon_living]" + +/datum/language_holder/mouse + understood_languages = list( + /datum/language/mouse = list(LANGUAGE_ATOM), + ) + spoken_languages = list( + /datum/language/mouse = list(LANGUAGE_ATOM), + ) + +/datum/language/mouse + name = "Squeekspeak" + desc = "Ancient language of the mousekind. Allegedly has over 300 words for cheese." + key = "n" + default_priority = 10 + + icon = 'tff_modular/modules/mouse_ghost/icons/ui/chat/language.dmi' + icon_state = "mouse" + + syllables = list( + list( + "skee", "ree", "chit", "pip", "squeak", "whik", "fik", "tik", "zit", "kee", "pik", "mip", "skrit", "chirk", "frip", + ), + ) + +/mob/living/basic/mouse + initial_language_holder = /datum/language_holder/mouse diff --git a/tff_modular/modules/mouse_ghost/code/modules/client/client_defines.dm b/tff_modular/modules/mouse_ghost/code/modules/client/client_defines.dm new file mode 100644 index 00000000000..f8e5136a054 --- /dev/null +++ b/tff_modular/modules/mouse_ghost/code/modules/client/client_defines.dm @@ -0,0 +1,2 @@ +/client + var/time_died_as_mouse = null diff --git a/tff_modular/modules/mouse_ghost/icons/mob/simple/mouse.dmi b/tff_modular/modules/mouse_ghost/icons/mob/simple/mouse.dmi new file mode 100644 index 0000000000000000000000000000000000000000..d6e2d2932ff77bce84d102ae7a6afbfe13875f36 GIT binary patch literal 5771 zcmbW5XHe5!yYBxXNRW>75(tVk3xafzuBafrDZMwP_mUj5)Cz`sS5f>=q5^ue&k&g5KB_iHukw6R4 za@%0bD7mJG=O71x*D_56GTwPHh-uxk{+r{J?)8 zWCGIK`V8<13xG7Ob%`>&z7xxT(7KMenR5ep{Ny$e6ZagTXG!`$Js_h%!C&dW-uE#@ z&I=lrXBu=03JUr#Ofvz0#{8qKnsfJKS;A1Bfu7YZn%*5Djx@L2qV*^_aq}Iskc#1goUNgRPssBmf=Jw#A_S(6c)287_r`;$`MhL## z0{mBG7+VS!OJ2mNMA~s|9$%;9v3?PVf^5H^ z1)v%{P_bx0`uS^SDvZ-Y>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zC?DYmz}f@V{iCkA%xC>u4kI1|qidk7DbC54&oao>_h;N1b!gHP&1#&}+%e(roFv$h z2WzeJz3CSg690t$@`JM*eG2RegtC7u{15*!n zNM>IfcD4GxyVr2`ojbF&Q2%kabmyU#j9+i;C35*u`Elrqg1!nafY#Fd%(On<>hsFI&)0W@35mB8N1xLgLVa`@HKFK#V`a vI1p;bDo?mC@ol)T1roWiWcaT<^Wf5Y?r!h}CDh<5T?U>#R#z@nG!Ok>%jE+P literal 0 HcmV?d00001 diff --git a/tff_modular/modules/mouse_ghost/icons/ui/chat/language.dmi b/tff_modular/modules/mouse_ghost/icons/ui/chat/language.dmi new file mode 100644 index 0000000000000000000000000000000000000000..e40dedab7db721214bc946fd0bfc64afccb3fa73 GIT binary patch literal 339 zcmV-Z0j&OsP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#atzJ5I5Sc+ z(=$pSoZ^zil2jm5DL22gI8}*@GbOXA7$n8TnO2mTn+jnoE4cc(fQKWlKKz0qX?dSj+18~ literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index 401c588d52f..b1b6b68d761 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8879,6 +8879,10 @@ #include "tff_modular\modules\martial\sleeping_carp.dm" #include "tff_modular\modules\modular_automapper\automapper.dm" #include "tff_modular\modules\modular_automapper\replacer.dm" +#include "tff_modular\modules\mouse_ghost\code\configuration.dm" +#include "tff_modular\modules\mouse_ghost\code\mob\dead\observer\observer.dm" +#include "tff_modular\modules\mouse_ghost\code\mob\living\basic\vermin\mouse.dm" +#include "tff_modular\modules\mouse_ghost\code\modules\client\client_defines.dm" #include "tff_modular\modules\nabbers\code\_nabbers.dm" #include "tff_modular\modules\nabbers\code\nabber_bodyparts.dm" #include "tff_modular\modules\nabbers\code\nabber_bolaimmunity.dm" From 4e81ee37414ed4bf459459b0aec3b5a3fa0b703e Mon Sep 17 00:00:00 2001 From: Enty Date: Sat, 4 Jan 2025 01:20:04 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BD=D1=84=D0=B8=D0=B3=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/game_options.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/game_options.txt b/config/game_options.txt index 969cb43fad9..d84a17af2fd 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -591,6 +591,6 @@ RANDOM_LOOT_WEIGHT_MODIFIER 1 ## FF CONFIGS ROUNDSTART_RACES nabber -MOUSE_GHOST_RESPAWN_TIME 0.1 +MOUSE_GHOST_RESPAWN_TIME 3 MOUSE_GHOST_DISABLE 0 -MOUSE_GHOST_ONLY_VETERAN 0 +MOUSE_GHOST_ONLY_VETERAN 1