Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Timelocks [SEMI-MODULAR] #28

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 22 additions & 11 deletions code/__DEFINES/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,30 +103,33 @@
#define ROLE_ERT "Emergency Response Team"
#define ROLE_VALHALLA "Valhalla"

GLOBAL_LIST_EMPTY(jobs_command)
GLOBAL_LIST_INIT(jobs_officers, list(CAPTAIN, FIELD_COMMANDER, STAFF_OFFICER, PILOT_OFFICER, MECH_PILOT, CORPORATE_LIAISON, SYNTHETIC, SILICON_AI))
//RUTGMC EDIT BEGIN
GLOBAL_LIST_INIT(jobs_command, list(CAPTAIN, FIELD_COMMANDER, STAFF_OFFICER, SQUAD_LEADER))
GLOBAL_LIST_INIT(jobs_officers, list(CAPTAIN, FIELD_COMMANDER, STAFF_OFFICER, PILOT_OFFICER, MECH_PILOT, CORPORATE_LIAISON, SYNTHETIC, SILICON_AI, SQUAD_LEADER, CHIEF_MEDICAL_OFFICER, CHIEF_SHIP_ENGINEER, REQUISITIONS_OFFICER))
GLOBAL_LIST_INIT(jobs_support, list(PILOT_OFFICER, MECH_PILOT, REQUISITIONS_OFFICER, SYNTHETIC, SILICON_AI))
GLOBAL_LIST_INIT(jobs_engineering, list(CHIEF_SHIP_ENGINEER, SHIP_TECH))
GLOBAL_LIST_INIT(jobs_engineering, list(CHIEF_SHIP_ENGINEER, SHIP_TECH, SQUAD_ENGINEER))

Choose a reason for hiding this comment

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

ГДЕ РАЗДЕЛЕНИЕ НА ОРИГИНАЛ И ЭДИТ? ПОЧЕМУ НЕ В ОТДЕЛЬНОМ ФАЙЛЕ?

GLOBAL_LIST_INIT(jobs_requisitions, list(REQUISITIONS_OFFICER))
GLOBAL_LIST_INIT(jobs_medical, list(CHIEF_MEDICAL_OFFICER, MEDICAL_DOCTOR, MEDICAL_RESEARCHER))
GLOBAL_LIST_INIT(jobs_medical, list(CHIEF_MEDICAL_OFFICER, MEDICAL_DOCTOR, MEDICAL_RESEARCHER, SQUAD_CORPSMAN))
GLOBAL_LIST_INIT(jobs_marines, list(SQUAD_LEADER, SQUAD_SMARTGUNNER, SQUAD_CORPSMAN, SQUAD_ENGINEER, SQUAD_MARINE))
GLOBAL_LIST_INIT(jobs_som, list(SOM_SQUAD_MARINE, SOM_SQUAD_VETERAN, SOM_SQUAD_ENGINEER, SOM_SQUAD_CORPSMAN, SOM_SQUAD_LEADER))
GLOBAL_LIST_INIT(jobs_robots, list(SYNTHETIC, SILICON_AI))
GLOBAL_LIST_INIT(jobs_civilian, list(CORPORATE_LIAISON))
GLOBAL_LIST_INIT(jobs_regular_all, list(CAPTAIN, FIELD_COMMANDER, STAFF_OFFICER, PILOT_OFFICER, MECH_PILOT, REQUISITIONS_OFFICER, CHIEF_SHIP_ENGINEER, \
CHIEF_MEDICAL_OFFICER, SYNTHETIC, SILICON_AI, CORPORATE_LIAISON, SHIP_TECH, \
MEDICAL_DOCTOR, MEDICAL_RESEARCHER, SQUAD_LEADER, SQUAD_SMARTGUNNER, SQUAD_CORPSMAN, SQUAD_ENGINEER, SQUAD_MARINE, \
SOM_SQUAD_MARINE, SOM_SQUAD_VETERAN, SOM_SQUAD_ENGINEER, SOM_SQUAD_CORPSMAN, SOM_SQUAD_LEADER))
//GLOBAL_LIST_INIT(jobs_xenos, list(ROLE_XENOMORPH, ROLE_XENO_QUEEN)) //RUTGMC EDIT: Moved to modular_RUtgmc\code\__DEFINES\jobs.dm
GLOBAL_LIST_INIT(jobs_fallen_marine, typecacheof(list(/datum/job/fallen/marine), TRUE))
MEDICAL_DOCTOR, MEDICAL_RESEARCHER, SQUAD_LEADER, SQUAD_SMARTGUNNER, SQUAD_CORPSMAN, SQUAD_ENGINEER, SQUAD_MARINE, SOM_SQUAD_MARINE, SOM_SQUAD_VETERAN, SOM_SQUAD_ENGINEER, SOM_SQUAD_CORPSMAN, SOM_SQUAD_LEADER))
GLOBAL_LIST_INIT(jobs_som, list(SOM_SQUAD_MARINE, SOM_SQUAD_VETERAN, SOM_SQUAD_ENGINEER, SOM_SQUAD_CORPSMAN, SOM_SQUAD_LEADER))

