let's play the optimization game featuring lighting (#12310)

* debug proc

* kinda quirky

* let's play the lighting game

* let's play the macro game

* let's play the refactor game

* let's play the optimization game

* let's play the optimization game x2

* yeehaw

* e

* let's play the memory game

* fix

* lighting fix

* sanitization and checks

* mh

* hotkeys fix

* ok
This commit is contained in:
kevinz000
2020-05-23 13:47:42 -07:00
committed by GitHub
parent a6d7170d5b
commit e9068f05eb
12 changed files with 164 additions and 133 deletions
+15
View File
@@ -451,3 +451,18 @@ SUBSYSTEM_DEF(garbage)
#endif
#endif
#ifdef TESTING
/proc/writeDatumCount()
var/list/datums = list()
for(var/datum/D in world)
datums[D.type] += 1
for(var/datum/D)
datums[D.type] += 1
datums = sortTim(datums, /proc/cmp_numeric_dsc, associative = TRUE)
if(fexists("data/DATUMCOUNT.txt"))
fdel("data/DATUMCOUNT.txt")
var/outfile = file("data/DATUMCOUNT.txt")
for(var/path in datums)
outfile << "[datums[path]]\t\t\t\t\t[path]"
#endif
+4 -3
View File
@@ -43,7 +43,7 @@ SUBSYSTEM_DEF(input)
// LET'S PLAY THE BIND EVERY KEY GAME!
// oh except for Backspace and Enter; if you want to use those you shouldn't have used oldmode!
var/list/classic_ctrl_override_keys = list(
"\[", "\]", "\\", ";", "'", ",", ".", "/", "-", "\\=", "`"
"\[", "\]", "\\\\", ";", "'", ",", ".", "/", "-", "=", "`"
)
// i'm lazy let's play the list iteration game of numbers
for(var/i in 0 to 9)
@@ -58,8 +58,9 @@ SUBSYSTEM_DEF(input)
macroset_classic_input["Ctrl+L"] = "looc"
// let's play the list iteration game x2
for(var/key in classic_ctrl_override_keys)
macroset_classic_input["Ctrl+[key]"] = "\"KeyDown [key]\""
macroset_classic_input["Ctrl+[key]+UP"] = "\"KeyUp [key]\""
// make sure to double double quote to ensure things are treated as a key combo instead of addition/semicolon logic.
macroset_classic_input["\"Ctrl+[key]\""] = "\"KeyDown [istext(classic_ctrl_override_keys[key])? classic_ctrl_override_keys[key] : key]\""
macroset_classic_input["\"Ctrl+[key]+UP\""] = "\"KeyUp [istext(classic_ctrl_override_keys[key])? classic_ctrl_override_keys[key] : key]\""
// 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=\\\"\\\"\\\"\""