Merge remote-tracking branch 'refs/remotes/Citadel-Station-13/master' into crewobjectivesandmiscreants
This commit is contained in:
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(config_dir)
|
||||
var/list/probabilities = list() // relative probability of each mode
|
||||
var/list/min_pop = list() // overrides for acceptible player counts in a mode
|
||||
var/list/max_pop = list()
|
||||
|
||||
var/list/repeated_mode_adjust = list() // weight adjustments for recent modes
|
||||
var/humans_need_surnames = 0
|
||||
var/allow_ai = 0 // allow ai job
|
||||
var/forbid_secborg = 0 // disallow secborg module to be chosen.
|
||||
@@ -147,11 +147,13 @@ GLOBAL_PROTECT(config_dir)
|
||||
var/irc_first_connection_alert = 0 // do we notify the irc channel when somebody is connecting for the first time?
|
||||
|
||||
var/traitor_scaling_coeff = 6 //how much does the amount of players get divided by to determine traitors
|
||||
var/brother_scaling_coeff = 25 //how many players per brother team
|
||||
var/changeling_scaling_coeff = 6 //how much does the amount of players get divided by to determine changelings
|
||||
var/security_scaling_coeff = 8 //how much does the amount of players get divided by to determine open security officer positions
|
||||
var/abductor_scaling_coeff = 15 //how many players per abductor team
|
||||
|
||||
var/traitor_objectives_amount = 2
|
||||
var/brother_objectives_amount = 2
|
||||
var/protect_roles_from_antagonist = 0 //If security and such can be traitor/cult/other
|
||||
var/protect_assistant_from_antagonist = 0 //If assistants can be traitor/cult/other
|
||||
var/enforce_human_authority = 0 //If non-human species are barred from joining as a head of staff
|
||||
@@ -276,6 +278,7 @@ GLOBAL_PROTECT(config_dir)
|
||||
var/error_msg_delay = 50 // How long to wait between messaging admins about occurrences of a unique error
|
||||
|
||||
var/arrivals_shuttle_dock_window = 55 //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
|
||||
var/arrivals_shuttle_require_undocked = FALSE //Require the arrivals shuttle to be undocked before latejoiners can join
|
||||
var/arrivals_shuttle_require_safe_latejoin = FALSE //Require the arrivals shuttle to be operational in order for latejoiners to join
|
||||
|
||||
var/mice_roundstart = 10 // how many wire chewing rodents spawn at roundstart.
|
||||
@@ -698,6 +701,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
ghost_interaction = 1
|
||||
if("traitor_scaling_coeff")
|
||||
traitor_scaling_coeff = text2num(value)
|
||||
if("brother_scaling_coeff")
|
||||
brother_scaling_coeff = text2num(value)
|
||||
if("changeling_scaling_coeff")
|
||||
changeling_scaling_coeff = text2num(value)
|
||||
if("security_scaling_coeff")
|
||||
@@ -706,6 +711,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
abductor_scaling_coeff = text2num(value)
|
||||
if("traitor_objectives_amount")
|
||||
traitor_objectives_amount = text2num(value)
|
||||
if("brother_objectives_amount")
|
||||
brother_objectives_amount = text2num(value)
|
||||
if("probability")
|
||||
var/prob_pos = findtext(value, " ")
|
||||
var/prob_name = null
|
||||
@@ -720,7 +727,14 @@ GLOBAL_PROTECT(config_dir)
|
||||
WRITE_FILE(GLOB.config_error_log, "Unknown game mode probability configuration definition: [prob_name].")
|
||||
else
|
||||
WRITE_FILE(GLOB.config_error_log, "Incorrect probability configuration definition: [prob_name] [prob_value].")
|
||||
|
||||
if("repeated_mode_adjust")
|
||||
if(value)
|
||||
repeated_mode_adjust.Cut()
|
||||
var/values = splittext(value," ")
|
||||
for(var/v in values)
|
||||
repeated_mode_adjust += text2num(v)
|
||||
else
|
||||
WRITE_FILE(GLOB.config_error_log, "Incorrect round weight adjustment configuration definition for [value].")
|
||||
if("protect_roles_from_antagonist")
|
||||
protect_roles_from_antagonist = 1
|
||||
if("protect_assistant_from_antagonist")
|
||||
@@ -816,6 +830,8 @@ GLOBAL_PROTECT(config_dir)
|
||||
GLOB.MAX_EX_FLAME_RANGE = BombCap
|
||||
if("arrivals_shuttle_dock_window")
|
||||
arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
|
||||
if("arrivals_shuttle_require_undocked")
|
||||
arrivals_shuttle_require_undocked = TRUE
|
||||
if("arrivals_shuttle_require_safe_latejoin")
|
||||
arrivals_shuttle_require_safe_latejoin = TRUE
|
||||
if("mice_roundstart")
|
||||
@@ -954,18 +970,18 @@ GLOBAL_PROTECT(config_dir)
|
||||
/datum/configuration/proc/pick_mode(mode_name)
|
||||
// I wish I didn't have to instance the game modes in order to look up
|
||||
// their information, but it is the only way (at least that I know of).
|
||||
// ^ This guy didn't try hard enough
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = new T()
|
||||
if(M.config_tag && M.config_tag == mode_name)
|
||||
return M
|
||||
qdel(M)
|
||||
var/datum/game_mode/M = T
|
||||
var/ct = initial(M.config_tag)
|
||||
if(ct && ct == mode_name)
|
||||
return new T
|
||||
return new /datum/game_mode/extended()
|
||||
|
||||
/datum/configuration/proc/get_runnable_modes()
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
for(var/T in gamemode_cache)
|
||||
var/datum/game_mode/M = new T()
|
||||
//to_chat(world, "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]")
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
continue
|
||||
@@ -977,8 +993,15 @@ GLOBAL_PROTECT(config_dir)
|
||||
if(max_pop[M.config_tag])
|
||||
M.maximum_players = max_pop[M.config_tag]
|
||||
if(M.can_start())
|
||||
runnable_modes[M] = probabilities[M.config_tag]
|
||||
//to_chat(world, "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]")
|
||||
var/final_weight = probabilities[M.config_tag]
|
||||
if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
|
||||
var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
|
||||
var/adjustment = 0
|
||||
while(recent_round)
|
||||
adjustment += repeated_mode_adjust[recent_round]
|
||||
recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
|
||||
final_weight *= ((100-adjustment)/100)
|
||||
runnable_modes[M] = final_weight
|
||||
return runnable_modes
|
||||
|
||||
/datum/configuration/proc/get_runnable_midround_modes(crew)
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
diff a/code/controllers/configuration.dm b/code/controllers/configuration.dm (rejected hunks)
|
||||
@@ -337,17 +337,17 @@
|
||||
if("use_account_age_for_jobs")
|
||||
use_account_age_for_jobs = 1
|
||||
if("use_exp_tracking")
|
||||
- use_exp_tracking = 1
|
||||
+ use_exp_tracking = TRUE
|
||||
if("use_exp_restrictions_heads")
|
||||
- use_exp_restrictions_heads = 1
|
||||
+ use_exp_restrictions_heads = TRUE
|
||||
if("use_exp_restrictions_heads_hours")
|
||||
use_exp_restrictions_heads_hours = text2num(value)
|
||||
if("use_exp_restrictions_heads_department")
|
||||
- use_exp_restrictions_heads_department = 1
|
||||
+ use_exp_restrictions_heads_department = TRUE
|
||||
if("use_exp_restrictions_other")
|
||||
- use_exp_restrictions_other = 1
|
||||
+ use_exp_restrictions_other = TRUE
|
||||
if("use_exp_restrictions_admin_bypass")
|
||||
- use_exp_restrictions_admin_bypass = 1
|
||||
+ use_exp_restrictions_admin_bypass = TRUE
|
||||
if("lobby_countdown")
|
||||
lobby_countdown = text2num(value)
|
||||
if("round_end_countdown")
|
||||
@@ -422,7 +422,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
// in those cases, so we just let them run)
|
||||
if (queue_node_flags & SS_NO_TICK_CHECK)
|
||||
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
|
||||
queue_node.queued_priority += queue_priority_count * 0.10
|
||||
queue_node.queued_priority += queue_priority_count * 0.1
|
||||
queue_priority_count -= queue_node_priority
|
||||
queue_priority_count += queue_node.queued_priority
|
||||
current_tick_budget -= queue_node_priority
|
||||
|
||||
@@ -164,6 +164,7 @@ SUBSYSTEM_DEF(air)
|
||||
currentrun.len--
|
||||
if(!M || (M.process_atmos(seconds) == PROCESS_KILL))
|
||||
atmos_machinery.Remove(M)
|
||||
M.SendSignal(COMSIG_MACHINE_PROCESS_ATMOS)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
@@ -321,7 +322,7 @@ SUBSYSTEM_DEF(air)
|
||||
EG.dismantle()
|
||||
CHECK_TICK
|
||||
|
||||
var/msg = "HEY! LISTEN! [(world.timeofday - timer)/10] Seconds were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start."
|
||||
var/msg = "HEY! LISTEN! [DisplayTimeText(world.timeofday - timer)] were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start."
|
||||
to_chat(world, "<span class='boldannounce'>[msg]</span>")
|
||||
warning(msg)
|
||||
|
||||
@@ -382,4 +383,4 @@ SUBSYSTEM_DEF(air)
|
||||
#undef SSAIR_EXCITEDGROUPS
|
||||
#undef SSAIR_HIGHPRESSURE
|
||||
#undef SSAIR_HOTSPOT
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
#undef SSAIR_SUPERCONDUCTIVITY
|
||||
@@ -14,6 +14,9 @@ SUBSYSTEM_DEF(augury)
|
||||
/datum/controller/subsystem/augury/proc/register_doom(atom/A, severity)
|
||||
doombringers[A] = severity
|
||||
|
||||
/datum/controller/subsystem/augury/proc/unregister_doom(atom/A)
|
||||
doombringers -= A
|
||||
|
||||
/datum/controller/subsystem/augury/fire()
|
||||
var/biggest_doom = null
|
||||
var/biggest_threat = null
|
||||
|
||||
@@ -185,8 +185,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
return
|
||||
if(!L || !L.key || !L.mind)
|
||||
return
|
||||
var/turf/T = get_turf(L)
|
||||
var/area/placeofdeath = get_area(T.loc)
|
||||
var/area/placeofdeath = get_area(L)
|
||||
var/sqlname = sanitizeSQL(L.real_name)
|
||||
var/sqlkey = sanitizeSQL(L.ckey)
|
||||
var/sqljob = sanitizeSQL(L.mind.assigned_role)
|
||||
@@ -275,7 +274,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
details += "\"[deets]\""
|
||||
|
||||
/datum/feedback_variable/proc/get_details()
|
||||
return details.Join(" | ")
|
||||
return details ? details.Join(" | ") : null
|
||||
|
||||
/datum/feedback_variable/proc/get_parsed()
|
||||
return list(variable,value,details.Join(" | "))
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm (rejected hunks)
|
||||
@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(blackbox)
|
||||
|
||||
if(config.use_exp_tracking)
|
||||
if((triggertime < 0) || (world.time > (triggertime +3000))) //subsystem fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire. The <0 is midnight rollover check
|
||||
- SSblackbox.update_exp(10,FALSE)
|
||||
+ update_exp(10,FALSE)
|
||||
|
||||
|
||||
/datum/controller/subsystem/blackbox/Recover()
|
||||
@@ -40,6 +40,7 @@ SUBSYSTEM_DEF(machines)
|
||||
var/obj/machinery/thing = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
if(!QDELETED(thing) && thing.process(seconds) != PROCESS_KILL)
|
||||
thing.SendSignal(COMSIG_MACHINE_PROCESS)
|
||||
if(thing.use_power)
|
||||
thing.auto_use_power() //add back the power state
|
||||
else
|
||||
@@ -61,4 +62,4 @@ SUBSYSTEM_DEF(machines)
|
||||
if (istype(SSmachines.processing))
|
||||
processing = SSmachines.processing
|
||||
if (istype(SSmachines.powernets))
|
||||
powernets = SSmachines.powernets
|
||||
powernets = SSmachines.powernets
|
||||
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
|
||||
var/list/obj/structure/chisel_message/chisel_messages = list()
|
||||
var/list/saved_messages = list()
|
||||
|
||||
var/list/saved_modes = list(1,2,3)
|
||||
var/list/saved_trophies = list()
|
||||
|
||||
/datum/controller/subsystem/persistence/Initialize()
|
||||
@@ -16,6 +16,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
LoadPoly()
|
||||
LoadChiselMessages()
|
||||
LoadTrophies()
|
||||
LoadRecentModes()
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadSatchels()
|
||||
@@ -41,8 +42,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
old_secret_satchels = json["data"]
|
||||
if(old_secret_satchels.len)
|
||||
if(old_secret_satchels.len >= 20) //guards against low drop pools assuring that one player cannot reliably find his own gear.
|
||||
@@ -84,8 +84,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json
|
||||
json = json_decode(file2text(json_file))
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
|
||||
if(!json)
|
||||
return
|
||||
@@ -129,13 +128,22 @@ SUBSYSTEM_DEF(persistence)
|
||||
var/json_file = file("data/npc_saves/TrophyItems.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = list()
|
||||
json = json_decode(file2text(json_file))
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
if(!json)
|
||||
return
|
||||
saved_trophies = json["data"]
|
||||
SetUpTrophies(saved_trophies.Copy())
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/LoadRecentModes()
|
||||
var/json_file = file("data/RecentModes.json")
|
||||
if(!fexists(json_file))
|
||||
return
|
||||
var/list/json = json_decode(file2text(json_file))
|
||||
if(!json)
|
||||
return
|
||||
saved_modes = json["data"]
|
||||
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
|
||||
for(var/A in GLOB.trophy_cases)
|
||||
var/obj/structure/displaycase/trophy/T = A
|
||||
@@ -165,6 +173,7 @@ SUBSYSTEM_DEF(persistence)
|
||||
CollectChiselMessages()
|
||||
CollectSecretSatchels()
|
||||
CollectTrophies()
|
||||
CollectRoundtype()
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
|
||||
var/list/satchels = list()
|
||||
@@ -224,3 +233,13 @@ SUBSYSTEM_DEF(persistence)
|
||||
data["message"] = T.trophy_message
|
||||
data["placer_key"] = T.placer_key
|
||||
saved_trophies += list(data)
|
||||
|
||||
/datum/controller/subsystem/persistence/proc/CollectRoundtype()
|
||||
saved_modes[3] = saved_modes[2]
|
||||
saved_modes[2] = saved_modes[1]
|
||||
saved_modes[1] = SSticker.mode.config_tag
|
||||
var/json_file = file("data/RecentModes.json")
|
||||
var/list/file_data = list()
|
||||
file_data["data"] = saved_modes
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(server_maint)
|
||||
var/cmob = C.mob
|
||||
if(!(isobserver(cmob) || (isdead(cmob) && C.holder)))
|
||||
log_access("AFK: [key_name(C)]")
|
||||
to_chat(C, "<span class='danger'>You have been inactive for more than [config.afk_period / 600] minutes and have been disconnected.</span>")
|
||||
to_chat(C, "<span class='danger'>You have been inactive for more than [DisplayTimeText(config.afk_period)] and have been disconnected.</span>")
|
||||
qdel(C)
|
||||
|
||||
if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1)))
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
diff a/code/controllers/subsystem/server_maint.dm b/code/controllers/subsystem/server_maint.dm (rejected hunks)
|
||||
@@ -6,18 +6,16 @@ SUBSYSTEM_DEF(server_maint)
|
||||
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
|
||||
priority = 10
|
||||
var/list/currentrun
|
||||
- var/triggertime = null
|
||||
|
||||
/datum/controller/subsystem/server_maint/Initialize(timeofday)
|
||||
if (config.hub)
|
||||
world.visibility = 1
|
||||
- triggertime = REALTIMEOFDAY
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/server_maint/fire(resumed = FALSE)
|
||||
if(!resumed)
|
||||
src.currentrun = GLOB.clients.Copy()
|
||||
-
|
||||
+
|
||||
var/list/currentrun = src.currentrun
|
||||
var/round_started = SSticker.HasRoundStarted()
|
||||
|
||||
@@ -39,8 +37,3 @@ SUBSYSTEM_DEF(server_maint)
|
||||
return
|
||||
|
||||
#undef PING_BUFFER_TIME
|
||||
- if(config.sql_enabled)
|
||||
- sql_poll_population()
|
||||
- if(config.use_exp_tracking)
|
||||
- if(REALTIMEOFDAY > (triggertime +3000)) //server maint fires once at roundstart then once every 10 minutes. a 5 min check skips the first fire
|
||||
- update_exp(10,0)
|
||||
@@ -178,7 +178,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
emergency = backup_shuttle
|
||||
|
||||
if(world.time - SSticker.round_start_time < config.shuttle_refuel_delay)
|
||||
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
|
||||
to_chat(user, "The emergency shuttle is refueling. Please wait [DisplayTimeText((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)] before trying again.")
|
||||
return
|
||||
|
||||
switch(emergency.mode)
|
||||
@@ -220,7 +220,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
if(call_reason)
|
||||
SSblackbox.add_details("shuttle_reason", call_reason)
|
||||
log_game("Shuttle call reason: [call_reason]")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle. (<A HREF='?_src_=holder;trigger_centcom_recall=1'>TRIGGER CENTCOM RECALL</A>)")
|
||||
message_admins("[key_name_admin(user)] has called the shuttle. (<A HREF='?_src_=holder;[HrefToken()];trigger_centcom_recall=1'>TRIGGER CENTCOM RECALL</A>)")
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/centcom_recall(old_timer, admiral_message)
|
||||
if(emergency.mode != SHUTTLE_CALL || emergency.timer != old_timer)
|
||||
@@ -430,17 +430,14 @@ SUBSYSTEM_DEF(shuttle)
|
||||
continue base
|
||||
if(!(T.flags_1 & UNUSED_TRANSIT_TURF_1))
|
||||
continue base
|
||||
//to_chat(world, "[COORD(topleft)] and [COORD(bottomright)]")
|
||||
break base
|
||||
|
||||
if((!proposed_zone) || (!proposed_zone.len))
|
||||
return FALSE
|
||||
|
||||
var/turf/topleft = proposed_zone[1]
|
||||
//to_chat(world, "[COORD(topleft)] is TOPLEFT")
|
||||
// Then create a transit docking port in the middle
|
||||
var/coords = M.return_coords(0, 0, dock_dir)
|
||||
//to_chat(world, json_encode(coords))
|
||||
/* 0------2
|
||||
| |
|
||||
| |
|
||||
@@ -478,11 +475,9 @@ SUBSYSTEM_DEF(shuttle)
|
||||
if(WEST)
|
||||
transit_path = /turf/open/space/transit/west
|
||||
|
||||
//to_chat(world, "Docking port at [transit_x], [transit_y], [topleft.z]")
|
||||
var/turf/midpoint = locate(transit_x, transit_y, topleft.z)
|
||||
if(!midpoint)
|
||||
return FALSE
|
||||
//to_chat(world, "Making transit dock at [COORD(midpoint)]")
|
||||
var/area/shuttle/transit/A = new()
|
||||
A.parallax_movedir = travel_dir
|
||||
A.contents = proposed_zone
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// The Squeak
|
||||
// because this is about placement of mice mobs, and nothing to do with
|
||||
// mice - the computer peripheral
|
||||
// mice - the computer peripheral
|
||||
|
||||
SUBSYSTEM_DEF(squeak)
|
||||
name = "Squeak"
|
||||
@@ -32,8 +32,9 @@ SUBSYSTEM_DEF(squeak)
|
||||
|
||||
/datum/controller/subsystem/squeak/proc/find_exposed_wires()
|
||||
exposed_wires.Cut()
|
||||
|
||||
var/list/all_turfs = block(locate(1,1,1), locate(world.maxx,world.maxy,1))
|
||||
var/list/all_turfs
|
||||
for (var/z in GLOB.station_z_levels)
|
||||
all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
|
||||
for(var/turf/open/floor/plating/T in all_turfs)
|
||||
if(is_blocked_turf(T))
|
||||
continue
|
||||
|
||||
@@ -139,7 +139,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
if(!mode.explosion_in_progress && mode.check_finished(force_ending) || force_ending)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
toggle_ooc(1) // Turn it on
|
||||
toggle_ooc(TRUE) // Turn it on
|
||||
toggle_dooc(TRUE)
|
||||
declare_completion(force_ending)
|
||||
Master.SetRunLevel(RUNLEVEL_POSTGAME)
|
||||
|
||||
@@ -166,6 +167,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
to_chat(world, "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby.")
|
||||
return 0
|
||||
mode = pickweight(runnable_modes)
|
||||
if(!mode) //too few roundtypes all run too recently
|
||||
mode = pick(runnable_modes)
|
||||
|
||||
else
|
||||
mode = config.pick_mode(GLOB.master_mode)
|
||||
@@ -205,7 +208,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
mode.announce()
|
||||
|
||||
if(!config.ooc_during_round)
|
||||
toggle_ooc(0) // Turn it off
|
||||
toggle_ooc(FALSE) // Turn it off
|
||||
|
||||
CHECK_TICK
|
||||
GLOB.start_landmarks_list = shuffle(GLOB.start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
|
||||
@@ -241,10 +244,10 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
PostSetup()
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/PostSetup()
|
||||
set waitfor = 0
|
||||
set waitfor = FALSE
|
||||
mode.post_setup()
|
||||
GLOB.start_state = new /datum/station_state()
|
||||
GLOB.start_state.count(1)
|
||||
@@ -511,7 +514,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
end_state.count()
|
||||
var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100)
|
||||
|
||||
to_chat(world, "<BR>[GLOB.TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B>")
|
||||
to_chat(world, "<BR>[GLOB.TAB]Shift Duration: <B>[DisplayTimeText(world.time - SSticker.round_start_time)]</B>")
|
||||
to_chat(world, "<BR>[GLOB.TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
|
||||
if(mode.station_was_nuked)
|
||||
SSticker.news_report = STATION_DESTROYED_NUKE
|
||||
|
||||
@@ -169,7 +169,7 @@ SUBSYSTEM_DEF(vote)
|
||||
admin = TRUE
|
||||
|
||||
if(next_allowed_time > world.time && !admin)
|
||||
to_chat(usr, "<span class='warning'>A vote was initiated recently, you must wait roughly [(next_allowed_time-world.time)/10] seconds before a new vote can be started!</span>")
|
||||
to_chat(usr, "<span class='warning'>A vote was initiated recently, you must wait [DisplayTimeText(next_allowed_time-world.time)] before a new vote can be started!</span>")
|
||||
return 0
|
||||
|
||||
reset()
|
||||
@@ -198,7 +198,7 @@ SUBSYSTEM_DEF(vote)
|
||||
if(mode == "custom")
|
||||
text += "\n[question]"
|
||||
log_vote(text)
|
||||
to_chat(world, "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>")
|
||||
to_chat(world, "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [DisplayTimeText(config.vote_period)] to vote.</font>")
|
||||
time_remaining = round(config.vote_period/10)
|
||||
for(var/c in GLOB.clients)
|
||||
var/client/C = c
|
||||
|
||||
@@ -14,8 +14,8 @@ SUBSYSTEM_DEF(weather)
|
||||
if(W.aesthetic)
|
||||
continue
|
||||
for(var/mob/living/L in GLOB.mob_list)
|
||||
if(W.can_impact(L))
|
||||
W.impact(L)
|
||||
if(W.can_weather_act(L))
|
||||
W.weather_act(L)
|
||||
for(var/Z in eligible_zlevels)
|
||||
var/list/possible_weather_for_this_z = list()
|
||||
for(var/V in existing_weather)
|
||||
@@ -30,8 +30,7 @@ SUBSYSTEM_DEF(weather)
|
||||
/datum/controller/subsystem/weather/Initialize(start_timeofday)
|
||||
..()
|
||||
for(var/V in subtypesof(/datum/weather))
|
||||
var/datum/weather/W = V
|
||||
new W //weather->New will handle adding itself to the list
|
||||
new V //Weather's New() will handle adding stuff to the list
|
||||
|
||||
/datum/controller/subsystem/weather/proc/run_weather(weather_name, Z)
|
||||
if(!weather_name)
|
||||
|
||||
Reference in New Issue
Block a user