diff --git a/code/_globalvars/lists/mobs.dm b/code/_globalvars/lists/mobs.dm index 8b5657a6f6..1707c3a536 100644 --- a/code/_globalvars/lists/mobs.dm +++ b/code/_globalvars/lists/mobs.dm @@ -1,6 +1,8 @@ GLOBAL_LIST_EMPTY(clients) //all clients GLOBAL_LIST_EMPTY(admins) //all clients whom are admins GLOBAL_PROTECT(admins) +GLOBAL_LIST_EMPTY(mentors) //all clients whom are mentors +GLOBAL_PROTECT(mentors) GLOBAL_LIST_EMPTY(deadmins) //all ckeys who have used the de-admin verb. GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index aab71fd015..a412ad2f48 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -141,6 +141,11 @@ /datum/config_entry/flag/load_legacy_ranks_only //Loads admin ranks only from legacy admin_ranks.txt, while enabled ranks are mirrored to the database protection = CONFIG_ENTRY_LOCKED +/datum/config_entry/flag/mentors_mobname_only + +/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system + protection = CONFIG_ENTRY_LOCKED + /datum/config_entry/string/hostedby /datum/config_entry/flag/norespawn diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index efa6b8b59d..af7ae825f4 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -658,6 +658,46 @@ SUBSYSTEM_DEF(job) message_admins(msg) CRASH(msg) +/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff) + var/mob/the_mob = N + if(!the_mob) + the_mob = M // cause this doesn't get assigned if player is a latejoiner + if(the_mob.client && the_mob.client.prefs && (the_mob.client.prefs.chosen_gear && the_mob.client.prefs.chosen_gear.len)) + if(!ishuman(M))//no silicons allowed + return + for(var/i in the_mob.client.prefs.chosen_gear) + var/datum/gear/G = i + G = GLOB.loadout_items[slot_to_string(initial(G.category))][initial(G.name)] + if(!G) + continue + var/permitted = TRUE + if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles)) + permitted = FALSE + if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey)) + permitted = FALSE + if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs + permitted = FALSE + if(equipbackpackstuff && G.category != SLOT_IN_BACKPACK)//ditto + permitted = FALSE + if(!permitted) + continue + var/obj/item/I = new G.path + if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first + if(iscarbon(M)) + var/mob/living/carbon/C = M + var/obj/item/storage/backpack/B = C.back + if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons. + I.forceMove(get_turf(C)) + else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack + I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob. + +/datum/controller/subsystem/job/proc/FreeRole(rank) + if(!rank) + return + var/datum/job/job = GetJob(rank) + if(!job) + return FALSE + job.current_positions = max(0, job.current_positions - 1) /////////////////////////////////// //Keeps track of all living heads// diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 51a2761f74..fe40b3f01f 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -638,3 +638,11 @@ SUBSYSTEM_DEF(shuttle) C.update_hidden_docking_ports(remove_images, add_images) QDEL_LIST(remove_images) + +/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed. + if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours + SSshuttle.emergency.request(silent = TRUE) + priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority") + log_game("Round time limit reached. Shuttle has been auto-called.") + message_admins("Round time limit reached. Shuttle called.") + emergencyNoRecall = TRUE diff --git a/modular_citadel/code/_globalvars/lists/mobs.dm b/modular_citadel/code/_globalvars/lists/mobs.dm deleted file mode 100644 index 5317685d00..0000000000 --- a/modular_citadel/code/_globalvars/lists/mobs.dm +++ /dev/null @@ -1,2 +0,0 @@ -GLOBAL_LIST_EMPTY(mentors) //all clients whom are admins -GLOBAL_PROTECT(mentors) \ No newline at end of file diff --git a/modular_citadel/code/controllers/configuration/entries/general.dm b/modular_citadel/code/controllers/configuration/entries/general.dm deleted file mode 100644 index 94acd4c48e..0000000000 --- a/modular_citadel/code/controllers/configuration/entries/general.dm +++ /dev/null @@ -1,4 +0,0 @@ -/datum/config_entry/flag/mentors_mobname_only - -/datum/config_entry/flag/mentor_legacy_system //Defines whether the server uses the legacy mentor system with mentors.txt or the SQL system - protection = CONFIG_ENTRY_LOCKED \ No newline at end of file diff --git a/modular_citadel/code/controllers/subsystem/job.dm b/modular_citadel/code/controllers/subsystem/job.dm deleted file mode 100644 index 46aef6f529..0000000000 --- a/modular_citadel/code/controllers/subsystem/job.dm +++ /dev/null @@ -1,40 +0,0 @@ -/datum/controller/subsystem/job/proc/equip_loadout(mob/dead/new_player/N, mob/living/M, equipbackpackstuff) - var/mob/the_mob = N - if(!the_mob) - the_mob = M // cause this doesn't get assigned if player is a latejoiner - if(the_mob.client && the_mob.client.prefs && (the_mob.client.prefs.chosen_gear && the_mob.client.prefs.chosen_gear.len)) - if(!ishuman(M))//no silicons allowed - return - for(var/i in the_mob.client.prefs.chosen_gear) - var/datum/gear/G = i - G = GLOB.loadout_items[slot_to_string(initial(G.category))][initial(G.name)] - if(!G) - continue - var/permitted = TRUE - if(G.restricted_roles && G.restricted_roles.len && !(M.mind.assigned_role in G.restricted_roles)) - permitted = FALSE - if(G.donoritem && !G.donator_ckey_check(the_mob.client.ckey)) - permitted = FALSE - if(!equipbackpackstuff && G.category == SLOT_IN_BACKPACK)//snowflake check since plopping stuff in the backpack doesnt work for pre-job equip loadout stuffs - permitted = FALSE - if(equipbackpackstuff && G.category != SLOT_IN_BACKPACK)//ditto - permitted = FALSE - if(!permitted) - continue - var/obj/item/I = new G.path - if(!M.equip_to_slot_if_possible(I, G.category, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // If the job's dresscode compliant, try to put it in its slot, first - if(iscarbon(M)) - var/mob/living/carbon/C = M - var/obj/item/storage/backpack/B = C.back - if(!B || !SEND_SIGNAL(B, COMSIG_TRY_STORAGE_INSERT, I, null, TRUE, TRUE)) // Otherwise, try to put it in the backpack, for carbons. - I.forceMove(get_turf(C)) - else if(!M.equip_to_slot_if_possible(I, SLOT_IN_BACKPACK, disable_warning = TRUE, bypass_equip_delay_self = TRUE)) // Otherwise, try to put it in the backpack - I.forceMove(get_turf(M)) // If everything fails, just put it on the floor under the mob. - -/datum/controller/subsystem/job/proc/FreeRole(rank) - if(!rank) - return - var/datum/job/job = GetJob(rank) - if(!job) - return FALSE - job.current_positions = max(0, job.current_positions - 1) diff --git a/modular_citadel/code/controllers/subsystem/shuttle.dm b/modular_citadel/code/controllers/subsystem/shuttle.dm deleted file mode 100644 index 567b23f202..0000000000 --- a/modular_citadel/code/controllers/subsystem/shuttle.dm +++ /dev/null @@ -1,7 +0,0 @@ -/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end after 2 hours have passed. - if((world.realtime - SSshuttle.realtimeofstart) > auto_call && EMERGENCY_IDLE_OR_RECALLED) //2 hours - SSshuttle.emergency.request(silent = TRUE) - priority_announce("The shift has come to an end and the shuttle called. [seclevel2num(get_security_level()) == SEC_LEVEL_RED ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [emergency.timeLeft(600)] minutes.", null, "shuttlecalled", "Priority") - log_game("Round time limit reached. Shuttle has been auto-called.") - message_admins("Round time limit reached. Shuttle called.") - emergencyNoRecall = TRUE diff --git a/tgstation.dme b/tgstation.dme index 914bc37000..283496baa6 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2956,16 +2956,12 @@ #include "modular_citadel\code\__HELPERS\list2list.dm" #include "modular_citadel\code\__HELPERS\lists.dm" #include "modular_citadel\code\__HELPERS\mobs.dm" -#include "modular_citadel\code\_globalvars\lists\mobs.dm" #include "modular_citadel\code\_onclick\click.dm" #include "modular_citadel\code\_onclick\item_attack.dm" #include "modular_citadel\code\_onclick\other_mobs.dm" #include "modular_citadel\code\_onclick\hud\screen_objects.dm" #include "modular_citadel\code\_onclick\hud\sprint.dm" #include "modular_citadel\code\_onclick\hud\stamina.dm" -#include "modular_citadel\code\controllers\configuration\entries\general.dm" -#include "modular_citadel\code\controllers\subsystem\job.dm" -#include "modular_citadel\code\controllers\subsystem\shuttle.dm" #include "modular_citadel\code\datums\components\material_container.dm" #include "modular_citadel\code\datums\components\souldeath.dm" #include "modular_citadel\code\datums\mood_events\chem_events.dm"