mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge branch 'release' of https://github.com/VOREStation/VOREStation
# Conflicts: # code/game/area/Away Mission areas.dm # code/game/objects/items/weapons/stunbaton.dm # code/game/objects/items/weapons/teleportation.dm # code/modules/clothing/glasses/glasses.dm # code/modules/events/event_container_vr.dm # code/modules/mining/ore_box.dm # code/modules/paperwork/paper.dm # code/modules/rogueminer_vr/zone_console.dm # config/custom_items.txt # icons/mob/items/lefthand_suits.dmi # icons/mob/items/righthand_suits.dmi # icons/mob/species/vulpkanin/helmet.dmi # icons/mob/species/vulpkanin/suit.dmi # icons/mob/suit.dmi # icons/obj/clothing/suits.dmi # maps/tether/tether_defines.dm
This commit is contained in:
@@ -54,7 +54,10 @@ var/datum/controller/supply/supply_controller = new()
|
||||
|
||||
for(var/typepath in subtypesof(/datum/supply_pack))
|
||||
var/datum/supply_pack/P = new typepath()
|
||||
supply_pack[P.name] = P
|
||||
if(P.name)
|
||||
supply_pack[P.name] = P
|
||||
else
|
||||
qdel(P)
|
||||
|
||||
/datum/controller/process/supply/setup()
|
||||
name = "supply controller"
|
||||
|
||||
@@ -21,7 +21,8 @@ var/list/gamemode_cache = list()
|
||||
var/log_pda = 0 // log pda messages
|
||||
var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits
|
||||
var/log_runtime = 0 // logs world.log to a file
|
||||
var/log_world_output = 0 // log world.log << messages
|
||||
var/log_world_output = 0 // log to_world_log(messages)
|
||||
var/log_graffiti = 0 // logs graffiti
|
||||
var/sql_enabled = 0 // for sql switching
|
||||
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
|
||||
var/allow_vote_restart = 0 // allow votes to restart
|
||||
@@ -376,6 +377,9 @@ var/list/gamemode_cache = list()
|
||||
if ("log_runtime")
|
||||
config.log_runtime = 1
|
||||
|
||||
if ("log_graffiti")
|
||||
config.log_graffiti = 1
|
||||
|
||||
if ("generate_map")
|
||||
config.generate_map = 1
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
var/limit_visitors = -1 //Unlimited by default
|
||||
var/pto_cap = 100 //Hours
|
||||
var/require_flavor = FALSE
|
||||
var/ipqualityscore_apikey //API key for ipqualityscore.com
|
||||
|
||||
/hook/startup/proc/read_vs_config()
|
||||
var/list/Lines = file2list("config/config.txt")
|
||||
@@ -58,4 +59,6 @@
|
||||
config.pto_job_change = TRUE
|
||||
if ("require_flavor")
|
||||
config.require_flavor = TRUE
|
||||
if ("ipqualityscore_apikey")
|
||||
config.ipqualityscore_apikey = value
|
||||
return 1
|
||||
|
||||
@@ -27,6 +27,8 @@ SUBSYSTEM_DEF(timer)
|
||||
var/last_invoke_tick = 0
|
||||
var/static/last_invoke_warning = 0
|
||||
var/static/bucket_auto_reset = TRUE
|
||||
var/static/datum/timedevent/timer // VOREStation Edit - For debugging this goes here.
|
||||
var/super_debug = FALSE // VOREStation Edit - Temporary Debugging
|
||||
|
||||
/datum/controller/subsystem/timer/PreInit()
|
||||
bucket_list.len = BUCKET_LEN
|
||||
@@ -103,10 +105,11 @@ SUBSYSTEM_DEF(timer)
|
||||
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
log_world("Timer bailing before execution at world.time=[world.time] with last_invoke_tick=[last_invoke_tick]") // VOREStation Edit - Debugging
|
||||
return
|
||||
|
||||
var/static/list/spent = list()
|
||||
var/static/datum/timedevent/timer
|
||||
// var/static/datum/timedevent/timer VOREStation Edit - for debugging purpose putting this as datum scope
|
||||
if (practical_offset > BUCKET_LEN)
|
||||
head_offset += TICKS2DS(BUCKET_LEN)
|
||||
practical_offset = 1
|
||||
@@ -139,8 +142,15 @@ SUBSYSTEM_DEF(timer)
|
||||
last_invoke_tick = world.time
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
if (super_debug) log_world("Bailing from execution with practical_offset=[practical_offset] and timer=[timer]") // VOREStation Edit - Super Debug
|
||||
return
|
||||
|
||||
// VOREStation Edit Start - Debugging
|
||||
if (timer.next == timer && timer.next != head)
|
||||
log_world("Self-looping out of bucket timer failure condition X occurred")
|
||||
CRASH("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
// VOREStation Edit End - Debugging
|
||||
|
||||
timer = timer.next
|
||||
if (timer == head)
|
||||
break
|
||||
@@ -235,6 +245,11 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
/datum/controller/subsystem/timer/proc/reset_buckets()
|
||||
var/list/bucket_list = src.bucket_list
|
||||
// VOREStation Edit Start - Debugging
|
||||
log_world("Beginning Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
// VOREStation Edit End - Debugging
|
||||
var/list/alltimers = list()
|
||||
//collect the timers currently in the bucket
|
||||
for (var/bucket_head in bucket_list)
|
||||
@@ -256,6 +271,11 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
alltimers += second_queue
|
||||
if (!length(alltimers))
|
||||
// VOREStation Edit Start - Debugging
|
||||
log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset] (NO TIMERS)")
|
||||
// VOREStation Edit End - Debugging
|
||||
return
|
||||
|
||||
sortTim(alltimers, /proc/cmp_timer)
|
||||
@@ -302,7 +322,11 @@ SUBSYSTEM_DEF(timer)
|
||||
alltimers.Cut(1, i+1)
|
||||
second_queue = alltimers
|
||||
bucket_count = new_bucket_count
|
||||
|
||||
// VOREStation Edit Start - Debugging
|
||||
log_world("Finished Timer bucket reset. bucket_list.len=[length(bucket_list)], BUCKET_LEN=[BUCKET_LEN], \
|
||||
world.tick_lag = [world.tick_lag], bucket_resolution=[bucket_resolution], world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
// VOREStation Edit End - Debugging
|
||||
|
||||
/datum/controller/subsystem/timer/Recover()
|
||||
second_queue |= SStimer.second_queue
|
||||
@@ -396,6 +420,8 @@ SUBSYSTEM_DEF(timer)
|
||||
var/datum/timedevent/buckethead
|
||||
if(bucketpos > 0)
|
||||
buckethead = bucket_list[bucketpos]
|
||||
else // VOREStation Edit - Debugging
|
||||
log_world("WARNING: non-positive bucket pos [bucketpos] for [src]! next=[next ? next : "NULL"] prev=[prev ? prev : "NULL"]") // VOREStation Edit - Debugging
|
||||
if(buckethead == src)
|
||||
bucket_list[bucketpos] = next
|
||||
SStimer.bucket_count--
|
||||
|
||||
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(vote)
|
||||
else
|
||||
factor = 1.4
|
||||
choices["Initiate Crew Transfer"] = round(choices["Initiate Crew Transfer"] * factor)
|
||||
world << "<font color='purple'>Crew Transfer Factor: [factor]</font>"
|
||||
to_world("<font color='purple'>Crew Transfer Factor: [factor]</font>")
|
||||
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Extend the Shift"]) //VOREStation Edit
|
||||
|
||||
. = list() // Get all options with that many votes and return them in a list
|
||||
@@ -166,10 +166,10 @@ SUBSYSTEM_DEF(vote)
|
||||
if(mode == VOTE_GAMEMODE) //fire this even if the vote fails.
|
||||
if(!round_progressing)
|
||||
round_progressing = 1
|
||||
world << "<font color='red'><b>The round will start soon.</b></font>"
|
||||
to_world("<font color='red'><b>The round will start soon.</b></font>")
|
||||
|
||||
if(restart)
|
||||
world << "World restarting due to vote..."
|
||||
to_world("World restarting due to vote...")
|
||||
feedback_set_details("end_error", "restart vote")
|
||||
if(blackbox)
|
||||
blackbox.save_all_data_to_sql()
|
||||
@@ -215,10 +215,10 @@ SUBSYSTEM_DEF(vote)
|
||||
if(VOTE_CREW_TRANSFER)
|
||||
if(!check_rights(R_ADMIN|R_MOD, 0)) // The gods care not for the affairs of the mortals
|
||||
if(get_security_level() == "red" || get_security_level() == "delta")
|
||||
initiator_key << "The current alert status is too high to call for a crew transfer!"
|
||||
to_chat(initiator_key, "The current alert status is too high to call for a crew transfer!")
|
||||
return 0
|
||||
if(ticker.current_state <= GAME_STATE_SETTING_UP)
|
||||
initiator_key << "The crew transfer button has been disabled!"
|
||||
to_chat(initiator_key, "The crew transfer button has been disabled!")
|
||||
return 0
|
||||
question = "Your PDA beeps with a message from Central. Would you like an additional four hours to finish ongoing projects?" //Yawn Wider Edit
|
||||
choices.Add("Initiate Crew Transfer", "Extend the Shift") //VOREStation Edit
|
||||
@@ -252,13 +252,13 @@ SUBSYSTEM_DEF(vote)
|
||||
|
||||
log_vote(text)
|
||||
|
||||
world << "<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_world("<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>")
|
||||
if(vote_type == VOTE_CREW_TRANSFER || vote_type == VOTE_GAMEMODE || vote_type == VOTE_CUSTOM)
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
|
||||
|
||||
if(mode == VOTE_GAMEMODE && round_progressing)
|
||||
round_progressing = 0
|
||||
world << "<font color='red'><b>Round start has been delayed.</b></font>"
|
||||
to_world("<font color='red'><b>Round start has been delayed.</b></font>")
|
||||
|
||||
time_remaining = round(config.vote_period / 10)
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user