diff --git a/code/game/response_team.dm b/code/game/response_team.dm index ad897f2a028..e26f40bfae4 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -48,23 +48,30 @@ var/can_call_ert if(!send_emergency_team) usr << "No emergency response team is currently being sent." return + /* if(admin_emergency_team) usr << "An emergency response team has already been sent." return */ - if(jobban_isbanned(usr, "Syndicate") || jobban_isbanned(usr, "Emergency Response Team") || jobban_isbanned(usr, "Security Officer")) - usr << "You are jobbanned from the emergency reponse team!" + + if(jobban_isbanned(usr, "Emergency Response Team")) + usr << "You are jobbanned from the emergency reponse team!" + return + + var/responseteam_age = 21 // 21 days to play as an ERT member + var/player_age_check = check_client_age(usr.client, responseteam_age) + if(player_age_check && config.use_age_restriction_for_antags) + usr << "This role is not yet available to you. You need to wait another [player_age_check] days." return if(response_team_members.len > 6) usr << "The emergency response team is already full!" - for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Response Team") L.name = null//Reserving the place. /*var/new_name = alert(usr, "Pick a name","Name") as null|text if(!new_name)//Somebody changed his mind, place is available again. L.name = "Commando" return*/ - if(alert(usr, "Join the ERT?", "Emergency Response Team", "Yes", "No") == "No") + if(alert(usr, "Join the Emergency Response Team?", "Emergency Response Team", "Yes", "No") == "No") L.name = "Response Team" return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 627d9182db6..b23bf771db2 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -55,6 +55,13 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts return 0 return max(0, minimal_player_age_antag - C.player_age) + +/proc/check_client_age(client/C, var/days) // If days isn't provided, returns the age of the client. If it is provided, it returns the days until the player_age is equal to or greater than the days variable + if(!days) + return C.player_age + else + return max(0, days - C.player_age) + return 0 var/const/MAX_SAVE_SLOTS = 10 diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 47b63fee230..fd1067f51c1 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -247,7 +247,7 @@ BLIND // can't see anything var/ignore_maskadjust = 1 var/adjusted_flags = null -//Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption +//Proc that moves gas/breath masks out of the way /obj/item/clothing/mask/proc/adjustmask(var/mob/user) if(!ignore_maskadjust) if(!user.canmove || user.stat || user.restrained()) diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index d886cb0b5a2..0220dcc4d17 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -97,6 +97,12 @@ if(jobban_isbanned(src,"nonhumandept") || jobban_isbanned(src,"Drone")) usr << "\red You are banned from playing drones and cannot spawn as a drone." return + + var/drone_age = 14 // 14 days to play as a drone + var/player_age_check = check_client_age(usr.client, drone_age) + if(player_age_check && config.use_age_restriction_for_antags) + usr << "This role is not yet available to you. You need to wait another [player_age_check] days." + return var/deathtime = world.time - src.timeofdeath var/joinedasobserver = 0