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

Add: [bounty] Voice update #6326

Open
wants to merge 11 commits into
base: master220
Choose a base branch
from
6 changes: 6 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@
#define COMSIG_ATOM_NO_LONGER_PULLED "movable_no_longer_pulled"
///signal sent out by an atom when it is no longer pulling something : (atom/pulling)
#define COMSIG_ATOM_NO_LONGER_PULLING "movable_no_longer_pulling"
//signal for mass roundstart store voice (very english)
#define COMSIG_SPECIAL_MASS_STORE_VOICE "store_voice"

#define COMSIG_JUST_LIST_ADD_VOICE "list_add_voice"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

неиспользуемый сигнал со странным названием, just и list тут не нужны

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это забыл удалить

//signal for human store ebalo
//#define COMSIG_STORE_FACE "store_face"

///from base of atom/attackby(): (/obj/item, /mob/living, params)
#define COMSIG_PARENT_ATTACKBY "atom_attackby"
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@

#define isitem(A) (istype(A, /obj/item))

#define isIdCard(A) (istype(A, /obj/item/card/id))

#define isWallet(A) (istype(A, /obj/item/storage/wallet))
Comment on lines +55 to +57
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define isIdCard(A) (istype(A, /obj/item/card/id))
#define isWallet(A) (istype(A, /obj/item/storage/wallet))
#define isidcard(A) (istype(A, /obj/item/card/id))
#define iswallet(A) (istype(A, /obj/item/storage/wallet))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Чем не нравится стиль с#


#define isstack(A) (istype(A, /obj/item/stack))

#define isstorage(A) (istype(A, /obj/item/storage))
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/hud/plane_master/render_plate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
/atom/movable/screen/plane_master/rendering_plate/master/hide_from(mob/oldmob)
. = ..()
if(offset == 0)
return
return
var/datum/hud/hud = home.our_hud
if(hud)
UnregisterSignal(hud, COMSIG_HUD_OFFSET_CHANGED, PROC_REF(on_offset_change))
Expand Down
23 changes: 20 additions & 3 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

GLOBAL_LIST_EMPTY(capitalist_manifest)

/datum/datacore
var/list/medical = list()
var/list/general = list()
Expand Down Expand Up @@ -111,6 +114,7 @@ GLOBAL_LIST_EMPTY(PDA_Manifest)
/datum/datacore/proc/manifest()
for(var/mob/living/carbon/human/H in GLOB.player_list)
manifest_inject(H)
SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GLOB.capitalist_manifest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в проке происходит другое, а тут отправляем сигнал про голоса, шо? Измени название сигнала на что то подобное COMSIG_MANIFEST_INITIALIZE. Также, зачем нам передавать в аргументы глобальный список, если мы и так сможем из сигнальных проков иметь доступ к глобальному списку.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вызов сигнала происходит в данном прока ибо данный прок отвечает за раундстарт заполнение манифеста что мне и нужно. Название такое поскольку это "уневирсальный" сигнал

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Такое не нужно, нужно переименовать. Текущее название сигнала никак не связано с тем, что происходит в проке

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

так этот сигнал не специально для этого прока. Этот сигнал ну типо для массового запоминания по депортаментам

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Все равно название менять под прок, а не под то, для чего он используется.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Система стиля говна


/datum/datacore/proc/manifest_modify(name, rank, assignment)
if(GLOB.PDA_Manifest.len)
Expand Down Expand Up @@ -142,15 +146,28 @@ GLOBAL_VAR_INIT(record_id_num, 1001)
assignment = H.job
else
assignment = "Unassigned"

var/id = num2hex(GLOB.record_id_num++, 6)


H.adv_voice.RegSignals()
H.UpdateVoice() //На всякий
var/prom_voice = H.adv_voice.voice_name

var/datum/job/prom_job = SSjobs.GetJob(H.job)

for(var/dep_flag in prom_job.college_department) //:catsmile:
if(!isnull(GLOB.capitalist_manifest?[dep_flag]))
GLOB.capitalist_manifest[dep_flag][prom_voice] = H.real_name
else
GLOB.capitalist_manifest[dep_flag] = list((prom_voice) = (H.real_name))

//SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GLOB.capitalist_manifest)
//При создании рекордсов еще берется и голос, боже помилуй чтобы это ничего не сломало
Copy link
Contributor

