mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs
# Conflicts: # paradise.dme
This commit is contained in:
@@ -59728,7 +59728,7 @@
|
||||
req_access_txt = "63"
|
||||
},
|
||||
/obj/structure/safe/floor{
|
||||
knownby = list("captain")
|
||||
known_by = list("captain")
|
||||
},
|
||||
/obj/item/gun/projectile/revolver/russian,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium,
|
||||
|
||||
@@ -37724,7 +37724,7 @@
|
||||
/area/security/brig)
|
||||
"bnv" = (
|
||||
/obj/structure/safe{
|
||||
knownby = list("captain")
|
||||
known_by = list("captain")
|
||||
},
|
||||
/obj/item/clothing/head/bearpelt,
|
||||
/obj/item/folder/documents,
|
||||
@@ -44634,7 +44634,7 @@
|
||||
/area/crew_quarters/heads)
|
||||
"byk" = (
|
||||
/obj/structure/safe/floor{
|
||||
knownby = list("captain")
|
||||
known_by = list("captain")
|
||||
},
|
||||
/obj/item/gun/projectile/revolver/russian,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium,
|
||||
|
||||
@@ -28410,7 +28410,7 @@
|
||||
/area/security/nuke_storage)
|
||||
"aZq" = (
|
||||
/obj/structure/safe{
|
||||
knownby = list("captain")
|
||||
known_by = list("captain")
|
||||
},
|
||||
/obj/machinery/light_switch{
|
||||
pixel_y = -23
|
||||
@@ -53021,7 +53021,7 @@
|
||||
/area/engine/gravitygenerator)
|
||||
"bTj" = (
|
||||
/obj/structure/safe/floor{
|
||||
knownby = list("captain")
|
||||
known_by = list("captain")
|
||||
},
|
||||
/obj/item/gun/projectile/revolver/russian,
|
||||
/obj/item/reagent_containers/food/drinks/bottle/absinthe/premium,
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
// old deprecated rusted piece of shit MC
|
||||
// All this does now is misc. world init stuff because too lazy to put it somewhere else
|
||||
// It used to run all of the repeating processes controlling the game but now the SMC and Process Scheduler do that
|
||||
|
||||
var/global/datum/controller/game_controller/master_controller //Set in world.New()
|
||||
|
||||
var/global/controller_iteration = 0
|
||||
var/global/last_tick_duration = 0
|
||||
|
||||
var/global/air_processing_killed = 0
|
||||
var/global/pipe_processing_killed = 0
|
||||
|
||||
/datum/controller/game_controller
|
||||
var/list/shuttle_list // For debugging and VV
|
||||
|
||||
/datum/controller/game_controller/New()
|
||||
//There can be only one master_controller. Out with the old and in with the new.
|
||||
if(master_controller != src)
|
||||
if(istype(master_controller))
|
||||
qdel(master_controller)
|
||||
master_controller = src
|
||||
|
||||
var/watch=0
|
||||
if(!job_master)
|
||||
watch = start_watch()
|
||||
job_master = new /datum/controller/occupations()
|
||||
job_master.SetupOccupations()
|
||||
job_master.LoadJobs("config/jobs.txt")
|
||||
log_startup_progress("Job setup complete in [stop_watch(watch)]s.")
|
||||
|
||||
if(!syndicate_code_phrase) syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response) syndicate_code_response = generate_code_phrase()
|
||||
|
||||
/datum/controller/game_controller/Destroy()
|
||||
..()
|
||||
return QDEL_HINT_HARDDEL_NOW
|
||||
|
||||
/datum/controller/game_controller/proc/setup()
|
||||
setupfactions()
|
||||
setup_economy()
|
||||
|
||||
populate_spawn_points()
|
||||
@@ -14,7 +14,6 @@ SUBSYSTEM_DEF(air)
|
||||
wait = 5
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/cost_turfs = 0
|
||||
var/cost_groups = 0
|
||||
var/cost_highpressure = 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,8 +17,7 @@
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
return
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master",
|
||||
"failsafe","Scheduler","StonedMaster","Ticker","Air","Jobs","Sun","Radio","Configuration","pAI",
|
||||
/client/proc/debug_controller(controller in list("failsafe","Scheduler","StonedMaster","Ticker","Air","Jobs","Sun","Radio","Configuration","pAI",
|
||||
"Cameras","Garbage", "Transfer Controller","Event","Alarm","Nano","Vote","Fires",
|
||||
"Mob","NPC AI","Shuttle","Timer","Weather","Space","Mob Hunt Server"))
|
||||
set category = "Debug"
|
||||
@@ -27,9 +26,6 @@
|
||||
|
||||
if(!holder) return
|
||||
switch(controller)
|
||||
if("Master")
|
||||
debug_variables(master_controller)
|
||||
feedback_add_details("admin_verb","DMC")
|
||||
if("failsafe")
|
||||
debug_variables(Failsafe)
|
||||
feedback_add_details("admin_verb", "dfailsafe")
|
||||
@@ -46,7 +42,7 @@
|
||||
debug_variables(SSair)
|
||||
feedback_add_details("admin_verb","DAir")
|
||||
if("Jobs")
|
||||
debug_variables(job_master)
|
||||
debug_variables(SSjobs)
|
||||
feedback_add_details("admin_verb","DJobs")
|
||||
if("Sun")
|
||||
debug_variables(SSsun)
|
||||
|
||||
@@ -357,7 +357,7 @@ proc/display_roundstart_logout_report()
|
||||
if(L.stat)
|
||||
if(L.suiciding) //Suicider
|
||||
msg += "<b>[L.name]</b> ([L.ckey]), the [L.job] (<font color='red'><b>Suicide</b></font>)\n"
|
||||
job_master.FreeRole(L.job)
|
||||
SSjobs.FreeRole(L.job)
|
||||
message_admins("<b>[key_name_admin(L)]</b>, the [L.job] has been freed due to (<font color='#ffcc00'><b>Early Round Suicide</b></font>)\n")
|
||||
continue //Disconnected client
|
||||
if(L.stat == UNCONSCIOUS)
|
||||
@@ -383,7 +383,7 @@ proc/display_roundstart_logout_report()
|
||||
continue //Lolwhat
|
||||
else
|
||||
msg += "<b>[L.name]</b> ([ckey(D.mind.key)]), the [L.job] (<font color='red'><b>Ghosted</b></font>)\n"
|
||||
job_master.FreeRole(L.job)
|
||||
SSjobs.FreeRole(L.job)
|
||||
message_admins("<b>[key_name_admin(L)]</b>, the [L.job] has been freed due to (<font color='#ffcc00'><b>Early Round Ghosted While Alive</b></font>)\n")
|
||||
continue //Ghosted while alive
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ var/round_start_time = 0
|
||||
var/datum/game_mode/M = config.pick_mode(secret_force_mode)
|
||||
if(M.can_start())
|
||||
src.mode = config.pick_mode(secret_force_mode)
|
||||
job_master.ResetOccupations()
|
||||
SSjobs.ResetOccupations()
|
||||
if(!src.mode)
|
||||
src.mode = pickweight(runnable_modes)
|
||||
if(src.mode)
|
||||
@@ -107,7 +107,7 @@ var/round_start_time = 0
|
||||
to_chat(world, "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby.")
|
||||
mode = null
|
||||
current_state = GAME_STATE_PREGAME
|
||||
job_master.ResetOccupations()
|
||||
SSjobs.ResetOccupations()
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
return 0
|
||||
|
||||
@@ -115,12 +115,12 @@ var/round_start_time = 0
|
||||
src.mode.pre_pre_setup()
|
||||
var/can_continue
|
||||
can_continue = src.mode.pre_setup()//Setup special modes
|
||||
job_master.DivideOccupations() //Distribute jobs
|
||||
SSjobs.DivideOccupations() //Distribute jobs
|
||||
if(!can_continue)
|
||||
qdel(mode)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
to_chat(world, "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby.")
|
||||
job_master.ResetOccupations()
|
||||
SSjobs.ResetOccupations()
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
return 0
|
||||
|
||||
@@ -135,6 +135,7 @@ var/round_start_time = 0
|
||||
src.mode.announce()
|
||||
|
||||
create_characters() //Create player characters and transfer them
|
||||
populate_spawn_points()
|
||||
collect_minds()
|
||||
equip_characters()
|
||||
data_core.manifest()
|
||||
@@ -145,6 +146,7 @@ var/round_start_time = 0
|
||||
|
||||
//here to initialize the random events nicely at round start
|
||||
setup_economy()
|
||||
setupfactions()
|
||||
|
||||
//shuttle_controller.setup_shuttle_docks()
|
||||
|
||||
@@ -375,8 +377,8 @@ var/round_start_time = 0
|
||||
if(player.mind.assigned_role == "Captain")
|
||||
captainless=0
|
||||
if(player.mind.assigned_role != player.mind.special_role)
|
||||
job_master.AssignRank(player, player.mind.assigned_role, 0)
|
||||
job_master.EquipRank(player, player.mind.assigned_role, 0)
|
||||
SSjobs.AssignRank(player, player.mind.assigned_role, 0)
|
||||
SSjobs.EquipRank(player, player.mind.assigned_role, 0)
|
||||
EquipCustomItems(player)
|
||||
if(captainless)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
explanation_text = "Capture"
|
||||
|
||||
/datum/objective/abductee/capture/New()
|
||||
var/list/jobs = job_master.occupations.Copy()
|
||||
var/list/jobs = SSjobs.occupations.Copy()
|
||||
for(var/datum/job/J in jobs)
|
||||
if(J.current_positions < 1)
|
||||
jobs -= J
|
||||
|
||||
@@ -235,9 +235,9 @@
|
||||
return 1
|
||||
|
||||
/datum/outfit/job/proc/imprint_idcard(mob/living/carbon/human/H)
|
||||
var/datum/job/J = job_master.GetJobType(jobtype)
|
||||
var/datum/job/J = SSjobs.GetJobType(jobtype)
|
||||
if(!J)
|
||||
J = job_master.GetJob(H.job)
|
||||
J = SSjobs.GetJob(H.job)
|
||||
|
||||
var/alt_title
|
||||
if(H.mind)
|
||||
|
||||
@@ -72,7 +72,7 @@ var/global/list/role_playtime_requirements = list(
|
||||
|
||||
jtext = "-"
|
||||
if(C.mob.mind && C.mob.mind.assigned_role)
|
||||
theirjob = job_master.GetJob(C.mob.mind.assigned_role)
|
||||
theirjob = SSjobs.GetJob(C.mob.mind.assigned_role)
|
||||
if(theirjob)
|
||||
jtext = theirjob.title
|
||||
msg += "<TD>[jtext]</TD>"
|
||||
@@ -180,7 +180,7 @@ var/global/list/role_playtime_requirements = list(
|
||||
if(config.use_exp_restrictions)
|
||||
var/list/jobs_locked = list()
|
||||
var/list/jobs_unlocked = list()
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(job.exp_requirements && job.exp_type)
|
||||
if(!job.available_in_playtime(mob.client))
|
||||
jobs_unlocked += job.title
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
if(playercount >= highpop_trigger)
|
||||
log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - loading highpop job config");
|
||||
job_master.LoadJobs("config/jobs_highpop.txt")
|
||||
SSjobs.LoadJobs("config/jobs_highpop.txt")
|
||||
else
|
||||
log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config");
|
||||
return 1
|
||||
@@ -69,7 +69,7 @@ var/time_last_changed_position = 0
|
||||
/obj/machinery/computer/card/proc/format_jobs(list/jobs)
|
||||
var/list/formatted = list()
|
||||
for(var/job in jobs)
|
||||
if(job_in_department(job_master.GetJob(job)))
|
||||
if(job_in_department(SSjobs.GetJob(job)))
|
||||
formatted.Add(list(list(
|
||||
"display_name" = replacetext(job, " ", " "),
|
||||
"target_rank" = get_target_rank(),
|
||||
@@ -79,7 +79,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
/obj/machinery/computer/card/proc/format_job_slots()
|
||||
var/list/formatted = list()
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(job_blacklisted_full(job))
|
||||
continue
|
||||
if(!job_in_department(job))
|
||||
@@ -166,7 +166,7 @@ var/time_last_changed_position = 0
|
||||
/obj/machinery/computer/card/proc/can_close_job(datum/job/job)
|
||||
if(job)
|
||||
if(!job_blacklisted_full(job) && !job_blacklisted_partial(job) && job_in_department(job, FALSE))
|
||||
if(job.total_positions > job.current_positions && !(job in job_master.prioritized_jobs))
|
||||
if(job.total_positions > job.current_positions && !(job in SSjobs.prioritized_jobs))
|
||||
var/delta = (world.time / 10) - time_last_changed_position
|
||||
if((change_position_cooldown < delta) || (opened_positions[job.title] > 0))
|
||||
return 1
|
||||
@@ -177,10 +177,10 @@ var/time_last_changed_position = 0
|
||||
/obj/machinery/computer/card/proc/can_prioritize_job(datum/job/job)
|
||||
if(job)
|
||||
if(!job_blacklisted_full(job) && job_in_department(job, FALSE))
|
||||
if(job in job_master.prioritized_jobs)
|
||||
if(job in SSjobs.prioritized_jobs)
|
||||
return 2
|
||||
else
|
||||
if(job_master.prioritized_jobs.len >= 3)
|
||||
if(SSjobs.prioritized_jobs.len >= 3)
|
||||
return 0
|
||||
if(job.total_positions <= job.current_positions)
|
||||
return 0
|
||||
@@ -205,7 +205,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
/obj/machinery/computer/card/proc/get_subordinates(rank, addcivs)
|
||||
var/list/jobs_returned = list()
|
||||
for(var/datum/job/thisjob in job_master.occupations)
|
||||
for(var/datum/job/thisjob in SSjobs.occupations)
|
||||
if(rank in thisjob.department_head)
|
||||
jobs_returned += thisjob.title
|
||||
if(addcivs)
|
||||
@@ -364,10 +364,10 @@ var/time_last_changed_position = 0
|
||||
if(target_dept && modify.assignment == "Unassigned")
|
||||
visible_message("<span class='notice'>[src]: Demoted individuals must see the HoP for a new job.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(modify.rank), FALSE))
|
||||
if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE))
|
||||
visible_message("<span class='notice'>[src]: Cross-department job transfers must be done by the HoP.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(t1)))
|
||||
if(!job_in_department(SSjobs.GetJob(t1)))
|
||||
return 0
|
||||
if(t1 == "Custom")
|
||||
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
|
||||
@@ -473,7 +473,7 @@ var/time_last_changed_position = 0
|
||||
if(modify.assignment == "Unassigned")
|
||||
visible_message("<span class='notice'>[src]: Unassigned crew cannot be demoted any further. If further action is warranted, ask the Captain about Termination.</span>")
|
||||
return 0
|
||||
if(!job_in_department(job_master.GetJob(modify.rank), FALSE))
|
||||
if(!job_in_department(SSjobs.GetJob(modify.rank), FALSE))
|
||||
visible_message("<span class='notice'>[src]: Heads may only demote members of their own department.</span>")
|
||||
return 0
|
||||
|
||||
@@ -494,7 +494,7 @@ var/time_last_changed_position = 0
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
var/datum/job/j = SSjobs.GetJob(edit_job_target)
|
||||
if(!job_in_department(j, FALSE))
|
||||
return 0
|
||||
if(!j)
|
||||
@@ -513,7 +513,7 @@ var/time_last_changed_position = 0
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
var/datum/job/j = SSjobs.GetJob(edit_job_target)
|
||||
if(!job_in_department(j, FALSE))
|
||||
return 0
|
||||
if(!j)
|
||||
@@ -533,17 +533,17 @@ var/time_last_changed_position = 0
|
||||
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
|
||||
if(is_authenticated(usr) && !target_dept)
|
||||
var/priority_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(priority_target)
|
||||
var/datum/job/j = SSjobs.GetJob(priority_target)
|
||||
if(!j)
|
||||
return 0
|
||||
if(!job_in_department(j))
|
||||
return 0
|
||||
var/priority = TRUE
|
||||
if(j in job_master.prioritized_jobs)
|
||||
job_master.prioritized_jobs -= j
|
||||
if(j in SSjobs.prioritized_jobs)
|
||||
SSjobs.prioritized_jobs -= j
|
||||
priority = FALSE
|
||||
else if(job_master.prioritized_jobs.len < 3)
|
||||
job_master.prioritized_jobs += j
|
||||
else if(SSjobs.prioritized_jobs.len < 3)
|
||||
SSjobs.prioritized_jobs += j
|
||||
else
|
||||
return 0
|
||||
log_game("[key_name(usr)] [priority ? "prioritized" : "unprioritized"] the job \"[j.title]\".")
|
||||
|
||||
@@ -397,7 +397,7 @@
|
||||
//Handle job slot/tater cleanup.
|
||||
var/job = occupant.mind.assigned_role
|
||||
|
||||
job_master.FreeRole(job)
|
||||
SSjobs.FreeRole(job)
|
||||
|
||||
if(occupant.mind.objectives.len)
|
||||
occupant.mind.objectives.Cut()
|
||||
|
||||
@@ -284,7 +284,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
if(12)
|
||||
var/list/jobs = list()
|
||||
data["jobs"] = jobs
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(job_blacklisted(job))
|
||||
continue
|
||||
if(job.is_position_available())
|
||||
|
||||
@@ -47,7 +47,11 @@
|
||||
|
||||
var/A
|
||||
|
||||
A = input(user, "Area to jump to", "BOOYEA", A) in teleportlocs
|
||||
A = input(user, "Area to jump to", "BOOYEA", A) as null|anything in teleportlocs
|
||||
|
||||
if(!A)
|
||||
return
|
||||
|
||||
var/area/thearea = teleportlocs[A]
|
||||
|
||||
if(user.stat || user.restrained())
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
CONTAINS:
|
||||
SAFES
|
||||
FLOOR SAFES
|
||||
Safe Codes
|
||||
Safe Internals
|
||||
SAFE INTERNALS
|
||||
SAFE CODES
|
||||
*/
|
||||
|
||||
GLOBAL_LIST_EMPTY(safes)
|
||||
@@ -11,21 +11,26 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
//SAFES
|
||||
/obj/structure/safe
|
||||
name = "\improper Safe"
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms - 2 tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
desc = "A huge chunk of metal with a dial embedded in it. Fine print on the dial reads \"Scarborough Arms tumbler safe, guaranteed thermite resistant, explosion resistant, and assistant resistant.\""
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
icon_state = "safe"
|
||||
anchored = 1
|
||||
density = 1
|
||||
var/open = FALSE //is the safe open?
|
||||
|
||||
anchored = TRUE
|
||||
density = TRUE
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF
|
||||
unacidable = TRUE
|
||||
|
||||
var/open = FALSE
|
||||
var/locked = TRUE
|
||||
var/tumbler_1_pos //the tumbler position- from 0 to 72
|
||||
var/tumbler_1_open //the tumbler position to open at- 0 to 72
|
||||
var/tumbler_2_pos
|
||||
var/tumbler_2_open
|
||||
var/open_pos
|
||||
var/dial = 0 //where is the dial pointing?
|
||||
var/space = 0 //the combined w_class of everything in the safe
|
||||
var/maxspace = 24 //the maximum combined w_class of stuff in the safe
|
||||
var/dial = 0 // The position the dial is pointing to.
|
||||
|
||||
var/number_of_tumblers = 3 // The amount of tumblers that will be generated.
|
||||
var/list/tumblers = list() // The list of tumbler dial positions that need to be hit.
|
||||
var/list/current_tumbler_index = 1 // The index in the tumblers list of the tumbler dial position that needs to be hit.
|
||||
|
||||
var/space = 0 // The combined w_class of everything in the safe.
|
||||
var/maxspace = 24 // The maximum combined w_class of stuff in the safe.
|
||||
|
||||
var/obj/item/thermal_drill/drill = null
|
||||
var/drill_timer
|
||||
var/time_to_drill
|
||||
@@ -33,49 +38,81 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
var/drill_start_time
|
||||
var/drill_x_offset = -13
|
||||
var/drill_y_offset = -3
|
||||
var/knownby = list()
|
||||
var/known_by = list()
|
||||
|
||||
var/image/progress_bar
|
||||
var/image/drill_overlay
|
||||
|
||||
/obj/structure/safe/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
/obj/structure/safe/New()
|
||||
GLOB.safes += src
|
||||
tumbler_1_pos = rand(0, 71)
|
||||
tumbler_1_open = rand(0, 71)
|
||||
|
||||
tumbler_2_pos = rand(0, 71) // first value in the combination set first
|
||||
tumbler_2_open = rand(0, 71)
|
||||
|
||||
/obj/structure/safe/Initialize()
|
||||
..()
|
||||
for(var/i in 1 to number_of_tumblers)
|
||||
tumblers.Add(rand(0, 99))
|
||||
|
||||
for(var/obj/item/I in loc)
|
||||
if(space >= maxspace)
|
||||
return
|
||||
if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
I.loc = src
|
||||
I.forceMove(src)
|
||||
|
||||
/obj/structure/safe/Destroy()
|
||||
GLOB.safes -= src
|
||||
drill?.soundloop?.stop()
|
||||
drill?.forceMove(loc)
|
||||
drill = null
|
||||
|
||||
qdel(progress_bar)
|
||||
qdel(drill_overlay)
|
||||
return ..()
|
||||
|
||||
/obj/structure/safe/process()
|
||||
if(drill_timer)
|
||||
cut_overlay(progress_bar)
|
||||
progress_bar = image('icons/effects/progessbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
add_overlay(progress_bar)
|
||||
if(prob(15))
|
||||
drill.spark_system.start()
|
||||
|
||||
/obj/structure/safe/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
to_chat(user, "This model appears to have [number_of_tumblers] tumblers.")
|
||||
if(open)
|
||||
to_chat(user, "The inside of the the door has numbers written on it: <b>[get_combination()]</b>")
|
||||
|
||||
/obj/structure/safe/blob_act()
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/structure/safe/examine_status(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/proc/check_unlocked()
|
||||
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open && dial == open_pos)
|
||||
if(current_tumbler_index > number_of_tumblers)
|
||||
locked = FALSE
|
||||
visible_message("<span class='boldnotice'>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</span>")
|
||||
return TRUE
|
||||
|
||||
locked = TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/structure/safe/proc/make_noise(turns, turns_total, tum1 = 0, tum2 = 0, mob/user, canhear)
|
||||
if(user && canhear)
|
||||
if(turns == 2)
|
||||
to_chat(user, "<span class='italics'>The sounds from [src] are too fast and blend together.</span>")
|
||||
if(tum1 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("clack", "scrape", "clank")] from [src].</span>")
|
||||
if(tum2 && (turns_total == 1 || prob(10))) // So multi turns dont super spam the chat
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("click", "chink", "clink")] from [src].</span>")
|
||||
if(tumbler_1_pos == tumbler_1_open && turns_total == 1 && tum1) // You cant hear tumblers if you spin fast!
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tonk", "krunk", "plunk")] from [src].</span>")
|
||||
if(tumbler_2_pos == tumbler_2_open && turns_total == 1 && tum2) // You cant hear tumblers if you spin fast!
|
||||
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
|
||||
if(!locked)
|
||||
if(user)
|
||||
visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
|
||||
/obj/structure/safe/proc/get_combination()
|
||||
var/combination = ""
|
||||
var/looped = 0
|
||||
|
||||
for(var/tumbler in tumblers)
|
||||
looped++
|
||||
combination += "[tumbler]"
|
||||
|
||||
if(looped < LAZYLEN(tumblers))
|
||||
combination += ", "
|
||||
|
||||
return combination
|
||||
|
||||
/obj/structure/safe/update_icon()
|
||||
if(open)
|
||||
@@ -88,21 +125,32 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
icon_state = "[initial(icon_state)]-broken"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
overlays.Cut()
|
||||
if(istype(drill, /obj/item/thermal_drill/diamond_drill))
|
||||
|
||||
var/list/overlays_to_cut = list(drill_overlay)
|
||||
if(!drill_timer)
|
||||
overlays_to_cut += progress_bar
|
||||
|
||||
cut_overlay(overlays_to_cut)
|
||||
|
||||
if(istype(drill, /obj/item/thermal_drill))
|
||||
var/drill_icon = istype(drill, /obj/item/thermal_drill/diamond_drill) ? "d" : "h"
|
||||
if(drill_timer)
|
||||
overlays += image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_d-drill-on", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-on", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
else
|
||||
overlays += image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_d-drill-off", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
else if(istype(drill, /obj/item/thermal_drill))
|
||||
if(drill_timer)
|
||||
overlays += image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_h-drill-on", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
else
|
||||
overlays += image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_h-drill-off", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
drill_overlay = image(icon = 'icons/effects/drill.dmi', icon_state = "[initial(icon_state)]_[drill_icon]-drill-off", pixel_x = drill_x_offset, pixel_y = drill_y_offset)
|
||||
|
||||
add_overlay(drill_overlay)
|
||||
|
||||
/obj/structure/safe/attack_ghost(mob/user)
|
||||
if(..() || drill)
|
||||
return TRUE
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/structure/safe/attack_hand(mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
if(drill)
|
||||
switch(alert("What would you like to do?", "Thermal Drill", "Turn [drill_timer ? "Off" : "On"]", "Remove Drill", "Cancel"))
|
||||
if("Turn On")
|
||||
@@ -130,7 +178,6 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
return
|
||||
else
|
||||
ui_interact(user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
@@ -146,30 +193,39 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
for(var/obj/O in contents)
|
||||
contents_names[++contents_names.len] = list("name" = O.name, "index" = contents.Find(O), "sprite" = O.icon_state)
|
||||
user << browse_rsc(icon(O.icon, O.icon_state), "[O.icon_state].png")
|
||||
else
|
||||
contents_names = list(list("name" = "you're"), list("name" = "a"), list("name" = "cheater"))
|
||||
|
||||
data["dial"] = dial
|
||||
data["open"] = open
|
||||
data["locked"] = locked
|
||||
data["rotation"] = "[-dial*3.6]deg"
|
||||
data["rotation"] = "[-dial * 3.6]deg"
|
||||
data["contents"] = contents_names
|
||||
|
||||
return data
|
||||
|
||||
/obj/structure/safe/proc/notify_user(user, canhear, sounds, total_ticks, current_tick)
|
||||
if(!canhear)
|
||||
return
|
||||
|
||||
if(current_tick == 2)
|
||||
to_chat(user, "<span class='italics'>The sounds from [src] are too fast and blend together.</span>")
|
||||
|
||||
if(total_ticks == 1 || prob(10))
|
||||
to_chat(user, "<span class='italics'>You hear a [pick(sounds)] from [src].</span>")
|
||||
|
||||
/obj/structure/safe/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
var/canhear = 0
|
||||
if(!ishuman(usr))
|
||||
to_chat(usr, "You don't have hands to operate the safe!")
|
||||
return FALSE
|
||||
var/mob/user = usr
|
||||
if(!user.IsAdvancedToolUser() && !isobserver(user))
|
||||
to_chat(user, "<span class='warning'>You're not able to operate the safe.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
|
||||
canhear = 1
|
||||
var/canhear = FALSE
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.can_hear() && H.is_in_hands(/obj/item/clothing/accessory/stethoscope))
|
||||
canhear = TRUE
|
||||
|
||||
if(href_list["open"])
|
||||
if(check_unlocked() || open || broken)
|
||||
@@ -177,52 +233,65 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
open = !open
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't open [src], the lock is engaged!</span>")
|
||||
.= TRUE
|
||||
SSnanoui.update_uis(src)
|
||||
to_chat(user, "<span class='warning'>You can't open [src], as its lock is engaged!</span>")
|
||||
|
||||
if(href_list["decrement"])
|
||||
var/ticks = text2num(href_list["decrement"])
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnright"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "The dial will not turn, the mechanism is destroyed.")
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
for(var/i=1 to ticks)
|
||||
if(!check_unlocked())
|
||||
dial = Wrap(dial - 1, 0 ,100)
|
||||
if(dial == tumbler_1_pos + 1 || dial == tumbler_1_pos - 99)
|
||||
tumbler_1_pos = Wrap(tumbler_1_pos - 1, 0, 100)
|
||||
make_noise(i, ticks, 1, 0, user, canhear)
|
||||
if(tumbler_1_pos == tumbler_2_pos + 51 || tumbler_1_pos == tumbler_2_pos - 49)
|
||||
tumbler_2_pos = Wrap(tumbler_2_pos - 1, 0, 100)
|
||||
make_noise(0, ticks, 0, 1, user, canhear)
|
||||
|
||||
var/ticks = text2num(href_list["turnright"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial - 1, 0, 100)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 == 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tink", "krink", "plink"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("clack", "scrape", "clank"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked()
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
make_noise(0, 0, 0, 0, user, canhear)
|
||||
.= TRUE
|
||||
|
||||
if(href_list["increment"])
|
||||
var/ticks = text2num(href_list["increment"])
|
||||
. = TRUE
|
||||
|
||||
if(href_list["turnleft"])
|
||||
if(open)
|
||||
return
|
||||
|
||||
if(broken)
|
||||
to_chat(user, "The dial will not turn, the mechanism is destroyed.")
|
||||
to_chat(user, "<span class='warning'>The dial will not turn, as the mechanism is destroyed.</span>")
|
||||
return
|
||||
for(var/i=1 to ticks)
|
||||
check_unlocked()
|
||||
|
||||
var/ticks = text2num(href_list["turnleft"])
|
||||
for(var/i = 1 to ticks)
|
||||
dial = Wrap(dial + 1, 0, 100)
|
||||
if(dial == tumbler_1_pos - 1 || dial == tumbler_1_pos + 99)
|
||||
tumbler_1_pos = Wrap(tumbler_1_pos + 1, 0, 100)
|
||||
make_noise(i, ticks, 1, 0, user, canhear)
|
||||
if(tumbler_1_pos == tumbler_2_pos - 51 || tumbler_1_pos == tumbler_2_pos + 49)
|
||||
tumbler_2_pos = Wrap(tumbler_2_pos + 1, 0, 100)
|
||||
make_noise(0, ticks, 0, 1, user, canhear)
|
||||
|
||||
var/invalid_turn = current_tumbler_index % 2 != 0 || current_tumbler_index > number_of_tumblers
|
||||
if(invalid_turn) // The moment you turn the wrong way or go too far, the tumblers reset
|
||||
current_tumbler_index = 1
|
||||
|
||||
if(!invalid_turn && dial == tumblers[current_tumbler_index])
|
||||
notify_user(user, canhear, list("tonk", "krunk", "plunk"), ticks, i)
|
||||
current_tumbler_index++
|
||||
else
|
||||
notify_user(user, canhear, list("click", "chink", "clink"), ticks, i)
|
||||
|
||||
sleep(1)
|
||||
check_unlocked(user, canhear)
|
||||
SSnanoui.update_uis(src)
|
||||
make_noise(0, 0, 0, 0, user, canhear)
|
||||
.= TRUE
|
||||
|
||||
. = TRUE
|
||||
|
||||
if(href_list["retrieve"])
|
||||
var/index = text2num(href_list["retrieve"])
|
||||
@@ -232,52 +301,7 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
if(P && in_range(src, user))
|
||||
user.put_in_hands(P)
|
||||
space -= P.w_class
|
||||
SSnanoui.update_uis(src)
|
||||
.= TRUE
|
||||
|
||||
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
|
||||
to_chat(user, "You replace the broken mechanism.")
|
||||
qdel(I)
|
||||
broken = !broken
|
||||
update_icon()
|
||||
return
|
||||
else if(I.w_class + space <= maxspace)
|
||||
space += I.w_class
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.loc = src
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
updateUsrDialog()
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
return
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/thermal_drill))
|
||||
if(drill)
|
||||
to_chat(user, "There is already a drill attached!")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.loc = src
|
||||
drill = I
|
||||
time_to_drill = 300 SECONDS * drill.time_multiplier
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't put [I] in into the safe while it is closed!</span>")
|
||||
return
|
||||
. = TRUE
|
||||
|
||||
/obj/structure/safe/proc/drill_open()
|
||||
broken = TRUE
|
||||
@@ -286,50 +310,58 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
update_icon()
|
||||
processing_objects.Remove(src)
|
||||
|
||||
/obj/structure/safe/blob_act()
|
||||
return
|
||||
|
||||
/obj/structure/safe/ex_act(severity)
|
||||
return
|
||||
|
||||
/obj/structure/safe/examine_status(mob/user)
|
||||
return
|
||||
|
||||
/obj/structure/safe/Destroy()
|
||||
GLOB.safes -= src
|
||||
drill?.soundloop?.stop()
|
||||
return ..()
|
||||
|
||||
/obj/structure/safe/process()
|
||||
if(drill_timer)
|
||||
overlays -= bar
|
||||
bar = image('icons/effects/progessbar.dmi', src, "prog_bar_[round((((world.time - drill_start_time) / time_to_drill) * 100), 5)]", HUD_LAYER)
|
||||
overlays += bar
|
||||
if(prob(15))
|
||||
drill.spark_system.start()
|
||||
|
||||
/obj/structure/safe/examine(mob/user)
|
||||
..()
|
||||
/obj/structure/safe/attackby(obj/item/I, mob/user, params)
|
||||
if(open)
|
||||
to_chat(user, "On the inside of the the door is <b>[tumbler_1_open] - [tumbler_2_open]</b>")
|
||||
if(broken && istype(I, /obj/item/safe_internals) && do_after(user, 2 SECONDS, target = src))
|
||||
to_chat(user, "<span class='notice'>You replace the broken mechanism.</span>")
|
||||
qdel(I)
|
||||
broken = !broken
|
||||
update_icon()
|
||||
else if(I.w_class + space <= maxspace)
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
space += I.w_class
|
||||
I.forceMove(src)
|
||||
to_chat(user, "<span class='notice'>You put [I] in [src].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[I] won't fit in [src].</span>")
|
||||
else
|
||||
if(istype(I, /obj/item/clothing/accessory/stethoscope))
|
||||
to_chat(user, "<span class='warning'>Hold [I] in one of your hands while you manipulate the dial!</span>")
|
||||
return
|
||||
else if(istype(I, /obj/item/thermal_drill))
|
||||
if(drill)
|
||||
to_chat(user, "<span class='warning'>There is already a drill attached!</span>")
|
||||
else if(do_after(user, 2 SECONDS, target = src))
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>[I] is stuck to your hand, you cannot put it in the safe!</span>")
|
||||
return
|
||||
I.forceMove(src)
|
||||
drill = I
|
||||
time_to_drill = 300 SECONDS * drill.time_multiplier
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't put [I] into the safe while it is closed!</span>")
|
||||
return
|
||||
|
||||
//FLOOR SAFES
|
||||
/obj/structure/safe/floor
|
||||
name = "floor safe"
|
||||
icon_state = "floorsafe"
|
||||
density = 0
|
||||
level = 1 //underfloor
|
||||
layer = 2.5
|
||||
density = FALSE
|
||||
level = 1 //Under the floor
|
||||
layer = LOW_OBJ_LAYER
|
||||
drill_x_offset = -1
|
||||
drill_y_offset = 20
|
||||
|
||||
/obj/structure/safe/floor/Initialize()
|
||||
..()
|
||||
. = ..()
|
||||
var/turf/T = loc
|
||||
hide(T.intact)
|
||||
|
||||
/obj/structure/safe/floor/hide(var/intact)
|
||||
invisibility = intact ? 101 : 0
|
||||
/obj/structure/safe/floor/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
|
||||
/obj/item/safe_internals
|
||||
name = "safe internals"
|
||||
@@ -341,14 +373,14 @@ GLOBAL_LIST_EMPTY(safes)
|
||||
var/owner
|
||||
info = "<div style='text-align:center;'><img src='ntlogo.png'><center><h3>Safe Codes</h3></center>"
|
||||
|
||||
/obj/item/paper/safe_code/New()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/populate_codes), 10)
|
||||
/obj/item/paper/safe_code/Initialize(mapload)
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/item/paper/safe_code/proc/populate_codes()
|
||||
/obj/item/paper/safe_code/LateInitialize(mapload)
|
||||
. = ..()
|
||||
for(var/safe in GLOB.safes)
|
||||
var/obj/structure/safe/S = safe
|
||||
if(owner in S.knownby)
|
||||
info += "<br> The combination for the safe located in the [get_area(S).name] is: [S.tumbler_1_open] - [S.tumbler_2_open]]<br>"
|
||||
if(owner in S.known_by)
|
||||
info += "<br> The combination for the safe located in the [get_area(S).name] is: [S.get_combination()]<br>"
|
||||
info_links = info
|
||||
update_icon()
|
||||
update_icon()
|
||||
+4
-2
@@ -31,13 +31,15 @@ var/global/list/map_transition_config = MAP_TRANSITION_CONFIG
|
||||
Master.Initialize(10, FALSE)
|
||||
|
||||
processScheduler = new
|
||||
master_controller = new /datum/controller/game_controller()
|
||||
spawn(1)
|
||||
processScheduler.deferSetupFor(/datum/controller/process/ticker)
|
||||
processScheduler.setup()
|
||||
|
||||
master_controller.setup()
|
||||
|
||||
if(!syndicate_code_phrase)
|
||||
syndicate_code_phrase = generate_code_phrase()
|
||||
if(!syndicate_code_response)
|
||||
syndicate_code_response = generate_code_phrase()
|
||||
if(using_map && using_map.name)
|
||||
map_name = "[using_map.name]"
|
||||
else
|
||||
|
||||
@@ -681,24 +681,6 @@ var/list/admin_verbs_ticket = list(
|
||||
|
||||
feedback_add_details("admin_verb","OT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/kill_air() // -- TLE
|
||||
set category = "Debug"
|
||||
set name = "Kill Air"
|
||||
set desc = "Toggle Air Processing"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(air_processing_killed)
|
||||
air_processing_killed = 0
|
||||
to_chat(usr, "<b>Enabled air processing.</b>")
|
||||
else
|
||||
air_processing_killed = 1
|
||||
to_chat(usr, "<b>Disabled air processing.</b>")
|
||||
feedback_add_details("admin_verb","KA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
log_admin("[key_name(usr)] used 'kill air'.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] used 'kill air'.</span>", 1)
|
||||
|
||||
/client/proc/deadmin_self()
|
||||
set name = "De-admin self"
|
||||
set category = "Admin"
|
||||
@@ -888,7 +870,7 @@ var/list/admin_verbs_ticket = list(
|
||||
return
|
||||
|
||||
var/list/jobs = list()
|
||||
for(var/datum/job/J in job_master.occupations)
|
||||
for(var/datum/job/J in SSjobs.occupations)
|
||||
if(J.current_positions >= J.total_positions && J.total_positions != -1)
|
||||
jobs += J.title
|
||||
if(!jobs.len)
|
||||
@@ -896,7 +878,7 @@ var/list/admin_verbs_ticket = list(
|
||||
return
|
||||
var/job = input("Please select job slot to free", "Free Job Slot") as null|anything in jobs
|
||||
if(job)
|
||||
job_master.FreeRole(job)
|
||||
SSjobs.FreeRole(job)
|
||||
log_admin("[key_name(usr)] has freed a job slot for [job].")
|
||||
message_admins("[key_name_admin(usr)] has freed a job slot for [job].")
|
||||
|
||||
|
||||
+24
-24
@@ -491,8 +491,8 @@
|
||||
if(!M.ckey) //sanity
|
||||
to_chat(usr, "This mob has no ckey")
|
||||
return
|
||||
if(!job_master)
|
||||
to_chat(usr, "Job Master has not been setup!")
|
||||
if(!SSjobs)
|
||||
to_chat(usr, "SSjobs has not been setup!")
|
||||
return
|
||||
|
||||
var/dat = ""
|
||||
@@ -512,7 +512,7 @@
|
||||
jobs += "<tr align='center' bgcolor='ccccff'><th colspan='[length(command_positions)]'><a href='?src=[UID()];jobban3=commanddept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Command Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in command_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -533,7 +533,7 @@
|
||||
jobs += "<tr bgcolor='ffddf0'><th colspan='[length(security_positions)]'><a href='?src=[UID()];jobban3=securitydept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Security Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in security_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -554,7 +554,7 @@
|
||||
jobs += "<tr bgcolor='fff5cc'><th colspan='[length(engineering_positions)]'><a href='?src=[UID()];jobban3=engineeringdept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Engineering Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in engineering_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -575,7 +575,7 @@
|
||||
jobs += "<tr bgcolor='ffeef0'><th colspan='[length(medical_positions)]'><a href='?src=[UID()];jobban3=medicaldept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Medical Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in medical_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -596,7 +596,7 @@
|
||||
jobs += "<tr bgcolor='e79fff'><th colspan='[length(science_positions)]'><a href='?src=[UID()];jobban3=sciencedept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Science Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in science_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -617,7 +617,7 @@
|
||||
jobs += "<tr bgcolor='dddddd'><th colspan='[length(support_positions)]'><a href='?src=[UID()];jobban3=supportdept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Support Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in support_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -638,7 +638,7 @@
|
||||
jobs += "<tr bgcolor='ccffcc'><th colspan='[length(nonhuman_positions)+1]'><a href='?src=[UID()];jobban3=nonhumandept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Non-human Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -707,7 +707,7 @@
|
||||
jobs += "<tr bgcolor='dddddd'><th colspan='[length(whitelisted_positions)]'><a href='?src=[UID()];jobban3=whitelistdept;jobban4=[M.UID()];dbbanaddckey=[M.ckey]'>Whitelisted Positions</a></th></tr><tr align='center'>"
|
||||
for(var/jobPos in whitelisted_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/job = job_master.GetJob(jobPos)
|
||||
var/datum/job/job = SSjobs.GetJob(jobPos)
|
||||
if(!job) continue
|
||||
|
||||
if(jobban_isbanned(M, job.title))
|
||||
@@ -743,8 +743,8 @@
|
||||
|
||||
var/ban_ckey_param = href_list["dbbanaddckey"]
|
||||
|
||||
if(!job_master)
|
||||
to_chat(usr, "Job Master has not been setup!")
|
||||
if(!SSjobs)
|
||||
to_chat(usr, "SSjobs has not been setup!")
|
||||
return
|
||||
|
||||
//get jobs for department if specified, otherwise just returnt he one job in a list.
|
||||
@@ -753,50 +753,50 @@
|
||||
if("commanddept")
|
||||
for(var/jobPos in command_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("securitydept")
|
||||
for(var/jobPos in security_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("engineeringdept")
|
||||
for(var/jobPos in engineering_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("medicaldept")
|
||||
for(var/jobPos in medical_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("sciencedept")
|
||||
for(var/jobPos in science_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("supportdept")
|
||||
for(var/jobPos in support_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("nonhumandept")
|
||||
joblist += "pAI"
|
||||
for(var/jobPos in nonhuman_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
if("whitelistdept")
|
||||
for(var/jobPos in whitelisted_positions)
|
||||
if(!jobPos) continue
|
||||
var/datum/job/temp = job_master.GetJob(jobPos)
|
||||
var/datum/job/temp = SSjobs.GetJob(jobPos)
|
||||
if(!temp) continue
|
||||
joblist += temp.title
|
||||
else
|
||||
@@ -2935,11 +2935,11 @@
|
||||
usr << browse(dat, "window=lawchanges;size=800x500")
|
||||
if("list_job_debug")
|
||||
var/dat = "<B>Job Debug info.</B><HR>"
|
||||
if(job_master)
|
||||
for(var/line in job_master.job_debug)
|
||||
if(SSjobs)
|
||||
for(var/line in SSjobs.job_debug)
|
||||
dat += "[line]<BR>"
|
||||
dat+= "*******<BR><BR>"
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(!job) continue
|
||||
dat += "job: [job.title], current_positions: [job.current_positions], total_positions: [job.total_positions] <BR>"
|
||||
usr << browse(dat, "window=jobdebug;size=600x500")
|
||||
@@ -3029,7 +3029,7 @@
|
||||
M.req_one_access = list(access_brig,access_engine)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
|
||||
if("infinite_sec")
|
||||
var/datum/job/J = job_master.GetJob("Security Officer")
|
||||
var/datum/job/J = SSjobs.GetJob("Security Officer")
|
||||
if(!J) return
|
||||
J.total_positions = -1
|
||||
J.spawn_positions = -1
|
||||
|
||||
@@ -612,7 +612,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/datum/job/jobdatum
|
||||
if(dresscode == "as job...")
|
||||
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
|
||||
jobdatum = job_master.GetJob(jobname)
|
||||
jobdatum = SSjobs.GetJob(jobname)
|
||||
|
||||
feedback_add_details("admin_verb", "SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
if(dostrip)
|
||||
|
||||
@@ -435,8 +435,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
//Now for special roles and equipment.
|
||||
switch(new_character.mind.special_role)
|
||||
if("traitor")
|
||||
job_master.AssignRank(new_character, new_character.mind.assigned_role, 0)
|
||||
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
SSjobs.AssignRank(new_character, new_character.mind.assigned_role, 0)
|
||||
SSjobs.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
||||
ticker.mode.equip_traitor(new_character)
|
||||
if("Wizard")
|
||||
new_character.loc = pick(wizardstart)
|
||||
@@ -466,8 +466,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
call(/datum/game_mode/proc/add_law_zero)(new_character)
|
||||
//Add aliens.
|
||||
else
|
||||
job_master.AssignRank(new_character, new_character.mind.assigned_role, 0)
|
||||
job_master.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
|
||||
SSjobs.AssignRank(new_character, new_character.mind.assigned_role, 0)
|
||||
SSjobs.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
|
||||
|
||||
//Announces the character on all the systems, based on the record.
|
||||
if(!issilicon(new_character))//If they are not a cyborg/AI.
|
||||
@@ -662,11 +662,11 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(job_master)
|
||||
if(SSjobs)
|
||||
var/currentpositiontally
|
||||
var/totalpositiontally
|
||||
to_chat(src, "<span class='notice'>Job Name: Filled job slot / Total job slots <b>(Free job slots)</b></span>")
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
to_chat(src, "<span class='notice'>[job.title]: [job.current_positions] / \
|
||||
[job.total_positions == -1 ? "<b>UNLIMITED</b>" : job.total_positions] \
|
||||
<b>([job.total_positions == -1 ? "UNLIMITED" : job.total_positions - job.current_positions])</b></span>")
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
to_chat(usr, "This option is currently only usable during pregame. This may change at a later date.")
|
||||
return
|
||||
|
||||
if(job_master && ticker)
|
||||
var/datum/job/job = job_master.GetJob("AI")
|
||||
if(SSjobs && ticker)
|
||||
var/datum/job/job = SSjobs.GetJob("AI")
|
||||
if(!job)
|
||||
to_chat(usr, "Unable to locate the AI job")
|
||||
return
|
||||
|
||||
@@ -576,7 +576,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
|
||||
/datum/preferences/proc/SetChoices(mob/user, limit = 13, list/splitJobs = list("Civilian","Research Director","AI","Bartender"), width = 760, height = 790)
|
||||
if(!job_master)
|
||||
if(!SSjobs)
|
||||
return
|
||||
|
||||
//limit - The amount of jobs allowed per column. Defaults to 17 to make it look nice.
|
||||
@@ -597,8 +597,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
|
||||
//The job before the current job. I only use this to get the previous jobs color when I'm filling in blank rows.
|
||||
var/datum/job/lastJob
|
||||
if(!job_master) return
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
if(!SSjobs)
|
||||
return
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
|
||||
if(job.admin_only)
|
||||
continue
|
||||
@@ -802,7 +803,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
return 0
|
||||
|
||||
/datum/preferences/proc/UpdateJobPreference(mob/user, role, desiredLvl)
|
||||
var/datum/job/job = job_master.GetJob(role)
|
||||
var/datum/job/job = SSjobs.GetJob(role)
|
||||
|
||||
if(!job)
|
||||
user << browse(null, "window=mob_occupation")
|
||||
@@ -908,7 +909,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
player_alt_titles[job.title] = new_title
|
||||
|
||||
/datum/preferences/proc/SetJob(mob/user, role)
|
||||
var/datum/job/job = job_master.GetJob(role)
|
||||
var/datum/job/job = SSjobs.GetJob(role)
|
||||
if(!job)
|
||||
user << browse(null, "window=mob_occupation")
|
||||
ShowChoices(user)
|
||||
|
||||
@@ -16,25 +16,39 @@
|
||||
"Grey" = 'icons/mob/species/grey/head.dmi'
|
||||
)
|
||||
|
||||
/obj/item/clothing/head/hardhat/attack_self(mob/user)
|
||||
/obj/item/clothing/head/hardhat/attack_self(mob/living/user)
|
||||
toggle_helmet_light(user)
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/toggle_helmet_light(mob/living/user)
|
||||
on = !on
|
||||
if(on)
|
||||
turn_on(user)
|
||||
else
|
||||
turn_off(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/clothing/head/hardhat/update_icon()
|
||||
icon_state = "hardhat[on]_[item_color]"
|
||||
item_state = "hardhat[on]_[item_color]"
|
||||
if(on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
if(ishuman(loc))
|
||||
var/mob/living/carbon/human/H = loc
|
||||
H.update_inv_head()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
..()
|
||||
|
||||
/obj/item/clothing/head/hardhat/extinguish_light()
|
||||
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
|
||||
set_light(brightness_on)
|
||||
|
||||
/obj/item/clothing/head/hardhat/proc/turn_off(mob/user)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/clothing/head/hardhat/extinguish_light(mob/living/user)
|
||||
if(on)
|
||||
on = FALSE
|
||||
set_light(0)
|
||||
icon_state = "hardhat0_[item_color]"
|
||||
item_state = "hardhat0_[item_color]"
|
||||
turn_off(user)
|
||||
update_icon()
|
||||
visible_message("<span class='danger'>[src]'s light fades and turns off.</span>")
|
||||
|
||||
/obj/item/clothing/head/hardhat/orange
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
for(var/obj/item/W in H)
|
||||
H.unEquip(W)
|
||||
var/datum/job/clown/C = job_master.GetJob("Clown")
|
||||
var/datum/job/clown/C = SSjobs.GetJob("Clown")
|
||||
C.equip(H)
|
||||
affected_targets.Add(H)
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
return
|
||||
|
||||
var/list/jobs[0]
|
||||
for(var/datum/job/j in job_master.occupations)
|
||||
for(var/datum/job/j in SSjobs.occupations)
|
||||
if(j.title != "AI" && j.title != "Cyborg")
|
||||
jobs[j.title] = j
|
||||
jobs = sortAssoc(jobs)
|
||||
|
||||
@@ -1005,12 +1005,12 @@
|
||||
if(prob(2))
|
||||
var/obj/item/clothing/mask/M = H.wear_mask
|
||||
if(M && (M.flags_cover & MASKCOVERSMOUTH))
|
||||
return
|
||||
continue
|
||||
if(NO_BREATHE in H.dna.species.species_traits)
|
||||
return //no puking if you can't smell!
|
||||
continue //no puking if you can't smell!
|
||||
// Humans can lack a mind datum, y'know
|
||||
if(H.mind && (H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Coroner"))
|
||||
return //too cool for puke
|
||||
continue //too cool for puke
|
||||
to_chat(H, "<span class='warning'>You smell something foul...</span>")
|
||||
H.fakevomit()
|
||||
|
||||
@@ -1102,4 +1102,4 @@
|
||||
|
||||
// Need this in species.
|
||||
//#undef HUMAN_MAX_OXYLOSS
|
||||
//#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
//#undef HUMAN_CRIT_MAX_OXYLOSS
|
||||
|
||||
@@ -27,7 +27,7 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
//Handle job slot/tater cleanup.
|
||||
var/job = mind.assigned_role
|
||||
|
||||
job_master.FreeRole(job)
|
||||
SSjobs.FreeRole(job)
|
||||
|
||||
if(mind.objectives.len)
|
||||
mind.objectives.Cut()
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
new_player_panel()
|
||||
|
||||
/mob/new_player/proc/IsJobAvailable(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
var/datum/job/job = SSjobs.GetJob(rank)
|
||||
if(!job) return 0
|
||||
if(!job.is_position_available()) return 0
|
||||
if(jobban_isbanned(src,rank)) return 0
|
||||
@@ -269,9 +269,9 @@
|
||||
if(config.assistantlimit)
|
||||
if(job.title == "Civilian")
|
||||
var/count = 0
|
||||
var/datum/job/officer = job_master.GetJob("Security Officer")
|
||||
var/datum/job/warden = job_master.GetJob("Warden")
|
||||
var/datum/job/hos = job_master.GetJob("Head of Security")
|
||||
var/datum/job/officer = SSjobs.GetJob("Security Officer")
|
||||
var/datum/job/warden = SSjobs.GetJob("Warden")
|
||||
var/datum/job/hos = SSjobs.GetJob("Head of Security")
|
||||
count += (officer.current_positions + warden.current_positions + hos.current_positions)
|
||||
if(job.current_positions > (config.assistantratio * count))
|
||||
if(count >= 5) // if theres more than 5 security on the station just let assistants join regardless, they should be able to handle the tide
|
||||
@@ -280,21 +280,21 @@
|
||||
return 1
|
||||
|
||||
/mob/new_player/proc/IsAdminJob(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
var/datum/job/job = SSjobs.GetJob(rank)
|
||||
if(job.admin_only)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/new_player/proc/IsERTSpawnJob(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
var/datum/job/job = SSjobs.GetJob(rank)
|
||||
if(job.spawn_ert)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
||||
/mob/new_player/proc/IsSyndicateCommand(rank)
|
||||
var/datum/job/job = job_master.GetJob(rank)
|
||||
var/datum/job/job = SSjobs.GetJob(rank)
|
||||
if(job.syndicate_command)
|
||||
return 1
|
||||
else
|
||||
@@ -312,15 +312,15 @@
|
||||
if(!IsJobAvailable(rank))
|
||||
to_chat(src, alert("[rank] is not available. Please try another."))
|
||||
return 0
|
||||
var/datum/job/thisjob = job_master.GetJob(rank)
|
||||
var/datum/job/thisjob = SSjobs.GetJob(rank)
|
||||
if(thisjob.barred_by_disability(client))
|
||||
to_chat(src, alert("[rank] is not available due to your character's disability. Please try another."))
|
||||
return 0
|
||||
|
||||
job_master.AssignRole(src, rank, 1)
|
||||
SSjobs.AssignRole(src, rank, 1)
|
||||
|
||||
var/mob/living/character = create_character() //creates the human and transfers vars and mind
|
||||
character = job_master.AssignRank(character, rank, 1) //equips the human
|
||||
character = SSjobs.AssignRank(character, rank, 1) //equips the human
|
||||
|
||||
// AIs don't need a spawnpoint, they must spawn at an empty core
|
||||
if(character.mind.assigned_role == "AI")
|
||||
@@ -367,7 +367,7 @@
|
||||
character.buckled.loc = character.loc
|
||||
character.buckled.dir = character.dir
|
||||
|
||||
character = job_master.EquipRank(character, rank, 1) //equips the human
|
||||
character = SSjobs.EquipRank(character, rank, 1) //equips the human
|
||||
EquipCustomItems(character)
|
||||
|
||||
ticker.mode.latespawn(character)
|
||||
@@ -384,8 +384,8 @@
|
||||
callHook("latespawn", list(character))
|
||||
AddEmploymentContract(character)
|
||||
|
||||
if(!thisjob.is_position_available() && thisjob in job_master.prioritized_jobs)
|
||||
job_master.prioritized_jobs -= thisjob
|
||||
if(!thisjob.is_position_available() && thisjob in SSjobs.prioritized_jobs)
|
||||
SSjobs.prioritized_jobs -= thisjob
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -452,11 +452,11 @@
|
||||
else if(SSshuttle.emergency.mode >= SHUTTLE_CALL)
|
||||
dat += "<font color='red'>The station is currently undergoing evacuation procedures.</font><br>"
|
||||
|
||||
if(length(job_master.prioritized_jobs))
|
||||
if(length(SSjobs.prioritized_jobs))
|
||||
dat += "<font color='lime'>The station has flagged these jobs as high priority: "
|
||||
var/amt = length(job_master.prioritized_jobs)
|
||||
var/amt = length(SSjobs.prioritized_jobs)
|
||||
var/amt_count
|
||||
for(var/datum/job/a in job_master.prioritized_jobs)
|
||||
for(var/datum/job/a in SSjobs.prioritized_jobs)
|
||||
amt_count++
|
||||
if(amt_count != amt)
|
||||
dat += " [a.title], "
|
||||
@@ -478,7 +478,7 @@
|
||||
"Science" = list(jobs = list(), titles = science_positions, color = "#e6b3e6"),
|
||||
"Supply" = list(jobs = list(), titles = supply_positions, color = "#ead4ae"),
|
||||
)
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(job && IsJobAvailable(job.title) && !job.barred_by_disability(client))
|
||||
activePlayers[job] = 0
|
||||
var/categorized = 0
|
||||
@@ -512,7 +512,7 @@
|
||||
dat += "<fieldset style='border: 2px solid [color]; display: inline'>"
|
||||
dat += "<legend align='center' style='color: [color]'>[jobcat]</legend>"
|
||||
for(var/datum/job/job in categorizedJobs[jobcat]["jobs"])
|
||||
if(job in job_master.prioritized_jobs)
|
||||
if(job in SSjobs.prioritized_jobs)
|
||||
dat += "<a href='byond://?src=[UID()];SelectedJob=[job.title]'><font color='lime'><B>[job.title] ([job.current_positions]) (Active: [activePlayers[job]])</B></font></a><br>"
|
||||
else
|
||||
dat += "<a href='byond://?src=[UID()];SelectedJob=[job.title]'>[job.title] ([job.current_positions]) (Active: [activePlayers[job]])</a><br>"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
/datum/computer_file/program/card_mod/proc/format_job_slots()
|
||||
var/list/formatted = list()
|
||||
for(var/datum/job/job in job_master.occupations)
|
||||
for(var/datum/job/job in SSjobs.occupations)
|
||||
if(job_blacklisted(job))
|
||||
continue
|
||||
formatted.Add(list(list(
|
||||
@@ -127,10 +127,10 @@
|
||||
/datum/computer_file/program/card_mod/proc/can_prioritize_job(datum/job/job)
|
||||
if(job)
|
||||
if(!job_blacklisted(job))
|
||||
if(job in job_master.prioritized_jobs)
|
||||
if(job in SSjobs.prioritized_jobs)
|
||||
return 2
|
||||
else
|
||||
if(job_master.prioritized_jobs.len >= 3)
|
||||
if(SSjobs.prioritized_jobs.len >= 3)
|
||||
return 0
|
||||
if(job.total_positions <= job.current_positions)
|
||||
return 0
|
||||
@@ -320,7 +320,7 @@
|
||||
// MAKE ANOTHER JOB POSITION AVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
var/datum/job/j = SSjobs.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
return 1
|
||||
if(can_open_job(j) != 1)
|
||||
@@ -335,7 +335,7 @@
|
||||
// MAKE JOB POSITION UNAVAILABLE FOR LATE JOINERS
|
||||
if(is_authenticated(usr))
|
||||
var/edit_job_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(edit_job_target)
|
||||
var/datum/job/j = SSjobs.GetJob(edit_job_target)
|
||||
if(!j)
|
||||
return 1
|
||||
if(can_close_job(j) != 1)
|
||||
@@ -352,16 +352,16 @@
|
||||
// TOGGLE WHETHER JOB APPEARS AS PRIORITIZED IN THE LOBBY
|
||||
if(is_authenticated(usr))
|
||||
var/priority_target = href_list["job"]
|
||||
var/datum/job/j = job_master.GetJob(priority_target)
|
||||
var/datum/job/j = SSjobs.GetJob(priority_target)
|
||||
if(!j)
|
||||
return 0
|
||||
// Unlike the proper ID computer, this does not check job_in_department
|
||||
var/priority = TRUE
|
||||
if(j in job_master.prioritized_jobs)
|
||||
job_master.prioritized_jobs -= j
|
||||
if(j in SSjobs.prioritized_jobs)
|
||||
SSjobs.prioritized_jobs -= j
|
||||
priority = FALSE
|
||||
else if(job_master.prioritized_jobs.len < 3)
|
||||
job_master.prioritized_jobs += j
|
||||
else if(SSjobs.prioritized_jobs.len < 3)
|
||||
SSjobs.prioritized_jobs += j
|
||||
else
|
||||
return 0
|
||||
log_game("[key_name(usr)] [priority ? "prioritized" : "unprioritized"] the job \"[j.title]\".")
|
||||
|
||||
@@ -178,7 +178,7 @@ var/ert_request_answered = FALSE
|
||||
ticker.mode.ert += M.mind
|
||||
M.forceMove(spawn_location)
|
||||
|
||||
job_master.CreateMoneyAccount(M, class, null)
|
||||
SSjobs.CreateMoneyAccount(M, class, null)
|
||||
|
||||
active_team.equip_officer(class, M)
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
author: "Markolie"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Safes can now consist of more than two tumblers."
|
||||
- tweak: "All safes now have three tumblers by default, instead of two."
|
||||
- tweak: "The safe opening mechanism has changed slightly. This is described on the safe cracking UI."
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "AffectedArc07"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscdel: "Master Controller"
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "Arkatos"
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Added cancel button to Wizard teleportation scrolls"
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "Arkatos"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "Toggling hardhat light on/off now correctly updates wearer's sprite"
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "CthulhuOnIce"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "you can smell dead bodies, even if someone else shouldn't"
|
||||
@@ -0,0 +1,4 @@
|
||||
author: "Markolie"
|
||||
delete-after: True
|
||||
changes:
|
||||
- bugfix: "AZERTY hotkey mode users can now switch between regular mode and hotkey mode properly using TAB again."
|
||||
+2
-2
@@ -893,7 +893,7 @@ macro "borghotkeymode"
|
||||
macro "azertymacro"
|
||||
elem "AZRFF-TAB"
|
||||
name = "TAB"
|
||||
command = ".winset \"mainwindow.macro=borghotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\""
|
||||
command = ".winset \"mainwindow.macro=azertyhotkeymode hotkey_toggle.is-checked=true mapwindow.map.focus=true input.background-color=#F0F0F0\""
|
||||
is-disabled = false
|
||||
elem "AZRFF-CENTER+REP"
|
||||
name = "CENTER+REP"
|
||||
@@ -1079,7 +1079,7 @@ macro "azertymacro"
|
||||
macro "azertyhotkeymode"
|
||||
elem "AZRON-TAB"
|
||||
name = "TAB"
|
||||
command = ".winset \"mainwindow.macro=AZERTYmacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#d3b5b5\""
|
||||
command = ".winset \"mainwindow.macro=azertymacro hotkey_toggle.is-checked=false input.focus=true input.background-color=#d3b5b5\""
|
||||
is-disabled = false
|
||||
elem "AZRON-CENTER+REP"
|
||||
name = "CENTER+REP"
|
||||
|
||||
+12
-14
@@ -29,14 +29,14 @@
|
||||
</div>
|
||||
<div>
|
||||
<div style='text-align: center; margin: 0px 0px 0px 28px'>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 50', 'arrow-left', {'increment': 50})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 10', 'arrow-left', {'increment': 10})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 1', 'arrow-left', {'increment': 1})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 50', 'arrow-left', {'turnleft': 50})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 10', 'arrow-left', {'turnleft': 10})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Left 1', 'arrow-left', {'turnleft': 1})}} </div>
|
||||
<div style='display: inline-block;'><div class="link yellowButton"> {{:data.dial}} </div></div>
|
||||
{{if data.locked}}
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 1', 'arrow-right', {'decrement': 1})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 10', 'arrow-right', {'decrement': 10})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 50', 'arrow-right', {'decrement': 50})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 1', 'arrow-right', {'turnright': 1})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 10', 'arrow-right', {'turnright': 10})}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 50', 'arrow-right', {'turnright': 50})}} </div>
|
||||
{{else}}
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 1', 'arrow-right', null, 'disabled')}} </div>
|
||||
<div style='display: inline-block;'>{{:helper.link('Right 10', 'arrow-right', null, 'disabled')}} </div>
|
||||
@@ -51,15 +51,13 @@
|
||||
<div style='display: inline-block;'> <img src="safe_dial.png" style='transform: rotate({{:data.rotation}}); z-index: -1;'></div>
|
||||
</div>
|
||||
<div style='text-align: center;'>
|
||||
<div style='font-weight: bold;'>How to open your Scarborough Arms - 2 tumbler safe.</div>
|
||||
<div style='font-weight: bold;'>How to open your Scarborough Arms tumbler safe.</div>
|
||||
<div style='display: inline-block; text-align: left;'>
|
||||
<div>1. Turn the dial right two full turns.</div>
|
||||
<div>2. Keep turning right and stop on first number.</div>
|
||||
<div>3. Turn the dial left one full turn.</div>
|
||||
<div>4. Turn left to second number. Do not go past it.</div>
|
||||
<div>5. Turn the dial right until it stops.</div>
|
||||
<div style='height: 32px;'>6. Open the safe.</div>
|
||||
<div>1. Turn the dial right to the first number.</div>
|
||||
<div>2. Turn the dial left to the second number.</div>
|
||||
<div>3. Continue repeating this process for each number, switching between right and left each time.</div>
|
||||
<div>4. Open the safe.</div>
|
||||
</div>
|
||||
<div style='font-weight: bold;'>To lock fully, turn the dial to the left for three rotations.</div>
|
||||
<div style='font-weight: bold;'>To lock fully, turn the dial to the left after closing the safe.</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
+1
-2
@@ -196,7 +196,6 @@
|
||||
#include "code\controllers\hooks-defs.dm"
|
||||
#include "code\controllers\hooks.dm"
|
||||
#include "code\controllers\master.dm"
|
||||
#include "code\controllers\master_controller.dm"
|
||||
#include "code\controllers\subsystem.dm"
|
||||
#include "code\controllers\verbs.dm"
|
||||
#include "code\controllers\voting.dm"
|
||||
@@ -215,6 +214,7 @@
|
||||
#include "code\controllers\subsystem\fires.dm"
|
||||
#include "code\controllers\subsystem\garbage.dm"
|
||||
#include "code\controllers\subsystem\icon_smooth.dm"
|
||||
#include "code\controllers\subsystem\jobs.dm"
|
||||
#include "code\controllers\subsystem\machinery.dm"
|
||||
#include "code\controllers\subsystem\mapping.dm"
|
||||
#include "code\controllers\subsystem\medals.dm"
|
||||
@@ -573,7 +573,6 @@
|
||||
#include "code\game\gamemodes\wizard\spellbook.dm"
|
||||
#include "code\game\gamemodes\wizard\wizard.dm"
|
||||
#include "code\game\jobs\access.dm"
|
||||
#include "code\game\jobs\job_controller.dm"
|
||||
#include "code\game\jobs\job_exp.dm"
|
||||
#include "code\game\jobs\job_objective.dm"
|
||||
#include "code\game\jobs\job_scaling.dm"
|
||||
|
||||
Reference in New Issue
Block a user