Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit765
This commit is contained in:
@@ -104,7 +104,9 @@
|
||||
var/list/lines = world.file2list("[directory]/[filename]")
|
||||
var/list/_entries = entries
|
||||
var/list/postload_required = list()
|
||||
var/linenumber = 0
|
||||
for(var/L in lines)
|
||||
linenumber++
|
||||
L = trim(L)
|
||||
if(!L)
|
||||
continue
|
||||
@@ -132,7 +134,7 @@
|
||||
|
||||
if(entry == "$include")
|
||||
if(!value)
|
||||
log_config("Warning: Invalid $include directive: [value]")
|
||||
log_config("LINE [linenumber]: Invalid $include directive: [value]")
|
||||
else
|
||||
LoadEntries(value, stack)
|
||||
++.
|
||||
@@ -140,7 +142,7 @@
|
||||
|
||||
var/datum/config_entry/E = _entries[entry]
|
||||
if(!E)
|
||||
log_config("Unknown setting in configuration: '[entry]'")
|
||||
log_config("LINE [linenumber]: Unknown setting: '[entry]'")
|
||||
continue
|
||||
|
||||
if(lockthis)
|
||||
@@ -150,7 +152,7 @@
|
||||
var/datum/config_entry/new_ver = entries_by_type[E.deprecated_by]
|
||||
var/new_value = E.DeprecationUpdate(value)
|
||||
var/good_update = istext(new_value)
|
||||
log_config("Entry [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
log_config("LINE [linenumber]: [entry] is deprecated and will be removed soon. Migrate to [new_ver.name]![good_update ? " Suggested new value is: [new_value]" : ""]")
|
||||
if(!warned_deprecated_configs)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/message_admins, "This server is using deprecated configuration settings. Please check the logs and update accordingly."), 0)
|
||||
warned_deprecated_configs = TRUE
|
||||
@@ -162,10 +164,10 @@
|
||||
|
||||
var/validated = E.ValidateAndSet(value, TRUE)
|
||||
if(!validated)
|
||||
log_config("Failed to validate setting \"[value]\" for [entry]")
|
||||
log_config("LINE [linenumber]: Failed to validate setting \"[value]\" for [entry]")
|
||||
else
|
||||
if(E.modified && !E.dupes_allowed)
|
||||
log_config("Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
log_config("LINE [linenumber]: Duplicate setting for [entry] ([value], [E.resident_file]) detected! Using latest.")
|
||||
if(E.postload_required)
|
||||
postload_required[E] = TRUE
|
||||
|
||||
|
||||
@@ -168,12 +168,14 @@
|
||||
|
||||
/datum/config_entry/flag/join_with_mutant_humans //players can pick mutant bodyparts for humans before joining the game
|
||||
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
/datum/config_entry/flag/no_summon_guns //No
|
||||
|
||||
/datum/config_entry/flag/no_summon_magic //Fun
|
||||
|
||||
/datum/config_entry/flag/no_summon_events //Allowed
|
||||
|
||||
/datum/config_entry/flag/no_summon_traumas //!
|
||||
|
||||
/datum/config_entry/flag/no_intercept_report //Whether or not to send a communications intercept report roundstart. This may be overridden by gamemodes.
|
||||
|
||||
/datum/config_entry/number/arrivals_shuttle_dock_window //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
|
||||
|
||||
@@ -12,7 +12,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/frequency_upper = 6000 //10 minutes upper bound. Basically an event will happen every 3 to 10 minutes.
|
||||
|
||||
var/list/holidays //List of all holidays occuring today or null if no holidays
|
||||
var/wizardmode = 0
|
||||
var/wizardmode = FALSE
|
||||
|
||||
/datum/controller/subsystem/events/Initialize(time, zlevel)
|
||||
for(var/type in typesof(/datum/round_event_control))
|
||||
@@ -91,6 +91,7 @@ SUBSYSTEM_DEF(events)
|
||||
if(. == EVENT_CANT_RUN)//we couldn't run this event for some reason, set its max_occurrences to 0
|
||||
E.max_occurrences = 0
|
||||
else if(. == EVENT_READY)
|
||||
E.random = TRUE
|
||||
E.runEvent(TRUE)
|
||||
|
||||
//allows a client to trigger an event
|
||||
|
||||
@@ -64,19 +64,33 @@ SUBSYSTEM_DEF(input)
|
||||
// Misc
|
||||
macroset_classic_input["Tab"] = "\".winset \\\"mainwindow.macro=[SKIN_MACROSET_CLASSIC_HOTKEYS] map.focus=true input.background-color=[COLOR_INPUT_DISABLED]\\\"\""
|
||||
macroset_classic_input["Escape"] = "\".winset \\\"input.text=\\\"\\\"\\\"\""
|
||||
|
||||
|
||||
// FINALLY, WE CAN DO SOMETHING MORE NORMAL FOR THE SNOWFLAKE-BUT-LESS KEYSET.
|
||||
|
||||
// HAHA - SIKE. Because of BYOND weirdness (tl;dr not specifically binding this way results in potentially duplicate chatboxes when
|
||||
// conflicts occur with something like say indicator vs say), we're going to snowflake this anyways
|
||||
var/list/hard_binds = list(
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
var/list/hard_bind_anti_collision = list()
|
||||
var/list/anti_collision_modifiers = list("Ctrl", "Alt", "Shift", "Ctrl+Alt", "Ctrl+Shift", "Alt+Shift", "Ctrl+Alt+Shift")
|
||||
for(var/key in hard_binds)
|
||||
for(var/modifier in anti_collision_modifiers)
|
||||
hard_bind_anti_collision["[modifier]+[key]"] = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
|
||||
|
||||
macroset_classic_hotkey = list(
|
||||
"Any" = "\"KeyDown \[\[*\]\]\"",
|
||||
"Any+UP" = "\"KeyUp \[\[*\]\]\"",
|
||||
"Tab" = "\".winset \\\"mainwindow.macro=[SKIN_MACROSET_CLASSIC_INPUT] input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
|
||||
"Escape" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
|
||||
macroset_classic_hotkey |= hard_binds
|
||||
macroset_classic_hotkey |= hard_bind_anti_collision
|
||||
|
||||
// And finally, the modern set.
|
||||
macroset_hotkey = list(
|
||||
@@ -85,11 +99,10 @@ SUBSYSTEM_DEF(input)
|
||||
"Tab" = "\".winset \\\"input.focus=true?map.focus=true input.background-color=[COLOR_INPUT_DISABLED]:input.focus=true input.background-color=[COLOR_INPUT_ENABLED]\\\"\"",
|
||||
"Escape" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"Back" = "\".winset \\\"input.text=\\\"\\\"\\\"\"",
|
||||
"O" = "ooc",
|
||||
"T" = "say",
|
||||
"L" = "looc",
|
||||
"M" = "me"
|
||||
)
|
||||
|
||||
macroset_hotkey |= hard_binds
|
||||
macroset_hotkey |= hard_bind_anti_collision
|
||||
|
||||
// Badmins just wanna have fun ♪
|
||||
/datum/controller/subsystem/input/proc/refresh_client_macro_sets()
|
||||
@@ -104,3 +117,8 @@ SUBSYSTEM_DEF(input)
|
||||
for(var/i in 1 to clients.len)
|
||||
var/client/C = clients[i]
|
||||
C.keyLoop()
|
||||
|
||||
/// *sigh
|
||||
/client/verb/NONSENSICAL_VERB_THAT_DOES_NOTHING()
|
||||
set name = ".NONSENSICAL_VERB_THAT_DOES_NOTHING"
|
||||
set hidden = TRUE
|
||||
|
||||
@@ -10,24 +10,52 @@ SUBSYSTEM_DEF(materials)
|
||||
var/list/materials
|
||||
///Dictionary of category || list of material refs
|
||||
var/list/materials_by_category
|
||||
///Dictionary of category || list of material types, mostly used by rnd machines like autolathes.
|
||||
var/list/materialtypes_by_category
|
||||
///A cache of all material combinations that have been used
|
||||
var/list/list/material_combos
|
||||
///List of stackcrafting recipes for materials using rigid materials
|
||||
var/list/rigid_stack_recipes = list(
|
||||
new /datum/stack_recipe("chair", /obj/structure/chair/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("toilet", /obj/structure/toilet/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("sink", /obj/structure/sink/greyscale, one_per_turf = TRUE, on_floor = TRUE, applies_mats = TRUE),
|
||||
new /datum/stack_recipe("Floor tile", /obj/item/stack/tile/material, 1, 4, 20, applies_mats = TRUE)
|
||||
)
|
||||
|
||||
///Ran on initialize, populated the materials and materials_by_category dictionaries with their appropiate vars (See these variables for more info)
|
||||
/datum/controller/subsystem/materials/proc/InitializeMaterials()
|
||||
materials = list()
|
||||
materials_by_category = list()
|
||||
materialtypes_by_category = list()
|
||||
material_combos = list()
|
||||
for(var/type in subtypesof(/datum/material))
|
||||
var/datum/material/ref = new type
|
||||
materials[type] = ref
|
||||
for(var/c in ref.categories)
|
||||
materials_by_category[c] += list(ref)
|
||||
materialtypes_by_category[c] += list(type)
|
||||
|
||||
/datum/controller/subsystem/materials/proc/GetMaterialRef(datum/material/fakemat)
|
||||
if(!materials)
|
||||
InitializeMaterials()
|
||||
return materials[fakemat] || fakemat
|
||||
return materials[fakemat] || fakemat
|
||||
|
||||
|
||||
///Returns a list to be used as an object's custom_materials. Lists will be cached and re-used based on the parameters.
|
||||
/datum/controller/subsystem/materials/proc/FindOrCreateMaterialCombo(list/materials_declaration, multiplier)
|
||||
if(!material_combos)
|
||||
InitializeMaterials()
|
||||
var/list/combo_params = list()
|
||||
for(var/x in materials_declaration)
|
||||
var/datum/material/mat = x
|
||||
var/path_name = ispath(mat) ? "[mat]" : "[mat.type]"
|
||||
combo_params += "[path_name]=[materials_declaration[mat] * multiplier]"
|
||||
sortTim(combo_params, /proc/cmp_text_asc) // We have to sort now in case the declaration was not in order
|
||||
var/combo_index = combo_params.Join("-")
|
||||
var/list/combo = material_combos[combo_index]
|
||||
if(!combo)
|
||||
combo = list()
|
||||
for(var/mat in materials_declaration)
|
||||
combo[GetMaterialRef(mat)] = materials_declaration[mat] * multiplier
|
||||
material_combos[combo_index] = combo
|
||||
return combo
|
||||
|
||||
Reference in New Issue
Block a user