@Antoonij Antoonij Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. сигналы должны регистрироваться со стороны войсмодели и вызываться там же, нам не нужно где то из датакора вызывать их регистрацию и обновлять голоса. Именно поэтому желательно переделать голоса на компонент
  2. убрать комментарии на русском языке

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Регистрация идет на подсистему поскольку так работают глобальные сигналы. В не глобальных сигналах нет смысла. Я уберу коменты на русском кроме job.dm поскольку там важное предупреждение

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я не об этом. Мы начинаем регистрировать сигналы тогда, когда происходит иньекция в манифест - это не нужно, нам нужно при присоединении войсмодели их регистрировать уже. Если это переделать на компонент - избавит нас от нужды создавать и вызывать лишние проки, достаточно будет зарегистрировать сигнал в RegisterWIthParent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

к слову регистрация сигналов в манифесте происходит в целях оптимизации

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

посмотрю что такое компоненты, боже помилуй

//General Record
var/datum/data/record/G = new()
G.fields["id"] = id
G.fields["name"] = H.real_name
G.fields["real_rank"] = H.mind.assigned_role
G.fields["voice"] = H.GetVoice()
G.fields["rank"] = assignment
G.fields["age"] = H.age
G.fields["fingerprint"] = md5(H.dna.uni_identity)
Expand Down
3 changes: 2 additions & 1 deletion code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

var/assigned_role //assigned role is what job you're assigned to when you join the station.
var/playtime_role //if set, overrides your assigned_role for the purpose of playtime awards. Set by IDcomputer when your ID is changed.
var/special_role //special roles are typically reserved for antags or roles like ERT. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal.
var/special_role //special roles are typically reserved for antags or roles like ERP. If you want to avoid a character being automatically announced by the AI, on arrival (becuase they're an off station character or something); ensure that special_role and assigned_role are equal.
var/special_role_meta_know = FALSE //Если TRUE то ты всегда будешь знать тех у кого такая-же спец роль
var/offstation_role = FALSE //set to true for ERT, deathsquad, abductors, etc, that can go from and to z2 at will and shouldn't be antag targets
var/list/restricted_roles = list()

Expand Down
159 changes: 159 additions & 0 deletions code/datums/voice.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define GENDER_NAME_UNKNOW list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")
#define GENDER_NAME_UNKNOWN list(MALE = "Незнакомец", FEMALE = "Незнакомка", NEUTER = "Неизвестный", PLURAL = "Неизвестный")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Упс

#define FACE_MOD_SWITCH TRUE
//Новая система голоса
/datum/voice_model
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Честно, это все можно было превратить в элемент или крайне компонент. Будет удобно и не засорять. Получение голоса можно связать по сигналу, а через проки и целый датум для каждого моба... Там ещё проки зачем-то в самом /mob
А можно было оставить для /mob/living ибо у мертвецов /mob/dead нету голоса

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Всмысле living и dead, разве мертвый от живого не отличается только не работающим Life?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я переделаю это в компонент как говорит фонд помощи, не вижу смысла в получении голоса по сигналу

var/mob/host = null //Носитель этой хуеты
var/tts_seed_string = "Arthas"
var/voice_gender = MALE
var/voice_name = "Неизвестный"
var/real_voice_name = "Неизвестный"

var/list/famous_voices = list()
var/list/famous_faces = list()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это лучше сделать компонентом, в текущем виде мы пытаемся изобрести велосипед из проков, которые уже есть на готовой кодбазе компонентов

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

что за компоненты?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/datum/component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

буээээ

Pelmenik123 marked this conversation as resolved.
Show resolved Hide resolved

/datum/voice_model/New(var/mob/owner_voice)
if(owner_voice != null)
host = owner_voice
real_voice_name = owner_voice.GetVoice()
voice_name = owner_voice.GetVoice()
voice_gender = owner_voice.gender
famous_voices[voice_name] = owner_voice.name
tts_seed_string = owner_voice.tts_seed

/datum/voice_model/proc/RegSignals()
RegisterSignal(SSdcs, COMSIG_SPECIAL_MASS_STORE_VOICE, PROC_REF(SpecialMassAddVoice))

//Специфическая функция которая добавляет что нужно короче
/datum/voice_model/proc/SpecialMassAddVoice(suka, list/list_voice)
SIGNAL_HANDLER
var/datum/job/prom_job = SSjobs.GetJob(host.job) //Нужно чтобы небыло предупеждений
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

