Merge remote-tracking branch 'citadel/master' into 91-files-changed-fml
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
return FALSE
|
||||
var/temp = text2num(trim(str_val))
|
||||
if(!isnull(temp))
|
||||
config_entry_value = CLAMP(integer ? round(temp) : temp, min_val, max_val)
|
||||
config_entry_value = clamp(integer ? round(temp) : temp, min_val, max_val)
|
||||
if(config_entry_value != temp && !(datum_flags & DF_VAR_EDITED))
|
||||
log_config("Changing [name] from [temp] to [config_entry_value]!")
|
||||
return TRUE
|
||||
|
||||
@@ -217,7 +217,8 @@
|
||||
config_entry_value = list( //DEFAULTS
|
||||
/mob/living/simple_animal = 1,
|
||||
/mob/living/silicon/pai = 1,
|
||||
/mob/living/carbon/alien/humanoid/hunter = -1,
|
||||
/mob/living/carbon/alien/humanoid/sentinel = 0.25,
|
||||
/mob/living/carbon/alien/humanoid/drone = 0.5,
|
||||
/mob/living/carbon/alien/humanoid/royal/praetorian = 1,
|
||||
/mob/living/carbon/alien/humanoid/royal/queen = 3
|
||||
)
|
||||
@@ -248,8 +249,18 @@
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/run_delay/ValidateAndSet()
|
||||
. = ..()
|
||||
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/run)
|
||||
M.sync()
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay
|
||||
|
||||
/datum/config_entry/number/movedelay/walk_delay/ValidateAndSet()
|
||||
. = ..()
|
||||
var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk)
|
||||
M.sync()
|
||||
|
||||
/datum/config_entry/number/movedelay/sprint_speed_increase
|
||||
config_entry_value = 1
|
||||
|
||||
@@ -288,6 +299,8 @@
|
||||
|
||||
/datum/config_entry/flag/roundstart_away //Will random away mission be loaded.
|
||||
|
||||
/datum/config_entry/flag/roundstart_vr //Will virtual reality missions be loaded?
|
||||
|
||||
/datum/config_entry/number/gateway_delay //How long the gateway takes before it activates. Default is half an hour. Only matters if roundstart_away is enabled.
|
||||
config_entry_value = 18000
|
||||
min_val = 0
|
||||
@@ -460,10 +473,12 @@
|
||||
config_entry_value = RESIZE_DEFAULT_SIZE
|
||||
min_val = 0.1 //to avoid issues with zeros and negative values.
|
||||
max_val = RESIZE_DEFAULT_SIZE
|
||||
integer = FALSE
|
||||
|
||||
/datum/config_entry/number/body_size_max
|
||||
config_entry_value = RESIZE_DEFAULT_SIZE
|
||||
min_val = RESIZE_DEFAULT_SIZE
|
||||
integer = FALSE
|
||||
|
||||
//Pun-Pun movement slowdown given to characters with a body size smaller than this value,
|
||||
//to compensate for their smaller hitbox.
|
||||
@@ -472,13 +487,14 @@
|
||||
config_entry_value = RESIZE_DEFAULT_SIZE * 0.85
|
||||
min_val = 0
|
||||
max_val = RESIZE_DEFAULT_SIZE
|
||||
integer = FALSE
|
||||
|
||||
//multiplicative slowdown multiplier. See 'dna.update_body_size' for the operation.
|
||||
//doesn't apply to floating or crawling mobs
|
||||
/datum/config_entry/number/body_size_slowdown_multiplier
|
||||
config_entry_value = 0.25
|
||||
min_val = 0.1 //To encourage folks to disable the slowdown through the above config instead.
|
||||
integer = FALSE
|
||||
|
||||
//Allows players to set a hexadecimal color of their choice as skin tone, on top of the standard ones.
|
||||
/datum/config_entry/number/allow_custom_skintones
|
||||
config_entry_value = 1
|
||||
/datum/config_entry/flag/allow_custom_skintones
|
||||
|
||||
@@ -428,6 +428,8 @@ SUBSYSTEM_DEF(job)
|
||||
if(!joined_late)
|
||||
var/obj/S = null
|
||||
for(var/obj/effect/landmark/start/sloc in GLOB.start_landmarks_list)
|
||||
if(!sloc.job_spawnpoint)
|
||||
continue
|
||||
if(sloc.name != rank)
|
||||
S = sloc //so we can revert to spawning them on top of eachother if something goes wrong
|
||||
continue
|
||||
|
||||
@@ -6,7 +6,6 @@ SUBSYSTEM_DEF(lighting)
|
||||
name = "Lighting"
|
||||
wait = 2
|
||||
init_order = INIT_ORDER_LIGHTING
|
||||
flags = SS_TICKER
|
||||
|
||||
/datum/controller/subsystem/lighting/stat_entry()
|
||||
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
|
||||
@@ -85,4 +84,4 @@ SUBSYSTEM_DEF(lighting)
|
||||
|
||||
/datum/controller/subsystem/lighting/Recover()
|
||||
initialized = SSlighting.initialized
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
|
||||
SUBSYSTEM_DEF(mapping)
|
||||
name = "Mapping"
|
||||
init_order = INIT_ORDER_MAPPING
|
||||
@@ -83,7 +85,9 @@ SUBSYSTEM_DEF(mapping)
|
||||
// Pick a random away mission.
|
||||
if(CONFIG_GET(flag/roundstart_away))
|
||||
createRandomZlevel()
|
||||
|
||||
// Pick a random VR level.
|
||||
if(CONFIG_GET(flag/roundstart_vr))
|
||||
createRandomZlevel(VIRT_REALITY_NAME, list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE), GLOB.potential_vr_levels)
|
||||
|
||||
// Generate mining ruins
|
||||
loading_ruins = TRUE
|
||||
@@ -198,7 +202,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
z_list = SSmapping.z_list
|
||||
|
||||
#define INIT_ANNOUNCE(X) to_chat(world, "<span class='boldannounce'>[X]</span>"); log_world(X)
|
||||
/datum/controller/subsystem/mapping/proc/LoadGroup(list/errorList, name, path, files, list/traits, list/default_traits, silent = FALSE)
|
||||
. = list()
|
||||
var/start_time = REALTIMEOFDAY
|
||||
@@ -282,7 +285,6 @@ SUBSYSTEM_DEF(mapping)
|
||||
msg += ", [FailedZs[I]]"
|
||||
msg += ". Yell at your server host!"
|
||||
INIT_ANNOUNCE(msg)
|
||||
#undef INIT_ANNOUNCE
|
||||
|
||||
GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
@@ -432,52 +434,63 @@ GLOBAL_LIST_EMPTY(the_station_areas)
|
||||
|
||||
//Manual loading of away missions.
|
||||
/client/proc/admin_away()
|
||||
set name = "Load Away Mission"
|
||||
set name = "Load Away Mission / Virtual Reality"
|
||||
set category = "Fun"
|
||||
|
||||
if(!holder ||!check_rights(R_FUN))
|
||||
return
|
||||
|
||||
var/choice = alert(src, "What kind of level would you like to load?", "Load Away/VR", AWAY_MISSION_NAME, VIRT_REALITY_NAME, "Cancel")
|
||||
|
||||
if(!GLOB.the_gateway)
|
||||
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
|
||||
var/list/possible_options
|
||||
var/list/ztraits
|
||||
switch(choice)
|
||||
if(VIRT_REALITY_NAME)
|
||||
possible_options = GLOB.potential_vr_levels
|
||||
ztraits = list(ZTRAIT_AWAY = TRUE, ZTRAIT_VR = TRUE)
|
||||
if(AWAY_MISSION_NAME)
|
||||
if(!GLOB.the_gateway)
|
||||
if(alert("There's no home gateway on the station. You sure you want to continue ?", "Uh oh", "Yes", "No") != "Yes")
|
||||
return
|
||||
possible_options = GLOB.potential_away_levels
|
||||
ztraits = list(ZTRAIT_AWAY = TRUE)
|
||||
else
|
||||
return
|
||||
|
||||
var/list/possible_options = GLOB.potentialRandomZlevels + "Custom"
|
||||
var/away_name
|
||||
var/datum/space_level/away_level
|
||||
possible_options += "Custom"
|
||||
var/lvl_name
|
||||
var/datum/space_level/level
|
||||
|
||||
var/answer = input("What kind ? ","Away") as null|anything in possible_options
|
||||
var/answer = input("What kind ? ","Away/VR") as null|anything in possible_options
|
||||
switch(answer)
|
||||
if(null)
|
||||
return
|
||||
if("Custom")
|
||||
var/mapfile = input("Pick file:", "File") as null|file
|
||||
if(!mapfile)
|
||||
return
|
||||
away_name = "[mapfile] custom"
|
||||
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
|
||||
var/datum/map_template/template = new(mapfile, "Away Mission")
|
||||
away_level = template.load_new_z()
|
||||
lvl_name = "[mapfile] custom"
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(mapfile, choice, ztraits)
|
||||
level = template.load_new_z(ztraits)
|
||||
else
|
||||
if(answer in GLOB.potentialRandomZlevels)
|
||||
away_name = answer
|
||||
to_chat(usr,"<span class='notice'>Loading [away_name]...</span>")
|
||||
var/datum/map_template/template = new(away_name, "Away Mission")
|
||||
away_level = template.load_new_z()
|
||||
else
|
||||
return
|
||||
lvl_name = answer
|
||||
to_chat(usr,"<span class='notice'>Loading [lvl_name]...</span>")
|
||||
var/datum/map_template/template = new(lvl_name, choice)
|
||||
level = template.load_new_z(ztraits)
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [away_name] away mission.")
|
||||
log_admin("Admin [key_name(usr)] has loaded [away_name] away mission.")
|
||||
if(!away_level)
|
||||
message_admins("Loading [away_name] failed!")
|
||||
message_admins("Admin [key_name_admin(usr)] has loaded [lvl_name] [choice].")
|
||||
log_admin("Admin [key_name(usr)] has loaded [lvl_name] [choice].")
|
||||
if(!level)
|
||||
message_admins("Loading [lvl_name] failed!")
|
||||
return
|
||||
|
||||
|
||||
if(GLOB.the_gateway)
|
||||
if(choice == AWAY_MISSION_NAME && GLOB.the_gateway)
|
||||
//Link any found away gate with station gate
|
||||
var/obj/machinery/gateway/centeraway/new_gate
|
||||
for(var/obj/machinery/gateway/centeraway/G in GLOB.machines)
|
||||
if(G.z == away_level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
|
||||
if(G.z == level.z_value) //I'll have to refactor gateway shitcode before multi-away support.
|
||||
new_gate = G
|
||||
break
|
||||
//Link station gate with away gate and remove wait time.
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(flightpacks)
|
||||
name = "Flightpack Movement"
|
||||
priority = FIRE_PRIORITY_FLIGHTPACKS
|
||||
wait = 2
|
||||
stat_tag = "FM"
|
||||
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
|
||||
|
||||
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/Initialize()
|
||||
sync_flightsuit_processing()
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/vv_edit_var(var_name, var_value)
|
||||
..()
|
||||
switch(var_name)
|
||||
if("flightsuit_processing")
|
||||
sync_flightsuit_processing()
|
||||
|
||||
/datum/controller/subsystem/processing/flightpacks/proc/sync_flightsuit_processing()
|
||||
for(var/obj/item/flightpack/FP in processing)
|
||||
FP.sync_processing(src)
|
||||
if(flightsuit_processing == FLIGHTSUIT_PROCESSING_NONE) //Don't even bother firing.
|
||||
can_fire = FALSE
|
||||
else
|
||||
can_fire = TRUE
|
||||
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(profiler)
|
||||
init_order = INIT_ORDER_PROFILER
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
wait = 3000
|
||||
flags = SS_NO_TICK_CHECK
|
||||
flags = SS_NO_TICK_CHECK
|
||||
var/fetch_cost = 0
|
||||
var/write_cost = 0
|
||||
|
||||
@@ -31,23 +31,12 @@ SUBSYSTEM_DEF(profiler)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/StartProfiling()
|
||||
#if DM_BUILD < 1506 || DM_VERSION < 513
|
||||
stack_trace("Auto profiling unsupported on this byond version")
|
||||
CONFIG_SET(flag/auto_profile, FALSE)
|
||||
#else
|
||||
world.Profile(PROFILE_START)
|
||||
#endif
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/StopProfiling()
|
||||
#if DM_BUILD >= 1506 && DM_VERSION >= 513
|
||||
world.Profile(PROFILE_STOP)
|
||||
#endif
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/DumpFile()
|
||||
#if DM_BUILD < 1506 || DM_VERSION < 513
|
||||
stack_trace("Auto profiling unsupported on this byond version")
|
||||
CONFIG_SET(flag/auto_profile, FALSE)
|
||||
#else
|
||||
var/timer = TICK_USAGE_REAL
|
||||
var/current_profile_data = world.Profile(PROFILE_REFRESH,format="json")
|
||||
fetch_cost = MC_AVERAGE(fetch_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
@@ -60,4 +49,3 @@ SUBSYSTEM_DEF(profiler)
|
||||
timer = TICK_USAGE_REAL
|
||||
WRITE_FILE(json_file, current_profile_data)
|
||||
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
#endif
|
||||
|
||||
@@ -217,13 +217,13 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
call_reason = trim(html_encode(call_reason))
|
||||
|
||||
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && seclevel2num(get_security_level()) > SEC_LEVEL_GREEN)
|
||||
if(length(call_reason) < CALL_SHUTTLE_REASON_LENGTH && GLOB.security_level > SEC_LEVEL_GREEN)
|
||||
to_chat(user, "You must provide a reason.")
|
||||
return
|
||||
|
||||
var/area/signal_origin = get_area(user)
|
||||
var/emergency_reason = "\nNature of emergency:\n\n[call_reason]"
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
var/security_num = GLOB.security_level
|
||||
switch(security_num)
|
||||
if(SEC_LEVEL_RED,SEC_LEVEL_DELTA)
|
||||
emergency.request(null, signal_origin, html_decode(emergency_reason), 1) //There is a serious threat we gotta move no time to give them five minutes.
|
||||
@@ -285,7 +285,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/canRecall()
|
||||
if(!emergency || emergency.mode != SHUTTLE_CALL || emergencyNoRecall || SSticker.mode.name == "meteor")
|
||||
return
|
||||
var/security_num = seclevel2num(get_security_level())
|
||||
var/security_num = GLOB.security_level
|
||||
switch(security_num)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
if(emergency.timeLeft(1) < emergencyCallTime)
|
||||
@@ -642,7 +642,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
/datum/controller/subsystem/shuttle/proc/autoEnd() //CIT CHANGE - allows shift to end without being a proper shuttle call?
|
||||
if(EMERGENCY_IDLE_OR_RECALLED)
|
||||
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")
|
||||
priority_announce("The shift has come to an end and the shuttle called. [GLOB.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 end vote passed. Shuttle has been auto-called.")
|
||||
message_admins("Round end vote passed. Shuttle has been auto-called.")
|
||||
emergencyNoRecall = TRUE
|
||||
|
||||
@@ -23,7 +23,7 @@ SUBSYSTEM_DEF(time_track)
|
||||
var/time_dilation_text
|
||||
|
||||
/datum/controller/subsystem/time_track/fire()
|
||||
stat_time_text = "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]\n\nRound Time: [WORLDTIME2TEXT("hh:mm:ss")]\n\nStation Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]\n\n[time_dilation_text]"
|
||||
stat_time_text = "Server Time: [time2text(world.timeofday, "YYYY-MM-DD hh:mm:ss")]\n\nRound Time: [DisplayTimeText(world.time - SSticker.round_start_time, 1)] \n\nStation Time: [STATION_TIME_TIMESTAMP("hh:mm:ss", world.time)]\n\n[time_dilation_text]"
|
||||
|
||||
if(++last_measurement == measurement_delay)
|
||||
last_measurement = 0
|
||||
|
||||
@@ -94,7 +94,7 @@ SUBSYSTEM_DEF(timer)
|
||||
if(ctime_timer.flags & TIMER_LOOP)
|
||||
ctime_timer.spent = 0
|
||||
ctime_timer.timeToRun = REALTIMEOFDAY + ctime_timer.wait
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, timeToRun)
|
||||
BINARY_INSERT(ctime_timer, clienttime_timers, datum/timedevent, ctime_timer, timeToRun, COMPARE_KEY)
|
||||
else
|
||||
qdel(ctime_timer)
|
||||
|
||||
@@ -423,7 +423,7 @@ SUBSYSTEM_DEF(timer)
|
||||
L = SStimer.second_queue
|
||||
|
||||
if(L)
|
||||
BINARY_INSERT(src, L, datum/timedevent, timeToRun)
|
||||
BINARY_INSERT(src, L, datum/timedevent, src, timeToRun, COMPARE_KEY)
|
||||
return
|
||||
|
||||
//get the list of buckets
|
||||
|
||||
@@ -352,7 +352,6 @@ SUBSYSTEM_DEF(vote)
|
||||
if("dynamic")
|
||||
if(SSticker.current_state > GAME_STATE_PREGAME)//Don't change the mode if the round already started.
|
||||
return message_admins("A vote has tried to change the gamemode, but the game has already started. Aborting.")
|
||||
GLOB.master_mode = "dynamic"
|
||||
var/list/runnable_storytellers = config.get_runnable_storytellers()
|
||||
var/datum/dynamic_storyteller/picked
|
||||
for(var/T in runnable_storytellers)
|
||||
@@ -361,7 +360,7 @@ SUBSYSTEM_DEF(vote)
|
||||
picked = S
|
||||
runnable_storytellers[S] *= round(stored_gamemode_votes[initial(S.name)]*100000,1)
|
||||
if(!picked)
|
||||
picked = pickweightAllowZero(runnable_storytellers)
|
||||
picked = pickweight(runnable_storytellers, 0)
|
||||
GLOB.dynamic_storyteller_type = picked
|
||||
if("map")
|
||||
var/datum/map_config/VM = config.maplist[.]
|
||||
@@ -489,6 +488,7 @@ SUBSYSTEM_DEF(vote)
|
||||
modes_to_add -= "traitor" // makes it so that traitor is always available
|
||||
choices.Add(modes_to_add)
|
||||
if("dynamic")
|
||||
GLOB.master_mode = "dynamic"
|
||||
var/list/probabilities = CONFIG_GET(keyed_list/storyteller_weight)
|
||||
for(var/T in config.storyteller_cache)
|
||||
var/datum/dynamic_storyteller/S = T
|
||||
|
||||
Reference in New Issue
Block a user