//Playtime tracking system, see jobs_exp.dm
#define EXP_TYPE_LIVING "Living"
#define EXP_TYPE_REGULAR_ALL "Any"
#define EXP_TYPE_ALL "Any"
#define EXP_TYPE_REGULAR_ALL "Any TMGC"
#define EXP_TYPE_COMMAND "Command"
#define EXP_TYPE_OFFICERS "Officers"
#define EXP_TYPE_ENGINEERING "Engineering"
#define EXP_TYPE_MEDICAL "Medical"
#define EXP_TYPE_MARINES "Marines"
#define EXP_TYPE_REQUISITIONS "Requisitions"
#define EXP_TYPE_SILICON "Silicon"
#define EXP_TYPE_XENO "Xeno"
#define EXP_TYPE_SPECIAL "Special"
#define EXP_TYPE_GHOST "Ghost"
#define EXP_TYPE_ADMIN "Admin"
Expand All @@ -140,11 +143,19 @@ GLOBAL_LIST_INIT(jobs_fallen_marine, typecacheof(list(/datum/job/fallen/marine),
#define CRYO_CHARLIE "Charlie Squad"
#define CRYO_DELTA "Delta Squad"


/* //ORIGINAL
#define XP_REQ_UNSEASONED 60
#define XP_REQ_INTERMEDIATE 180
#define XP_REQ_EXPERIENCED 600
#define XP_REQ_EXPERT 900
*/
#define XP_REQ_NOVICE 300
#define XP_REQ_UNSEASONED 300
#define XP_REQ_INTERMEDIATE 600
#define XP_REQ_EXPERIENCED 2400
#define XP_REQ_EXPERT 2400
#define XP_REQ_SURVIVOR 3600
//RUTGMC EDIT END

// how much a job is going to contribute towards burrowed larva. see config for points required to larva. old balance was 1 larva per 3 humans.
#define LARVA_POINTS_SHIPSIDE 1
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/~RUtgmc_defines/jobs.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#define ROLE_XENO_HUGGER "Xeno Facehugger"

GLOBAL_LIST_INIT(jobs_xenos, list(ROLE_XENOMORPH, ROLE_XENO_QUEEN, ROLE_XENO_HUGGER))
GLOBAL_LIST_INIT(jobs_xeno, list(ROLE_XENOMORPH, ROLE_XENO_QUEEN, ROLE_XENO_HUGGER))
GLOBAL_LIST_INIT(jobs_all, list(CAPTAIN, FIELD_COMMANDER, STAFF_OFFICER, PILOT_OFFICER, REQUISITIONS_OFFICER, CHIEF_SHIP_ENGINEER, CHIEF_MEDICAL_OFFICER, SYNTHETIC, SILICON_AI, CORPORATE_LIAISON, SHIP_TECH,
MEDICAL_DOCTOR, MEDICAL_RESEARCHER, SQUAD_LEADER, SQUAD_SMARTGUNNER, SQUAD_CORPSMAN, SQUAD_ENGINEER, SQUAD_MARINE, ROLE_XENOMORPH, ROLE_XENO_QUEEN, ROLE_XENO_HUGGER))
GLOBAL_LIST_INIT(jobs_fallen_marine, typecacheof(list(/datum/job/fallen/marine)))
27 changes: 25 additions & 2 deletions code/datums/jobs/job/job_exp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,35 @@ GLOBAL_PROTECT(exp_to_update)
return FALSE
if(!CONFIG_GET(flag/use_exp_tracking))
return FALSE
//RUTGMC EDIT BEGIN
if(!CONFIG_GET(flag/use_exp_restrictions)) //ADDITION
return FALSE //ADDITION
//RUTGMC EDIT END

Choose a reason for hiding this comment

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

Неправильно стилизовано, //RUTGMC EDIT BEGIN в самый низ, табов ему не надо, а //ADDITION убрать

if(!SSdbcore.Connect())
return FALSE
if(!exp_requirements || !exp_type)
return FALSE
//RUTGMC EDIT BEGIN
/*

Choose a reason for hiding this comment

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

В одну строчку

if(!job_is_xp_locked(src))
return FALSE
*/
if(CONFIG_GET(flag/use_exp_restrictions_admin_bypass) && check_other_rights(C, R_ADMIN, FALSE))
return FALSE
/* //ORIGINAL

Choose a reason for hiding this comment

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

зачем еще раз коментнул? после /* добавил //

var/my_exp = C.calc_exp_type(get_exp_req_type())
var/job_requirement = get_exp_req_amount()
*/

// Calc client exp and how much do we need
var/my_exp = C.calc_exp_type(exp_type)
var/job_requirement = exp_requirements
if(my_exp >= job_requirement)
return FALSE
else
return (job_requirement - my_exp)


/*
/datum/job/proc/get_exp_req_amount()
if(job_flags & JOB_FLAG_ISCOMMAND)
var/uerhh = CONFIG_GET(number/use_exp_restrictions_command_hours)
Expand All @@ -44,7 +57,8 @@ GLOBAL_PROTECT(exp_to_update)
if(!CONFIG_GET(flag/use_exp_restrictions_other) && !(job.job_flags & JOB_FLAG_ISCOMMAND))
return FALSE
return TRUE

*/
//RUTGMC EDIT END

Choose a reason for hiding this comment

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

Окончание есть, !на доп строчке!, а оглавления нету!


/client/proc/calc_exp_type(exptype)
var/list/explist = prefs.exp.Copy()
Expand Down Expand Up @@ -115,13 +129,22 @@ GLOBAL_PROTECT(exp_to_update)
for(var/j in SSjob.joinable_occupations)
var/datum/job/job = j
if(job.exp_requirements && job.exp_type)
//RUTGMC EDIT BEGIN
/*

Choose a reason for hiding this comment

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

Тоже самое что и с другим

if(!job_is_xp_locked(job))
continue
else if(!job.required_playtime_remaining(mob.client))
*/
if(!job.required_playtime_remaining(mob.client))
jobs_unlocked += job.title
else
/* ORIGINAL
var/xp_req = job.get_exp_req_amount()
jobs_locked += "[job.title] [get_exp_format(text2num(calc_exp_type(job.get_exp_req_type())))] / [get_exp_format(xp_req)] as [job.get_exp_req_type()])"
*/
var/xp_req = job.exp_requirements
jobs_locked += "[job.title] [get_exp_format(text2num(calc_exp_type(job.exp_type)))] / [get_exp_format(xp_req)] as [job.exp_type])"
//RUTGMC EDIT END
if(length(jobs_unlocked))
return_text += "<BR><BR>Jobs Unlocked:<UL><LI>"
return_text += jobs_unlocked.Join("</LI><LI>")
Expand Down
6 changes: 5 additions & 1 deletion code/modules/mob/living/carbon/xenomorph/evolution.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@
return FALSE
var/datum/job/xenojob = SSjob.GetJobType(/datum/job/xenomorph/queen)
if(xenojob.required_playtime_remaining(client))
to_chat(src, span_warning("[get_exp_format(xenojob.required_playtime_remaining(client))] as [xenojob.get_exp_req_type()] required to play queen like roles."))
//RUTGMC EDIT BEGIN
//ORIGINAL

Choose a reason for hiding this comment

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

читабельность 0, слишком много строчек под комиты, не нужные

//to_chat(src, span_warning("[get_exp_format(xenojob.required_playtime_remaining(client))] as [xenojob.get_exp_req_type()] required to play queen like roles."))
to_chat(src, span_warning("[get_exp_format(xenojob.required_playtime_remaining(client))] as [xenojob.exp_type] required to play the queen role."))
//RUTGMC EDIT END
return FALSE

var/min_xenos = new_caste_type.evolve_min_xenos
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/datum/config_entry/flag/use_exp_restrictions

/datum/config_entry/flag/use_exp_restrictions_admin_bypass
18 changes: 18 additions & 0 deletions modular_RUtgmc/code/datums/jobs/job/marines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,21 @@
if(!(title in GLOB.start_squad_landmarks_list[squad]))
return pick(GLOB.start_squad_landmarks_list[squad][SQUAD_MARINE])
return pick(GLOB.start_squad_landmarks_list[squad][title])

/datum/job/terragov/squad/corpsman
exp_type = EXP_TYPE_MEDICAL
exp_requirements = XP_REQ_NOVICE

/datum/job/terragov/squad/engineer
exp_type = EXP_TYPE_MARINES
exp_requirements = XP_REQ_UNSEASONED

/datum/job/terragov/squad/smartgunner
exp_type = EXP_TYPE_MARINES
exp_requirements = XP_REQ_UNSEASONED

/datum/job/terragov/squad/leader
exp_type = EXP_TYPE_MARINES
exp_requirements = XP_REQ_INTERMEDIATE


68 changes: 61 additions & 7 deletions modular_RUtgmc/code/datums/jobs/job/shipside.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@
new_human.equip_to_slot_or_del(new /obj/item/clothing/head/highcap/captain, SLOT_HEAD)
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/marine/satchel/captain_cloak_red/white, SLOT_BACK)


/datum/outfit/job/command/captain
belt = /obj/item/storage/holster/blade/officer/sabre/full
glasses = /obj/item/clothing/glasses/sunglasses/aviator/yellow
head = null
back = FALSE

//Staff officer
/datum/job/terragov/command/staffofficer/after_spawn(mob/living/carbon/new_mob, mob/user, latejoin = FALSE)
..()
Expand Down Expand Up @@ -64,3 +57,64 @@
w_uniform = /obj/item/clothing/under/marine/whites/blacks
shoes = /obj/item/clothing/shoes/laceup

/datum/outfit/job/command/captain
belt = /obj/item/storage/holster/blade/officer/sabre/full
glasses = /obj/item/clothing/glasses/sunglasses/aviator/yellow
head = null

Choose a reason for hiding this comment

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

?

back = FALSE

/datum/job/terragov/engineering/tech
exp_type = EXP_TYPE_MARINES
exp_requirements = XP_REQ_UNSEASONED

/datum/job/terragov/medical/medicalofficer
exp_type = EXP_TYPE_ENGINEERING
exp_requirements = XP_REQ_UNSEASONED

/datum/job/terragov/medical/researcher
exp_type = EXP_TYPE_MEDICAL
exp_requirements = XP_REQ_UNSEASONED

/datum/job/terragov/command/staffofficer
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/command/pilot
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/engineering/chief
exp_type = EXP_TYPE_ENGINEERING
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/requisitions/officer
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/medical/professor
exp_type = EXP_TYPE_MEDICAL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/civilian/liaison
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/silicon/ai
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_INTERMEDIATE

/datum/job/terragov/command/captain
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_EXPERT

/datum/job/terragov/command/fieldcommander
exp_type = EXP_TYPE_COMMAND
exp_requirements = XP_REQ_EXPERT

/datum/job/terragov/command/mech_pilot
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_EXPERT

/datum/job/terragov/silicon/synthetic
exp_type = EXP_TYPE_REGULAR_ALL
exp_requirements = XP_REQ_EXPERT
2 changes: 2 additions & 0 deletions modular_RUtgmc/code/datums/jobs/job/survivor.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/job/survivor
exp_requirements = XP_REQ_SURVIVOR
3 changes: 3 additions & 0 deletions modular_RUtgmc/code/datums/jobs/job/xenomorph.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/datum/job/xenomorph/facehugger
title = ROLE_XENO_HUGGER
job_flags = JOB_FLAG_NOHEADSET|JOB_FLAG_OVERRIDELATEJOINSPAWN

/datum/job/xenomorph/queen
exp_requirements = XP_REQ_INTERMEDIATE
2 changes: 2 additions & 0 deletions modular_RUtgmc/includes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "code\datums\jobs\job\marines.dm"
#include "code\datums\jobs\job\xenomorph.dm"
#include "code\datums\jobs\job\shipside.dm"
#include "code\datums\jobs\job\survivor.dm"
#include "code\datums\jobs\job\clown.dm"
#include "code\datums\jobs\job\militarypolice.dm"
#include "code\datums\status_effects\xeno_buffs.dm"
Expand Down Expand Up @@ -172,3 +173,4 @@
#include "code\datums\keybinding\communication.dm"
#include "code\__HELPERS\text.dm"
#include "code\modules\projectiles\guns\specialist.dm"
#include "code\controllers\configuration\entries\general.dm"