mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into turfs
# Conflicts: # code/game/objects/items.dm # code/modules/power/cable.dm # icons/mob/inhands/items_lefthand.dmi # icons/mob/inhands/items_righthand.dmi # icons/obj/lighting.dmi # paradise.dme
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
/datum/configuration
|
||||
var/server_name = null // server name (for world name / status)
|
||||
var/server_tag_line = null // server tagline (for showing on hub entry)
|
||||
var/server_extra_features = null // server-specific extra features (for hub entry)
|
||||
var/server_suffix = 0 // generate numeric suffix based on server port
|
||||
|
||||
var/minimum_client_build = 1421 // Build 1421 due to the middle mouse button exploit
|
||||
@@ -53,7 +55,6 @@
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_random_events = 0 // enables random events mid-round when set to 1
|
||||
var/allow_ai = 1 // allow ai job
|
||||
var/hostedby = null
|
||||
var/respawn = 0
|
||||
var/guest_jobban = 1
|
||||
var/usewhitelist = 0
|
||||
@@ -71,6 +72,9 @@
|
||||
var/assistantlimit = 0 //enables assistant limiting
|
||||
var/assistantratio = 2 //how many assistants to security members
|
||||
|
||||
var/auto_cryo_ssd_mins = 0
|
||||
var/ssd_warning = 0
|
||||
|
||||
var/prob_free_golems = 75 //chance for free golems spawners to appear roundstart
|
||||
var/unrestricted_free_golems = FALSE //if true, free golems can appear on all roundtypes
|
||||
|
||||
@@ -215,7 +219,7 @@
|
||||
|
||||
// Automatic localhost admin disable
|
||||
var/disable_localhost_admin = 0
|
||||
|
||||
|
||||
//Start now warning
|
||||
var/start_now_confirmation = 0
|
||||
|
||||
@@ -298,6 +302,12 @@
|
||||
if("shadowling_max_age")
|
||||
config.shadowling_max_age = text2num(value)
|
||||
|
||||
if("auto_cryo_ssd_mins")
|
||||
config.auto_cryo_ssd_mins = text2num(value)
|
||||
|
||||
if("ssd_warning")
|
||||
config.ssd_warning = 1
|
||||
|
||||
if("log_ooc")
|
||||
config.log_ooc = 1
|
||||
|
||||
@@ -363,10 +373,10 @@
|
||||
|
||||
if("no_dead_vote")
|
||||
config.vote_no_dead = 1
|
||||
|
||||
|
||||
if("vote_autotransfer_initial")
|
||||
config.vote_autotransfer_initial = text2num(value)
|
||||
|
||||
|
||||
if("vote_autotransfer_interval")
|
||||
config.vote_autotransfer_interval = text2num(value)
|
||||
|
||||
@@ -391,6 +401,12 @@
|
||||
if("servername")
|
||||
config.server_name = value
|
||||
|
||||
if("server_tag_line")
|
||||
config.server_tag_line = value
|
||||
|
||||
if("server_extra_features")
|
||||
config.server_extra_features = value
|
||||
|
||||
if("serversuffix")
|
||||
config.server_suffix = 1
|
||||
|
||||
@@ -400,9 +416,6 @@
|
||||
if("nudge_script_path")
|
||||
config.nudge_script_path = value
|
||||
|
||||
if("hostedby")
|
||||
config.hostedby = value
|
||||
|
||||
if("server")
|
||||
config.server = value
|
||||
|
||||
@@ -650,7 +663,7 @@
|
||||
|
||||
if("disable_karma")
|
||||
config.disable_karma = 1
|
||||
|
||||
|
||||
if("start_now_confirmation")
|
||||
config.start_now_confirmation = 1
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ SUBSYSTEM_DEF(jobs)
|
||||
var/list/name_occupations = list() //Dict of all jobs, keys are titles
|
||||
var/list/type_occupations = list() //Dict of all jobs, keys are types
|
||||
var/list/prioritized_jobs = list() // List of jobs set to priority by HoP/Captain
|
||||
var/list/id_change_records = list() // List of all job transfer records
|
||||
var/list/id_change_counter = 1
|
||||
//Players who need jobs
|
||||
var/list/unassigned = list()
|
||||
//Debug info
|
||||
@@ -601,3 +603,84 @@ SUBSYSTEM_DEF(jobs)
|
||||
|
||||
spawn(0)
|
||||
to_chat(H, "<span class='boldnotice'>Your account number is: [M.account_number], your account pin is: [M.remote_access_pin]</span>")
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/format_jobs_for_id_computer(obj/item/card/id/tgtcard)
|
||||
var/list/jobs_to_formats = list()
|
||||
if(tgtcard)
|
||||
var/mob/M = tgtcard.getPlayer()
|
||||
for(var/datum/job/job in occupations)
|
||||
if(tgtcard.assignment && tgtcard.assignment == job.title)
|
||||
jobs_to_formats[job.title] = "disabled" // the job they already have is pre-selected
|
||||
else if(!job.would_accept_job_transfer_from_player(M))
|
||||
jobs_to_formats[job.title] = "linkDiscourage" // karma jobs they don't have available are discouraged
|
||||
else if(job.total_positions && !job.current_positions && job.title != "Civilian")
|
||||
jobs_to_formats[job.title] = "linkEncourage" // jobs with nobody doing them at all are encouraged
|
||||
else if(job.total_positions >= 0 && job.current_positions >= job.total_positions)
|
||||
jobs_to_formats[job.title] = "linkDiscourage" // jobs that are full (no free positions) are discouraged
|
||||
return jobs_to_formats
|
||||
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/log_job_transfer(transferee, oldvalue, newvalue, whodidit)
|
||||
id_change_records["[id_change_counter]"] = list("transferee" = transferee, "oldvalue" = oldvalue, "newvalue" = newvalue, "whodidit" = whodidit, "timestamp" = station_time_timestamp())
|
||||
id_change_counter++
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/slot_job_transfer(oldtitle, newtitle)
|
||||
var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle)
|
||||
var/datum/job/newjobdatum = SSjobs.GetJob(newtitle)
|
||||
if(istype(oldjobdatum) && oldjobdatum.current_positions > 0 && istype(newjobdatum))
|
||||
if(!(oldjobdatum.title in command_positions) && !(newjobdatum.title in command_positions))
|
||||
oldjobdatum.current_positions--
|
||||
newjobdatum.current_positions++
|
||||
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/fetch_transfer_record_html(var/centcom)
|
||||
var/record_html = "<TABLE border=\"1\">"
|
||||
|
||||
var/table_headers = list("Crewman", "Old Rank", "New Rank", "Authorized By", "Time")
|
||||
var/hidden_fields = list("deletedby")
|
||||
if(centcom)
|
||||
table_headers += "<span class='bad'>Deleted By</span>"
|
||||
record_html += "<TR>"
|
||||
for(var/thisheader in table_headers)
|
||||
record_html += "<TD><B>[thisheader]</B></TD>"
|
||||
record_html += "</TR>"
|
||||
|
||||
var/visible_record_count = 0
|
||||
for(var/thisid in id_change_records)
|
||||
var/thisrecord = id_change_records[thisid]
|
||||
|
||||
if(thisrecord["deletedby"] && !centcom)
|
||||
continue
|
||||
|
||||
record_html += "<TR>"
|
||||
for(var/lkey in thisrecord)
|
||||
if(lkey in hidden_fields)
|
||||
if(centcom)
|
||||
record_html += "<TD><span class='bad'>[thisrecord[lkey]]<span></TD>"
|
||||
else
|
||||
continue
|
||||
else
|
||||
record_html += "<TD>[thisrecord[lkey]]</TD>"
|
||||
record_html += "</TR>"
|
||||
visible_record_count++
|
||||
|
||||
record_html += "</TABLE>"
|
||||
|
||||
if(!visible_record_count)
|
||||
return "No records on file yet."
|
||||
return record_html
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/delete_log_records(sourceuser, delete_all)
|
||||
. = 0
|
||||
if(!sourceuser)
|
||||
return
|
||||
var/list/new_id_change_records = list()
|
||||
for(var/thisid in id_change_records)
|
||||
var/thisrecord = id_change_records[thisid]
|
||||
if(!thisrecord["deletedby"])
|
||||
if(delete_all || thisrecord["whodidit"] == sourceuser)
|
||||
thisrecord["deletedby"] = sourceuser
|
||||
.++
|
||||
new_id_change_records["[id_change_counter]"] = thisrecord
|
||||
id_change_counter++
|
||||
id_change_records = new_id_change_records
|
||||
@@ -64,23 +64,6 @@ SUBSYSTEM_DEF(machines)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/machines/proc/process_premachines(resumed = 0)
|
||||
/* Literally exists as snowflake for fucking powersinks goddamnit */
|
||||
if(!resumed)
|
||||
src.currentrun = GLOB.processing_power_items.Copy()
|
||||
//cache for sanid speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
while(currentrun.len)
|
||||
var/obj/item/I = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!QDELETED(I))
|
||||
if(!I.pwr_drain())
|
||||
GLOB.processing_power_items.Remove(I)
|
||||
else
|
||||
GLOB.processing_power_items.Remove(I)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/machines/proc/process_machines(resumed = 0)
|
||||
var/seconds = wait * 0.1
|
||||
if(!resumed)
|
||||
@@ -113,13 +96,6 @@ SUBSYSTEM_DEF(machines)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSMACHINES_PREMACHINERY
|
||||
|
||||
if(currentpart == SSMACHINES_PREMACHINERY || !resumed)
|
||||
process_premachines(resumed)
|
||||
if(state != SS_RUNNING)
|
||||
return
|
||||
resumed = 0
|
||||
currentpart = SSMACHINES_MACHINERY
|
||||
|
||||
if(currentpart == SSMACHINES_MACHINERY || !resumed)
|
||||
|
||||
Reference in New Issue
Block a user