убрать комментарии на русском языке/перевести их

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

да

var/list/prom_data = list_voice?[prom_job.department]
if(list_voice?["AbsolutePomny"])
famous_voices |= list_voice["AbsolutePomny"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"AbsolutePomny" - это что? Нужно использовать нормальные названия ключей

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это я забыл удалить


if(prom_data)
famous_voices |= prom_data

/datum/voice_model/proc/JustListAddVoice(list_voice)
SIGNAL_HANDLER
famous_voices |= list_voice

/datum/voice_model/proc/VoiceUpdate()
voice_name = host.GetVoice() //:badguy:
voice_gender = host.gender
tts_seed_string = host.tts_seed

/datum/voice_model/proc/get_gender_unknown_name(gender_string)
var/result = (GENDER_NAME_UNKNOW)?[gender_string]
if(result)
return result
return "Неизвестный"
/* Not used
/datum/voice_model/proc/CopyInVoice(datum/voice_model/voice_to_copy)
tts_seed_string = voice_to_copy.tts_seed_string
voice_gender = voice_to_copy.voice_gender
voice_name = voice_to_copy.voice_name

/datum/voice_model/proc/FullCopyInVoice(datum/voice_model/voice_to_copy)
CopyInVoice(voice_to_copy)
real_voice_name = voice_to_copy.real_voice_name
famous_voices = voice_to_copy.famous_voices
*/
//было две бутылки, словарь или два прока. Я сел на вторую
/datum/voice_model/proc/GetManifestKnowVoice()
for(var/datum/data/record/t in GLOB.data_core.general)
if(t)
if(t.fields["voice"] == voice_name)
return t.fields["name"]
return "IDENTIFICATION ERROR"
//Технически name это представление твоего ебала

/datum/voice_model/proc/GetManifestKnowFace(mob/face_target)
for(var/datum/data/record/t in GLOB.data_core.general)
if(t)
if(t.fields["name"] == face_target.name)
return t.fields["name"]
return "IDENTIFICATION FACE ERROR"


/datum/voice_model/proc/TryStore(mob/target)
if(src == target.adv_voice)
return TRUE
. = FALSE
if(!ishuman(target)) //Зачем мне знать как зовут мышей :badguy:
return target.name
var/mob/living/carbon/human/target_H = target
var/obj/item/card/id/prov_wear_id = null

if(isIdCard(target_H.wear_id)) //Fuck
prov_wear_id = target_H.wear_id
if(isWallet(target_H.wear_id)) //Мфпмфпф
var/obj/item/storage/wallet/prom = target_H.wear_id
prov_wear_id = prom.front_id

if(!((target_H.wear_mask?.flags_inv & HIDENAME) || (target_H.head?.flags_inv & HIDENAME)) && prov_wear_id)

//if(FACE_MOD_SWITCH)
// famous_faces[target_H.name] = prov_wear_id.registered_name //FUCK BYOND
famous_voices[target_H.adv_voice.voice_name] = prov_wear_id.registered_name
. = TRUE
else if(prov_wear_id)
famous_voices[target_H.adv_voice.voice_name] = prov_wear_id.registered_name
. = TRUE
return

//For examie
// FUCKING BYOND
/datum/voice_model/proc/TryRecollectFace(mob/target)
if(src == target.adv_voice)
return target.name
if(!ishuman(target)) //:Roflcat: Чтобы имена мышей знать сразу
return target.name
var/mob/living/carbon/human/target_H = target

if(!((target_H.wear_mask?.flags_inv & HIDENAME) || (target_H.head?.flags_inv & HIDENAME)))
. = famous_faces?[target_H.name]

if(.)
return

if((target_H.wear_suit?.flags_inv & HIDEJUMPSUIT) && (target_H.head?.flags_inv & HIDENAME))
. = get_gender_unknown_name(NEUTER)
else
. = get_gender_unknown_name(target_H.gender)
return

//For hear
/datum/voice_model/proc/TryRecollectVoice(mob/target)
if(!ishuman(host)) //Мышки мышки знают все....
return target.name
if(host.mind.special_role_meta_know && (target.mind.special_role == host.mind.special_role))
return target.name
if(src == target.adv_voice)
return target.name
if(!ishuman(target))
return target.name

. = famous_voices?[target.adv_voice.voice_name]
if(.)
return

return get_gender_unknown_name(target.adv_voice.voice_gender)

/datum/voice_model/proc/I_do_remember(mob/target)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/datum/voice_model/proc/I_do_remember(mob/target)
/datum/voice_model/proc/can_remember_voice(mob/target)

Не делаем, а можем ли сделать

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Пупупу

. = famous_voices?[target.adv_voice.voice_name]
if(.)
Comment on lines +140 to +141
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?!
Точка здесь тогда бессмысленна, если мы выводим либо TRUE или FALSE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Точка имеет смысл, иначе вывод неизвестный

return TRUE
return FALSE

//HELPERS

/proc/GenDepartamentVoiceTree(mob/target, list/departments)
var/list/result = list()

for(var/dep_flag in departments) //:catsmile:
result[dep_flag] = list(target.adv_voice.voice_name = target.name)

return result

#undef GENDER_NAME_UNKNOW
5 changes: 5 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1706,6 +1706,11 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
/atom/proc/GetTTSVoice()
return tts_seed

/mob/proc/UpdateVoice()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут названия пороков решили на пофиг сделать.
Сохраняем стиль

Suggested change
/mob/proc/UpdateVoice()
/mob/proc/update_voice()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это стиль с# был

voice_name = GetVoice()
tts_seed = GetTTSVoice()
adv_voice.VoiceUpdate()

/// Passes Stat Browser Panel clicks to the game and calls client click on an atom
/atom/Topic(href, list/href_list)
. = ..()
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/clockwork/clockwork.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ GLOBAL_LIST_EMPTY(all_clockers)
clockwork_cult += clock_mind
clock_mind.current.faction |= "clockwork_cult"
clock_mind.special_role = SPECIAL_ROLE_CLOCKER
clock_mind.special_role_meta_know = TRUE

if(clock_mind.assigned_role == JOB_TITLE_CLOWN)
to_chat(clock_mind.current, "<span class='clockitalic'>A dark power has allowed you to overcome your clownish nature, letting you wield weapons without harming yourself.</span>")
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/cult/cult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ GLOBAL_LIST_EMPTY(all_cults)
cult += cult_mind
cult_mind.current.faction |= "cult"
cult_mind.special_role = SPECIAL_ROLE_CULTIST
cult_mind.special_role_meta_know = TRUE
ADD_TRAIT(cult_mind.current, TRAIT_HEALS_FROM_CULT_PYLONS, CULT_TRAIT)

if(cult_mind.assigned_role == JOB_TITLE_CLOWN)
Expand Down
3 changes: 2 additions & 1 deletion code/game/gamemodes/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ structure_check() searches for nearby cultist structures required for the invoca
convertee.visible_message("<span class='warning'>[convertee] writhes in pain as the markings below them glow a bloody red!</span>", \
"<span class='cultlarge'><i>AAAAAAAAAAAAAA-</i></span>")
SSticker.mode.add_cultist(convertee.mind)
convertee.mind.special_role = "Cultist"
convertee.mind.special_role = "Cultist" //wtf
//convertee.mind.special_role_meta_know = TRUE
to_chat(convertee, "<span class='cultitalic'><b>Your blood pulses. Your head throbs. The world goes red. All at once you are aware of a horrible, horrible, truth. The veil of reality has been ripped away \
and something evil takes root.</b></span>")
to_chat(convertee, "<span class='cultitalic'><b>Assist your new compatriots in their dark dealings. Your goal is theirs, and theirs is yours. You serve [SSticker.cultdat.entity_title3] above all else. Bring it back.\
Expand Down
45 changes: 42 additions & 3 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,60 @@

/**
* Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things.
*/
*/
/datum/game_mode/proc/post_setup()

/*
//Cringe zone start
//Data format JOB = list(Voice_name = name)
var/list/communist_manifest = list()
var/list/capitalist_pig = list()
var/list/head_pigs = list() //capitan
/*
var/list/god_ai_list = list() //for AI
for(var/mob/living/silicon/ai)
if(ai.job = JOB_TITLE_AI && ai.loc.z == STATION_LEVEL)
god_ai_list[ai.voice_name] = ai.name
*/
for(var/mob/living/carbon/human/target)
var/datum/job/prom_job = SSjobs.GetJob(target.job)
var/dep_flag = "[prom_job?.department_flag]"

if(!dep_flag)
continue
if(target.job in GLOB.command_positions)
capitalist_pig[target.GetVoice()] = target.name
if(target.job == JOB_TITLE_CAPTAIN)
head_pigs[target.GetVoice()] = target.name
if(communist_manifest?[dep_flag])
communist_manifest[dep_flag][target.GetVoice()] = target.name
else
communist_manifest[dep_flag] = list(target.GetVoice() = target.name)
for(var/mob/living/carbon/human/target)
var/datum/job/prom_job = SSjobs.GetJob(target.job)
var/dep_flag = "[prom_job?.department_flag]"
if(!dep_flag)
continue
if(communist_manifest?[dep_flag])
if(target.job in GLOB.command_positions)
target.adv_voice.famous_voices = (communist_manifest[dep_flag] + capitalist_pig) - target.GetVoice()
else
target.adv_voice.famous_voices = (communist_manifest[dep_flag] + head_pigs) - target.GetVoice()
//Cringe zone stop
*/
Comment on lines +90 to +127
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?? Такое количество комментов можно не сохранять если нашел другой получше способ
Оставлять в комменты код блока стоит если будет использоваться в будущем или временное отключение, для будущего решения конфликтов. А переписать все заново всегда может пойти на пользу
Стоит убрать всё здесь


spawn(ROUNDSTART_LOGOUT_REPORT_TIME)
display_roundstart_logout_report()


INVOKE_ASYNC(src, PROC_REF(set_mode_in_db)) // Async query, dont bother slowing roundstart

SScargo_quests.roll_start_quests()
generate_station_goals()
GLOB.start_state = new /datum/station_state()
GLOB.start_state.count()
//SEND_GLOBAL_SIGNAL(COMSIG_SPECIAL_MASS_STORE_VOICE, GLOB.capitalist_manifest)
return TRUE


/datum/game_mode/proc/set_mode_in_db() // I wonder what this could do guessing by the name
if(SSticker?.mode && SSdbcore.IsConnected())
var/datum/db_query/query_round_game_mode = SSdbcore.NewQuery("UPDATE round SET game_mode=:gm WHERE id=:rid", list(
Expand Down
2 changes: 2 additions & 0 deletions code/game/jobs/job/central.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
admin_only = 1
outfit = /datum/outfit/job/ntnavyofficer

department = "Sedali"

/datum/job/ntnavyofficer/get_access()
return get_centcom_access(title)

Expand Down
4 changes: 4 additions & 0 deletions code/game/jobs/job/engineering.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#define PRIMITIVE_STATION_DEPARTMENTS list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Support", "Civilian")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А чем это отличается от station_departments? Вроде для того же самого используется.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это используется так как GLOB.station_departaments иницилилизуруется во время запуска, примитив доступен для установки в качестве значения прямо так

/datum/job/chief_engineer
title = JOB_TITLE_CHIEF
flag = JOB_FLAG_CHIEF
Expand Down Expand Up @@ -28,6 +29,9 @@
min_start_money = 400
max_start_money = 700

defoult_dep = FALSE
college_department = PRIMITIVE_STATION_DEPARTMENTS

/datum/outfit/job/chief_engineer
name = "Chief Engineer"
jobtype = /datum/job/chief_engineer
Expand Down
10 changes: 9 additions & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/datum/job

//ПРЕДУПРЕЖДЕНИЕ ВСЕМ И ВСЯ, НЕ ЗАБЫВАЙТЕ ПРОПИСЫВАТЬ ДЕПОРТАМЕНТ В Job_Departamenst.dm ИНАЧЕ НАХУЙ ВСЕ СЛОМАЕТСЯ
//The name of the job
var/title = "NOPE"

Expand Down Expand Up @@ -81,7 +81,15 @@
var/insurance = INSURANCE_STANDART
var/insurance_type = INSURANCE_TYPE_STANDART

var/defoult_dep = TRUE
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var/defoult_dep = TRUE
var/default_dep = TRUE

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

уэээ

var/list/college_department = list() //Указаные отделы будут знать тебя. По умолчанию тебя знает твой отдел

//Only override this proc
/datum/job/New()
if(department && defoult_dep)
college_department.Add(department)


/datum/job/proc/after_spawn(mob/living/carbon/human/H)

/datum/job/proc/announce(mob/living/carbon/human/H)
Expand Down
Loading
Loading